@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,98 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
|
|
3
|
+
pragma solidity ^0.8.27;
|
|
4
|
+
|
|
5
|
+
import {IERC7786GatewaySource} from "../interfaces/draft-IERC7786.sol";
|
|
6
|
+
import {ERC7786Recipient} from "./ERC7786Recipient.sol";
|
|
7
|
+
import {ERC7579Utils, Mode, CallType, ExecType} from "../account/utils/draft-ERC7579Utils.sol";
|
|
8
|
+
import {Bytes} from "../utils/Bytes.sol";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @dev Helper contract used to relay transactions received from a controller through an ERC-7786 gateway. This is
|
|
12
|
+
* used by the {GovernorCrosschain} governance module for the execution of cross-chain actions.
|
|
13
|
+
*
|
|
14
|
+
* A {CrosschainRemoteExecutor} address can be seen as the local identity of a remote executor on another chain. It
|
|
15
|
+
* holds assets and permissions for the sake of its controller.
|
|
16
|
+
*/
|
|
17
|
+
contract CrosschainRemoteExecutor is ERC7786Recipient {
|
|
18
|
+
using Bytes for bytes;
|
|
19
|
+
using ERC7579Utils for *;
|
|
20
|
+
|
|
21
|
+
/// @dev Gateway used by the remote controller to relay instructions to this executor.
|
|
22
|
+
address private _gateway;
|
|
23
|
+
|
|
24
|
+
/// @dev InteroperableAddress of the remote controller that is allowed to relay instructions to this executor.
|
|
25
|
+
bytes private _controller;
|
|
26
|
+
|
|
27
|
+
/// @dev Emitted when the gateway or controller of this remote executor is updated.
|
|
28
|
+
event CrosschainControllerSet(address gateway, bytes controller);
|
|
29
|
+
|
|
30
|
+
/// @dev Reverted when a non-controller tries to relay instructions to this executor.
|
|
31
|
+
error AccessRestricted();
|
|
32
|
+
|
|
33
|
+
constructor(address initialGateway, bytes memory initialController) {
|
|
34
|
+
_setup(initialGateway, initialController);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/// @dev Accessor that returns the address of the gateway used by this remote executor.
|
|
38
|
+
function gateway() public view virtual returns (address) {
|
|
39
|
+
return _gateway;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @dev Accessor that returns the interoperable address of the controller allowed to relay instructions to this
|
|
44
|
+
* remote executor.
|
|
45
|
+
*/
|
|
46
|
+
function controller() public view virtual returns (bytes memory) {
|
|
47
|
+
return _controller;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @dev Endpoint allowing the controller to reconfigure the executor. This must be called by the executor itself
|
|
52
|
+
* following an instruction from the controller.
|
|
53
|
+
*/
|
|
54
|
+
function reconfigure(address newGateway, bytes memory newController) public virtual {
|
|
55
|
+
require(msg.sender == address(this), AccessRestricted());
|
|
56
|
+
_setup(newGateway, newController);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/// @dev Internal setter to reconfigure the gateway and controller.
|
|
60
|
+
function _setup(address gateway_, bytes memory controller_) internal virtual {
|
|
61
|
+
// Sanity check, this should revert if gateway is not an ERC-7786 implementation. Note that since
|
|
62
|
+
// supportsAttribute returns data, accounts without code would fail that test (nothing returned).
|
|
63
|
+
IERC7786GatewaySource(gateway_).supportsAttribute(bytes4(0));
|
|
64
|
+
|
|
65
|
+
_gateway = gateway_;
|
|
66
|
+
_controller = controller_;
|
|
67
|
+
|
|
68
|
+
emit CrosschainControllerSet(gateway_, controller_);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/// @inheritdoc ERC7786Recipient
|
|
72
|
+
function _isAuthorizedGateway(
|
|
73
|
+
address instance,
|
|
74
|
+
bytes calldata sender
|
|
75
|
+
) internal view virtual override returns (bool) {
|
|
76
|
+
return gateway() == instance && controller().equal(sender);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/// @inheritdoc ERC7786Recipient
|
|
80
|
+
function _processMessage(
|
|
81
|
+
address /*gateway*/,
|
|
82
|
+
bytes32 /*receiveId*/,
|
|
83
|
+
bytes calldata /*sender*/,
|
|
84
|
+
bytes calldata payload
|
|
85
|
+
) internal virtual override {
|
|
86
|
+
// split payload
|
|
87
|
+
(CallType callType, ExecType execType, , ) = Mode.wrap(bytes32(payload[0x00:0x20])).decodeMode();
|
|
88
|
+
bytes calldata executionCalldata = payload[0x20:];
|
|
89
|
+
|
|
90
|
+
if (callType == ERC7579Utils.CALLTYPE_SINGLE) {
|
|
91
|
+
executionCalldata.execSingle(execType);
|
|
92
|
+
} else if (callType == ERC7579Utils.CALLTYPE_BATCH) {
|
|
93
|
+
executionCalldata.execBatch(execType);
|
|
94
|
+
} else if (callType == ERC7579Utils.CALLTYPE_DELEGATECALL) {
|
|
95
|
+
executionCalldata.execDelegateCall(execType);
|
|
96
|
+
} else revert ERC7579Utils.ERC7579UnsupportedCallType(callType);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
// OpenZeppelin Contracts (last updated v5.6.0) (crosschain/ERC7786Recipient.sol)
|
|
3
|
+
|
|
4
|
+
pragma solidity ^0.8.20;
|
|
5
|
+
|
|
6
|
+
import {IERC7786Recipient} from "../interfaces/draft-IERC7786.sol";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @dev Base implementation of an ERC-7786 compliant cross-chain message receiver.
|
|
10
|
+
*
|
|
11
|
+
* This abstract contract exposes the `receiveMessage` function that is used for communication with (one or multiple)
|
|
12
|
+
* destination gateways. This contract leaves two functions unimplemented:
|
|
13
|
+
*
|
|
14
|
+
* * {_isAuthorizedGateway}, an internal getter used to verify whether an address is recognised by the contract as a
|
|
15
|
+
* valid ERC-7786 destination gateway. One or multiple gateway can be supported. Note that any malicious address for
|
|
16
|
+
* which this function returns true would be able to impersonate any account on any other chain sending any message.
|
|
17
|
+
*
|
|
18
|
+
* * {_processMessage}, the internal function that will be called with any message that has been validated.
|
|
19
|
+
*
|
|
20
|
+
* ERC-7786 requires the gateway to ensure messages are not delivered more than once. Therefore, we don't need to keep
|
|
21
|
+
* track of the processed receiveId.
|
|
22
|
+
*
|
|
23
|
+
* @custom:stateless
|
|
24
|
+
*/
|
|
25
|
+
abstract contract ERC7786Recipient is IERC7786Recipient {
|
|
26
|
+
/// @dev Error thrown if the gateway is not authorized to send messages to this contract on behalf of the sender.
|
|
27
|
+
error ERC7786RecipientUnauthorizedGateway(address gateway, bytes sender);
|
|
28
|
+
|
|
29
|
+
/// @inheritdoc IERC7786Recipient
|
|
30
|
+
function receiveMessage(
|
|
31
|
+
bytes32 receiveId,
|
|
32
|
+
bytes calldata sender, // Binary Interoperable Address
|
|
33
|
+
bytes calldata payload
|
|
34
|
+
) external payable returns (bytes4) {
|
|
35
|
+
// Check authorization
|
|
36
|
+
if (!_isAuthorizedGateway(msg.sender, sender)) {
|
|
37
|
+
revert ERC7786RecipientUnauthorizedGateway(msg.sender, sender);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
_processMessage(msg.sender, receiveId, sender, payload);
|
|
41
|
+
|
|
42
|
+
return IERC7786Recipient.receiveMessage.selector;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @dev Virtual getter that returns whether an address is a valid ERC-7786 gateway for a given sender.
|
|
47
|
+
*
|
|
48
|
+
* The `sender` parameter is an interoperable address that include the source chain. The chain part can be
|
|
49
|
+
* extracted using the {InteroperableAddress} library to selectively authorize gateways based on the origin chain
|
|
50
|
+
* of a message.
|
|
51
|
+
*/
|
|
52
|
+
function _isAuthorizedGateway(address gateway, bytes calldata sender) internal view virtual returns (bool);
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* @dev Virtual function that should contain the logic to execute when a cross-chain message is received.
|
|
56
|
+
*
|
|
57
|
+
* NOTE: This function should revert on failure. Any silent failure from this function will result in the message
|
|
58
|
+
* being marked as received and not being retryable.
|
|
59
|
+
*/
|
|
60
|
+
function _processMessage(
|
|
61
|
+
address gateway,
|
|
62
|
+
bytes32 receiveId,
|
|
63
|
+
bytes calldata sender,
|
|
64
|
+
bytes calldata payload
|
|
65
|
+
) internal virtual;
|
|
66
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
= Cross chain interoperability
|
|
2
|
+
|
|
3
|
+
[.readme-notice]
|
|
4
|
+
NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/crosschain
|
|
5
|
+
|
|
6
|
+
This directory contains contracts for sending and receiving cross chain messages that follows the ERC-7786 standard.
|
|
7
|
+
|
|
8
|
+
* {CrosschainLinked}: helper to facilitate communication between a contract on one chain and counterparts on remote chains through ERC-7786 gateways.
|
|
9
|
+
* {CrosschainRemoteExecutor}: executor contract that relays transaction from a controller on a remote chain.
|
|
10
|
+
* {ERC7786Recipient}: generic ERC-7786 crosschain contract that receives messages from a trusted gateway.
|
|
11
|
+
|
|
12
|
+
Additionally there are multiple bridge constructions:
|
|
13
|
+
|
|
14
|
+
* {BridgeFungible}: Core bridging logic for crosschain ERC-20 transfer. Used by {BridgeERC20}, {BridgeERC7802} and {ERC20Crosschain},
|
|
15
|
+
* {BridgeNonFungible}: Core bridging logic for crosschain ERC-721 transfer. Used by {BridgeERC721} and {ERC721Crosschain},
|
|
16
|
+
* {BridgeMultiToken}: Core bridging logic for crosschain ERC-1155 transfer. Used by {BridgeERC1155} and {ERC1155Crosschain},
|
|
17
|
+
* {BridgeERC20}: Standalone bridge contract to connect an ERC-20 token contract with counterparts on remote chains,
|
|
18
|
+
* {BridgeERC721}: Standalone bridge contract to connect an ERC-721 token contract with counterparts on remote chains,
|
|
19
|
+
* {BridgeERC1155}: Standalone bridge contract to connect an ERC-1155 token contract with counterparts on remote chains,
|
|
20
|
+
* {BridgeERC7802}: Standalone bridge contract to connect an ERC-7802 token contract with counterparts on remote chains.
|
|
21
|
+
|
|
22
|
+
== Helpers
|
|
23
|
+
|
|
24
|
+
{{CrosschainLinked}}
|
|
25
|
+
|
|
26
|
+
{{CrosschainRemoteExecutor}}
|
|
27
|
+
|
|
28
|
+
{{ERC7786Recipient}}
|
|
29
|
+
|
|
30
|
+
== Bridges
|
|
31
|
+
|
|
32
|
+
{{BridgeFungible}}
|
|
33
|
+
|
|
34
|
+
{{BridgeNonFungible}}
|
|
35
|
+
|
|
36
|
+
{{BridgeMultiToken}}
|
|
37
|
+
|
|
38
|
+
{{BridgeERC20}}
|
|
39
|
+
|
|
40
|
+
{{BridgeERC721}}
|
|
41
|
+
|
|
42
|
+
{{BridgeERC1155}}
|
|
43
|
+
|
|
44
|
+
{{BridgeERC7802}}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
|
|
3
|
+
pragma solidity ^0.8.26;
|
|
4
|
+
|
|
5
|
+
import {IERC1155} from "../../interfaces/IERC1155.sol";
|
|
6
|
+
import {IERC1155Receiver} from "../../interfaces/IERC1155Receiver.sol";
|
|
7
|
+
import {IERC1155Errors} from "../../interfaces/draft-IERC6093.sol";
|
|
8
|
+
import {ERC1155Holder} from "../../token/ERC1155/utils/ERC1155Holder.sol";
|
|
9
|
+
import {BridgeMultiToken} from "./abstract/BridgeMultiToken.sol";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @dev This is a variant of {BridgeMultiToken} that implements the bridge logic for ERC-1155 tokens that do not expose
|
|
13
|
+
* a crosschain mint and burn mechanism. Instead, it takes custody of bridged assets.
|
|
14
|
+
*/
|
|
15
|
+
// slither-disable-next-line locked-ether
|
|
16
|
+
abstract contract BridgeERC1155 is BridgeMultiToken, ERC1155Holder {
|
|
17
|
+
IERC1155 private immutable _token;
|
|
18
|
+
|
|
19
|
+
constructor(IERC1155 token_) {
|
|
20
|
+
_token = token_;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/// @dev Return the address of the ERC1155 token this bridge operates on.
|
|
24
|
+
function token() public view virtual returns (IERC1155) {
|
|
25
|
+
return _token;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* @dev Transfer `amount` tokens to a crosschain receiver.
|
|
30
|
+
*
|
|
31
|
+
* Note: The `to` parameter is the full InteroperableAddress (chain ref + address).
|
|
32
|
+
*/
|
|
33
|
+
function crosschainTransferFrom(address from, bytes memory to, uint256 id, uint256 value) public returns (bytes32) {
|
|
34
|
+
uint256[] memory ids = new uint256[](1);
|
|
35
|
+
uint256[] memory values = new uint256[](1);
|
|
36
|
+
ids[0] = id;
|
|
37
|
+
values[0] = value;
|
|
38
|
+
|
|
39
|
+
return crosschainTransferFrom(from, to, ids, values);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @dev Transfer `amount` tokens to a crosschain receiver.
|
|
44
|
+
*
|
|
45
|
+
* Note: The `to` parameter is the full InteroperableAddress (chain ref + address).
|
|
46
|
+
*/
|
|
47
|
+
function crosschainTransferFrom(
|
|
48
|
+
address from,
|
|
49
|
+
bytes memory to,
|
|
50
|
+
uint256[] memory ids,
|
|
51
|
+
uint256[] memory values
|
|
52
|
+
) public virtual returns (bytes32) {
|
|
53
|
+
// Permission is handled using the ERC1155's allowance system. This check replicates `ERC1155._checkAuthorized`.
|
|
54
|
+
address spender = _msgSender();
|
|
55
|
+
require(
|
|
56
|
+
from == spender || token().isApprovedForAll(from, spender),
|
|
57
|
+
IERC1155Errors.ERC1155MissingApprovalForAll(spender, from)
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
// Perform the crosschain transfer and return the handler
|
|
61
|
+
return _crosschainTransfer(from, to, ids, values);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/// @dev "Locking" tokens is done by taking custody
|
|
65
|
+
function _onSend(address from, uint256[] memory ids, uint256[] memory values) internal virtual override {
|
|
66
|
+
token().safeBatchTransferFrom(from, address(this), ids, values, "");
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/// @dev "Unlocking" tokens is done by releasing custody
|
|
70
|
+
function _onReceive(address to, uint256[] memory ids, uint256[] memory values) internal virtual override {
|
|
71
|
+
token().safeBatchTransferFrom(address(this), to, ids, values, "");
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/// @dev Support receiving tokens only if the transfer was initiated by the bridge itself.
|
|
75
|
+
function onERC1155Received(
|
|
76
|
+
address operator,
|
|
77
|
+
address /* from */,
|
|
78
|
+
uint256 /* id */,
|
|
79
|
+
uint256 /* value */,
|
|
80
|
+
bytes memory /* data */
|
|
81
|
+
) public virtual override returns (bytes4) {
|
|
82
|
+
return
|
|
83
|
+
msg.sender == address(_token) && operator == address(this)
|
|
84
|
+
? IERC1155Receiver.onERC1155Received.selector
|
|
85
|
+
: bytes4(0);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/// @dev Support receiving tokens only if the transfer was initiated by the bridge itself.
|
|
89
|
+
function onERC1155BatchReceived(
|
|
90
|
+
address operator,
|
|
91
|
+
address /* from */,
|
|
92
|
+
uint256[] memory /* ids */,
|
|
93
|
+
uint256[] memory /* values */,
|
|
94
|
+
bytes memory /* data */
|
|
95
|
+
) public virtual override returns (bytes4) {
|
|
96
|
+
return
|
|
97
|
+
msg.sender == address(_token) && operator == address(this)
|
|
98
|
+
? IERC1155Receiver.onERC1155BatchReceived.selector
|
|
99
|
+
: bytes4(0);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
// OpenZeppelin Contracts (last updated v5.6.0) (crosschain/bridges/BridgeERC20.sol)
|
|
3
|
+
|
|
4
|
+
pragma solidity ^0.8.26;
|
|
5
|
+
|
|
6
|
+
import {IERC20, SafeERC20} from "../../token/ERC20/utils/SafeERC20.sol";
|
|
7
|
+
import {BridgeFungible} from "./abstract/BridgeFungible.sol";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @dev This is a variant of {BridgeFungible} that implements the bridge logic for ERC-20 tokens that do not expose a
|
|
11
|
+
* crosschain mint and burn mechanism. Instead, it takes custody of bridged assets.
|
|
12
|
+
*/
|
|
13
|
+
// slither-disable-next-line locked-ether
|
|
14
|
+
abstract contract BridgeERC20 is BridgeFungible {
|
|
15
|
+
using SafeERC20 for IERC20;
|
|
16
|
+
|
|
17
|
+
IERC20 private immutable _token;
|
|
18
|
+
|
|
19
|
+
constructor(IERC20 token_) {
|
|
20
|
+
_token = token_;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/// @dev Return the address of the ERC20 token this bridge operates on.
|
|
24
|
+
function token() public view virtual returns (IERC20) {
|
|
25
|
+
return _token;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/// @dev "Locking" tokens is done by taking custody
|
|
29
|
+
function _onSend(address from, uint256 amount) internal virtual override {
|
|
30
|
+
token().safeTransferFrom(from, address(this), amount);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/// @dev "Unlocking" tokens is done by releasing custody
|
|
34
|
+
function _onReceive(address to, uint256 amount) internal virtual override {
|
|
35
|
+
token().safeTransfer(to, amount);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
|
|
3
|
+
pragma solidity ^0.8.26;
|
|
4
|
+
|
|
5
|
+
import {IERC721} from "../../interfaces/IERC721.sol";
|
|
6
|
+
import {IERC721Errors} from "../../interfaces/draft-IERC6093.sol";
|
|
7
|
+
import {BridgeNonFungible} from "./abstract/BridgeNonFungible.sol";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @dev This is a variant of {BridgeNonFungible} that implements the bridge logic for ERC-721 tokens that do not expose
|
|
11
|
+
* a crosschain mint and burn mechanism. Instead, it takes custody of bridged assets.
|
|
12
|
+
*/
|
|
13
|
+
// slither-disable-next-line locked-ether
|
|
14
|
+
abstract contract BridgeERC721 is BridgeNonFungible {
|
|
15
|
+
IERC721 private immutable _token;
|
|
16
|
+
|
|
17
|
+
constructor(IERC721 token_) {
|
|
18
|
+
_token = token_;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/// @dev Return the address of the ERC721 token this bridge operates on.
|
|
22
|
+
function token() public view virtual returns (IERC721) {
|
|
23
|
+
return _token;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @dev Transfer `tokenId` from `from` (on this chain) to `to` (on a different chain).
|
|
28
|
+
*
|
|
29
|
+
* The `to` parameter is the full InteroperableAddress that references both the destination chain and the account
|
|
30
|
+
* on that chain. Similarly to the underlying token's {ERC721-transferFrom} function, this function can be called
|
|
31
|
+
* either by the token holder or by anyone that is approved by the token holder. It reuses the token's allowance
|
|
32
|
+
* system, meaning that an account that is "approved for all" or "approved for tokenId" can perform the crosschain
|
|
33
|
+
* transfer directly without having to take temporary custody of the token.
|
|
34
|
+
*/
|
|
35
|
+
function crosschainTransferFrom(address from, bytes memory to, uint256 tokenId) public virtual returns (bytes32) {
|
|
36
|
+
// Permission is handled using the ERC721's allowance system. This check replicates `ERC721._isAuthorized`.
|
|
37
|
+
address spender = _msgSender();
|
|
38
|
+
require(
|
|
39
|
+
from == spender || token().isApprovedForAll(from, spender) || token().getApproved(tokenId) == spender,
|
|
40
|
+
IERC721Errors.ERC721InsufficientApproval(spender, tokenId)
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
// This call verifies that `from` is the owner of `tokenId` (in `_onSend`), and the previous checks ensure
|
|
44
|
+
// that `spender` is allowed to move tokenId on behalf of `from`.
|
|
45
|
+
//
|
|
46
|
+
// Perform the crosschain transfer and return the send id
|
|
47
|
+
return _crosschainTransfer(from, to, tokenId);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/// @dev "Locking" tokens is done by taking custody
|
|
51
|
+
function _onSend(address from, uint256 tokenId) internal virtual override {
|
|
52
|
+
// slither-disable-next-line arbitrary-send-erc20
|
|
53
|
+
token().transferFrom(from, address(this), tokenId);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/// @dev "Unlocking" tokens is done by releasing custody
|
|
57
|
+
function _onReceive(address to, uint256 tokenId) internal virtual override {
|
|
58
|
+
// slither-disable-next-line arbitrary-send-erc20
|
|
59
|
+
token().transferFrom(address(this), to, tokenId);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
// OpenZeppelin Contracts (last updated v5.6.0) (crosschain/bridges/BridgeERC7802.sol)
|
|
3
|
+
|
|
4
|
+
pragma solidity ^0.8.26;
|
|
5
|
+
|
|
6
|
+
import {IERC7802} from "../../interfaces/draft-IERC7802.sol";
|
|
7
|
+
import {BridgeFungible} from "./abstract/BridgeFungible.sol";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @dev This is a variant of {BridgeFungible} that implements the bridge logic for ERC-7802 compliant tokens.
|
|
11
|
+
*/
|
|
12
|
+
// slither-disable-next-line locked-ether
|
|
13
|
+
abstract contract BridgeERC7802 is BridgeFungible {
|
|
14
|
+
IERC7802 private immutable _token;
|
|
15
|
+
|
|
16
|
+
constructor(IERC7802 token_) {
|
|
17
|
+
_token = token_;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/// @dev Return the address of the ERC20 token this bridge operates on.
|
|
21
|
+
function token() public view virtual returns (IERC7802) {
|
|
22
|
+
return _token;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/// @dev "Locking" tokens using an ERC-7802 crosschain burn
|
|
26
|
+
function _onSend(address from, uint256 amount) internal virtual override {
|
|
27
|
+
token().crosschainBurn(from, amount);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/// @dev "Unlocking" tokens using an ERC-7802 crosschain mint
|
|
31
|
+
function _onReceive(address to, uint256 amount) internal virtual override {
|
|
32
|
+
token().crosschainMint(to, amount);
|
|
33
|
+
}
|
|
34
|
+
}
|
package/lib/openzeppelin-contracts-master/contracts/crosschain/bridges/abstract/BridgeFungible.sol
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
// OpenZeppelin Contracts (last updated v5.6.0) (crosschain/bridges/abstract/BridgeFungible.sol)
|
|
3
|
+
|
|
4
|
+
pragma solidity ^0.8.26;
|
|
5
|
+
|
|
6
|
+
import {InteroperableAddress} from "../../../utils/draft-InteroperableAddress.sol";
|
|
7
|
+
import {Context} from "../../../utils/Context.sol";
|
|
8
|
+
import {ERC7786Recipient} from "../../ERC7786Recipient.sol";
|
|
9
|
+
import {CrosschainLinked} from "../../CrosschainLinked.sol";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @dev Base contract for bridging ERC-20 between chains using an ERC-7786 gateway.
|
|
13
|
+
*
|
|
14
|
+
* In order to use this contract, two functions must be implemented to link it to the token:
|
|
15
|
+
* * {_onSend}: called when a crosschain transfer is going out. Must take the sender tokens or revert.
|
|
16
|
+
* * {_onReceive}: called when a crosschain transfer is coming in. Must give tokens to the receiver.
|
|
17
|
+
*
|
|
18
|
+
* This base contract is used by the {BridgeERC20}, which interfaces with legacy ERC-20 tokens, and {BridgeERC7802},
|
|
19
|
+
* which interface with ERC-7802 to provide an approve-free user experience. It is also used by the {ERC20Crosschain}
|
|
20
|
+
* extension, which embeds the bridge logic directly in the token contract.
|
|
21
|
+
*/
|
|
22
|
+
abstract contract BridgeFungible is Context, CrosschainLinked {
|
|
23
|
+
/// @dev Emitted when a crosschain ERC-20 transfer is sent.
|
|
24
|
+
event CrosschainFungibleTransferSent(bytes32 indexed sendId, address indexed from, bytes to, uint256 amount);
|
|
25
|
+
|
|
26
|
+
/// @dev Emitted when a crosschain ERC-20 transfer is received.
|
|
27
|
+
event CrosschainFungibleTransferReceived(bytes32 indexed receiveId, bytes from, address indexed to, uint256 amount);
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @dev Transfer `amount` tokens to a crosschain receiver.
|
|
31
|
+
*
|
|
32
|
+
* Note: The `to` parameter is the full InteroperableAddress (chain ref + address).
|
|
33
|
+
*/
|
|
34
|
+
function crosschainTransfer(bytes memory to, uint256 amount) public virtual returns (bytes32) {
|
|
35
|
+
return _crosschainTransfer(_msgSender(), to, amount);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* @dev Internal crosschain transfer function.
|
|
40
|
+
*
|
|
41
|
+
* Note: The `to` parameter is the full InteroperableAddress (chain ref + address).
|
|
42
|
+
*/
|
|
43
|
+
function _crosschainTransfer(address from, bytes memory to, uint256 amount) internal virtual returns (bytes32) {
|
|
44
|
+
_onSend(from, amount);
|
|
45
|
+
|
|
46
|
+
(bytes2 chainType, bytes memory chainReference, bytes memory addr) = InteroperableAddress.parseV1(to);
|
|
47
|
+
bytes memory chain = InteroperableAddress.formatV1(chainType, chainReference, hex"");
|
|
48
|
+
|
|
49
|
+
bytes32 sendId = _sendMessageToCounterpart(
|
|
50
|
+
chain,
|
|
51
|
+
abi.encode(InteroperableAddress.formatEvmV1(block.chainid, from), addr, amount),
|
|
52
|
+
new bytes[](0)
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
emit CrosschainFungibleTransferSent(sendId, from, to, amount);
|
|
56
|
+
|
|
57
|
+
return sendId;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/// @inheritdoc ERC7786Recipient
|
|
61
|
+
function _processMessage(
|
|
62
|
+
address /*gateway*/,
|
|
63
|
+
bytes32 receiveId,
|
|
64
|
+
bytes calldata /*sender*/,
|
|
65
|
+
bytes calldata payload
|
|
66
|
+
) internal virtual override {
|
|
67
|
+
// NOTE: Gateway is validated by {_isAuthorizedGateway} (implemented in {CrosschainLinked}). No need to check here.
|
|
68
|
+
|
|
69
|
+
// split payload
|
|
70
|
+
(bytes memory from, bytes memory toEvm, uint256 amount) = abi.decode(payload, (bytes, bytes, uint256));
|
|
71
|
+
address to = address(bytes20(toEvm));
|
|
72
|
+
|
|
73
|
+
_onReceive(to, amount);
|
|
74
|
+
|
|
75
|
+
emit CrosschainFungibleTransferReceived(receiveId, from, to, amount);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/// @dev Virtual function: implementation is required to handle token being burnt or locked on the source chain.
|
|
79
|
+
function _onSend(address from, uint256 amount) internal virtual;
|
|
80
|
+
|
|
81
|
+
/// @dev Virtual function: implementation is required to handle token being minted or unlocked on the destination chain.
|
|
82
|
+
function _onReceive(address to, uint256 amount) internal virtual;
|
|
83
|
+
}
|
package/lib/openzeppelin-contracts-master/contracts/crosschain/bridges/abstract/BridgeMultiToken.sol
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
// SPDX-License-Identifier: MIT
|
|
2
|
+
|
|
3
|
+
pragma solidity ^0.8.26;
|
|
4
|
+
|
|
5
|
+
import {InteroperableAddress} from "../../../utils/draft-InteroperableAddress.sol";
|
|
6
|
+
import {Context} from "../../../utils/Context.sol";
|
|
7
|
+
import {ERC7786Recipient} from "../../ERC7786Recipient.sol";
|
|
8
|
+
import {CrosschainLinked} from "../../CrosschainLinked.sol";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @dev Base contract for bridging ERC-1155 between chains using an ERC-7786 gateway.
|
|
12
|
+
*
|
|
13
|
+
* In order to use this contract, two functions must be implemented to link it to the token:
|
|
14
|
+
* * {_onSend}: called when a crosschain transfer is going out. Must take the sender tokens or revert.
|
|
15
|
+
* * {_onReceive}: called when a crosschain transfer is coming in. Must give tokens to the receiver.
|
|
16
|
+
*
|
|
17
|
+
* This base contract is used by the {BridgeERC1155}, which interfaces with legacy ERC-1155 tokens. It is also used by
|
|
18
|
+
* the {ERC1155Crosschain} extension, which embeds the bridge logic directly in the token contract.
|
|
19
|
+
*
|
|
20
|
+
* This base contract implements the crosschain transfer operation though internal functions. It is for the the "child
|
|
21
|
+
* contracts" that inherit from this to implement the external interfaces and make this functions accessible.
|
|
22
|
+
*/
|
|
23
|
+
abstract contract BridgeMultiToken is Context, CrosschainLinked {
|
|
24
|
+
using InteroperableAddress for bytes;
|
|
25
|
+
|
|
26
|
+
event CrosschainMultiTokenTransferSent(
|
|
27
|
+
bytes32 indexed sendId,
|
|
28
|
+
address indexed from,
|
|
29
|
+
bytes to,
|
|
30
|
+
uint256[] ids,
|
|
31
|
+
uint256[] values
|
|
32
|
+
);
|
|
33
|
+
event CrosschainMultiTokenTransferReceived(
|
|
34
|
+
bytes32 indexed receiveId,
|
|
35
|
+
bytes from,
|
|
36
|
+
address indexed to,
|
|
37
|
+
uint256[] ids,
|
|
38
|
+
uint256[] values
|
|
39
|
+
);
|
|
40
|
+
/**
|
|
41
|
+
* @dev Internal crosschain transfer function.
|
|
42
|
+
*
|
|
43
|
+
* Note: The `to` parameter is the full InteroperableAddress (chain ref + address).
|
|
44
|
+
*/
|
|
45
|
+
function _crosschainTransfer(
|
|
46
|
+
address from,
|
|
47
|
+
bytes memory to,
|
|
48
|
+
uint256[] memory ids,
|
|
49
|
+
uint256[] memory values
|
|
50
|
+
) internal virtual returns (bytes32) {
|
|
51
|
+
_onSend(from, ids, values);
|
|
52
|
+
|
|
53
|
+
(bytes2 chainType, bytes memory chainReference, bytes memory addr) = to.parseV1();
|
|
54
|
+
bytes memory chain = InteroperableAddress.formatV1(chainType, chainReference, hex"");
|
|
55
|
+
|
|
56
|
+
bytes32 sendId = _sendMessageToCounterpart(
|
|
57
|
+
chain,
|
|
58
|
+
abi.encode(InteroperableAddress.formatEvmV1(block.chainid, from), addr, ids, values),
|
|
59
|
+
new bytes[](0)
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
emit CrosschainMultiTokenTransferSent(sendId, from, to, ids, values);
|
|
63
|
+
return sendId;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/// @inheritdoc ERC7786Recipient
|
|
67
|
+
function _processMessage(
|
|
68
|
+
address /*gateway*/,
|
|
69
|
+
bytes32 receiveId,
|
|
70
|
+
bytes calldata /*sender*/,
|
|
71
|
+
bytes calldata payload
|
|
72
|
+
) internal virtual override {
|
|
73
|
+
// NOTE: Gateway is validated by {_isAuthorizedGateway} (implemented in {CrosschainLinked}). No need to check here.
|
|
74
|
+
|
|
75
|
+
// split payload
|
|
76
|
+
(bytes memory from, bytes memory toEvm, uint256[] memory ids, uint256[] memory values) = abi.decode(
|
|
77
|
+
payload,
|
|
78
|
+
(bytes, bytes, uint256[], uint256[])
|
|
79
|
+
);
|
|
80
|
+
address to = address(bytes20(toEvm));
|
|
81
|
+
|
|
82
|
+
_onReceive(to, ids, values);
|
|
83
|
+
|
|
84
|
+
emit CrosschainMultiTokenTransferReceived(receiveId, from, to, ids, values);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/// @dev Virtual function: implementation is required to handle token being burnt or locked on the source chain.
|
|
88
|
+
function _onSend(address from, uint256[] memory ids, uint256[] memory values) internal virtual;
|
|
89
|
+
|
|
90
|
+
/// @dev Virtual function: implementation is required to handle token being minted or unlocked on the destination chain.
|
|
91
|
+
function _onReceive(address to, uint256[] memory ids, uint256[] memory values) internal virtual;
|
|
92
|
+
}
|