├── .editorconfig ├── .env.example ├── .github └── workflows │ └── ci.yml ├── .gitignore ├── .gitmodules ├── .prettierignore ├── .prettierrc.yml ├── .solhint.json ├── .vscode └── settings.json ├── EdgelessSystem.png ├── README.md ├── deploy ├── ethereum │ └── 001_deployContracts.ts ├── hardhat │ ├── 001_deployContracts.ts │ └── 003_upgradeTest.ts └── sepolia │ └── 001_deployContracts.ts ├── deployments ├── ethereum │ ├── .chainId │ ├── DefaultProxyAdmin.json │ ├── Edgeless Wrapped ETH.json │ ├── EdgelessDeposit.json │ ├── EdgelessDeposit_Implementation.json │ ├── EdgelessDeposit_Proxy.json │ ├── EthStrategy.json │ ├── EthStrategy_Implementation.json │ ├── EthStrategy_Proxy.json │ ├── StakingManager.json │ ├── StakingManager_Implementation.json │ ├── StakingManager_Proxy.json │ └── solcInputs │ │ ├── 0e89febeebc7444140de8e67c9067d2c.json │ │ ├── 3d27f84411876a15c2c8bf48142f0ed5.json │ │ └── f421dc95f531cba494033b617e562788.json ├── localhost │ ├── .chainId │ ├── DefaultProxyAdmin.json │ ├── Edgeless Wrapped ETH.json │ ├── EdgelessDeposit.json │ ├── EdgelessDeposit_Implementation.json │ ├── EdgelessDeposit_Proxy.json │ ├── EthStrategy.json │ ├── EthStrategy_Implementation.json │ ├── EthStrategy_Proxy.json │ ├── StakingManager.json │ ├── StakingManagerImpl.json │ ├── StakingManager_Implementation.json │ ├── StakingManager_Proxy.json │ └── solcInputs │ │ ├── 0e89febeebc7444140de8e67c9067d2c.json │ │ └── a7ab53fa647a90a5cce3fdffd0462a50.json └── sepolia │ ├── .chainId │ ├── DefaultProxyAdmin.json │ ├── Edgeless Wrapped ETH.json │ ├── EdgelessDeposit.json │ ├── EdgelessDeposit_Implementation.json │ ├── EdgelessDeposit_Proxy.json │ ├── EthStrategy.json │ ├── EthStrategy_Implementation.json │ ├── EthStrategy_Proxy.json │ ├── StakingManager.json │ ├── StakingManager_Implementation.json │ ├── StakingManager_Proxy.json │ └── solcInputs │ ├── 0e89febeebc7444140de8e67c9067d2c.json │ ├── 128f5ce8bbc4a1bd2bd3a13ebc884e10.json │ ├── 3e76a19766a3f9fa51c8c666f66243b3.json │ ├── 404a57e9177115a388da0654e3829a4b.json │ ├── 60d155b7606fab173f7ddb8171c4be14.json │ ├── 6c7bcbe29db666fd1768421419059f81.json │ ├── 6cde7f6378c2716e46539fff4ae0ba3f.json │ ├── 863611cf67f114d731aac8faef38e4b0.json │ ├── 8f10f434668bf799780fea01a11e23c1.json │ ├── a0de7a2d6217c75d2749096ad9c5ae7b.json │ ├── a709620ecb91c8b632d6e820ec22b7e7.json │ ├── a7ab53fa647a90a5cce3fdffd0462a50.json │ └── bf8b7a727f3a5ac94bb63e86a91c9300.json ├── foundry.toml ├── hardhat.config.ts ├── lib ├── forge-std │ ├── .github │ │ └── workflows │ │ │ ├── ci.yml │ │ │ └── sync.yml │ ├── .gitignore │ ├── .gitmodules │ ├── LICENSE-APACHE │ ├── LICENSE-MIT │ ├── README.md │ ├── foundry.toml │ ├── lib │ │ └── ds-test │ │ │ ├── .github │ │ │ └── workflows │ │ │ │ └── build.yml │ │ │ ├── .gitignore │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── default.nix │ │ │ ├── demo │ │ │ └── demo.sol │ │ │ ├── package.json │ │ │ └── src │ │ │ ├── test.sol │ │ │ └── test.t.sol │ ├── package.json │ ├── src │ │ ├── Base.sol │ │ ├── Script.sol │ │ ├── StdAssertions.sol │ │ ├── StdChains.sol │ │ ├── StdCheats.sol │ │ ├── StdError.sol │ │ ├── StdInvariant.sol │ │ ├── StdJson.sol │ │ ├── StdMath.sol │ │ ├── StdStorage.sol │ │ ├── StdStyle.sol │ │ ├── StdUtils.sol │ │ ├── Test.sol │ │ ├── Vm.sol │ │ ├── console.sol │ │ ├── console2.sol │ │ ├── interfaces │ │ │ ├── IERC1155.sol │ │ │ ├── IERC165.sol │ │ │ ├── IERC20.sol │ │ │ ├── IERC4626.sol │ │ │ ├── IERC721.sol │ │ │ └── IMulticall3.sol │ │ ├── mocks │ │ │ ├── MockERC20.sol │ │ │ └── MockERC721.sol │ │ └── safeconsole.sol │ └── test │ │ ├── StdAssertions.t.sol │ │ ├── StdChains.t.sol │ │ ├── StdCheats.t.sol │ │ ├── StdError.t.sol │ │ ├── StdMath.t.sol │ │ ├── StdStorage.t.sol │ │ ├── StdStyle.t.sol │ │ ├── StdUtils.t.sol │ │ ├── Vm.t.sol │ │ ├── compilation │ │ ├── CompilationScript.sol │ │ ├── CompilationScriptBase.sol │ │ ├── CompilationTest.sol │ │ └── CompilationTestBase.sol │ │ ├── fixtures │ │ └── broadcast.log.json │ │ └── mocks │ │ ├── MockERC20.t.sol │ │ └── MockERC721.t.sol ├── openzeppelin-contracts-upgradeable │ ├── .changeset │ │ └── config.json │ ├── .codecov.yml │ ├── .editorconfig │ ├── .eslintrc │ ├── .github │ │ ├── ISSUE_TEMPLATE │ │ │ └── config.yml │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ ├── actions │ │ │ ├── gas-compare │ │ │ │ └── action.yml │ │ │ ├── setup │ │ │ │ └── action.yml │ │ │ └── storage-layout │ │ │ │ └── action.yml │ │ └── workflows │ │ │ ├── actionlint.yml │ │ │ ├── changeset.yml │ │ │ ├── checks.yml │ │ │ ├── docs.yml │ │ │ ├── formal-verification.yml │ │ │ ├── release-cycle.yml │ │ │ └── upgradeable.yml │ ├── .gitignore │ ├── .gitmodules │ ├── .mocharc.js │ ├── .prettierrc │ ├── .solcover.js │ ├── CHANGELOG.md │ ├── CODE_OF_CONDUCT.md │ ├── CONTRIBUTING.md │ ├── GUIDELINES.md │ ├── LICENSE │ ├── README.md │ ├── RELEASING.md │ ├── SECURITY.md │ ├── audits │ │ ├── 2017-03.md │ │ ├── 2018-10.pdf │ │ ├── 2022-10-Checkpoints.pdf │ │ ├── 2022-10-ERC4626.pdf │ │ ├── 2023-05-v4.9.pdf │ │ ├── 2023-10-v5.0.pdf │ │ └── README.md │ ├── certora │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── README.md │ │ ├── diff │ │ │ └── access_manager_AccessManager.sol.patch │ │ ├── harnesses │ │ │ ├── AccessControlDefaultAdminRulesHarness.sol │ │ │ ├── AccessControlHarness.sol │ │ │ ├── DoubleEndedQueueHarness.sol │ │ │ ├── ERC20FlashMintHarness.sol │ │ │ ├── ERC20PermitHarness.sol │ │ │ ├── ERC20WrapperHarness.sol │ │ │ ├── ERC3156FlashBorrowerHarness.sol │ │ │ ├── ERC721Harness.sol │ │ │ ├── ERC721ReceiverHarness.sol │ │ │ ├── EnumerableMapHarness.sol │ │ │ ├── EnumerableSetHarness.sol │ │ │ ├── InitializableHarness.sol │ │ │ ├── Ownable2StepHarness.sol │ │ │ ├── OwnableHarness.sol │ │ │ ├── PausableHarness.sol │ │ │ └── TimelockControllerHarness.sol │ │ ├── reports │ │ │ ├── 2021-10.pdf │ │ │ ├── 2022-03.pdf │ │ │ └── 2022-05.pdf │ │ ├── run.js │ │ ├── specs.json │ │ └── specs │ │ │ ├── AccessControl.spec │ │ │ ├── AccessControlDefaultAdminRules.spec │ │ │ ├── DoubleEndedQueue.spec │ │ │ ├── ERC20.spec │ │ │ ├── ERC20FlashMint.spec │ │ │ ├── ERC20Wrapper.spec │ │ │ ├── ERC721.spec │ │ │ ├── EnumerableMap.spec │ │ │ ├── EnumerableSet.spec │ │ │ ├── Initializable.spec │ │ │ ├── Ownable.spec │ │ │ ├── Ownable2Step.spec │ │ │ ├── Pausable.spec │ │ │ ├── TimelockController.spec │ │ │ ├── helpers │ │ │ └── helpers.spec │ │ │ └── methods │ │ │ ├── IAccessControl.spec │ │ │ ├── IAccessControlDefaultAdminRules.spec │ │ │ ├── IERC20.spec │ │ │ ├── IERC2612.spec │ │ │ ├── IERC3156FlashBorrower.spec │ │ │ ├── IERC3156FlashLender.spec │ │ │ ├── IERC5313.spec │ │ │ ├── IERC721.spec │ │ │ ├── IERC721Receiver.spec │ │ │ ├── IOwnable.spec │ │ │ └── IOwnable2Step.spec │ ├── contracts │ │ ├── access │ │ │ ├── AccessControlUpgradeable.sol │ │ │ ├── Ownable2StepUpgradeable.sol │ │ │ ├── OwnableUpgradeable.sol │ │ │ ├── README.adoc │ │ │ ├── extensions │ │ │ │ ├── AccessControlDefaultAdminRulesUpgradeable.sol │ │ │ │ └── AccessControlEnumerableUpgradeable.sol │ │ │ └── manager │ │ │ │ ├── AccessManagedUpgradeable.sol │ │ │ │ └── AccessManagerUpgradeable.sol │ │ ├── finance │ │ │ ├── README.adoc │ │ │ └── VestingWalletUpgradeable.sol │ │ ├── governance │ │ │ ├── GovernorUpgradeable.sol │ │ │ ├── README.adoc │ │ │ ├── TimelockControllerUpgradeable.sol │ │ │ ├── extensions │ │ │ │ ├── GovernorCountingSimpleUpgradeable.sol │ │ │ │ ├── GovernorPreventLateQuorumUpgradeable.sol │ │ │ │ ├── GovernorSettingsUpgradeable.sol │ │ │ │ ├── GovernorStorageUpgradeable.sol │ │ │ │ ├── GovernorTimelockAccessUpgradeable.sol │ │ │ │ ├── GovernorTimelockCompoundUpgradeable.sol │ │ │ │ ├── GovernorTimelockControlUpgradeable.sol │ │ │ │ ├── GovernorVotesQuorumFractionUpgradeable.sol │ │ │ │ └── GovernorVotesUpgradeable.sol │ │ │ └── utils │ │ │ │ └── VotesUpgradeable.sol │ │ ├── interfaces │ │ │ └── README.adoc │ │ ├── metatx │ │ │ ├── ERC2771ContextUpgradeable.sol │ │ │ ├── ERC2771ForwarderUpgradeable.sol │ │ │ └── README.adoc │ │ ├── mocks │ │ │ ├── AccessManagedTargetUpgradeable.sol │ │ │ ├── ArraysMockUpgradeable.sol │ │ │ ├── AuthorityMockUpgradeable.sol │ │ │ ├── CallReceiverMockUpgradeable.sol │ │ │ ├── ContextMockUpgradeable.sol │ │ │ ├── DummyImplementationUpgradeable.sol │ │ │ ├── EIP712VerifierUpgradeable.sol │ │ │ ├── ERC1271WalletMockUpgradeable.sol │ │ │ ├── ERC165 │ │ │ │ ├── ERC165InterfacesSupportedUpgradeable.sol │ │ │ │ ├── ERC165MaliciousDataUpgradeable.sol │ │ │ │ ├── ERC165MissingDataUpgradeable.sol │ │ │ │ ├── ERC165NotSupportedUpgradeable.sol │ │ │ │ └── ERC165ReturnBombUpgradeable.sol │ │ │ ├── ERC2771ContextMockUpgradeable.sol │ │ │ ├── ERC3156FlashBorrowerMockUpgradeable.sol │ │ │ ├── EtherReceiverMockUpgradeable.sol │ │ │ ├── InitializableMock.sol │ │ │ ├── MulticallTestUpgradeable.sol │ │ │ ├── MultipleInheritanceInitializableMocks.sol │ │ │ ├── PausableMockUpgradeable.sol │ │ │ ├── ReentrancyAttackUpgradeable.sol │ │ │ ├── ReentrancyMockUpgradeable.sol │ │ │ ├── RegressionImplementation.sol │ │ │ ├── SingleInheritanceInitializableMocks.sol │ │ │ ├── StatelessUpgradeable.sol │ │ │ ├── StorageSlotMockUpgradeable.sol │ │ │ ├── TimelockReentrantUpgradeable.sol │ │ │ ├── UpgradeableBeaconMockUpgradeable.sol │ │ │ ├── VotesMockUpgradeable.sol │ │ │ ├── WithInit.sol │ │ │ ├── compound │ │ │ │ └── CompTimelockUpgradeable.sol │ │ │ ├── docs │ │ │ │ ├── ERC20WithAutoMinerRewardUpgradeable.sol │ │ │ │ ├── ERC4626FeesUpgradeable.sol │ │ │ │ ├── access-control │ │ │ │ │ ├── AccessControlERC20MintBaseUpgradeable.sol │ │ │ │ │ ├── AccessControlERC20MintMissingUpgradeable.sol │ │ │ │ │ ├── AccessControlERC20MintOnlyRoleUpgradeable.sol │ │ │ │ │ ├── AccessManagedERC20MintBaseUpgradeable.sol │ │ │ │ │ └── MyContractOwnableUpgradeable.sol │ │ │ │ └── governance │ │ │ │ │ ├── MyGovernorUpgradeable.sol │ │ │ │ │ ├── MyTokenTimestampBasedUpgradeable.sol │ │ │ │ │ ├── MyTokenUpgradeable.sol │ │ │ │ │ └── MyTokenWrappedUpgradeable.sol │ │ │ ├── governance │ │ │ │ ├── GovernorMockUpgradeable.sol │ │ │ │ ├── GovernorPreventLateQuorumMockUpgradeable.sol │ │ │ │ ├── GovernorStorageMockUpgradeable.sol │ │ │ │ ├── GovernorTimelockAccessMockUpgradeable.sol │ │ │ │ ├── GovernorTimelockCompoundMockUpgradeable.sol │ │ │ │ ├── GovernorTimelockControlMockUpgradeable.sol │ │ │ │ ├── GovernorVoteMockUpgradeable.sol │ │ │ │ └── GovernorWithParamsMockUpgradeable.sol │ │ │ ├── proxy │ │ │ │ ├── BadBeaconUpgradeable.sol │ │ │ │ ├── ClashingImplementationUpgradeable.sol │ │ │ │ └── UUPSUpgradeableMockUpgradeable.sol │ │ │ └── token │ │ │ │ ├── ERC1155ReceiverMockUpgradeable.sol │ │ │ │ ├── ERC20ApprovalMockUpgradeable.sol │ │ │ │ ├── ERC20DecimalsMockUpgradeable.sol │ │ │ │ ├── ERC20ExcessDecimalsMockUpgradeable.sol │ │ │ │ ├── ERC20FlashMintMockUpgradeable.sol │ │ │ │ ├── ERC20ForceApproveMockUpgradeable.sol │ │ │ │ ├── ERC20MockUpgradeable.sol │ │ │ │ ├── ERC20MulticallMockUpgradeable.sol │ │ │ │ ├── ERC20NoReturnMockUpgradeable.sol │ │ │ │ ├── ERC20ReentrantUpgradeable.sol │ │ │ │ ├── ERC20ReturnFalseMockUpgradeable.sol │ │ │ │ ├── ERC20VotesLegacyMockUpgradeable.sol │ │ │ │ ├── ERC4626LimitsMockUpgradeable.sol │ │ │ │ ├── ERC4626MockUpgradeable.sol │ │ │ │ ├── ERC4626OffsetMockUpgradeable.sol │ │ │ │ ├── ERC4646FeesMockUpgradeable.sol │ │ │ │ ├── ERC721ConsecutiveEnumerableMockUpgradeable.sol │ │ │ │ ├── ERC721ConsecutiveMockUpgradeable.sol │ │ │ │ ├── ERC721ReceiverMockUpgradeable.sol │ │ │ │ ├── ERC721URIStorageMockUpgradeable.sol │ │ │ │ └── VotesTimestampUpgradeable.sol │ │ ├── package.json │ │ ├── proxy │ │ │ ├── README.adoc │ │ │ └── utils │ │ │ │ ├── Initializable.sol │ │ │ │ └── UUPSUpgradeable.sol │ │ ├── token │ │ │ ├── ERC1155 │ │ │ │ ├── ERC1155Upgradeable.sol │ │ │ │ ├── README.adoc │ │ │ │ ├── extensions │ │ │ │ │ ├── ERC1155BurnableUpgradeable.sol │ │ │ │ │ ├── ERC1155PausableUpgradeable.sol │ │ │ │ │ ├── ERC1155SupplyUpgradeable.sol │ │ │ │ │ └── ERC1155URIStorageUpgradeable.sol │ │ │ │ └── utils │ │ │ │ │ └── ERC1155HolderUpgradeable.sol │ │ │ ├── ERC20 │ │ │ │ ├── ERC20Upgradeable.sol │ │ │ │ ├── README.adoc │ │ │ │ └── extensions │ │ │ │ │ ├── ERC20BurnableUpgradeable.sol │ │ │ │ │ ├── ERC20CappedUpgradeable.sol │ │ │ │ │ ├── ERC20FlashMintUpgradeable.sol │ │ │ │ │ ├── ERC20PausableUpgradeable.sol │ │ │ │ │ ├── ERC20PermitUpgradeable.sol │ │ │ │ │ ├── ERC20VotesUpgradeable.sol │ │ │ │ │ ├── ERC20WrapperUpgradeable.sol │ │ │ │ │ └── ERC4626Upgradeable.sol │ │ │ ├── ERC721 │ │ │ │ ├── ERC721Upgradeable.sol │ │ │ │ ├── README.adoc │ │ │ │ ├── extensions │ │ │ │ │ ├── ERC721BurnableUpgradeable.sol │ │ │ │ │ ├── ERC721ConsecutiveUpgradeable.sol │ │ │ │ │ ├── ERC721EnumerableUpgradeable.sol │ │ │ │ │ ├── ERC721PausableUpgradeable.sol │ │ │ │ │ ├── ERC721RoyaltyUpgradeable.sol │ │ │ │ │ ├── ERC721URIStorageUpgradeable.sol │ │ │ │ │ ├── ERC721VotesUpgradeable.sol │ │ │ │ │ └── ERC721WrapperUpgradeable.sol │ │ │ │ └── utils │ │ │ │ │ └── ERC721HolderUpgradeable.sol │ │ │ └── common │ │ │ │ ├── ERC2981Upgradeable.sol │ │ │ │ └── README.adoc │ │ ├── utils │ │ │ ├── ContextUpgradeable.sol │ │ │ ├── MulticallUpgradeable.sol │ │ │ ├── NoncesUpgradeable.sol │ │ │ ├── PausableUpgradeable.sol │ │ │ ├── README.adoc │ │ │ ├── ReentrancyGuardUpgradeable.sol │ │ │ ├── cryptography │ │ │ │ └── EIP712Upgradeable.sol │ │ │ └── introspection │ │ │ │ └── ERC165Upgradeable.sol │ │ └── vendor │ │ │ └── compound │ │ │ └── LICENSE │ ├── docs │ │ ├── README.md │ │ ├── antora.yml │ │ ├── config.js │ │ ├── modules │ │ │ └── ROOT │ │ │ │ ├── images │ │ │ │ ├── access-control-multiple.svg │ │ │ │ ├── access-manager-functions.svg │ │ │ │ ├── access-manager.svg │ │ │ │ ├── erc4626-attack-3a.png │ │ │ │ ├── erc4626-attack-3b.png │ │ │ │ ├── erc4626-attack-6.png │ │ │ │ ├── erc4626-attack.png │ │ │ │ ├── erc4626-deposit.png │ │ │ │ ├── erc4626-mint.png │ │ │ │ ├── erc4626-rate-linear.png │ │ │ │ ├── erc4626-rate-loglog.png │ │ │ │ ├── erc4626-rate-loglogext.png │ │ │ │ ├── tally-exec.png │ │ │ │ └── tally-vote.png │ │ │ │ ├── nav.adoc │ │ │ │ └── pages │ │ │ │ ├── access-control.adoc │ │ │ │ ├── backwards-compatibility.adoc │ │ │ │ ├── crowdsales.adoc │ │ │ │ ├── drafts.adoc │ │ │ │ ├── erc1155.adoc │ │ │ │ ├── erc20-supply.adoc │ │ │ │ ├── erc20.adoc │ │ │ │ ├── erc4626.adoc │ │ │ │ ├── erc721.adoc │ │ │ │ ├── extending-contracts.adoc │ │ │ │ ├── faq.adoc │ │ │ │ ├── governance.adoc │ │ │ │ ├── index.adoc │ │ │ │ ├── tokens.adoc │ │ │ │ ├── upgradeable.adoc │ │ │ │ ├── utilities.adoc │ │ │ │ └── wizard.adoc │ │ └── templates │ │ │ ├── contract.hbs │ │ │ ├── helpers.js │ │ │ ├── page.hbs │ │ │ └── properties.js │ ├── foundry.toml │ ├── hardhat.config.js │ ├── hardhat │ │ ├── env-artifacts.js │ │ ├── env-contract.js │ │ ├── ignore-unreachable-warnings.js │ │ ├── skip-foundry-tests.js │ │ └── task-test-get-files.js │ ├── lib │ │ ├── erc4626-tests │ │ │ ├── ERC4626.prop.sol │ │ │ ├── ERC4626.test.sol │ │ │ ├── LICENSE │ │ │ └── README.md │ │ ├── forge-std │ │ │ ├── .github │ │ │ │ └── workflows │ │ │ │ │ └── ci.yml │ │ │ ├── .gitignore │ │ │ ├── .gitmodules │ │ │ ├── LICENSE-APACHE │ │ │ ├── LICENSE-MIT │ │ │ ├── README.md │ │ │ ├── foundry.toml │ │ │ ├── lib │ │ │ │ └── ds-test │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── default.nix │ │ │ │ │ ├── demo │ │ │ │ │ └── demo.sol │ │ │ │ │ ├── package.json │ │ │ │ │ └── src │ │ │ │ │ └── test.sol │ │ │ ├── package.json │ │ │ ├── src │ │ │ │ ├── Base.sol │ │ │ │ ├── Script.sol │ │ │ │ ├── StdAssertions.sol │ │ │ │ ├── StdChains.sol │ │ │ │ ├── StdCheats.sol │ │ │ │ ├── StdError.sol │ │ │ │ ├── StdJson.sol │ │ │ │ ├── StdMath.sol │ │ │ │ ├── StdStorage.sol │ │ │ │ ├── StdUtils.sol │ │ │ │ ├── Test.sol │ │ │ │ ├── Vm.sol │ │ │ │ ├── console.sol │ │ │ │ ├── console2.sol │ │ │ │ └── interfaces │ │ │ │ │ ├── IERC1155.sol │ │ │ │ │ ├── IERC165.sol │ │ │ │ │ ├── IERC20.sol │ │ │ │ │ ├── IERC4626.sol │ │ │ │ │ └── IERC721.sol │ │ │ └── test │ │ │ │ ├── StdAssertions.t.sol │ │ │ │ ├── StdChains.t.sol │ │ │ │ ├── StdCheats.t.sol │ │ │ │ ├── StdError.t.sol │ │ │ │ ├── StdMath.t.sol │ │ │ │ ├── StdStorage.t.sol │ │ │ │ ├── StdUtils.t.sol │ │ │ │ ├── compilation │ │ │ │ ├── CompilationScript.sol │ │ │ │ ├── CompilationScriptBase.sol │ │ │ │ ├── CompilationTest.sol │ │ │ │ └── CompilationTestBase.sol │ │ │ │ └── fixtures │ │ │ │ └── broadcast.log.json │ │ └── openzeppelin-contracts │ │ │ ├── .changeset │ │ │ └── config.json │ │ │ ├── .codecov.yml │ │ │ ├── .editorconfig │ │ │ ├── .eslintrc │ │ │ ├── .github │ │ │ ├── ISSUE_TEMPLATE │ │ │ │ ├── bug_report.md │ │ │ │ ├── config.yml │ │ │ │ └── feature_request.md │ │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ │ ├── actions │ │ │ │ ├── gas-compare │ │ │ │ │ └── action.yml │ │ │ │ ├── setup │ │ │ │ │ └── action.yml │ │ │ │ └── storage-layout │ │ │ │ │ └── action.yml │ │ │ └── workflows │ │ │ │ ├── actionlint.yml │ │ │ │ ├── changeset.yml │ │ │ │ ├── checks.yml │ │ │ │ ├── docs.yml │ │ │ │ ├── formal-verification.yml │ │ │ │ ├── release-cycle.yml │ │ │ │ └── upgradeable.yml │ │ │ ├── .gitignore │ │ │ ├── .gitmodules │ │ │ ├── .mocharc.js │ │ │ ├── .prettierrc │ │ │ ├── .solcover.js │ │ │ ├── CHANGELOG.md │ │ │ ├── CODE_OF_CONDUCT.md │ │ │ ├── CONTRIBUTING.md │ │ │ ├── GUIDELINES.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── RELEASING.md │ │ │ ├── SECURITY.md │ │ │ ├── audits │ │ │ ├── 2017-03.md │ │ │ ├── 2018-10.pdf │ │ │ ├── 2022-10-Checkpoints.pdf │ │ │ ├── 2022-10-ERC4626.pdf │ │ │ ├── 2023-05-v4.9.pdf │ │ │ ├── 2023-10-v5.0.pdf │ │ │ └── README.md │ │ │ ├── certora │ │ │ ├── .gitignore │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── diff │ │ │ │ └── access_manager_AccessManager.sol.patch │ │ │ ├── harnesses │ │ │ │ ├── AccessControlDefaultAdminRulesHarness.sol │ │ │ │ ├── AccessControlHarness.sol │ │ │ │ ├── DoubleEndedQueueHarness.sol │ │ │ │ ├── ERC20FlashMintHarness.sol │ │ │ │ ├── ERC20PermitHarness.sol │ │ │ │ ├── ERC20WrapperHarness.sol │ │ │ │ ├── ERC3156FlashBorrowerHarness.sol │ │ │ │ ├── ERC721Harness.sol │ │ │ │ ├── ERC721ReceiverHarness.sol │ │ │ │ ├── EnumerableMapHarness.sol │ │ │ │ ├── EnumerableSetHarness.sol │ │ │ │ ├── InitializableHarness.sol │ │ │ │ ├── Ownable2StepHarness.sol │ │ │ │ ├── OwnableHarness.sol │ │ │ │ ├── PausableHarness.sol │ │ │ │ └── TimelockControllerHarness.sol │ │ │ ├── reports │ │ │ │ ├── 2021-10.pdf │ │ │ │ ├── 2022-03.pdf │ │ │ │ └── 2022-05.pdf │ │ │ ├── run.js │ │ │ ├── specs.json │ │ │ └── specs │ │ │ │ ├── AccessControl.spec │ │ │ │ ├── AccessControlDefaultAdminRules.spec │ │ │ │ ├── DoubleEndedQueue.spec │ │ │ │ ├── ERC20.spec │ │ │ │ ├── ERC20FlashMint.spec │ │ │ │ ├── ERC20Wrapper.spec │ │ │ │ ├── ERC721.spec │ │ │ │ ├── EnumerableMap.spec │ │ │ │ ├── EnumerableSet.spec │ │ │ │ ├── Initializable.spec │ │ │ │ ├── Ownable.spec │ │ │ │ ├── Ownable2Step.spec │ │ │ │ ├── Pausable.spec │ │ │ │ ├── TimelockController.spec │ │ │ │ ├── helpers │ │ │ │ └── helpers.spec │ │ │ │ └── methods │ │ │ │ ├── IAccessControl.spec │ │ │ │ ├── IAccessControlDefaultAdminRules.spec │ │ │ │ ├── IERC20.spec │ │ │ │ ├── IERC2612.spec │ │ │ │ ├── IERC3156FlashBorrower.spec │ │ │ │ ├── IERC3156FlashLender.spec │ │ │ │ ├── IERC5313.spec │ │ │ │ ├── IERC721.spec │ │ │ │ ├── IERC721Receiver.spec │ │ │ │ ├── IOwnable.spec │ │ │ │ └── IOwnable2Step.spec │ │ │ ├── contracts │ │ │ ├── access │ │ │ │ ├── AccessControl.sol │ │ │ │ ├── IAccessControl.sol │ │ │ │ ├── Ownable.sol │ │ │ │ ├── Ownable2Step.sol │ │ │ │ ├── README.adoc │ │ │ │ ├── extensions │ │ │ │ │ ├── AccessControlDefaultAdminRules.sol │ │ │ │ │ ├── AccessControlEnumerable.sol │ │ │ │ │ ├── IAccessControlDefaultAdminRules.sol │ │ │ │ │ └── IAccessControlEnumerable.sol │ │ │ │ └── manager │ │ │ │ │ ├── AccessManaged.sol │ │ │ │ │ ├── AccessManager.sol │ │ │ │ │ ├── AuthorityUtils.sol │ │ │ │ │ ├── IAccessManaged.sol │ │ │ │ │ ├── IAccessManager.sol │ │ │ │ │ └── IAuthority.sol │ │ │ ├── finance │ │ │ │ ├── README.adoc │ │ │ │ └── VestingWallet.sol │ │ │ ├── governance │ │ │ │ ├── Governor.sol │ │ │ │ ├── IGovernor.sol │ │ │ │ ├── README.adoc │ │ │ │ ├── TimelockController.sol │ │ │ │ ├── extensions │ │ │ │ │ ├── GovernorCountingSimple.sol │ │ │ │ │ ├── GovernorPreventLateQuorum.sol │ │ │ │ │ ├── GovernorSettings.sol │ │ │ │ │ ├── GovernorStorage.sol │ │ │ │ │ ├── GovernorTimelockAccess.sol │ │ │ │ │ ├── GovernorTimelockCompound.sol │ │ │ │ │ ├── GovernorTimelockControl.sol │ │ │ │ │ ├── GovernorVotes.sol │ │ │ │ │ └── GovernorVotesQuorumFraction.sol │ │ │ │ └── utils │ │ │ │ │ ├── IVotes.sol │ │ │ │ │ └── Votes.sol │ │ │ ├── interfaces │ │ │ │ ├── IERC1155.sol │ │ │ │ ├── IERC1155MetadataURI.sol │ │ │ │ ├── IERC1155Receiver.sol │ │ │ │ ├── IERC1271.sol │ │ │ │ ├── IERC1363.sol │ │ │ │ ├── IERC1363Receiver.sol │ │ │ │ ├── IERC1363Spender.sol │ │ │ │ ├── IERC165.sol │ │ │ │ ├── IERC1820Implementer.sol │ │ │ │ ├── IERC1820Registry.sol │ │ │ │ ├── IERC1967.sol │ │ │ │ ├── IERC20.sol │ │ │ │ ├── IERC20Metadata.sol │ │ │ │ ├── IERC2309.sol │ │ │ │ ├── IERC2612.sol │ │ │ │ ├── IERC2981.sol │ │ │ │ ├── IERC3156.sol │ │ │ │ ├── IERC3156FlashBorrower.sol │ │ │ │ ├── IERC3156FlashLender.sol │ │ │ │ ├── IERC4626.sol │ │ │ │ ├── IERC4906.sol │ │ │ │ ├── IERC5267.sol │ │ │ │ ├── IERC5313.sol │ │ │ │ ├── IERC5805.sol │ │ │ │ ├── IERC6372.sol │ │ │ │ ├── IERC721.sol │ │ │ │ ├── IERC721Enumerable.sol │ │ │ │ ├── IERC721Metadata.sol │ │ │ │ ├── IERC721Receiver.sol │ │ │ │ ├── IERC777.sol │ │ │ │ ├── IERC777Recipient.sol │ │ │ │ ├── IERC777Sender.sol │ │ │ │ ├── README.adoc │ │ │ │ ├── draft-IERC1822.sol │ │ │ │ └── draft-IERC6093.sol │ │ │ ├── metatx │ │ │ │ ├── ERC2771Context.sol │ │ │ │ ├── ERC2771Forwarder.sol │ │ │ │ └── README.adoc │ │ │ ├── mocks │ │ │ │ ├── AccessManagedTarget.sol │ │ │ │ ├── ArraysMock.sol │ │ │ │ ├── AuthorityMock.sol │ │ │ │ ├── CallReceiverMock.sol │ │ │ │ ├── ContextMock.sol │ │ │ │ ├── DummyImplementation.sol │ │ │ │ ├── EIP712Verifier.sol │ │ │ │ ├── ERC1271WalletMock.sol │ │ │ │ ├── ERC165 │ │ │ │ │ ├── ERC165InterfacesSupported.sol │ │ │ │ │ ├── ERC165MaliciousData.sol │ │ │ │ │ ├── ERC165MissingData.sol │ │ │ │ │ ├── ERC165NotSupported.sol │ │ │ │ │ └── ERC165ReturnBomb.sol │ │ │ │ ├── ERC2771ContextMock.sol │ │ │ │ ├── ERC3156FlashBorrowerMock.sol │ │ │ │ ├── EtherReceiverMock.sol │ │ │ │ ├── InitializableMock.sol │ │ │ │ ├── MulticallTest.sol │ │ │ │ ├── MultipleInheritanceInitializableMocks.sol │ │ │ │ ├── PausableMock.sol │ │ │ │ ├── ReentrancyAttack.sol │ │ │ │ ├── ReentrancyMock.sol │ │ │ │ ├── RegressionImplementation.sol │ │ │ │ ├── SingleInheritanceInitializableMocks.sol │ │ │ │ ├── Stateless.sol │ │ │ │ ├── StorageSlotMock.sol │ │ │ │ ├── TimelockReentrant.sol │ │ │ │ ├── UpgradeableBeaconMock.sol │ │ │ │ ├── VotesMock.sol │ │ │ │ ├── compound │ │ │ │ │ └── CompTimelock.sol │ │ │ │ ├── docs │ │ │ │ │ ├── ERC20WithAutoMinerReward.sol │ │ │ │ │ ├── ERC4626Fees.sol │ │ │ │ │ ├── access-control │ │ │ │ │ │ ├── AccessControlERC20MintBase.sol │ │ │ │ │ │ ├── AccessControlERC20MintMissing.sol │ │ │ │ │ │ ├── AccessControlERC20MintOnlyRole.sol │ │ │ │ │ │ ├── AccessManagedERC20MintBase.sol │ │ │ │ │ │ └── MyContractOwnable.sol │ │ │ │ │ └── governance │ │ │ │ │ │ ├── MyGovernor.sol │ │ │ │ │ │ ├── MyToken.sol │ │ │ │ │ │ ├── MyTokenTimestampBased.sol │ │ │ │ │ │ └── MyTokenWrapped.sol │ │ │ │ ├── governance │ │ │ │ │ ├── GovernorMock.sol │ │ │ │ │ ├── GovernorPreventLateQuorumMock.sol │ │ │ │ │ ├── GovernorStorageMock.sol │ │ │ │ │ ├── GovernorTimelockAccessMock.sol │ │ │ │ │ ├── GovernorTimelockCompoundMock.sol │ │ │ │ │ ├── GovernorTimelockControlMock.sol │ │ │ │ │ ├── GovernorVoteMock.sol │ │ │ │ │ └── GovernorWithParamsMock.sol │ │ │ │ ├── proxy │ │ │ │ │ ├── BadBeacon.sol │ │ │ │ │ ├── ClashingImplementation.sol │ │ │ │ │ └── UUPSUpgradeableMock.sol │ │ │ │ └── token │ │ │ │ │ ├── ERC1155ReceiverMock.sol │ │ │ │ │ ├── ERC20ApprovalMock.sol │ │ │ │ │ ├── ERC20DecimalsMock.sol │ │ │ │ │ ├── ERC20ExcessDecimalsMock.sol │ │ │ │ │ ├── ERC20FlashMintMock.sol │ │ │ │ │ ├── ERC20ForceApproveMock.sol │ │ │ │ │ ├── ERC20Mock.sol │ │ │ │ │ ├── ERC20MulticallMock.sol │ │ │ │ │ ├── ERC20NoReturnMock.sol │ │ │ │ │ ├── ERC20Reentrant.sol │ │ │ │ │ ├── ERC20ReturnFalseMock.sol │ │ │ │ │ ├── ERC20VotesLegacyMock.sol │ │ │ │ │ ├── ERC4626LimitsMock.sol │ │ │ │ │ ├── ERC4626Mock.sol │ │ │ │ │ ├── ERC4626OffsetMock.sol │ │ │ │ │ ├── ERC4646FeesMock.sol │ │ │ │ │ ├── ERC721ConsecutiveEnumerableMock.sol │ │ │ │ │ ├── ERC721ConsecutiveMock.sol │ │ │ │ │ ├── ERC721ReceiverMock.sol │ │ │ │ │ ├── ERC721URIStorageMock.sol │ │ │ │ │ └── VotesTimestamp.sol │ │ │ ├── package.json │ │ │ ├── proxy │ │ │ │ ├── Clones.sol │ │ │ │ ├── ERC1967 │ │ │ │ │ ├── ERC1967Proxy.sol │ │ │ │ │ └── ERC1967Utils.sol │ │ │ │ ├── Proxy.sol │ │ │ │ ├── README.adoc │ │ │ │ ├── beacon │ │ │ │ │ ├── BeaconProxy.sol │ │ │ │ │ ├── IBeacon.sol │ │ │ │ │ └── UpgradeableBeacon.sol │ │ │ │ ├── transparent │ │ │ │ │ ├── ProxyAdmin.sol │ │ │ │ │ └── TransparentUpgradeableProxy.sol │ │ │ │ └── utils │ │ │ │ │ ├── Initializable.sol │ │ │ │ │ └── UUPSUpgradeable.sol │ │ │ ├── token │ │ │ │ ├── ERC1155 │ │ │ │ │ ├── ERC1155.sol │ │ │ │ │ ├── IERC1155.sol │ │ │ │ │ ├── IERC1155Receiver.sol │ │ │ │ │ ├── README.adoc │ │ │ │ │ ├── extensions │ │ │ │ │ │ ├── ERC1155Burnable.sol │ │ │ │ │ │ ├── ERC1155Pausable.sol │ │ │ │ │ │ ├── ERC1155Supply.sol │ │ │ │ │ │ ├── ERC1155URIStorage.sol │ │ │ │ │ │ └── IERC1155MetadataURI.sol │ │ │ │ │ └── utils │ │ │ │ │ │ └── ERC1155Holder.sol │ │ │ │ ├── ERC20 │ │ │ │ │ ├── ERC20.sol │ │ │ │ │ ├── IERC20.sol │ │ │ │ │ ├── README.adoc │ │ │ │ │ ├── extensions │ │ │ │ │ │ ├── ERC20Burnable.sol │ │ │ │ │ │ ├── ERC20Capped.sol │ │ │ │ │ │ ├── ERC20FlashMint.sol │ │ │ │ │ │ ├── ERC20Pausable.sol │ │ │ │ │ │ ├── ERC20Permit.sol │ │ │ │ │ │ ├── ERC20Votes.sol │ │ │ │ │ │ ├── ERC20Wrapper.sol │ │ │ │ │ │ ├── ERC4626.sol │ │ │ │ │ │ ├── IERC20Metadata.sol │ │ │ │ │ │ └── IERC20Permit.sol │ │ │ │ │ └── utils │ │ │ │ │ │ └── SafeERC20.sol │ │ │ │ ├── ERC721 │ │ │ │ │ ├── ERC721.sol │ │ │ │ │ ├── IERC721.sol │ │ │ │ │ ├── IERC721Receiver.sol │ │ │ │ │ ├── README.adoc │ │ │ │ │ ├── extensions │ │ │ │ │ │ ├── ERC721Burnable.sol │ │ │ │ │ │ ├── ERC721Consecutive.sol │ │ │ │ │ │ ├── ERC721Enumerable.sol │ │ │ │ │ │ ├── ERC721Pausable.sol │ │ │ │ │ │ ├── ERC721Royalty.sol │ │ │ │ │ │ ├── ERC721URIStorage.sol │ │ │ │ │ │ ├── ERC721Votes.sol │ │ │ │ │ │ ├── ERC721Wrapper.sol │ │ │ │ │ │ ├── IERC721Enumerable.sol │ │ │ │ │ │ └── IERC721Metadata.sol │ │ │ │ │ └── utils │ │ │ │ │ │ └── ERC721Holder.sol │ │ │ │ └── common │ │ │ │ │ ├── ERC2981.sol │ │ │ │ │ └── README.adoc │ │ │ ├── utils │ │ │ │ ├── Address.sol │ │ │ │ ├── Arrays.sol │ │ │ │ ├── Base64.sol │ │ │ │ ├── Context.sol │ │ │ │ ├── Create2.sol │ │ │ │ ├── Multicall.sol │ │ │ │ ├── Nonces.sol │ │ │ │ ├── Pausable.sol │ │ │ │ ├── README.adoc │ │ │ │ ├── ReentrancyGuard.sol │ │ │ │ ├── ShortStrings.sol │ │ │ │ ├── StorageSlot.sol │ │ │ │ ├── Strings.sol │ │ │ │ ├── cryptography │ │ │ │ │ ├── ECDSA.sol │ │ │ │ │ ├── EIP712.sol │ │ │ │ │ ├── MerkleProof.sol │ │ │ │ │ ├── MessageHashUtils.sol │ │ │ │ │ └── SignatureChecker.sol │ │ │ │ ├── introspection │ │ │ │ │ ├── ERC165.sol │ │ │ │ │ ├── ERC165Checker.sol │ │ │ │ │ └── IERC165.sol │ │ │ │ ├── math │ │ │ │ │ ├── Math.sol │ │ │ │ │ ├── SafeCast.sol │ │ │ │ │ └── SignedMath.sol │ │ │ │ ├── structs │ │ │ │ │ ├── BitMaps.sol │ │ │ │ │ ├── Checkpoints.sol │ │ │ │ │ ├── DoubleEndedQueue.sol │ │ │ │ │ ├── EnumerableMap.sol │ │ │ │ │ └── EnumerableSet.sol │ │ │ │ └── types │ │ │ │ │ └── Time.sol │ │ │ └── vendor │ │ │ │ └── compound │ │ │ │ ├── ICompoundTimelock.sol │ │ │ │ └── LICENSE │ │ │ ├── docs │ │ │ ├── README.md │ │ │ ├── antora.yml │ │ │ ├── config.js │ │ │ ├── modules │ │ │ │ └── ROOT │ │ │ │ │ ├── images │ │ │ │ │ ├── access-control-multiple.svg │ │ │ │ │ ├── access-manager-functions.svg │ │ │ │ │ ├── access-manager.svg │ │ │ │ │ ├── erc4626-attack-3a.png │ │ │ │ │ ├── erc4626-attack-3b.png │ │ │ │ │ ├── erc4626-attack-6.png │ │ │ │ │ ├── erc4626-attack.png │ │ │ │ │ ├── erc4626-deposit.png │ │ │ │ │ ├── erc4626-mint.png │ │ │ │ │ ├── erc4626-rate-linear.png │ │ │ │ │ ├── erc4626-rate-loglog.png │ │ │ │ │ ├── erc4626-rate-loglogext.png │ │ │ │ │ ├── tally-exec.png │ │ │ │ │ └── tally-vote.png │ │ │ │ │ ├── nav.adoc │ │ │ │ │ └── pages │ │ │ │ │ ├── access-control.adoc │ │ │ │ │ ├── backwards-compatibility.adoc │ │ │ │ │ ├── crowdsales.adoc │ │ │ │ │ ├── drafts.adoc │ │ │ │ │ ├── erc1155.adoc │ │ │ │ │ ├── erc20-supply.adoc │ │ │ │ │ ├── erc20.adoc │ │ │ │ │ ├── erc4626.adoc │ │ │ │ │ ├── erc721.adoc │ │ │ │ │ ├── extending-contracts.adoc │ │ │ │ │ ├── faq.adoc │ │ │ │ │ ├── governance.adoc │ │ │ │ │ ├── index.adoc │ │ │ │ │ ├── tokens.adoc │ │ │ │ │ ├── upgradeable.adoc │ │ │ │ │ ├── utilities.adoc │ │ │ │ │ └── wizard.adoc │ │ │ └── templates │ │ │ │ ├── contract.hbs │ │ │ │ ├── helpers.js │ │ │ │ ├── page.hbs │ │ │ │ └── properties.js │ │ │ ├── foundry.toml │ │ │ ├── hardhat.config.js │ │ │ ├── hardhat │ │ │ ├── env-artifacts.js │ │ │ ├── env-contract.js │ │ │ ├── ignore-unreachable-warnings.js │ │ │ ├── skip-foundry-tests.js │ │ │ └── task-test-get-files.js │ │ │ ├── lib │ │ │ ├── erc4626-tests │ │ │ │ ├── ERC4626.prop.sol │ │ │ │ ├── ERC4626.test.sol │ │ │ │ ├── LICENSE │ │ │ │ └── README.md │ │ │ └── forge-std │ │ │ │ ├── .github │ │ │ │ └── workflows │ │ │ │ │ └── ci.yml │ │ │ │ ├── .gitignore │ │ │ │ ├── .gitmodules │ │ │ │ ├── LICENSE-APACHE │ │ │ │ ├── LICENSE-MIT │ │ │ │ ├── README.md │ │ │ │ ├── foundry.toml │ │ │ │ ├── lib │ │ │ │ └── ds-test │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── default.nix │ │ │ │ │ ├── demo │ │ │ │ │ └── demo.sol │ │ │ │ │ ├── package.json │ │ │ │ │ └── src │ │ │ │ │ └── test.sol │ │ │ │ ├── package.json │ │ │ │ ├── src │ │ │ │ ├── Base.sol │ │ │ │ ├── Script.sol │ │ │ │ ├── StdAssertions.sol │ │ │ │ ├── StdChains.sol │ │ │ │ ├── StdCheats.sol │ │ │ │ ├── StdError.sol │ │ │ │ ├── StdJson.sol │ │ │ │ ├── StdMath.sol │ │ │ │ ├── StdStorage.sol │ │ │ │ ├── StdUtils.sol │ │ │ │ ├── Test.sol │ │ │ │ ├── Vm.sol │ │ │ │ ├── console.sol │ │ │ │ ├── console2.sol │ │ │ │ └── interfaces │ │ │ │ │ ├── IERC1155.sol │ │ │ │ │ ├── IERC165.sol │ │ │ │ │ ├── IERC20.sol │ │ │ │ │ ├── IERC4626.sol │ │ │ │ │ └── IERC721.sol │ │ │ │ └── test │ │ │ │ ├── StdAssertions.t.sol │ │ │ │ ├── StdChains.t.sol │ │ │ │ ├── StdCheats.t.sol │ │ │ │ ├── StdError.t.sol │ │ │ │ ├── StdMath.t.sol │ │ │ │ ├── StdStorage.t.sol │ │ │ │ ├── StdUtils.t.sol │ │ │ │ ├── compilation │ │ │ │ ├── CompilationScript.sol │ │ │ │ ├── CompilationScriptBase.sol │ │ │ │ ├── CompilationTest.sol │ │ │ │ └── CompilationTestBase.sol │ │ │ │ └── fixtures │ │ │ │ └── broadcast.log.json │ │ │ ├── logo.svg │ │ │ ├── netlify.toml │ │ │ ├── package-lock.json │ │ │ ├── package.json │ │ │ ├── remappings.txt │ │ │ ├── renovate.json │ │ │ ├── requirements.txt │ │ │ ├── scripts │ │ │ ├── checks │ │ │ │ ├── compare-layout.js │ │ │ │ ├── compareGasReports.js │ │ │ │ ├── extract-layout.js │ │ │ │ ├── generation.sh │ │ │ │ └── inheritance-ordering.js │ │ │ ├── gen-nav.js │ │ │ ├── generate │ │ │ │ ├── format-lines.js │ │ │ │ ├── run.js │ │ │ │ └── templates │ │ │ │ │ ├── Checkpoints.js │ │ │ │ │ ├── Checkpoints.opts.js │ │ │ │ │ ├── Checkpoints.t.js │ │ │ │ │ ├── EnumerableMap.js │ │ │ │ │ ├── EnumerableSet.js │ │ │ │ │ ├── SafeCast.js │ │ │ │ │ ├── StorageSlot.js │ │ │ │ │ └── conversion.js │ │ │ ├── git-user-config.sh │ │ │ ├── helpers.js │ │ │ ├── prepack.sh │ │ │ ├── prepare-docs.sh │ │ │ ├── release │ │ │ │ ├── format-changelog.js │ │ │ │ ├── synchronize-versions.js │ │ │ │ ├── update-comment.js │ │ │ │ ├── version.sh │ │ │ │ └── workflow │ │ │ │ │ ├── exit-prerelease.sh │ │ │ │ │ ├── github-release.js │ │ │ │ │ ├── integrity-check.sh │ │ │ │ │ ├── pack.sh │ │ │ │ │ ├── publish.sh │ │ │ │ │ ├── rerun.js │ │ │ │ │ ├── set-changesets-pr-title.js │ │ │ │ │ ├── start.sh │ │ │ │ │ └── state.js │ │ │ ├── remove-ignored-artifacts.js │ │ │ ├── solhint-custom │ │ │ │ ├── index.js │ │ │ │ └── package.json │ │ │ ├── update-docs-branch.js │ │ │ └── upgradeable │ │ │ │ ├── README.md │ │ │ │ ├── patch-apply.sh │ │ │ │ ├── patch-save.sh │ │ │ │ ├── transpile-onto.sh │ │ │ │ ├── transpile.sh │ │ │ │ └── upgradeable.patch │ │ │ ├── slither.config.json │ │ │ ├── solhint.config.js │ │ │ └── test │ │ │ ├── TESTING.md │ │ │ ├── access │ │ │ ├── AccessControl.behavior.js │ │ │ ├── AccessControl.test.js │ │ │ ├── Ownable.test.js │ │ │ ├── Ownable2Step.test.js │ │ │ ├── extensions │ │ │ │ ├── AccessControlDefaultAdminRules.test.js │ │ │ │ └── AccessControlEnumerable.test.js │ │ │ └── manager │ │ │ │ ├── AccessManaged.test.js │ │ │ │ ├── AccessManager.behavior.js │ │ │ │ ├── AccessManager.test.js │ │ │ │ └── AuthorityUtils.test.js │ │ │ ├── finance │ │ │ ├── VestingWallet.behavior.js │ │ │ └── VestingWallet.test.js │ │ │ ├── governance │ │ │ ├── Governor.t.sol │ │ │ ├── Governor.test.js │ │ │ ├── TimelockController.test.js │ │ │ ├── extensions │ │ │ │ ├── GovernorERC721.test.js │ │ │ │ ├── GovernorPreventLateQuorum.test.js │ │ │ │ ├── GovernorStorage.test.js │ │ │ │ ├── GovernorTimelockAccess.test.js │ │ │ │ ├── GovernorTimelockCompound.test.js │ │ │ │ ├── GovernorTimelockControl.test.js │ │ │ │ ├── GovernorVotesQuorumFraction.test.js │ │ │ │ └── GovernorWithParams.test.js │ │ │ └── utils │ │ │ │ ├── EIP6372.behavior.js │ │ │ │ ├── Votes.behavior.js │ │ │ │ └── Votes.test.js │ │ │ ├── helpers │ │ │ ├── access-manager.js │ │ │ ├── account.js │ │ │ ├── chainid.js │ │ │ ├── constants.js │ │ │ ├── create.js │ │ │ ├── customError.js │ │ │ ├── eip712.js │ │ │ ├── enums.js │ │ │ ├── erc1967.js │ │ │ ├── governance.js │ │ │ ├── iterate.js │ │ │ ├── math.js │ │ │ ├── methods.js │ │ │ ├── sign.js │ │ │ ├── time.js │ │ │ └── txpool.js │ │ │ ├── metatx │ │ │ ├── ERC2771Context.test.js │ │ │ ├── ERC2771Forwarder.t.sol │ │ │ └── ERC2771Forwarder.test.js │ │ │ ├── proxy │ │ │ ├── Clones.behaviour.js │ │ │ ├── Clones.test.js │ │ │ ├── ERC1967 │ │ │ │ ├── ERC1967Proxy.test.js │ │ │ │ └── ERC1967Utils.test.js │ │ │ ├── Proxy.behaviour.js │ │ │ ├── beacon │ │ │ │ ├── BeaconProxy.test.js │ │ │ │ └── UpgradeableBeacon.test.js │ │ │ ├── transparent │ │ │ │ ├── ProxyAdmin.test.js │ │ │ │ ├── TransparentUpgradeableProxy.behaviour.js │ │ │ │ └── TransparentUpgradeableProxy.test.js │ │ │ └── utils │ │ │ │ ├── Initializable.test.js │ │ │ │ └── UUPSUpgradeable.test.js │ │ │ ├── token │ │ │ ├── ERC1155 │ │ │ │ ├── ERC1155.behavior.js │ │ │ │ ├── ERC1155.test.js │ │ │ │ ├── extensions │ │ │ │ │ ├── ERC1155Burnable.test.js │ │ │ │ │ ├── ERC1155Pausable.test.js │ │ │ │ │ ├── ERC1155Supply.test.js │ │ │ │ │ └── ERC1155URIStorage.test.js │ │ │ │ └── utils │ │ │ │ │ └── ERC1155Holder.test.js │ │ │ ├── ERC20 │ │ │ │ ├── ERC20.behavior.js │ │ │ │ ├── ERC20.test.js │ │ │ │ ├── extensions │ │ │ │ │ ├── ERC20Burnable.behavior.js │ │ │ │ │ ├── ERC20Burnable.test.js │ │ │ │ │ ├── ERC20Capped.behavior.js │ │ │ │ │ ├── ERC20Capped.test.js │ │ │ │ │ ├── ERC20FlashMint.test.js │ │ │ │ │ ├── ERC20Pausable.test.js │ │ │ │ │ ├── ERC20Permit.test.js │ │ │ │ │ ├── ERC20Votes.test.js │ │ │ │ │ ├── ERC20Wrapper.test.js │ │ │ │ │ ├── ERC4626.t.sol │ │ │ │ │ └── ERC4626.test.js │ │ │ │ └── utils │ │ │ │ │ └── SafeERC20.test.js │ │ │ ├── ERC721 │ │ │ │ ├── ERC721.behavior.js │ │ │ │ ├── ERC721.test.js │ │ │ │ ├── ERC721Enumerable.test.js │ │ │ │ ├── extensions │ │ │ │ │ ├── ERC721Burnable.test.js │ │ │ │ │ ├── ERC721Consecutive.t.sol │ │ │ │ │ ├── ERC721Consecutive.test.js │ │ │ │ │ ├── ERC721Pausable.test.js │ │ │ │ │ ├── ERC721Royalty.test.js │ │ │ │ │ ├── ERC721URIStorage.test.js │ │ │ │ │ ├── ERC721Votes.test.js │ │ │ │ │ └── ERC721Wrapper.test.js │ │ │ │ └── utils │ │ │ │ │ └── ERC721Holder.test.js │ │ │ └── common │ │ │ │ └── ERC2981.behavior.js │ │ │ └── utils │ │ │ ├── Address.test.js │ │ │ ├── Arrays.test.js │ │ │ ├── Base64.test.js │ │ │ ├── Context.behavior.js │ │ │ ├── Context.test.js │ │ │ ├── Create2.test.js │ │ │ ├── Multicall.test.js │ │ │ ├── Nonces.test.js │ │ │ ├── Pausable.test.js │ │ │ ├── ReentrancyGuard.test.js │ │ │ ├── ShortStrings.t.sol │ │ │ ├── ShortStrings.test.js │ │ │ ├── StorageSlot.test.js │ │ │ ├── Strings.test.js │ │ │ ├── cryptography │ │ │ ├── ECDSA.test.js │ │ │ ├── EIP712.test.js │ │ │ ├── MerkleProof.test.js │ │ │ ├── MessageHashUtils.test.js │ │ │ └── SignatureChecker.test.js │ │ │ ├── introspection │ │ │ ├── ERC165.test.js │ │ │ ├── ERC165Checker.test.js │ │ │ └── SupportsInterface.behavior.js │ │ │ ├── math │ │ │ ├── Math.t.sol │ │ │ ├── Math.test.js │ │ │ ├── SafeCast.test.js │ │ │ └── SignedMath.test.js │ │ │ ├── structs │ │ │ ├── BitMap.test.js │ │ │ ├── Checkpoints.t.sol │ │ │ ├── Checkpoints.test.js │ │ │ ├── DoubleEndedQueue.test.js │ │ │ ├── EnumerableMap.behavior.js │ │ │ ├── EnumerableMap.test.js │ │ │ ├── EnumerableSet.behavior.js │ │ │ └── EnumerableSet.test.js │ │ │ └── types │ │ │ └── Time.test.js │ ├── logo.svg │ ├── netlify.toml │ ├── package-lock.json │ ├── package.json │ ├── remappings.txt │ ├── renovate.json │ ├── requirements.txt │ ├── scripts │ │ ├── checks │ │ │ ├── compare-layout.js │ │ │ ├── compareGasReports.js │ │ │ ├── extract-layout.js │ │ │ ├── generation.sh │ │ │ └── inheritance-ordering.js │ │ ├── gen-nav.js │ │ ├── generate │ │ │ ├── format-lines.js │ │ │ ├── run.js │ │ │ └── templates │ │ │ │ ├── Checkpoints.js │ │ │ │ ├── Checkpoints.opts.js │ │ │ │ ├── Checkpoints.t.js │ │ │ │ ├── EnumerableMap.js │ │ │ │ ├── EnumerableSet.js │ │ │ │ ├── SafeCast.js │ │ │ │ ├── StorageSlot.js │ │ │ │ └── conversion.js │ │ ├── git-user-config.sh │ │ ├── helpers.js │ │ ├── prepack.sh │ │ ├── prepare-docs.sh │ │ ├── release │ │ │ ├── format-changelog.js │ │ │ ├── synchronize-versions.js │ │ │ ├── update-comment.js │ │ │ ├── version.sh │ │ │ └── workflow │ │ │ │ ├── exit-prerelease.sh │ │ │ │ ├── github-release.js │ │ │ │ ├── integrity-check.sh │ │ │ │ ├── pack.sh │ │ │ │ ├── publish.sh │ │ │ │ ├── rerun.js │ │ │ │ ├── set-changesets-pr-title.js │ │ │ │ ├── start.sh │ │ │ │ └── state.js │ │ ├── remove-ignored-artifacts.js │ │ ├── solhint-custom │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── update-docs-branch.js │ │ └── upgradeable │ │ │ ├── README.md │ │ │ ├── patch-apply.sh │ │ │ ├── patch-save.sh │ │ │ ├── transpile-onto.sh │ │ │ ├── transpile.sh │ │ │ └── upgradeable.patch │ ├── slither.config.json │ ├── solhint.config.js │ └── test │ │ ├── TESTING.md │ │ ├── access │ │ ├── AccessControl.behavior.js │ │ ├── AccessControl.test.js │ │ ├── Ownable.test.js │ │ ├── Ownable2Step.test.js │ │ ├── extensions │ │ │ ├── AccessControlDefaultAdminRules.test.js │ │ │ └── AccessControlEnumerable.test.js │ │ └── manager │ │ │ ├── AccessManaged.test.js │ │ │ ├── AccessManager.behavior.js │ │ │ ├── AccessManager.test.js │ │ │ └── AuthorityUtils.test.js │ │ ├── finance │ │ ├── VestingWallet.behavior.js │ │ └── VestingWallet.test.js │ │ ├── governance │ │ ├── Governor.t.sol │ │ ├── Governor.test.js │ │ ├── TimelockController.test.js │ │ ├── extensions │ │ │ ├── GovernorERC721.test.js │ │ │ ├── GovernorPreventLateQuorum.test.js │ │ │ ├── GovernorStorage.test.js │ │ │ ├── GovernorTimelockAccess.test.js │ │ │ ├── GovernorTimelockCompound.test.js │ │ │ ├── GovernorTimelockControl.test.js │ │ │ ├── GovernorVotesQuorumFraction.test.js │ │ │ └── GovernorWithParams.test.js │ │ └── utils │ │ │ ├── EIP6372.behavior.js │ │ │ ├── Votes.behavior.js │ │ │ └── Votes.test.js │ │ ├── helpers │ │ ├── access-manager.js │ │ ├── account.js │ │ ├── chainid.js │ │ ├── constants.js │ │ ├── create.js │ │ ├── customError.js │ │ ├── eip712.js │ │ ├── enums.js │ │ ├── erc1967.js │ │ ├── governance.js │ │ ├── iterate.js │ │ ├── math.js │ │ ├── methods.js │ │ ├── sign.js │ │ ├── time.js │ │ └── txpool.js │ │ ├── metatx │ │ ├── ERC2771Context.test.js │ │ ├── ERC2771Forwarder.t.sol │ │ └── ERC2771Forwarder.test.js │ │ ├── proxy │ │ ├── Clones.behaviour.js │ │ ├── Clones.test.js │ │ ├── ERC1967 │ │ │ ├── ERC1967Proxy.test.js │ │ │ └── ERC1967Utils.test.js │ │ ├── Proxy.behaviour.js │ │ ├── beacon │ │ │ ├── BeaconProxy.test.js │ │ │ └── UpgradeableBeacon.test.js │ │ ├── transparent │ │ │ ├── ProxyAdmin.test.js │ │ │ ├── TransparentUpgradeableProxy.behaviour.js │ │ │ └── TransparentUpgradeableProxy.test.js │ │ └── utils │ │ │ ├── Initializable.test.js │ │ │ └── UUPSUpgradeable.test.js │ │ ├── token │ │ ├── ERC1155 │ │ │ ├── ERC1155.behavior.js │ │ │ ├── ERC1155.test.js │ │ │ ├── extensions │ │ │ │ ├── ERC1155Burnable.test.js │ │ │ │ ├── ERC1155Pausable.test.js │ │ │ │ ├── ERC1155Supply.test.js │ │ │ │ └── ERC1155URIStorage.test.js │ │ │ └── utils │ │ │ │ └── ERC1155Holder.test.js │ │ ├── ERC20 │ │ │ ├── ERC20.behavior.js │ │ │ ├── ERC20.test.js │ │ │ ├── extensions │ │ │ │ ├── ERC20Burnable.behavior.js │ │ │ │ ├── ERC20Burnable.test.js │ │ │ │ ├── ERC20Capped.behavior.js │ │ │ │ ├── ERC20Capped.test.js │ │ │ │ ├── ERC20FlashMint.test.js │ │ │ │ ├── ERC20Pausable.test.js │ │ │ │ ├── ERC20Permit.test.js │ │ │ │ ├── ERC20Votes.test.js │ │ │ │ ├── ERC20Wrapper.test.js │ │ │ │ ├── ERC4626.t.sol │ │ │ │ └── ERC4626.test.js │ │ │ └── utils │ │ │ │ └── SafeERC20.test.js │ │ ├── ERC721 │ │ │ ├── ERC721.behavior.js │ │ │ ├── ERC721.test.js │ │ │ ├── ERC721Enumerable.test.js │ │ │ ├── extensions │ │ │ │ ├── ERC721Burnable.test.js │ │ │ │ ├── ERC721Consecutive.t.sol │ │ │ │ ├── ERC721Consecutive.test.js │ │ │ │ ├── ERC721Pausable.test.js │ │ │ │ ├── ERC721Royalty.test.js │ │ │ │ ├── ERC721URIStorage.test.js │ │ │ │ ├── ERC721Votes.test.js │ │ │ │ └── ERC721Wrapper.test.js │ │ │ └── utils │ │ │ │ └── ERC721Holder.test.js │ │ └── common │ │ │ └── ERC2981.behavior.js │ │ └── utils │ │ ├── Address.test.js │ │ ├── Arrays.test.js │ │ ├── Base64.test.js │ │ ├── Context.behavior.js │ │ ├── Context.test.js │ │ ├── Create2.test.js │ │ ├── Multicall.test.js │ │ ├── Nonces.test.js │ │ ├── Pausable.test.js │ │ ├── ReentrancyGuard.test.js │ │ ├── ShortStrings.t.sol │ │ ├── ShortStrings.test.js │ │ ├── StorageSlot.test.js │ │ ├── Strings.test.js │ │ ├── cryptography │ │ ├── ECDSA.test.js │ │ ├── EIP712.test.js │ │ ├── MerkleProof.test.js │ │ ├── MessageHashUtils.test.js │ │ └── SignatureChecker.test.js │ │ ├── introspection │ │ ├── ERC165.test.js │ │ ├── ERC165Checker.test.js │ │ └── SupportsInterface.behavior.js │ │ ├── math │ │ ├── Math.t.sol │ │ ├── Math.test.js │ │ ├── SafeCast.test.js │ │ └── SignedMath.test.js │ │ ├── structs │ │ ├── BitMap.test.js │ │ ├── Checkpoints.t.sol │ │ ├── Checkpoints.test.js │ │ ├── DoubleEndedQueue.test.js │ │ ├── EnumerableMap.behavior.js │ │ ├── EnumerableMap.test.js │ │ ├── EnumerableSet.behavior.js │ │ └── EnumerableSet.test.js │ │ └── types │ │ └── Time.test.js ├── openzeppelin-contracts │ ├── .changeset │ │ └── config.json │ ├── .codecov.yml │ ├── .editorconfig │ ├── .eslintrc │ ├── .github │ │ ├── ISSUE_TEMPLATE │ │ │ ├── bug_report.md │ │ │ ├── config.yml │ │ │ └── feature_request.md │ │ ├── PULL_REQUEST_TEMPLATE.md │ │ ├── actions │ │ │ ├── gas-compare │ │ │ │ └── action.yml │ │ │ ├── setup │ │ │ │ └── action.yml │ │ │ └── storage-layout │ │ │ │ └── action.yml │ │ └── workflows │ │ │ ├── actionlint.yml │ │ │ ├── changeset.yml │ │ │ ├── checks.yml │ │ │ ├── docs.yml │ │ │ ├── formal-verification.yml │ │ │ ├── release-cycle.yml │ │ │ └── upgradeable.yml │ ├── .gitignore │ ├── .gitmodules │ ├── .mocharc.js │ ├── .prettierrc │ ├── .solcover.js │ ├── CHANGELOG.md │ ├── CODE_OF_CONDUCT.md │ ├── CONTRIBUTING.md │ ├── GUIDELINES.md │ ├── LICENSE │ ├── README.md │ ├── RELEASING.md │ ├── SECURITY.md │ ├── audits │ │ ├── 2017-03.md │ │ ├── 2018-10.pdf │ │ ├── 2022-10-Checkpoints.pdf │ │ ├── 2022-10-ERC4626.pdf │ │ ├── 2023-05-v4.9.pdf │ │ ├── 2023-10-v5.0.pdf │ │ └── README.md │ ├── certora │ │ ├── .gitignore │ │ ├── Makefile │ │ ├── README.md │ │ ├── diff │ │ │ └── access_manager_AccessManager.sol.patch │ │ ├── harnesses │ │ │ ├── AccessControlDefaultAdminRulesHarness.sol │ │ │ ├── AccessControlHarness.sol │ │ │ ├── DoubleEndedQueueHarness.sol │ │ │ ├── ERC20FlashMintHarness.sol │ │ │ ├── ERC20PermitHarness.sol │ │ │ ├── ERC20WrapperHarness.sol │ │ │ ├── ERC3156FlashBorrowerHarness.sol │ │ │ ├── ERC721Harness.sol │ │ │ ├── ERC721ReceiverHarness.sol │ │ │ ├── EnumerableMapHarness.sol │ │ │ ├── EnumerableSetHarness.sol │ │ │ ├── InitializableHarness.sol │ │ │ ├── Ownable2StepHarness.sol │ │ │ ├── OwnableHarness.sol │ │ │ ├── PausableHarness.sol │ │ │ └── TimelockControllerHarness.sol │ │ ├── reports │ │ │ ├── 2021-10.pdf │ │ │ ├── 2022-03.pdf │ │ │ └── 2022-05.pdf │ │ ├── run.js │ │ ├── specs.json │ │ └── specs │ │ │ ├── AccessControl.spec │ │ │ ├── AccessControlDefaultAdminRules.spec │ │ │ ├── DoubleEndedQueue.spec │ │ │ ├── ERC20.spec │ │ │ ├── ERC20FlashMint.spec │ │ │ ├── ERC20Wrapper.spec │ │ │ ├── ERC721.spec │ │ │ ├── EnumerableMap.spec │ │ │ ├── EnumerableSet.spec │ │ │ ├── Initializable.spec │ │ │ ├── Ownable.spec │ │ │ ├── Ownable2Step.spec │ │ │ ├── Pausable.spec │ │ │ ├── TimelockController.spec │ │ │ ├── helpers │ │ │ └── helpers.spec │ │ │ └── methods │ │ │ ├── IAccessControl.spec │ │ │ ├── IAccessControlDefaultAdminRules.spec │ │ │ ├── IERC20.spec │ │ │ ├── IERC2612.spec │ │ │ ├── IERC3156FlashBorrower.spec │ │ │ ├── IERC3156FlashLender.spec │ │ │ ├── IERC5313.spec │ │ │ ├── IERC721.spec │ │ │ ├── IERC721Receiver.spec │ │ │ ├── IOwnable.spec │ │ │ └── IOwnable2Step.spec │ ├── contracts │ │ ├── access │ │ │ ├── AccessControl.sol │ │ │ ├── IAccessControl.sol │ │ │ ├── Ownable.sol │ │ │ ├── Ownable2Step.sol │ │ │ ├── README.adoc │ │ │ ├── extensions │ │ │ │ ├── AccessControlDefaultAdminRules.sol │ │ │ │ ├── AccessControlEnumerable.sol │ │ │ │ ├── IAccessControlDefaultAdminRules.sol │ │ │ │ └── IAccessControlEnumerable.sol │ │ │ └── manager │ │ │ │ ├── AccessManaged.sol │ │ │ │ ├── AccessManager.sol │ │ │ │ ├── AuthorityUtils.sol │ │ │ │ ├── IAccessManaged.sol │ │ │ │ ├── IAccessManager.sol │ │ │ │ └── IAuthority.sol │ │ ├── finance │ │ │ ├── README.adoc │ │ │ └── VestingWallet.sol │ │ ├── governance │ │ │ ├── Governor.sol │ │ │ ├── IGovernor.sol │ │ │ ├── README.adoc │ │ │ ├── TimelockController.sol │ │ │ ├── extensions │ │ │ │ ├── GovernorCountingSimple.sol │ │ │ │ ├── GovernorPreventLateQuorum.sol │ │ │ │ ├── GovernorSettings.sol │ │ │ │ ├── GovernorStorage.sol │ │ │ │ ├── GovernorTimelockAccess.sol │ │ │ │ ├── GovernorTimelockCompound.sol │ │ │ │ ├── GovernorTimelockControl.sol │ │ │ │ ├── GovernorVotes.sol │ │ │ │ └── GovernorVotesQuorumFraction.sol │ │ │ └── utils │ │ │ │ ├── IVotes.sol │ │ │ │ └── Votes.sol │ │ ├── interfaces │ │ │ ├── IERC1155.sol │ │ │ ├── IERC1155MetadataURI.sol │ │ │ ├── IERC1155Receiver.sol │ │ │ ├── IERC1271.sol │ │ │ ├── IERC1363.sol │ │ │ ├── IERC1363Receiver.sol │ │ │ ├── IERC1363Spender.sol │ │ │ ├── IERC165.sol │ │ │ ├── IERC1820Implementer.sol │ │ │ ├── IERC1820Registry.sol │ │ │ ├── IERC1967.sol │ │ │ ├── IERC20.sol │ │ │ ├── IERC20Metadata.sol │ │ │ ├── IERC2309.sol │ │ │ ├── IERC2612.sol │ │ │ ├── IERC2981.sol │ │ │ ├── IERC3156.sol │ │ │ ├── IERC3156FlashBorrower.sol │ │ │ ├── IERC3156FlashLender.sol │ │ │ ├── IERC4626.sol │ │ │ ├── IERC4906.sol │ │ │ ├── IERC5267.sol │ │ │ ├── IERC5313.sol │ │ │ ├── IERC5805.sol │ │ │ ├── IERC6372.sol │ │ │ ├── IERC721.sol │ │ │ ├── IERC721Enumerable.sol │ │ │ ├── IERC721Metadata.sol │ │ │ ├── IERC721Receiver.sol │ │ │ ├── IERC777.sol │ │ │ ├── IERC777Recipient.sol │ │ │ ├── IERC777Sender.sol │ │ │ ├── README.adoc │ │ │ ├── draft-IERC1822.sol │ │ │ └── draft-IERC6093.sol │ │ ├── metatx │ │ │ ├── ERC2771Context.sol │ │ │ ├── ERC2771Forwarder.sol │ │ │ └── README.adoc │ │ ├── mocks │ │ │ ├── AccessManagedTarget.sol │ │ │ ├── ArraysMock.sol │ │ │ ├── AuthorityMock.sol │ │ │ ├── CallReceiverMock.sol │ │ │ ├── ContextMock.sol │ │ │ ├── DummyImplementation.sol │ │ │ ├── EIP712Verifier.sol │ │ │ ├── ERC1271WalletMock.sol │ │ │ ├── ERC165 │ │ │ │ ├── ERC165InterfacesSupported.sol │ │ │ │ ├── ERC165MaliciousData.sol │ │ │ │ ├── ERC165MissingData.sol │ │ │ │ ├── ERC165NotSupported.sol │ │ │ │ └── ERC165ReturnBomb.sol │ │ │ ├── ERC2771ContextMock.sol │ │ │ ├── ERC3156FlashBorrowerMock.sol │ │ │ ├── EtherReceiverMock.sol │ │ │ ├── InitializableMock.sol │ │ │ ├── MulticallTest.sol │ │ │ ├── MultipleInheritanceInitializableMocks.sol │ │ │ ├── PausableMock.sol │ │ │ ├── ReentrancyAttack.sol │ │ │ ├── ReentrancyMock.sol │ │ │ ├── RegressionImplementation.sol │ │ │ ├── SingleInheritanceInitializableMocks.sol │ │ │ ├── Stateless.sol │ │ │ ├── StorageSlotMock.sol │ │ │ ├── TimelockReentrant.sol │ │ │ ├── UpgradeableBeaconMock.sol │ │ │ ├── VotesMock.sol │ │ │ ├── compound │ │ │ │ └── CompTimelock.sol │ │ │ ├── docs │ │ │ │ ├── ERC20WithAutoMinerReward.sol │ │ │ │ ├── ERC4626Fees.sol │ │ │ │ ├── access-control │ │ │ │ │ ├── AccessControlERC20MintBase.sol │ │ │ │ │ ├── AccessControlERC20MintMissing.sol │ │ │ │ │ ├── AccessControlERC20MintOnlyRole.sol │ │ │ │ │ ├── AccessManagedERC20MintBase.sol │ │ │ │ │ └── MyContractOwnable.sol │ │ │ │ └── governance │ │ │ │ │ ├── MyGovernor.sol │ │ │ │ │ ├── MyToken.sol │ │ │ │ │ ├── MyTokenTimestampBased.sol │ │ │ │ │ └── MyTokenWrapped.sol │ │ │ ├── governance │ │ │ │ ├── GovernorMock.sol │ │ │ │ ├── GovernorPreventLateQuorumMock.sol │ │ │ │ ├── GovernorStorageMock.sol │ │ │ │ ├── GovernorTimelockAccessMock.sol │ │ │ │ ├── GovernorTimelockCompoundMock.sol │ │ │ │ ├── GovernorTimelockControlMock.sol │ │ │ │ ├── GovernorVoteMock.sol │ │ │ │ └── GovernorWithParamsMock.sol │ │ │ ├── proxy │ │ │ │ ├── BadBeacon.sol │ │ │ │ ├── ClashingImplementation.sol │ │ │ │ └── UUPSUpgradeableMock.sol │ │ │ └── token │ │ │ │ ├── ERC1155ReceiverMock.sol │ │ │ │ ├── ERC20ApprovalMock.sol │ │ │ │ ├── ERC20DecimalsMock.sol │ │ │ │ ├── ERC20ExcessDecimalsMock.sol │ │ │ │ ├── ERC20FlashMintMock.sol │ │ │ │ ├── ERC20ForceApproveMock.sol │ │ │ │ ├── ERC20Mock.sol │ │ │ │ ├── ERC20MulticallMock.sol │ │ │ │ ├── ERC20NoReturnMock.sol │ │ │ │ ├── ERC20Reentrant.sol │ │ │ │ ├── ERC20ReturnFalseMock.sol │ │ │ │ ├── ERC20VotesLegacyMock.sol │ │ │ │ ├── ERC4626LimitsMock.sol │ │ │ │ ├── ERC4626Mock.sol │ │ │ │ ├── ERC4626OffsetMock.sol │ │ │ │ ├── ERC4646FeesMock.sol │ │ │ │ ├── ERC721ConsecutiveEnumerableMock.sol │ │ │ │ ├── ERC721ConsecutiveMock.sol │ │ │ │ ├── ERC721ReceiverMock.sol │ │ │ │ ├── ERC721URIStorageMock.sol │ │ │ │ └── VotesTimestamp.sol │ │ ├── package.json │ │ ├── proxy │ │ │ ├── Clones.sol │ │ │ ├── ERC1967 │ │ │ │ ├── ERC1967Proxy.sol │ │ │ │ └── ERC1967Utils.sol │ │ │ ├── Proxy.sol │ │ │ ├── README.adoc │ │ │ ├── beacon │ │ │ │ ├── BeaconProxy.sol │ │ │ │ ├── IBeacon.sol │ │ │ │ └── UpgradeableBeacon.sol │ │ │ ├── transparent │ │ │ │ ├── ProxyAdmin.sol │ │ │ │ └── TransparentUpgradeableProxy.sol │ │ │ └── utils │ │ │ │ ├── Initializable.sol │ │ │ │ └── UUPSUpgradeable.sol │ │ ├── token │ │ │ ├── ERC1155 │ │ │ │ ├── ERC1155.sol │ │ │ │ ├── IERC1155.sol │ │ │ │ ├── IERC1155Receiver.sol │ │ │ │ ├── README.adoc │ │ │ │ ├── extensions │ │ │ │ │ ├── ERC1155Burnable.sol │ │ │ │ │ ├── ERC1155Pausable.sol │ │ │ │ │ ├── ERC1155Supply.sol │ │ │ │ │ ├── ERC1155URIStorage.sol │ │ │ │ │ └── IERC1155MetadataURI.sol │ │ │ │ └── utils │ │ │ │ │ └── ERC1155Holder.sol │ │ │ ├── ERC20 │ │ │ │ ├── ERC20.sol │ │ │ │ ├── IERC20.sol │ │ │ │ ├── README.adoc │ │ │ │ ├── extensions │ │ │ │ │ ├── ERC20Burnable.sol │ │ │ │ │ ├── ERC20Capped.sol │ │ │ │ │ ├── ERC20FlashMint.sol │ │ │ │ │ ├── ERC20Pausable.sol │ │ │ │ │ ├── ERC20Permit.sol │ │ │ │ │ ├── ERC20Votes.sol │ │ │ │ │ ├── ERC20Wrapper.sol │ │ │ │ │ ├── ERC4626.sol │ │ │ │ │ ├── IERC20Metadata.sol │ │ │ │ │ └── IERC20Permit.sol │ │ │ │ └── utils │ │ │ │ │ └── SafeERC20.sol │ │ │ ├── ERC721 │ │ │ │ ├── ERC721.sol │ │ │ │ ├── IERC721.sol │ │ │ │ ├── IERC721Receiver.sol │ │ │ │ ├── README.adoc │ │ │ │ ├── extensions │ │ │ │ │ ├── ERC721Burnable.sol │ │ │ │ │ ├── ERC721Consecutive.sol │ │ │ │ │ ├── ERC721Enumerable.sol │ │ │ │ │ ├── ERC721Pausable.sol │ │ │ │ │ ├── ERC721Royalty.sol │ │ │ │ │ ├── ERC721URIStorage.sol │ │ │ │ │ ├── ERC721Votes.sol │ │ │ │ │ ├── ERC721Wrapper.sol │ │ │ │ │ ├── IERC721Enumerable.sol │ │ │ │ │ └── IERC721Metadata.sol │ │ │ │ └── utils │ │ │ │ │ └── ERC721Holder.sol │ │ │ └── common │ │ │ │ ├── ERC2981.sol │ │ │ │ └── README.adoc │ │ ├── utils │ │ │ ├── Address.sol │ │ │ ├── Arrays.sol │ │ │ ├── Base64.sol │ │ │ ├── Context.sol │ │ │ ├── Create2.sol │ │ │ ├── Multicall.sol │ │ │ ├── Nonces.sol │ │ │ ├── Pausable.sol │ │ │ ├── README.adoc │ │ │ ├── ReentrancyGuard.sol │ │ │ ├── ShortStrings.sol │ │ │ ├── StorageSlot.sol │ │ │ ├── Strings.sol │ │ │ ├── cryptography │ │ │ │ ├── ECDSA.sol │ │ │ │ ├── EIP712.sol │ │ │ │ ├── MerkleProof.sol │ │ │ │ ├── MessageHashUtils.sol │ │ │ │ └── SignatureChecker.sol │ │ │ ├── introspection │ │ │ │ ├── ERC165.sol │ │ │ │ ├── ERC165Checker.sol │ │ │ │ └── IERC165.sol │ │ │ ├── math │ │ │ │ ├── Math.sol │ │ │ │ ├── SafeCast.sol │ │ │ │ └── SignedMath.sol │ │ │ ├── structs │ │ │ │ ├── BitMaps.sol │ │ │ │ ├── Checkpoints.sol │ │ │ │ ├── DoubleEndedQueue.sol │ │ │ │ ├── EnumerableMap.sol │ │ │ │ └── EnumerableSet.sol │ │ │ └── types │ │ │ │ └── Time.sol │ │ └── vendor │ │ │ └── compound │ │ │ ├── ICompoundTimelock.sol │ │ │ └── LICENSE │ ├── docs │ │ ├── README.md │ │ ├── antora.yml │ │ ├── config.js │ │ ├── modules │ │ │ └── ROOT │ │ │ │ ├── images │ │ │ │ ├── access-control-multiple.svg │ │ │ │ ├── access-manager-functions.svg │ │ │ │ ├── access-manager.svg │ │ │ │ ├── erc4626-attack-3a.png │ │ │ │ ├── erc4626-attack-3b.png │ │ │ │ ├── erc4626-attack-6.png │ │ │ │ ├── erc4626-attack.png │ │ │ │ ├── erc4626-deposit.png │ │ │ │ ├── erc4626-mint.png │ │ │ │ ├── erc4626-rate-linear.png │ │ │ │ ├── erc4626-rate-loglog.png │ │ │ │ ├── erc4626-rate-loglogext.png │ │ │ │ ├── tally-exec.png │ │ │ │ └── tally-vote.png │ │ │ │ ├── nav.adoc │ │ │ │ └── pages │ │ │ │ ├── access-control.adoc │ │ │ │ ├── backwards-compatibility.adoc │ │ │ │ ├── crowdsales.adoc │ │ │ │ ├── drafts.adoc │ │ │ │ ├── erc1155.adoc │ │ │ │ ├── erc20-supply.adoc │ │ │ │ ├── erc20.adoc │ │ │ │ ├── erc4626.adoc │ │ │ │ ├── erc721.adoc │ │ │ │ ├── extending-contracts.adoc │ │ │ │ ├── faq.adoc │ │ │ │ ├── governance.adoc │ │ │ │ ├── index.adoc │ │ │ │ ├── tokens.adoc │ │ │ │ ├── upgradeable.adoc │ │ │ │ ├── utilities.adoc │ │ │ │ └── wizard.adoc │ │ └── templates │ │ │ ├── contract.hbs │ │ │ ├── helpers.js │ │ │ ├── page.hbs │ │ │ └── properties.js │ ├── foundry.toml │ ├── hardhat.config.js │ ├── hardhat │ │ ├── env-artifacts.js │ │ ├── env-contract.js │ │ ├── ignore-unreachable-warnings.js │ │ ├── skip-foundry-tests.js │ │ └── task-test-get-files.js │ ├── lib │ │ ├── erc4626-tests │ │ │ ├── ERC4626.prop.sol │ │ │ ├── ERC4626.test.sol │ │ │ ├── LICENSE │ │ │ └── README.md │ │ └── forge-std │ │ │ ├── .github │ │ │ └── workflows │ │ │ │ └── ci.yml │ │ │ ├── .gitignore │ │ │ ├── .gitmodules │ │ │ ├── LICENSE-APACHE │ │ │ ├── LICENSE-MIT │ │ │ ├── README.md │ │ │ ├── foundry.toml │ │ │ ├── lib │ │ │ └── ds-test │ │ │ │ ├── .gitignore │ │ │ │ ├── LICENSE │ │ │ │ ├── Makefile │ │ │ │ ├── default.nix │ │ │ │ ├── demo │ │ │ │ └── demo.sol │ │ │ │ ├── package.json │ │ │ │ └── src │ │ │ │ └── test.sol │ │ │ ├── package.json │ │ │ ├── src │ │ │ ├── Base.sol │ │ │ ├── Script.sol │ │ │ ├── StdAssertions.sol │ │ │ ├── StdChains.sol │ │ │ ├── StdCheats.sol │ │ │ ├── StdError.sol │ │ │ ├── StdJson.sol │ │ │ ├── StdMath.sol │ │ │ ├── StdStorage.sol │ │ │ ├── StdUtils.sol │ │ │ ├── Test.sol │ │ │ ├── Vm.sol │ │ │ ├── console.sol │ │ │ ├── console2.sol │ │ │ └── interfaces │ │ │ │ ├── IERC1155.sol │ │ │ │ ├── IERC165.sol │ │ │ │ ├── IERC20.sol │ │ │ │ ├── IERC4626.sol │ │ │ │ └── IERC721.sol │ │ │ └── test │ │ │ ├── StdAssertions.t.sol │ │ │ ├── StdChains.t.sol │ │ │ ├── StdCheats.t.sol │ │ │ ├── StdError.t.sol │ │ │ ├── StdMath.t.sol │ │ │ ├── StdStorage.t.sol │ │ │ ├── StdUtils.t.sol │ │ │ ├── compilation │ │ │ ├── CompilationScript.sol │ │ │ ├── CompilationScriptBase.sol │ │ │ ├── CompilationTest.sol │ │ │ └── CompilationTestBase.sol │ │ │ └── fixtures │ │ │ └── broadcast.log.json │ ├── logo.svg │ ├── netlify.toml │ ├── package-lock.json │ ├── package.json │ ├── remappings.txt │ ├── renovate.json │ ├── requirements.txt │ ├── scripts │ │ ├── checks │ │ │ ├── compare-layout.js │ │ │ ├── compareGasReports.js │ │ │ ├── extract-layout.js │ │ │ ├── generation.sh │ │ │ └── inheritance-ordering.js │ │ ├── gen-nav.js │ │ ├── generate │ │ │ ├── format-lines.js │ │ │ ├── run.js │ │ │ └── templates │ │ │ │ ├── Checkpoints.js │ │ │ │ ├── Checkpoints.opts.js │ │ │ │ ├── Checkpoints.t.js │ │ │ │ ├── EnumerableMap.js │ │ │ │ ├── EnumerableSet.js │ │ │ │ ├── SafeCast.js │ │ │ │ ├── StorageSlot.js │ │ │ │ └── conversion.js │ │ ├── git-user-config.sh │ │ ├── helpers.js │ │ ├── prepack.sh │ │ ├── prepare-docs.sh │ │ ├── release │ │ │ ├── format-changelog.js │ │ │ ├── synchronize-versions.js │ │ │ ├── update-comment.js │ │ │ ├── version.sh │ │ │ └── workflow │ │ │ │ ├── exit-prerelease.sh │ │ │ │ ├── github-release.js │ │ │ │ ├── integrity-check.sh │ │ │ │ ├── pack.sh │ │ │ │ ├── publish.sh │ │ │ │ ├── rerun.js │ │ │ │ ├── set-changesets-pr-title.js │ │ │ │ ├── start.sh │ │ │ │ └── state.js │ │ ├── remove-ignored-artifacts.js │ │ ├── solhint-custom │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── update-docs-branch.js │ │ └── upgradeable │ │ │ ├── README.md │ │ │ ├── patch-apply.sh │ │ │ ├── patch-save.sh │ │ │ ├── transpile-onto.sh │ │ │ ├── transpile.sh │ │ │ └── upgradeable.patch │ ├── slither.config.json │ ├── solhint.config.js │ └── test │ │ ├── TESTING.md │ │ ├── access │ │ ├── AccessControl.behavior.js │ │ ├── AccessControl.test.js │ │ ├── Ownable.test.js │ │ ├── Ownable2Step.test.js │ │ ├── extensions │ │ │ ├── AccessControlDefaultAdminRules.test.js │ │ │ └── AccessControlEnumerable.test.js │ │ └── manager │ │ │ ├── AccessManaged.test.js │ │ │ ├── AccessManager.behavior.js │ │ │ ├── AccessManager.test.js │ │ │ └── AuthorityUtils.test.js │ │ ├── finance │ │ ├── VestingWallet.behavior.js │ │ └── VestingWallet.test.js │ │ ├── governance │ │ ├── Governor.t.sol │ │ ├── Governor.test.js │ │ ├── TimelockController.test.js │ │ ├── extensions │ │ │ ├── GovernorERC721.test.js │ │ │ ├── GovernorPreventLateQuorum.test.js │ │ │ ├── GovernorStorage.test.js │ │ │ ├── GovernorTimelockAccess.test.js │ │ │ ├── GovernorTimelockCompound.test.js │ │ │ ├── GovernorTimelockControl.test.js │ │ │ ├── GovernorVotesQuorumFraction.test.js │ │ │ └── GovernorWithParams.test.js │ │ └── utils │ │ │ ├── EIP6372.behavior.js │ │ │ ├── Votes.behavior.js │ │ │ └── Votes.test.js │ │ ├── helpers │ │ ├── access-manager.js │ │ ├── account.js │ │ ├── chainid.js │ │ ├── constants.js │ │ ├── create.js │ │ ├── customError.js │ │ ├── eip712.js │ │ ├── enums.js │ │ ├── erc1967.js │ │ ├── governance.js │ │ ├── iterate.js │ │ ├── math.js │ │ ├── methods.js │ │ ├── sign.js │ │ ├── time.js │ │ └── txpool.js │ │ ├── metatx │ │ ├── ERC2771Context.test.js │ │ ├── ERC2771Forwarder.t.sol │ │ └── ERC2771Forwarder.test.js │ │ ├── proxy │ │ ├── Clones.behaviour.js │ │ ├── Clones.test.js │ │ ├── ERC1967 │ │ │ ├── ERC1967Proxy.test.js │ │ │ └── ERC1967Utils.test.js │ │ ├── Proxy.behaviour.js │ │ ├── beacon │ │ │ ├── BeaconProxy.test.js │ │ │ └── UpgradeableBeacon.test.js │ │ ├── transparent │ │ │ ├── ProxyAdmin.test.js │ │ │ ├── TransparentUpgradeableProxy.behaviour.js │ │ │ └── TransparentUpgradeableProxy.test.js │ │ └── utils │ │ │ ├── Initializable.test.js │ │ │ └── UUPSUpgradeable.test.js │ │ ├── token │ │ ├── ERC1155 │ │ │ ├── ERC1155.behavior.js │ │ │ ├── ERC1155.test.js │ │ │ ├── extensions │ │ │ │ ├── ERC1155Burnable.test.js │ │ │ │ ├── ERC1155Pausable.test.js │ │ │ │ ├── ERC1155Supply.test.js │ │ │ │ └── ERC1155URIStorage.test.js │ │ │ └── utils │ │ │ │ └── ERC1155Holder.test.js │ │ ├── ERC20 │ │ │ ├── ERC20.behavior.js │ │ │ ├── ERC20.test.js │ │ │ ├── extensions │ │ │ │ ├── ERC20Burnable.behavior.js │ │ │ │ ├── ERC20Burnable.test.js │ │ │ │ ├── ERC20Capped.behavior.js │ │ │ │ ├── ERC20Capped.test.js │ │ │ │ ├── ERC20FlashMint.test.js │ │ │ │ ├── ERC20Pausable.test.js │ │ │ │ ├── ERC20Permit.test.js │ │ │ │ ├── ERC20Votes.test.js │ │ │ │ ├── ERC20Wrapper.test.js │ │ │ │ ├── ERC4626.t.sol │ │ │ │ └── ERC4626.test.js │ │ │ └── utils │ │ │ │ └── SafeERC20.test.js │ │ ├── ERC721 │ │ │ ├── ERC721.behavior.js │ │ │ ├── ERC721.test.js │ │ │ ├── ERC721Enumerable.test.js │ │ │ ├── extensions │ │ │ │ ├── ERC721Burnable.test.js │ │ │ │ ├── ERC721Consecutive.t.sol │ │ │ │ ├── ERC721Consecutive.test.js │ │ │ │ ├── ERC721Pausable.test.js │ │ │ │ ├── ERC721Royalty.test.js │ │ │ │ ├── ERC721URIStorage.test.js │ │ │ │ ├── ERC721Votes.test.js │ │ │ │ └── ERC721Wrapper.test.js │ │ │ └── utils │ │ │ │ └── ERC721Holder.test.js │ │ └── common │ │ │ └── ERC2981.behavior.js │ │ └── utils │ │ ├── Address.test.js │ │ ├── Arrays.test.js │ │ ├── Base64.test.js │ │ ├── Context.behavior.js │ │ ├── Context.test.js │ │ ├── Create2.test.js │ │ ├── Multicall.test.js │ │ ├── Nonces.test.js │ │ ├── Pausable.test.js │ │ ├── ReentrancyGuard.test.js │ │ ├── ShortStrings.t.sol │ │ ├── ShortStrings.test.js │ │ ├── StorageSlot.test.js │ │ ├── Strings.test.js │ │ ├── cryptography │ │ ├── ECDSA.test.js │ │ ├── EIP712.test.js │ │ ├── MerkleProof.test.js │ │ ├── MessageHashUtils.test.js │ │ └── SignatureChecker.test.js │ │ ├── introspection │ │ ├── ERC165.test.js │ │ ├── ERC165Checker.test.js │ │ └── SupportsInterface.behavior.js │ │ ├── math │ │ ├── Math.t.sol │ │ ├── Math.test.js │ │ ├── SafeCast.test.js │ │ └── SignedMath.test.js │ │ ├── structs │ │ ├── BitMap.test.js │ │ ├── Checkpoints.t.sol │ │ ├── Checkpoints.test.js │ │ ├── DoubleEndedQueue.test.js │ │ ├── EnumerableMap.behavior.js │ │ ├── EnumerableMap.test.js │ │ ├── EnumerableSet.behavior.js │ │ └── EnumerableSet.test.js │ │ └── types │ │ └── Time.test.js └── openzeppelin-foundry-upgrades │ ├── .github │ ├── actions │ │ └── setup │ │ │ └── action.yml │ └── workflows │ │ └── checks.yml │ ├── .gitignore │ ├── .gitmodules │ ├── .prettierrc │ ├── CONTRIBUTING.md │ ├── DEFENDER.md │ ├── LICENSE │ ├── README.md │ ├── foundry.toml │ ├── lib │ ├── forge-std │ │ ├── .github │ │ │ └── workflows │ │ │ │ ├── ci.yml │ │ │ │ └── sync.yml │ │ ├── .gitignore │ │ ├── .gitmodules │ │ ├── LICENSE-APACHE │ │ ├── LICENSE-MIT │ │ ├── README.md │ │ ├── foundry.toml │ │ ├── lib │ │ │ └── ds-test │ │ │ │ ├── .github │ │ │ │ └── workflows │ │ │ │ │ └── build.yml │ │ │ │ ├── .gitignore │ │ │ │ ├── LICENSE │ │ │ │ ├── Makefile │ │ │ │ ├── default.nix │ │ │ │ ├── demo │ │ │ │ └── demo.sol │ │ │ │ ├── package.json │ │ │ │ └── src │ │ │ │ ├── test.sol │ │ │ │ └── test.t.sol │ │ ├── package.json │ │ ├── src │ │ │ ├── Base.sol │ │ │ ├── Script.sol │ │ │ ├── StdAssertions.sol │ │ │ ├── StdChains.sol │ │ │ ├── StdCheats.sol │ │ │ ├── StdError.sol │ │ │ ├── StdInvariant.sol │ │ │ ├── StdJson.sol │ │ │ ├── StdMath.sol │ │ │ ├── StdStorage.sol │ │ │ ├── StdStyle.sol │ │ │ ├── StdUtils.sol │ │ │ ├── Test.sol │ │ │ ├── Vm.sol │ │ │ ├── console.sol │ │ │ ├── console2.sol │ │ │ ├── interfaces │ │ │ │ ├── IERC1155.sol │ │ │ │ ├── IERC165.sol │ │ │ │ ├── IERC20.sol │ │ │ │ ├── IERC4626.sol │ │ │ │ ├── IERC721.sol │ │ │ │ └── IMulticall3.sol │ │ │ └── safeconsole.sol │ │ └── test │ │ │ ├── StdAssertions.t.sol │ │ │ ├── StdChains.t.sol │ │ │ ├── StdCheats.t.sol │ │ │ ├── StdError.t.sol │ │ │ ├── StdMath.t.sol │ │ │ ├── StdStorage.t.sol │ │ │ ├── StdStyle.t.sol │ │ │ ├── StdUtils.t.sol │ │ │ ├── Vm.t.sol │ │ │ ├── compilation │ │ │ ├── CompilationScript.sol │ │ │ ├── CompilationScriptBase.sol │ │ │ ├── CompilationTest.sol │ │ │ └── CompilationTestBase.sol │ │ │ └── fixtures │ │ │ └── broadcast.log.json │ └── solidity-stringutils │ │ ├── .gitattributes │ │ ├── .github │ │ └── workflows │ │ │ └── ci.yml │ │ ├── .gitignore │ │ ├── .gitmodules │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README │ │ ├── README.md │ │ ├── dappfile │ │ ├── lib │ │ └── ds-test │ │ │ ├── .gitignore │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── default.nix │ │ │ ├── demo │ │ │ └── demo.sol │ │ │ └── src │ │ │ └── test.sol │ │ ├── src │ │ ├── strings.sol │ │ └── strings.t.sol │ │ └── strings.sol │ ├── package.json │ ├── remappings.txt │ ├── scripts │ └── solhint-custom │ │ ├── index.js │ │ └── package.json │ ├── solhint.config.js │ ├── src │ ├── Defender.sol │ ├── Upgrades.sol │ └── internal │ │ ├── DefenderDeploy.sol │ │ ├── Utils.sol │ │ └── Versions.sol │ └── test │ ├── Defender.s.sol │ ├── DefenderDeploy.t.sol │ ├── Upgrades.s.sol │ ├── Upgrades.t.sol │ ├── Utils.t.sol │ └── contracts │ ├── Greeter.sol │ ├── GreeterProxiable.sol │ ├── GreeterV2.sol │ ├── GreeterV2Proxiable.sol │ ├── MyContractFile.sol │ ├── Proxiable.sol │ ├── Validations.sol │ └── WithConstructor.sol ├── package-lock.json ├── package.json ├── remappings.txt ├── src ├── Constants.sol ├── EdgelessDeposit.sol ├── ForceCompile.sol ├── StakingManager.sol ├── WrappedToken.sol ├── interfaces │ ├── ILido.sol │ ├── IStakingStrategy.sol │ └── IWithdrawalQueueERC721.sol ├── strategies │ └── EthStrategy.sol └── upgrade-tests │ ├── UpgradedEdgelessDeposit.sol │ ├── UpgradedEthStrategy.sol │ └── UpgradedStakingManager.sol ├── test ├── AdminTests │ ├── AdminMintWrappedTokens.t.sol │ ├── AdminSetVariables.t.sol │ └── AdminUpgrade.t.sol ├── DepositAndWithdraw.t.sol ├── E2E.t.sol ├── StakingManager.t.sol ├── Strategies │ └── EthStrategy.t.sol └── Utils │ ├── DeploymentUtils.sol │ └── SigUtils.sol └── tsconfig.json /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig http://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | # All files 7 | [*] 8 | charset = utf-8 9 | end_of_line = lf 10 | indent_size = 2 11 | indent_style = space 12 | insert_final_newline = true 13 | trim_trailing_whitespace = true 14 | 15 | [*.sol] 16 | indent_size = 4 17 | 18 | [*.tree] 19 | indent_size = 1 20 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | API_KEY_ALCHEMY="Just the key, not the whole url" 2 | ETHERSCAN_API_KEY="Just the key, not the whole url" 3 | DEPLOYER_PRIVATE_KEY="0x..." 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # directories 2 | cache 3 | coverage 4 | node_modules 5 | out 6 | 7 | # files 8 | *.env 9 | *.log 10 | .DS_Store 11 | .pnp.* 12 | lcov.info 13 | pnpm-lock.yaml 14 | yarn.lock 15 | 16 | # broadcasts 17 | !broadcast 18 | broadcast/* 19 | broadcast/*/31337/ 20 | 21 | node_modules 22 | .env 23 | 24 | # Hardhat files 25 | /cache 26 | /artifacts 27 | 28 | # TypeChain files 29 | /typechain 30 | /typechain-types 31 | 32 | # solidity-coverage files 33 | /coverage 34 | /coverage.json 35 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "lib/openzeppelin-contracts"] 2 | path = lib/openzeppelin-contracts 3 | url = https://github.com/OpenZeppelin/openzeppelin-contracts 4 | [submodule "lib/openzeppelin-foundry-upgrades"] 5 | path = lib/openzeppelin-foundry-upgrades 6 | url = https://github.com/OpenZeppelin/openzeppelin-foundry-upgrades 7 | [submodule "lib/openzeppelin-contracts-upgradeable"] 8 | path = lib/openzeppelin-contracts-upgradeable 9 | url = https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable 10 | [submodule "lib/forge-std"] 11 | path = lib/forge-std 12 | url = https://github.com/foundry-rs/forge-std 13 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | # directories 2 | broadcast 3 | cache 4 | coverage 5 | node_modules 6 | out 7 | 8 | # files 9 | *.env 10 | *.md 11 | *.yml 12 | *.log 13 | .DS_Store 14 | .pnp.* 15 | bun.lockb 16 | lcov.info 17 | package-lock.json 18 | pnpm-lock.yaml 19 | yarn.lock 20 | -------------------------------------------------------------------------------- /.prettierrc.yml: -------------------------------------------------------------------------------- 1 | bracketSpacing: true 2 | printWidth: 120 3 | proseWrap: "always" 4 | singleQuote: false 5 | tabWidth: 2 6 | trailingComma: "all" 7 | useTabs: false 8 | -------------------------------------------------------------------------------- /.solhint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "solhint:recommended", 3 | "rules": { 4 | "code-complexity": [ 5 | "error", 6 | 8 7 | ], 8 | "compiler-version": [ 9 | "error", 10 | ">=0.8.23" 11 | ], 12 | "func-name-mixedcase": "off", 13 | "func-visibility": [ 14 | "error", 15 | { 16 | "ignoreConstructors": true 17 | } 18 | ], 19 | "max-line-length": [ 20 | "error", 21 | 120 22 | ], 23 | "named-parameters-mapping": "warn", 24 | "no-console": "off", 25 | "not-rely-on-time": "off", 26 | "one-contract-per-file": "off", 27 | "low-level-calls": "off" 28 | } 29 | } -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "[solidity]": { 3 | "editor.defaultFormatter": "JuanBlanco.solidity" 4 | }, 5 | "[toml]": { 6 | "editor.defaultFormatter": "tamasfe.even-better-toml" 7 | }, 8 | "solidity.formatter": "forge", 9 | "solidity.compileUsingRemoteVersion": "v0.8.23+commit.f704f362", 10 | "solidity.packageDefaultDependenciesContractsDirectory": "src", 11 | "solidity.packageDefaultDependenciesDirectory": "lib", 12 | "solidity.defaultCompiler": "remote" 13 | } 14 | -------------------------------------------------------------------------------- /EdgelessSystem.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/EdgelessSystem.png -------------------------------------------------------------------------------- /deployments/ethereum/.chainId: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /deployments/localhost/.chainId: -------------------------------------------------------------------------------- 1 | 31337 -------------------------------------------------------------------------------- /deployments/sepolia/.chainId: -------------------------------------------------------------------------------- 1 | 11155111 -------------------------------------------------------------------------------- /lib/forge-std/.gitignore: -------------------------------------------------------------------------------- 1 | cache/ 2 | out/ 3 | .vscode 4 | .idea 5 | -------------------------------------------------------------------------------- /lib/forge-std/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "lib/ds-test"] 2 | path = lib/ds-test 3 | url = https://github.com/dapphub/ds-test 4 | -------------------------------------------------------------------------------- /lib/forge-std/lib/ds-test/.gitignore: -------------------------------------------------------------------------------- 1 | /.dapple 2 | /build 3 | /out 4 | /cache/ 5 | -------------------------------------------------------------------------------- /lib/forge-std/lib/ds-test/Makefile: -------------------------------------------------------------------------------- 1 | all:; dapp build 2 | 3 | test: 4 | -dapp --use solc:0.4.23 build 5 | -dapp --use solc:0.4.26 build 6 | -dapp --use solc:0.5.17 build 7 | -dapp --use solc:0.6.12 build 8 | -dapp --use solc:0.7.5 build 9 | 10 | demo: 11 | DAPP_SRC=demo dapp --use solc:0.7.5 build 12 | -hevm dapp-test --verbose 3 13 | 14 | .PHONY: test demo 15 | -------------------------------------------------------------------------------- /lib/forge-std/lib/ds-test/default.nix: -------------------------------------------------------------------------------- 1 | { solidityPackage, dappsys }: solidityPackage { 2 | name = "ds-test"; 3 | src = ./src; 4 | } 5 | -------------------------------------------------------------------------------- /lib/forge-std/lib/ds-test/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ds-test", 3 | "version": "1.0.0", 4 | "description": "Assertions, equality checks and other test helpers ", 5 | "bugs": "https://github.com/dapphub/ds-test/issues", 6 | "license": "GPL-3.0", 7 | "author": "Contributors to ds-test", 8 | "files": [ 9 | "src/*" 10 | ], 11 | "repository": { 12 | "type": "git", 13 | "url": "https://github.com/dapphub/ds-test.git" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /lib/forge-std/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "forge-std", 3 | "version": "1.7.4", 4 | "description": "Forge Standard Library is a collection of helpful contracts and libraries for use with Forge and Foundry.", 5 | "homepage": "https://book.getfoundry.sh/forge/forge-std", 6 | "bugs": "https://github.com/foundry-rs/forge-std/issues", 7 | "license": "(Apache-2.0 OR MIT)", 8 | "author": "Contributors to Forge Standard Library", 9 | "files": [ 10 | "src/**/*" 11 | ], 12 | "repository": { 13 | "type": "git", 14 | "url": "https://github.com/foundry-rs/forge-std.git" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /lib/forge-std/src/interfaces/IERC165.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.6.2; 3 | 4 | interface IERC165 { 5 | /// @notice Query if a contract implements an interface 6 | /// @param interfaceID The interface identifier, as specified in ERC-165 7 | /// @dev Interface identification is specified in ERC-165. This function 8 | /// uses less than 30,000 gas. 9 | /// @return `true` if the contract implements `interfaceID` and 10 | /// `interfaceID` is not 0xffffffff, `false` otherwise 11 | function supportsInterface(bytes4 interfaceID) external view returns (bool); 12 | } 13 | -------------------------------------------------------------------------------- /lib/forge-std/test/Vm.t.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.8.0 <0.9.0; 3 | 4 | import {Test} from "../src/Test.sol"; 5 | import {Vm, VmSafe} from "../src/Vm.sol"; 6 | 7 | contract VmTest is Test { 8 | // This test ensures that functions are never accidentally removed from a Vm interface, or 9 | // inadvertently moved between Vm and VmSafe. This test must be updated each time a function is 10 | // added to or removed from Vm or VmSafe. 11 | function test_interfaceId() public { 12 | assertEq(type(VmSafe).interfaceId, bytes4(0x5e4a68ae), "VmSafe"); 13 | assertEq(type(Vm).interfaceId, bytes4(0xd6a02054), "Vm"); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /lib/forge-std/test/compilation/CompilationScript.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.6.2 <0.9.0; 3 | 4 | pragma experimental ABIEncoderV2; 5 | 6 | import "../../src/Script.sol"; 7 | 8 | // The purpose of this contract is to benchmark compilation time to avoid accidentally introducing 9 | // a change that results in very long compilation times with via-ir. See https://github.com/foundry-rs/forge-std/issues/207 10 | contract CompilationScript is Script {} 11 | -------------------------------------------------------------------------------- /lib/forge-std/test/compilation/CompilationScriptBase.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.6.2 <0.9.0; 3 | 4 | pragma experimental ABIEncoderV2; 5 | 6 | import "../../src/Script.sol"; 7 | 8 | // The purpose of this contract is to benchmark compilation time to avoid accidentally introducing 9 | // a change that results in very long compilation times with via-ir. See https://github.com/foundry-rs/forge-std/issues/207 10 | contract CompilationScriptBase is ScriptBase {} 11 | -------------------------------------------------------------------------------- /lib/forge-std/test/compilation/CompilationTest.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.6.2 <0.9.0; 3 | 4 | pragma experimental ABIEncoderV2; 5 | 6 | import "../../src/Test.sol"; 7 | 8 | // The purpose of this contract is to benchmark compilation time to avoid accidentally introducing 9 | // a change that results in very long compilation times with via-ir. See https://github.com/foundry-rs/forge-std/issues/207 10 | contract CompilationTest is Test {} 11 | -------------------------------------------------------------------------------- /lib/forge-std/test/compilation/CompilationTestBase.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.6.2 <0.9.0; 3 | 4 | pragma experimental ABIEncoderV2; 5 | 6 | import "../../src/Test.sol"; 7 | 8 | // The purpose of this contract is to benchmark compilation time to avoid accidentally introducing 9 | // a change that results in very long compilation times with via-ir. See https://github.com/foundry-rs/forge-std/issues/207 10 | contract CompilationTestBase is TestBase {} 11 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/.changeset/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json", 3 | "changelog": [ 4 | "@changesets/changelog-github", 5 | { 6 | "repo": "OpenZeppelin/openzeppelin-contracts" 7 | } 8 | ], 9 | "commit": false, 10 | "access": "public", 11 | "baseBranch": "master" 12 | } 13 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/.codecov.yml: -------------------------------------------------------------------------------- 1 | comment: off 2 | github_checks: 3 | annotations: false 4 | coverage: 5 | status: 6 | patch: 7 | default: 8 | target: 95% 9 | only_pulls: true 10 | project: 11 | default: 12 | threshold: 1% 13 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: https://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | [*] 7 | charset = utf-8 8 | end_of_line = lf 9 | indent_style = space 10 | insert_final_newline = true 11 | trim_trailing_whitespace = false 12 | max_line_length = 120 13 | 14 | [*.sol] 15 | indent_size = 4 16 | 17 | [*.js] 18 | indent_size = 2 19 | 20 | [*.{adoc,md}] 21 | max_line_length = 0 22 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends" : [ 4 | "eslint:recommended", 5 | "prettier", 6 | ], 7 | "env": { 8 | "es2022": true, 9 | "browser": true, 10 | "node": true, 11 | "mocha": true, 12 | }, 13 | "globals" : { 14 | "artifacts": "readonly", 15 | "contract": "readonly", 16 | "web3": "readonly", 17 | "extendEnvironment": "readonly", 18 | "expect": "readonly", 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Bug Reports & Feature Requests 4 | url: https://github.com/OpenZeppelin/openzeppelin-contracts/issues/new/choose 5 | about: Visit the OpenZeppelin Contracts repository 6 | - name: Questions & Support Requests 7 | url: https://forum.openzeppelin.com/c/support/contracts/18 8 | about: Ask in the OpenZeppelin Forum 9 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/.github/actions/setup/action.yml: -------------------------------------------------------------------------------- 1 | name: Setup 2 | 3 | runs: 4 | using: composite 5 | steps: 6 | - uses: actions/setup-node@v3 7 | with: 8 | node-version: 16.x 9 | - uses: actions/cache@v3 10 | id: cache 11 | with: 12 | path: '**/node_modules' 13 | key: npm-v3-${{ hashFiles('**/package-lock.json') }} 14 | - name: Install dependencies 15 | run: npm ci 16 | shell: bash 17 | if: steps.cache.outputs.cache-hit != 'true' 18 | - name: Install Foundry 19 | uses: foundry-rs/foundry-toolchain@v1 20 | with: 21 | version: nightly 22 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/.github/workflows/actionlint.yml: -------------------------------------------------------------------------------- 1 | name: lint workflows 2 | 3 | on: 4 | pull_request: 5 | paths: 6 | - '.github/**/*.ya?ml' 7 | 8 | jobs: 9 | lint: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v4 13 | - name: Add problem matchers 14 | run: | 15 | # https://github.com/rhysd/actionlint/blob/3a2f2c7/docs/usage.md#problem-matchers 16 | curl -LO https://raw.githubusercontent.com/rhysd/actionlint/main/.github/actionlint-matcher.json 17 | echo "::add-matcher::actionlint-matcher.json" 18 | - uses: docker://rhysd/actionlint:latest 19 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/.github/workflows/docs.yml: -------------------------------------------------------------------------------- 1 | name: Build Docs 2 | 3 | on: 4 | push: 5 | branches: [release-v*] 6 | 7 | permissions: 8 | contents: write 9 | 10 | jobs: 11 | build: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: actions/checkout@v4 15 | - name: Set up environment 16 | uses: ./.github/actions/setup 17 | - run: bash scripts/git-user-config.sh 18 | - run: node scripts/update-docs-branch.js 19 | - run: git push --all origin 20 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "lib/forge-std"] 2 | branch = v1 3 | path = lib/forge-std 4 | url = https://github.com/foundry-rs/forge-std 5 | [submodule "lib/erc4626-tests"] 6 | path = lib/erc4626-tests 7 | url = https://github.com/a16z/erc4626-tests.git 8 | [submodule "lib/openzeppelin-contracts"] 9 | path = lib/openzeppelin-contracts 10 | url = https://github.com/OpenZeppelin/openzeppelin-contracts.git 11 | branch = release-v5.0 12 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/.mocharc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | require: 'hardhat/register', 3 | timeout: 4000, 4 | }; 5 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 120, 3 | "singleQuote": true, 4 | "trailingComma": "all", 5 | "arrowParens": "avoid", 6 | "overrides": [ 7 | { 8 | "files": "*.sol", 9 | "options": { 10 | "singleQuote": false 11 | } 12 | } 13 | ], 14 | "plugins": ["prettier-plugin-solidity"] 15 | } 16 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/.solcover.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | norpc: true, 3 | testCommand: 'npm test', 4 | compileCommand: 'npm run compile', 5 | skipFiles: ['mocks'], 6 | providerOptions: { 7 | default_balance_ether: '10000000000000000000000000', 8 | }, 9 | mocha: { 10 | fgrep: '[skip-on-coverage]', 11 | invert: true, 12 | }, 13 | }; 14 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/audits/2018-10.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts-upgradeable/audits/2018-10.pdf -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/audits/2022-10-Checkpoints.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts-upgradeable/audits/2022-10-Checkpoints.pdf -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/audits/2022-10-ERC4626.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts-upgradeable/audits/2022-10-ERC4626.pdf -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/audits/2023-05-v4.9.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts-upgradeable/audits/2023-05-v4.9.pdf -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/audits/2023-10-v5.0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts-upgradeable/audits/2023-10-v5.0.pdf -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/certora/.gitignore: -------------------------------------------------------------------------------- 1 | patched 2 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/certora/harnesses/AccessControlHarness.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | import {AccessControl} from "../patched/access/AccessControl.sol"; 5 | 6 | contract AccessControlHarness is AccessControl {} 7 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/certora/harnesses/ERC20PermitHarness.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | import {ERC20Permit, ERC20} from "../patched/token/ERC20/extensions/ERC20Permit.sol"; 5 | 6 | contract ERC20PermitHarness is ERC20Permit { 7 | constructor(string memory name, string memory symbol) ERC20(name, symbol) ERC20Permit(name) {} 8 | 9 | function mint(address account, uint256 amount) external { 10 | _mint(account, amount); 11 | } 12 | 13 | function burn(address account, uint256 amount) external { 14 | _burn(account, amount); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/certora/harnesses/ERC3156FlashBorrowerHarness.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | import {IERC3156FlashBorrower} from "../patched/interfaces/IERC3156FlashBorrower.sol"; 4 | 5 | pragma solidity ^0.8.20; 6 | 7 | contract ERC3156FlashBorrowerHarness is IERC3156FlashBorrower { 8 | bytes32 somethingToReturn; 9 | 10 | function onFlashLoan(address, address, uint256, uint256, bytes calldata) external view override returns (bytes32) { 11 | return somethingToReturn; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/certora/harnesses/ERC721ReceiverHarness.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | import "../patched/interfaces/IERC721Receiver.sol"; 6 | 7 | contract ERC721ReceiverHarness is IERC721Receiver { 8 | function onERC721Received(address, address, uint256, bytes calldata) external pure returns (bytes4) { 9 | return this.onERC721Received.selector; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/certora/harnesses/Ownable2StepHarness.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | import {Ownable2Step, Ownable} from "../patched/access/Ownable2Step.sol"; 5 | 6 | contract Ownable2StepHarness is Ownable2Step { 7 | constructor(address initialOwner) Ownable(initialOwner) {} 8 | 9 | function restricted() external onlyOwner {} 10 | } 11 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/certora/harnesses/OwnableHarness.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | import {Ownable} from "../patched/access/Ownable.sol"; 5 | 6 | contract OwnableHarness is Ownable { 7 | constructor(address initialOwner) Ownable(initialOwner) {} 8 | 9 | function restricted() external onlyOwner {} 10 | } 11 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/certora/harnesses/PausableHarness.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | import {Pausable} from "../patched/utils/Pausable.sol"; 5 | 6 | contract PausableHarness is Pausable { 7 | function pause() external { 8 | _pause(); 9 | } 10 | 11 | function unpause() external { 12 | _unpause(); 13 | } 14 | 15 | function onlyWhenPaused() external whenPaused {} 16 | 17 | function onlyWhenNotPaused() external whenNotPaused {} 18 | } 19 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/certora/harnesses/TimelockControllerHarness.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | import {TimelockController} from "../patched/governance/TimelockController.sol"; 5 | 6 | contract TimelockControllerHarness is TimelockController { 7 | constructor( 8 | uint256 minDelay, 9 | address[] memory proposers, 10 | address[] memory executors, 11 | address admin 12 | ) TimelockController(minDelay, proposers, executors, admin) {} 13 | } 14 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/certora/reports/2021-10.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts-upgradeable/certora/reports/2021-10.pdf -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/certora/reports/2022-03.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts-upgradeable/certora/reports/2022-03.pdf -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/certora/reports/2022-05.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts-upgradeable/certora/reports/2022-05.pdf -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/certora/specs/helpers/helpers.spec: -------------------------------------------------------------------------------- 1 | // environment 2 | definition nonpayable(env e) returns bool = e.msg.value == 0; 3 | definition nonzerosender(env e) returns bool = e.msg.sender != 0; 4 | 5 | // math 6 | definition min(mathint a, mathint b) returns mathint = a < b ? a : b; 7 | definition max(mathint a, mathint b) returns mathint = a > b ? a : b; 8 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/certora/specs/methods/IAccessControl.spec: -------------------------------------------------------------------------------- 1 | methods { 2 | function DEFAULT_ADMIN_ROLE() external returns (bytes32) envfree; 3 | function hasRole(bytes32, address) external returns(bool) envfree; 4 | function getRoleAdmin(bytes32) external returns(bytes32) envfree; 5 | function grantRole(bytes32, address) external; 6 | function revokeRole(bytes32, address) external; 7 | function renounceRole(bytes32, address) external; 8 | } 9 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/certora/specs/methods/IERC2612.spec: -------------------------------------------------------------------------------- 1 | methods { 2 | function permit(address,address,uint256,uint256,uint8,bytes32,bytes32) external; 3 | function nonces(address) external returns (uint256) envfree; 4 | function DOMAIN_SEPARATOR() external returns (bytes32) envfree; 5 | } 6 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/certora/specs/methods/IERC3156FlashBorrower.spec: -------------------------------------------------------------------------------- 1 | methods { 2 | function _.onFlashLoan(address,address,uint256,uint256,bytes) external => DISPATCHER(true); 3 | } 4 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/certora/specs/methods/IERC3156FlashLender.spec: -------------------------------------------------------------------------------- 1 | methods { 2 | function maxFlashLoan(address) external returns (uint256) envfree; 3 | function flashFee(address,uint256) external returns (uint256) envfree; 4 | function flashLoan(address,address,uint256,bytes) external returns (bool); 5 | } 6 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/certora/specs/methods/IERC5313.spec: -------------------------------------------------------------------------------- 1 | methods { 2 | function owner() external returns (address) envfree; 3 | } 4 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/certora/specs/methods/IERC721Receiver.spec: -------------------------------------------------------------------------------- 1 | methods { 2 | function _.onERC721Received(address,address,uint256,bytes) external => DISPATCHER(true); 3 | } 4 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/certora/specs/methods/IOwnable.spec: -------------------------------------------------------------------------------- 1 | methods { 2 | function owner() external returns (address) envfree; 3 | function transferOwnership(address) external; 4 | function renounceOwnership() external; 5 | } 6 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/certora/specs/methods/IOwnable2Step.spec: -------------------------------------------------------------------------------- 1 | methods { 2 | function owner() external returns (address) envfree; 3 | function pendingOwner() external returns (address) envfree; 4 | function transferOwnership(address) external; 5 | function acceptOwnership() external; 6 | function renounceOwnership() external; 7 | } 8 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/contracts/finance/README.adoc: -------------------------------------------------------------------------------- 1 | = Finance 2 | 3 | [.readme-notice] 4 | NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/finance 5 | 6 | This directory includes primitives for financial systems: 7 | 8 | - {VestingWallet} handles the vesting of Ether and ERC20 tokens for a given beneficiary. Custody of multiple tokens can 9 | be given to this contract, which will release the token to the beneficiary following a given, customizable, vesting 10 | schedule. 11 | 12 | == Contracts 13 | 14 | {{VestingWallet}} 15 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/contracts/metatx/README.adoc: -------------------------------------------------------------------------------- 1 | = Meta Transactions 2 | 3 | [.readme-notice] 4 | NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/metatx 5 | 6 | == Core 7 | 8 | {{ERC2771Context}} 9 | 10 | == Utils 11 | 12 | {{ERC2771Forwarder}} 13 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/contracts/mocks/ERC165/ERC165MissingDataUpgradeable.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | import {Initializable} from "../../proxy/utils/Initializable.sol"; 5 | 6 | contract ERC165MissingDataUpgradeable is Initializable { 7 | function __ERC165MissingData_init() internal onlyInitializing { 8 | } 9 | 10 | function __ERC165MissingData_init_unchained() internal onlyInitializing { 11 | } 12 | function supportsInterface(bytes4 interfaceId) public view {} // missing return 13 | } 14 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/contracts/mocks/ERC165/ERC165NotSupportedUpgradeable.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | import {Initializable} from "../../proxy/utils/Initializable.sol"; 5 | 6 | contract ERC165NotSupportedUpgradeable is Initializable { function __ERC165NotSupported_init() internal onlyInitializing { 7 | } 8 | 9 | function __ERC165NotSupported_init_unchained() internal onlyInitializing { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/contracts/mocks/token/ERC20ExcessDecimalsMockUpgradeable.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | import {Initializable} from "../../proxy/utils/Initializable.sol"; 5 | 6 | contract ERC20ExcessDecimalsMockUpgradeable is Initializable { 7 | function __ERC20ExcessDecimalsMock_init() internal onlyInitializing { 8 | } 9 | 10 | function __ERC20ExcessDecimalsMock_init_unchained() internal onlyInitializing { 11 | } 12 | function decimals() public pure returns (uint256) { 13 | return type(uint256).max; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/contracts/mocks/token/ERC20MulticallMockUpgradeable.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | import {ERC20Upgradeable} from "../../token/ERC20/ERC20Upgradeable.sol"; 6 | import {MulticallUpgradeable} from "../../utils/MulticallUpgradeable.sol"; 7 | import {Initializable} from "../../proxy/utils/Initializable.sol"; 8 | 9 | abstract contract ERC20MulticallMockUpgradeable is Initializable, ERC20Upgradeable, MulticallUpgradeable { function __ERC20MulticallMock_init() internal onlyInitializing { 10 | } 11 | 12 | function __ERC20MulticallMock_init_unchained() internal onlyInitializing { 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/contracts/token/common/README.adoc: -------------------------------------------------------------------------------- 1 | = Common (Tokens) 2 | 3 | Functionality that is common to multiple token standards. 4 | 5 | * {ERC2981}: NFT Royalties compatible with both ERC721 and ERC1155. 6 | ** For ERC721 consider {ERC721Royalty} which clears the royalty information from storage on burn. 7 | 8 | == Contracts 9 | 10 | {{ERC2981}} 11 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/docs/antora.yml: -------------------------------------------------------------------------------- 1 | name: contracts 2 | title: Contracts 3 | version: 5.x 4 | prerelease: false 5 | nav: 6 | - modules/ROOT/nav.adoc 7 | - modules/api/nav.adoc 8 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/erc4626-attack-3a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/erc4626-attack-3a.png -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/erc4626-attack-3b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/erc4626-attack-3b.png -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/erc4626-attack-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/erc4626-attack-6.png -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/erc4626-attack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/erc4626-attack.png -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/erc4626-deposit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/erc4626-deposit.png -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/erc4626-mint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/erc4626-mint.png -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/erc4626-rate-linear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/erc4626-rate-linear.png -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/erc4626-rate-loglog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/erc4626-rate-loglog.png -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/erc4626-rate-loglogext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/erc4626-rate-loglogext.png -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/tally-exec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/tally-exec.png -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/tally-vote.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts-upgradeable/docs/modules/ROOT/images/tally-vote.png -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/docs/templates/page.hbs: -------------------------------------------------------------------------------- 1 | :github-icon: pass:[] 2 | {{#with-prelude}} 3 | {{readme (readme-path)}} 4 | {{/with-prelude}} 5 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/foundry.toml: -------------------------------------------------------------------------------- 1 | [profile.default] 2 | src = 'contracts' 3 | out = 'out' 4 | libs = ['node_modules', 'lib'] 5 | test = 'test' 6 | cache_path = 'cache_forge' 7 | 8 | [fuzz] 9 | runs = 10000 10 | max_test_rejects = 150000 11 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/hardhat/skip-foundry-tests.js: -------------------------------------------------------------------------------- 1 | const { subtask } = require('hardhat/config'); 2 | const { TASK_COMPILE_SOLIDITY_GET_SOURCE_PATHS } = require('hardhat/builtin-tasks/task-names'); 3 | 4 | subtask(TASK_COMPILE_SOLIDITY_GET_SOURCE_PATHS).setAction(async (_, __, runSuper) => 5 | (await runSuper()).filter(path => !path.endsWith('.t.sol')), 6 | ); 7 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/forge-std/.gitignore: -------------------------------------------------------------------------------- 1 | cache/ 2 | out/ 3 | .vscode 4 | .idea 5 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/forge-std/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "lib/ds-test"] 2 | path = lib/ds-test 3 | url = https://github.com/dapphub/ds-test 4 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/forge-std/lib/ds-test/.gitignore: -------------------------------------------------------------------------------- 1 | /.dapple 2 | /build 3 | /out 4 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/forge-std/lib/ds-test/Makefile: -------------------------------------------------------------------------------- 1 | all:; dapp build 2 | 3 | test: 4 | -dapp --use solc:0.4.23 build 5 | -dapp --use solc:0.4.26 build 6 | -dapp --use solc:0.5.17 build 7 | -dapp --use solc:0.6.12 build 8 | -dapp --use solc:0.7.5 build 9 | 10 | demo: 11 | DAPP_SRC=demo dapp --use solc:0.7.5 build 12 | -hevm dapp-test --verbose 3 13 | 14 | .PHONY: test demo 15 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/forge-std/lib/ds-test/default.nix: -------------------------------------------------------------------------------- 1 | { solidityPackage, dappsys }: solidityPackage { 2 | name = "ds-test"; 3 | src = ./src; 4 | } 5 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/forge-std/lib/ds-test/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ds-test", 3 | "version": "1.0.0", 4 | "description": "Assertions, equality checks and other test helpers ", 5 | "bugs": "https://github.com/dapphub/ds-test/issues", 6 | "license": "GPL-3.0", 7 | "author": "Contributors to ds-test", 8 | "files": [ 9 | "src/*" 10 | ], 11 | "repository": { 12 | "type": "git", 13 | "url": "https://github.com/dapphub/ds-test.git" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/forge-std/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "forge-std", 3 | "version": "1.2.0", 4 | "description": "Forge Standard Library is a collection of helpful contracts and libraries for use with Forge and Foundry.", 5 | "homepage": "https://book.getfoundry.sh/forge/forge-std", 6 | "bugs": "https://github.com/foundry-rs/forge-std/issues", 7 | "license": "(Apache-2.0 OR MIT)", 8 | "author": "Contributors to Forge Standard Library", 9 | "files": [ 10 | "src/*" 11 | ], 12 | "repository": { 13 | "type": "git", 14 | "url": "https://github.com/foundry-rs/forge-std.git" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/forge-std/src/interfaces/IERC165.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.6.2; 3 | 4 | interface IERC165 { 5 | /// @notice Query if a contract implements an interface 6 | /// @param interfaceID The interface identifier, as specified in ERC-165 7 | /// @dev Interface identification is specified in ERC-165. This function 8 | /// uses less than 30,000 gas. 9 | /// @return `true` if the contract implements `interfaceID` and 10 | /// `interfaceID` is not 0xffffffff, `false` otherwise 11 | function supportsInterface(bytes4 interfaceID) external view returns (bool); 12 | } 13 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/forge-std/test/compilation/CompilationScript.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.6.2 <0.9.0; 3 | 4 | pragma experimental ABIEncoderV2; 5 | 6 | import "../../src/Script.sol"; 7 | 8 | // The purpose of this contract is to benchmark compilation time to avoid accidentally introducing 9 | // a change that results in very long compilation times with via-ir. See https://github.com/foundry-rs/forge-std/issues/207 10 | contract CompilationScript is Script {} 11 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/forge-std/test/compilation/CompilationScriptBase.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.6.2 <0.9.0; 3 | 4 | pragma experimental ABIEncoderV2; 5 | 6 | import "../../src/Script.sol"; 7 | 8 | // The purpose of this contract is to benchmark compilation time to avoid accidentally introducing 9 | // a change that results in very long compilation times with via-ir. See https://github.com/foundry-rs/forge-std/issues/207 10 | contract CompilationScriptBase is ScriptBase {} 11 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/forge-std/test/compilation/CompilationTest.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.6.2 <0.9.0; 3 | 4 | pragma experimental ABIEncoderV2; 5 | 6 | import "../../src/Test.sol"; 7 | 8 | // The purpose of this contract is to benchmark compilation time to avoid accidentally introducing 9 | // a change that results in very long compilation times with via-ir. See https://github.com/foundry-rs/forge-std/issues/207 10 | contract CompilationTest is Test {} 11 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/forge-std/test/compilation/CompilationTestBase.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.6.2 <0.9.0; 3 | 4 | pragma experimental ABIEncoderV2; 5 | 6 | import "../../src/Test.sol"; 7 | 8 | // The purpose of this contract is to benchmark compilation time to avoid accidentally introducing 9 | // a change that results in very long compilation times with via-ir. See https://github.com/foundry-rs/forge-std/issues/207 10 | contract CompilationTestBase is TestBase {} 11 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/.changeset/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json", 3 | "changelog": [ 4 | "@changesets/changelog-github", 5 | { 6 | "repo": "OpenZeppelin/openzeppelin-contracts" 7 | } 8 | ], 9 | "commit": false, 10 | "access": "public", 11 | "baseBranch": "master" 12 | } 13 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/.codecov.yml: -------------------------------------------------------------------------------- 1 | comment: off 2 | github_checks: 3 | annotations: false 4 | coverage: 5 | status: 6 | patch: 7 | default: 8 | target: 95% 9 | only_pulls: true 10 | project: 11 | default: 12 | threshold: 1% 13 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: https://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | [*] 7 | charset = utf-8 8 | end_of_line = lf 9 | indent_style = space 10 | insert_final_newline = true 11 | trim_trailing_whitespace = false 12 | max_line_length = 120 13 | 14 | [*.sol] 15 | indent_size = 4 16 | 17 | [*.js] 18 | indent_size = 2 19 | 20 | [*.{adoc,md}] 21 | max_line_length = 0 22 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends" : [ 4 | "eslint:recommended", 5 | "prettier", 6 | ], 7 | "env": { 8 | "es2022": true, 9 | "browser": true, 10 | "node": true, 11 | "mocha": true, 12 | }, 13 | "globals" : { 14 | "artifacts": "readonly", 15 | "contract": "readonly", 16 | "web3": "readonly", 17 | "extendEnvironment": "readonly", 18 | "expect": "readonly", 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | contact_links: 2 | - name: Questions & Support Requests 3 | url: https://forum.openzeppelin.com/c/support/contracts/18 4 | about: Ask in the OpenZeppelin Forum 5 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for OpenZeppelin Contracts 4 | 5 | --- 6 | 7 | **🧐 Motivation** 8 | 9 | 10 | **📝 Details** 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/.github/actions/setup/action.yml: -------------------------------------------------------------------------------- 1 | name: Setup 2 | 3 | runs: 4 | using: composite 5 | steps: 6 | - uses: actions/setup-node@v3 7 | with: 8 | node-version: 16.x 9 | - uses: actions/cache@v3 10 | id: cache 11 | with: 12 | path: '**/node_modules' 13 | key: npm-v3-${{ hashFiles('**/package-lock.json') }} 14 | - name: Install dependencies 15 | run: npm ci 16 | shell: bash 17 | if: steps.cache.outputs.cache-hit != 'true' 18 | - name: Install Foundry 19 | uses: foundry-rs/foundry-toolchain@v1 20 | with: 21 | version: nightly 22 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/.github/workflows/actionlint.yml: -------------------------------------------------------------------------------- 1 | name: lint workflows 2 | 3 | on: 4 | pull_request: 5 | paths: 6 | - '.github/**/*.ya?ml' 7 | 8 | jobs: 9 | lint: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v4 13 | - name: Add problem matchers 14 | run: | 15 | # https://github.com/rhysd/actionlint/blob/3a2f2c7/docs/usage.md#problem-matchers 16 | curl -LO https://raw.githubusercontent.com/rhysd/actionlint/main/.github/actionlint-matcher.json 17 | echo "::add-matcher::actionlint-matcher.json" 18 | - uses: docker://rhysd/actionlint:latest 19 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/.github/workflows/docs.yml: -------------------------------------------------------------------------------- 1 | name: Build Docs 2 | 3 | on: 4 | push: 5 | branches: [release-v*] 6 | 7 | permissions: 8 | contents: write 9 | 10 | jobs: 11 | build: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: actions/checkout@v4 15 | - name: Set up environment 16 | uses: ./.github/actions/setup 17 | - run: bash scripts/git-user-config.sh 18 | - run: node scripts/update-docs-branch.js 19 | - run: git push --all origin 20 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "lib/forge-std"] 2 | branch = v1 3 | path = lib/forge-std 4 | url = https://github.com/foundry-rs/forge-std 5 | [submodule "lib/erc4626-tests"] 6 | path = lib/erc4626-tests 7 | url = https://github.com/a16z/erc4626-tests.git 8 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/.mocharc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | require: 'hardhat/register', 3 | timeout: 4000, 4 | }; 5 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 120, 3 | "singleQuote": true, 4 | "trailingComma": "all", 5 | "arrowParens": "avoid", 6 | "overrides": [ 7 | { 8 | "files": "*.sol", 9 | "options": { 10 | "singleQuote": false 11 | } 12 | } 13 | ], 14 | "plugins": ["prettier-plugin-solidity"] 15 | } 16 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/.solcover.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | norpc: true, 3 | testCommand: 'npm test', 4 | compileCommand: 'npm run compile', 5 | skipFiles: ['mocks'], 6 | providerOptions: { 7 | default_balance_ether: '10000000000000000000000000', 8 | }, 9 | mocha: { 10 | fgrep: '[skip-on-coverage]', 11 | invert: true, 12 | }, 13 | }; 14 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/audits/2018-10.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/audits/2018-10.pdf -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/audits/2022-10-Checkpoints.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/audits/2022-10-Checkpoints.pdf -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/audits/2022-10-ERC4626.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/audits/2022-10-ERC4626.pdf -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/audits/2023-05-v4.9.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/audits/2023-05-v4.9.pdf -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/audits/2023-10-v5.0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/audits/2023-10-v5.0.pdf -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/certora/.gitignore: -------------------------------------------------------------------------------- 1 | patched 2 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/certora/harnesses/AccessControlHarness.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | import {AccessControl} from "../patched/access/AccessControl.sol"; 5 | 6 | contract AccessControlHarness is AccessControl {} 7 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/certora/harnesses/ERC20PermitHarness.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | import {ERC20Permit, ERC20} from "../patched/token/ERC20/extensions/ERC20Permit.sol"; 5 | 6 | contract ERC20PermitHarness is ERC20Permit { 7 | constructor(string memory name, string memory symbol) ERC20(name, symbol) ERC20Permit(name) {} 8 | 9 | function mint(address account, uint256 amount) external { 10 | _mint(account, amount); 11 | } 12 | 13 | function burn(address account, uint256 amount) external { 14 | _burn(account, amount); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/certora/harnesses/ERC3156FlashBorrowerHarness.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | import {IERC3156FlashBorrower} from "../patched/interfaces/IERC3156FlashBorrower.sol"; 4 | 5 | pragma solidity ^0.8.20; 6 | 7 | contract ERC3156FlashBorrowerHarness is IERC3156FlashBorrower { 8 | bytes32 somethingToReturn; 9 | 10 | function onFlashLoan(address, address, uint256, uint256, bytes calldata) external view override returns (bytes32) { 11 | return somethingToReturn; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/certora/harnesses/ERC721ReceiverHarness.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | import "../patched/interfaces/IERC721Receiver.sol"; 6 | 7 | contract ERC721ReceiverHarness is IERC721Receiver { 8 | function onERC721Received(address, address, uint256, bytes calldata) external pure returns (bytes4) { 9 | return this.onERC721Received.selector; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/certora/harnesses/Ownable2StepHarness.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | import {Ownable2Step, Ownable} from "../patched/access/Ownable2Step.sol"; 5 | 6 | contract Ownable2StepHarness is Ownable2Step { 7 | constructor(address initialOwner) Ownable(initialOwner) {} 8 | 9 | function restricted() external onlyOwner {} 10 | } 11 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/certora/harnesses/OwnableHarness.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | import {Ownable} from "../patched/access/Ownable.sol"; 5 | 6 | contract OwnableHarness is Ownable { 7 | constructor(address initialOwner) Ownable(initialOwner) {} 8 | 9 | function restricted() external onlyOwner {} 10 | } 11 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/certora/harnesses/PausableHarness.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | import {Pausable} from "../patched/utils/Pausable.sol"; 5 | 6 | contract PausableHarness is Pausable { 7 | function pause() external { 8 | _pause(); 9 | } 10 | 11 | function unpause() external { 12 | _unpause(); 13 | } 14 | 15 | function onlyWhenPaused() external whenPaused {} 16 | 17 | function onlyWhenNotPaused() external whenNotPaused {} 18 | } 19 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/certora/harnesses/TimelockControllerHarness.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | import {TimelockController} from "../patched/governance/TimelockController.sol"; 5 | 6 | contract TimelockControllerHarness is TimelockController { 7 | constructor( 8 | uint256 minDelay, 9 | address[] memory proposers, 10 | address[] memory executors, 11 | address admin 12 | ) TimelockController(minDelay, proposers, executors, admin) {} 13 | } 14 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/certora/reports/2021-10.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/certora/reports/2021-10.pdf -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/certora/reports/2022-03.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/certora/reports/2022-03.pdf -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/certora/reports/2022-05.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/certora/reports/2022-05.pdf -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/certora/specs/helpers/helpers.spec: -------------------------------------------------------------------------------- 1 | // environment 2 | definition nonpayable(env e) returns bool = e.msg.value == 0; 3 | definition nonzerosender(env e) returns bool = e.msg.sender != 0; 4 | 5 | // math 6 | definition min(mathint a, mathint b) returns mathint = a < b ? a : b; 7 | definition max(mathint a, mathint b) returns mathint = a > b ? a : b; 8 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/certora/specs/methods/IAccessControl.spec: -------------------------------------------------------------------------------- 1 | methods { 2 | function DEFAULT_ADMIN_ROLE() external returns (bytes32) envfree; 3 | function hasRole(bytes32, address) external returns(bool) envfree; 4 | function getRoleAdmin(bytes32) external returns(bytes32) envfree; 5 | function grantRole(bytes32, address) external; 6 | function revokeRole(bytes32, address) external; 7 | function renounceRole(bytes32, address) external; 8 | } 9 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/certora/specs/methods/IERC2612.spec: -------------------------------------------------------------------------------- 1 | methods { 2 | function permit(address,address,uint256,uint256,uint8,bytes32,bytes32) external; 3 | function nonces(address) external returns (uint256) envfree; 4 | function DOMAIN_SEPARATOR() external returns (bytes32) envfree; 5 | } 6 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/certora/specs/methods/IERC3156FlashBorrower.spec: -------------------------------------------------------------------------------- 1 | methods { 2 | function _.onFlashLoan(address,address,uint256,uint256,bytes) external => DISPATCHER(true); 3 | } 4 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/certora/specs/methods/IERC3156FlashLender.spec: -------------------------------------------------------------------------------- 1 | methods { 2 | function maxFlashLoan(address) external returns (uint256) envfree; 3 | function flashFee(address,uint256) external returns (uint256) envfree; 4 | function flashLoan(address,address,uint256,bytes) external returns (bool); 5 | } 6 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/certora/specs/methods/IERC5313.spec: -------------------------------------------------------------------------------- 1 | methods { 2 | function owner() external returns (address) envfree; 3 | } 4 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/certora/specs/methods/IERC721Receiver.spec: -------------------------------------------------------------------------------- 1 | methods { 2 | function _.onERC721Received(address,address,uint256,bytes) external => DISPATCHER(true); 3 | } 4 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/certora/specs/methods/IOwnable.spec: -------------------------------------------------------------------------------- 1 | methods { 2 | function owner() external returns (address) envfree; 3 | function transferOwnership(address) external; 4 | function renounceOwnership() external; 5 | } 6 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/certora/specs/methods/IOwnable2Step.spec: -------------------------------------------------------------------------------- 1 | methods { 2 | function owner() external returns (address) envfree; 3 | function pendingOwner() external returns (address) envfree; 4 | function transferOwnership(address) external; 5 | function acceptOwnership() external; 6 | function renounceOwnership() external; 7 | } 8 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/access/manager/IAuthority.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (access/manager/IAuthority.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | /** 7 | * @dev Standard interface for permissioning originally defined in Dappsys. 8 | */ 9 | interface IAuthority { 10 | /** 11 | * @dev Returns true if the caller can invoke on a target the function identified by a function selector. 12 | */ 13 | function canCall(address caller, address target, bytes4 selector) external view returns (bool allowed); 14 | } 15 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/finance/README.adoc: -------------------------------------------------------------------------------- 1 | = Finance 2 | 3 | [.readme-notice] 4 | NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/finance 5 | 6 | This directory includes primitives for financial systems: 7 | 8 | - {VestingWallet} handles the vesting of Ether and ERC20 tokens for a given beneficiary. Custody of multiple tokens can 9 | be given to this contract, which will release the token to the beneficiary following a given, customizable, vesting 10 | schedule. 11 | 12 | == Contracts 13 | 14 | {{VestingWallet}} 15 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/interfaces/IERC1155.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC1155.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC1155} from "../token/ERC1155/IERC1155.sol"; 7 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/interfaces/IERC1155MetadataURI.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC1155MetadataURI.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC1155MetadataURI} from "../token/ERC1155/extensions/IERC1155MetadataURI.sol"; 7 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/interfaces/IERC1155Receiver.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC1155Receiver.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC1155Receiver} from "../token/ERC1155/IERC1155Receiver.sol"; 7 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/interfaces/IERC165.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC165} from "../utils/introspection/IERC165.sol"; 7 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC20} from "../token/ERC20/IERC20.sol"; 7 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/interfaces/IERC20Metadata.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20Metadata.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC20Metadata} from "../token/ERC20/extensions/IERC20Metadata.sol"; 7 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/interfaces/IERC2612.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC2612.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC20Permit} from "../token/ERC20/extensions/IERC20Permit.sol"; 7 | 8 | interface IERC2612 is IERC20Permit {} 9 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/interfaces/IERC3156.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC3156.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC3156FlashBorrower} from "./IERC3156FlashBorrower.sol"; 7 | import {IERC3156FlashLender} from "./IERC3156FlashLender.sol"; 8 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/interfaces/IERC5313.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5313.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | /** 7 | * @dev Interface for the Light Contract Ownership Standard. 8 | * 9 | * A standardized minimal interface required to identify an account that controls a contract 10 | */ 11 | interface IERC5313 { 12 | /** 13 | * @dev Gets the address of the owner. 14 | */ 15 | function owner() external view returns (address); 16 | } 17 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/interfaces/IERC5805.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5805.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IVotes} from "../governance/utils/IVotes.sol"; 7 | import {IERC6372} from "./IERC6372.sol"; 8 | 9 | interface IERC5805 is IERC6372, IVotes {} 10 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/interfaces/IERC6372.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC6372.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | interface IERC6372 { 7 | /** 8 | * @dev Clock used for flagging checkpoints. Can be overridden to implement timestamp based checkpoints (and voting). 9 | */ 10 | function clock() external view returns (uint48); 11 | 12 | /** 13 | * @dev Description of the clock 14 | */ 15 | // solhint-disable-next-line func-name-mixedcase 16 | function CLOCK_MODE() external view returns (string memory); 17 | } 18 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/interfaces/IERC721.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC721.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC721} from "../token/ERC721/IERC721.sol"; 7 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/interfaces/IERC721Enumerable.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC721Enumerable.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC721Enumerable} from "../token/ERC721/extensions/IERC721Enumerable.sol"; 7 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/interfaces/IERC721Metadata.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC721Metadata.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC721Metadata} from "../token/ERC721/extensions/IERC721Metadata.sol"; 7 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/interfaces/IERC721Receiver.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC721Receiver.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC721Receiver} from "../token/ERC721/IERC721Receiver.sol"; 7 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/metatx/README.adoc: -------------------------------------------------------------------------------- 1 | = Meta Transactions 2 | 3 | [.readme-notice] 4 | NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/metatx 5 | 6 | == Core 7 | 8 | {{ERC2771Context}} 9 | 10 | == Utils 11 | 12 | {{ERC2771Forwarder}} 13 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/ERC165/ERC165MaliciousData.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | contract ERC165MaliciousData { 6 | function supportsInterface(bytes4) public pure returns (bool) { 7 | assembly { 8 | mstore(0, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) 9 | return(0, 32) 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/ERC165/ERC165MissingData.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | contract ERC165MissingData { 6 | function supportsInterface(bytes4 interfaceId) public view {} // missing return 7 | } 8 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/ERC165/ERC165NotSupported.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | contract ERC165NotSupported {} 6 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/ERC165/ERC165ReturnBomb.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | import {IERC165} from "../../utils/introspection/IERC165.sol"; 6 | 7 | contract ERC165ReturnBombMock is IERC165 { 8 | function supportsInterface(bytes4 interfaceId) public pure override returns (bool) { 9 | if (interfaceId == type(IERC165).interfaceId) { 10 | assembly { 11 | mstore(0, 1) 12 | } 13 | } 14 | assembly { 15 | return(0, 101500) 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/EtherReceiverMock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | contract EtherReceiverMock { 6 | bool private _acceptEther; 7 | 8 | function setAcceptEther(bool acceptEther) public { 9 | _acceptEther = acceptEther; 10 | } 11 | 12 | receive() external payable { 13 | if (!_acceptEther) { 14 | revert(); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/ReentrancyAttack.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | import {Context} from "../utils/Context.sol"; 6 | 7 | contract ReentrancyAttack is Context { 8 | function callSender(bytes calldata data) public { 9 | (bool success, ) = _msgSender().call(data); 10 | require(success, "ReentrancyAttack: failed call"); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/docs/access-control/MyContractOwnable.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | import {Ownable} from "../../../access/Ownable.sol"; 6 | 7 | contract MyContract is Ownable { 8 | constructor(address initialOwner) Ownable(initialOwner) {} 9 | 10 | function normalThing() public { 11 | // anyone can call this normalThing() 12 | } 13 | 14 | function specialThing() public onlyOwner { 15 | // only the owner can call specialThing()! 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/proxy/BadBeacon.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | contract BadBeaconNoImpl {} 6 | 7 | contract BadBeaconNotContract { 8 | function implementation() external pure returns (address) { 9 | return address(0x1); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/token/ERC20ApprovalMock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | import {ERC20} from "../../token/ERC20/ERC20.sol"; 5 | 6 | abstract contract ERC20ApprovalMock is ERC20 { 7 | function _approve(address owner, address spender, uint256 amount, bool) internal virtual override { 8 | super._approve(owner, spender, amount, true); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/token/ERC20DecimalsMock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | import {ERC20} from "../../token/ERC20/ERC20.sol"; 6 | 7 | abstract contract ERC20DecimalsMock is ERC20 { 8 | uint8 private immutable _decimals; 9 | 10 | constructor(uint8 decimals_) { 11 | _decimals = decimals_; 12 | } 13 | 14 | function decimals() public view override returns (uint8) { 15 | return _decimals; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/token/ERC20ExcessDecimalsMock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | contract ERC20ExcessDecimalsMock { 6 | function decimals() public pure returns (uint256) { 7 | return type(uint256).max; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/token/ERC20ForceApproveMock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | import {ERC20} from "../../token/ERC20/ERC20.sol"; 6 | 7 | // contract that replicate USDT (0xdac17f958d2ee523a2206206994597c13d831ec7) approval behavior 8 | abstract contract ERC20ForceApproveMock is ERC20 { 9 | function approve(address spender, uint256 amount) public virtual override returns (bool) { 10 | require(amount == 0 || allowance(msg.sender, spender) == 0, "USDT approval failure"); 11 | return super.approve(spender, amount); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/token/ERC20Mock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | import {ERC20} from "../../token/ERC20/ERC20.sol"; 5 | 6 | contract ERC20Mock is ERC20 { 7 | constructor() ERC20("ERC20Mock", "E20M") {} 8 | 9 | function mint(address account, uint256 amount) external { 10 | _mint(account, amount); 11 | } 12 | 13 | function burn(address account, uint256 amount) external { 14 | _burn(account, amount); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/token/ERC20MulticallMock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | import {ERC20} from "../../token/ERC20/ERC20.sol"; 6 | import {Multicall} from "../../utils/Multicall.sol"; 7 | 8 | abstract contract ERC20MulticallMock is ERC20, Multicall {} 9 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/token/ERC20ReturnFalseMock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | import {ERC20} from "../../token/ERC20/ERC20.sol"; 6 | 7 | abstract contract ERC20ReturnFalseMock is ERC20 { 8 | function transfer(address, uint256) public pure override returns (bool) { 9 | return false; 10 | } 11 | 12 | function transferFrom(address, address, uint256) public pure override returns (bool) { 13 | return false; 14 | } 15 | 16 | function approve(address, uint256) public pure override returns (bool) { 17 | return false; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/token/ERC4626Mock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | import {IERC20, ERC20} from "../../token/ERC20/ERC20.sol"; 5 | import {ERC4626} from "../../token/ERC20/extensions/ERC4626.sol"; 6 | 7 | contract ERC4626Mock is ERC4626 { 8 | constructor(address underlying) ERC20("ERC4626Mock", "E4626M") ERC4626(IERC20(underlying)) {} 9 | 10 | function mint(address account, uint256 amount) external { 11 | _mint(account, amount); 12 | } 13 | 14 | function burn(address account, uint256 amount) external { 15 | _burn(account, amount); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/token/ERC4626OffsetMock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | import {ERC4626} from "../../token/ERC20/extensions/ERC4626.sol"; 6 | 7 | abstract contract ERC4626OffsetMock is ERC4626 { 8 | uint8 private immutable _offset; 9 | 10 | constructor(uint8 offset_) { 11 | _offset = offset_; 12 | } 13 | 14 | function _decimalsOffset() internal view virtual override returns (uint8) { 15 | return _offset; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/mocks/token/ERC721URIStorageMock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | import {ERC721URIStorage} from "../../token/ERC721/extensions/ERC721URIStorage.sol"; 6 | 7 | abstract contract ERC721URIStorageMock is ERC721URIStorage { 8 | string private _baseTokenURI; 9 | 10 | function _baseURI() internal view virtual override returns (string memory) { 11 | return _baseTokenURI; 12 | } 13 | 14 | function setBaseURI(string calldata newBaseTokenURI) public { 15 | _baseTokenURI = newBaseTokenURI; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (proxy/beacon/IBeacon.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | /** 7 | * @dev This is the interface that {BeaconProxy} expects of its beacon. 8 | */ 9 | interface IBeacon { 10 | /** 11 | * @dev Must return an address that can be used as a delegate call target. 12 | * 13 | * {UpgradeableBeacon} will check that this address is a contract. 14 | */ 15 | function implementation() external view returns (address); 16 | } 17 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/token/common/README.adoc: -------------------------------------------------------------------------------- 1 | = Common (Tokens) 2 | 3 | Functionality that is common to multiple token standards. 4 | 5 | * {ERC2981}: NFT Royalties compatible with both ERC721 and ERC1155. 6 | ** For ERC721 consider {ERC721Royalty} which clears the royalty information from storage on burn. 7 | 8 | == Contracts 9 | 10 | {{ERC2981}} 11 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/antora.yml: -------------------------------------------------------------------------------- 1 | name: contracts 2 | title: Contracts 3 | version: 5.x 4 | prerelease: false 5 | nav: 6 | - modules/ROOT/nav.adoc 7 | - modules/api/nav.adoc 8 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-attack-3a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-attack-3a.png -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-attack-3b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-attack-3b.png -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-attack-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-attack-6.png -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-attack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-attack.png -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-deposit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-deposit.png -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-mint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-mint.png -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-rate-linear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-rate-linear.png -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-rate-loglog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-rate-loglog.png -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-rate-loglogext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-rate-loglogext.png -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/tally-exec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/tally-exec.png -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/tally-vote.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/modules/ROOT/images/tally-vote.png -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/docs/templates/page.hbs: -------------------------------------------------------------------------------- 1 | :github-icon: pass:[] 2 | {{#with-prelude}} 3 | {{readme (readme-path)}} 4 | {{/with-prelude}} 5 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/foundry.toml: -------------------------------------------------------------------------------- 1 | [profile.default] 2 | src = 'contracts' 3 | out = 'out' 4 | libs = ['node_modules', 'lib'] 5 | test = 'test' 6 | cache_path = 'cache_forge' 7 | 8 | [fuzz] 9 | runs = 10000 10 | max_test_rejects = 150000 11 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/hardhat/skip-foundry-tests.js: -------------------------------------------------------------------------------- 1 | const { subtask } = require('hardhat/config'); 2 | const { TASK_COMPILE_SOLIDITY_GET_SOURCE_PATHS } = require('hardhat/builtin-tasks/task-names'); 3 | 4 | subtask(TASK_COMPILE_SOLIDITY_GET_SOURCE_PATHS).setAction(async (_, __, runSuper) => 5 | (await runSuper()).filter(path => !path.endsWith('.t.sol')), 6 | ); 7 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/lib/forge-std/.gitignore: -------------------------------------------------------------------------------- 1 | cache/ 2 | out/ 3 | .vscode 4 | .idea 5 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/lib/forge-std/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "lib/ds-test"] 2 | path = lib/ds-test 3 | url = https://github.com/dapphub/ds-test 4 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/.gitignore: -------------------------------------------------------------------------------- 1 | /.dapple 2 | /build 3 | /out 4 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/Makefile: -------------------------------------------------------------------------------- 1 | all:; dapp build 2 | 3 | test: 4 | -dapp --use solc:0.4.23 build 5 | -dapp --use solc:0.4.26 build 6 | -dapp --use solc:0.5.17 build 7 | -dapp --use solc:0.6.12 build 8 | -dapp --use solc:0.7.5 build 9 | 10 | demo: 11 | DAPP_SRC=demo dapp --use solc:0.7.5 build 12 | -hevm dapp-test --verbose 3 13 | 14 | .PHONY: test demo 15 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/default.nix: -------------------------------------------------------------------------------- 1 | { solidityPackage, dappsys }: solidityPackage { 2 | name = "ds-test"; 3 | src = ./src; 4 | } 5 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ds-test", 3 | "version": "1.0.0", 4 | "description": "Assertions, equality checks and other test helpers ", 5 | "bugs": "https://github.com/dapphub/ds-test/issues", 6 | "license": "GPL-3.0", 7 | "author": "Contributors to ds-test", 8 | "files": [ 9 | "src/*" 10 | ], 11 | "repository": { 12 | "type": "git", 13 | "url": "https://github.com/dapphub/ds-test.git" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/lib/forge-std/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "forge-std", 3 | "version": "1.2.0", 4 | "description": "Forge Standard Library is a collection of helpful contracts and libraries for use with Forge and Foundry.", 5 | "homepage": "https://book.getfoundry.sh/forge/forge-std", 6 | "bugs": "https://github.com/foundry-rs/forge-std/issues", 7 | "license": "(Apache-2.0 OR MIT)", 8 | "author": "Contributors to Forge Standard Library", 9 | "files": [ 10 | "src/*" 11 | ], 12 | "repository": { 13 | "type": "git", 14 | "url": "https://github.com/foundry-rs/forge-std.git" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/lib/forge-std/src/interfaces/IERC165.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.6.2; 3 | 4 | interface IERC165 { 5 | /// @notice Query if a contract implements an interface 6 | /// @param interfaceID The interface identifier, as specified in ERC-165 7 | /// @dev Interface identification is specified in ERC-165. This function 8 | /// uses less than 30,000 gas. 9 | /// @return `true` if the contract implements `interfaceID` and 10 | /// `interfaceID` is not 0xffffffff, `false` otherwise 11 | function supportsInterface(bytes4 interfaceID) external view returns (bool); 12 | } 13 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/lib/forge-std/test/compilation/CompilationScript.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.6.2 <0.9.0; 3 | 4 | pragma experimental ABIEncoderV2; 5 | 6 | import "../../src/Script.sol"; 7 | 8 | // The purpose of this contract is to benchmark compilation time to avoid accidentally introducing 9 | // a change that results in very long compilation times with via-ir. See https://github.com/foundry-rs/forge-std/issues/207 10 | contract CompilationScript is Script {} 11 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/lib/forge-std/test/compilation/CompilationScriptBase.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.6.2 <0.9.0; 3 | 4 | pragma experimental ABIEncoderV2; 5 | 6 | import "../../src/Script.sol"; 7 | 8 | // The purpose of this contract is to benchmark compilation time to avoid accidentally introducing 9 | // a change that results in very long compilation times with via-ir. See https://github.com/foundry-rs/forge-std/issues/207 10 | contract CompilationScriptBase is ScriptBase {} 11 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/lib/forge-std/test/compilation/CompilationTest.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.6.2 <0.9.0; 3 | 4 | pragma experimental ABIEncoderV2; 5 | 6 | import "../../src/Test.sol"; 7 | 8 | // The purpose of this contract is to benchmark compilation time to avoid accidentally introducing 9 | // a change that results in very long compilation times with via-ir. See https://github.com/foundry-rs/forge-std/issues/207 10 | contract CompilationTest is Test {} 11 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/lib/forge-std/test/compilation/CompilationTestBase.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.6.2 <0.9.0; 3 | 4 | pragma experimental ABIEncoderV2; 5 | 6 | import "../../src/Test.sol"; 7 | 8 | // The purpose of this contract is to benchmark compilation time to avoid accidentally introducing 9 | // a change that results in very long compilation times with via-ir. See https://github.com/foundry-rs/forge-std/issues/207 10 | contract CompilationTestBase is TestBase {} 11 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/netlify.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | command = "npm run docs" 3 | publish = "build/site" 4 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/remappings.txt: -------------------------------------------------------------------------------- 1 | @openzeppelin/contracts/=contracts/ 2 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["github>OpenZeppelin/configs"], 3 | "labels": ["ignore-changeset"] 4 | } 5 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/requirements.txt: -------------------------------------------------------------------------------- 1 | certora-cli==4.8.0 2 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/scripts/checks/generation.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | npm run generate 6 | git diff -R --exit-code 7 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/scripts/generate/format-lines.js: -------------------------------------------------------------------------------- 1 | function formatLines(...lines) { 2 | return [...indentEach(0, lines)].join('\n') + '\n'; 3 | } 4 | 5 | function* indentEach(indent, lines) { 6 | for (const line of lines) { 7 | if (Array.isArray(line)) { 8 | yield* indentEach(indent + 1, line); 9 | } else { 10 | const padding = ' '.repeat(indent); 11 | yield* line.split('\n').map(subline => (subline === '' ? '' : padding + subline)); 12 | } 13 | } 14 | } 15 | 16 | module.exports = formatLines; 17 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/scripts/generate/templates/Checkpoints.opts.js: -------------------------------------------------------------------------------- 1 | // OPTIONS 2 | const VALUE_SIZES = [224, 208, 160]; 3 | 4 | const defaultOpts = size => ({ 5 | historyTypeName: `Trace${size}`, 6 | checkpointTypeName: `Checkpoint${size}`, 7 | checkpointFieldName: '_checkpoints', 8 | keyTypeName: `uint${256 - size}`, 9 | keyFieldName: '_key', 10 | valueTypeName: `uint${size}`, 11 | valueFieldName: '_value', 12 | }); 13 | 14 | module.exports = { 15 | VALUE_SIZES, 16 | OPTS: VALUE_SIZES.map(size => defaultOpts(size)), 17 | }; 18 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/scripts/git-user-config.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail -x 4 | 5 | git config user.name 'github-actions' 6 | git config user.email '41898282+github-actions[bot]@users.noreply.github.com' 7 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/scripts/prepack.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | shopt -s globstar 5 | 6 | # cross platform `mkdir -p` 7 | mkdirp() { 8 | node -e "fs.mkdirSync('$1', { recursive: true })" 9 | } 10 | 11 | # cd to the root of the repo 12 | cd "$(git rev-parse --show-toplevel)" 13 | 14 | npm run clean 15 | 16 | env COMPILE_MODE=production npm run compile 17 | 18 | mkdirp contracts/build/contracts 19 | cp artifacts/contracts/**/*.json contracts/build/contracts 20 | rm contracts/build/contracts/*.dbg.json 21 | node scripts/remove-ignored-artifacts.js 22 | 23 | cp README.md contracts/ 24 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/scripts/release/synchronize-versions.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | // Synchronizes the version in contracts/package.json with the one in package.json. 4 | // This is run automatically when npm version is run. 5 | 6 | const fs = require('fs'); 7 | 8 | setVersion('package.json', 'contracts/package.json'); 9 | 10 | function setVersion(from, to) { 11 | const fromJson = JSON.parse(fs.readFileSync(from)); 12 | const toJson = JSON.parse(fs.readFileSync(to)); 13 | toJson.version = fromJson.version; 14 | fs.writeFileSync(to, JSON.stringify(toJson, null, 2) + '\n'); 15 | } 16 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/scripts/release/version.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | changeset version 6 | 7 | scripts/release/format-changelog.js 8 | scripts/release/synchronize-versions.js 9 | scripts/release/update-comment.js 10 | 11 | oz-docs update-version 12 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/scripts/release/workflow/exit-prerelease.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | npx changeset pre exit rc 6 | git add . 7 | git commit -m "Exit release candidate" 8 | git push origin 9 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/scripts/release/workflow/integrity-check.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | CHECKSUMS="$RUNNER_TEMP/checksums.txt" 6 | 7 | # Extract tarball content into a tmp directory 8 | tar xf "$TARBALL" -C "$RUNNER_TEMP" 9 | 10 | # Move to extracted directory 11 | cd "$RUNNER_TEMP/package" 12 | 13 | # Checksum all Solidity files 14 | find . -type f -name "*.sol" | xargs shasum > "$CHECKSUMS" 15 | 16 | # Back to directory with git contents 17 | cd "$GITHUB_WORKSPACE/contracts" 18 | 19 | # Check against tarball contents 20 | shasum -c "$CHECKSUMS" 21 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/scripts/release/workflow/rerun.js: -------------------------------------------------------------------------------- 1 | module.exports = ({ github, context }) => 2 | github.rest.actions.createWorkflowDispatch({ 3 | owner: context.repo.owner, 4 | repo: context.repo.repo, 5 | workflow_id: 'release-cycle.yml', 6 | ref: process.env.REF || process.env.GITHUB_REF_NAME, 7 | }); 8 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/scripts/solhint-custom/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "solhint-plugin-openzeppelin", 3 | "version": "0.0.0", 4 | "private": true 5 | } 6 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/scripts/upgradeable/patch-apply.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | DIRNAME="$(dirname -- "${BASH_SOURCE[0]}")" 6 | PATCH="$DIRNAME/upgradeable.patch" 7 | 8 | error() { 9 | echo Error: "$*" >&2 10 | exit 1 11 | } 12 | 13 | if ! git diff-files --quiet ":!$PATCH" || ! git diff-index --quiet HEAD ":!$PATCH"; then 14 | error "Repository must have no staged or unstaged changes" 15 | fi 16 | 17 | if ! git apply -3 "$PATCH"; then 18 | error "Fix conflicts and run $DIRNAME/patch-save.sh" 19 | fi 20 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/scripts/upgradeable/patch-save.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | DIRNAME="$(dirname -- "${BASH_SOURCE[0]}")" 6 | PATCH="$DIRNAME/upgradeable.patch" 7 | 8 | error() { 9 | echo Error: "$*" >&2 10 | exit 1 11 | } 12 | 13 | if ! git diff-files --quiet ":!$PATCH"; then 14 | error "Unstaged changes. Stage to include in patch or temporarily stash." 15 | fi 16 | 17 | git diff-index --cached --patch --output="$PATCH" HEAD 18 | git restore --staged --worktree ":!$PATCH" 19 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/solhint.config.js: -------------------------------------------------------------------------------- 1 | const customRules = require('./scripts/solhint-custom'); 2 | 3 | const rules = [ 4 | 'no-unused-vars', 5 | 'const-name-snakecase', 6 | 'contract-name-camelcase', 7 | 'event-name-camelcase', 8 | 'func-name-mixedcase', 9 | 'func-param-name-mixedcase', 10 | 'modifier-name-mixedcase', 11 | 'var-name-mixedcase', 12 | 'imports-on-top', 13 | 'no-global-import', 14 | ...customRules.map(r => `openzeppelin/${r.ruleId}`), 15 | ]; 16 | 17 | module.exports = { 18 | plugins: ['openzeppelin'], 19 | rules: Object.fromEntries(rules.map(r => [r, 'error'])), 20 | }; 21 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/test/TESTING.md: -------------------------------------------------------------------------------- 1 | ## Testing 2 | 3 | Unit test are critical to OpenZeppelin Contracts. They help ensure code quality and mitigate against security vulnerabilities. The directory structure within the `/test` directory corresponds to the `/contracts` directory. 4 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/test/access/AccessControl.test.js: -------------------------------------------------------------------------------- 1 | const { DEFAULT_ADMIN_ROLE, shouldBehaveLikeAccessControl } = require('./AccessControl.behavior.js'); 2 | 3 | const AccessControl = artifacts.require('$AccessControl'); 4 | 5 | contract('AccessControl', function (accounts) { 6 | beforeEach(async function () { 7 | this.accessControl = await AccessControl.new({ from: accounts[0] }); 8 | await this.accessControl.$_grantRole(DEFAULT_ADMIN_ROLE, accounts[0]); 9 | }); 10 | 11 | shouldBehaveLikeAccessControl(...accounts); 12 | }); 13 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/test/helpers/account.js: -------------------------------------------------------------------------------- 1 | const { web3 } = require('hardhat'); 2 | const { impersonateAccount, setBalance } = require('@nomicfoundation/hardhat-network-helpers'); 3 | 4 | // Hardhat default balance 5 | const DEFAULT_BALANCE = web3.utils.toBN('10000000000000000000000'); 6 | 7 | async function impersonate(account, balance = DEFAULT_BALANCE) { 8 | await impersonateAccount(account); 9 | await setBalance(account, balance); 10 | } 11 | 12 | module.exports = { 13 | impersonate, 14 | }; 15 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/test/helpers/chainid.js: -------------------------------------------------------------------------------- 1 | const hre = require('hardhat'); 2 | 3 | async function getChainId() { 4 | const chainIdHex = await hre.network.provider.send('eth_chainId', []); 5 | return new hre.web3.utils.BN(chainIdHex, 'hex'); 6 | } 7 | 8 | module.exports = { 9 | getChainId, 10 | }; 11 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/test/helpers/constants.js: -------------------------------------------------------------------------------- 1 | const MAX_UINT48 = web3.utils.toBN(1).shln(48).subn(1).toString(); 2 | const MAX_UINT64 = web3.utils.toBN(1).shln(64).subn(1).toString(); 3 | 4 | module.exports = { 5 | MAX_UINT48, 6 | MAX_UINT64, 7 | }; 8 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/test/helpers/enums.js: -------------------------------------------------------------------------------- 1 | function Enum(...options) { 2 | return Object.fromEntries(options.map((key, i) => [key, web3.utils.toBN(i)])); 3 | } 4 | 5 | module.exports = { 6 | Enum, 7 | ProposalState: Enum('Pending', 'Active', 'Canceled', 'Defeated', 'Succeeded', 'Queued', 'Expired', 'Executed'), 8 | VoteType: Enum('Against', 'For', 'Abstain'), 9 | Rounding: Enum('Floor', 'Ceil', 'Trunc', 'Expand'), 10 | OperationState: Enum('Unset', 'Waiting', 'Ready', 'Done'), 11 | }; 12 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/test/helpers/iterate.js: -------------------------------------------------------------------------------- 1 | // Map values in an object 2 | const mapValues = (obj, fn) => Object.fromEntries(Object.entries(obj).map(([k, v]) => [k, fn(v)])); 3 | 4 | // Array of number or bigint 5 | const max = (...values) => values.slice(1).reduce((x, y) => (x > y ? x : y), values[0]); 6 | const min = (...values) => values.slice(1).reduce((x, y) => (x < y ? x : y), values[0]); 7 | 8 | // Cartesian product of a list of arrays 9 | const product = (...arrays) => arrays.reduce((a, b) => a.flatMap(ai => b.map(bi => [...ai, bi])), [[]]); 10 | 11 | module.exports = { 12 | mapValues, 13 | max, 14 | min, 15 | product, 16 | }; 17 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/test/helpers/methods.js: -------------------------------------------------------------------------------- 1 | const { soliditySha3 } = require('web3-utils'); 2 | 3 | module.exports = { 4 | selector: signature => soliditySha3(signature).substring(0, 10), 5 | }; 6 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/test/proxy/ERC1967/ERC1967Proxy.test.js: -------------------------------------------------------------------------------- 1 | const shouldBehaveLikeProxy = require('../Proxy.behaviour'); 2 | 3 | const ERC1967Proxy = artifacts.require('ERC1967Proxy'); 4 | 5 | contract('ERC1967Proxy', function (accounts) { 6 | // `undefined`, `null` and other false-ish opts will not be forwarded. 7 | const createProxy = async function (implementation, initData, opts) { 8 | return ERC1967Proxy.new(implementation, initData, ...[opts].filter(Boolean)); 9 | }; 10 | 11 | shouldBehaveLikeProxy(createProxy, accounts); 12 | }); 13 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/test/token/ERC721/ERC721.test.js: -------------------------------------------------------------------------------- 1 | const { shouldBehaveLikeERC721, shouldBehaveLikeERC721Metadata } = require('./ERC721.behavior'); 2 | 3 | const ERC721 = artifacts.require('$ERC721'); 4 | 5 | contract('ERC721', function (accounts) { 6 | const name = 'Non Fungible Token'; 7 | const symbol = 'NFT'; 8 | 9 | beforeEach(async function () { 10 | this.token = await ERC721.new(name, symbol); 11 | }); 12 | 13 | shouldBehaveLikeERC721(...accounts); 14 | shouldBehaveLikeERC721Metadata(name, symbol, ...accounts); 15 | }); 16 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/test/utils/Context.test.js: -------------------------------------------------------------------------------- 1 | require('@openzeppelin/test-helpers'); 2 | 3 | const ContextMock = artifacts.require('ContextMock'); 4 | const ContextMockCaller = artifacts.require('ContextMockCaller'); 5 | 6 | const { shouldBehaveLikeRegularContext } = require('./Context.behavior'); 7 | 8 | contract('Context', function (accounts) { 9 | const [sender] = accounts; 10 | 11 | beforeEach(async function () { 12 | this.context = await ContextMock.new(); 13 | this.caller = await ContextMockCaller.new(); 14 | }); 15 | 16 | shouldBehaveLikeRegularContext(sender); 17 | }); 18 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/test/utils/introspection/ERC165.test.js: -------------------------------------------------------------------------------- 1 | const { shouldSupportInterfaces } = require('./SupportsInterface.behavior'); 2 | 3 | const ERC165 = artifacts.require('$ERC165'); 4 | 5 | contract('ERC165', function () { 6 | beforeEach(async function () { 7 | this.mock = await ERC165.new(); 8 | }); 9 | 10 | shouldSupportInterfaces(['ERC165']); 11 | }); 12 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/netlify.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | command = "npm run docs" 3 | publish = "build/site" 4 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/remappings.txt: -------------------------------------------------------------------------------- 1 | @openzeppelin/contracts-upgradeable/=contracts/ 2 | @openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/ 3 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["github>OpenZeppelin/configs"], 3 | "labels": ["ignore-changeset"] 4 | } 5 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/requirements.txt: -------------------------------------------------------------------------------- 1 | certora-cli==4.8.0 2 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/scripts/checks/generation.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | npm run generate 6 | git diff -R --exit-code 7 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/scripts/generate/format-lines.js: -------------------------------------------------------------------------------- 1 | function formatLines(...lines) { 2 | return [...indentEach(0, lines)].join('\n') + '\n'; 3 | } 4 | 5 | function* indentEach(indent, lines) { 6 | for (const line of lines) { 7 | if (Array.isArray(line)) { 8 | yield* indentEach(indent + 1, line); 9 | } else { 10 | const padding = ' '.repeat(indent); 11 | yield* line.split('\n').map(subline => (subline === '' ? '' : padding + subline)); 12 | } 13 | } 14 | } 15 | 16 | module.exports = formatLines; 17 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/scripts/generate/templates/Checkpoints.opts.js: -------------------------------------------------------------------------------- 1 | // OPTIONS 2 | const VALUE_SIZES = [224, 208, 160]; 3 | 4 | const defaultOpts = size => ({ 5 | historyTypeName: `Trace${size}`, 6 | checkpointTypeName: `Checkpoint${size}`, 7 | checkpointFieldName: '_checkpoints', 8 | keyTypeName: `uint${256 - size}`, 9 | keyFieldName: '_key', 10 | valueTypeName: `uint${size}`, 11 | valueFieldName: '_value', 12 | }); 13 | 14 | module.exports = { 15 | VALUE_SIZES, 16 | OPTS: VALUE_SIZES.map(size => defaultOpts(size)), 17 | }; 18 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/scripts/git-user-config.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail -x 4 | 5 | git config user.name 'github-actions' 6 | git config user.email '41898282+github-actions[bot]@users.noreply.github.com' 7 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/scripts/prepack.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | shopt -s globstar 5 | 6 | # cross platform `mkdir -p` 7 | mkdirp() { 8 | node -e "fs.mkdirSync('$1', { recursive: true })" 9 | } 10 | 11 | # cd to the root of the repo 12 | cd "$(git rev-parse --show-toplevel)" 13 | 14 | npm run clean 15 | 16 | env COMPILE_MODE=production npm run compile 17 | 18 | mkdirp contracts/build/contracts 19 | cp artifacts/contracts/**/*.json contracts/build/contracts 20 | rm contracts/build/contracts/*.dbg.json 21 | node scripts/remove-ignored-artifacts.js 22 | 23 | cp README.md contracts/ 24 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/scripts/release/synchronize-versions.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | // Synchronizes the version in contracts/package.json with the one in package.json. 4 | // This is run automatically when npm version is run. 5 | 6 | const fs = require('fs'); 7 | 8 | setVersion('package.json', 'contracts/package.json'); 9 | 10 | function setVersion(from, to) { 11 | const fromJson = JSON.parse(fs.readFileSync(from)); 12 | const toJson = JSON.parse(fs.readFileSync(to)); 13 | toJson.version = fromJson.version; 14 | fs.writeFileSync(to, JSON.stringify(toJson, null, 2) + '\n'); 15 | } 16 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/scripts/release/version.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | changeset version 6 | 7 | scripts/release/format-changelog.js 8 | scripts/release/synchronize-versions.js 9 | scripts/release/update-comment.js 10 | 11 | oz-docs update-version 12 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/scripts/release/workflow/exit-prerelease.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | npx changeset pre exit rc 6 | git add . 7 | git commit -m "Exit release candidate" 8 | git push origin 9 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/scripts/release/workflow/integrity-check.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | CHECKSUMS="$RUNNER_TEMP/checksums.txt" 6 | 7 | # Extract tarball content into a tmp directory 8 | tar xf "$TARBALL" -C "$RUNNER_TEMP" 9 | 10 | # Move to extracted directory 11 | cd "$RUNNER_TEMP/package" 12 | 13 | # Checksum all Solidity files 14 | find . -type f -name "*.sol" | xargs shasum > "$CHECKSUMS" 15 | 16 | # Back to directory with git contents 17 | cd "$GITHUB_WORKSPACE/contracts" 18 | 19 | # Check against tarball contents 20 | shasum -c "$CHECKSUMS" 21 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/scripts/release/workflow/rerun.js: -------------------------------------------------------------------------------- 1 | module.exports = ({ github, context }) => 2 | github.rest.actions.createWorkflowDispatch({ 3 | owner: context.repo.owner, 4 | repo: context.repo.repo, 5 | workflow_id: 'release-cycle.yml', 6 | ref: process.env.REF || process.env.GITHUB_REF_NAME, 7 | }); 8 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/scripts/solhint-custom/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "solhint-plugin-openzeppelin", 3 | "version": "0.0.0", 4 | "private": true 5 | } 6 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/scripts/upgradeable/patch-apply.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | DIRNAME="$(dirname -- "${BASH_SOURCE[0]}")" 6 | PATCH="$DIRNAME/upgradeable.patch" 7 | 8 | error() { 9 | echo Error: "$*" >&2 10 | exit 1 11 | } 12 | 13 | if ! git diff-files --quiet ":!$PATCH" || ! git diff-index --quiet HEAD ":!$PATCH"; then 14 | error "Repository must have no staged or unstaged changes" 15 | fi 16 | 17 | if ! git apply -3 "$PATCH"; then 18 | error "Fix conflicts and run $DIRNAME/patch-save.sh" 19 | fi 20 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/scripts/upgradeable/patch-save.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | DIRNAME="$(dirname -- "${BASH_SOURCE[0]}")" 6 | PATCH="$DIRNAME/upgradeable.patch" 7 | 8 | error() { 9 | echo Error: "$*" >&2 10 | exit 1 11 | } 12 | 13 | if ! git diff-files --quiet ":!$PATCH"; then 14 | error "Unstaged changes. Stage to include in patch or temporarily stash." 15 | fi 16 | 17 | git diff-index --cached --patch --output="$PATCH" HEAD 18 | git restore --staged --worktree ":!$PATCH" 19 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/solhint.config.js: -------------------------------------------------------------------------------- 1 | const customRules = require('./scripts/solhint-custom'); 2 | 3 | const rules = [ 4 | 'no-unused-vars', 5 | 'const-name-snakecase', 6 | 'contract-name-camelcase', 7 | 'event-name-camelcase', 8 | 'func-name-mixedcase', 9 | 'func-param-name-mixedcase', 10 | 'modifier-name-mixedcase', 11 | 'var-name-mixedcase', 12 | 'imports-on-top', 13 | 'no-global-import', 14 | ...customRules.map(r => `openzeppelin/${r.ruleId}`), 15 | ]; 16 | 17 | module.exports = { 18 | plugins: ['openzeppelin'], 19 | rules: Object.fromEntries(rules.map(r => [r, 'error'])), 20 | }; 21 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/test/TESTING.md: -------------------------------------------------------------------------------- 1 | ## Testing 2 | 3 | Unit test are critical to OpenZeppelin Contracts. They help ensure code quality and mitigate against security vulnerabilities. The directory structure within the `/test` directory corresponds to the `/contracts` directory. 4 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/test/access/AccessControl.test.js: -------------------------------------------------------------------------------- 1 | const { DEFAULT_ADMIN_ROLE, shouldBehaveLikeAccessControl } = require('./AccessControl.behavior.js'); 2 | 3 | const AccessControl = artifacts.require('$AccessControl'); 4 | 5 | contract('AccessControl', function (accounts) { 6 | beforeEach(async function () { 7 | this.accessControl = await AccessControl.new({ from: accounts[0] }); 8 | await this.accessControl.$_grantRole(DEFAULT_ADMIN_ROLE, accounts[0]); 9 | }); 10 | 11 | shouldBehaveLikeAccessControl(...accounts); 12 | }); 13 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/test/helpers/account.js: -------------------------------------------------------------------------------- 1 | const { web3 } = require('hardhat'); 2 | const { impersonateAccount, setBalance } = require('@nomicfoundation/hardhat-network-helpers'); 3 | 4 | // Hardhat default balance 5 | const DEFAULT_BALANCE = web3.utils.toBN('10000000000000000000000'); 6 | 7 | async function impersonate(account, balance = DEFAULT_BALANCE) { 8 | await impersonateAccount(account); 9 | await setBalance(account, balance); 10 | } 11 | 12 | module.exports = { 13 | impersonate, 14 | }; 15 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/test/helpers/chainid.js: -------------------------------------------------------------------------------- 1 | const hre = require('hardhat'); 2 | 3 | async function getChainId() { 4 | const chainIdHex = await hre.network.provider.send('eth_chainId', []); 5 | return new hre.web3.utils.BN(chainIdHex, 'hex'); 6 | } 7 | 8 | module.exports = { 9 | getChainId, 10 | }; 11 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/test/helpers/constants.js: -------------------------------------------------------------------------------- 1 | const MAX_UINT48 = web3.utils.toBN(1).shln(48).subn(1).toString(); 2 | const MAX_UINT64 = web3.utils.toBN(1).shln(64).subn(1).toString(); 3 | 4 | module.exports = { 5 | MAX_UINT48, 6 | MAX_UINT64, 7 | }; 8 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/test/helpers/enums.js: -------------------------------------------------------------------------------- 1 | function Enum(...options) { 2 | return Object.fromEntries(options.map((key, i) => [key, web3.utils.toBN(i)])); 3 | } 4 | 5 | module.exports = { 6 | Enum, 7 | ProposalState: Enum('Pending', 'Active', 'Canceled', 'Defeated', 'Succeeded', 'Queued', 'Expired', 'Executed'), 8 | VoteType: Enum('Against', 'For', 'Abstain'), 9 | Rounding: Enum('Floor', 'Ceil', 'Trunc', 'Expand'), 10 | OperationState: Enum('Unset', 'Waiting', 'Ready', 'Done'), 11 | }; 12 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/test/helpers/iterate.js: -------------------------------------------------------------------------------- 1 | // Map values in an object 2 | const mapValues = (obj, fn) => Object.fromEntries(Object.entries(obj).map(([k, v]) => [k, fn(v)])); 3 | 4 | // Array of number or bigint 5 | const max = (...values) => values.slice(1).reduce((x, y) => (x > y ? x : y), values[0]); 6 | const min = (...values) => values.slice(1).reduce((x, y) => (x < y ? x : y), values[0]); 7 | 8 | // Cartesian product of a list of arrays 9 | const product = (...arrays) => arrays.reduce((a, b) => a.flatMap(ai => b.map(bi => [...ai, bi])), [[]]); 10 | 11 | module.exports = { 12 | mapValues, 13 | max, 14 | min, 15 | product, 16 | }; 17 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/test/helpers/math.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // sum of integer / bignumber 3 | sum: (...args) => args.reduce((acc, n) => acc + n, 0), 4 | BNsum: (...args) => args.reduce((acc, n) => acc.add(n), web3.utils.toBN(0)), 5 | // min of integer / bignumber 6 | min: (...args) => args.slice(1).reduce((x, y) => (x < y ? x : y), args[0]), 7 | BNmin: (...args) => args.slice(1).reduce((x, y) => (x.lt(y) ? x : y), args[0]), 8 | // max of integer / bignumber 9 | max: (...args) => args.slice(1).reduce((x, y) => (x > y ? x : y), args[0]), 10 | BNmax: (...args) => args.slice(1).reduce((x, y) => (x.gt(y) ? x : y), args[0]), 11 | }; 12 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/test/helpers/methods.js: -------------------------------------------------------------------------------- 1 | const { soliditySha3 } = require('web3-utils'); 2 | 3 | module.exports = { 4 | selector: signature => soliditySha3(signature).substring(0, 10), 5 | }; 6 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/test/helpers/time.js: -------------------------------------------------------------------------------- 1 | const ozHelpers = require('@openzeppelin/test-helpers'); 2 | const helpers = require('@nomicfoundation/hardhat-network-helpers'); 3 | 4 | module.exports = { 5 | clock: { 6 | blocknumber: () => helpers.time.latestBlock(), 7 | timestamp: () => helpers.time.latest(), 8 | }, 9 | clockFromReceipt: { 10 | blocknumber: receipt => Promise.resolve(receipt.blockNumber), 11 | timestamp: receipt => web3.eth.getBlock(receipt.blockNumber).then(block => block.timestamp), 12 | }, 13 | forward: { 14 | blocknumber: ozHelpers.time.advanceBlockTo, 15 | timestamp: helpers.time.increaseTo, 16 | }, 17 | }; 18 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/test/proxy/ERC1967/ERC1967Proxy.test.js: -------------------------------------------------------------------------------- 1 | const shouldBehaveLikeProxy = require('../Proxy.behaviour'); 2 | 3 | const ERC1967Proxy = artifacts.require('ERC1967Proxy'); 4 | 5 | contract('ERC1967Proxy', function (accounts) { 6 | // `undefined`, `null` and other false-ish opts will not be forwarded. 7 | const createProxy = async function (implementation, initData, opts) { 8 | return ERC1967Proxy.new(implementation, initData, ...[opts].filter(Boolean)); 9 | }; 10 | 11 | shouldBehaveLikeProxy(createProxy, accounts); 12 | }); 13 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/test/token/ERC721/ERC721.test.js: -------------------------------------------------------------------------------- 1 | const { shouldBehaveLikeERC721, shouldBehaveLikeERC721Metadata } = require('./ERC721.behavior'); 2 | 3 | const ERC721 = artifacts.require('$ERC721'); 4 | 5 | contract('ERC721', function (accounts) { 6 | const name = 'Non Fungible Token'; 7 | const symbol = 'NFT'; 8 | 9 | beforeEach(async function () { 10 | this.token = await ERC721.new(name, symbol); 11 | }); 12 | 13 | shouldBehaveLikeERC721(...accounts); 14 | shouldBehaveLikeERC721Metadata(name, symbol, ...accounts); 15 | }); 16 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/test/utils/Context.test.js: -------------------------------------------------------------------------------- 1 | require('@openzeppelin/test-helpers'); 2 | 3 | const ContextMock = artifacts.require('ContextMock'); 4 | const ContextMockCaller = artifacts.require('ContextMockCaller'); 5 | 6 | const { shouldBehaveLikeRegularContext } = require('./Context.behavior'); 7 | 8 | contract('Context', function (accounts) { 9 | const [sender] = accounts; 10 | 11 | beforeEach(async function () { 12 | this.context = await ContextMock.new(); 13 | this.caller = await ContextMockCaller.new(); 14 | }); 15 | 16 | shouldBehaveLikeRegularContext(sender); 17 | }); 18 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts-upgradeable/test/utils/introspection/ERC165.test.js: -------------------------------------------------------------------------------- 1 | const { shouldSupportInterfaces } = require('./SupportsInterface.behavior'); 2 | 3 | const ERC165 = artifacts.require('$ERC165'); 4 | 5 | contract('ERC165', function () { 6 | beforeEach(async function () { 7 | this.mock = await ERC165.new(); 8 | }); 9 | 10 | shouldSupportInterfaces(['ERC165']); 11 | }); 12 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/.changeset/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json", 3 | "changelog": [ 4 | "@changesets/changelog-github", 5 | { 6 | "repo": "OpenZeppelin/openzeppelin-contracts" 7 | } 8 | ], 9 | "commit": false, 10 | "access": "public", 11 | "baseBranch": "master" 12 | } 13 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/.codecov.yml: -------------------------------------------------------------------------------- 1 | comment: off 2 | github_checks: 3 | annotations: false 4 | coverage: 5 | status: 6 | patch: 7 | default: 8 | target: 95% 9 | only_pulls: true 10 | project: 11 | default: 12 | threshold: 1% 13 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: https://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | [*] 7 | charset = utf-8 8 | end_of_line = lf 9 | indent_style = space 10 | insert_final_newline = true 11 | trim_trailing_whitespace = false 12 | max_line_length = 120 13 | 14 | [*.sol] 15 | indent_size = 4 16 | 17 | [*.js] 18 | indent_size = 2 19 | 20 | [*.{adoc,md}] 21 | max_line_length = 0 22 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "extends" : [ 4 | "eslint:recommended", 5 | "prettier", 6 | ], 7 | "env": { 8 | "es2022": true, 9 | "browser": true, 10 | "node": true, 11 | "mocha": true, 12 | }, 13 | "globals" : { 14 | "artifacts": "readonly", 15 | "contract": "readonly", 16 | "web3": "readonly", 17 | "extendEnvironment": "readonly", 18 | "expect": "readonly", 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | contact_links: 2 | - name: Questions & Support Requests 3 | url: https://forum.openzeppelin.com/c/support/contracts/18 4 | about: Ask in the OpenZeppelin Forum 5 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for OpenZeppelin Contracts 4 | 5 | --- 6 | 7 | **🧐 Motivation** 8 | 9 | 10 | **📝 Details** 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/.github/actions/setup/action.yml: -------------------------------------------------------------------------------- 1 | name: Setup 2 | 3 | runs: 4 | using: composite 5 | steps: 6 | - uses: actions/setup-node@v3 7 | with: 8 | node-version: 16.x 9 | - uses: actions/cache@v3 10 | id: cache 11 | with: 12 | path: '**/node_modules' 13 | key: npm-v3-${{ hashFiles('**/package-lock.json') }} 14 | - name: Install dependencies 15 | run: npm ci 16 | shell: bash 17 | if: steps.cache.outputs.cache-hit != 'true' 18 | - name: Install Foundry 19 | uses: foundry-rs/foundry-toolchain@v1 20 | with: 21 | version: nightly 22 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/.github/workflows/actionlint.yml: -------------------------------------------------------------------------------- 1 | name: lint workflows 2 | 3 | on: 4 | pull_request: 5 | paths: 6 | - '.github/**/*.ya?ml' 7 | 8 | jobs: 9 | lint: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v4 13 | - name: Add problem matchers 14 | run: | 15 | # https://github.com/rhysd/actionlint/blob/3a2f2c7/docs/usage.md#problem-matchers 16 | curl -LO https://raw.githubusercontent.com/rhysd/actionlint/main/.github/actionlint-matcher.json 17 | echo "::add-matcher::actionlint-matcher.json" 18 | - uses: docker://rhysd/actionlint:latest 19 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/.github/workflows/docs.yml: -------------------------------------------------------------------------------- 1 | name: Build Docs 2 | 3 | on: 4 | push: 5 | branches: [release-v*] 6 | 7 | permissions: 8 | contents: write 9 | 10 | jobs: 11 | build: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: actions/checkout@v4 15 | - name: Set up environment 16 | uses: ./.github/actions/setup 17 | - run: bash scripts/git-user-config.sh 18 | - run: node scripts/update-docs-branch.js 19 | - run: git push --all origin 20 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "lib/forge-std"] 2 | branch = v1 3 | path = lib/forge-std 4 | url = https://github.com/foundry-rs/forge-std 5 | [submodule "lib/erc4626-tests"] 6 | path = lib/erc4626-tests 7 | url = https://github.com/a16z/erc4626-tests.git 8 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/.mocharc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | require: 'hardhat/register', 3 | timeout: 4000, 4 | }; 5 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 120, 3 | "singleQuote": true, 4 | "trailingComma": "all", 5 | "arrowParens": "avoid", 6 | "overrides": [ 7 | { 8 | "files": "*.sol", 9 | "options": { 10 | "singleQuote": false 11 | } 12 | } 13 | ], 14 | "plugins": ["prettier-plugin-solidity"] 15 | } 16 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/.solcover.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | norpc: true, 3 | testCommand: 'npm test', 4 | compileCommand: 'npm run compile', 5 | skipFiles: ['mocks'], 6 | providerOptions: { 7 | default_balance_ether: '10000000000000000000000000', 8 | }, 9 | mocha: { 10 | fgrep: '[skip-on-coverage]', 11 | invert: true, 12 | }, 13 | }; 14 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/audits/2018-10.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts/audits/2018-10.pdf -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/audits/2022-10-Checkpoints.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts/audits/2022-10-Checkpoints.pdf -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/audits/2022-10-ERC4626.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts/audits/2022-10-ERC4626.pdf -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/audits/2023-05-v4.9.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts/audits/2023-05-v4.9.pdf -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/audits/2023-10-v5.0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts/audits/2023-10-v5.0.pdf -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/certora/.gitignore: -------------------------------------------------------------------------------- 1 | patched 2 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/certora/harnesses/AccessControlHarness.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | import {AccessControl} from "../patched/access/AccessControl.sol"; 5 | 6 | contract AccessControlHarness is AccessControl {} 7 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/certora/harnesses/ERC20PermitHarness.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | import {ERC20Permit, ERC20} from "../patched/token/ERC20/extensions/ERC20Permit.sol"; 5 | 6 | contract ERC20PermitHarness is ERC20Permit { 7 | constructor(string memory name, string memory symbol) ERC20(name, symbol) ERC20Permit(name) {} 8 | 9 | function mint(address account, uint256 amount) external { 10 | _mint(account, amount); 11 | } 12 | 13 | function burn(address account, uint256 amount) external { 14 | _burn(account, amount); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/certora/harnesses/ERC3156FlashBorrowerHarness.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | import {IERC3156FlashBorrower} from "../patched/interfaces/IERC3156FlashBorrower.sol"; 4 | 5 | pragma solidity ^0.8.20; 6 | 7 | contract ERC3156FlashBorrowerHarness is IERC3156FlashBorrower { 8 | bytes32 somethingToReturn; 9 | 10 | function onFlashLoan(address, address, uint256, uint256, bytes calldata) external view override returns (bytes32) { 11 | return somethingToReturn; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/certora/harnesses/ERC721ReceiverHarness.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | import "../patched/interfaces/IERC721Receiver.sol"; 6 | 7 | contract ERC721ReceiverHarness is IERC721Receiver { 8 | function onERC721Received(address, address, uint256, bytes calldata) external pure returns (bytes4) { 9 | return this.onERC721Received.selector; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/certora/harnesses/Ownable2StepHarness.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | import {Ownable2Step, Ownable} from "../patched/access/Ownable2Step.sol"; 5 | 6 | contract Ownable2StepHarness is Ownable2Step { 7 | constructor(address initialOwner) Ownable(initialOwner) {} 8 | 9 | function restricted() external onlyOwner {} 10 | } 11 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/certora/harnesses/OwnableHarness.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | import {Ownable} from "../patched/access/Ownable.sol"; 5 | 6 | contract OwnableHarness is Ownable { 7 | constructor(address initialOwner) Ownable(initialOwner) {} 8 | 9 | function restricted() external onlyOwner {} 10 | } 11 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/certora/harnesses/PausableHarness.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | import {Pausable} from "../patched/utils/Pausable.sol"; 5 | 6 | contract PausableHarness is Pausable { 7 | function pause() external { 8 | _pause(); 9 | } 10 | 11 | function unpause() external { 12 | _unpause(); 13 | } 14 | 15 | function onlyWhenPaused() external whenPaused {} 16 | 17 | function onlyWhenNotPaused() external whenNotPaused {} 18 | } 19 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/certora/harnesses/TimelockControllerHarness.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | import {TimelockController} from "../patched/governance/TimelockController.sol"; 5 | 6 | contract TimelockControllerHarness is TimelockController { 7 | constructor( 8 | uint256 minDelay, 9 | address[] memory proposers, 10 | address[] memory executors, 11 | address admin 12 | ) TimelockController(minDelay, proposers, executors, admin) {} 13 | } 14 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/certora/reports/2021-10.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts/certora/reports/2021-10.pdf -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/certora/reports/2022-03.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts/certora/reports/2022-03.pdf -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/certora/reports/2022-05.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts/certora/reports/2022-05.pdf -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/certora/specs/helpers/helpers.spec: -------------------------------------------------------------------------------- 1 | // environment 2 | definition nonpayable(env e) returns bool = e.msg.value == 0; 3 | definition nonzerosender(env e) returns bool = e.msg.sender != 0; 4 | 5 | // math 6 | definition min(mathint a, mathint b) returns mathint = a < b ? a : b; 7 | definition max(mathint a, mathint b) returns mathint = a > b ? a : b; 8 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/certora/specs/methods/IAccessControl.spec: -------------------------------------------------------------------------------- 1 | methods { 2 | function DEFAULT_ADMIN_ROLE() external returns (bytes32) envfree; 3 | function hasRole(bytes32, address) external returns(bool) envfree; 4 | function getRoleAdmin(bytes32) external returns(bytes32) envfree; 5 | function grantRole(bytes32, address) external; 6 | function revokeRole(bytes32, address) external; 7 | function renounceRole(bytes32, address) external; 8 | } 9 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/certora/specs/methods/IERC2612.spec: -------------------------------------------------------------------------------- 1 | methods { 2 | function permit(address,address,uint256,uint256,uint8,bytes32,bytes32) external; 3 | function nonces(address) external returns (uint256) envfree; 4 | function DOMAIN_SEPARATOR() external returns (bytes32) envfree; 5 | } 6 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/certora/specs/methods/IERC3156FlashBorrower.spec: -------------------------------------------------------------------------------- 1 | methods { 2 | function _.onFlashLoan(address,address,uint256,uint256,bytes) external => DISPATCHER(true); 3 | } 4 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/certora/specs/methods/IERC3156FlashLender.spec: -------------------------------------------------------------------------------- 1 | methods { 2 | function maxFlashLoan(address) external returns (uint256) envfree; 3 | function flashFee(address,uint256) external returns (uint256) envfree; 4 | function flashLoan(address,address,uint256,bytes) external returns (bool); 5 | } 6 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/certora/specs/methods/IERC5313.spec: -------------------------------------------------------------------------------- 1 | methods { 2 | function owner() external returns (address) envfree; 3 | } 4 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/certora/specs/methods/IERC721Receiver.spec: -------------------------------------------------------------------------------- 1 | methods { 2 | function _.onERC721Received(address,address,uint256,bytes) external => DISPATCHER(true); 3 | } 4 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/certora/specs/methods/IOwnable.spec: -------------------------------------------------------------------------------- 1 | methods { 2 | function owner() external returns (address) envfree; 3 | function transferOwnership(address) external; 4 | function renounceOwnership() external; 5 | } 6 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/certora/specs/methods/IOwnable2Step.spec: -------------------------------------------------------------------------------- 1 | methods { 2 | function owner() external returns (address) envfree; 3 | function pendingOwner() external returns (address) envfree; 4 | function transferOwnership(address) external; 5 | function acceptOwnership() external; 6 | function renounceOwnership() external; 7 | } 8 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/contracts/access/manager/IAuthority.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (access/manager/IAuthority.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | /** 7 | * @dev Standard interface for permissioning originally defined in Dappsys. 8 | */ 9 | interface IAuthority { 10 | /** 11 | * @dev Returns true if the caller can invoke on a target the function identified by a function selector. 12 | */ 13 | function canCall(address caller, address target, bytes4 selector) external view returns (bool allowed); 14 | } 15 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/contracts/finance/README.adoc: -------------------------------------------------------------------------------- 1 | = Finance 2 | 3 | [.readme-notice] 4 | NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/finance 5 | 6 | This directory includes primitives for financial systems: 7 | 8 | - {VestingWallet} handles the vesting of Ether and ERC20 tokens for a given beneficiary. Custody of multiple tokens can 9 | be given to this contract, which will release the token to the beneficiary following a given, customizable, vesting 10 | schedule. 11 | 12 | == Contracts 13 | 14 | {{VestingWallet}} 15 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/contracts/interfaces/IERC1155.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC1155.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC1155} from "../token/ERC1155/IERC1155.sol"; 7 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/contracts/interfaces/IERC1155MetadataURI.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC1155MetadataURI.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC1155MetadataURI} from "../token/ERC1155/extensions/IERC1155MetadataURI.sol"; 7 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/contracts/interfaces/IERC1155Receiver.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC1155Receiver.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC1155Receiver} from "../token/ERC1155/IERC1155Receiver.sol"; 7 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/contracts/interfaces/IERC165.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC165} from "../utils/introspection/IERC165.sol"; 7 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC20} from "../token/ERC20/IERC20.sol"; 7 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/contracts/interfaces/IERC20Metadata.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20Metadata.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC20Metadata} from "../token/ERC20/extensions/IERC20Metadata.sol"; 7 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/contracts/interfaces/IERC2309.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC2309.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | /** 7 | * @dev ERC-2309: ERC-721 Consecutive Transfer Extension. 8 | */ 9 | interface IERC2309 { 10 | /** 11 | * @dev Emitted when the tokens from `fromTokenId` to `toTokenId` are transferred from `fromAddress` to `toAddress`. 12 | */ 13 | event ConsecutiveTransfer( 14 | uint256 indexed fromTokenId, 15 | uint256 toTokenId, 16 | address indexed fromAddress, 17 | address indexed toAddress 18 | ); 19 | } 20 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/contracts/interfaces/IERC2612.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC2612.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC20Permit} from "../token/ERC20/extensions/IERC20Permit.sol"; 7 | 8 | interface IERC2612 is IERC20Permit {} 9 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/contracts/interfaces/IERC3156.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC3156.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC3156FlashBorrower} from "./IERC3156FlashBorrower.sol"; 7 | import {IERC3156FlashLender} from "./IERC3156FlashLender.sol"; 8 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/contracts/interfaces/IERC5313.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5313.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | /** 7 | * @dev Interface for the Light Contract Ownership Standard. 8 | * 9 | * A standardized minimal interface required to identify an account that controls a contract 10 | */ 11 | interface IERC5313 { 12 | /** 13 | * @dev Gets the address of the owner. 14 | */ 15 | function owner() external view returns (address); 16 | } 17 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/contracts/interfaces/IERC5805.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5805.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IVotes} from "../governance/utils/IVotes.sol"; 7 | import {IERC6372} from "./IERC6372.sol"; 8 | 9 | interface IERC5805 is IERC6372, IVotes {} 10 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/contracts/interfaces/IERC6372.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC6372.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | interface IERC6372 { 7 | /** 8 | * @dev Clock used for flagging checkpoints. Can be overridden to implement timestamp based checkpoints (and voting). 9 | */ 10 | function clock() external view returns (uint48); 11 | 12 | /** 13 | * @dev Description of the clock 14 | */ 15 | // solhint-disable-next-line func-name-mixedcase 16 | function CLOCK_MODE() external view returns (string memory); 17 | } 18 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/contracts/interfaces/IERC721.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC721.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC721} from "../token/ERC721/IERC721.sol"; 7 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/contracts/interfaces/IERC721Enumerable.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC721Enumerable.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC721Enumerable} from "../token/ERC721/extensions/IERC721Enumerable.sol"; 7 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/contracts/interfaces/IERC721Metadata.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC721Metadata.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC721Metadata} from "../token/ERC721/extensions/IERC721Metadata.sol"; 7 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/contracts/interfaces/IERC721Receiver.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC721Receiver.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC721Receiver} from "../token/ERC721/IERC721Receiver.sol"; 7 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/contracts/metatx/README.adoc: -------------------------------------------------------------------------------- 1 | = Meta Transactions 2 | 3 | [.readme-notice] 4 | NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/metatx 5 | 6 | == Core 7 | 8 | {{ERC2771Context}} 9 | 10 | == Utils 11 | 12 | {{ERC2771Forwarder}} 13 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/contracts/mocks/ERC165/ERC165MaliciousData.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | contract ERC165MaliciousData { 6 | function supportsInterface(bytes4) public pure returns (bool) { 7 | assembly { 8 | mstore(0, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) 9 | return(0, 32) 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/contracts/mocks/ERC165/ERC165MissingData.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | contract ERC165MissingData { 6 | function supportsInterface(bytes4 interfaceId) public view {} // missing return 7 | } 8 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/contracts/mocks/ERC165/ERC165NotSupported.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | contract ERC165NotSupported {} 6 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/contracts/mocks/ERC165/ERC165ReturnBomb.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | import {IERC165} from "../../utils/introspection/IERC165.sol"; 6 | 7 | contract ERC165ReturnBombMock is IERC165 { 8 | function supportsInterface(bytes4 interfaceId) public pure override returns (bool) { 9 | if (interfaceId == type(IERC165).interfaceId) { 10 | assembly { 11 | mstore(0, 1) 12 | } 13 | } 14 | assembly { 15 | return(0, 101500) 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/contracts/mocks/EtherReceiverMock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | contract EtherReceiverMock { 6 | bool private _acceptEther; 7 | 8 | function setAcceptEther(bool acceptEther) public { 9 | _acceptEther = acceptEther; 10 | } 11 | 12 | receive() external payable { 13 | if (!_acceptEther) { 14 | revert(); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/contracts/mocks/ReentrancyAttack.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | import {Context} from "../utils/Context.sol"; 6 | 7 | contract ReentrancyAttack is Context { 8 | function callSender(bytes calldata data) public { 9 | (bool success, ) = _msgSender().call(data); 10 | require(success, "ReentrancyAttack: failed call"); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/contracts/mocks/docs/access-control/MyContractOwnable.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | import {Ownable} from "../../../access/Ownable.sol"; 6 | 7 | contract MyContract is Ownable { 8 | constructor(address initialOwner) Ownable(initialOwner) {} 9 | 10 | function normalThing() public { 11 | // anyone can call this normalThing() 12 | } 13 | 14 | function specialThing() public onlyOwner { 15 | // only the owner can call specialThing()! 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/contracts/mocks/proxy/BadBeacon.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | contract BadBeaconNoImpl {} 6 | 7 | contract BadBeaconNotContract { 8 | function implementation() external pure returns (address) { 9 | return address(0x1); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/contracts/mocks/token/ERC20ApprovalMock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | import {ERC20} from "../../token/ERC20/ERC20.sol"; 5 | 6 | abstract contract ERC20ApprovalMock is ERC20 { 7 | function _approve(address owner, address spender, uint256 amount, bool) internal virtual override { 8 | super._approve(owner, spender, amount, true); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/contracts/mocks/token/ERC20DecimalsMock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | import {ERC20} from "../../token/ERC20/ERC20.sol"; 6 | 7 | abstract contract ERC20DecimalsMock is ERC20 { 8 | uint8 private immutable _decimals; 9 | 10 | constructor(uint8 decimals_) { 11 | _decimals = decimals_; 12 | } 13 | 14 | function decimals() public view override returns (uint8) { 15 | return _decimals; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/contracts/mocks/token/ERC20ExcessDecimalsMock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | contract ERC20ExcessDecimalsMock { 6 | function decimals() public pure returns (uint256) { 7 | return type(uint256).max; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/contracts/mocks/token/ERC20ForceApproveMock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | import {ERC20} from "../../token/ERC20/ERC20.sol"; 6 | 7 | // contract that replicate USDT (0xdac17f958d2ee523a2206206994597c13d831ec7) approval behavior 8 | abstract contract ERC20ForceApproveMock is ERC20 { 9 | function approve(address spender, uint256 amount) public virtual override returns (bool) { 10 | require(amount == 0 || allowance(msg.sender, spender) == 0, "USDT approval failure"); 11 | return super.approve(spender, amount); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/contracts/mocks/token/ERC20Mock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | import {ERC20} from "../../token/ERC20/ERC20.sol"; 5 | 6 | contract ERC20Mock is ERC20 { 7 | constructor() ERC20("ERC20Mock", "E20M") {} 8 | 9 | function mint(address account, uint256 amount) external { 10 | _mint(account, amount); 11 | } 12 | 13 | function burn(address account, uint256 amount) external { 14 | _burn(account, amount); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/contracts/mocks/token/ERC20MulticallMock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | import {ERC20} from "../../token/ERC20/ERC20.sol"; 6 | import {Multicall} from "../../utils/Multicall.sol"; 7 | 8 | abstract contract ERC20MulticallMock is ERC20, Multicall {} 9 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/contracts/mocks/token/ERC20ReturnFalseMock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | import {ERC20} from "../../token/ERC20/ERC20.sol"; 6 | 7 | abstract contract ERC20ReturnFalseMock is ERC20 { 8 | function transfer(address, uint256) public pure override returns (bool) { 9 | return false; 10 | } 11 | 12 | function transferFrom(address, address, uint256) public pure override returns (bool) { 13 | return false; 14 | } 15 | 16 | function approve(address, uint256) public pure override returns (bool) { 17 | return false; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/contracts/mocks/token/ERC4626Mock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | import {IERC20, ERC20} from "../../token/ERC20/ERC20.sol"; 5 | import {ERC4626} from "../../token/ERC20/extensions/ERC4626.sol"; 6 | 7 | contract ERC4626Mock is ERC4626 { 8 | constructor(address underlying) ERC20("ERC4626Mock", "E4626M") ERC4626(IERC20(underlying)) {} 9 | 10 | function mint(address account, uint256 amount) external { 11 | _mint(account, amount); 12 | } 13 | 14 | function burn(address account, uint256 amount) external { 15 | _burn(account, amount); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/contracts/mocks/token/ERC4626OffsetMock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | import {ERC4626} from "../../token/ERC20/extensions/ERC4626.sol"; 6 | 7 | abstract contract ERC4626OffsetMock is ERC4626 { 8 | uint8 private immutable _offset; 9 | 10 | constructor(uint8 offset_) { 11 | _offset = offset_; 12 | } 13 | 14 | function _decimalsOffset() internal view virtual override returns (uint8) { 15 | return _offset; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/contracts/mocks/token/ERC721URIStorageMock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | import {ERC721URIStorage} from "../../token/ERC721/extensions/ERC721URIStorage.sol"; 6 | 7 | abstract contract ERC721URIStorageMock is ERC721URIStorage { 8 | string private _baseTokenURI; 9 | 10 | function _baseURI() internal view virtual override returns (string memory) { 11 | return _baseTokenURI; 12 | } 13 | 14 | function setBaseURI(string calldata newBaseTokenURI) public { 15 | _baseTokenURI = newBaseTokenURI; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (proxy/beacon/IBeacon.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | /** 7 | * @dev This is the interface that {BeaconProxy} expects of its beacon. 8 | */ 9 | interface IBeacon { 10 | /** 11 | * @dev Must return an address that can be used as a delegate call target. 12 | * 13 | * {UpgradeableBeacon} will check that this address is a contract. 14 | */ 15 | function implementation() external view returns (address); 16 | } 17 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/contracts/token/common/README.adoc: -------------------------------------------------------------------------------- 1 | = Common (Tokens) 2 | 3 | Functionality that is common to multiple token standards. 4 | 5 | * {ERC2981}: NFT Royalties compatible with both ERC721 and ERC1155. 6 | ** For ERC721 consider {ERC721Royalty} which clears the royalty information from storage on burn. 7 | 8 | == Contracts 9 | 10 | {{ERC2981}} 11 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/docs/antora.yml: -------------------------------------------------------------------------------- 1 | name: contracts 2 | title: Contracts 3 | version: 5.x 4 | prerelease: false 5 | nav: 6 | - modules/ROOT/nav.adoc 7 | - modules/api/nav.adoc 8 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-attack-3a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-attack-3a.png -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-attack-3b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-attack-3b.png -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-attack-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-attack-6.png -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-attack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-attack.png -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-deposit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-deposit.png -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-mint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-mint.png -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-rate-linear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-rate-linear.png -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-rate-loglog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-rate-loglog.png -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-rate-loglogext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts/docs/modules/ROOT/images/erc4626-rate-loglogext.png -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/docs/modules/ROOT/images/tally-exec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts/docs/modules/ROOT/images/tally-exec.png -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/docs/modules/ROOT/images/tally-vote.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edgelessNetwork/contracts/903752d2fef583d8aa4976e2438b187d8167798e/lib/openzeppelin-contracts/docs/modules/ROOT/images/tally-vote.png -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/docs/templates/page.hbs: -------------------------------------------------------------------------------- 1 | :github-icon: pass:[] 2 | {{#with-prelude}} 3 | {{readme (readme-path)}} 4 | {{/with-prelude}} 5 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/foundry.toml: -------------------------------------------------------------------------------- 1 | [profile.default] 2 | src = 'contracts' 3 | out = 'out' 4 | libs = ['node_modules', 'lib'] 5 | test = 'test' 6 | cache_path = 'cache_forge' 7 | 8 | [fuzz] 9 | runs = 10000 10 | max_test_rejects = 150000 11 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/hardhat/skip-foundry-tests.js: -------------------------------------------------------------------------------- 1 | const { subtask } = require('hardhat/config'); 2 | const { TASK_COMPILE_SOLIDITY_GET_SOURCE_PATHS } = require('hardhat/builtin-tasks/task-names'); 3 | 4 | subtask(TASK_COMPILE_SOLIDITY_GET_SOURCE_PATHS).setAction(async (_, __, runSuper) => 5 | (await runSuper()).filter(path => !path.endsWith('.t.sol')), 6 | ); 7 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/lib/forge-std/.gitignore: -------------------------------------------------------------------------------- 1 | cache/ 2 | out/ 3 | .vscode 4 | .idea 5 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/lib/forge-std/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "lib/ds-test"] 2 | path = lib/ds-test 3 | url = https://github.com/dapphub/ds-test 4 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/.gitignore: -------------------------------------------------------------------------------- 1 | /.dapple 2 | /build 3 | /out 4 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/Makefile: -------------------------------------------------------------------------------- 1 | all:; dapp build 2 | 3 | test: 4 | -dapp --use solc:0.4.23 build 5 | -dapp --use solc:0.4.26 build 6 | -dapp --use solc:0.5.17 build 7 | -dapp --use solc:0.6.12 build 8 | -dapp --use solc:0.7.5 build 9 | 10 | demo: 11 | DAPP_SRC=demo dapp --use solc:0.7.5 build 12 | -hevm dapp-test --verbose 3 13 | 14 | .PHONY: test demo 15 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/default.nix: -------------------------------------------------------------------------------- 1 | { solidityPackage, dappsys }: solidityPackage { 2 | name = "ds-test"; 3 | src = ./src; 4 | } 5 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ds-test", 3 | "version": "1.0.0", 4 | "description": "Assertions, equality checks and other test helpers ", 5 | "bugs": "https://github.com/dapphub/ds-test/issues", 6 | "license": "GPL-3.0", 7 | "author": "Contributors to ds-test", 8 | "files": [ 9 | "src/*" 10 | ], 11 | "repository": { 12 | "type": "git", 13 | "url": "https://github.com/dapphub/ds-test.git" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/lib/forge-std/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "forge-std", 3 | "version": "1.2.0", 4 | "description": "Forge Standard Library is a collection of helpful contracts and libraries for use with Forge and Foundry.", 5 | "homepage": "https://book.getfoundry.sh/forge/forge-std", 6 | "bugs": "https://github.com/foundry-rs/forge-std/issues", 7 | "license": "(Apache-2.0 OR MIT)", 8 | "author": "Contributors to Forge Standard Library", 9 | "files": [ 10 | "src/*" 11 | ], 12 | "repository": { 13 | "type": "git", 14 | "url": "https://github.com/foundry-rs/forge-std.git" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/lib/forge-std/src/interfaces/IERC165.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.6.2; 3 | 4 | interface IERC165 { 5 | /// @notice Query if a contract implements an interface 6 | /// @param interfaceID The interface identifier, as specified in ERC-165 7 | /// @dev Interface identification is specified in ERC-165. This function 8 | /// uses less than 30,000 gas. 9 | /// @return `true` if the contract implements `interfaceID` and 10 | /// `interfaceID` is not 0xffffffff, `false` otherwise 11 | function supportsInterface(bytes4 interfaceID) external view returns (bool); 12 | } 13 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/lib/forge-std/test/compilation/CompilationScript.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.6.2 <0.9.0; 3 | 4 | pragma experimental ABIEncoderV2; 5 | 6 | import "../../src/Script.sol"; 7 | 8 | // The purpose of this contract is to benchmark compilation time to avoid accidentally introducing 9 | // a change that results in very long compilation times with via-ir. See https://github.com/foundry-rs/forge-std/issues/207 10 | contract CompilationScript is Script {} 11 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/lib/forge-std/test/compilation/CompilationScriptBase.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.6.2 <0.9.0; 3 | 4 | pragma experimental ABIEncoderV2; 5 | 6 | import "../../src/Script.sol"; 7 | 8 | // The purpose of this contract is to benchmark compilation time to avoid accidentally introducing 9 | // a change that results in very long compilation times with via-ir. See https://github.com/foundry-rs/forge-std/issues/207 10 | contract CompilationScriptBase is ScriptBase {} 11 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/lib/forge-std/test/compilation/CompilationTest.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.6.2 <0.9.0; 3 | 4 | pragma experimental ABIEncoderV2; 5 | 6 | import "../../src/Test.sol"; 7 | 8 | // The purpose of this contract is to benchmark compilation time to avoid accidentally introducing 9 | // a change that results in very long compilation times with via-ir. See https://github.com/foundry-rs/forge-std/issues/207 10 | contract CompilationTest is Test {} 11 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/lib/forge-std/test/compilation/CompilationTestBase.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.6.2 <0.9.0; 3 | 4 | pragma experimental ABIEncoderV2; 5 | 6 | import "../../src/Test.sol"; 7 | 8 | // The purpose of this contract is to benchmark compilation time to avoid accidentally introducing 9 | // a change that results in very long compilation times with via-ir. See https://github.com/foundry-rs/forge-std/issues/207 10 | contract CompilationTestBase is TestBase {} 11 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/netlify.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | command = "npm run docs" 3 | publish = "build/site" 4 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/remappings.txt: -------------------------------------------------------------------------------- 1 | @openzeppelin/contracts/=contracts/ 2 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["github>OpenZeppelin/configs"], 3 | "labels": ["ignore-changeset"] 4 | } 5 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/requirements.txt: -------------------------------------------------------------------------------- 1 | certora-cli==4.8.0 2 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/scripts/checks/generation.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | npm run generate 6 | git diff -R --exit-code 7 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/scripts/generate/format-lines.js: -------------------------------------------------------------------------------- 1 | function formatLines(...lines) { 2 | return [...indentEach(0, lines)].join('\n') + '\n'; 3 | } 4 | 5 | function* indentEach(indent, lines) { 6 | for (const line of lines) { 7 | if (Array.isArray(line)) { 8 | yield* indentEach(indent + 1, line); 9 | } else { 10 | const padding = ' '.repeat(indent); 11 | yield* line.split('\n').map(subline => (subline === '' ? '' : padding + subline)); 12 | } 13 | } 14 | } 15 | 16 | module.exports = formatLines; 17 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/scripts/generate/templates/Checkpoints.opts.js: -------------------------------------------------------------------------------- 1 | // OPTIONS 2 | const VALUE_SIZES = [224, 208, 160]; 3 | 4 | const defaultOpts = size => ({ 5 | historyTypeName: `Trace${size}`, 6 | checkpointTypeName: `Checkpoint${size}`, 7 | checkpointFieldName: '_checkpoints', 8 | keyTypeName: `uint${256 - size}`, 9 | keyFieldName: '_key', 10 | valueTypeName: `uint${size}`, 11 | valueFieldName: '_value', 12 | }); 13 | 14 | module.exports = { 15 | VALUE_SIZES, 16 | OPTS: VALUE_SIZES.map(size => defaultOpts(size)), 17 | }; 18 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/scripts/git-user-config.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail -x 4 | 5 | git config user.name 'github-actions' 6 | git config user.email '41898282+github-actions[bot]@users.noreply.github.com' 7 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/scripts/prepack.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | shopt -s globstar 5 | 6 | # cross platform `mkdir -p` 7 | mkdirp() { 8 | node -e "fs.mkdirSync('$1', { recursive: true })" 9 | } 10 | 11 | # cd to the root of the repo 12 | cd "$(git rev-parse --show-toplevel)" 13 | 14 | npm run clean 15 | 16 | env COMPILE_MODE=production npm run compile 17 | 18 | mkdirp contracts/build/contracts 19 | cp artifacts/contracts/**/*.json contracts/build/contracts 20 | rm contracts/build/contracts/*.dbg.json 21 | node scripts/remove-ignored-artifacts.js 22 | 23 | cp README.md contracts/ 24 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/scripts/release/synchronize-versions.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | // Synchronizes the version in contracts/package.json with the one in package.json. 4 | // This is run automatically when npm version is run. 5 | 6 | const fs = require('fs'); 7 | 8 | setVersion('package.json', 'contracts/package.json'); 9 | 10 | function setVersion(from, to) { 11 | const fromJson = JSON.parse(fs.readFileSync(from)); 12 | const toJson = JSON.parse(fs.readFileSync(to)); 13 | toJson.version = fromJson.version; 14 | fs.writeFileSync(to, JSON.stringify(toJson, null, 2) + '\n'); 15 | } 16 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/scripts/release/version.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | changeset version 6 | 7 | scripts/release/format-changelog.js 8 | scripts/release/synchronize-versions.js 9 | scripts/release/update-comment.js 10 | 11 | oz-docs update-version 12 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/scripts/release/workflow/exit-prerelease.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | npx changeset pre exit rc 6 | git add . 7 | git commit -m "Exit release candidate" 8 | git push origin 9 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/scripts/release/workflow/integrity-check.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | CHECKSUMS="$RUNNER_TEMP/checksums.txt" 6 | 7 | # Extract tarball content into a tmp directory 8 | tar xf "$TARBALL" -C "$RUNNER_TEMP" 9 | 10 | # Move to extracted directory 11 | cd "$RUNNER_TEMP/package" 12 | 13 | # Checksum all Solidity files 14 | find . -type f -name "*.sol" | xargs shasum > "$CHECKSUMS" 15 | 16 | # Back to directory with git contents 17 | cd "$GITHUB_WORKSPACE/contracts" 18 | 19 | # Check against tarball contents 20 | shasum -c "$CHECKSUMS" 21 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/scripts/release/workflow/rerun.js: -------------------------------------------------------------------------------- 1 | module.exports = ({ github, context }) => 2 | github.rest.actions.createWorkflowDispatch({ 3 | owner: context.repo.owner, 4 | repo: context.repo.repo, 5 | workflow_id: 'release-cycle.yml', 6 | ref: process.env.REF || process.env.GITHUB_REF_NAME, 7 | }); 8 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/scripts/solhint-custom/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "solhint-plugin-openzeppelin", 3 | "version": "0.0.0", 4 | "private": true 5 | } 6 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/scripts/upgradeable/patch-apply.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | DIRNAME="$(dirname -- "${BASH_SOURCE[0]}")" 6 | PATCH="$DIRNAME/upgradeable.patch" 7 | 8 | error() { 9 | echo Error: "$*" >&2 10 | exit 1 11 | } 12 | 13 | if ! git diff-files --quiet ":!$PATCH" || ! git diff-index --quiet HEAD ":!$PATCH"; then 14 | error "Repository must have no staged or unstaged changes" 15 | fi 16 | 17 | if ! git apply -3 "$PATCH"; then 18 | error "Fix conflicts and run $DIRNAME/patch-save.sh" 19 | fi 20 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/scripts/upgradeable/patch-save.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | DIRNAME="$(dirname -- "${BASH_SOURCE[0]}")" 6 | PATCH="$DIRNAME/upgradeable.patch" 7 | 8 | error() { 9 | echo Error: "$*" >&2 10 | exit 1 11 | } 12 | 13 | if ! git diff-files --quiet ":!$PATCH"; then 14 | error "Unstaged changes. Stage to include in patch or temporarily stash." 15 | fi 16 | 17 | git diff-index --cached --patch --output="$PATCH" HEAD 18 | git restore --staged --worktree ":!$PATCH" 19 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/solhint.config.js: -------------------------------------------------------------------------------- 1 | const customRules = require('./scripts/solhint-custom'); 2 | 3 | const rules = [ 4 | 'no-unused-vars', 5 | 'const-name-snakecase', 6 | 'contract-name-camelcase', 7 | 'event-name-camelcase', 8 | 'func-name-mixedcase', 9 | 'func-param-name-mixedcase', 10 | 'modifier-name-mixedcase', 11 | 'var-name-mixedcase', 12 | 'imports-on-top', 13 | 'no-global-import', 14 | ...customRules.map(r => `openzeppelin/${r.ruleId}`), 15 | ]; 16 | 17 | module.exports = { 18 | plugins: ['openzeppelin'], 19 | rules: Object.fromEntries(rules.map(r => [r, 'error'])), 20 | }; 21 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/test/TESTING.md: -------------------------------------------------------------------------------- 1 | ## Testing 2 | 3 | Unit test are critical to OpenZeppelin Contracts. They help ensure code quality and mitigate against security vulnerabilities. The directory structure within the `/test` directory corresponds to the `/contracts` directory. 4 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/test/access/AccessControl.test.js: -------------------------------------------------------------------------------- 1 | const { DEFAULT_ADMIN_ROLE, shouldBehaveLikeAccessControl } = require('./AccessControl.behavior.js'); 2 | 3 | const AccessControl = artifacts.require('$AccessControl'); 4 | 5 | contract('AccessControl', function (accounts) { 6 | beforeEach(async function () { 7 | this.accessControl = await AccessControl.new({ from: accounts[0] }); 8 | await this.accessControl.$_grantRole(DEFAULT_ADMIN_ROLE, accounts[0]); 9 | }); 10 | 11 | shouldBehaveLikeAccessControl(...accounts); 12 | }); 13 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/test/helpers/account.js: -------------------------------------------------------------------------------- 1 | const { web3 } = require('hardhat'); 2 | const { impersonateAccount, setBalance } = require('@nomicfoundation/hardhat-network-helpers'); 3 | 4 | // Hardhat default balance 5 | const DEFAULT_BALANCE = web3.utils.toBN('10000000000000000000000'); 6 | 7 | async function impersonate(account, balance = DEFAULT_BALANCE) { 8 | await impersonateAccount(account); 9 | await setBalance(account, balance); 10 | } 11 | 12 | module.exports = { 13 | impersonate, 14 | }; 15 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/test/helpers/chainid.js: -------------------------------------------------------------------------------- 1 | const hre = require('hardhat'); 2 | 3 | async function getChainId() { 4 | const chainIdHex = await hre.network.provider.send('eth_chainId', []); 5 | return new hre.web3.utils.BN(chainIdHex, 'hex'); 6 | } 7 | 8 | module.exports = { 9 | getChainId, 10 | }; 11 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/test/helpers/constants.js: -------------------------------------------------------------------------------- 1 | const MAX_UINT48 = web3.utils.toBN(1).shln(48).subn(1).toString(); 2 | const MAX_UINT64 = web3.utils.toBN(1).shln(64).subn(1).toString(); 3 | 4 | module.exports = { 5 | MAX_UINT48, 6 | MAX_UINT64, 7 | }; 8 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/test/helpers/enums.js: -------------------------------------------------------------------------------- 1 | function Enum(...options) { 2 | return Object.fromEntries(options.map((key, i) => [key, web3.utils.toBN(i)])); 3 | } 4 | 5 | module.exports = { 6 | Enum, 7 | ProposalState: Enum('Pending', 'Active', 'Canceled', 'Defeated', 'Succeeded', 'Queued', 'Expired', 'Executed'), 8 | VoteType: Enum('Against', 'For', 'Abstain'), 9 | Rounding: Enum('Floor', 'Ceil', 'Trunc', 'Expand'), 10 | OperationState: Enum('Unset', 'Waiting', 'Ready', 'Done'), 11 | }; 12 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/test/helpers/iterate.js: -------------------------------------------------------------------------------- 1 | // Map values in an object 2 | const mapValues = (obj, fn) => Object.fromEntries(Object.entries(obj).map(([k, v]) => [k, fn(v)])); 3 | 4 | // Array of number or bigint 5 | const max = (...values) => values.slice(1).reduce((x, y) => (x > y ? x : y), values[0]); 6 | const min = (...values) => values.slice(1).reduce((x, y) => (x < y ? x : y), values[0]); 7 | 8 | // Cartesian product of a list of arrays 9 | const product = (...arrays) => arrays.reduce((a, b) => a.flatMap(ai => b.map(bi => [...ai, bi])), [[]]); 10 | 11 | module.exports = { 12 | mapValues, 13 | max, 14 | min, 15 | product, 16 | }; 17 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/test/helpers/math.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // sum of integer / bignumber 3 | sum: (...args) => args.reduce((acc, n) => acc + n, 0), 4 | BNsum: (...args) => args.reduce((acc, n) => acc.add(n), web3.utils.toBN(0)), 5 | // min of integer / bignumber 6 | min: (...args) => args.slice(1).reduce((x, y) => (x < y ? x : y), args[0]), 7 | BNmin: (...args) => args.slice(1).reduce((x, y) => (x.lt(y) ? x : y), args[0]), 8 | // max of integer / bignumber 9 | max: (...args) => args.slice(1).reduce((x, y) => (x > y ? x : y), args[0]), 10 | BNmax: (...args) => args.slice(1).reduce((x, y) => (x.gt(y) ? x : y), args[0]), 11 | }; 12 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/test/helpers/methods.js: -------------------------------------------------------------------------------- 1 | const { soliditySha3 } = require('web3-utils'); 2 | 3 | module.exports = { 4 | selector: signature => soliditySha3(signature).substring(0, 10), 5 | }; 6 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/test/helpers/time.js: -------------------------------------------------------------------------------- 1 | const ozHelpers = require('@openzeppelin/test-helpers'); 2 | const helpers = require('@nomicfoundation/hardhat-network-helpers'); 3 | 4 | module.exports = { 5 | clock: { 6 | blocknumber: () => helpers.time.latestBlock(), 7 | timestamp: () => helpers.time.latest(), 8 | }, 9 | clockFromReceipt: { 10 | blocknumber: receipt => Promise.resolve(receipt.blockNumber), 11 | timestamp: receipt => web3.eth.getBlock(receipt.blockNumber).then(block => block.timestamp), 12 | }, 13 | forward: { 14 | blocknumber: ozHelpers.time.advanceBlockTo, 15 | timestamp: helpers.time.increaseTo, 16 | }, 17 | }; 18 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/test/proxy/ERC1967/ERC1967Proxy.test.js: -------------------------------------------------------------------------------- 1 | const shouldBehaveLikeProxy = require('../Proxy.behaviour'); 2 | 3 | const ERC1967Proxy = artifacts.require('ERC1967Proxy'); 4 | 5 | contract('ERC1967Proxy', function (accounts) { 6 | // `undefined`, `null` and other false-ish opts will not be forwarded. 7 | const createProxy = async function (implementation, initData, opts) { 8 | return ERC1967Proxy.new(implementation, initData, ...[opts].filter(Boolean)); 9 | }; 10 | 11 | shouldBehaveLikeProxy(createProxy, accounts); 12 | }); 13 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/test/token/ERC721/ERC721.test.js: -------------------------------------------------------------------------------- 1 | const { shouldBehaveLikeERC721, shouldBehaveLikeERC721Metadata } = require('./ERC721.behavior'); 2 | 3 | const ERC721 = artifacts.require('$ERC721'); 4 | 5 | contract('ERC721', function (accounts) { 6 | const name = 'Non Fungible Token'; 7 | const symbol = 'NFT'; 8 | 9 | beforeEach(async function () { 10 | this.token = await ERC721.new(name, symbol); 11 | }); 12 | 13 | shouldBehaveLikeERC721(...accounts); 14 | shouldBehaveLikeERC721Metadata(name, symbol, ...accounts); 15 | }); 16 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/test/utils/Context.test.js: -------------------------------------------------------------------------------- 1 | require('@openzeppelin/test-helpers'); 2 | 3 | const ContextMock = artifacts.require('ContextMock'); 4 | const ContextMockCaller = artifacts.require('ContextMockCaller'); 5 | 6 | const { shouldBehaveLikeRegularContext } = require('./Context.behavior'); 7 | 8 | contract('Context', function (accounts) { 9 | const [sender] = accounts; 10 | 11 | beforeEach(async function () { 12 | this.context = await ContextMock.new(); 13 | this.caller = await ContextMockCaller.new(); 14 | }); 15 | 16 | shouldBehaveLikeRegularContext(sender); 17 | }); 18 | -------------------------------------------------------------------------------- /lib/openzeppelin-contracts/test/utils/introspection/ERC165.test.js: -------------------------------------------------------------------------------- 1 | const { shouldSupportInterfaces } = require('./SupportsInterface.behavior'); 2 | 3 | const ERC165 = artifacts.require('$ERC165'); 4 | 5 | contract('ERC165', function () { 6 | beforeEach(async function () { 7 | this.mock = await ERC165.new(); 8 | }); 9 | 10 | shouldSupportInterfaces(['ERC165']); 11 | }); 12 | -------------------------------------------------------------------------------- /lib/openzeppelin-foundry-upgrades/.github/actions/setup/action.yml: -------------------------------------------------------------------------------- 1 | name: Setup Node environment 2 | 3 | runs: 4 | using: composite 5 | steps: 6 | - uses: actions/setup-node@v4 7 | with: 8 | node-version: 18.x 9 | cache: yarn 10 | 11 | - name: Install dependencies 12 | run: yarn --frozen-lockfile --prefer-offline 13 | shell: bash -------------------------------------------------------------------------------- /lib/openzeppelin-foundry-upgrades/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiler files 2 | cache/ 3 | out/ 4 | 5 | # Ignores development broadcast logs 6 | !/broadcast 7 | /broadcast/*/31337/ 8 | /broadcast/**/dry-run/ 9 | 10 | # Docs 11 | docs/ 12 | 13 | # Dotenv file 14 | .env 15 | 16 | # Node modules 17 | node_modules/ -------------------------------------------------------------------------------- /lib/openzeppelin-foundry-upgrades/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "lib/forge-std"] 2 | path = lib/forge-std 3 | url = https://github.com/foundry-rs/forge-std 4 | [submodule "lib/solidity-stringutils"] 5 | path = lib/solidity-stringutils 6 | url = https://github.com/Arachnid/solidity-stringutils 7 | -------------------------------------------------------------------------------- /lib/openzeppelin-foundry-upgrades/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 120, 3 | "singleQuote": true, 4 | "trailingComma": "all", 5 | "arrowParens": "avoid", 6 | "overrides": [ 7 | { 8 | "files": "*.sol", 9 | "options": { 10 | "singleQuote": false 11 | } 12 | } 13 | ], 14 | "plugins": ["prettier-plugin-solidity"] 15 | } -------------------------------------------------------------------------------- /lib/openzeppelin-foundry-upgrades/foundry.toml: -------------------------------------------------------------------------------- 1 | [profile.default] 2 | src = "src" 3 | out = "out" 4 | libs = ["node_modules", "lib"] 5 | build_info = true 6 | extra_output = ["storageLayout"] 7 | -------------------------------------------------------------------------------- /lib/openzeppelin-foundry-upgrades/lib/forge-std/.gitignore: -------------------------------------------------------------------------------- 1 | cache/ 2 | out/ 3 | .vscode 4 | .idea 5 | -------------------------------------------------------------------------------- /lib/openzeppelin-foundry-upgrades/lib/forge-std/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "lib/ds-test"] 2 | path = lib/ds-test 3 | url = https://github.com/dapphub/ds-test 4 | -------------------------------------------------------------------------------- /lib/openzeppelin-foundry-upgrades/lib/forge-std/lib/ds-test/.gitignore: -------------------------------------------------------------------------------- 1 | /.dapple 2 | /build 3 | /out 4 | /cache/ 5 | -------------------------------------------------------------------------------- /lib/openzeppelin-foundry-upgrades/lib/forge-std/lib/ds-test/Makefile: -------------------------------------------------------------------------------- 1 | all:; dapp build 2 | 3 | test: 4 | -dapp --use solc:0.4.23 build 5 | -dapp --use solc:0.4.26 build 6 | -dapp --use solc:0.5.17 build 7 | -dapp --use solc:0.6.12 build 8 | -dapp --use solc:0.7.5 build 9 | 10 | demo: 11 | DAPP_SRC=demo dapp --use solc:0.7.5 build 12 | -hevm dapp-test --verbose 3 13 | 14 | .PHONY: test demo 15 | -------------------------------------------------------------------------------- /lib/openzeppelin-foundry-upgrades/lib/forge-std/lib/ds-test/default.nix: -------------------------------------------------------------------------------- 1 | { solidityPackage, dappsys }: solidityPackage { 2 | name = "ds-test"; 3 | src = ./src; 4 | } 5 | -------------------------------------------------------------------------------- /lib/openzeppelin-foundry-upgrades/lib/forge-std/lib/ds-test/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ds-test", 3 | "version": "1.0.0", 4 | "description": "Assertions, equality checks and other test helpers ", 5 | "bugs": "https://github.com/dapphub/ds-test/issues", 6 | "license": "GPL-3.0", 7 | "author": "Contributors to ds-test", 8 | "files": [ 9 | "src/*" 10 | ], 11 | "repository": { 12 | "type": "git", 13 | "url": "https://github.com/dapphub/ds-test.git" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /lib/openzeppelin-foundry-upgrades/lib/forge-std/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "forge-std", 3 | "version": "1.7.1", 4 | "description": "Forge Standard Library is a collection of helpful contracts and libraries for use with Forge and Foundry.", 5 | "homepage": "https://book.getfoundry.sh/forge/forge-std", 6 | "bugs": "https://github.com/foundry-rs/forge-std/issues", 7 | "license": "(Apache-2.0 OR MIT)", 8 | "author": "Contributors to Forge Standard Library", 9 | "files": [ 10 | "src/**/*" 11 | ], 12 | "repository": { 13 | "type": "git", 14 | "url": "https://github.com/foundry-rs/forge-std.git" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /lib/openzeppelin-foundry-upgrades/lib/forge-std/src/interfaces/IERC165.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.6.2; 3 | 4 | interface IERC165 { 5 | /// @notice Query if a contract implements an interface 6 | /// @param interfaceID The interface identifier, as specified in ERC-165 7 | /// @dev Interface identification is specified in ERC-165. This function 8 | /// uses less than 30,000 gas. 9 | /// @return `true` if the contract implements `interfaceID` and 10 | /// `interfaceID` is not 0xffffffff, `false` otherwise 11 | function supportsInterface(bytes4 interfaceID) external view returns (bool); 12 | } 13 | -------------------------------------------------------------------------------- /lib/openzeppelin-foundry-upgrades/lib/forge-std/test/compilation/CompilationScript.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.6.2 <0.9.0; 3 | 4 | pragma experimental ABIEncoderV2; 5 | 6 | import "../../src/Script.sol"; 7 | 8 | // The purpose of this contract is to benchmark compilation time to avoid accidentally introducing 9 | // a change that results in very long compilation times with via-ir. See https://github.com/foundry-rs/forge-std/issues/207 10 | contract CompilationScript is Script {} 11 | -------------------------------------------------------------------------------- /lib/openzeppelin-foundry-upgrades/lib/forge-std/test/compilation/CompilationScriptBase.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.6.2 <0.9.0; 3 | 4 | pragma experimental ABIEncoderV2; 5 | 6 | import "../../src/Script.sol"; 7 | 8 | // The purpose of this contract is to benchmark compilation time to avoid accidentally introducing 9 | // a change that results in very long compilation times with via-ir. See https://github.com/foundry-rs/forge-std/issues/207 10 | contract CompilationScriptBase is ScriptBase {} 11 | -------------------------------------------------------------------------------- /lib/openzeppelin-foundry-upgrades/lib/forge-std/test/compilation/CompilationTest.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.6.2 <0.9.0; 3 | 4 | pragma experimental ABIEncoderV2; 5 | 6 | import "../../src/Test.sol"; 7 | 8 | // The purpose of this contract is to benchmark compilation time to avoid accidentally introducing 9 | // a change that results in very long compilation times with via-ir. See https://github.com/foundry-rs/forge-std/issues/207 10 | contract CompilationTest is Test {} 11 | -------------------------------------------------------------------------------- /lib/openzeppelin-foundry-upgrades/lib/forge-std/test/compilation/CompilationTestBase.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.6.2 <0.9.0; 3 | 4 | pragma experimental ABIEncoderV2; 5 | 6 | import "../../src/Test.sol"; 7 | 8 | // The purpose of this contract is to benchmark compilation time to avoid accidentally introducing 9 | // a change that results in very long compilation times with via-ir. See https://github.com/foundry-rs/forge-std/issues/207 10 | contract CompilationTestBase is TestBase {} 11 | -------------------------------------------------------------------------------- /lib/openzeppelin-foundry-upgrades/lib/solidity-stringutils/.gitattributes: -------------------------------------------------------------------------------- 1 | *.sol linguist-language=Solidity 2 | -------------------------------------------------------------------------------- /lib/openzeppelin-foundry-upgrades/lib/solidity-stringutils/.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: "CI" 2 | on: "push" 3 | jobs: 4 | tests: 5 | runs-on: ubuntu-latest 6 | steps: 7 | - uses: actions/checkout@v2.3.4 8 | - uses: cachix/install-nix-action@v13 9 | - name: Install dapp 10 | run: nix-env -iA dapp -f $(curl -sS https://api.github.com/repos/dapphub/dapptools/releases/latest | jq -r .tarball_url) 11 | - name: Fetch submodules 12 | run: git submodule update --init 13 | - name: Run tests 14 | run: make test 15 | -------------------------------------------------------------------------------- /lib/openzeppelin-foundry-upgrades/lib/solidity-stringutils/.gitignore: -------------------------------------------------------------------------------- 1 | **/chain_db//out 2 | build 3 | out 4 | 5 | -------------------------------------------------------------------------------- /lib/openzeppelin-foundry-upgrades/lib/solidity-stringutils/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "lib/ds-test"] 2 | path = lib/ds-test 3 | url = https://github.com/dapphub/ds-test 4 | -------------------------------------------------------------------------------- /lib/openzeppelin-foundry-upgrades/lib/solidity-stringutils/Makefile: -------------------------------------------------------------------------------- 1 | all :; dapp build 2 | clean :; dapp clean 3 | test :; dapp test 4 | deploy :; dapp create SolidityStringutils 5 | -------------------------------------------------------------------------------- /lib/openzeppelin-foundry-upgrades/lib/solidity-stringutils/README: -------------------------------------------------------------------------------- 1 | Basic string utilities for Solidity, optimized for low gas usage. 2 | -------------------------------------------------------------------------------- /lib/openzeppelin-foundry-upgrades/lib/solidity-stringutils/dappfile: -------------------------------------------------------------------------------- 1 | version: 2.0.0 2 | tags: [] 3 | layout: 4 | sol_sources: . 5 | build_dir: build 6 | dependencies: {} 7 | ignore: [] 8 | name: ethereum-stringutils 9 | -------------------------------------------------------------------------------- /lib/openzeppelin-foundry-upgrades/lib/solidity-stringutils/lib/ds-test/.gitignore: -------------------------------------------------------------------------------- 1 | /.dapple 2 | /build 3 | /out 4 | -------------------------------------------------------------------------------- /lib/openzeppelin-foundry-upgrades/lib/solidity-stringutils/lib/ds-test/Makefile: -------------------------------------------------------------------------------- 1 | all:; dapp build 2 | 3 | test: 4 | -dapp --use solc:0.4.23 build 5 | -dapp --use solc:0.4.26 build 6 | -dapp --use solc:0.5.17 build 7 | -dapp --use solc:0.6.12 build 8 | -dapp --use solc:0.7.5 build 9 | 10 | demo: 11 | DAPP_SRC=demo dapp --use solc:0.7.5 build 12 | -hevm dapp-test --verbose 3 13 | 14 | .PHONY: test demo 15 | -------------------------------------------------------------------------------- /lib/openzeppelin-foundry-upgrades/lib/solidity-stringutils/lib/ds-test/default.nix: -------------------------------------------------------------------------------- 1 | { solidityPackage, dappsys }: solidityPackage { 2 | name = "ds-test"; 3 | src = ./src; 4 | } 5 | -------------------------------------------------------------------------------- /lib/openzeppelin-foundry-upgrades/lib/solidity-stringutils/strings.sol: -------------------------------------------------------------------------------- 1 | ./src/strings.sol -------------------------------------------------------------------------------- /lib/openzeppelin-foundry-upgrades/remappings.txt: -------------------------------------------------------------------------------- 1 | openzeppelin-foundry-upgrades/=src/ -------------------------------------------------------------------------------- /lib/openzeppelin-foundry-upgrades/scripts/solhint-custom/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "solhint-plugin-openzeppelin", 3 | "version": "0.0.0", 4 | "private": true 5 | } 6 | -------------------------------------------------------------------------------- /lib/openzeppelin-foundry-upgrades/src/internal/Versions.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | library Versions { 5 | // TODO add a workflow to update this automatically based on package.json 6 | string constant UPGRADES_CORE = "^1.31.0"; 7 | string constant DEFENDER_DEPLOY_CLIENT_CLI = "0.0.1-alpha.0"; 8 | } 9 | -------------------------------------------------------------------------------- /lib/openzeppelin-foundry-upgrades/test/Defender.s.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | import {Script} from "forge-std/Script.sol"; 5 | 6 | import {Defender} from "openzeppelin-foundry-upgrades/Defender.sol"; 7 | import {console} from "forge-std/console.sol"; 8 | 9 | contract DefenderScript is Script { 10 | function setUp() public {} 11 | 12 | function run() public { 13 | string memory deployed = Defender.deployContract("MyContractFile.sol:MyContractName"); 14 | console.log("Successfully deployed to address ", deployed); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /lib/openzeppelin-foundry-upgrades/test/contracts/Greeter.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | // These contracts are for testing only, they are not safe for use in production. 5 | 6 | contract Greeter { 7 | string public greeting; 8 | 9 | function initialize(string memory _greeting) public { 10 | greeting = _greeting; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /lib/openzeppelin-foundry-upgrades/test/contracts/GreeterProxiable.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | import {Proxiable} from "./Proxiable.sol"; 5 | 6 | // These contracts are for testing only, they are not safe for use in production. 7 | 8 | contract GreeterProxiable is Proxiable { 9 | string public greeting; 10 | 11 | function initialize(string memory _greeting) public { 12 | greeting = _greeting; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /lib/openzeppelin-foundry-upgrades/test/contracts/GreeterV2.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | // These contracts are for testing only, they are not safe for use in production. 5 | 6 | /// @custom:oz-upgrades-from Greeter 7 | contract GreeterV2 { 8 | string public greeting; 9 | 10 | function initialize(string memory _greeting) public { 11 | greeting = _greeting; 12 | } 13 | 14 | function resetGreeting() public { 15 | greeting = "resetted"; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /lib/openzeppelin-foundry-upgrades/test/contracts/GreeterV2Proxiable.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | import {Proxiable} from "./Proxiable.sol"; 5 | 6 | // These contracts are for testing only, they are not safe for use in production. 7 | 8 | /// @custom:oz-upgrades-from GreeterProxiable 9 | contract GreeterV2Proxiable is Proxiable { 10 | string public greeting; 11 | 12 | function initialize(string memory _greeting) public { 13 | greeting = _greeting; 14 | } 15 | 16 | function resetGreeting() public { 17 | greeting = "resetted"; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /lib/openzeppelin-foundry-upgrades/test/contracts/MyContractFile.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | // This contract is for testing only. 5 | 6 | contract MyContractName { 7 | 8 | } 9 | -------------------------------------------------------------------------------- /remappings.txt: -------------------------------------------------------------------------------- 1 | @openzeppelin/contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/ 2 | @openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/ 3 | @prb/test/=node_modules/@prb/test/ 4 | forge-std/=lib/forge-std 5 | -------------------------------------------------------------------------------- /src/ForceCompile.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity >=0.8.23; 3 | import { ERC1967Proxy } from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol"; 4 | -------------------------------------------------------------------------------- /src/interfaces/ILido.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity >=0.8.23; 3 | 4 | import { IERC20 } from "@openzeppelin/contracts/interfaces/IERC20.sol"; 5 | import { IERC20Permit } from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol"; 6 | 7 | interface ILido is IERC20, IERC20Permit { 8 | /** 9 | * @notice Send funds to the pool with optional _referral parameter 10 | * @dev This function is alternative way to submit funds. Supports optional referral address. 11 | * @return Amount of StETH shares generated 12 | */ 13 | function submit(address _referral) external payable returns (uint256); 14 | } 15 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2020", 4 | "module": "commonjs", 5 | "esModuleInterop": true, 6 | "forceConsistentCasingInFileNames": true, 7 | "strict": true, 8 | "skipLibCheck": true, 9 | "resolveJsonModule": true 10 | } 11 | } 12 | --------------------------------------------------------------------------------