@diwantanushh/rapiddex-contracts 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/openzeppelin-contracts/contracts/drafts/IERC20Permit.sol +14 -0
- package/lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol +14 -0
- package/lib/openzeppelin-contracts/contracts/token/ERC721/ERC721.sol +227 -0
- package/lib/openzeppelin-contracts/contracts/token/ERC721/IERC721.sol +20 -0
- package/lib/openzeppelin-contracts/contracts/token/ERC721/IERC721Enumerable.sol +10 -0
- package/lib/openzeppelin-contracts/contracts/token/ERC721/IERC721Metadata.sol +10 -0
- package/lib/openzeppelin-contracts/contracts/token/ERC721/IERC721Receiver.sol +8 -0
- package/lib/openzeppelin-contracts/contracts/utils/Address.sol +12 -0
- package/lib/openzeppelin-contracts/contracts/utils/Context.sol +8 -0
- package/lib/openzeppelin-contracts/contracts/utils/introspection/ERC165.sol +10 -0
- package/lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol +6 -0
- package/lib/openzeppelin-contracts-master/.changeset/better-tires-pull.md +5 -0
- package/lib/openzeppelin-contracts-master/.changeset/blue-jars-lay.md +5 -0
- package/lib/openzeppelin-contracts-master/.changeset/bright-cooks-brush.md +5 -0
- package/lib/openzeppelin-contracts-master/.changeset/chatty-dryers-joke.md +5 -0
- package/lib/openzeppelin-contracts-master/.changeset/config.json +12 -0
- package/lib/openzeppelin-contracts-master/.changeset/cool-clocks-tick.md +5 -0
- package/lib/openzeppelin-contracts-master/.changeset/curly-pandas-flow.md +5 -0
- package/lib/openzeppelin-contracts-master/.changeset/flat-flies-hear.md +5 -0
- package/lib/openzeppelin-contracts-master/.changeset/floppy-symbols-burn.md +5 -0
- package/lib/openzeppelin-contracts-master/.changeset/fruity-coats-smash.md +5 -0
- package/lib/openzeppelin-contracts-master/.changeset/gentle-apples-dance.md +5 -0
- package/lib/openzeppelin-contracts-master/.changeset/happy-pants-decide.md +5 -0
- package/lib/openzeppelin-contracts-master/.changeset/heavy-pots-reply.md +5 -0
- package/lib/openzeppelin-contracts-master/.changeset/legal-cameras-sin.md +5 -0
- package/lib/openzeppelin-contracts-master/.changeset/rare-bushes-march.md +5 -0
- package/lib/openzeppelin-contracts-master/.changeset/red-gifts-appear.md +5 -0
- package/lib/openzeppelin-contracts-master/.changeset/silver-falcons-lay.md +5 -0
- package/lib/openzeppelin-contracts-master/.changeset/smooth-cows-notice.md +5 -0
- package/lib/openzeppelin-contracts-master/.changeset/some-dolls-shine.md +5 -0
- package/lib/openzeppelin-contracts-master/.changeset/spicy-seals-bake.md +5 -0
- package/lib/openzeppelin-contracts-master/.changeset/sweet-houses-cheer.md +5 -0
- package/lib/openzeppelin-contracts-master/.changeset/swift-trees-build.md +5 -0
- package/lib/openzeppelin-contracts-master/.changeset/tame-rules-run.md +5 -0
- package/lib/openzeppelin-contracts-master/.changeset/tangy-jokes-begin.md +5 -0
- package/lib/openzeppelin-contracts-master/.changeset/tidy-turkeys-build.md +5 -0
- package/lib/openzeppelin-contracts-master/.codecov.yml +16 -0
- package/lib/openzeppelin-contracts-master/.editorconfig +21 -0
- package/lib/openzeppelin-contracts-master/.gitattributes +3 -0
- package/lib/openzeppelin-contracts-master/.github/CODEOWNERS +10 -0
- package/lib/openzeppelin-contracts-master/.github/ISSUE_TEMPLATE/bug_report.md +21 -0
- package/lib/openzeppelin-contracts-master/.github/ISSUE_TEMPLATE/config.yml +4 -0
- package/lib/openzeppelin-contracts-master/.github/ISSUE_TEMPLATE/feature_request.md +14 -0
- package/lib/openzeppelin-contracts-master/.github/PULL_REQUEST_TEMPLATE.md +20 -0
- package/lib/openzeppelin-contracts-master/.github/actions/gas-compare/action.yml +51 -0
- package/lib/openzeppelin-contracts-master/.github/actions/setup/action.yml +108 -0
- package/lib/openzeppelin-contracts-master/.github/actions/storage-layout/action.yml +57 -0
- package/lib/openzeppelin-contracts-master/.github/workflows/actionlint.yml +18 -0
- package/lib/openzeppelin-contracts-master/.github/workflows/changeset.yml +28 -0
- package/lib/openzeppelin-contracts-master/.github/workflows/checks.yml +132 -0
- package/lib/openzeppelin-contracts-master/.github/workflows/docs.yml +19 -0
- package/lib/openzeppelin-contracts-master/.github/workflows/formal-verification.yml +63 -0
- package/lib/openzeppelin-contracts-master/.github/workflows/release-cycle.yml +212 -0
- package/lib/openzeppelin-contracts-master/.github/workflows/release-upgradeable.yml +97 -0
- package/lib/openzeppelin-contracts-master/.github/workflows/upgradeable.yml +35 -0
- package/lib/openzeppelin-contracts-master/.gitmodules +10 -0
- package/lib/openzeppelin-contracts-master/.husky/pre-commit +2 -0
- package/lib/openzeppelin-contracts-master/.mocharc.js +4 -0
- package/lib/openzeppelin-contracts-master/.prettierrc +15 -0
- package/lib/openzeppelin-contracts-master/.solcover.js +21 -0
- package/lib/openzeppelin-contracts-master/CHANGELOG.md +1424 -0
- package/lib/openzeppelin-contracts-master/CODE_OF_CONDUCT.md +73 -0
- package/lib/openzeppelin-contracts-master/CONTRIBUTING.md +36 -0
- package/lib/openzeppelin-contracts-master/FUNDING.json +10 -0
- package/lib/openzeppelin-contracts-master/GUIDELINES.md +170 -0
- package/lib/openzeppelin-contracts-master/LICENSE +22 -0
- package/lib/openzeppelin-contracts-master/README.md +122 -0
- package/lib/openzeppelin-contracts-master/RELEASING.md +45 -0
- package/lib/openzeppelin-contracts-master/SECURITY.md +43 -0
- package/lib/openzeppelin-contracts-master/audits/2017-03.md +292 -0
- package/lib/openzeppelin-contracts-master/audits/2018-10.pdf +0 -0
- package/lib/openzeppelin-contracts-master/audits/2022-10-Checkpoints.pdf +0 -0
- package/lib/openzeppelin-contracts-master/audits/2022-10-ERC4626.pdf +0 -0
- package/lib/openzeppelin-contracts-master/audits/2023-05-v4.9.pdf +0 -0
- package/lib/openzeppelin-contracts-master/audits/2023-10-v5.0.pdf +0 -0
- package/lib/openzeppelin-contracts-master/audits/2024-10-v5.1.pdf +0 -0
- package/lib/openzeppelin-contracts-master/audits/2024-12-v5.2.pdf +0 -0
- package/lib/openzeppelin-contracts-master/audits/2025-04-v5.3.pdf +0 -0
- package/lib/openzeppelin-contracts-master/audits/2025-07-v5.4.pdf +0 -0
- package/lib/openzeppelin-contracts-master/audits/2025-10-v5.5.pdf +0 -0
- package/lib/openzeppelin-contracts-master/audits/2025-11-RLP.pdf +0 -0
- package/lib/openzeppelin-contracts-master/audits/2026-02-v5.6.pdf +0 -0
- package/lib/openzeppelin-contracts-master/audits/README.md +24 -0
- package/lib/openzeppelin-contracts-master/contracts/access/AccessControl.sol +207 -0
- package/lib/openzeppelin-contracts-master/contracts/access/IAccessControl.sol +98 -0
- package/lib/openzeppelin-contracts-master/contracts/access/Ownable.sol +100 -0
- package/lib/openzeppelin-contracts-master/contracts/access/Ownable2Step.sol +67 -0
- package/lib/openzeppelin-contracts-master/contracts/access/README.adoc +45 -0
- package/lib/openzeppelin-contracts-master/contracts/access/extensions/AccessControlDefaultAdminRules.sol +372 -0
- package/lib/openzeppelin-contracts-master/contracts/access/extensions/AccessControlEnumerable.sol +81 -0
- package/lib/openzeppelin-contracts-master/contracts/access/extensions/IAccessControlDefaultAdminRules.sol +192 -0
- package/lib/openzeppelin-contracts-master/contracts/access/extensions/IAccessControlEnumerable.sol +31 -0
- package/lib/openzeppelin-contracts-master/contracts/access/manager/AccessManaged.sol +112 -0
- package/lib/openzeppelin-contracts-master/contracts/access/manager/AccessManager.sol +751 -0
- package/lib/openzeppelin-contracts-master/contracts/access/manager/AuthorityUtils.sol +36 -0
- package/lib/openzeppelin-contracts-master/contracts/access/manager/IAccessManaged.sol +32 -0
- package/lib/openzeppelin-contracts-master/contracts/access/manager/IAccessManager.sol +404 -0
- package/lib/openzeppelin-contracts-master/contracts/access/manager/IAuthority.sol +14 -0
- package/lib/openzeppelin-contracts-master/contracts/account/Account.sol +151 -0
- package/lib/openzeppelin-contracts-master/contracts/account/README.adoc +30 -0
- package/lib/openzeppelin-contracts-master/contracts/account/extensions/draft-AccountERC7579.sol +420 -0
- package/lib/openzeppelin-contracts-master/contracts/account/extensions/draft-AccountERC7579Hooked.sol +171 -0
- package/lib/openzeppelin-contracts-master/contracts/account/extensions/draft-ERC7821.sol +70 -0
- package/lib/openzeppelin-contracts-master/contracts/account/utils/EIP7702Utils.sol +21 -0
- package/lib/openzeppelin-contracts-master/contracts/account/utils/draft-ERC4337Utils.sol +279 -0
- package/lib/openzeppelin-contracts-master/contracts/account/utils/draft-ERC7579Utils.sol +280 -0
- package/lib/openzeppelin-contracts-master/contracts/crosschain/CrosschainLinked.sol +109 -0
- package/lib/openzeppelin-contracts-master/contracts/crosschain/CrosschainRemoteExecutor.sol +98 -0
- package/lib/openzeppelin-contracts-master/contracts/crosschain/ERC7786Recipient.sol +66 -0
- package/lib/openzeppelin-contracts-master/contracts/crosschain/README.adoc +44 -0
- package/lib/openzeppelin-contracts-master/contracts/crosschain/bridges/BridgeERC1155.sol +101 -0
- package/lib/openzeppelin-contracts-master/contracts/crosschain/bridges/BridgeERC20.sol +37 -0
- package/lib/openzeppelin-contracts-master/contracts/crosschain/bridges/BridgeERC721.sol +61 -0
- package/lib/openzeppelin-contracts-master/contracts/crosschain/bridges/BridgeERC7802.sol +34 -0
- package/lib/openzeppelin-contracts-master/contracts/crosschain/bridges/abstract/BridgeFungible.sol +83 -0
- package/lib/openzeppelin-contracts-master/contracts/crosschain/bridges/abstract/BridgeMultiToken.sol +92 -0
- package/lib/openzeppelin-contracts-master/contracts/crosschain/bridges/abstract/BridgeNonFungible.sol +75 -0
- package/lib/openzeppelin-contracts-master/contracts/finance/README.adoc +14 -0
- package/lib/openzeppelin-contracts-master/contracts/finance/VestingWallet.sol +160 -0
- package/lib/openzeppelin-contracts-master/contracts/finance/VestingWalletCliff.sol +54 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/Governor.sol +820 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/IGovernor.sol +449 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/README.adoc +201 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/TimelockController.sol +470 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/extensions/GovernorCountingFractional.sol +190 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/extensions/GovernorCountingOverridable.sol +222 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/extensions/GovernorCountingSimple.sol +96 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/extensions/GovernorCrosschain.sol +30 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/extensions/GovernorNoncesKeyed.sol +91 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/extensions/GovernorPreventLateQuorum.sol +92 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/extensions/GovernorProposalGuardian.sol +59 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/extensions/GovernorSequentialProposalId.sol +75 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/extensions/GovernorSettings.sol +106 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/extensions/GovernorStorage.sol +134 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/extensions/GovernorSuperQuorum.sol +59 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/extensions/GovernorTimelockAccess.sol +346 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/extensions/GovernorTimelockCompound.sol +162 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/extensions/GovernorTimelockControl.sol +167 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/extensions/GovernorVotes.sol +64 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/extensions/GovernorVotesQuorumFraction.sol +113 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/extensions/GovernorVotesSuperQuorumFraction.sol +135 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/utils/IVotes.sol +60 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/utils/Votes.sol +245 -0
- package/lib/openzeppelin-contracts-master/contracts/governance/utils/VotesExtended.sol +85 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC1155.sol +6 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC1155MetadataURI.sol +6 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC1155Receiver.sol +6 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC1271.sol +17 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC1363.sol +86 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC1363Receiver.sol +32 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC1363Spender.sol +26 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC165.sol +6 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC1820Implementer.sol +20 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC1820Registry.sol +112 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC1967.sol +24 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC20.sol +6 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC20Metadata.sol +6 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC2309.sol +19 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC2612.sol +8 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC2981.sol +26 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC3156.sol +7 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC3156FlashBorrower.sol +27 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC3156FlashLender.sol +41 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC4626.sol +230 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC4906.sol +20 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC5267.sol +28 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC5313.sol +16 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC5805.sol +9 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC6372.sol +17 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC6909.sol +125 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC721.sol +6 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC721Enumerable.sol +6 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC721Metadata.sol +6 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC721Receiver.sol +6 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC7751.sol +12 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC777.sol +200 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC777Recipient.sol +35 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC777Sender.sol +35 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/IERC7913.sol +18 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/README.adoc +138 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/draft-IERC1822.sol +20 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/draft-IERC4337.sol +255 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/draft-IERC6093.sol +162 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/draft-IERC7579.sol +227 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/draft-IERC7674.sol +17 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/draft-IERC7786.sol +64 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/draft-IERC7802.sol +32 -0
- package/lib/openzeppelin-contracts-master/contracts/interfaces/draft-IERC7821.sol +44 -0
- package/lib/openzeppelin-contracts-master/contracts/metatx/ERC2771Context.sol +90 -0
- package/lib/openzeppelin-contracts-master/contracts/metatx/ERC2771Forwarder.sol +379 -0
- package/lib/openzeppelin-contracts-master/contracts/metatx/README.adoc +17 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/AccessManagedTarget.sol +34 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/AccessManagerMock.sol +20 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/ArraysMock.sol +171 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/AuthorityMock.sol +69 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/Base64Dirty.sol +19 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/BatchCaller.sol +20 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/CallReceiverMock.sol +107 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/ConstructorMock.sol +34 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/ContextMock.sol +35 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/DummyImplementation.sol +61 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/EIP712Verifier.sol +16 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/ERC1271WalletMock.sol +24 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/ERC165Mock.sol +100 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/ERC2771ContextMock.sol +28 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/ERC3156FlashBorrowerMock.sol +53 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/EtherReceiverMock.sol +17 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/InitializableMock.sol +130 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/MerkleProofCustomHashMock.sol +62 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/MerkleTreeMock.sol +52 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/MulticallHelper.sol +23 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/MultipleInheritanceInitializableMocks.sol +131 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/PausableMock.sol +31 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/ReentrancyAttack.sol +17 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/ReentrancyMock.sol +59 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/ReentrancyTransientMock.sol +59 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/RegressionImplementation.sol +61 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/SingleInheritanceInitializableMocks.sol +49 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/Stateless.sol +64 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/StorageSlotMock.sol +87 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/TimelockReentrant.sol +26 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/TransientSlotMock.sol +61 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/UpgradeableBeaconMock.sol +27 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/VotesExtendedMock.sol +44 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/VotesMock.sol +44 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/account/AccountMock.sol +181 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/account/modules/ERC7579Mock.sol +141 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/account/utils/ERC7579UtilsMock.sol +23 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/compound/CompTimelock.sol +174 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/crosschain/ERC7786GatewayMock.sol +56 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/crosschain/ERC7786RecipientMock.sol +31 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/docs/AccessManagerEnumerable.sol +161 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/docs/ERC20WithAutoMinerReward.sol +22 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/docs/ERC4626Fees.sol +109 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/docs/MyNFT.sol +9 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/docs/access-control/AccessControlERC20MintBase.sol +25 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/docs/access-control/AccessControlERC20MintMissing.sol +24 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/docs/access-control/AccessControlERC20MintOnlyRole.sol +23 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/docs/access-control/AccessControlModified.sol +14 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/docs/access-control/AccessManagedERC20MintBase.sol +16 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/docs/access-control/MyContractOwnable.sol +17 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/docs/account/MyAccountEIP7702.sol +20 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/docs/account/MyFactoryAccount.sol +37 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/docs/governance/MyGovernor.sol +80 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/docs/governance/MyToken.sol +21 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/docs/governance/MyTokenTimestampBased.sol +32 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/docs/governance/MyTokenWrapped.sol +28 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/docs/token/ERC1155/GameItems.sol +21 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/docs/token/ERC1155/MyERC115HolderContract.sol +7 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/docs/token/ERC20/GLDToken.sol +11 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/docs/token/ERC6909/ERC6909GameItems.sol +26 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/docs/token/ERC721/GameItem.sol +19 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/docs/utilities/Base64NFT.sol +27 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/docs/utilities/Multicall.sol +15 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/governance/GovernorCountingOverridableMock.sol +18 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/governance/GovernorCrosschain.sol +20 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/governance/GovernorFractionalMock.sol +14 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/governance/GovernorMock.sol +14 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/governance/GovernorNoncesKeyedMock.sol +44 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/governance/GovernorPreventLateQuorumMock.sol +40 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/governance/GovernorProposalGuardianMock.sol +27 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/governance/GovernorSequentialProposalIdMock.sol +39 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/governance/GovernorStorageMock.sol +79 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/governance/GovernorSuperQuorumMock.sol +95 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/governance/GovernorTimelockAccessMock.sol +70 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/governance/GovernorTimelockCompoundMock.sol +69 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/governance/GovernorTimelockControlMock.sol +69 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/governance/GovernorVoteMock.sol +20 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/governance/GovernorVotesSuperQuorumFractionMock.sol +37 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/governance/GovernorWithParamsMock.sol +51 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/proxy/BadBeacon.sol +11 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/proxy/ClashingImplementation.sol +19 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/proxy/ERC1967ProxyUnsafe.sol +13 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/proxy/UUPSUpgradeableMock.sol +35 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC1155ReceiverMock.sol +74 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC1363ForceApproveMock.sol +13 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC1363NoReturnMock.sol +33 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC1363ReceiverMock.sol +52 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC1363ReturnFalseMock.sol +34 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC1363SpenderMock.sol +47 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC20ApprovalMock.sol +10 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC20BridgeableMock.sol +30 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC20DecimalsMock.sol +17 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC20ExcessDecimalsMock.sol +9 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC20FlashMintMock.sol +26 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC20ForceApproveMock.sol +13 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC20GetterHelper.sol +38 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC20Mock.sol +16 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC20MulticallMock.sol +8 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC20NoReturnMock.sol +30 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC20Reentrant.sol +39 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC20ReturnFalseMock.sol +19 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC20VotesAdditionalCheckpointsMock.sol +33 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC20VotesLegacyMock.sol +253 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC20VotesTimestampMock.sol +31 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC4626LimitsMock.sol +23 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC4626Mock.sol +17 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC4626OffsetMock.sol +17 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC4646FeesMock.sol +40 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC721ConsecutiveEnumerableMock.sol +42 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC721ConsecutiveMock.sol +61 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC721ReceiverMock.sol +47 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/token/ERC721URIStorageMock.sol +17 -0
- package/lib/openzeppelin-contracts-master/contracts/mocks/utils/cryptography/ERC7739Mock.sol +12 -0
- package/lib/openzeppelin-contracts-master/contracts/package.json +32 -0
- package/lib/openzeppelin-contracts-master/contracts/proxy/Clones.sol +294 -0
- package/lib/openzeppelin-contracts-master/contracts/proxy/ERC1967/ERC1967Proxy.sol +62 -0
- package/lib/openzeppelin-contracts-master/contracts/proxy/ERC1967/ERC1967Utils.sol +177 -0
- package/lib/openzeppelin-contracts-master/contracts/proxy/Proxy.sol +69 -0
- package/lib/openzeppelin-contracts-master/contracts/proxy/README.adoc +87 -0
- package/lib/openzeppelin-contracts-master/contracts/proxy/beacon/BeaconProxy.sol +57 -0
- package/lib/openzeppelin-contracts-master/contracts/proxy/beacon/IBeacon.sol +16 -0
- package/lib/openzeppelin-contracts-master/contracts/proxy/beacon/UpgradeableBeacon.sol +70 -0
- package/lib/openzeppelin-contracts-master/contracts/proxy/transparent/ProxyAdmin.sol +45 -0
- package/lib/openzeppelin-contracts-master/contracts/proxy/transparent/TransparentUpgradeableProxy.sol +118 -0
- package/lib/openzeppelin-contracts-master/contracts/proxy/utils/Initializable.sol +238 -0
- package/lib/openzeppelin-contracts-master/contracts/proxy/utils/UUPSUpgradeable.sol +148 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC1155/ERC1155.sol +417 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC1155/IERC1155.sol +123 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC1155/IERC1155Receiver.sol +59 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC1155/README.adoc +46 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC1155/extensions/ERC1155Burnable.sol +22 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC1155/extensions/ERC1155Crosschain.sol +53 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC1155/extensions/ERC1155Pausable.sol +38 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC1155/extensions/ERC1155Supply.sol +88 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC1155/extensions/ERC1155URIStorage.sol +58 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol +20 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC1155/utils/ERC1155Holder.sol +42 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC1155/utils/ERC1155Utils.sol +88 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC20/ERC20.sol +305 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC20/IERC20.sol +79 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC20/README.adoc +81 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC20/extensions/ERC1363.sol +135 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC20/extensions/ERC20Burnable.sol +39 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC20/extensions/ERC20Capped.sol +54 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC20/extensions/ERC20Crosschain.sol +39 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC20/extensions/ERC20FlashMint.sol +130 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC20/extensions/ERC20Pausable.sol +33 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC20/extensions/ERC20Permit.sol +77 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC20/extensions/ERC20Votes.sol +83 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC20/extensions/ERC20Wrapper.sol +93 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC20/extensions/ERC4626.sol +298 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC20/extensions/IERC20Metadata.sol +26 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC20/extensions/IERC20Permit.sol +90 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC20/extensions/draft-ERC20Bridgeable.sol +51 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC20/extensions/draft-ERC20TemporaryApproval.sol +119 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC20/utils/ERC1363Utils.sol +95 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC20/utils/SafeERC20.sol +292 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC6909/ERC6909.sol +224 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC6909/README.adoc +27 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC6909/extensions/ERC6909ContentURI.sol +59 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC6909/extensions/ERC6909Metadata.sol +83 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC6909/extensions/ERC6909TokenSupply.sol +41 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC721/ERC721.sol +433 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC721/IERC721.sol +135 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC721/IERC721Receiver.sol +28 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC721/README.adoc +72 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC721/extensions/ERC721Burnable.sol +26 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC721/extensions/ERC721Consecutive.sol +176 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC721/extensions/ERC721Crosschain.sol +37 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC721/extensions/ERC721Enumerable.sol +165 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC721/extensions/ERC721Pausable.sol +37 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC721/extensions/ERC721Royalty.sol +26 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC721/extensions/ERC721URIStorage.sol +62 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC721/extensions/ERC721Votes.sol +47 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC721/extensions/ERC721Wrapper.sol +102 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC721/extensions/IERC721Enumerable.sol +29 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC721/extensions/IERC721Metadata.sol +27 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC721/utils/ERC721Holder.sol +26 -0
- package/lib/openzeppelin-contracts-master/contracts/token/ERC721/utils/ERC721Utils.sol +50 -0
- package/lib/openzeppelin-contracts-master/contracts/token/common/ERC2981.sol +139 -0
- package/lib/openzeppelin-contracts-master/contracts/token/common/README.adoc +10 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/Address.sol +167 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/Arrays.sol +888 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/Base58.sol +240 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/Base64.sol +234 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/Blockhash.sol +54 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/Bytes.sol +329 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/CAIP10.sol +54 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/CAIP2.sol +51 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/Calldata.sol +25 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/Comparators.sol +19 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/Context.sol +28 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/Create2.sol +91 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/Create3.sol +134 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/ERC6372Utils.sol +52 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/Errors.sol +34 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/LowLevelCall.sol +127 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/Memory.sol +149 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/Multicall.sol +37 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/Nonces.sol +46 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/NoncesKeyed.sol +74 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/Packing.sol +1656 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/Panic.sol +57 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/Pausable.sol +112 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/README.adoc +169 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/RLP.sol +487 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/ReentrancyGuard.sol +119 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/ReentrancyGuardTransient.sol +84 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/RelayedCall.sol +145 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/ShortStrings.sol +122 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/SimulateCall.sol +113 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/SlotDerivation.sol +155 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/StorageSlot.sol +143 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/Strings.sol +532 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/TransientSlot.sol +183 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/ECDSA.sol +284 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/EIP712.sol +160 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/Hashes.sol +31 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/MerkleProof.sol +510 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/MessageHashUtils.sol +228 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/P256.sol +408 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/README.adoc +76 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/RSA.sol +154 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/SignatureChecker.sol +191 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/TrieProof.sol +256 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/WebAuthn.sol +269 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/draft-ERC7739Utils.sol +207 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/signers/AbstractSigner.sol +23 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/signers/MultiSignerERC7913.sol +259 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/signers/MultiSignerERC7913Weighted.sol +208 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/signers/SignerECDSA.sol +56 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/signers/SignerEIP7702.sol +25 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/signers/SignerERC7913.sol +63 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/signers/SignerP256.sol +64 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/signers/SignerRSA.sol +65 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/signers/SignerWebAuthn.sol +46 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/signers/draft-ERC7739.sol +98 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/verifiers/ERC7913P256Verifier.sol +29 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/verifiers/ERC7913RSAVerifier.sol +23 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/cryptography/verifiers/ERC7913WebAuthnVerifier.sol +35 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/draft-InteroperableAddress.sol +245 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/introspection/ERC165.sol +25 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/introspection/ERC165Checker.sol +142 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/introspection/IERC165.sol +25 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/math/Math.sol +763 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/math/SafeCast.sol +1162 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/math/SignedMath.sol +68 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/structs/Accumulators.sol +135 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/structs/BitMaps.sol +60 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/structs/Checkpoints.sol +833 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/structs/CircularBuffer.sol +152 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/structs/DoubleEndedQueue.sol +238 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/structs/EnumerableMap.sol +1443 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/structs/EnumerableSet.sol +895 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/structs/Heap.sol +259 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/structs/MerkleTree.sol +267 -0
- package/lib/openzeppelin-contracts-master/contracts/utils/types/Time.sol +133 -0
- package/lib/openzeppelin-contracts-master/contracts/vendor/compound/ICompoundTimelock.sol +86 -0
- package/lib/openzeppelin-contracts-master/contracts/vendor/compound/LICENSE +11 -0
- package/lib/openzeppelin-contracts-master/docs/README.md +16 -0
- package/lib/openzeppelin-contracts-master/docs/antora.yml +7 -0
- package/lib/openzeppelin-contracts-master/docs/config.js +21 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/images/access-control-multiple.svg +97 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/images/access-manager-functions.svg +47 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/images/access-manager.svg +99 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/images/erc4626-attack-3a.png +0 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/images/erc4626-attack-3b.png +0 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/images/erc4626-attack-6.png +0 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/images/erc4626-attack.png +0 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/images/erc4626-deposit.png +0 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/images/erc4626-mint.png +0 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/images/erc4626-rate-linear.png +0 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/images/erc4626-rate-loglog.png +0 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/images/erc4626-rate-loglogext.png +0 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/images/tally-exec.png +0 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/images/tally-vote.png +0 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/nav.adoc +29 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/pages/access-control.adoc +339 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/pages/account-abstraction.adoc +100 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/pages/accounts.adoc +354 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/pages/backwards-compatibility.adoc +50 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/pages/eoa-delegation.adoc +143 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/pages/erc1155.adoc +118 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/pages/erc20-supply.adoc +71 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/pages/erc20.adoc +67 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/pages/erc4626.adoc +208 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/pages/erc6909.adoc +47 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/pages/erc721.adoc +58 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/pages/extending-contracts.adoc +67 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/pages/faq.adoc +13 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/pages/governance.adoc +242 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/pages/index.adoc +100 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/pages/multisig.adoc +308 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/pages/tokens.adoc +31 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/pages/upgradeable.adoc +75 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/pages/utilities.adoc +634 -0
- package/lib/openzeppelin-contracts-master/docs/modules/ROOT/pages/wizard.adoc +15 -0
- package/lib/openzeppelin-contracts-master/docs/templates/contract.hbs +141 -0
- package/lib/openzeppelin-contracts-master/docs/templates/helpers.js +46 -0
- package/lib/openzeppelin-contracts-master/docs/templates/page.hbs +4 -0
- package/lib/openzeppelin-contracts-master/docs/templates/properties.js +88 -0
- package/lib/openzeppelin-contracts-master/eslint.config.mjs +29 -0
- package/lib/openzeppelin-contracts-master/foundry.toml +20 -0
- package/lib/openzeppelin-contracts-master/fv/Makefile +54 -0
- package/lib/openzeppelin-contracts-master/fv/README.md +60 -0
- package/lib/openzeppelin-contracts-master/fv/diff/access_manager_AccessManager.sol.patch +97 -0
- package/lib/openzeppelin-contracts-master/fv/diff/account_extensions_draft-AccountERC7579.sol.patch +25 -0
- package/lib/openzeppelin-contracts-master/fv/diff/token_ERC721_ERC721.sol.patch +11 -0
- package/lib/openzeppelin-contracts-master/fv/harnesses/AccessControlDefaultAdminRulesHarness.sol +46 -0
- package/lib/openzeppelin-contracts-master/fv/harnesses/AccessControlHarness.sol +6 -0
- package/lib/openzeppelin-contracts-master/fv/harnesses/AccessManagedHarness.sol +36 -0
- package/lib/openzeppelin-contracts-master/fv/harnesses/AccessManagerHarness.sol +116 -0
- package/lib/openzeppelin-contracts-master/fv/harnesses/AccountHarness.sol +60 -0
- package/lib/openzeppelin-contracts-master/fv/harnesses/DoubleEndedQueueHarness.sol +58 -0
- package/lib/openzeppelin-contracts-master/fv/harnesses/ERC20FlashMintHarness.sol +36 -0
- package/lib/openzeppelin-contracts-master/fv/harnesses/ERC20PermitHarness.sol +16 -0
- package/lib/openzeppelin-contracts-master/fv/harnesses/ERC20WrapperHarness.sol +22 -0
- package/lib/openzeppelin-contracts-master/fv/harnesses/ERC3156FlashBorrowerHarness.sol +13 -0
- package/lib/openzeppelin-contracts-master/fv/harnesses/ERC721Harness.sol +37 -0
- package/lib/openzeppelin-contracts-master/fv/harnesses/ERC721ReceiverHarness.sol +11 -0
- package/lib/openzeppelin-contracts-master/fv/harnesses/EnumerableMapHarness.sol +55 -0
- package/lib/openzeppelin-contracts-master/fv/harnesses/EnumerableSetHarness.sol +35 -0
- package/lib/openzeppelin-contracts-master/fv/harnesses/InitializableHarness.sol +23 -0
- package/lib/openzeppelin-contracts-master/fv/harnesses/NoncesHarness.sol +14 -0
- package/lib/openzeppelin-contracts-master/fv/harnesses/Ownable2StepHarness.sol +10 -0
- package/lib/openzeppelin-contracts-master/fv/harnesses/OwnableHarness.sol +10 -0
- package/lib/openzeppelin-contracts-master/fv/harnesses/PausableHarness.sol +18 -0
- package/lib/openzeppelin-contracts-master/fv/harnesses/TimelockControllerHarness.sol +13 -0
- package/lib/openzeppelin-contracts-master/fv/reports/2021-10.pdf +0 -0
- package/lib/openzeppelin-contracts-master/fv/reports/2022-03.pdf +0 -0
- package/lib/openzeppelin-contracts-master/fv/reports/2022-05.pdf +0 -0
- package/lib/openzeppelin-contracts-master/fv/run.js +68 -0
- package/lib/openzeppelin-contracts-master/fv/specs/AccessControl.conf +8 -0
- package/lib/openzeppelin-contracts-master/fv/specs/AccessControl.spec +119 -0
- package/lib/openzeppelin-contracts-master/fv/specs/AccessControlDefaultAdminRules.conf +8 -0
- package/lib/openzeppelin-contracts-master/fv/specs/AccessControlDefaultAdminRules.spec +467 -0
- package/lib/openzeppelin-contracts-master/fv/specs/AccessManaged.conf +14 -0
- package/lib/openzeppelin-contracts-master/fv/specs/AccessManaged.spec +49 -0
- package/lib/openzeppelin-contracts-master/fv/specs/AccessManager.conf +10 -0
- package/lib/openzeppelin-contracts-master/fv/specs/AccessManager.spec +837 -0
- package/lib/openzeppelin-contracts-master/fv/specs/Account.conf +9 -0
- package/lib/openzeppelin-contracts-master/fv/specs/Account.spec +490 -0
- package/lib/openzeppelin-contracts-master/fv/specs/DoubleEndedQueue.conf +8 -0
- package/lib/openzeppelin-contracts-master/fv/specs/DoubleEndedQueue.spec +300 -0
- package/lib/openzeppelin-contracts-master/fv/specs/ERC20.conf +9 -0
- package/lib/openzeppelin-contracts-master/fv/specs/ERC20.spec +352 -0
- package/lib/openzeppelin-contracts-master/fv/specs/ERC20FlashMint.conf +10 -0
- package/lib/openzeppelin-contracts-master/fv/specs/ERC20FlashMint.spec +55 -0
- package/lib/openzeppelin-contracts-master/fv/specs/ERC20Wrapper.conf +13 -0
- package/lib/openzeppelin-contracts-master/fv/specs/ERC20Wrapper.spec +226 -0
- package/lib/openzeppelin-contracts-master/fv/specs/ERC721.conf +10 -0
- package/lib/openzeppelin-contracts-master/fv/specs/ERC721.spec +695 -0
- package/lib/openzeppelin-contracts-master/fv/specs/EnumerableMap.conf +8 -0
- package/lib/openzeppelin-contracts-master/fv/specs/EnumerableMap.spec +364 -0
- package/lib/openzeppelin-contracts-master/fv/specs/EnumerableSet.conf +8 -0
- package/lib/openzeppelin-contracts-master/fv/specs/EnumerableSet.spec +272 -0
- package/lib/openzeppelin-contracts-master/fv/specs/Initializable.conf +8 -0
- package/lib/openzeppelin-contracts-master/fv/specs/Initializable.spec +176 -0
- package/lib/openzeppelin-contracts-master/fv/specs/Nonces.conf +8 -0
- package/lib/openzeppelin-contracts-master/fv/specs/Nonces.spec +92 -0
- package/lib/openzeppelin-contracts-master/fv/specs/Ownable.conf +8 -0
- package/lib/openzeppelin-contracts-master/fv/specs/Ownable.spec +77 -0
- package/lib/openzeppelin-contracts-master/fv/specs/Ownable2Step.conf +8 -0
- package/lib/openzeppelin-contracts-master/fv/specs/Ownable2Step.spec +108 -0
- package/lib/openzeppelin-contracts-master/fv/specs/Pausable.conf +8 -0
- package/lib/openzeppelin-contracts-master/fv/specs/Pausable.spec +96 -0
- package/lib/openzeppelin-contracts-master/fv/specs/TimelockController.conf +10 -0
- package/lib/openzeppelin-contracts-master/fv/specs/TimelockController.spec +299 -0
- package/lib/openzeppelin-contracts-master/fv/specs/helpers/helpers.spec +13 -0
- package/lib/openzeppelin-contracts-master/fv/specs/methods/IAccessControl.spec +8 -0
- package/lib/openzeppelin-contracts-master/fv/specs/methods/IAccessControlDefaultAdminRules.spec +36 -0
- package/lib/openzeppelin-contracts-master/fv/specs/methods/IAccessManaged.spec +5 -0
- package/lib/openzeppelin-contracts-master/fv/specs/methods/IAccessManager.spec +33 -0
- package/lib/openzeppelin-contracts-master/fv/specs/methods/IAccount.spec +34 -0
- package/lib/openzeppelin-contracts-master/fv/specs/methods/IERC20.spec +11 -0
- package/lib/openzeppelin-contracts-master/fv/specs/methods/IERC2612.spec +5 -0
- package/lib/openzeppelin-contracts-master/fv/specs/methods/IERC3156FlashBorrower.spec +3 -0
- package/lib/openzeppelin-contracts-master/fv/specs/methods/IERC3156FlashLender.spec +5 -0
- package/lib/openzeppelin-contracts-master/fv/specs/methods/IERC5313.spec +3 -0
- package/lib/openzeppelin-contracts-master/fv/specs/methods/IERC721.spec +17 -0
- package/lib/openzeppelin-contracts-master/fv/specs/methods/IERC721Receiver.spec +3 -0
- package/lib/openzeppelin-contracts-master/fv/specs/methods/IOwnable.spec +5 -0
- package/lib/openzeppelin-contracts-master/fv/specs/methods/IOwnable2Step.spec +7 -0
- package/lib/openzeppelin-contracts-master/fv-requirements.txt +4 -0
- package/lib/openzeppelin-contracts-master/hardhat/async-test-sanity.js +10 -0
- package/lib/openzeppelin-contracts-master/hardhat/env-artifacts.js +29 -0
- package/lib/openzeppelin-contracts-master/hardhat/ignore-unreachable-warnings.js +45 -0
- package/lib/openzeppelin-contracts-master/hardhat/remappings.js +18 -0
- package/lib/openzeppelin-contracts-master/hardhat/skip-foundry-tests.js +6 -0
- package/lib/openzeppelin-contracts-master/hardhat/task-test-get-files.js +25 -0
- package/lib/openzeppelin-contracts-master/hardhat.config.js +124 -0
- package/lib/openzeppelin-contracts-master/logo.svg +15 -0
- package/lib/openzeppelin-contracts-master/netlify.toml +3 -0
- package/lib/openzeppelin-contracts-master/package-lock.json +11197 -0
- package/lib/openzeppelin-contracts-master/package.json +109 -0
- package/lib/openzeppelin-contracts-master/remappings.txt +1 -0
- package/lib/openzeppelin-contracts-master/renovate.json +4 -0
- package/lib/openzeppelin-contracts-master/scripts/checks/compare-layout.js +28 -0
- package/lib/openzeppelin-contracts-master/scripts/checks/compareGasReports.js +249 -0
- package/lib/openzeppelin-contracts-master/scripts/checks/coverage.sh +24 -0
- package/lib/openzeppelin-contracts-master/scripts/checks/extract-layout.js +39 -0
- package/lib/openzeppelin-contracts-master/scripts/checks/generation.sh +6 -0
- package/lib/openzeppelin-contracts-master/scripts/checks/inheritance-ordering.js +56 -0
- package/lib/openzeppelin-contracts-master/scripts/checks/pragma-validity.js +45 -0
- package/lib/openzeppelin-contracts-master/scripts/fetch-common-contracts.js +50 -0
- package/lib/openzeppelin-contracts-master/scripts/gen-nav.js +81 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/format-lines.js +16 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/helpers/sanitize.js +5 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/run.js +61 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/templates/Arrays.js +505 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/templates/Arrays.opts.js +9 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/templates/Checkpoints.js +242 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/templates/Checkpoints.opts.js +18 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/templates/Checkpoints.t.js +141 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/templates/Enumerable.opts.js +56 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/templates/EnumerableMap.js +464 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/templates/EnumerableSet.js +470 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/templates/MerkleProof.js +186 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/templates/MerkleProof.opts.js +11 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/templates/Packing.js +92 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/templates/Packing.opts.js +3 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/templates/Packing.t.js +48 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/templates/SafeCast.js +136 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/templates/Slot.opts.js +15 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/templates/SlotDerivation.js +119 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/templates/SlotDerivation.t.js +127 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/templates/StorageSlot.js +77 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/templates/StorageSlotMock.js +57 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/templates/TransientSlot.js +80 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/templates/TransientSlotMock.js +35 -0
- package/lib/openzeppelin-contracts-master/scripts/generate/templates/conversion.js +34 -0
- package/lib/openzeppelin-contracts-master/scripts/get-contracts-metadata.js +55 -0
- package/lib/openzeppelin-contracts-master/scripts/git-user-config.sh +6 -0
- package/lib/openzeppelin-contracts-master/scripts/helpers.js +7 -0
- package/lib/openzeppelin-contracts-master/scripts/minimize-pragma.js +140 -0
- package/lib/openzeppelin-contracts-master/scripts/prepack.sh +23 -0
- package/lib/openzeppelin-contracts-master/scripts/prepare-docs.sh +26 -0
- package/lib/openzeppelin-contracts-master/scripts/release/format-changelog.js +33 -0
- package/lib/openzeppelin-contracts-master/scripts/release/synchronize-versions.js +15 -0
- package/lib/openzeppelin-contracts-master/scripts/release/update-comment.js +34 -0
- package/lib/openzeppelin-contracts-master/scripts/release/version.sh +11 -0
- package/lib/openzeppelin-contracts-master/scripts/release/workflow/check-upgradeable.sh +27 -0
- package/lib/openzeppelin-contracts-master/scripts/release/workflow/exit-prerelease.sh +8 -0
- package/lib/openzeppelin-contracts-master/scripts/release/workflow/github-release.js +48 -0
- package/lib/openzeppelin-contracts-master/scripts/release/workflow/integrity-check.sh +20 -0
- package/lib/openzeppelin-contracts-master/scripts/release/workflow/pack.sh +26 -0
- package/lib/openzeppelin-contracts-master/scripts/release/workflow/publish.sh +26 -0
- package/lib/openzeppelin-contracts-master/scripts/release/workflow/rerun.js +7 -0
- package/lib/openzeppelin-contracts-master/scripts/release/workflow/set-changesets-pr-title.js +17 -0
- package/lib/openzeppelin-contracts-master/scripts/release/workflow/start.sh +35 -0
- package/lib/openzeppelin-contracts-master/scripts/release/workflow/state.js +112 -0
- package/lib/openzeppelin-contracts-master/scripts/remove-ignored-artifacts.js +45 -0
- package/lib/openzeppelin-contracts-master/scripts/set-max-old-space-size.sh +10 -0
- package/lib/openzeppelin-contracts-master/scripts/solc-versions.js +15 -0
- package/lib/openzeppelin-contracts-master/scripts/solhint-custom/index.js +118 -0
- package/lib/openzeppelin-contracts-master/scripts/solhint-custom/package.json +8 -0
- package/lib/openzeppelin-contracts-master/scripts/update-docs-branch.js +65 -0
- package/lib/openzeppelin-contracts-master/scripts/upgradeable/README.md +21 -0
- package/lib/openzeppelin-contracts-master/scripts/upgradeable/alias/Initializable.sol +5 -0
- package/lib/openzeppelin-contracts-master/scripts/upgradeable/alias/UUPSUpgradeable.sol +5 -0
- package/lib/openzeppelin-contracts-master/scripts/upgradeable/patch-apply.sh +19 -0
- package/lib/openzeppelin-contracts-master/scripts/upgradeable/patch-save.sh +18 -0
- package/lib/openzeppelin-contracts-master/scripts/upgradeable/transpile-onto.sh +54 -0
- package/lib/openzeppelin-contracts-master/scripts/upgradeable/transpile.sh +50 -0
- package/lib/openzeppelin-contracts-master/scripts/upgradeable/upgradeable.patch +390 -0
- package/lib/openzeppelin-contracts-master/slither.config.json +4 -0
- package/lib/openzeppelin-contracts-master/solhint.config.js +29 -0
- package/lib/openzeppelin-contracts-master/test/TESTING.md +3 -0
- package/lib/openzeppelin-contracts-master/test/access/AccessControl.behavior.js +874 -0
- package/lib/openzeppelin-contracts-master/test/access/AccessControl.test.js +19 -0
- package/lib/openzeppelin-contracts-master/test/access/Ownable.test.js +79 -0
- package/lib/openzeppelin-contracts-master/test/access/Ownable2Step.test.js +102 -0
- package/lib/openzeppelin-contracts-master/test/access/extensions/AccessControlDefaultAdminRules.test.js +32 -0
- package/lib/openzeppelin-contracts-master/test/access/extensions/AccessControlEnumerable.test.js +24 -0
- package/lib/openzeppelin-contracts-master/test/access/manager/AccessManaged.test.js +146 -0
- package/lib/openzeppelin-contracts-master/test/access/manager/AccessManager.behavior.js +252 -0
- package/lib/openzeppelin-contracts-master/test/access/manager/AccessManager.predicate.js +456 -0
- package/lib/openzeppelin-contracts-master/test/access/manager/AccessManager.test.js +2536 -0
- package/lib/openzeppelin-contracts-master/test/access/manager/AuthorityUtils.test.js +112 -0
- package/lib/openzeppelin-contracts-master/test/account/Account.behavior.js +144 -0
- package/lib/openzeppelin-contracts-master/test/account/Account.test.js +48 -0
- package/lib/openzeppelin-contracts-master/test/account/AccountECDSA.test.js +52 -0
- package/lib/openzeppelin-contracts-master/test/account/AccountEIP7702.t.sol +116 -0
- package/lib/openzeppelin-contracts-master/test/account/AccountEIP7702.test.js +52 -0
- package/lib/openzeppelin-contracts-master/test/account/AccountERC7913.test.js +138 -0
- package/lib/openzeppelin-contracts-master/test/account/AccountMultiSigner.test.js +326 -0
- package/lib/openzeppelin-contracts-master/test/account/AccountMultiSignerWeighted.test.js +312 -0
- package/lib/openzeppelin-contracts-master/test/account/AccountP256.test.js +58 -0
- package/lib/openzeppelin-contracts-master/test/account/AccountRSA.test.js +58 -0
- package/lib/openzeppelin-contracts-master/test/account/AccountWebAuthn.test.js +75 -0
- package/lib/openzeppelin-contracts-master/test/account/examples/AccountEIP7702WithModulesMock.test.js +99 -0
- package/lib/openzeppelin-contracts-master/test/account/extensions/AccountERC7579.behavior.js +724 -0
- package/lib/openzeppelin-contracts-master/test/account/extensions/AccountERC7579.test.js +60 -0
- package/lib/openzeppelin-contracts-master/test/account/extensions/AccountERC7579Hooked.test.js +60 -0
- package/lib/openzeppelin-contracts-master/test/account/extensions/ERC7821.behavior.js +145 -0
- package/lib/openzeppelin-contracts-master/test/account/utils/EIP7702Utils.test.js +53 -0
- package/lib/openzeppelin-contracts-master/test/account/utils/draft-ERC4337Utils.test.js +594 -0
- package/lib/openzeppelin-contracts-master/test/account/utils/draft-ERC7579Utils.t.sol +434 -0
- package/lib/openzeppelin-contracts-master/test/account/utils/draft-ERC7579Utils.test.js +399 -0
- package/lib/openzeppelin-contracts-master/test/crosschain/BridgeERC1155.behavior.js +333 -0
- package/lib/openzeppelin-contracts-master/test/crosschain/BridgeERC1155.test.js +70 -0
- package/lib/openzeppelin-contracts-master/test/crosschain/BridgeERC20.behavior.js +146 -0
- package/lib/openzeppelin-contracts-master/test/crosschain/BridgeERC20.test.js +46 -0
- package/lib/openzeppelin-contracts-master/test/crosschain/BridgeERC721.behavior.js +218 -0
- package/lib/openzeppelin-contracts-master/test/crosschain/BridgeERC721.test.js +48 -0
- package/lib/openzeppelin-contracts-master/test/crosschain/CrosschainExecutor.test.js +144 -0
- package/lib/openzeppelin-contracts-master/test/crosschain/ERC7786Recipient.test.js +55 -0
- package/lib/openzeppelin-contracts-master/test/finance/VestingWallet.behavior.js +87 -0
- package/lib/openzeppelin-contracts-master/test/finance/VestingWallet.test.js +65 -0
- package/lib/openzeppelin-contracts-master/test/finance/VestingWalletCliff.test.js +70 -0
- package/lib/openzeppelin-contracts-master/test/governance/Governor.t.sol +59 -0
- package/lib/openzeppelin-contracts-master/test/governance/Governor.test.js +980 -0
- package/lib/openzeppelin-contracts-master/test/governance/TimelockController.test.js +1279 -0
- package/lib/openzeppelin-contracts-master/test/governance/extensions/GovernorCountingFractional.test.js +248 -0
- package/lib/openzeppelin-contracts-master/test/governance/extensions/GovernorCountingOverridable.test.js +346 -0
- package/lib/openzeppelin-contracts-master/test/governance/extensions/GovernorCrosschain.test.js +158 -0
- package/lib/openzeppelin-contracts-master/test/governance/extensions/GovernorERC721.test.js +131 -0
- package/lib/openzeppelin-contracts-master/test/governance/extensions/GovernorNoncesKeyed.test.js +243 -0
- package/lib/openzeppelin-contracts-master/test/governance/extensions/GovernorPreventLateQuorum.test.js +185 -0
- package/lib/openzeppelin-contracts-master/test/governance/extensions/GovernorProposalGuardian.test.js +132 -0
- package/lib/openzeppelin-contracts-master/test/governance/extensions/GovernorSequentialProposalId.test.js +202 -0
- package/lib/openzeppelin-contracts-master/test/governance/extensions/GovernorStorage.test.js +175 -0
- package/lib/openzeppelin-contracts-master/test/governance/extensions/GovernorSuperQuorum.test.js +168 -0
- package/lib/openzeppelin-contracts-master/test/governance/extensions/GovernorSuperQuorumGreaterThanQuorum.t.sol +79 -0
- package/lib/openzeppelin-contracts-master/test/governance/extensions/GovernorTimelockAccess.test.js +906 -0
- package/lib/openzeppelin-contracts-master/test/governance/extensions/GovernorTimelockCompound.test.js +450 -0
- package/lib/openzeppelin-contracts-master/test/governance/extensions/GovernorTimelockControl.test.js +506 -0
- package/lib/openzeppelin-contracts-master/test/governance/extensions/GovernorVotesQuorumFraction.test.js +165 -0
- package/lib/openzeppelin-contracts-master/test/governance/extensions/GovernorVotesSuperQuorumFraction.test.js +160 -0
- package/lib/openzeppelin-contracts-master/test/governance/extensions/GovernorWithParams.test.js +245 -0
- package/lib/openzeppelin-contracts-master/test/governance/utils/ERC6372.behavior.js +29 -0
- package/lib/openzeppelin-contracts-master/test/governance/utils/Votes.behavior.js +325 -0
- package/lib/openzeppelin-contracts-master/test/governance/utils/Votes.test.js +102 -0
- package/lib/openzeppelin-contracts-master/test/governance/utils/VotesExtended.test.js +152 -0
- package/lib/openzeppelin-contracts-master/test/helpers/access-manager.js +85 -0
- package/lib/openzeppelin-contracts-master/test/helpers/account.js +16 -0
- package/lib/openzeppelin-contracts-master/test/helpers/chains.js +56 -0
- package/lib/openzeppelin-contracts-master/test/helpers/constants.js +7 -0
- package/lib/openzeppelin-contracts-master/test/helpers/deploy.js +14 -0
- package/lib/openzeppelin-contracts-master/test/helpers/eip712-types.js +61 -0
- package/lib/openzeppelin-contracts-master/test/helpers/eip712.js +45 -0
- package/lib/openzeppelin-contracts-master/test/helpers/enums.js +15 -0
- package/lib/openzeppelin-contracts-master/test/helpers/erc4337.js +244 -0
- package/lib/openzeppelin-contracts-master/test/helpers/erc7579.js +58 -0
- package/lib/openzeppelin-contracts-master/test/helpers/erc7739.js +118 -0
- package/lib/openzeppelin-contracts-master/test/helpers/governance.js +218 -0
- package/lib/openzeppelin-contracts-master/test/helpers/iterate.js +41 -0
- package/lib/openzeppelin-contracts-master/test/helpers/math.js +33 -0
- package/lib/openzeppelin-contracts-master/test/helpers/methods.js +14 -0
- package/lib/openzeppelin-contracts-master/test/helpers/precompiles.js +12 -0
- package/lib/openzeppelin-contracts-master/test/helpers/random.js +26 -0
- package/lib/openzeppelin-contracts-master/test/helpers/signers.js +225 -0
- package/lib/openzeppelin-contracts-master/test/helpers/storage.js +48 -0
- package/lib/openzeppelin-contracts-master/test/helpers/strings.js +5 -0
- package/lib/openzeppelin-contracts-master/test/helpers/time.js +33 -0
- package/lib/openzeppelin-contracts-master/test/helpers/trie.js +79 -0
- package/lib/openzeppelin-contracts-master/test/helpers/txpool.js +28 -0
- package/lib/openzeppelin-contracts-master/test/metatx/ERC2771Context.test.js +109 -0
- package/lib/openzeppelin-contracts-master/test/metatx/ERC2771Forwarder.t.sol +279 -0
- package/lib/openzeppelin-contracts-master/test/metatx/ERC2771Forwarder.test.js +398 -0
- package/lib/openzeppelin-contracts-master/test/proxy/Clones.behaviour.js +160 -0
- package/lib/openzeppelin-contracts-master/test/proxy/Clones.t.sol +91 -0
- package/lib/openzeppelin-contracts-master/test/proxy/Clones.test.js +177 -0
- package/lib/openzeppelin-contracts-master/test/proxy/ERC1967/ERC1967Proxy.test.js +36 -0
- package/lib/openzeppelin-contracts-master/test/proxy/ERC1967/ERC1967Utils.test.js +162 -0
- package/lib/openzeppelin-contracts-master/test/proxy/Proxy.behaviour.js +198 -0
- package/lib/openzeppelin-contracts-master/test/proxy/beacon/BeaconProxy.test.js +141 -0
- package/lib/openzeppelin-contracts-master/test/proxy/beacon/UpgradeableBeacon.test.js +55 -0
- package/lib/openzeppelin-contracts-master/test/proxy/transparent/ProxyAdmin.test.js +82 -0
- package/lib/openzeppelin-contracts-master/test/proxy/transparent/TransparentUpgradeableProxy.behaviour.js +367 -0
- package/lib/openzeppelin-contracts-master/test/proxy/transparent/TransparentUpgradeableProxy.test.js +28 -0
- package/lib/openzeppelin-contracts-master/test/proxy/utils/Initializable.test.js +216 -0
- package/lib/openzeppelin-contracts-master/test/proxy/utils/UUPSUpgradeable.test.js +120 -0
- package/lib/openzeppelin-contracts-master/test/sanity.test.js +27 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC1155/ERC1155.behavior.js +865 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC1155/ERC1155.test.js +258 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC1155/extensions/ERC1155Burnable.test.js +66 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC1155/extensions/ERC1155Crosschain.test.js +43 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC1155/extensions/ERC1155Pausable.test.js +105 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC1155/extensions/ERC1155Supply.test.js +119 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC1155/extensions/ERC1155URIStorage.test.js +70 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC1155/utils/ERC1155Holder.test.js +56 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC1155/utils/ERC1155Utils.test.js +299 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC20/ERC20.behavior.js +269 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC20/ERC20.test.js +199 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC20/extensions/ERC1363.test.js +370 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC20/extensions/ERC20Burnable.test.js +105 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC20/extensions/ERC20Capped.test.js +55 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC20/extensions/ERC20Crosschain.test.js +83 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC20/extensions/ERC20FlashMint.test.js +164 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC20/extensions/ERC20Pausable.test.js +129 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC20/extensions/ERC20Permit.test.js +109 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC20/extensions/ERC20Votes.test.js +546 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC20/extensions/ERC20Wrapper.test.js +203 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC20/extensions/ERC4626.t.sol +41 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC20/extensions/ERC4626.test.js +888 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC20/extensions/draft-ERC20Bridgeable.test.js +89 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC20/extensions/draft-ERC20TemporaryApproval.test.js +142 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC20/utils/SafeERC20.test.js +493 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC6909/ERC6909.behavior.js +216 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC6909/ERC6909.test.js +104 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC6909/extensions/ERC6909ContentURI.test.js +52 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC6909/extensions/ERC6909Metadata.test.js +62 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC6909/extensions/ERC6909TokenSupply.test.js +56 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC721/ERC721.behavior.js +954 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC721/ERC721.test.js +23 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC721/ERC721Enumerable.test.js +28 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC721/extensions/ERC721Burnable.test.js +77 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC721/extensions/ERC721Consecutive.t.sol +187 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC721/extensions/ERC721Consecutive.test.js +228 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC721/extensions/ERC721Crosschain.test.js +44 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC721/extensions/ERC721Pausable.test.js +81 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC721/extensions/ERC721Royalty.test.js +57 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC721/extensions/ERC721URIStorage.test.js +134 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC721/extensions/ERC721Votes.test.js +194 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC721/extensions/ERC721Wrapper.test.js +201 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC721/utils/ERC721Holder.test.js +20 -0
- package/lib/openzeppelin-contracts-master/test/token/ERC721/utils/ERC721Utils.test.js +94 -0
- package/lib/openzeppelin-contracts-master/test/token/common/ERC2981.behavior.js +152 -0
- package/lib/openzeppelin-contracts-master/test/utils/Address.test.js +332 -0
- package/lib/openzeppelin-contracts-master/test/utils/Arrays.t.sol +416 -0
- package/lib/openzeppelin-contracts-master/test/utils/Arrays.test.js +284 -0
- package/lib/openzeppelin-contracts-master/test/utils/Base58.t.sol +24 -0
- package/lib/openzeppelin-contracts-master/test/utils/Base58.test.js +65 -0
- package/lib/openzeppelin-contracts-master/test/utils/Base64.t.sol +36 -0
- package/lib/openzeppelin-contracts-master/test/utils/Base64.test.js +79 -0
- package/lib/openzeppelin-contracts-master/test/utils/Blockhash.t.sol +101 -0
- package/lib/openzeppelin-contracts-master/test/utils/Blockhash.test.js +59 -0
- package/lib/openzeppelin-contracts-master/test/utils/Bytes.t.sol +322 -0
- package/lib/openzeppelin-contracts-master/test/utils/Bytes.test.js +371 -0
- package/lib/openzeppelin-contracts-master/test/utils/CAIP.test.js +56 -0
- package/lib/openzeppelin-contracts-master/test/utils/Calldata.test.js +22 -0
- package/lib/openzeppelin-contracts-master/test/utils/Context.behavior.js +48 -0
- package/lib/openzeppelin-contracts-master/test/utils/Context.test.js +18 -0
- package/lib/openzeppelin-contracts-master/test/utils/Create2.t.sol +17 -0
- package/lib/openzeppelin-contracts-master/test/utils/Create2.test.js +190 -0
- package/lib/openzeppelin-contracts-master/test/utils/Create3.t.sol +25 -0
- package/lib/openzeppelin-contracts-master/test/utils/Create3.test.js +185 -0
- package/lib/openzeppelin-contracts-master/test/utils/ERC6372Utils.test.js +59 -0
- package/lib/openzeppelin-contracts-master/test/utils/LowLevelCall.test.js +257 -0
- package/lib/openzeppelin-contracts-master/test/utils/Memory.t.sol +90 -0
- package/lib/openzeppelin-contracts-master/test/utils/Memory.test.js +94 -0
- package/lib/openzeppelin-contracts-master/test/utils/Multicall.test.js +72 -0
- package/lib/openzeppelin-contracts-master/test/utils/Nonces.behavior.js +189 -0
- package/lib/openzeppelin-contracts-master/test/utils/Nonces.test.js +16 -0
- package/lib/openzeppelin-contracts-master/test/utils/NoncesKeyed.t.sol +51 -0
- package/lib/openzeppelin-contracts-master/test/utils/NoncesKeyed.test.js +17 -0
- package/lib/openzeppelin-contracts-master/test/utils/Packing.t.sol +993 -0
- package/lib/openzeppelin-contracts-master/test/utils/Packing.test.js +70 -0
- package/lib/openzeppelin-contracts-master/test/utils/Panic.test.js +37 -0
- package/lib/openzeppelin-contracts-master/test/utils/Pausable.test.js +90 -0
- package/lib/openzeppelin-contracts-master/test/utils/RLP.t.sol +144 -0
- package/lib/openzeppelin-contracts-master/test/utils/RLP.test.js +224 -0
- package/lib/openzeppelin-contracts-master/test/utils/ReentrancyGuard.test.js +58 -0
- package/lib/openzeppelin-contracts-master/test/utils/RelayedCall.test.js +223 -0
- package/lib/openzeppelin-contracts-master/test/utils/ShortStrings.t.sol +109 -0
- package/lib/openzeppelin-contracts-master/test/utils/ShortStrings.test.js +64 -0
- package/lib/openzeppelin-contracts-master/test/utils/SimulatedCall.test.js +101 -0
- package/lib/openzeppelin-contracts-master/test/utils/SlotDerivation.t.sol +248 -0
- package/lib/openzeppelin-contracts-master/test/utils/SlotDerivation.test.js +58 -0
- package/lib/openzeppelin-contracts-master/test/utils/StorageSlot.test.js +73 -0
- package/lib/openzeppelin-contracts-master/test/utils/Strings.t.sol +50 -0
- package/lib/openzeppelin-contracts-master/test/utils/Strings.test.js +366 -0
- package/lib/openzeppelin-contracts-master/test/utils/TransientSlot.test.js +59 -0
- package/lib/openzeppelin-contracts-master/test/utils/cryptography/ECDSA.test.js +322 -0
- package/lib/openzeppelin-contracts-master/test/utils/cryptography/EIP712.test.js +105 -0
- package/lib/openzeppelin-contracts-master/test/utils/cryptography/ERC1271.behavior.js +111 -0
- package/lib/openzeppelin-contracts-master/test/utils/cryptography/ERC7739.test.js +42 -0
- package/lib/openzeppelin-contracts-master/test/utils/cryptography/ERC7739Utils.test.js +203 -0
- package/lib/openzeppelin-contracts-master/test/utils/cryptography/MerkleProof.test.js +216 -0
- package/lib/openzeppelin-contracts-master/test/utils/cryptography/MessageHashUtils.t.sol +33 -0
- package/lib/openzeppelin-contracts-master/test/utils/cryptography/MessageHashUtils.test.js +149 -0
- package/lib/openzeppelin-contracts-master/test/utils/cryptography/P256.t.sol +44 -0
- package/lib/openzeppelin-contracts-master/test/utils/cryptography/P256.test.js +174 -0
- package/lib/openzeppelin-contracts-master/test/utils/cryptography/RSA.helper.js +17 -0
- package/lib/openzeppelin-contracts-master/test/utils/cryptography/RSA.test.js +102 -0
- package/lib/openzeppelin-contracts-master/test/utils/cryptography/SigVer15_186-3.rsp +3850 -0
- package/lib/openzeppelin-contracts-master/test/utils/cryptography/SignatureChecker.test.js +427 -0
- package/lib/openzeppelin-contracts-master/test/utils/cryptography/TrieProof.test.js +707 -0
- package/lib/openzeppelin-contracts-master/test/utils/cryptography/WebAuthn.t.sol +340 -0
- package/lib/openzeppelin-contracts-master/test/utils/cryptography/ecdsa_secp256r1_sha256_p1363_test.json +3719 -0
- package/lib/openzeppelin-contracts-master/test/utils/draft-InteroperableAddress.t.sol +99 -0
- package/lib/openzeppelin-contracts-master/test/utils/draft-InteroperableAddress.test.js +217 -0
- package/lib/openzeppelin-contracts-master/test/utils/introspection/ERC165.test.js +18 -0
- package/lib/openzeppelin-contracts-master/test/utils/introspection/ERC165Checker.test.js +272 -0
- package/lib/openzeppelin-contracts-master/test/utils/introspection/SupportsInterface.behavior.js +169 -0
- package/lib/openzeppelin-contracts-master/test/utils/math/Math.t.sol +370 -0
- package/lib/openzeppelin-contracts-master/test/utils/math/Math.test.js +746 -0
- package/lib/openzeppelin-contracts-master/test/utils/math/SafeCast.test.js +159 -0
- package/lib/openzeppelin-contracts-master/test/utils/math/SignedMath.t.sol +81 -0
- package/lib/openzeppelin-contracts-master/test/utils/math/SignedMath.test.js +53 -0
- package/lib/openzeppelin-contracts-master/test/utils/structs/Accumulators.t.sol +35 -0
- package/lib/openzeppelin-contracts-master/test/utils/structs/BitMap.test.js +149 -0
- package/lib/openzeppelin-contracts-master/test/utils/structs/Checkpoints.t.sol +440 -0
- package/lib/openzeppelin-contracts-master/test/utils/structs/Checkpoints.test.js +147 -0
- package/lib/openzeppelin-contracts-master/test/utils/structs/CircularBuffer.test.js +83 -0
- package/lib/openzeppelin-contracts-master/test/utils/structs/DoubleEndedQueue.test.js +144 -0
- package/lib/openzeppelin-contracts-master/test/utils/structs/EnumerableMap.behavior.js +214 -0
- package/lib/openzeppelin-contracts-master/test/utils/structs/EnumerableMap.test.js +83 -0
- package/lib/openzeppelin-contracts-master/test/utils/structs/EnumerableSet.behavior.js +175 -0
- package/lib/openzeppelin-contracts-master/test/utils/structs/EnumerableSet.test.js +66 -0
- package/lib/openzeppelin-contracts-master/test/utils/structs/Heap.t.sol +74 -0
- package/lib/openzeppelin-contracts-master/test/utils/structs/Heap.test.js +113 -0
- package/lib/openzeppelin-contracts-master/test/utils/structs/MerkleTree.test.js +180 -0
- package/lib/openzeppelin-contracts-master/test/utils/types/Time.test.js +135 -0
- package/lib/v3-core-main/.gitattributes +1 -0
- package/lib/v3-core-main/.github/stale.yml +25 -0
- package/lib/v3-core-main/.github/workflows/fuzz-testing.yml +60 -0
- package/lib/v3-core-main/.github/workflows/lint.yml +34 -0
- package/lib/v3-core-main/.github/workflows/mythx.yml +65 -0
- package/lib/v3-core-main/.github/workflows/tests.yml +38 -0
- package/lib/v3-core-main/.prettierrc +5 -0
- package/lib/v3-core-main/.solhint.json +6 -0
- package/lib/v3-core-main/.yarnrc +1 -0
- package/lib/v3-core-main/LICENSE +100 -0
- package/lib/v3-core-main/README.md +66 -0
- package/lib/v3-core-main/audits/abdk/audit.pdf +0 -0
- package/lib/v3-core-main/audits/tob/README.md +166 -0
- package/lib/v3-core-main/audits/tob/audit.pdf +0 -0
- package/lib/v3-core-main/audits/tob/contracts/crytic/echidna/E2E_mint_burn.config.yaml +16 -0
- package/lib/v3-core-main/audits/tob/contracts/crytic/echidna/E2E_mint_burn.sol +503 -0
- package/lib/v3-core-main/audits/tob/contracts/crytic/echidna/E2E_swap.config.yaml +10 -0
- package/lib/v3-core-main/audits/tob/contracts/crytic/echidna/E2E_swap.sol +487 -0
- package/lib/v3-core-main/audits/tob/contracts/crytic/echidna/Other.config.yaml +7 -0
- package/lib/v3-core-main/audits/tob/contracts/crytic/echidna/Other.sol +21 -0
- package/lib/v3-core-main/audits/tob/contracts/crytic/echidna/Setup.sol +205 -0
- package/lib/v3-core-main/audits/tob/contracts/crytic/manticore/001.sol +11 -0
- package/lib/v3-core-main/audits/tob/contracts/crytic/manticore/002.sol +12 -0
- package/lib/v3-core-main/audits/tob/contracts/crytic/manticore/003.sol +9 -0
- package/lib/v3-core-main/bug-bounty.md +76 -0
- package/lib/v3-core-main/contracts/NoDelegateCall.sol +27 -0
- package/lib/v3-core-main/contracts/UniswapV3Factory.sol +73 -0
- package/lib/v3-core-main/contracts/UniswapV3Pool.sol +869 -0
- package/lib/v3-core-main/contracts/UniswapV3PoolDeployer.sol +38 -0
- package/lib/v3-core-main/contracts/interfaces/IERC20Minimal.sol +52 -0
- package/lib/v3-core-main/contracts/interfaces/IUniswapV3Factory.sol +78 -0
- package/lib/v3-core-main/contracts/interfaces/IUniswapV3Pool.sol +24 -0
- package/lib/v3-core-main/contracts/interfaces/IUniswapV3PoolDeployer.sol +26 -0
- package/lib/v3-core-main/contracts/interfaces/LICENSE +445 -0
- package/lib/v3-core-main/contracts/interfaces/callback/IUniswapV3FlashCallback.sol +18 -0
- package/lib/v3-core-main/contracts/interfaces/callback/IUniswapV3MintCallback.sol +18 -0
- package/lib/v3-core-main/contracts/interfaces/callback/IUniswapV3SwapCallback.sol +21 -0
- package/lib/v3-core-main/contracts/interfaces/pool/IUniswapV3PoolActions.sol +103 -0
- package/lib/v3-core-main/contracts/interfaces/pool/IUniswapV3PoolDerivedState.sol +40 -0
- package/lib/v3-core-main/contracts/interfaces/pool/IUniswapV3PoolEvents.sol +121 -0
- package/lib/v3-core-main/contracts/interfaces/pool/IUniswapV3PoolImmutables.sol +35 -0
- package/lib/v3-core-main/contracts/interfaces/pool/IUniswapV3PoolOwnerActions.sol +23 -0
- package/lib/v3-core-main/contracts/interfaces/pool/IUniswapV3PoolState.sol +116 -0
- package/lib/v3-core-main/contracts/libraries/BitMath.sol +94 -0
- package/lib/v3-core-main/contracts/libraries/FixedPoint128.sol +8 -0
- package/lib/v3-core-main/contracts/libraries/FixedPoint96.sol +10 -0
- package/lib/v3-core-main/contracts/libraries/FullMath.sol +124 -0
- package/lib/v3-core-main/contracts/libraries/LICENSE +445 -0
- package/lib/v3-core-main/contracts/libraries/LICENSE_MIT +20 -0
- package/lib/v3-core-main/contracts/libraries/LiquidityMath.sol +17 -0
- package/lib/v3-core-main/contracts/libraries/LowGasSafeMath.sol +46 -0
- package/lib/v3-core-main/contracts/libraries/Oracle.sol +325 -0
- package/lib/v3-core-main/contracts/libraries/Position.sol +88 -0
- package/lib/v3-core-main/contracts/libraries/SafeCast.sol +28 -0
- package/lib/v3-core-main/contracts/libraries/SqrtPriceMath.sol +227 -0
- package/lib/v3-core-main/contracts/libraries/SwapMath.sol +98 -0
- package/lib/v3-core-main/contracts/libraries/Tick.sol +185 -0
- package/lib/v3-core-main/contracts/libraries/TickBitmap.sol +78 -0
- package/lib/v3-core-main/contracts/libraries/TickMath.sol +205 -0
- package/lib/v3-core-main/contracts/libraries/TransferHelper.sol +23 -0
- package/lib/v3-core-main/contracts/libraries/UnsafeMath.sol +17 -0
- package/lib/v3-core-main/contracts/test/BitMathEchidnaTest.sol +18 -0
- package/lib/v3-core-main/contracts/test/BitMathTest.sol +26 -0
- package/lib/v3-core-main/contracts/test/FullMathEchidnaTest.sol +67 -0
- package/lib/v3-core-main/contracts/test/FullMathTest.sol +22 -0
- package/lib/v3-core-main/contracts/test/LiquidityMathTest.sol +16 -0
- package/lib/v3-core-main/contracts/test/LowGasSafeMathEchidnaTest.sol +36 -0
- package/lib/v3-core-main/contracts/test/MockTimeUniswapV3Pool.sol +26 -0
- package/lib/v3-core-main/contracts/test/MockTimeUniswapV3PoolDeployer.sol +35 -0
- package/lib/v3-core-main/contracts/test/NoDelegateCallTest.sol +32 -0
- package/lib/v3-core-main/contracts/test/OracleEchidnaTest.sol +137 -0
- package/lib/v3-core-main/contracts/test/OracleTest.sol +100 -0
- package/lib/v3-core-main/contracts/test/SqrtPriceMathEchidnaTest.sol +232 -0
- package/lib/v3-core-main/contracts/test/SqrtPriceMathTest.sol +86 -0
- package/lib/v3-core-main/contracts/test/SwapMathEchidnaTest.sol +52 -0
- package/lib/v3-core-main/contracts/test/SwapMathTest.sol +37 -0
- package/lib/v3-core-main/contracts/test/TestERC20.sol +59 -0
- package/lib/v3-core-main/contracts/test/TestUniswapV3Callee.sol +142 -0
- package/lib/v3-core-main/contracts/test/TestUniswapV3ReentrantCallee.sol +56 -0
- package/lib/v3-core-main/contracts/test/TestUniswapV3Router.sol +91 -0
- package/lib/v3-core-main/contracts/test/TestUniswapV3SwapPay.sol +41 -0
- package/lib/v3-core-main/contracts/test/TickBitmapEchidnaTest.sol +47 -0
- package/lib/v3-core-main/contracts/test/TickBitmapTest.sol +40 -0
- package/lib/v3-core-main/contracts/test/TickEchidnaTest.sol +27 -0
- package/lib/v3-core-main/contracts/test/TickMathEchidnaTest.sol +22 -0
- package/lib/v3-core-main/contracts/test/TickMathTest.sol +34 -0
- package/lib/v3-core-main/contracts/test/TickOverflowSafetyEchidnaTest.sol +111 -0
- package/lib/v3-core-main/contracts/test/TickTest.sol +79 -0
- package/lib/v3-core-main/contracts/test/UniswapV3PoolSwapTest.sol +50 -0
- package/lib/v3-core-main/contracts/test/UnsafeMathEchidnaTest.sol +17 -0
- package/lib/v3-core-main/echidna.config.yml +74 -0
- package/lib/v3-core-main/hardhat.config.ts +68 -0
- package/lib/v3-core-main/package.json +59 -0
- package/lib/v3-core-main/test/BitMath.spec.ts +79 -0
- package/lib/v3-core-main/test/FullMath.spec.ts +182 -0
- package/lib/v3-core-main/test/LiquidityMath.spec.ts +44 -0
- package/lib/v3-core-main/test/NoDelegateCall.spec.ts +54 -0
- package/lib/v3-core-main/test/Oracle.spec.ts +798 -0
- package/lib/v3-core-main/test/SqrtPriceMath.spec.ts +379 -0
- package/lib/v3-core-main/test/SwapMath.spec.ts +324 -0
- package/lib/v3-core-main/test/Tick.spec.ts +329 -0
- package/lib/v3-core-main/test/TickBitmap.spec.ts +227 -0
- package/lib/v3-core-main/test/TickMath.spec.ts +166 -0
- package/lib/v3-core-main/test/UniswapV3Factory.spec.ts +177 -0
- package/lib/v3-core-main/test/UniswapV3Pool.arbitrage.spec.ts +373 -0
- package/lib/v3-core-main/test/UniswapV3Pool.gas.spec.ts +315 -0
- package/lib/v3-core-main/test/UniswapV3Pool.spec.ts +2043 -0
- package/lib/v3-core-main/test/UniswapV3Pool.swaps.spec.ts +588 -0
- package/lib/v3-core-main/test/UniswapV3Router.spec.ts +133 -0
- package/lib/v3-core-main/test/__snapshots__/BitMath.spec.ts.snap +13 -0
- package/lib/v3-core-main/test/__snapshots__/LiquidityMath.spec.ts.snap +5 -0
- package/lib/v3-core-main/test/__snapshots__/NoDelegateCall.spec.ts.snap +3 -0
- package/lib/v3-core-main/test/__snapshots__/Oracle.spec.ts.snap +87 -0
- package/lib/v3-core-main/test/__snapshots__/SqrtPriceMath.spec.ts.snap +17 -0
- package/lib/v3-core-main/test/__snapshots__/SwapMath.spec.ts.snap +17 -0
- package/lib/v3-core-main/test/__snapshots__/TickBitmap.spec.ts.snap +19 -0
- package/lib/v3-core-main/test/__snapshots__/TickMath.spec.ts.snap +165 -0
- package/lib/v3-core-main/test/__snapshots__/UniswapV3Factory.spec.ts.snap +7 -0
- package/lib/v3-core-main/test/__snapshots__/UniswapV3Pool.arbitrage.spec.ts.snap +977 -0
- package/lib/v3-core-main/test/__snapshots__/UniswapV3Pool.gas.spec.ts.snap +169 -0
- package/lib/v3-core-main/test/__snapshots__/UniswapV3Pool.swaps.spec.ts.snap +3541 -0
- package/lib/v3-core-main/test/shared/checkObservationEquals.ts +38 -0
- package/lib/v3-core-main/test/shared/expect.ts +8 -0
- package/lib/v3-core-main/test/shared/fixtures.ts +92 -0
- package/lib/v3-core-main/test/shared/format.ts +10 -0
- package/lib/v3-core-main/test/shared/snapshotGasCost.ts +27 -0
- package/lib/v3-core-main/test/shared/utilities.ts +258 -0
- package/lib/v3-core-main/test/snapshotCumulativesInside.test.ts +73 -0
- package/lib/v3-core-main/tsconfig.json +13 -0
- package/lib/v3-core-main/yarn.lock +9271 -0
- package/lib/v3-periphery-main/.gitattributes +1 -0
- package/lib/v3-periphery-main/.github/stale.yml +25 -0
- package/lib/v3-periphery-main/.github/workflows/lint.yml +33 -0
- package/lib/v3-periphery-main/.github/workflows/tests.yml +39 -0
- package/lib/v3-periphery-main/.prettierignore +1 -0
- package/lib/v3-periphery-main/.prettierrc +5 -0
- package/lib/v3-periphery-main/.solhint.json +6 -0
- package/lib/v3-periphery-main/.yarnrc +1 -0
- package/lib/v3-periphery-main/LICENSE +339 -0
- package/lib/v3-periphery-main/README.md +52 -0
- package/lib/v3-periphery-main/audits/abdk/audit.pdf +0 -0
- package/lib/v3-periphery-main/bug-bounty.md +80 -0
- package/lib/v3-periphery-main/contracts/NonfungiblePositionManager.sol +400 -0
- package/lib/v3-periphery-main/contracts/NonfungibleTokenPositionDescriptor.sol +124 -0
- package/lib/v3-periphery-main/contracts/SwapRouter.sol +244 -0
- package/lib/v3-periphery-main/contracts/V3Migrator.sol +99 -0
- package/lib/v3-periphery-main/contracts/base/BlockTimestamp.sol +12 -0
- package/lib/v3-periphery-main/contracts/base/ERC721Permit.sol +86 -0
- package/lib/v3-periphery-main/contracts/base/LiquidityManagement.sol +90 -0
- package/lib/v3-periphery-main/contracts/base/Multicall.sol +28 -0
- package/lib/v3-periphery-main/contracts/base/PeripheryImmutableState.sol +18 -0
- package/lib/v3-periphery-main/contracts/base/PeripheryPayments.sol +70 -0
- package/lib/v3-periphery-main/contracts/base/PeripheryPaymentsWithFee.sol +55 -0
- package/lib/v3-periphery-main/contracts/base/PeripheryValidation.sol +11 -0
- package/lib/v3-periphery-main/contracts/base/PoolInitializer.sol +32 -0
- package/lib/v3-periphery-main/contracts/base/SelfPermit.sol +63 -0
- package/lib/v3-periphery-main/contracts/examples/PairFlash.sol +149 -0
- package/lib/v3-periphery-main/contracts/interfaces/IERC20Metadata.sol +18 -0
- package/lib/v3-periphery-main/contracts/interfaces/IERC721Permit.sol +32 -0
- package/lib/v3-periphery-main/contracts/interfaces/IMulticall.sol +13 -0
- package/lib/v3-periphery-main/contracts/interfaces/INonfungiblePositionManager.sol +179 -0
- package/lib/v3-periphery-main/contracts/interfaces/INonfungibleTokenPositionDescriptor.sol +17 -0
- package/lib/v3-periphery-main/contracts/interfaces/IPeripheryImmutableState.sol +12 -0
- package/lib/v3-periphery-main/contracts/interfaces/IPeripheryPayments.sol +28 -0
- package/lib/v3-periphery-main/contracts/interfaces/IPeripheryPaymentsWithFee.sol +29 -0
- package/lib/v3-periphery-main/contracts/interfaces/IPoolInitializer.sol +22 -0
- package/lib/v3-periphery-main/contracts/interfaces/IQuoter.sol +51 -0
- package/lib/v3-periphery-main/contracts/interfaces/IQuoterV2.sol +98 -0
- package/lib/v3-periphery-main/contracts/interfaces/ISelfPermit.sol +76 -0
- package/lib/v3-periphery-main/contracts/interfaces/ISwapRouter.sol +67 -0
- package/lib/v3-periphery-main/contracts/interfaces/ITickLens.sol +25 -0
- package/lib/v3-periphery-main/contracts/interfaces/IV3Migrator.sol +34 -0
- package/lib/v3-periphery-main/contracts/interfaces/external/IERC1271.sol +16 -0
- package/lib/v3-periphery-main/contracts/interfaces/external/IERC20PermitAllowed.sol +27 -0
- package/lib/v3-periphery-main/contracts/interfaces/external/IWETH9.sol +13 -0
- package/lib/v3-periphery-main/contracts/lens/Quoter.sol +170 -0
- package/lib/v3-periphery-main/contracts/lens/QuoterV2.sol +273 -0
- package/lib/v3-periphery-main/contracts/lens/README.md +4 -0
- package/lib/v3-periphery-main/contracts/lens/TickLens.sol +42 -0
- package/lib/v3-periphery-main/contracts/lens/UniswapInterfaceMulticall.sol +39 -0
- package/lib/v3-periphery-main/contracts/libraries/BytesLib.sol +101 -0
- package/lib/v3-periphery-main/contracts/libraries/CallbackValidation.sol +36 -0
- package/lib/v3-periphery-main/contracts/libraries/ChainId.sol +13 -0
- package/lib/v3-periphery-main/contracts/libraries/HexStrings.sol +29 -0
- package/lib/v3-periphery-main/contracts/libraries/LiquidityAmounts.sol +137 -0
- package/lib/v3-periphery-main/contracts/libraries/NFTDescriptor.sol +477 -0
- package/lib/v3-periphery-main/contracts/libraries/NFTSVG.sol +406 -0
- package/lib/v3-periphery-main/contracts/libraries/OracleLibrary.sol +180 -0
- package/lib/v3-periphery-main/contracts/libraries/Path.sol +69 -0
- package/lib/v3-periphery-main/contracts/libraries/PoolAddress.sol +48 -0
- package/lib/v3-periphery-main/contracts/libraries/PoolTicksCounter.sol +96 -0
- package/lib/v3-periphery-main/contracts/libraries/PositionKey.sol +13 -0
- package/lib/v3-periphery-main/contracts/libraries/PositionValue.sol +167 -0
- package/lib/v3-periphery-main/contracts/libraries/SqrtPriceMathPartial.sol +62 -0
- package/lib/v3-periphery-main/contracts/libraries/TokenRatioSortOrder.sol +12 -0
- package/lib/v3-periphery-main/contracts/libraries/TransferHelper.sol +60 -0
- package/lib/v3-periphery-main/contracts/test/Base64Test.sol +16 -0
- package/lib/v3-periphery-main/contracts/test/LiquidityAmountsTest.sol +120 -0
- package/lib/v3-periphery-main/contracts/test/MockObservable.sol +48 -0
- package/lib/v3-periphery-main/contracts/test/MockObservations.sol +82 -0
- package/lib/v3-periphery-main/contracts/test/MockTimeNonfungiblePositionManager.sol +23 -0
- package/lib/v3-periphery-main/contracts/test/MockTimeSwapRouter.sol +19 -0
- package/lib/v3-periphery-main/contracts/test/NFTDescriptorTest.sol +75 -0
- package/lib/v3-periphery-main/contracts/test/NonfungiblePositionManagerPositionsGasTest.sol +18 -0
- package/lib/v3-periphery-main/contracts/test/OracleTest.sol +67 -0
- package/lib/v3-periphery-main/contracts/test/PathTest.sol +37 -0
- package/lib/v3-periphery-main/contracts/test/PeripheryImmutableStateTest.sol +8 -0
- package/lib/v3-periphery-main/contracts/test/PoolAddressTest.sol +30 -0
- package/lib/v3-periphery-main/contracts/test/PoolTicksCounterTest.sol +18 -0
- package/lib/v3-periphery-main/contracts/test/PositionValueTest.sol +57 -0
- package/lib/v3-periphery-main/contracts/test/SelfPermitTest.sol +9 -0
- package/lib/v3-periphery-main/contracts/test/TestCallbackValidation.sol +15 -0
- package/lib/v3-periphery-main/contracts/test/TestERC20.sol +10 -0
- package/lib/v3-periphery-main/contracts/test/TestERC20Metadata.sol +14 -0
- package/lib/v3-periphery-main/contracts/test/TestERC20PermitAllowed.sol +24 -0
- package/lib/v3-periphery-main/contracts/test/TestMulticall.sol +30 -0
- package/lib/v3-periphery-main/contracts/test/TestPositionNFTOwner.sol +28 -0
- package/lib/v3-periphery-main/contracts/test/TestUniswapV3Callee.sol +62 -0
- package/lib/v3-periphery-main/contracts/test/TickLensTest.sol +15 -0
- package/lib/v3-periphery-main/deploys.md +25 -0
- package/lib/v3-periphery-main/hardhat.config.ts +104 -0
- package/lib/v3-periphery-main/package.json +68 -0
- package/lib/v3-periphery-main/test/Base64.spec.ts +81 -0
- package/lib/v3-periphery-main/test/CallbackValidation.spec.ts +56 -0
- package/lib/v3-periphery-main/test/LiquidityAmounts.spec.ts +241 -0
- package/lib/v3-periphery-main/test/Multicall.spec.ts +65 -0
- package/lib/v3-periphery-main/test/NFTDescriptor.spec.ts +907 -0
- package/lib/v3-periphery-main/test/NonfungiblePositionManager.spec.ts +1304 -0
- package/lib/v3-periphery-main/test/NonfungibleTokenPositionDescriptor.spec.ts +217 -0
- package/lib/v3-periphery-main/test/OracleLibrary.spec.ts +675 -0
- package/lib/v3-periphery-main/test/PairFlash.spec.ts +168 -0
- package/lib/v3-periphery-main/test/Path.spec.ts +90 -0
- package/lib/v3-periphery-main/test/PeripheryImmutableState.spec.ts +56 -0
- package/lib/v3-periphery-main/test/PoolAddress.spec.ts +72 -0
- package/lib/v3-periphery-main/test/PoolTicksCounter.spec.ts +280 -0
- package/lib/v3-periphery-main/test/PositionValue.spec.ts +490 -0
- package/lib/v3-periphery-main/test/Quoter.spec.ts +201 -0
- package/lib/v3-periphery-main/test/QuoterV2.spec.ts +578 -0
- package/lib/v3-periphery-main/test/SelfPermit.spec.ts +198 -0
- package/lib/v3-periphery-main/test/SwapRouter.gas.spec.ts +453 -0
- package/lib/v3-periphery-main/test/SwapRouter.spec.ts +916 -0
- package/lib/v3-periphery-main/test/TickLens.spec.ts +223 -0
- package/lib/v3-periphery-main/test/V3Migrator.spec.ts +446 -0
- package/lib/v3-periphery-main/test/__snapshots__/Base64.spec.ts.snap +32 -0
- package/lib/v3-periphery-main/test/__snapshots__/LiquidityAmounts.spec.ts.snap +21 -0
- package/lib/v3-periphery-main/test/__snapshots__/Multicall.spec.ts.snap +5 -0
- package/lib/v3-periphery-main/test/__snapshots__/NFTDescriptor.spec.ts.snap +7 -0
- package/lib/v3-periphery-main/test/__snapshots__/NFTDescriptor.svg +1 -0
- package/lib/v3-periphery-main/test/__snapshots__/NonfungiblePositionManager.spec.ts.snap +41 -0
- package/lib/v3-periphery-main/test/__snapshots__/OracleLibrary.spec.ts.snap +3 -0
- package/lib/v3-periphery-main/test/__snapshots__/PairFlash.spec.ts.snap +3 -0
- package/lib/v3-periphery-main/test/__snapshots__/Path.spec.ts.snap +3 -0
- package/lib/v3-periphery-main/test/__snapshots__/PeripheryImmutableState.spec.ts.snap +3 -0
- package/lib/v3-periphery-main/test/__snapshots__/PoolAddress.spec.ts.snap +5 -0
- package/lib/v3-periphery-main/test/__snapshots__/PositionValue.spec.ts.snap +11 -0
- package/lib/v3-periphery-main/test/__snapshots__/QuoterV2.spec.ts.snap +51 -0
- package/lib/v3-periphery-main/test/__snapshots__/SwapRouter.gas.spec.ts.snap +37 -0
- package/lib/v3-periphery-main/test/__snapshots__/SwapRouter.spec.ts.snap +3 -0
- package/lib/v3-periphery-main/test/__snapshots__/TickLens.spec.ts.snap +5 -0
- package/lib/v3-periphery-main/test/__snapshots__/V3Migrator.spec.ts.snap +3 -0
- package/lib/v3-periphery-main/test/contracts/WETH9.json +156 -0
- package/lib/v3-periphery-main/test/shared/base64.ts +7 -0
- package/lib/v3-periphery-main/test/shared/completeFixture.ts +63 -0
- package/lib/v3-periphery-main/test/shared/computePoolAddress.ts +22 -0
- package/lib/v3-periphery-main/test/shared/constants.ts +15 -0
- package/lib/v3-periphery-main/test/shared/encodePriceSqrt.ts +16 -0
- package/lib/v3-periphery-main/test/shared/expandTo18Decimals.ts +5 -0
- package/lib/v3-periphery-main/test/shared/expect.ts +8 -0
- package/lib/v3-periphery-main/test/shared/externalFixtures.ts +57 -0
- package/lib/v3-periphery-main/test/shared/extractJSONFromURI.ts +5 -0
- package/lib/v3-periphery-main/test/shared/formatSqrtRatioX96.spec.ts +30 -0
- package/lib/v3-periphery-main/test/shared/formatSqrtRatioX96.ts +30 -0
- package/lib/v3-periphery-main/test/shared/getPermitNFTSignature.ts +57 -0
- package/lib/v3-periphery-main/test/shared/path.ts +61 -0
- package/lib/v3-periphery-main/test/shared/permit.ts +61 -0
- package/lib/v3-periphery-main/test/shared/poolAtAddress.ts +7 -0
- package/lib/v3-periphery-main/test/shared/quoter.ts +153 -0
- package/lib/v3-periphery-main/test/shared/snapshotGasCost.ts +27 -0
- package/lib/v3-periphery-main/test/shared/ticks.ts +9 -0
- package/lib/v3-periphery-main/test/shared/tokenSort.ts +10 -0
- package/lib/v3-periphery-main/testnet-deploys.md +3 -0
- package/lib/v3-periphery-main/tsconfig.json +14 -0
- package/lib/v3-periphery-main/yarn.lock +8111 -0
- package/package.json +44 -0
- package/src/LPStateStorage.sol +74 -0
- package/src/MinimalPositionDescriptor.sol +38 -0
- package/src/NonfungiblePositionManagerImporter.sol +13 -0
- package/src/QuoterV2Importer.sol +9 -0
- package/src/RapidexV3FactoryImporter.sol +6 -0
- package/src/SwapRouterImporter.sol +9 -0
- package/src/TestToken.sol +60 -0
- package/src/WMST.sol +63 -0
- package/src/flattened/LPStateStorage.flat.sol +76 -0
- package/src/flattened/MinimalPositionDescriptor.flat.sol +40 -0
- package/src/flattened/NonfungiblePositionManagerImporter.flat.sol +2695 -0
- package/src/flattened/QuoterV2Importer.flat.sol +1616 -0
- package/src/flattened/RapidexV3FactoryImporter.flat.sol +3193 -0
- package/src/flattened/SwapRouterImporter.flat.sol +1811 -0
- package/src/flattened/TestToken.flat.sol +62 -0
- package/src/flattened/WMST.flat.sol +65 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
|
|
3
|
+
pragma solidity ^0.8.24;
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
MODULE_TYPE_HOOK,
|
|
7
|
+
MODULE_TYPE_FALLBACK,
|
|
8
|
+
MODULE_TYPE_VALIDATOR,
|
|
9
|
+
IERC7579Hook,
|
|
10
|
+
IERC7579Module,
|
|
11
|
+
IERC7579Validator
|
|
12
|
+
} from "../../../interfaces/draft-IERC7579.sol";
|
|
13
|
+
import {SignatureChecker} from "../../../utils/cryptography/SignatureChecker.sol";
|
|
14
|
+
import {PackedUserOperation} from "../../../interfaces/draft-IERC4337.sol";
|
|
15
|
+
import {IERC1271} from "../../../interfaces/IERC1271.sol";
|
|
16
|
+
import {ERC4337Utils} from "../../../account/utils/draft-ERC4337Utils.sol";
|
|
17
|
+
|
|
18
|
+
abstract contract ERC7579ModuleMock is IERC7579Module {
|
|
19
|
+
uint256 private _moduleTypeId;
|
|
20
|
+
|
|
21
|
+
event ModuleInstalledReceived(address account, bytes data);
|
|
22
|
+
event ModuleUninstalledReceived(address account, bytes data);
|
|
23
|
+
|
|
24
|
+
constructor(uint256 moduleTypeId) {
|
|
25
|
+
_moduleTypeId = moduleTypeId;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function onInstall(bytes calldata data) public virtual {
|
|
29
|
+
emit ModuleInstalledReceived(msg.sender, data);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function onUninstall(bytes calldata data) public virtual {
|
|
33
|
+
emit ModuleUninstalledReceived(msg.sender, data);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function isModuleType(uint256 moduleTypeId) external view returns (bool) {
|
|
37
|
+
return moduleTypeId == _moduleTypeId;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
abstract contract ERC7579ModuleMaliciousMock is ERC7579ModuleMock {
|
|
42
|
+
function onUninstall(bytes calldata /*data*/) public virtual override {
|
|
43
|
+
revert("uninstall reverts");
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
abstract contract ERC7579HookMock is ERC7579ModuleMock(MODULE_TYPE_HOOK), IERC7579Hook {
|
|
48
|
+
event PreCheck(address sender, uint256 value, bytes data);
|
|
49
|
+
event PostCheck(bytes hookData);
|
|
50
|
+
|
|
51
|
+
bool private _shouldRevertOnPreCheck = false;
|
|
52
|
+
bool private _shouldRevertOnPostCheck = false;
|
|
53
|
+
|
|
54
|
+
function revertOnPreCheck(bool shouldRevert) external {
|
|
55
|
+
_shouldRevertOnPreCheck = shouldRevert;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function revertOnPostCheck(bool shouldRevert) external {
|
|
59
|
+
_shouldRevertOnPostCheck = shouldRevert;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function preCheck(
|
|
63
|
+
address msgSender,
|
|
64
|
+
uint256 value,
|
|
65
|
+
bytes calldata msgData
|
|
66
|
+
) external returns (bytes memory hookData) {
|
|
67
|
+
require(!_shouldRevertOnPreCheck, "preCheck reverts");
|
|
68
|
+
emit PreCheck(msgSender, value, msgData);
|
|
69
|
+
return msgData;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function postCheck(bytes calldata hookData) external {
|
|
73
|
+
require(!_shouldRevertOnPostCheck, "postCheck reverts");
|
|
74
|
+
emit PostCheck(hookData);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
abstract contract ERC7579FallbackHandlerMock is ERC7579ModuleMock(MODULE_TYPE_FALLBACK) {
|
|
79
|
+
event ERC7579FallbackHandlerMockCalled(address account, address sender, uint256 value, bytes data);
|
|
80
|
+
|
|
81
|
+
error ERC7579FallbackHandlerMockRevert();
|
|
82
|
+
|
|
83
|
+
function _msgAccount() internal view returns (address) {
|
|
84
|
+
return msg.sender;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function _msgSender() internal pure returns (address) {
|
|
88
|
+
return address(bytes20(msg.data[msg.data.length - 20:]));
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function _msgData() internal pure returns (bytes calldata) {
|
|
92
|
+
return msg.data[:msg.data.length - 20];
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function callPayable() public payable {
|
|
96
|
+
emit ERC7579FallbackHandlerMockCalled(_msgAccount(), _msgSender(), msg.value, _msgData());
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function callView() public view returns (address, address) {
|
|
100
|
+
return (_msgAccount(), _msgSender());
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function callRevert() public pure {
|
|
104
|
+
revert ERC7579FallbackHandlerMockRevert();
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
abstract contract ERC7579ValidatorMock is ERC7579ModuleMock(MODULE_TYPE_VALIDATOR), IERC7579Validator {
|
|
109
|
+
mapping(address sender => address signer) private _associatedSigners;
|
|
110
|
+
|
|
111
|
+
function onInstall(bytes calldata data) public virtual override(IERC7579Module, ERC7579ModuleMock) {
|
|
112
|
+
_associatedSigners[msg.sender] = address(bytes20(data[0:20]));
|
|
113
|
+
super.onInstall(data);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
function onUninstall(bytes calldata data) public virtual override(IERC7579Module, ERC7579ModuleMock) {
|
|
117
|
+
delete _associatedSigners[msg.sender];
|
|
118
|
+
super.onUninstall(data);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function validateUserOp(
|
|
122
|
+
PackedUserOperation calldata userOp,
|
|
123
|
+
bytes32 userOpHash
|
|
124
|
+
) public view virtual returns (uint256) {
|
|
125
|
+
return
|
|
126
|
+
SignatureChecker.isValidSignatureNow(_associatedSigners[msg.sender], userOpHash, userOp.signature)
|
|
127
|
+
? ERC4337Utils.SIG_VALIDATION_SUCCESS
|
|
128
|
+
: ERC4337Utils.SIG_VALIDATION_FAILED;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
function isValidSignatureWithSender(
|
|
132
|
+
address /*sender*/,
|
|
133
|
+
bytes32 hash,
|
|
134
|
+
bytes calldata signature
|
|
135
|
+
) public view virtual returns (bytes4) {
|
|
136
|
+
return
|
|
137
|
+
SignatureChecker.isValidSignatureNow(_associatedSigners[msg.sender], hash, signature)
|
|
138
|
+
? IERC1271.isValidSignature.selector
|
|
139
|
+
: bytes4(0xffffffff);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
|
|
3
|
+
pragma solidity ^0.8.20;
|
|
4
|
+
|
|
5
|
+
import {CallType, ExecType, ModeSelector, ModePayload} from "../../../account/utils/draft-ERC7579Utils.sol";
|
|
6
|
+
|
|
7
|
+
contract ERC7579UtilsGlobalMock {
|
|
8
|
+
function eqCallTypeGlobal(CallType callType1, CallType callType2) internal pure returns (bool) {
|
|
9
|
+
return callType1 == callType2;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function eqExecTypeGlobal(ExecType execType1, ExecType execType2) internal pure returns (bool) {
|
|
13
|
+
return execType1 == execType2;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function eqModeSelectorGlobal(ModeSelector modeSelector1, ModeSelector modeSelector2) internal pure returns (bool) {
|
|
17
|
+
return modeSelector1 == modeSelector2;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function eqModePayloadGlobal(ModePayload modePayload1, ModePayload modePayload2) internal pure returns (bool) {
|
|
21
|
+
return modePayload1 == modePayload2;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
// SPDX-License-Identifier: BSD-3-Clause
|
|
2
|
+
// solhint-disable private-vars-leading-underscore
|
|
3
|
+
/**
|
|
4
|
+
* Copyright 2020 Compound Labs, Inc.
|
|
5
|
+
*
|
|
6
|
+
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
|
|
7
|
+
* following conditions are met:
|
|
8
|
+
*
|
|
9
|
+
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following
|
|
10
|
+
* disclaimer.
|
|
11
|
+
*
|
|
12
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
|
|
13
|
+
* following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
14
|
+
*
|
|
15
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote
|
|
16
|
+
* products derived from this software without specific prior written permission.
|
|
17
|
+
*
|
|
18
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
|
19
|
+
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
20
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
21
|
+
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
22
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
|
23
|
+
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
24
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
pragma solidity ^0.8.20;
|
|
28
|
+
|
|
29
|
+
contract CompTimelock {
|
|
30
|
+
event NewAdmin(address indexed newAdmin);
|
|
31
|
+
event NewPendingAdmin(address indexed newPendingAdmin);
|
|
32
|
+
event NewDelay(uint256 indexed newDelay);
|
|
33
|
+
event CancelTransaction(
|
|
34
|
+
bytes32 indexed txHash,
|
|
35
|
+
address indexed target,
|
|
36
|
+
uint256 value,
|
|
37
|
+
string signature,
|
|
38
|
+
bytes data,
|
|
39
|
+
uint256 eta
|
|
40
|
+
);
|
|
41
|
+
event ExecuteTransaction(
|
|
42
|
+
bytes32 indexed txHash,
|
|
43
|
+
address indexed target,
|
|
44
|
+
uint256 value,
|
|
45
|
+
string signature,
|
|
46
|
+
bytes data,
|
|
47
|
+
uint256 eta
|
|
48
|
+
);
|
|
49
|
+
event QueueTransaction(
|
|
50
|
+
bytes32 indexed txHash,
|
|
51
|
+
address indexed target,
|
|
52
|
+
uint256 value,
|
|
53
|
+
string signature,
|
|
54
|
+
bytes data,
|
|
55
|
+
uint256 eta
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
uint256 public constant GRACE_PERIOD = 14 days;
|
|
59
|
+
uint256 public constant MINIMUM_DELAY = 2 days;
|
|
60
|
+
uint256 public constant MAXIMUM_DELAY = 30 days;
|
|
61
|
+
|
|
62
|
+
address public admin;
|
|
63
|
+
address public pendingAdmin;
|
|
64
|
+
uint256 public delay;
|
|
65
|
+
|
|
66
|
+
mapping(bytes32 => bool) public queuedTransactions;
|
|
67
|
+
|
|
68
|
+
constructor(address admin_, uint256 delay_) {
|
|
69
|
+
require(delay_ >= MINIMUM_DELAY, "Timelock::constructor: Delay must exceed minimum delay.");
|
|
70
|
+
require(delay_ <= MAXIMUM_DELAY, "Timelock::setDelay: Delay must not exceed maximum delay.");
|
|
71
|
+
|
|
72
|
+
admin = admin_;
|
|
73
|
+
delay = delay_;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
receive() external payable {}
|
|
77
|
+
|
|
78
|
+
function setDelay(uint256 delay_) public {
|
|
79
|
+
require(msg.sender == address(this), "Timelock::setDelay: Call must come from Timelock.");
|
|
80
|
+
require(delay_ >= MINIMUM_DELAY, "Timelock::setDelay: Delay must exceed minimum delay.");
|
|
81
|
+
require(delay_ <= MAXIMUM_DELAY, "Timelock::setDelay: Delay must not exceed maximum delay.");
|
|
82
|
+
delay = delay_;
|
|
83
|
+
|
|
84
|
+
emit NewDelay(delay);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function acceptAdmin() public {
|
|
88
|
+
require(msg.sender == pendingAdmin, "Timelock::acceptAdmin: Call must come from pendingAdmin.");
|
|
89
|
+
admin = msg.sender;
|
|
90
|
+
pendingAdmin = address(0);
|
|
91
|
+
|
|
92
|
+
emit NewAdmin(admin);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function setPendingAdmin(address pendingAdmin_) public {
|
|
96
|
+
require(msg.sender == address(this), "Timelock::setPendingAdmin: Call must come from Timelock.");
|
|
97
|
+
pendingAdmin = pendingAdmin_;
|
|
98
|
+
|
|
99
|
+
emit NewPendingAdmin(pendingAdmin);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function queueTransaction(
|
|
103
|
+
address target,
|
|
104
|
+
uint256 value,
|
|
105
|
+
string memory signature,
|
|
106
|
+
bytes memory data,
|
|
107
|
+
uint256 eta
|
|
108
|
+
) public returns (bytes32) {
|
|
109
|
+
require(msg.sender == admin, "Timelock::queueTransaction: Call must come from admin.");
|
|
110
|
+
require(
|
|
111
|
+
eta >= getBlockTimestamp() + delay,
|
|
112
|
+
"Timelock::queueTransaction: Estimated execution block must satisfy delay."
|
|
113
|
+
);
|
|
114
|
+
|
|
115
|
+
bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));
|
|
116
|
+
queuedTransactions[txHash] = true;
|
|
117
|
+
|
|
118
|
+
emit QueueTransaction(txHash, target, value, signature, data, eta);
|
|
119
|
+
return txHash;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function cancelTransaction(
|
|
123
|
+
address target,
|
|
124
|
+
uint256 value,
|
|
125
|
+
string memory signature,
|
|
126
|
+
bytes memory data,
|
|
127
|
+
uint256 eta
|
|
128
|
+
) public {
|
|
129
|
+
require(msg.sender == admin, "Timelock::cancelTransaction: Call must come from admin.");
|
|
130
|
+
|
|
131
|
+
bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));
|
|
132
|
+
queuedTransactions[txHash] = false;
|
|
133
|
+
|
|
134
|
+
emit CancelTransaction(txHash, target, value, signature, data, eta);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
function executeTransaction(
|
|
138
|
+
address target,
|
|
139
|
+
uint256 value,
|
|
140
|
+
string memory signature,
|
|
141
|
+
bytes memory data,
|
|
142
|
+
uint256 eta
|
|
143
|
+
) public payable returns (bytes memory) {
|
|
144
|
+
require(msg.sender == admin, "Timelock::executeTransaction: Call must come from admin.");
|
|
145
|
+
|
|
146
|
+
bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));
|
|
147
|
+
require(queuedTransactions[txHash], "Timelock::executeTransaction: Transaction hasn't been queued.");
|
|
148
|
+
require(getBlockTimestamp() >= eta, "Timelock::executeTransaction: Transaction hasn't surpassed time lock.");
|
|
149
|
+
require(getBlockTimestamp() <= eta + GRACE_PERIOD, "Timelock::executeTransaction: Transaction is stale.");
|
|
150
|
+
|
|
151
|
+
queuedTransactions[txHash] = false;
|
|
152
|
+
|
|
153
|
+
bytes memory callData;
|
|
154
|
+
|
|
155
|
+
if (bytes(signature).length == 0) {
|
|
156
|
+
callData = data;
|
|
157
|
+
} else {
|
|
158
|
+
callData = abi.encodePacked(bytes4(keccak256(bytes(signature))), data);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// solium-disable-next-line security/no-call-value
|
|
162
|
+
(bool success, bytes memory returnData) = target.call{value: value}(callData);
|
|
163
|
+
require(success, "Timelock::executeTransaction: Transaction execution reverted.");
|
|
164
|
+
|
|
165
|
+
emit ExecuteTransaction(txHash, target, value, signature, data, eta);
|
|
166
|
+
|
|
167
|
+
return returnData;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
function getBlockTimestamp() internal view returns (uint256) {
|
|
171
|
+
// solium-disable-next-line security/no-block-members
|
|
172
|
+
return block.timestamp;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
|
|
3
|
+
pragma solidity ^0.8.27;
|
|
4
|
+
|
|
5
|
+
import {IERC7786GatewaySource, IERC7786Recipient} from "../../interfaces/draft-IERC7786.sol";
|
|
6
|
+
import {InteroperableAddress} from "../../utils/draft-InteroperableAddress.sol";
|
|
7
|
+
|
|
8
|
+
abstract contract ERC7786GatewayMock is IERC7786GatewaySource {
|
|
9
|
+
using InteroperableAddress for bytes;
|
|
10
|
+
|
|
11
|
+
error InvalidDestination();
|
|
12
|
+
error ReceiverError();
|
|
13
|
+
|
|
14
|
+
uint256 private _lastReceiveId;
|
|
15
|
+
|
|
16
|
+
/// @inheritdoc IERC7786GatewaySource
|
|
17
|
+
function supportsAttribute(bytes4 /*selector*/) public view virtual returns (bool) {
|
|
18
|
+
return false;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/// @inheritdoc IERC7786GatewaySource
|
|
22
|
+
function sendMessage(
|
|
23
|
+
bytes calldata recipient,
|
|
24
|
+
bytes calldata payload,
|
|
25
|
+
bytes[] calldata attributes
|
|
26
|
+
) public payable virtual returns (bytes32 sendId) {
|
|
27
|
+
// attributes are not supported
|
|
28
|
+
if (attributes.length > 0) {
|
|
29
|
+
revert UnsupportedAttribute(bytes4(attributes[0]));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// parse recipient
|
|
33
|
+
(bool success, uint256 chainid, address target) = recipient.tryParseEvmV1Calldata();
|
|
34
|
+
require(success && chainid == block.chainid, InvalidDestination());
|
|
35
|
+
|
|
36
|
+
// perform call
|
|
37
|
+
bytes4 magic = IERC7786Recipient(target).receiveMessage{value: msg.value}(
|
|
38
|
+
bytes32(++_lastReceiveId),
|
|
39
|
+
InteroperableAddress.formatEvmV1(block.chainid, msg.sender),
|
|
40
|
+
payload
|
|
41
|
+
);
|
|
42
|
+
require(magic == IERC7786Recipient.receiveMessage.selector, ReceiverError());
|
|
43
|
+
|
|
44
|
+
// emit standard event
|
|
45
|
+
emit MessageSent(
|
|
46
|
+
bytes32(0),
|
|
47
|
+
InteroperableAddress.formatEvmV1(block.chainid, msg.sender),
|
|
48
|
+
recipient,
|
|
49
|
+
payload,
|
|
50
|
+
msg.value,
|
|
51
|
+
attributes
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
return 0;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
|
|
3
|
+
pragma solidity ^0.8.27;
|
|
4
|
+
|
|
5
|
+
import {ERC7786Recipient} from "../../crosschain/ERC7786Recipient.sol";
|
|
6
|
+
|
|
7
|
+
contract ERC7786RecipientMock is ERC7786Recipient {
|
|
8
|
+
address private immutable _gateway;
|
|
9
|
+
|
|
10
|
+
event MessageReceived(address gateway, bytes32 receiveId, bytes sender, bytes payload, uint256 value);
|
|
11
|
+
|
|
12
|
+
constructor(address gateway_) {
|
|
13
|
+
_gateway = gateway_;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function _isAuthorizedGateway(
|
|
17
|
+
address gateway,
|
|
18
|
+
bytes calldata /*sender*/
|
|
19
|
+
) internal view virtual override returns (bool) {
|
|
20
|
+
return gateway == _gateway;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function _processMessage(
|
|
24
|
+
address gateway,
|
|
25
|
+
bytes32 receiveId,
|
|
26
|
+
bytes calldata sender,
|
|
27
|
+
bytes calldata payload
|
|
28
|
+
) internal virtual override {
|
|
29
|
+
emit MessageReceived(gateway, receiveId, sender, payload, msg.value);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
|
|
3
|
+
pragma solidity ^0.8.24;
|
|
4
|
+
|
|
5
|
+
import {AccessManager} from "../../access/manager/AccessManager.sol";
|
|
6
|
+
import {EnumerableSet} from "../../utils/structs/EnumerableSet.sol";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @dev Extension of {AccessManager} that allows enumerating the members of each role
|
|
10
|
+
* and the target functions each role is allowed to call.
|
|
11
|
+
*
|
|
12
|
+
* NOTE: Given {ADMIN_ROLE} is the default role for every restricted function, the
|
|
13
|
+
* {getRoleTargetFunctions} and {getRoleTargetFunctionCount} functions will return an empty array
|
|
14
|
+
* and 0 respectively.
|
|
15
|
+
*/
|
|
16
|
+
abstract contract AccessManagerEnumerable is AccessManager {
|
|
17
|
+
using EnumerableSet for EnumerableSet.AddressSet;
|
|
18
|
+
using EnumerableSet for EnumerableSet.Bytes4Set;
|
|
19
|
+
|
|
20
|
+
mapping(uint64 roleId => EnumerableSet.AddressSet) private _roleMembers;
|
|
21
|
+
mapping(uint64 roleId => mapping(address target => EnumerableSet.Bytes4Set)) private _roleTargetFunctions;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @dev Returns the number of accounts that have `roleId`. Can be used
|
|
25
|
+
* together with {getRoleMember} to enumerate all bearers of a role.
|
|
26
|
+
*/
|
|
27
|
+
function getRoleMemberCount(uint64 roleId) public view virtual returns (uint256) {
|
|
28
|
+
return _roleMembers[roleId].length();
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @dev Returns one of the accounts that have `roleId`. `index` must be a
|
|
33
|
+
* value between 0 and {getRoleMemberCount}, non-inclusive.
|
|
34
|
+
*
|
|
35
|
+
* Role bearers are not sorted in any particular way, and their ordering may change at any point.
|
|
36
|
+
*
|
|
37
|
+
* WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
|
|
38
|
+
* you perform all queries on the same block. See the following
|
|
39
|
+
* https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
|
|
40
|
+
* for more information.
|
|
41
|
+
*/
|
|
42
|
+
function getRoleMember(uint64 roleId, uint256 index) public view virtual returns (address) {
|
|
43
|
+
return _roleMembers[roleId].at(index);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* @dev Returns a range of accounts that have `roleId`. `start` and `end` define the range bounds.
|
|
48
|
+
* `start` is inclusive and `end` is exclusive.
|
|
49
|
+
*
|
|
50
|
+
* Role bearers are not sorted in any particular way, and their ordering may change at any point.
|
|
51
|
+
*
|
|
52
|
+
* It is not necessary to call {getRoleMemberCount} before calling this function. Using `start = 0` and
|
|
53
|
+
* `end = type(uint256).max` will return every member of `roleId`.
|
|
54
|
+
*
|
|
55
|
+
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
|
|
56
|
+
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
|
|
57
|
+
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
|
|
58
|
+
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
|
|
59
|
+
*/
|
|
60
|
+
function getRoleMembers(uint64 roleId, uint256 start, uint256 end) public view virtual returns (address[] memory) {
|
|
61
|
+
return _roleMembers[roleId].values(start, end);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* @dev Returns the number of target function selectors that require `roleId` for the given `target`.
|
|
66
|
+
* Can be used together with {getRoleTargetFunction} to enumerate all target functions for a role on a specific target.
|
|
67
|
+
*
|
|
68
|
+
* NOTE: Given {ADMIN_ROLE} is the default role for every restricted function, passing {ADMIN_ROLE} as `roleId` will
|
|
69
|
+
* return 0. See {_updateRoleTargetFunction} for more details.
|
|
70
|
+
*/
|
|
71
|
+
function getRoleTargetFunctionCount(uint64 roleId, address target) public view virtual returns (uint256) {
|
|
72
|
+
return _roleTargetFunctions[roleId][target].length();
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* @dev Returns one of the target function selectors that require `roleId` for the given `target`.
|
|
77
|
+
* `index` must be a value between 0 and {getRoleTargetFunctionCount}, non-inclusive.
|
|
78
|
+
*
|
|
79
|
+
* Target function selectors are not sorted in any particular way, and their ordering may change at any point.
|
|
80
|
+
*
|
|
81
|
+
* WARNING: When using {getRoleTargetFunction} and {getRoleTargetFunctionCount}, make sure
|
|
82
|
+
* you perform all queries on the same block. See the following
|
|
83
|
+
* https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
|
|
84
|
+
* for more information.
|
|
85
|
+
*/
|
|
86
|
+
function getRoleTargetFunction(uint64 roleId, address target, uint256 index) public view virtual returns (bytes4) {
|
|
87
|
+
return _roleTargetFunctions[roleId][target].at(index);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* @dev Returns a range of target function selectors that require `roleId` for the given `target`.
|
|
92
|
+
* `start` and `end` define the range bounds. `start` is inclusive and `end` is exclusive.
|
|
93
|
+
*
|
|
94
|
+
* Target function selectors are not sorted in any particular way, and their ordering may change at any point.
|
|
95
|
+
*
|
|
96
|
+
* It is not necessary to call {getRoleTargetFunctionCount} before calling this function. Using `start = 0` and
|
|
97
|
+
* `end = type(uint256).max` will return every function selector that `roleId` is allowed to call on `target`.
|
|
98
|
+
*
|
|
99
|
+
* WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
|
|
100
|
+
* to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
|
|
101
|
+
* this function has an unbounded cost, and using it as part of a state-changing function may render the function
|
|
102
|
+
* uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
|
|
103
|
+
*
|
|
104
|
+
* NOTE: Given {ADMIN_ROLE} is the default role for every restricted function, passing {ADMIN_ROLE} as `roleId` will
|
|
105
|
+
* return an empty array. See {_updateRoleTargetFunction} for more details.
|
|
106
|
+
*/
|
|
107
|
+
function getRoleTargetFunctions(
|
|
108
|
+
uint64 roleId,
|
|
109
|
+
address target,
|
|
110
|
+
uint256 start,
|
|
111
|
+
uint256 end
|
|
112
|
+
) public view virtual returns (bytes4[] memory) {
|
|
113
|
+
return _roleTargetFunctions[roleId][target].values(start, end);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/// @dev See {AccessManager-_grantRole}. Adds the account to the role members set.
|
|
117
|
+
function _grantRole(
|
|
118
|
+
uint64 roleId,
|
|
119
|
+
address account,
|
|
120
|
+
uint32 grantDelay,
|
|
121
|
+
uint32 executionDelay
|
|
122
|
+
) internal virtual override returns (bool) {
|
|
123
|
+
bool granted = super._grantRole(roleId, account, grantDelay, executionDelay);
|
|
124
|
+
if (granted) {
|
|
125
|
+
_roleMembers[roleId].add(account);
|
|
126
|
+
}
|
|
127
|
+
return granted;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/// @dev See {AccessManager-_revokeRole}. Removes the account from the role members set.
|
|
131
|
+
function _revokeRole(uint64 roleId, address account) internal virtual override returns (bool) {
|
|
132
|
+
bool revoked = super._revokeRole(roleId, account);
|
|
133
|
+
if (revoked) {
|
|
134
|
+
_roleMembers[roleId].remove(account);
|
|
135
|
+
}
|
|
136
|
+
return revoked;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* @dev See {AccessManager-_setTargetFunctionRole}. Adds the selector to the role target functions set.
|
|
141
|
+
*
|
|
142
|
+
* NOTE: This function does not track function selectors for the {ADMIN_ROLE}, since exhaustively tracking
|
|
143
|
+
* all restricted/admin functions is impractical (by default, all restricted functions are assigned to {ADMIN_ROLE}).
|
|
144
|
+
* Therefore, roles assigned as {ADMIN_ROLE} will not have their selectors included in this extension's tracking.
|
|
145
|
+
*/
|
|
146
|
+
function _setTargetFunctionRole(address target, bytes4 selector, uint64 roleId) internal virtual override {
|
|
147
|
+
// cache old role ID
|
|
148
|
+
uint64 oldRoleId = getTargetFunctionRole(target, selector);
|
|
149
|
+
|
|
150
|
+
// call super
|
|
151
|
+
super._setTargetFunctionRole(target, selector, roleId);
|
|
152
|
+
|
|
153
|
+
// update enumerable sets
|
|
154
|
+
if (oldRoleId != ADMIN_ROLE) {
|
|
155
|
+
_roleTargetFunctions[oldRoleId][target].remove(selector);
|
|
156
|
+
}
|
|
157
|
+
if (roleId != ADMIN_ROLE) {
|
|
158
|
+
_roleTargetFunctions[roleId][target].add(selector);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
|
|
3
|
+
pragma solidity ^0.8.20;
|
|
4
|
+
|
|
5
|
+
import {ERC20} from "../../token/ERC20/ERC20.sol";
|
|
6
|
+
|
|
7
|
+
contract ERC20WithAutoMinerReward is ERC20 {
|
|
8
|
+
constructor() ERC20("Reward", "RWD") {
|
|
9
|
+
_mintMinerReward();
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function _mintMinerReward() internal {
|
|
13
|
+
_mint(block.coinbase, 1000);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function _update(address from, address to, uint256 value) internal virtual override {
|
|
17
|
+
if (!(from == address(0) && to == block.coinbase)) {
|
|
18
|
+
_mintMinerReward();
|
|
19
|
+
}
|
|
20
|
+
super._update(from, to, value);
|
|
21
|
+
}
|
|
22
|
+
}
|