├── lib
├── permit2
│ ├── .env.example
│ ├── lib
│ │ ├── solmate
│ │ │ ├── .prettierignore
│ │ │ ├── .gitignore
│ │ │ ├── lib
│ │ │ │ └── ds-test
│ │ │ │ │ ├── .gitignore
│ │ │ │ │ ├── default.nix
│ │ │ │ │ └── Makefile
│ │ │ ├── .gitattributes
│ │ │ ├── .gitmodules
│ │ │ ├── audits
│ │ │ │ └── v6-Fixed-Point-Solutions.pdf
│ │ │ ├── foundry.toml
│ │ │ ├── .prettierrc
│ │ │ ├── .vscode
│ │ │ │ └── settings.json
│ │ │ ├── src
│ │ │ │ └── test
│ │ │ │ │ └── utils
│ │ │ │ │ ├── mocks
│ │ │ │ │ ├── MockOwned.sol
│ │ │ │ │ ├── MockAuthChild.sol
│ │ │ │ │ └── MockAuthority.sol
│ │ │ │ │ └── DSInvariantTest.sol
│ │ │ └── .github
│ │ │ │ └── pull_request_template.md
│ │ ├── openzeppelin-contracts
│ │ │ ├── migrations
│ │ │ │ └── .gitkeep
│ │ │ ├── certora
│ │ │ │ ├── munged
│ │ │ │ │ └── .gitignore
│ │ │ │ └── scripts
│ │ │ │ │ ├── Governor.sh
│ │ │ │ │ ├── WizardFirstTry.sh
│ │ │ │ │ ├── GovernorCountingSimple-counting.sh
│ │ │ │ │ └── sanity.sh
│ │ │ ├── .gitattributes
│ │ │ ├── netlify.toml
│ │ │ ├── .mocharc.js
│ │ │ ├── audit
│ │ │ │ └── 2018-10.pdf
│ │ │ ├── scripts
│ │ │ │ ├── checks
│ │ │ │ │ └── generation.sh
│ │ │ │ ├── git-user-config.sh
│ │ │ │ ├── prepare.sh
│ │ │ │ ├── release
│ │ │ │ │ └── version.sh
│ │ │ │ ├── prepack.sh
│ │ │ │ ├── prepare-contracts-package.sh
│ │ │ │ ├── generate
│ │ │ │ │ └── format-lines.js
│ │ │ │ └── prepare-docs.sh
│ │ │ ├── contracts
│ │ │ │ ├── mocks
│ │ │ │ │ ├── ERC165
│ │ │ │ │ │ ├── ERC165NotSupported.sol
│ │ │ │ │ │ ├── ERC165MissingData.sol
│ │ │ │ │ │ └── ERC165MaliciousData.sol
│ │ │ │ │ ├── OwnableMock.sol
│ │ │ │ │ ├── ERC165Mock.sol
│ │ │ │ │ ├── BadBeacon.sol
│ │ │ │ │ ├── Base64Mock.sol
│ │ │ │ │ ├── ERC165StorageMock.sol
│ │ │ │ │ ├── MulticallTokenMock.sol
│ │ │ │ │ ├── ReentrancyAttack.sol
│ │ │ │ │ ├── ERC1820ImplementerMock.sol
│ │ │ │ │ ├── EtherReceiverMock.sol
│ │ │ │ │ ├── PullPaymentMock.sol
│ │ │ │ │ ├── ERC20BurnableMock.sol
│ │ │ │ │ ├── ArraysImpl.sol
│ │ │ │ │ ├── ERC20CappedMock.sol
│ │ │ │ │ ├── ERC1155BurnableMock.sol
│ │ │ │ │ ├── SignatureCheckerMock.sol
│ │ │ │ │ ├── AccessControlMock.sol
│ │ │ │ │ └── ERC20WrapperMock.sol
│ │ │ │ ├── token
│ │ │ │ │ ├── ERC1155
│ │ │ │ │ │ └── presets
│ │ │ │ │ │ │ └── README.md
│ │ │ │ │ ├── ERC20
│ │ │ │ │ │ └── presets
│ │ │ │ │ │ │ └── README.md
│ │ │ │ │ ├── ERC721
│ │ │ │ │ │ └── presets
│ │ │ │ │ │ │ └── README.md
│ │ │ │ │ └── common
│ │ │ │ │ │ └── README.adoc
│ │ │ │ ├── interfaces
│ │ │ │ │ ├── IERC20.sol
│ │ │ │ │ ├── IERC1155.sol
│ │ │ │ │ ├── IERC721.sol
│ │ │ │ │ ├── IERC777.sol
│ │ │ │ │ ├── IERC165.sol
│ │ │ │ │ ├── IERC777Sender.sol
│ │ │ │ │ ├── IERC721Receiver.sol
│ │ │ │ │ ├── IERC1155Receiver.sol
│ │ │ │ │ ├── IERC777Recipient.sol
│ │ │ │ │ ├── IERC1820Registry.sol
│ │ │ │ │ ├── IERC20Metadata.sol
│ │ │ │ │ ├── IERC721Metadata.sol
│ │ │ │ │ ├── IERC1820Implementer.sol
│ │ │ │ │ ├── IERC3156.sol
│ │ │ │ │ ├── IERC721Enumerable.sol
│ │ │ │ │ ├── IERC1155MetadataURI.sol
│ │ │ │ │ └── draft-IERC2612.sol
│ │ │ │ ├── metatx
│ │ │ │ │ └── README.adoc
│ │ │ │ ├── crosschain
│ │ │ │ │ └── errors.sol
│ │ │ │ └── vendor
│ │ │ │ │ └── polygon
│ │ │ │ │ └── IFxMessageProcessor.sol
│ │ │ ├── slither.config.json
│ │ │ ├── .github
│ │ │ │ ├── ISSUE_TEMPLATE
│ │ │ │ │ └── config.yml
│ │ │ │ └── workflows
│ │ │ │ │ └── docs.yml
│ │ │ ├── renovate.json
│ │ │ ├── .codecov.yml
│ │ │ ├── test
│ │ │ │ ├── TESTING.md
│ │ │ │ ├── helpers
│ │ │ │ │ └── create2.js
│ │ │ │ ├── utils
│ │ │ │ │ ├── introspection
│ │ │ │ │ │ └── ERC165.test.js
│ │ │ │ │ └── escrow
│ │ │ │ │ │ └── Escrow.test.js
│ │ │ │ ├── access
│ │ │ │ │ └── AccessControl.test.js
│ │ │ │ └── proxy
│ │ │ │ │ └── ERC1967
│ │ │ │ │ └── ERC1967Proxy.test.js
│ │ │ ├── .prettierrc
│ │ │ ├── .solcover.js
│ │ │ ├── .editorconfig
│ │ │ ├── hardhat
│ │ │ │ └── env-contract.js
│ │ │ └── .solhint.json
│ │ ├── forge-gas-snapshot
│ │ │ ├── .forge-snapshots
│ │ │ │ ├── add.snap
│ │ │ │ ├── addFirst.snap
│ │ │ │ ├── addSecond.snap
│ │ │ │ ├── manyAdd.snap
│ │ │ │ ├── manySstore.snap
│ │ │ │ ├── snapmanyAdd.snap
│ │ │ │ └── snapmanySstore.snap
│ │ │ ├── .gitignore
│ │ │ ├── foundry.toml
│ │ │ └── .gitmodules
│ │ └── forge-std
│ │ │ ├── .gitignore
│ │ │ ├── lib
│ │ │ └── ds-test
│ │ │ │ ├── .gitignore
│ │ │ │ ├── default.nix
│ │ │ │ ├── Makefile
│ │ │ │ └── package.json
│ │ │ ├── .gitmodules
│ │ │ └── test
│ │ │ └── compilation
│ │ │ ├── CompilationTest.sol
│ │ │ ├── CompilationScript.sol
│ │ │ ├── CompilationTestBase.sol
│ │ │ └── CompilationScriptBase.sol
│ ├── .forge-snapshots
│ │ ├── lockdown.snap
│ │ ├── transferFrom.snap
│ │ ├── batchTransferFrom.snap
│ │ ├── permitCleanWrite.snap
│ │ ├── permitCompactSig.snap
│ │ ├── permitDirtyNonce.snap
│ │ ├── permitDirtyWrite.snap
│ │ ├── permitInvalidSigner.snap
│ │ ├── permitBatchCleanWrite.snap
│ │ ├── permitBatchDirtyWrite.snap
│ │ ├── permitSignatureExpired.snap
│ │ ├── batchTransferFromMultiToken.snap
│ │ ├── permitTransferFromCompactSig.snap
│ │ ├── permitTransferFromSingleToken.snap
│ │ ├── single recipient 2 tokens.snap
│ │ ├── single recipient many tokens.snap
│ │ ├── permitBatchTransferFromSingleToken.snap
│ │ ├── permitSetMaxAllowanceCleanWrite.snap
│ │ ├── permitSetMaxAllowanceDirtyWrite.snap
│ │ ├── permitTransferFromTypedWitness.snap
│ │ ├── transferFrom with different owners.snap
│ │ ├── permitBatchTransferFromMultipleTokens.snap
│ │ ├── permitTransferFromBatchTypedWitness.snap
│ │ ├── permit2 + transferFrom2 with WETH9's mainnet address.snap
│ │ ├── permit2 + transferFrom2 with an EIP-2612 native token.snap
│ │ ├── permit2 + transferFrom2 with a non EIP-2612 native token.snap
│ │ ├── safePermit + safeTransferFrom with an EIP-2612 native token.snap
│ │ ├── simplePermit2 + transferFrom2 with a non EIP-2612 native token.snap
│ │ └── permit2 + transferFrom2 with a non EIP-2612 native token with fallback.snap
│ ├── remappings.txt
│ ├── .gitignore
│ ├── .gitattributes
│ ├── audits
│ │ ├── ABDKAudit.pdf
│ │ └── Chainsecurity Audit.pdf
│ ├── src
│ │ ├── interfaces
│ │ │ ├── IEIP712.sol
│ │ │ └── IERC1271.sol
│ │ ├── PermitErrors.sol
│ │ └── libraries
│ │ │ └── SafeCast160.sol
│ ├── foundry.toml
│ ├── test
│ │ ├── mocks
│ │ │ ├── MockNonPermitNonERC20WithDS.sol
│ │ │ ├── MockSignatureVerification.sol
│ │ │ ├── MockERC20.sol
│ │ │ ├── MockNonPermitERC20.sol
│ │ │ ├── MockERC1155.sol
│ │ │ └── MockERC721.sol
│ │ └── integration
│ │ │ └── tokens
│ │ │ ├── DAI.t.sol
│ │ │ ├── UNI.t.sol
│ │ │ ├── ZRX.t.sol
│ │ │ ├── USDC.t.sol
│ │ │ ├── WBTC.t.sol
│ │ │ ├── FeeOnTransferToken.t.sol
│ │ │ └── USDT.t.sol
│ ├── .vscode
│ │ └── settings.json
│ ├── .github
│ │ └── workflows
│ │ │ ├── lint.yml
│ │ │ └── gas.yml
│ └── .gitmodules
├── solmate
│ ├── .prettierignore
│ ├── .gitignore
│ ├── .gitattributes
│ ├── lib
│ │ └── ds-test
│ │ │ ├── .gitignore
│ │ │ ├── default.nix
│ │ │ ├── Makefile
│ │ │ └── package.json
│ ├── .gitmodules
│ ├── audits
│ │ └── v6-Fixed-Point-Solutions.pdf
│ ├── foundry.toml
│ ├── .prettierrc
│ ├── .vscode
│ │ └── settings.json
│ ├── src
│ │ └── test
│ │ │ └── utils
│ │ │ ├── mocks
│ │ │ ├── MockOwned.sol
│ │ │ ├── MockAuthChild.sol
│ │ │ └── MockAuthority.sol
│ │ │ └── DSInvariantTest.sol
│ └── .github
│ │ └── pull_request_template.md
├── v3-core
│ ├── .yarnrc
│ ├── .gitattributes
│ ├── .gitignore
│ ├── .prettierrc
│ ├── .solhint.json
│ ├── test
│ │ ├── __snapshots__
│ │ │ ├── NoDelegateCall.spec.ts.snap
│ │ │ └── UniswapV3Factory.spec.ts.snap
│ │ └── shared
│ │ │ ├── expect.ts
│ │ │ └── format.ts
│ ├── contracts
│ │ ├── libraries
│ │ │ ├── FixedPoint128.sol
│ │ │ └── FixedPoint96.sol
│ │ ├── interfaces
│ │ │ └── pool
│ │ │ │ └── IUniswapV3PoolErrors.sol
│ │ └── test
│ │ │ └── UnsafeMathEchidnaTest.sol
│ └── tsconfig.json
├── v3-periphery
│ ├── .prettierignore
│ ├── .yarnrc
│ ├── .gitattributes
│ ├── .prettierrc
│ ├── .gitignore
│ ├── testnet-deploys.md
│ ├── .solhint.json
│ ├── test
│ │ ├── __snapshots__
│ │ │ ├── Path.spec.ts.snap
│ │ │ ├── PairFlash.spec.ts.snap
│ │ │ ├── SwapRouter.spec.ts.snap
│ │ │ ├── V3Migrator.spec.ts.snap
│ │ │ ├── OracleLibrary.spec.ts.snap
│ │ │ ├── PeripheryImmutableState.spec.ts.snap
│ │ │ ├── Multicall.spec.ts.snap
│ │ │ ├── TickLens.spec.ts.snap
│ │ │ ├── PoolAddress.spec.ts.snap
│ │ │ └── PositionValue.spec.ts.snap
│ │ └── shared
│ │ │ ├── expandTo18Decimals.ts
│ │ │ ├── expect.ts
│ │ │ ├── base64.ts
│ │ │ ├── extractJSONFromURI.ts
│ │ │ ├── constants.ts
│ │ │ ├── poolAtAddress.ts
│ │ │ ├── tokenSort.ts
│ │ │ ├── ticks.ts
│ │ │ └── encodePriceSqrt.ts
│ ├── contracts
│ │ ├── lens
│ │ │ └── README.md
│ │ ├── test
│ │ │ ├── SelfPermitTest.sol
│ │ │ ├── PeripheryImmutableStateTest.sol
│ │ │ ├── TestERC20.sol
│ │ │ ├── TestERC20Metadata.sol
│ │ │ ├── TestCallbackValidation.sol
│ │ │ ├── Base64Test.sol
│ │ │ └── MockTimeSwapRouter.sol
│ │ ├── base
│ │ │ ├── PeripheryValidation.sol
│ │ │ └── BlockTimestamp.sol
│ │ ├── libraries
│ │ │ ├── TokenRatioSortOrder.sol
│ │ │ ├── ChainId.sol
│ │ │ └── PositionKey.sol
│ │ └── interfaces
│ │ │ ├── external
│ │ │ └── IWETH9.sol
│ │ │ └── IPeripheryImmutableState.sol
│ └── tsconfig.json
├── openzeppelin-contracts
│ ├── certora
│ │ ├── .gitignore
│ │ ├── specs
│ │ │ ├── helpers
│ │ │ │ └── helpers.spec
│ │ │ └── methods
│ │ │ │ ├── IERC5313.spec
│ │ │ │ ├── IOwnable.spec
│ │ │ │ ├── IOwnable2Step.spec
│ │ │ │ ├── IAccessControl.spec
│ │ │ │ ├── IERC2612.spec
│ │ │ │ └── IERC3156.spec
│ │ ├── reports
│ │ │ ├── 2021-10.pdf
│ │ │ ├── 2022-03.pdf
│ │ │ └── 2022-05.pdf
│ │ ├── harnesses
│ │ │ ├── AccessControlHarness.sol
│ │ │ ├── OwnableHarness.sol
│ │ │ ├── Ownable2StepHarness.sol
│ │ │ ├── ERC721ReceiverHarness.sol
│ │ │ ├── TimelockControllerHarness.sol
│ │ │ ├── ERC3156FlashBorrowerHarness.sol
│ │ │ └── PausableHarness.sol
│ │ └── diff
│ │ │ └── token_ERC721_ERC721.sol.patch
│ ├── requirements.txt
│ ├── remappings.txt
│ ├── lib
│ │ └── forge-std
│ │ │ ├── .gitignore
│ │ │ ├── lib
│ │ │ └── ds-test
│ │ │ │ ├── .gitignore
│ │ │ │ ├── default.nix
│ │ │ │ ├── Makefile
│ │ │ │ └── package.json
│ │ │ ├── .gitmodules
│ │ │ └── test
│ │ │ └── compilation
│ │ │ ├── CompilationTest.sol
│ │ │ ├── CompilationScript.sol
│ │ │ ├── CompilationTestBase.sol
│ │ │ └── CompilationScriptBase.sol
│ ├── foundry.toml
│ ├── netlify.toml
│ ├── .mocharc.js
│ ├── renovate.json
│ ├── audits
│ │ ├── 2018-10.pdf
│ │ ├── 2023-05-v4.9.pdf
│ │ ├── 2022-10-ERC4626.pdf
│ │ └── 2022-10-Checkpoints.pdf
│ ├── scripts
│ │ ├── checks
│ │ │ └── generation.sh
│ │ ├── release
│ │ │ ├── workflow
│ │ │ │ ├── exit-prerelease.sh
│ │ │ │ └── rerun.js
│ │ │ └── version.sh
│ │ ├── git-user-config.sh
│ │ ├── prepare.sh
│ │ ├── prepack.sh
│ │ ├── prepare-contracts-package.sh
│ │ ├── upgradeable
│ │ │ ├── patch-save.sh
│ │ │ └── patch-apply.sh
│ │ └── generate
│ │ │ └── format-lines.js
│ ├── contracts
│ │ ├── mocks
│ │ │ ├── ERC165
│ │ │ │ ├── ERC165NotSupported.sol
│ │ │ │ ├── ERC165MissingData.sol
│ │ │ │ ├── ERC165MaliciousData.sol
│ │ │ │ └── ERC165ReturnBomb.sol
│ │ │ ├── token
│ │ │ │ ├── ERC20MulticallMock.sol
│ │ │ │ ├── ERC20ExcessDecimalsMock.sol
│ │ │ │ ├── ERC777Mock.sol
│ │ │ │ ├── ERC20DecimalsMock.sol
│ │ │ │ ├── ERC4626OffsetMock.sol
│ │ │ │ └── ERC721URIStorageMock.sol
│ │ │ ├── proxy
│ │ │ │ └── BadBeacon.sol
│ │ │ ├── AccessControlCrossChainMock.sol
│ │ │ ├── ReentrancyAttack.sol
│ │ │ ├── EtherReceiverMock.sol
│ │ │ ├── PullPaymentMock.sol
│ │ │ ├── ERC20Mock.sol
│ │ │ └── ERC4626Mock.sol
│ │ ├── token
│ │ │ ├── ERC20
│ │ │ │ ├── presets
│ │ │ │ │ └── README.md
│ │ │ │ └── extensions
│ │ │ │ │ ├── draft-ERC20Permit.sol
│ │ │ │ │ └── draft-IERC20Permit.sol
│ │ │ ├── ERC1155
│ │ │ │ └── presets
│ │ │ │ │ └── README.md
│ │ │ ├── ERC721
│ │ │ │ ├── presets
│ │ │ │ │ └── README.md
│ │ │ │ └── extensions
│ │ │ │ │ └── draft-ERC721Votes.sol
│ │ │ └── common
│ │ │ │ └── README.adoc
│ │ ├── interfaces
│ │ │ ├── IERC20.sol
│ │ │ ├── IERC721.sol
│ │ │ ├── IERC777.sol
│ │ │ ├── IERC1155.sol
│ │ │ ├── IERC165.sol
│ │ │ ├── IERC777Sender.sol
│ │ │ ├── IERC721Receiver.sol
│ │ │ ├── IERC1155Receiver.sol
│ │ │ ├── IERC20Metadata.sol
│ │ │ ├── IERC777Recipient.sol
│ │ │ ├── IERC1820Registry.sol
│ │ │ ├── IERC721Metadata.sol
│ │ │ ├── IERC721Enumerable.sol
│ │ │ ├── IERC1820Implementer.sol
│ │ │ ├── IERC3156.sol
│ │ │ ├── IERC1155MetadataURI.sol
│ │ │ ├── IERC2612.sol
│ │ │ ├── draft-IERC2612.sol
│ │ │ └── IERC5805.sol
│ │ ├── crosschain
│ │ │ └── errors.sol
│ │ ├── metatx
│ │ │ └── README.adoc
│ │ ├── utils
│ │ │ └── cryptography
│ │ │ │ └── draft-EIP712.sol
│ │ ├── vendor
│ │ │ └── polygon
│ │ │ │ └── IFxMessageProcessor.sol
│ │ └── proxy
│ │ │ └── beacon
│ │ │ └── IBeacon.sol
│ ├── test
│ │ ├── helpers
│ │ │ ├── map-values.js
│ │ │ ├── chainid.js
│ │ │ ├── create2.js
│ │ │ └── enums.js
│ │ ├── TESTING.md
│ │ ├── utils
│ │ │ ├── introspection
│ │ │ │ └── ERC165.test.js
│ │ │ └── escrow
│ │ │ │ └── Escrow.test.js
│ │ ├── proxy
│ │ │ └── ERC1967
│ │ │ │ └── ERC1967Proxy.test.js
│ │ ├── access
│ │ │ └── AccessControl.test.js
│ │ └── token
│ │ │ └── ERC721
│ │ │ └── ERC721.test.js
│ ├── .github
│ │ ├── ISSUE_TEMPLATE
│ │ │ ├── config.yml
│ │ │ └── feature_request.md
│ │ ├── workflows
│ │ │ └── docs.yml
│ │ └── actions
│ │ │ └── setup
│ │ │ └── action.yml
│ ├── .gitmodules
│ ├── .codecov.yml
│ ├── .prettierrc
│ ├── .changeset
│ │ └── config.json
│ ├── hardhat
│ │ ├── skip-foundry-tests.js
│ │ └── env-contract.js
│ ├── .solcover.js
│ ├── .editorconfig
│ ├── .eslintrc
│ └── .solhint.json
└── forge-std
│ ├── .gitignore
│ ├── lib
│ └── ds-test
│ │ ├── .gitignore
│ │ ├── default.nix
│ │ ├── Makefile
│ │ └── package.json
│ ├── .gitmodules
│ └── test
│ └── compilation
│ ├── CompilationTest.sol
│ ├── CompilationScript.sol
│ ├── CompilationTestBase.sol
│ └── CompilationScriptBase.sol
├── deployments
└── arbitrum
│ └── .chainId
├── discord-export
├── Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].txt_Files
│ ├── maxresdefault-01AD8.jpg
│ ├── maxresdefault-D4441.jpg
│ ├── maxresdefault-ED879.jpg
│ ├── image-1DCAA.png
│ ├── image-3F30C.png
│ ├── image-52956.png
│ ├── image-6F169.png
│ ├── image-85669.png
│ ├── image-B5D52.png
│ ├── Untitled-D27AD.png
│ ├── c4-og-v2-8584A.png
│ ├── c4-og-v2-D055C.png
│ ├── maxresdefault-BF663.jpg
│ ├── 2024-05-28_195000-C6BB4.png
│ ├── OIBc5iSVj0oei6YWkCuN-44C89
│ ├── Qlcl0eqb1Z5UFlKw9Obr-FEF69
│ └── a752f8fd-ae79-4d48-83da-8a6a213214e9-D71D1
└── Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files
│ ├── 0-EB806.png
│ ├── 1-B2132.png
│ ├── 2-ADBB4.png
│ ├── 3-FB033.png
│ ├── 4-4551A.png
│ ├── image-1DCAA.png
│ ├── image-3F30C.png
│ ├── image-52956.png
│ ├── image-6F169.png
│ ├── image-85669.png
│ ├── image-B5D52.png
│ ├── Untitled-D27AD.png
│ ├── c4-og-v2-8584A.png
│ ├── c4-og-v2-D055C.png
│ ├── OIBc5iSVj0oei6YWkCuN-44C89
│ ├── Qlcl0eqb1Z5UFlKw9Obr-FEF69
│ ├── 1083068770823721071-EE4F6.png
│ ├── 1233171131012223026-67C35.png
│ ├── 1237627076333539328-5DC87.png
│ ├── 2024-05-28_195000-C6BB4.png
│ ├── 851893827027075142-F23DF.png
│ ├── 851893827089727568-5FD38.png
│ ├── 851893828280909886-FBF42.png
│ ├── 944081698067451954-2550D.png
│ ├── 977133670429261884-CA8EA.png
│ ├── ggsans-italic-400-E988B.woff2
│ ├── ggsans-italic-500-0777F.woff2
│ ├── ggsans-italic-600-CB411.woff2
│ ├── ggsans-italic-700-891AC.woff2
│ ├── ggsans-italic-800-D36B0.woff2
│ ├── ggsans-normal-400-1456D.woff2
│ ├── ggsans-normal-500-89CE5.woff2
│ ├── ggsans-normal-600-C1EA8.woff2
│ ├── ggsans-normal-700-1949A.woff2
│ ├── ggsans-normal-800-58487.woff2
│ ├── 073f0c045759497a01cc41aadc93619e-D875F.png
│ ├── 0b8eb95ae05f7d8b62136d857c324c66-088A8.png
│ ├── 0cf7719f20f0aaed168c3f31a3f0bceb-8014C.png
│ ├── 1162a888c78000773591a5db6de8aa9f-DCF7E.png
│ ├── 1628fc11e7961d85181295493426b775-7E20F.png
│ ├── 1aea383fe7da3deeefb7a87fc44e7bca-D0D1A.png
│ ├── 1eb7f1d8b39c92052acbc65fa18aa056-95A27.png
│ ├── 1f2874ce34e1d8171e0dc5d95c212a40-1FE2A.png
│ ├── 258a1ffc46d9e9c3872ad643ab9b4bd5-EE2DC.png
│ ├── 288aa0de2d7ec6f3bcca11bc9f778f2f-E6A23.png
│ ├── 2a9faff195fe333526cfe6ae6fce1420-49B98.png
│ ├── 2afb13731f83ccb20ea25b5bdb1a6c95-35031.png
│ ├── 2c1e18acbcb9cdaeabfd7fc6f5090edf-CA387.png
│ ├── 34d2d7de2893f18e31aa4da767ee758f-58D64.png
│ ├── 35f6ac12be0ae6f4138cbeb1a28a20d3-DBCEC.png
│ ├── 4300144ca69d0a514c0680d966674c41-CD85B.png
│ ├── 4634554b26c5ac710fcace1ce468e6b4-DCDA1.png
│ ├── 4de8e7cb6dfbbe8795697f1df8d66439-044AF.png
│ ├── 4eaf99d01e4b5042454b4a6a8809687a-F166B.png
│ ├── 50dd7f528e6efa2618511364dd0ddce0-1D481.png
│ ├── 568d22b97293cdd2d9b7006198d6adbc-F0132.png
│ ├── 5871d40d01a047d984fbaf957cc13f86-4D592.png
│ ├── 5b71d15a9bcde45fd5520e3fb580eb53-E1A50.png
│ ├── 5e3fb61df91ed29c573265a690af4600-E824E.png
│ ├── 5fa1462b3cbd6d23b63942466a6d2f06-2F604.png
│ ├── 67594ee4b4d1fc03bca468327a0d145b-BD76A.png
│ ├── 6cc3a1021947158341eb813f8c41bf1f-C7CFE.png
│ ├── 750d791c21ffd3863332eea023124fa5-05646.png
│ ├── 7d09c08ff18b852203d15b51bf26bca2-D3DD1.png
│ ├── 8043f1de89cc1387981f4990ad574c08-78DE7.png
│ ├── 816cfc933746a8ffd61a8a93193028c5-41002.png
│ ├── 86f4180c3829539aab0c6210474061a7-4349C.png
│ ├── 8f53411d3af94b5a6d0e4f6a2f48a6bb-68553.png
│ ├── 930871c4671919ec697c9144a1911535-814BF.png
│ ├── 95596e5ab52617d3b75a967597c7c5ce-94B44.png
│ ├── 970d2e2f00cd7ef2134a1a3f21326349-404EA.png
│ ├── 9743d0d8b5564acfdfeef2c6c63d5410-11A3C.png
│ ├── a1f41505314077e259d5c3b02ec3570e-5BB24.png
│ ├── a752f8fd-ae79-4d48-83da-8a6a213214e9-D71D1
│ ├── adddc7313b30a4e8b5329894bf2034ab-5B4E5.png
│ ├── ae55bccd105a97e5e171c290822eab04-394BB.png
│ ├── afca0e84e90e7172fdf16a089da1d694-947DB.png
│ ├── bafed0770e472da8f19eb96dac5ac510-62868.png
│ ├── bd62ce81b7d8b78cae1cff4b51cf6b59-37CFE.png
│ ├── bde09905c12e2e8893a97a4b24df78b1-D1D61.png
│ ├── ca9e82ca04289e14a609324c61011434-E49F7.png
│ ├── ce33938a6121cd196500c7b573fba65a-15E3D.png
│ ├── d12592c492cf72b2b5f317f8341c2d38-3CEFE.png
│ ├── d2d94d7e11412f6f18f842f82452604d-D4DA0.png
│ ├── d482d56e4533980c4a4108a97afecfcb-31323.png
│ ├── db37a44fec3e7215df0fd640d3fe1e71-83EA5.png
│ ├── dd0b02132544c612d48d10270e412d9b-9486F.png
│ ├── dfacc77d68962a991f5a4c3b7859b4c2-BAB3E.png
│ ├── e00d2cfe4e679acc9e11182ab19c5db3-F3931.png
│ ├── e6f4ca0e498c6a1841fd2181890d7668-D7F35.png
│ ├── ef353ac557c47e95ecd46e0afac40642-CEF40.png
│ ├── f37097a7d18a772a380665929aaba15b-94EB7.png
│ ├── feb79bb6c3285f43d25af82703f76106-392DC.png
│ ├── 2764-A3D25.svg
│ ├── 1f50d-195C0.svg
│ └── 2705-0589F.svg
├── assets
├── PerpMarket.mermaid.png
├── PredyPool.mermaid.png
└── SpotMarket.mermaid.png
├── .solhint.json
├── src
├── interfaces
│ ├── ISupplyToken.sol
│ ├── ISpotMarket.sol
│ └── IHooks.sol
├── libraries
│ ├── PairLib.sol
│ └── math
│ │ └── Bps.sol
└── types
│ └── LockData.sol
├── tsconfig.json
├── script
└── Counter.s.sol
├── addressList.ts
├── foundry.toml
├── .gitignore
├── test
├── market
│ ├── perp
│ │ └── PredyLiquidationCallback.t.sol
│ └── gamma
│ │ └── PredyLiquidationCallback.t.sol
├── mocks
│ ├── MockPriceFeed.sol
│ └── MockERC20.sol
├── libraries
│ └── PairLib.t.sol
└── lens
│ └── Setup.t.sol
├── remappings.txt
├── .vscode
└── settings.json
└── slither.config.json
/lib/permit2/.env.example:
--------------------------------------------------------------------------------
1 | FORK_URL=
--------------------------------------------------------------------------------
/lib/solmate/.prettierignore:
--------------------------------------------------------------------------------
1 | lib
--------------------------------------------------------------------------------
/deployments/arbitrum/.chainId:
--------------------------------------------------------------------------------
1 | 42161
--------------------------------------------------------------------------------
/lib/permit2/lib/solmate/.prettierignore:
--------------------------------------------------------------------------------
1 | lib
--------------------------------------------------------------------------------
/lib/v3-core/.yarnrc:
--------------------------------------------------------------------------------
1 | ignore-scripts true
2 |
--------------------------------------------------------------------------------
/lib/v3-periphery/.prettierignore:
--------------------------------------------------------------------------------
1 | .github
--------------------------------------------------------------------------------
/lib/permit2/.forge-snapshots/lockdown.snap:
--------------------------------------------------------------------------------
1 | 28435
--------------------------------------------------------------------------------
/lib/v3-periphery/.yarnrc:
--------------------------------------------------------------------------------
1 | ignore-scripts true
2 |
--------------------------------------------------------------------------------
/lib/permit2/.forge-snapshots/transferFrom.snap:
--------------------------------------------------------------------------------
1 | 52197
--------------------------------------------------------------------------------
/lib/permit2/remappings.txt:
--------------------------------------------------------------------------------
1 | solmate/=lib/solmate
2 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/certora/.gitignore:
--------------------------------------------------------------------------------
1 | patched
2 |
--------------------------------------------------------------------------------
/lib/permit2/.forge-snapshots/batchTransferFrom.snap:
--------------------------------------------------------------------------------
1 | 61797
--------------------------------------------------------------------------------
/lib/permit2/.forge-snapshots/permitCleanWrite.snap:
--------------------------------------------------------------------------------
1 | 63119
--------------------------------------------------------------------------------
/lib/permit2/.forge-snapshots/permitCompactSig.snap:
--------------------------------------------------------------------------------
1 | 63094
--------------------------------------------------------------------------------
/lib/permit2/.forge-snapshots/permitDirtyNonce.snap:
--------------------------------------------------------------------------------
1 | 44014
--------------------------------------------------------------------------------
/lib/permit2/.forge-snapshots/permitDirtyWrite.snap:
--------------------------------------------------------------------------------
1 | 46019
--------------------------------------------------------------------------------
/lib/permit2/.forge-snapshots/permitInvalidSigner.snap:
--------------------------------------------------------------------------------
1 | 40301
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/migrations/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/solmate/.gitignore:
--------------------------------------------------------------------------------
1 | /cache
2 | /node_modules
3 | /out
--------------------------------------------------------------------------------
/lib/v3-core/.gitattributes:
--------------------------------------------------------------------------------
1 | *.sol linguist-language=Solidity
--------------------------------------------------------------------------------
/lib/permit2/.forge-snapshots/permitBatchCleanWrite.snap:
--------------------------------------------------------------------------------
1 | 91924
--------------------------------------------------------------------------------
/lib/permit2/.forge-snapshots/permitBatchDirtyWrite.snap:
--------------------------------------------------------------------------------
1 | 57724
--------------------------------------------------------------------------------
/lib/permit2/.forge-snapshots/permitSignatureExpired.snap:
--------------------------------------------------------------------------------
1 | 31700
--------------------------------------------------------------------------------
/lib/permit2/lib/forge-gas-snapshot/.forge-snapshots/add.snap:
--------------------------------------------------------------------------------
1 | 134
--------------------------------------------------------------------------------
/lib/solmate/.gitattributes:
--------------------------------------------------------------------------------
1 | .gas-snapshot linguist-language=Julia
--------------------------------------------------------------------------------
/lib/v3-periphery/.gitattributes:
--------------------------------------------------------------------------------
1 | *.sol linguist-language=Solidity
--------------------------------------------------------------------------------
/lib/forge-std/.gitignore:
--------------------------------------------------------------------------------
1 | cache/
2 | out/
3 | .vscode
4 | .idea
5 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/requirements.txt:
--------------------------------------------------------------------------------
1 | certora-cli==3.6.4
2 |
--------------------------------------------------------------------------------
/lib/permit2/.forge-snapshots/batchTransferFromMultiToken.snap:
--------------------------------------------------------------------------------
1 | 81786
--------------------------------------------------------------------------------
/lib/permit2/.forge-snapshots/permitTransferFromCompactSig.snap:
--------------------------------------------------------------------------------
1 | 86066
--------------------------------------------------------------------------------
/lib/permit2/.forge-snapshots/permitTransferFromSingleToken.snap:
--------------------------------------------------------------------------------
1 | 86092
--------------------------------------------------------------------------------
/lib/permit2/.forge-snapshots/single recipient 2 tokens.snap:
--------------------------------------------------------------------------------
1 | 118525
--------------------------------------------------------------------------------
/lib/permit2/.forge-snapshots/single recipient many tokens.snap:
--------------------------------------------------------------------------------
1 | 133544
--------------------------------------------------------------------------------
/lib/permit2/.gitignore:
--------------------------------------------------------------------------------
1 | .env
2 | /cache
3 | /out
4 | broadcast/
5 |
--------------------------------------------------------------------------------
/lib/permit2/lib/forge-gas-snapshot/.forge-snapshots/addFirst.snap:
--------------------------------------------------------------------------------
1 | 134
--------------------------------------------------------------------------------
/lib/permit2/lib/solmate/.gitignore:
--------------------------------------------------------------------------------
1 | /cache
2 | /node_modules
3 | /out
--------------------------------------------------------------------------------
/lib/solmate/lib/ds-test/.gitignore:
--------------------------------------------------------------------------------
1 | /.dapple
2 | /build
3 | /out
4 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/remappings.txt:
--------------------------------------------------------------------------------
1 | openzeppelin/=contracts/
2 |
--------------------------------------------------------------------------------
/lib/permit2/.forge-snapshots/permitBatchTransferFromSingleToken.snap:
--------------------------------------------------------------------------------
1 | 88867
--------------------------------------------------------------------------------
/lib/permit2/.forge-snapshots/permitSetMaxAllowanceCleanWrite.snap:
--------------------------------------------------------------------------------
1 | 61114
--------------------------------------------------------------------------------
/lib/permit2/.forge-snapshots/permitSetMaxAllowanceDirtyWrite.snap:
--------------------------------------------------------------------------------
1 | 44014
--------------------------------------------------------------------------------
/lib/permit2/.forge-snapshots/permitTransferFromTypedWitness.snap:
--------------------------------------------------------------------------------
1 | 87817
--------------------------------------------------------------------------------
/lib/permit2/.forge-snapshots/transferFrom with different owners.snap:
--------------------------------------------------------------------------------
1 | 61886
--------------------------------------------------------------------------------
/lib/permit2/lib/forge-gas-snapshot/.forge-snapshots/addSecond.snap:
--------------------------------------------------------------------------------
1 | 134
--------------------------------------------------------------------------------
/lib/permit2/lib/forge-gas-snapshot/.forge-snapshots/manyAdd.snap:
--------------------------------------------------------------------------------
1 | 19195
--------------------------------------------------------------------------------
/lib/permit2/lib/forge-gas-snapshot/.forge-snapshots/manySstore.snap:
--------------------------------------------------------------------------------
1 | 50990
--------------------------------------------------------------------------------
/lib/permit2/.forge-snapshots/permitBatchTransferFromMultipleTokens.snap:
--------------------------------------------------------------------------------
1 | 143387
--------------------------------------------------------------------------------
/lib/permit2/.forge-snapshots/permitTransferFromBatchTypedWitness.snap:
--------------------------------------------------------------------------------
1 | 120325
--------------------------------------------------------------------------------
/lib/permit2/lib/forge-gas-snapshot/.forge-snapshots/snapmanyAdd.snap:
--------------------------------------------------------------------------------
1 | 19195
2 |
--------------------------------------------------------------------------------
/lib/permit2/lib/forge-gas-snapshot/.forge-snapshots/snapmanySstore.snap:
--------------------------------------------------------------------------------
1 | 1
2 |
--------------------------------------------------------------------------------
/lib/permit2/lib/forge-gas-snapshot/.gitignore:
--------------------------------------------------------------------------------
1 | out/
2 | lib/
3 | cache/
4 |
--------------------------------------------------------------------------------
/lib/permit2/lib/forge-std/.gitignore:
--------------------------------------------------------------------------------
1 | cache/
2 | out/
3 | .vscode
4 | .idea
5 |
--------------------------------------------------------------------------------
/lib/forge-std/lib/ds-test/.gitignore:
--------------------------------------------------------------------------------
1 | /.dapple
2 | /build
3 | /out
4 | /cache/
5 |
--------------------------------------------------------------------------------
/lib/permit2/lib/solmate/lib/ds-test/.gitignore:
--------------------------------------------------------------------------------
1 | /.dapple
2 | /build
3 | /out
4 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/certora/munged/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/lib/forge-std/.gitignore:
--------------------------------------------------------------------------------
1 | cache/
2 | out/
3 | .vscode
4 | .idea
5 |
--------------------------------------------------------------------------------
/lib/permit2/.forge-snapshots/permit2 + transferFrom2 with WETH9's mainnet address.snap:
--------------------------------------------------------------------------------
1 | 60346
--------------------------------------------------------------------------------
/lib/permit2/.forge-snapshots/permit2 + transferFrom2 with an EIP-2612 native token.snap:
--------------------------------------------------------------------------------
1 | 46296
--------------------------------------------------------------------------------
/lib/permit2/lib/forge-std/lib/ds-test/.gitignore:
--------------------------------------------------------------------------------
1 | /.dapple
2 | /build
3 | /out
4 | /cache/
5 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/.gitattributes:
--------------------------------------------------------------------------------
1 | *.sol linguist-language=Solidity
2 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/foundry.toml:
--------------------------------------------------------------------------------
1 | [fuzz]
2 | runs = 10000
3 | max_test_rejects = 150000
4 |
--------------------------------------------------------------------------------
/lib/permit2/.forge-snapshots/permit2 + transferFrom2 with a non EIP-2612 native token.snap:
--------------------------------------------------------------------------------
1 | 60811
--------------------------------------------------------------------------------
/lib/permit2/.forge-snapshots/safePermit + safeTransferFrom with an EIP-2612 native token.snap:
--------------------------------------------------------------------------------
1 | 48268
--------------------------------------------------------------------------------
/lib/permit2/.forge-snapshots/simplePermit2 + transferFrom2 with a non EIP-2612 native token.snap:
--------------------------------------------------------------------------------
1 | 60811
--------------------------------------------------------------------------------
/lib/permit2/.gitattributes:
--------------------------------------------------------------------------------
1 | *.sol linguist-language=Solidity
2 | .gas-snapshot linguist-language=Julia
--------------------------------------------------------------------------------
/lib/v3-core/.gitignore:
--------------------------------------------------------------------------------
1 | artifacts/
2 | cache/
3 | crytic-export/
4 | node_modules/
5 | typechain/
6 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/.gitignore:
--------------------------------------------------------------------------------
1 | /.dapple
2 | /build
3 | /out
4 | /cache/
5 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/netlify.toml:
--------------------------------------------------------------------------------
1 | [build]
2 | command = "npm run docs"
3 | publish = "build/site"
4 |
--------------------------------------------------------------------------------
/lib/v3-core/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "semi": false,
3 | "singleQuote": true,
4 | "printWidth": 120
5 | }
6 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].txt_Files/maxresdefault-01AD8.jpg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].txt_Files/maxresdefault-D4441.jpg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].txt_Files/maxresdefault-ED879.jpg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/permit2/.forge-snapshots/permit2 + transferFrom2 with a non EIP-2612 native token with fallback.snap:
--------------------------------------------------------------------------------
1 | 65533
--------------------------------------------------------------------------------
/lib/permit2/lib/solmate/.gitattributes:
--------------------------------------------------------------------------------
1 | *.sol linguist-language=Solidity
2 | .gas-snapshot linguist-language=Julia
--------------------------------------------------------------------------------
/lib/v3-periphery/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "semi": false,
3 | "singleQuote": true,
4 | "printWidth": 120
5 | }
6 |
--------------------------------------------------------------------------------
/assets/PerpMarket.mermaid.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/assets/PerpMarket.mermaid.png
--------------------------------------------------------------------------------
/assets/PredyPool.mermaid.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/assets/PredyPool.mermaid.png
--------------------------------------------------------------------------------
/assets/SpotMarket.mermaid.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/assets/SpotMarket.mermaid.png
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/netlify.toml:
--------------------------------------------------------------------------------
1 | [build]
2 | command = "npm run docs"
3 | publish = "build/site"
4 |
--------------------------------------------------------------------------------
/lib/solmate/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "lib/ds-test"]
2 | path = lib/ds-test
3 | url = https://github.com/dapphub/ds-test
4 |
--------------------------------------------------------------------------------
/lib/v3-periphery/.gitignore:
--------------------------------------------------------------------------------
1 | artifacts/
2 | cache/
3 | crytic-export/
4 | node_modules/
5 | typechain/
6 | foundry-out/
7 |
--------------------------------------------------------------------------------
/lib/v3-periphery/testnet-deploys.md:
--------------------------------------------------------------------------------
1 | ## Uniswap V3 is live on Mainnet
2 |
3 | See the addresses [here](./deploys.md).
4 |
--------------------------------------------------------------------------------
/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/.mocharc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | require: 'hardhat/register',
3 | timeout: 4000,
4 | };
5 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/certora/specs/helpers/helpers.spec:
--------------------------------------------------------------------------------
1 | definition nonpayable(env e) returns bool = e.msg.value == 0;
2 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/certora/specs/methods/IERC5313.spec:
--------------------------------------------------------------------------------
1 | methods {
2 | owner() returns (address) envfree
3 | }
4 |
--------------------------------------------------------------------------------
/lib/permit2/audits/ABDKAudit.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/lib/permit2/audits/ABDKAudit.pdf
--------------------------------------------------------------------------------
/lib/v3-core/.solhint.json:
--------------------------------------------------------------------------------
1 | {
2 | "plugins": ["prettier"],
3 | "rules": {
4 | "prettier/prettier": "error"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/lib/forge-std/lib/ds-test/default.nix:
--------------------------------------------------------------------------------
1 | { solidityPackage, dappsys }: solidityPackage {
2 | name = "ds-test";
3 | src = ./src;
4 | }
5 |
--------------------------------------------------------------------------------
/lib/permit2/lib/forge-gas-snapshot/foundry.toml:
--------------------------------------------------------------------------------
1 | [profile.default]
2 | src = 'src'
3 | out = 'out'
4 | libs = ['lib']
5 | ffi = true
6 |
--------------------------------------------------------------------------------
/lib/permit2/lib/forge-std/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "lib/ds-test"]
2 | path = lib/ds-test
3 | url = https://github.com/dapphub/ds-test
4 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/.mocharc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | require: 'hardhat/register',
3 | timeout: 4000,
4 | };
5 |
--------------------------------------------------------------------------------
/lib/permit2/lib/solmate/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "lib/ds-test"]
2 | path = lib/ds-test
3 | url = https://github.com/dapphub/ds-test
4 |
--------------------------------------------------------------------------------
/lib/solmate/lib/ds-test/default.nix:
--------------------------------------------------------------------------------
1 | { solidityPackage, dappsys }: solidityPackage {
2 | name = "ds-test";
3 | src = ./src;
4 | }
5 |
--------------------------------------------------------------------------------
/lib/v3-periphery/.solhint.json:
--------------------------------------------------------------------------------
1 | {
2 | "plugins": ["prettier"],
3 | "rules": {
4 | "prettier/prettier": "error"
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/renovate.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": ["github>OpenZeppelin/configs"],
3 | "labels": ["ignore-changeset"]
4 | }
5 |
--------------------------------------------------------------------------------
/lib/permit2/audits/Chainsecurity Audit.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/lib/permit2/audits/Chainsecurity Audit.pdf
--------------------------------------------------------------------------------
/lib/permit2/lib/solmate/lib/ds-test/default.nix:
--------------------------------------------------------------------------------
1 | { solidityPackage, dappsys }: solidityPackage {
2 | name = "ds-test";
3 | src = ./src;
4 | }
5 |
--------------------------------------------------------------------------------
/lib/v3-periphery/test/__snapshots__/Path.spec.ts.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`Path gas cost 1`] = `701`;
4 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/audits/2018-10.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/lib/openzeppelin-contracts/audits/2018-10.pdf
--------------------------------------------------------------------------------
/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/permit2/lib/forge-std/lib/ds-test/default.nix:
--------------------------------------------------------------------------------
1 | { solidityPackage, dappsys }: solidityPackage {
2 | name = "ds-test";
3 | src = ./src;
4 | }
5 |
--------------------------------------------------------------------------------
/lib/permit2/lib/forge-gas-snapshot/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "lib/forge-std"]
2 | path = lib/forge-std
3 | url = https://github.com/foundry-rs/forge-std
4 |
--------------------------------------------------------------------------------
/lib/solmate/audits/v6-Fixed-Point-Solutions.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/lib/solmate/audits/v6-Fixed-Point-Solutions.pdf
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/audits/2023-05-v4.9.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/lib/openzeppelin-contracts/audits/2023-05-v4.9.pdf
--------------------------------------------------------------------------------
/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/audits/2022-10-ERC4626.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/lib/openzeppelin-contracts/audits/2022-10-ERC4626.pdf
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/certora/reports/2021-10.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/lib/openzeppelin-contracts/certora/reports/2021-10.pdf
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/certora/reports/2022-03.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/lib/openzeppelin-contracts/certora/reports/2022-03.pdf
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/certora/reports/2022-05.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/lib/openzeppelin-contracts/certora/reports/2022-05.pdf
--------------------------------------------------------------------------------
/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/v3-core/test/__snapshots__/NoDelegateCall.spec.ts.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`NoDelegateCall runtime overhead 1`] = `41`;
4 |
--------------------------------------------------------------------------------
/lib/v3-periphery/test/__snapshots__/PairFlash.spec.ts.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`PairFlash test flash gas 1`] = `351923`;
4 |
--------------------------------------------------------------------------------
/lib/v3-periphery/test/__snapshots__/SwapRouter.spec.ts.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`SwapRouter bytecode size 1`] = `12517`;
4 |
--------------------------------------------------------------------------------
/lib/v3-periphery/test/__snapshots__/V3Migrator.spec.ts.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`V3Migrator #migrate gas 1`] = `691258`;
4 |
--------------------------------------------------------------------------------
/.solhint.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "solhint:recommended",
3 | "plugins": [
4 | "prettier"
5 | ],
6 | "rules": {
7 | "prettier/prettier": "error"
8 | }
9 | }
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/audit/2018-10.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/lib/permit2/lib/openzeppelin-contracts/audit/2018-10.pdf
--------------------------------------------------------------------------------
/lib/permit2/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/solmate/foundry.toml:
--------------------------------------------------------------------------------
1 | [profile.default]
2 | solc = "0.8.15"
3 | bytecode_hash = "none"
4 | optimizer_runs = 1000000
5 |
6 | [profile.intense.fuzz]
7 | runs = 10000
8 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/audits/2022-10-Checkpoints.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/lib/openzeppelin-contracts/audits/2022-10-Checkpoints.pdf
--------------------------------------------------------------------------------
/lib/permit2/lib/solmate/audits/v6-Fixed-Point-Solutions.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/lib/permit2/lib/solmate/audits/v6-Fixed-Point-Solutions.pdf
--------------------------------------------------------------------------------
/lib/v3-periphery/contracts/lens/README.md:
--------------------------------------------------------------------------------
1 | # lens
2 |
3 | These contracts are not designed to be called on-chain. They simplify
4 | fetching on-chain data from off-chain.
5 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/contracts/mocks/ERC165/ERC165NotSupported.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity ^0.8.0;
4 |
5 | contract ERC165NotSupported {}
6 |
--------------------------------------------------------------------------------
/lib/permit2/lib/solmate/foundry.toml:
--------------------------------------------------------------------------------
1 | [profile.default]
2 | solc = "0.8.15"
3 | bytecode_hash = "none"
4 | optimizer_runs = 1000000
5 |
6 | [profile.intense.fuzz]
7 | runs = 10000
8 |
--------------------------------------------------------------------------------
/lib/v3-periphery/test/__snapshots__/OracleLibrary.spec.ts.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`OracleLibrary #getQuoteAtTick gas test 1`] = `1296`;
4 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/certora/specs/methods/IOwnable.spec:
--------------------------------------------------------------------------------
1 | methods {
2 | owner() returns (address) envfree
3 | transferOwnership(address)
4 | renounceOwnership()
5 | }
6 |
--------------------------------------------------------------------------------
/lib/v3-periphery/test/__snapshots__/PeripheryImmutableState.spec.ts.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`PeripheryImmutableState bytecode size 1`] = `185`;
4 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/contracts/mocks/ERC165/ERC165NotSupported.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity ^0.8.0;
4 |
5 | contract ERC165NotSupported {}
6 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/slither.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "detectors_to_run": "reentrancy-eth,reentrancy-no-eth,reentrancy-unlimited-gas",
3 | "filter_paths": "contracts/mocks"
4 | }
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/contracts/token/ERC20/presets/README.md:
--------------------------------------------------------------------------------
1 | Contract presets are now deprecated in favor of [Contracts Wizard](https://wizard.openzeppelin.com/) as a more powerful alternative.
2 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/contracts/token/ERC1155/presets/README.md:
--------------------------------------------------------------------------------
1 | Contract presets are now deprecated in favor of [Contracts Wizard](https://wizard.openzeppelin.com/) as a more powerful alternative.
2 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/contracts/token/ERC721/presets/README.md:
--------------------------------------------------------------------------------
1 | Contract presets are now deprecated in favor of [Contracts Wizard](https://wizard.openzeppelin.com/) as a more powerful alternative.
2 |
--------------------------------------------------------------------------------
/lib/permit2/src/interfaces/IEIP712.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity ^0.8.0;
3 |
4 | interface IEIP712 {
5 | function DOMAIN_SEPARATOR() external view returns (bytes32);
6 | }
7 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/contracts/token/ERC1155/presets/README.md:
--------------------------------------------------------------------------------
1 | Contract presets are now deprecated in favor of [Contracts Wizard](https://wizard.openzeppelin.com/) as a more powerful alternative.
2 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/contracts/token/ERC20/presets/README.md:
--------------------------------------------------------------------------------
1 | Contract presets are now deprecated in favor of [Contracts Wizard](https://wizard.openzeppelin.com/) as a more powerful alternative.
2 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/contracts/token/ERC721/presets/README.md:
--------------------------------------------------------------------------------
1 | Contract presets are now deprecated in favor of [Contracts Wizard](https://wizard.openzeppelin.com/) as a more powerful alternative.
2 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/contracts/mocks/OwnableMock.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity ^0.8.0;
4 |
5 | import "../access/Ownable.sol";
6 |
7 | contract OwnableMock is Ownable {}
8 |
--------------------------------------------------------------------------------
/lib/v3-periphery/test/shared/expandTo18Decimals.ts:
--------------------------------------------------------------------------------
1 | import { BigNumber } from 'ethers'
2 |
3 | export function expandTo18Decimals(n: number): BigNumber {
4 | return BigNumber.from(n).mul(BigNumber.from(10).pow(18))
5 | }
6 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | // OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol)
3 |
4 | pragma solidity ^0.8.0;
5 |
6 | import "../token/ERC20/IERC20.sol";
7 |
--------------------------------------------------------------------------------
/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/test/helpers/map-values.js:
--------------------------------------------------------------------------------
1 | function mapValues(obj, fn) {
2 | return Object.fromEntries([...Object.entries(obj)].map(([k, v]) => [k, fn(v)]));
3 | }
4 |
5 | module.exports = {
6 | mapValues,
7 | };
8 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/contracts/mocks/ERC165Mock.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity ^0.8.0;
4 |
5 | import "../utils/introspection/ERC165.sol";
6 |
7 | contract ERC165Mock is ERC165 {}
8 |
--------------------------------------------------------------------------------
/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/contracts/interfaces/IERC721.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | // OpenZeppelin Contracts v4.4.1 (interfaces/IERC721.sol)
3 |
4 | pragma solidity ^0.8.0;
5 |
6 | import "../token/ERC721/IERC721.sol";
7 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/contracts/interfaces/IERC777.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | // OpenZeppelin Contracts v4.4.1 (interfaces/IERC777.sol)
3 |
4 | pragma solidity ^0.8.0;
5 |
6 | import "../token/ERC777/IERC777.sol";
7 |
--------------------------------------------------------------------------------
/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/contracts/interfaces/IERC1155.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | // OpenZeppelin Contracts v4.4.1 (interfaces/IERC1155.sol)
3 |
4 | pragma solidity ^0.8.0;
5 |
6 | import "../token/ERC1155/IERC1155.sol";
7 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/contracts/interfaces/IERC165.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | // OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol)
3 |
4 | pragma solidity ^0.8.0;
5 |
6 | import "../utils/introspection/IERC165.sol";
7 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/scripts/prepare.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -euo pipefail
4 |
5 | if [ "${SKIP_COMPILE:-}" == true ]; then
6 | exit
7 | fi
8 |
9 | npm run clean
10 | env COMPILE_MODE=production npm run compile
11 |
--------------------------------------------------------------------------------
/lib/permit2/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/permit2/lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | // OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol)
3 |
4 | pragma solidity ^0.8.0;
5 |
6 | import "../token/ERC20/IERC20.sol";
7 |
--------------------------------------------------------------------------------
/lib/permit2/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/certora/harnesses/AccessControlHarness.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity ^0.8.0;
4 |
5 | import "../patched/access/AccessControl.sol";
6 |
7 | contract AccessControlHarness is AccessControl {}
8 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/contracts/interfaces/IERC1155.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | // OpenZeppelin Contracts v4.4.1 (interfaces/IERC1155.sol)
3 |
4 | pragma solidity ^0.8.0;
5 |
6 | import "../token/ERC1155/IERC1155.sol";
7 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/contracts/interfaces/IERC721.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | // OpenZeppelin Contracts v4.4.1 (interfaces/IERC721.sol)
3 |
4 | pragma solidity ^0.8.0;
5 |
6 | import "../token/ERC721/IERC721.sol";
7 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/contracts/interfaces/IERC777.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | // OpenZeppelin Contracts v4.4.1 (interfaces/IERC777.sol)
3 |
4 | pragma solidity ^0.8.0;
5 |
6 | import "../token/ERC777/IERC777.sol";
7 |
--------------------------------------------------------------------------------
/lib/v3-periphery/test/__snapshots__/Multicall.spec.ts.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`Multicall gas cost of pay w/ multicall 1`] = `45983`;
4 |
5 | exports[`Multicall gas cost of pay w/o multicall 1`] = `43422`;
6 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/contracts/interfaces/IERC777Sender.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | // OpenZeppelin Contracts v4.4.1 (interfaces/IERC777Sender.sol)
3 |
4 | pragma solidity ^0.8.0;
5 |
6 | import "../token/ERC777/IERC777Sender.sol";
7 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/contracts/interfaces/IERC165.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | // OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol)
3 |
4 | pragma solidity ^0.8.0;
5 |
6 | import "../utils/introspection/IERC165.sol";
7 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/scripts/prepare.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -euo pipefail
4 |
5 | if [ "${SKIP_COMPILE:-}" == true ]; then
6 | exit
7 | fi
8 |
9 | npm run clean
10 | env COMPILE_MODE=production npm run compile
11 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/0-EB806.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/0-EB806.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/1-B2132.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/1-B2132.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/2-ADBB4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/2-ADBB4.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/3-FB033.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/3-FB033.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/4-4551A.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/4-4551A.png
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/contracts/interfaces/IERC721Receiver.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | // OpenZeppelin Contracts v4.4.1 (interfaces/IERC721Receiver.sol)
3 |
4 | pragma solidity ^0.8.0;
5 |
6 | import "../token/ERC721/IERC721Receiver.sol";
7 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].txt_Files/image-1DCAA.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].txt_Files/image-1DCAA.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].txt_Files/image-3F30C.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].txt_Files/image-3F30C.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].txt_Files/image-52956.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].txt_Files/image-52956.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].txt_Files/image-6F169.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].txt_Files/image-6F169.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].txt_Files/image-85669.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].txt_Files/image-85669.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].txt_Files/image-B5D52.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].txt_Files/image-B5D52.png
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/certora/specs/methods/IOwnable2Step.spec:
--------------------------------------------------------------------------------
1 | methods {
2 | owner() returns (address) envfree
3 | pendingOwner() returns (address) envfree
4 | transferOwnership(address)
5 | acceptOwnership()
6 | renounceOwnership()
7 | }
8 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/contracts/interfaces/IERC1155Receiver.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | // OpenZeppelin Contracts v4.4.1 (interfaces/IERC1155Receiver.sol)
3 |
4 | pragma solidity ^0.8.0;
5 |
6 | import "../token/ERC1155/IERC1155Receiver.sol";
7 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/contracts/interfaces/IERC20Metadata.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | // OpenZeppelin Contracts v4.4.1 (interfaces/IERC20Metadata.sol)
3 |
4 | pragma solidity ^0.8.0;
5 |
6 | import "../token/ERC20/extensions/IERC20Metadata.sol";
7 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/contracts/interfaces/IERC777Recipient.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | // OpenZeppelin Contracts v4.4.1 (interfaces/IERC777Recipient.sol)
3 |
4 | pragma solidity ^0.8.0;
5 |
6 | import "../token/ERC777/IERC777Recipient.sol";
7 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/contracts/interfaces/IERC777Sender.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | // OpenZeppelin Contracts v4.4.1 (interfaces/IERC777Sender.sol)
3 |
4 | pragma solidity ^0.8.0;
5 |
6 | import "../token/ERC777/IERC777Sender.sol";
7 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/renovate.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": [
3 | "github>OpenZeppelin/code-style"
4 | ],
5 | "packageRules": [
6 | {
7 | "extends": ["packages:eslint"],
8 | "enabled": false
9 | }
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/lib/v3-core/test/shared/expect.ts:
--------------------------------------------------------------------------------
1 | import { expect, use } from 'chai'
2 | import { solidity } from 'ethereum-waffle'
3 | import { jestSnapshotPlugin } from 'mocha-chai-jest-snapshot'
4 |
5 | use(solidity)
6 | use(jestSnapshotPlugin())
7 |
8 | export { expect }
9 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/image-1DCAA.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/image-1DCAA.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/image-3F30C.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/image-3F30C.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/image-52956.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/image-52956.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/image-6F169.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/image-6F169.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/image-85669.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/image-85669.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/image-B5D52.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/image-B5D52.png
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/contracts/interfaces/IERC1820Registry.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | // OpenZeppelin Contracts v4.4.1 (interfaces/IERC1820Registry.sol)
3 |
4 | pragma solidity ^0.8.0;
5 |
6 | import "../utils/introspection/IERC1820Registry.sol";
7 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/contracts/interfaces/IERC721Metadata.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | // OpenZeppelin Contracts v4.4.1 (interfaces/IERC721Metadata.sol)
3 |
4 | pragma solidity ^0.8.0;
5 |
6 | import "../token/ERC721/extensions/IERC721Metadata.sol";
7 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/contracts/mocks/ERC165/ERC165MissingData.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity ^0.8.0;
4 |
5 | contract ERC165MissingData {
6 | function supportsInterface(bytes4 interfaceId) public view {} // missing return
7 | }
8 |
--------------------------------------------------------------------------------
/lib/permit2/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 | project:
10 | default:
11 | threshold: 1%
12 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/contracts/interfaces/IERC721Receiver.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | // OpenZeppelin Contracts v4.4.1 (interfaces/IERC721Receiver.sol)
3 |
4 | pragma solidity ^0.8.0;
5 |
6 | import "../token/ERC721/IERC721Receiver.sol";
7 |
--------------------------------------------------------------------------------
/lib/solmate/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "tabWidth": 2,
3 | "printWidth": 100,
4 |
5 | "overrides": [
6 | {
7 | "files": "*.sol",
8 | "options": {
9 | "tabWidth": 4,
10 | "printWidth": 120
11 | }
12 | }
13 | ]
14 | }
15 |
--------------------------------------------------------------------------------
/lib/v3-periphery/test/shared/expect.ts:
--------------------------------------------------------------------------------
1 | import { expect, use } from 'chai'
2 | import { solidity } from 'ethereum-waffle'
3 | import { jestSnapshotPlugin } from 'mocha-chai-jest-snapshot'
4 |
5 | use(solidity)
6 | use(jestSnapshotPlugin())
7 |
8 | export { expect }
9 |
--------------------------------------------------------------------------------
/src/interfaces/ISupplyToken.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: agpl-3.0
2 | pragma solidity >=0.7.0;
3 |
4 | interface ISupplyToken {
5 | function mint(address account, uint256 amount) external;
6 | function burn(address account, uint256 amount) external;
7 | }
8 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/Untitled-D27AD.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/Untitled-D27AD.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/c4-og-v2-8584A.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/c4-og-v2-8584A.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/c4-og-v2-D055C.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/c4-og-v2-D055C.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].txt_Files/Untitled-D27AD.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].txt_Files/Untitled-D27AD.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].txt_Files/c4-og-v2-8584A.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].txt_Files/c4-og-v2-8584A.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].txt_Files/c4-og-v2-D055C.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].txt_Files/c4-og-v2-D055C.png
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/contracts/interfaces/IERC721Enumerable.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | // OpenZeppelin Contracts v4.4.1 (interfaces/IERC721Enumerable.sol)
3 |
4 | pragma solidity ^0.8.0;
5 |
6 | import "../token/ERC721/extensions/IERC721Enumerable.sol";
7 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/contracts/interfaces/IERC1155Receiver.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | // OpenZeppelin Contracts v4.4.1 (interfaces/IERC1155Receiver.sol)
3 |
4 | pragma solidity ^0.8.0;
5 |
6 | import "../token/ERC1155/IERC1155Receiver.sol";
7 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/contracts/interfaces/IERC777Recipient.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | // OpenZeppelin Contracts v4.4.1 (interfaces/IERC777Recipient.sol)
3 |
4 | pragma solidity ^0.8.0;
5 |
6 | import "../token/ERC777/IERC777Recipient.sol";
7 |
--------------------------------------------------------------------------------
/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/contracts/interfaces/IERC1820Implementer.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | // OpenZeppelin Contracts v4.4.1 (interfaces/IERC1820Implementer.sol)
3 |
4 | pragma solidity ^0.8.0;
5 |
6 | import "../utils/introspection/IERC1820Implementer.sol";
7 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/contracts/interfaces/IERC3156.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | // OpenZeppelin Contracts v4.4.1 (interfaces/IERC3156.sol)
3 |
4 | pragma solidity ^0.8.0;
5 |
6 | import "./IERC3156FlashBorrower.sol";
7 | import "./IERC3156FlashLender.sol";
8 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/contracts/interfaces/IERC1820Registry.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | // OpenZeppelin Contracts v4.4.1 (interfaces/IERC1820Registry.sol)
3 |
4 | pragma solidity ^0.8.0;
5 |
6 | import "../utils/introspection/IERC1820Registry.sol";
7 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/contracts/interfaces/IERC20Metadata.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | // OpenZeppelin Contracts v4.4.1 (interfaces/IERC20Metadata.sol)
3 |
4 | pragma solidity ^0.8.0;
5 |
6 | import "../token/ERC20/extensions/IERC20Metadata.sol";
7 |
--------------------------------------------------------------------------------
/lib/permit2/lib/solmate/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "tabWidth": 2,
3 | "printWidth": 100,
4 |
5 | "overrides": [
6 | {
7 | "files": "*.sol",
8 | "options": {
9 | "tabWidth": 4,
10 | "printWidth": 120
11 | }
12 | }
13 | ]
14 | }
15 |
--------------------------------------------------------------------------------
/lib/v3-periphery/contracts/test/SelfPermitTest.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: UNLICENSED
2 | pragma solidity =0.8.15;
3 |
4 | import '../base/SelfPermit.sol';
5 |
6 | /// @dev Same as SelfPermit but not abstract
7 | contract SelfPermitTest is SelfPermit {
8 |
9 | }
10 |
--------------------------------------------------------------------------------
/lib/v3-periphery/test/shared/base64.ts:
--------------------------------------------------------------------------------
1 | export function base64Encode(str: string): string {
2 | return Buffer.from(str, 'utf8').toString('base64')
3 | }
4 |
5 | export function base64Decode(str: string): string {
6 | return Buffer.from(str, 'base64').toString('utf8')
7 | }
8 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].txt_Files/maxresdefault-BF663.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].txt_Files/maxresdefault-BF663.jpg
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/contracts/interfaces/IERC1155MetadataURI.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | // OpenZeppelin Contracts v4.4.1 (interfaces/IERC1155MetadataURI.sol)
3 |
4 | pragma solidity ^0.8.0;
5 |
6 | import "../token/ERC1155/extensions/IERC1155MetadataURI.sol";
7 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/contracts/interfaces/IERC721Metadata.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | // OpenZeppelin Contracts v4.4.1 (interfaces/IERC721Metadata.sol)
3 |
4 | pragma solidity ^0.8.0;
5 |
6 | import "../token/ERC721/extensions/IERC721Metadata.sol";
7 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/contracts/mocks/ERC165/ERC165MissingData.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity ^0.8.0;
4 |
5 | contract ERC165MissingData {
6 | function supportsInterface(bytes4 interfaceId) public view {} // missing return
7 | }
8 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/OIBc5iSVj0oei6YWkCuN-44C89:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/OIBc5iSVj0oei6YWkCuN-44C89
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/Qlcl0eqb1Z5UFlKw9Obr-FEF69:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/Qlcl0eqb1Z5UFlKw9Obr-FEF69
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].txt_Files/2024-05-28_195000-C6BB4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].txt_Files/2024-05-28_195000-C6BB4.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].txt_Files/OIBc5iSVj0oei6YWkCuN-44C89:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].txt_Files/OIBc5iSVj0oei6YWkCuN-44C89
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].txt_Files/Qlcl0eqb1Z5UFlKw9Obr-FEF69:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].txt_Files/Qlcl0eqb1Z5UFlKw9Obr-FEF69
--------------------------------------------------------------------------------
/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/certora/harnesses/OwnableHarness.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity ^0.8.0;
4 |
5 | import "../patched/access/Ownable.sol";
6 |
7 | contract OwnableHarness is Ownable {
8 | function restricted() external onlyOwner {}
9 | }
10 |
--------------------------------------------------------------------------------
/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/permit2/lib/openzeppelin-contracts/contracts/interfaces/IERC1820Implementer.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | // OpenZeppelin Contracts v4.4.1 (interfaces/IERC1820Implementer.sol)
3 |
4 | pragma solidity ^0.8.0;
5 |
6 | import "../utils/introspection/IERC1820Implementer.sol";
7 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/contracts/interfaces/IERC3156.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | // OpenZeppelin Contracts v4.4.1 (interfaces/IERC3156.sol)
3 |
4 | pragma solidity ^0.8.0;
5 |
6 | import "./IERC3156FlashBorrower.sol";
7 | import "./IERC3156FlashLender.sol";
8 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/contracts/interfaces/IERC721Enumerable.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | // OpenZeppelin Contracts v4.4.1 (interfaces/IERC721Enumerable.sol)
3 |
4 | pragma solidity ^0.8.0;
5 |
6 | import "../token/ERC721/extensions/IERC721Enumerable.sol";
7 |
--------------------------------------------------------------------------------
/lib/v3-periphery/test/__snapshots__/TickLens.spec.ts.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`TickLens #getPopulatedTicksInWord fully populated ticks 1`] = `2776254`;
4 |
5 | exports[`TickLens #getPopulatedTicksInWord gas for single populated tick 1`] = `55314`;
6 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/1083068770823721071-EE4F6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/1083068770823721071-EE4F6.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/1233171131012223026-67C35.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/1233171131012223026-67C35.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/1237627076333539328-5DC87.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/1237627076333539328-5DC87.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/2024-05-28_195000-C6BB4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/2024-05-28_195000-C6BB4.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/851893827027075142-F23DF.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/851893827027075142-F23DF.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/851893827089727568-5FD38.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/851893827089727568-5FD38.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/851893828280909886-FBF42.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/851893828280909886-FBF42.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/944081698067451954-2550D.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/944081698067451954-2550D.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/977133670429261884-CA8EA.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/977133670429261884-CA8EA.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/ggsans-italic-400-E988B.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/ggsans-italic-400-E988B.woff2
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/ggsans-italic-500-0777F.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/ggsans-italic-500-0777F.woff2
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/ggsans-italic-600-CB411.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/ggsans-italic-600-CB411.woff2
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/ggsans-italic-700-891AC.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/ggsans-italic-700-891AC.woff2
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/ggsans-italic-800-D36B0.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/ggsans-italic-800-D36B0.woff2
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/ggsans-normal-400-1456D.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/ggsans-normal-400-1456D.woff2
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/ggsans-normal-500-89CE5.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/ggsans-normal-500-89CE5.woff2
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/ggsans-normal-600-C1EA8.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/ggsans-normal-600-C1EA8.woff2
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/ggsans-normal-700-1949A.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/ggsans-normal-700-1949A.woff2
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/ggsans-normal-800-58487.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/ggsans-normal-800-58487.woff2
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/contracts/mocks/token/ERC20MulticallMock.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity ^0.8.0;
4 |
5 | import "../../token/ERC20/ERC20.sol";
6 | import "../../utils/Multicall.sol";
7 |
8 | abstract contract ERC20MulticallMock is ERC20, Multicall {}
9 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/contracts/interfaces/IERC1155MetadataURI.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | // OpenZeppelin Contracts v4.4.1 (interfaces/IERC1155MetadataURI.sol)
3 |
4 | pragma solidity ^0.8.0;
5 |
6 | import "../token/ERC1155/extensions/IERC1155MetadataURI.sol";
7 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/scripts/release/version.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -o errexit
4 |
5 | scripts/release/update-changelog-release-date.js
6 | scripts/release/synchronize-versions.js
7 | scripts/release/update-comment.js
8 |
9 | oz-docs update-version
10 |
--------------------------------------------------------------------------------
/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 | }
--------------------------------------------------------------------------------
/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/permit2/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/contracts/crosschain/errors.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | // OpenZeppelin Contracts (last updated v4.6.0) (crosschain/errors.sol)
3 |
4 | pragma solidity ^0.8.4;
5 |
6 | error NotCrossChainCall();
7 | error InvalidCrossChainSender(address actual, address expected);
8 |
--------------------------------------------------------------------------------
/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 | {{MinimalForwarder}}
13 |
--------------------------------------------------------------------------------
/lib/v3-periphery/test/__snapshots__/PoolAddress.spec.ts.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`PoolAddress #computeAddress gas cost 1`] = `643`;
4 |
5 | exports[`PoolAddress #computeAddress matches example from core repo 1`] = `"0xcf75931a4C18d87F784a91719DefFDdb74b7B0d5"`;
6 |
--------------------------------------------------------------------------------
/script/Counter.s.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: UNLICENSED
2 | pragma solidity ^0.8.13;
3 |
4 | import "forge-std/Script.sol";
5 |
6 | contract CounterScript is Script {
7 | function setUp() public {}
8 |
9 | function run() public {
10 | vm.broadcast();
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/libraries/PairLib.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: agpl-3.0
2 | pragma solidity ^0.8.17;
3 |
4 | library PairLib {
5 | function getRebalanceCacheId(uint256 pairId, uint64 rebalanceId) internal pure returns (uint256) {
6 | return pairId * type(uint64).max + rebalanceId;
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/addressList.ts:
--------------------------------------------------------------------------------
1 | export const Permit2 = '0x000000000022d473030f116ddee9f6b43ac78ba3'
2 | export const Filler = '0x51B89C499F3038756Eff64a0EF52d753147EAd75'
3 |
4 | // Chainlink USDC
5 | // 0x50834f3163758fcc1df9973b6e91f0f0f0434ad3
6 | // ETH
7 | // 0x639fe6ab55c921f74e7fac1ee960c0b6293ba612
8 | // decimalDiff: 12
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/certora/harnesses/Ownable2StepHarness.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity ^0.8.0;
4 |
5 | import "../patched/access/Ownable2Step.sol";
6 |
7 | contract Ownable2StepHarness is Ownable2Step {
8 | function restricted() external onlyOwner {}
9 | }
10 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/certora/specs/methods/IAccessControl.spec:
--------------------------------------------------------------------------------
1 | methods {
2 | hasRole(bytes32, address) returns(bool) envfree
3 | getRoleAdmin(bytes32) returns(bytes32) envfree
4 | grantRole(bytes32, address)
5 | revokeRole(bytes32, address)
6 | renounceRole(bytes32, address)
7 | }
8 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/contracts/mocks/token/ERC20ExcessDecimalsMock.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity ^0.8.0;
4 |
5 | contract ERC20ExcessDecimalsMock {
6 | function decimals() public pure returns (uint256) {
7 | return type(uint256).max;
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/foundry.toml:
--------------------------------------------------------------------------------
1 | [profile.default]
2 | src = "src"
3 | out = "out"
4 | libs = ["lib"]
5 |
6 | optimizer = true
7 | via_ir = false
8 | optimizer_runs = 200
9 | solc_version = "0.8.19"
10 |
11 | gas_reports = ["*"]
12 | fs_permissions = [{ access = "read", path = "./"}]
13 |
14 | [fuzz]
15 | runs = 1024
16 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/contracts/interfaces/IERC2612.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | // OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC2612.sol)
3 |
4 | pragma solidity ^0.8.0;
5 |
6 | import "../token/ERC20/extensions/IERC20Permit.sol";
7 |
8 | interface IERC2612 is IERC20Permit {}
9 |
--------------------------------------------------------------------------------
/lib/permit2/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 | {{MinimalForwarder}}
13 |
--------------------------------------------------------------------------------
/lib/v3-core/test/__snapshots__/UniswapV3Factory.spec.ts.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`UniswapV3Factory #createPool gas 1`] = `4515119`;
4 |
5 | exports[`UniswapV3Factory factory bytecode size 1`] = `24574`;
6 |
7 | exports[`UniswapV3Factory pool bytecode size 1`] = `21930`;
8 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].txt_Files/a752f8fd-ae79-4d48-83da-8a6a213214e9-D71D1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].txt_Files/a752f8fd-ae79-4d48-83da-8a6a213214e9-D71D1
--------------------------------------------------------------------------------
/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 | }
15 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/contracts/crosschain/errors.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | // OpenZeppelin Contracts (last updated v4.6.0) (crosschain/errors.sol)
3 |
4 | pragma solidity ^0.8.4;
5 |
6 | error NotCrossChainCall();
7 | error InvalidCrossChainSender(address actual, address expected);
8 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/073f0c045759497a01cc41aadc93619e-D875F.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/073f0c045759497a01cc41aadc93619e-D875F.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/0b8eb95ae05f7d8b62136d857c324c66-088A8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/0b8eb95ae05f7d8b62136d857c324c66-088A8.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/0cf7719f20f0aaed168c3f31a3f0bceb-8014C.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/0cf7719f20f0aaed168c3f31a3f0bceb-8014C.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/1162a888c78000773591a5db6de8aa9f-DCF7E.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/1162a888c78000773591a5db6de8aa9f-DCF7E.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/1628fc11e7961d85181295493426b775-7E20F.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/1628fc11e7961d85181295493426b775-7E20F.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/1aea383fe7da3deeefb7a87fc44e7bca-D0D1A.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/1aea383fe7da3deeefb7a87fc44e7bca-D0D1A.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/1eb7f1d8b39c92052acbc65fa18aa056-95A27.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/1eb7f1d8b39c92052acbc65fa18aa056-95A27.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/1f2874ce34e1d8171e0dc5d95c212a40-1FE2A.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/1f2874ce34e1d8171e0dc5d95c212a40-1FE2A.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/258a1ffc46d9e9c3872ad643ab9b4bd5-EE2DC.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/258a1ffc46d9e9c3872ad643ab9b4bd5-EE2DC.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/288aa0de2d7ec6f3bcca11bc9f778f2f-E6A23.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/288aa0de2d7ec6f3bcca11bc9f778f2f-E6A23.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/2a9faff195fe333526cfe6ae6fce1420-49B98.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/2a9faff195fe333526cfe6ae6fce1420-49B98.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/2afb13731f83ccb20ea25b5bdb1a6c95-35031.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/2afb13731f83ccb20ea25b5bdb1a6c95-35031.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/2c1e18acbcb9cdaeabfd7fc6f5090edf-CA387.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/2c1e18acbcb9cdaeabfd7fc6f5090edf-CA387.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/34d2d7de2893f18e31aa4da767ee758f-58D64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/34d2d7de2893f18e31aa4da767ee758f-58D64.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/35f6ac12be0ae6f4138cbeb1a28a20d3-DBCEC.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/35f6ac12be0ae6f4138cbeb1a28a20d3-DBCEC.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/4300144ca69d0a514c0680d966674c41-CD85B.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/4300144ca69d0a514c0680d966674c41-CD85B.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/4634554b26c5ac710fcace1ce468e6b4-DCDA1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/4634554b26c5ac710fcace1ce468e6b4-DCDA1.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/4de8e7cb6dfbbe8795697f1df8d66439-044AF.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/4de8e7cb6dfbbe8795697f1df8d66439-044AF.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/4eaf99d01e4b5042454b4a6a8809687a-F166B.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/4eaf99d01e4b5042454b4a6a8809687a-F166B.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/50dd7f528e6efa2618511364dd0ddce0-1D481.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/50dd7f528e6efa2618511364dd0ddce0-1D481.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/568d22b97293cdd2d9b7006198d6adbc-F0132.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/568d22b97293cdd2d9b7006198d6adbc-F0132.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/5871d40d01a047d984fbaf957cc13f86-4D592.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/5871d40d01a047d984fbaf957cc13f86-4D592.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/5b71d15a9bcde45fd5520e3fb580eb53-E1A50.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/5b71d15a9bcde45fd5520e3fb580eb53-E1A50.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/5e3fb61df91ed29c573265a690af4600-E824E.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/5e3fb61df91ed29c573265a690af4600-E824E.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/5fa1462b3cbd6d23b63942466a6d2f06-2F604.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/5fa1462b3cbd6d23b63942466a6d2f06-2F604.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/67594ee4b4d1fc03bca468327a0d145b-BD76A.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/67594ee4b4d1fc03bca468327a0d145b-BD76A.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/6cc3a1021947158341eb813f8c41bf1f-C7CFE.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/6cc3a1021947158341eb813f8c41bf1f-C7CFE.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/750d791c21ffd3863332eea023124fa5-05646.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/750d791c21ffd3863332eea023124fa5-05646.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/7d09c08ff18b852203d15b51bf26bca2-D3DD1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/7d09c08ff18b852203d15b51bf26bca2-D3DD1.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/8043f1de89cc1387981f4990ad574c08-78DE7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/8043f1de89cc1387981f4990ad574c08-78DE7.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/816cfc933746a8ffd61a8a93193028c5-41002.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/816cfc933746a8ffd61a8a93193028c5-41002.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/86f4180c3829539aab0c6210474061a7-4349C.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/86f4180c3829539aab0c6210474061a7-4349C.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/8f53411d3af94b5a6d0e4f6a2f48a6bb-68553.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/8f53411d3af94b5a6d0e4f6a2f48a6bb-68553.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/930871c4671919ec697c9144a1911535-814BF.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/930871c4671919ec697c9144a1911535-814BF.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/95596e5ab52617d3b75a967597c7c5ce-94B44.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/95596e5ab52617d3b75a967597c7c5ce-94B44.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/970d2e2f00cd7ef2134a1a3f21326349-404EA.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/970d2e2f00cd7ef2134a1a3f21326349-404EA.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/9743d0d8b5564acfdfeef2c6c63d5410-11A3C.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/9743d0d8b5564acfdfeef2c6c63d5410-11A3C.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/a1f41505314077e259d5c3b02ec3570e-5BB24.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/a1f41505314077e259d5c3b02ec3570e-5BB24.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/a752f8fd-ae79-4d48-83da-8a6a213214e9-D71D1:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/a752f8fd-ae79-4d48-83da-8a6a213214e9-D71D1
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/adddc7313b30a4e8b5329894bf2034ab-5B4E5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/adddc7313b30a4e8b5329894bf2034ab-5B4E5.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/ae55bccd105a97e5e171c290822eab04-394BB.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/ae55bccd105a97e5e171c290822eab04-394BB.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/afca0e84e90e7172fdf16a089da1d694-947DB.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/afca0e84e90e7172fdf16a089da1d694-947DB.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/bafed0770e472da8f19eb96dac5ac510-62868.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/bafed0770e472da8f19eb96dac5ac510-62868.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/bd62ce81b7d8b78cae1cff4b51cf6b59-37CFE.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/bd62ce81b7d8b78cae1cff4b51cf6b59-37CFE.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/bde09905c12e2e8893a97a4b24df78b1-D1D61.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/bde09905c12e2e8893a97a4b24df78b1-D1D61.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/ca9e82ca04289e14a609324c61011434-E49F7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/ca9e82ca04289e14a609324c61011434-E49F7.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/ce33938a6121cd196500c7b573fba65a-15E3D.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/ce33938a6121cd196500c7b573fba65a-15E3D.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/d12592c492cf72b2b5f317f8341c2d38-3CEFE.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/d12592c492cf72b2b5f317f8341c2d38-3CEFE.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/d2d94d7e11412f6f18f842f82452604d-D4DA0.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/d2d94d7e11412f6f18f842f82452604d-D4DA0.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/d482d56e4533980c4a4108a97afecfcb-31323.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/d482d56e4533980c4a4108a97afecfcb-31323.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/db37a44fec3e7215df0fd640d3fe1e71-83EA5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/db37a44fec3e7215df0fd640d3fe1e71-83EA5.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/dd0b02132544c612d48d10270e412d9b-9486F.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/dd0b02132544c612d48d10270e412d9b-9486F.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/dfacc77d68962a991f5a4c3b7859b4c2-BAB3E.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/dfacc77d68962a991f5a4c3b7859b4c2-BAB3E.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/e00d2cfe4e679acc9e11182ab19c5db3-F3931.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/e00d2cfe4e679acc9e11182ab19c5db3-F3931.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/e6f4ca0e498c6a1841fd2181890d7668-D7F35.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/e6f4ca0e498c6a1841fd2181890d7668-D7F35.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/ef353ac557c47e95ecd46e0afac40642-CEF40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/ef353ac557c47e95ecd46e0afac40642-CEF40.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/f37097a7d18a772a380665929aaba15b-94EB7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/f37097a7d18a772a380665929aaba15b-94EB7.png
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/feb79bb6c3285f43d25af82703f76106-392DC.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/code-423n4/2024-05-predy/HEAD/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/feb79bb6c3285f43d25af82703f76106-392DC.png
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/contracts/interfaces/draft-IERC2612.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | // OpenZeppelin Contracts (last updated v4.9.0) (interfaces/draft-IERC2612.sol)
3 |
4 | pragma solidity ^0.8.0;
5 |
6 | // EIP-2612 is Final as of 2022-11-01. This file is deprecated.
7 |
8 | import "./IERC2612.sol";
9 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/src/interfaces/ISpotMarket.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: UNLICENSED
2 | pragma solidity >=0.8.0;
3 |
4 | import {IFillerMarket} from "./IFillerMarket.sol";
5 |
6 | interface ISpotMarket {
7 | function quoteSettlement(IFillerMarket.SettlementParams memory settlementParams, int256 baseAmountDelta) external;
8 | }
9 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/contracts/interfaces/draft-IERC2612.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | // OpenZeppelin Contracts v4.4.1 (interfaces/draft-IERC2612.sol)
3 |
4 | pragma solidity ^0.8.0;
5 |
6 | import "../token/ERC20/extensions/draft-IERC20Permit.sol";
7 |
8 | interface IERC2612 is IERC20Permit {}
9 |
--------------------------------------------------------------------------------
/.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 | cache_hardhat/
17 |
18 | node_modules
19 | artifacts
20 | typechain
21 | typechain-types
22 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/contracts/mocks/proxy/BadBeacon.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity ^0.8.0;
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/utils/cryptography/draft-EIP712.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | // OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/draft-EIP712.sol)
3 |
4 | pragma solidity ^0.8.0;
5 |
6 | // EIP-712 is Final as of 2022-08-11. This file is deprecated.
7 |
8 | import "./EIP712.sol";
9 |
--------------------------------------------------------------------------------
/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/contracts/interfaces/IERC5805.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | // OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC5805.sol)
3 |
4 | pragma solidity ^0.8.0;
5 |
6 | import "../governance/utils/IVotes.sol";
7 | import "./IERC6372.sol";
8 |
9 | interface IERC5805 is IERC6372, IVotes {}
10 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/contracts/mocks/BadBeacon.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity ^0.8.0;
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/certora/specs/methods/IERC2612.spec:
--------------------------------------------------------------------------------
1 | methods {
2 | permit(address,address,uint256,uint256,uint8,bytes32,bytes32) => DISPATCHER(true)
3 | nonces(address) returns (uint256) envfree => DISPATCHER(true)
4 | DOMAIN_SEPARATOR() returns (bytes32) envfree => DISPATCHER(true)
5 | }
6 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "singleQuote": true,
3 | "trailingComma": "all",
4 | "overrides": [
5 | {
6 | "files": "*.sol",
7 | "options": {
8 | "singleQuote": false,
9 | "printWidth": 120,
10 | "explicitTypes": "always"
11 | }
12 | }
13 | ]
14 | }
15 |
--------------------------------------------------------------------------------
/lib/solmate/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "solidity.packageDefaultDependenciesContractsDirectory": "src",
3 | "solidity.packageDefaultDependenciesDirectory": "lib",
4 | "solidity.compileUsingRemoteVersion": "v0.8.15",
5 | "search.exclude": { "lib": true },
6 | "files.associations": {
7 | ".gas-snapshot": "julia"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/lib/v3-periphery/test/shared/extractJSONFromURI.ts:
--------------------------------------------------------------------------------
1 | export function extractJSONFromURI(uri: string): { name: string; description: string; image: string } {
2 | const encodedJSON = uri.substr('data:application/json;base64,'.length)
3 | const decodedJSON = Buffer.from(encodedJSON, 'base64').toString('utf8')
4 | return JSON.parse(decodedJSON)
5 | }
6 |
--------------------------------------------------------------------------------
/src/types/LockData.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: UNLICENSED
2 | pragma solidity ^0.8.17;
3 |
4 | import "../interfaces/IPredyPool.sol";
5 |
6 | library LockDataLibrary {
7 | struct LockData {
8 | address locker;
9 | uint256 quoteReserve;
10 | uint256 baseReserve;
11 | uint256 pairId;
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/contracts/token/ERC20/extensions/draft-ERC20Permit.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/draft-ERC20Permit.sol)
3 |
4 | pragma solidity ^0.8.0;
5 |
6 | // EIP-2612 is Final as of 2022-11-01. This file is deprecated.
7 |
8 | import "./ERC20Permit.sol";
9 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/contracts/token/ERC20/extensions/draft-IERC20Permit.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/draft-IERC20Permit.sol)
3 |
4 | pragma solidity ^0.8.0;
5 |
6 | // EIP-2612 is Final as of 2022-11-01. This file is deprecated.
7 |
8 | import "./IERC20Permit.sol";
9 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/contracts/mocks/Base64Mock.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity ^0.8.0;
4 |
5 | import "../utils/Base64.sol";
6 |
7 | contract Base64Mock {
8 | function encode(bytes memory value) external pure returns (string memory) {
9 | return Base64.encode(value);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/certora/specs/methods/IERC3156.spec:
--------------------------------------------------------------------------------
1 | methods {
2 | maxFlashLoan(address) returns (uint256) envfree => DISPATCHER(true)
3 | flashFee(address,uint256) returns (uint256) envfree => DISPATCHER(true)
4 | flashLoan(address,address,uint256,bytes) returns (bool) => DISPATCHER(true)
5 | }
6 |
--------------------------------------------------------------------------------
/lib/permit2/lib/solmate/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "solidity.packageDefaultDependenciesContractsDirectory": "src",
3 | "solidity.packageDefaultDependenciesDirectory": "lib",
4 | "solidity.compileUsingRemoteVersion": "v0.8.15",
5 | "search.exclude": { "lib": true },
6 | "files.associations": {
7 | ".gas-snapshot": "julia"
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/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/solmate/src/test/utils/mocks/MockOwned.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: AGPL-3.0-only
2 | pragma solidity >=0.8.0;
3 |
4 | import {Owned} from "../../../auth/Owned.sol";
5 |
6 | contract MockOwned is Owned(msg.sender) {
7 | bool public flag;
8 |
9 | function updateFlag() public virtual onlyOwner {
10 | flag = true;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/contracts/mocks/AccessControlCrossChainMock.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity ^0.8.4;
4 |
5 | import "../access/AccessControlCrossChain.sol";
6 | import "../crosschain/arbitrum/CrossChainEnabledArbitrumL2.sol";
7 |
8 | contract AccessControlCrossChainMock is AccessControlCrossChain, CrossChainEnabledArbitrumL2 {}
9 |
--------------------------------------------------------------------------------
/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/scripts/prepack.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -euo pipefail
4 | shopt -s globstar
5 |
6 | # cross platform `mkdir -p`
7 | node -e 'fs.mkdirSync("build/contracts", { recursive: true })'
8 |
9 | cp artifacts/contracts/**/*.json build/contracts
10 | rm build/contracts/*.dbg.json
11 |
12 | node scripts/remove-ignored-artifacts.js
13 |
--------------------------------------------------------------------------------
/lib/v3-periphery/contracts/test/PeripheryImmutableStateTest.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-2.0-or-later
2 | pragma solidity =0.8.15;
3 |
4 | import '../base/PeripheryImmutableState.sol';
5 |
6 | contract PeripheryImmutableStateTest is PeripheryImmutableState {
7 | constructor(address _factory, address _WETH9) PeripheryImmutableState(_factory, _WETH9) {}
8 | }
9 |
--------------------------------------------------------------------------------
/test/market/perp/PredyLiquidationCallback.t.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: UNLICENSED
2 | pragma solidity ^0.8.0;
3 |
4 | import "./Setup.t.sol";
5 |
6 | contract TestPredyLiquidationCallback is TestPerpMarket {
7 | function setUp() public override {
8 | TestPerpMarket.setUp();
9 | }
10 |
11 | // liquidate a filler market position
12 | }
13 |
--------------------------------------------------------------------------------
/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/.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/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/permit2/lib/solmate/src/test/utils/mocks/MockOwned.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: AGPL-3.0-only
2 | pragma solidity >=0.8.0;
3 |
4 | import {Owned} from "../../../auth/Owned.sol";
5 |
6 | contract MockOwned is Owned(msg.sender) {
7 | bool public flag;
8 |
9 | function updateFlag() public virtual onlyOwner {
10 | flag = true;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/lib/solmate/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 |
--------------------------------------------------------------------------------
/test/market/gamma/PredyLiquidationCallback.t.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: UNLICENSED
2 | pragma solidity ^0.8.0;
3 |
4 | import "./Setup.t.sol";
5 |
6 | contract TestPredyLiquidationCallback is TestGammaMarket {
7 | function setUp() public override {
8 | TestGammaMarket.setUp();
9 | }
10 |
11 | // liquidate a filler market position
12 | }
13 |
--------------------------------------------------------------------------------
/lib/permit2/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 | node -e 'fs.mkdirSync("build/contracts", { recursive: true })'
8 |
9 | cp artifacts/contracts/**/*.json build/contracts
10 | rm build/contracts/*.dbg.json
11 |
12 | node scripts/remove-ignored-artifacts.js
13 |
--------------------------------------------------------------------------------
/lib/permit2/lib/solmate/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/v3-core/contracts/libraries/FixedPoint128.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-2.0-or-later
2 | pragma solidity >=0.4.0;
3 |
4 | /// @title FixedPoint128
5 | /// @notice A library for handling binary fixed point numbers, see https://en.wikipedia.org/wiki/Q_(number_format)
6 | library FixedPoint128 {
7 | uint256 internal constant Q128 = 0x100000000000000000000000000000000;
8 | }
9 |
--------------------------------------------------------------------------------
/remappings.txt:
--------------------------------------------------------------------------------
1 | forge-std/=lib/forge-std/src/
2 | ds-test/=lib/forge-std/lib/ds-test/src/
3 | @solmate/=lib/solmate/
4 | solmate/=lib/solmate
5 | @openzeppelin/=lib/openzeppelin-contracts/
6 | @openzeppelin-upgradeable/=lib/openzeppelin-contracts-upgradeable/
7 | @uniswap/v3-periphery/=lib/v3-periphery/
8 | @uniswap/v3-core/=lib/v3-core/
9 | @uniswap/permit2/=lib/permit2/
10 |
11 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/contracts/vendor/polygon/IFxMessageProcessor.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | // OpenZeppelin Contracts (last updated v4.9.0) (vendor/polygon/IFxMessageProcessor.sol)
3 | pragma solidity ^0.8.0;
4 |
5 | interface IFxMessageProcessor {
6 | function processMessageFromRoot(uint256 stateId, address rootMessageSender, bytes calldata data) external;
7 | }
8 |
--------------------------------------------------------------------------------
/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/permit2/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/permit2/lib/openzeppelin-contracts/contracts/mocks/ERC165StorageMock.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity ^0.8.0;
4 |
5 | import "../utils/introspection/ERC165Storage.sol";
6 |
7 | contract ERC165StorageMock is ERC165Storage {
8 | function registerInterface(bytes4 interfaceId) public {
9 | _registerInterface(interfaceId);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/lib/permit2/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/permit2/lib/openzeppelin-contracts/contracts/mocks/MulticallTokenMock.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity ^0.8.0;
4 |
5 | import "../utils/Multicall.sol";
6 | import "./ERC20Mock.sol";
7 |
8 | contract MulticallTokenMock is ERC20Mock, Multicall {
9 | constructor(uint256 initialBalance) ERC20Mock("MulticallToken", "BCT", msg.sender, initialBalance) {}
10 | }
11 |
--------------------------------------------------------------------------------
/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/solmate/src/test/utils/mocks/MockAuthChild.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: AGPL-3.0-only
2 | pragma solidity >=0.8.0;
3 |
4 | import {Auth, Authority} from "../../../auth/Auth.sol";
5 |
6 | contract MockAuthChild is Auth(msg.sender, Authority(address(0))) {
7 | bool public flag;
8 |
9 | function updateFlag() public virtual requiresAuth {
10 | flag = true;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/lib/v3-periphery/contracts/base/PeripheryValidation.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-2.0-or-later
2 | pragma solidity =0.8.15;
3 |
4 | import './BlockTimestamp.sol';
5 |
6 | abstract contract PeripheryValidation is BlockTimestamp {
7 | modifier checkDeadline(uint256 deadline) {
8 | require(_blockTimestamp() <= deadline, 'Transaction too old');
9 | _;
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/lib/permit2/foundry.toml:
--------------------------------------------------------------------------------
1 | [profile.default]
2 | solc = "0.8.17"
3 | bytecode_hash = "none"
4 | optimizer = true
5 | via_ir = true
6 | optimizer_runs = 1000000
7 | no_match_path = "*/integration/*"
8 | fuzz_runs = 10000
9 | ffi = true
10 | fs_permissions = [{ access = "read-write", path = ".forge-snapshots/"}]
11 |
12 | [profile.integration]
13 | no_match_path = ""
14 | match_path = "*/integration/*"
15 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/test/helpers/create2.js:
--------------------------------------------------------------------------------
1 | function computeCreate2Address(saltHex, bytecode, deployer) {
2 | return web3.utils.toChecksumAddress(
3 | `0x${web3.utils
4 | .sha3(`0x${['ff', deployer, saltHex, web3.utils.soliditySha3(bytecode)].map(x => x.replace(/0x/, '')).join('')}`)
5 | .slice(-40)}`,
6 | );
7 | }
8 |
9 | module.exports = {
10 | computeCreate2Address,
11 | };
12 |
--------------------------------------------------------------------------------
/lib/permit2/test/mocks/MockNonPermitNonERC20WithDS.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity ^0.8.17;
3 |
4 | contract MockNonPermitNonERC20WithDS {
5 | function DOMAIN_SEPARATOR() external pure returns (bytes memory) {
6 | bytes memory returnData = "123456789012345678901234567890123";
7 | require(returnData.length == 33);
8 | return returnData;
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/lib/v3-periphery/contracts/test/TestERC20.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: UNLICENSED
2 | pragma solidity =0.8.15;
3 |
4 | import '@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Permit.sol';
5 |
6 | contract TestERC20 is ERC20Permit {
7 | constructor(uint256 amountToMint) ERC20('Test ERC20', 'TEST') ERC20Permit('Test ERC20') {
8 | _mint(msg.sender, amountToMint);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "solidity.packageDefaultDependenciesContractsDirectory": "src",
3 | "solidity.packageDefaultDependenciesDirectory": "lib",
4 | "solidity.compileUsingRemoteVersion": "v0.8.19",
5 | "solidity.formatter": "forge",
6 | "search.exclude": {
7 | "lib": true
8 | },
9 | "files.associations": {
10 | ".gas-snapshot": "julia"
11 | },
12 | "editor.formatOnSave": true
13 | }
--------------------------------------------------------------------------------
/lib/permit2/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "solidity.packageDefaultDependenciesContractsDirectory": "src",
3 | "solidity.packageDefaultDependenciesDirectory": "lib",
4 | "solidity.compileUsingRemoteVersion": "v0.8.17",
5 | "solidity.formatter": "forge",
6 | "search.exclude": { "lib": true },
7 | "files.associations": {
8 | ".gas-snapshot": "julia"
9 | },
10 | "editor.formatOnSave": true
11 | }
12 |
--------------------------------------------------------------------------------
/lib/permit2/lib/solmate/src/test/utils/mocks/MockAuthChild.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: AGPL-3.0-only
2 | pragma solidity >=0.8.0;
3 |
4 | import {Auth, Authority} from "../../../auth/Auth.sol";
5 |
6 | contract MockAuthChild is Auth(msg.sender, Authority(address(0))) {
7 | bool public flag;
8 |
9 | function updateFlag() public virtual requiresAuth {
10 | flag = true;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/lib/solmate/.github/pull_request_template.md:
--------------------------------------------------------------------------------
1 | ## Description
2 |
3 | Describe the changes made in your pull request here.
4 |
5 | ## Checklist
6 |
7 | Ensure you completed **all of the steps** below before submitting your pull request:
8 |
9 | - [ ] Ran `forge snapshot`?
10 | - [ ] Ran `npm run lint`?
11 | - [ ] Ran `forge test`?
12 |
13 | _Pull requests with an incomplete checklist will be thrown out._
14 |
--------------------------------------------------------------------------------
/lib/v3-periphery/test/shared/constants.ts:
--------------------------------------------------------------------------------
1 | import { BigNumber } from 'ethers'
2 |
3 | export const MaxUint128 = BigNumber.from(2).pow(128).sub(1)
4 |
5 | export enum FeeAmount {
6 | LOW = 500,
7 | MEDIUM = 3000,
8 | HIGH = 10000,
9 | }
10 |
11 | export const TICK_SPACINGS: { [amount in FeeAmount]: number } = {
12 | [FeeAmount.LOW]: 10,
13 | [FeeAmount.MEDIUM]: 60,
14 | [FeeAmount.HIGH]: 200,
15 | }
16 |
--------------------------------------------------------------------------------
/lib/v3-periphery/test/shared/poolAtAddress.ts:
--------------------------------------------------------------------------------
1 | import { abi as POOL_ABI } from '@uniswap/v3-core/artifacts/contracts/UniswapV3Pool.sol/UniswapV3Pool.json'
2 | import { Contract, Wallet } from 'ethers'
3 | import { IUniswapV3Pool } from '../../typechain'
4 |
5 | export default function poolAtAddress(address: string, wallet: Wallet): IUniswapV3Pool {
6 | return new Contract(address, POOL_ABI, wallet) as IUniswapV3Pool
7 | }
8 |
--------------------------------------------------------------------------------
/lib/v3-periphery/test/shared/tokenSort.ts:
--------------------------------------------------------------------------------
1 | export function compareToken(a: { address: string }, b: { address: string }): -1 | 1 {
2 | return a.address.toLowerCase() < b.address.toLowerCase() ? -1 : 1
3 | }
4 |
5 | export function sortedTokens(
6 | a: { address: string },
7 | b: { address: string }
8 | ): [typeof a, typeof b] | [typeof b, typeof a] {
9 | return compareToken(a, b) < 0 ? [a, b] : [b, a]
10 | }
11 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/contracts/mocks/token/ERC777Mock.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity ^0.8.0;
4 |
5 | import "../../token/ERC777/ERC777.sol";
6 |
7 | abstract contract ERC777Mock is ERC777 {
8 | event BeforeTokenTransfer();
9 |
10 | function _beforeTokenTransfer(address, address, address, uint256) internal override {
11 | emit BeforeTokenTransfer();
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/lib/permit2/lib/solmate/.github/pull_request_template.md:
--------------------------------------------------------------------------------
1 | ## Description
2 |
3 | Describe the changes made in your pull request here.
4 |
5 | ## Checklist
6 |
7 | Ensure you completed **all of the steps** below before submitting your pull request:
8 |
9 | - [ ] Ran `forge snapshot`?
10 | - [ ] Ran `npm run lint`?
11 | - [ ] Ran `forge test`?
12 |
13 | _Pull requests with an incomplete checklist will be thrown out._
14 |
--------------------------------------------------------------------------------
/lib/permit2/test/mocks/MockSignatureVerification.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity ^0.8.17;
3 |
4 | import {SignatureVerification} from "../../src/libraries/SignatureVerification.sol";
5 |
6 | contract MockSignatureVerification {
7 | function verify(bytes calldata sig, bytes32 hashed, address signer) public view {
8 | SignatureVerification.verify(sig, hashed, signer);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/lib/v3-core/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es2018",
4 | "module": "commonjs",
5 | "strict": true,
6 | "esModuleInterop": true,
7 | "outDir": "dist",
8 | "typeRoots": ["./typechain", "./node_modules/@types"],
9 | "types": ["@nomiclabs/hardhat-ethers", "@nomiclabs/hardhat-waffle"]
10 | },
11 | "include": ["./test"],
12 | "files": ["./hardhat.config.ts"]
13 | }
14 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/contracts/mocks/ReentrancyAttack.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity ^0.8.0;
4 |
5 | import "../utils/Context.sol";
6 |
7 | contract ReentrancyAttack is Context {
8 | function callSender(bytes4 data) public {
9 | (bool success, ) = _msgSender().call(abi.encodeWithSelector(data));
10 | require(success, "ReentrancyAttack: failed call");
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/contracts/token/ERC721/extensions/draft-ERC721Votes.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/draft-ERC721Votes.sol)
3 |
4 | pragma solidity ^0.8.0;
5 |
6 | // ERC721Votes was marked as draft due to the EIP-712 dependency.
7 | // EIP-712 is Final as of 2022-08-11. This file is deprecated.
8 |
9 | import "./ERC721Votes.sol";
10 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/test/helpers/create2.js:
--------------------------------------------------------------------------------
1 | function computeCreate2Address (saltHex, bytecode, deployer) {
2 | return web3.utils.toChecksumAddress(`0x${web3.utils.sha3(`0x${[
3 | 'ff',
4 | deployer,
5 | saltHex,
6 | web3.utils.soliditySha3(bytecode),
7 | ].map(x => x.replace(/0x/, '')).join('')}`).slice(-40)}`);
8 | }
9 |
10 | module.exports = {
11 | computeCreate2Address,
12 | };
13 |
--------------------------------------------------------------------------------
/lib/permit2/test/integration/tokens/DAI.t.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity ^0.8.17;
3 |
4 | import {ERC20} from "solmate/src/tokens/ERC20.sol";
5 | import {MainnetTokenTest} from "../MainnetToken.t.sol";
6 |
7 | contract DAITest is MainnetTokenTest {
8 | function token() internal pure override returns (ERC20) {
9 | return ERC20(0x6B175474E89094C44Da98b954EedeAC495271d0F);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/lib/permit2/test/integration/tokens/UNI.t.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity ^0.8.17;
3 |
4 | import {ERC20} from "solmate/src/tokens/ERC20.sol";
5 | import {MainnetTokenTest} from "../MainnetToken.t.sol";
6 |
7 | contract UNITest is MainnetTokenTest {
8 | function token() internal pure override returns (ERC20) {
9 | return ERC20(0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/lib/permit2/test/integration/tokens/ZRX.t.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity ^0.8.17;
3 |
4 | import {ERC20} from "solmate/src/tokens/ERC20.sol";
5 | import {MainnetTokenTest} from "../MainnetToken.t.sol";
6 |
7 | contract ZRXTest is MainnetTokenTest {
8 | function token() internal pure override returns (ERC20) {
9 | return ERC20(0xE41d2489571d322189246DaFA5ebDe1F4699F498);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/lib/permit2/test/mocks/MockERC20.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity ^0.8.17;
3 |
4 | import {ERC20} from "solmate/src/tokens/ERC20.sol";
5 |
6 | contract MockERC20 is ERC20 {
7 | constructor(string memory name, string memory symbol, uint8 decimals) ERC20(name, symbol, decimals) {}
8 |
9 | function mint(address _to, uint256 _amount) public {
10 | _mint(_to, _amount);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/contracts/mocks/ERC165/ERC165MaliciousData.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity ^0.8.0;
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/permit2/lib/openzeppelin-contracts/.solcover.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | norpc: true,
3 | testCommand: 'npm test',
4 | compileCommand: 'npm run compile',
5 | skipFiles: [
6 | 'mocks',
7 | ],
8 | providerOptions: {
9 | default_balance_ether: '10000000000000000000000000',
10 | },
11 | mocha: {
12 | fgrep: '[skip-on-coverage]',
13 | invert: true,
14 | },
15 | }
16 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/test/utils/introspection/ERC165.test.js:
--------------------------------------------------------------------------------
1 | const { shouldSupportInterfaces } = require('./SupportsInterface.behavior');
2 |
3 | const ERC165Mock = artifacts.require('ERC165Mock');
4 |
5 | contract('ERC165', function (accounts) {
6 | beforeEach(async function () {
7 | this.mock = await ERC165Mock.new();
8 | });
9 |
10 | shouldSupportInterfaces([
11 | 'ERC165',
12 | ]);
13 | });
14 |
--------------------------------------------------------------------------------
/lib/permit2/test/integration/tokens/USDC.t.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity ^0.8.17;
3 |
4 | import {ERC20} from "solmate/src/tokens/ERC20.sol";
5 | import {MainnetTokenTest} from "../MainnetToken.t.sol";
6 |
7 | contract USDCTest is MainnetTokenTest {
8 | function token() internal pure override returns (ERC20) {
9 | return ERC20(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/lib/permit2/test/integration/tokens/WBTC.t.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity ^0.8.17;
3 |
4 | import {ERC20} from "solmate/src/tokens/ERC20.sol";
5 | import {MainnetTokenTest} from "../MainnetToken.t.sol";
6 |
7 | contract WBTCTest is MainnetTokenTest {
8 | function token() internal pure override returns (ERC20) {
9 | return ERC20(0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/certora/harnesses/ERC721ReceiverHarness.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity ^0.8.0;
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 |
--------------------------------------------------------------------------------
/slither.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "filter_paths": "(lib/|test/)",
3 | "solc_remaps": [
4 | "ds-test/=lib/ds-test/src/",
5 | "forge-std/=lib/forge-std/src/",
6 | "@solmate/=lib/solmate/src/",
7 | "@openzeppelin/=lib/openzeppelin-contracts/",
8 | "@uniswap/v3-core/=lib/v3-core/",
9 | "@uniswap/v3-periphery/=lib/v3-periphery/",
10 | "@uniswap/permit2/=lib/permit2/"
11 | ],
12 | "exclude_informational": true
13 | }
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/certora/scripts/Governor.sh:
--------------------------------------------------------------------------------
1 | make -C certora munged
2 |
3 | certoraRun certora/harnesses/ERC20VotesHarness.sol certora/harnesses/GovernorHarness.sol \
4 | --verify GovernorHarness:certora/specs/GovernorBase.spec \
5 | --solc solc8.0 \
6 | --staging shelly/forSasha \
7 | --optimistic_loop \
8 | --settings -copyLoopUnroll=4 \
9 | --rule voteStartBeforeVoteEnd \
10 | --msg "$1"
11 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/contracts/mocks/ERC165/ERC165MaliciousData.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity ^0.8.0;
4 |
5 | contract ERC165MaliciousData {
6 | function supportsInterface(bytes4) public view returns (bool) {
7 | assembly {
8 | mstore(0, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)
9 | return(0, 32)
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/contracts/mocks/ReentrancyAttack.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity ^0.8.0;
4 |
5 | import "../utils/Context.sol";
6 |
7 | contract ReentrancyAttack is Context {
8 | function callSender(bytes4 data) public {
9 | (bool success, ) = _msgSender().call(abi.encodeWithSelector(data));
10 | require(success, "ReentrancyAttack: failed call");
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/libraries/math/Bps.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: agpl-3.0
2 | pragma solidity ^0.8.17;
3 |
4 | library Bps {
5 | uint32 public constant ONE = 1e6;
6 |
7 | function upper(uint256 price, uint256 bps) internal pure returns (uint256) {
8 | return price * bps / ONE;
9 | }
10 |
11 | function lower(uint256 price, uint256 bps) internal pure returns (uint256) {
12 | return price * ONE / bps;
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/certora/scripts/WizardFirstTry.sh:
--------------------------------------------------------------------------------
1 | make -C certora munged
2 |
3 | certoraRun certora/harnesses/ERC20VotesHarness.sol certora/harnesses/WizardFirstTry.sol \
4 | --verify WizardFirstTry:certora/specs/GovernorBase.spec \
5 | --solc solc8.2 \
6 | --staging shelly/forSasha \
7 | --optimistic_loop \
8 | --disableLocalTypeChecking \
9 | --settings -copyLoopUnroll=4 \
10 | --msg "$1"
11 |
--------------------------------------------------------------------------------
/lib/v3-periphery/contracts/libraries/TokenRatioSortOrder.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity ^0.8.0;
3 |
4 | library TokenRatioSortOrder {
5 | int256 constant NUMERATOR_MOST = 300;
6 | int256 constant NUMERATOR_MORE = 200;
7 | int256 constant NUMERATOR = 100;
8 |
9 | int256 constant DENOMINATOR_MOST = -300;
10 | int256 constant DENOMINATOR_MORE = -200;
11 | int256 constant DENOMINATOR = -100;
12 | }
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/permit2/lib/openzeppelin-contracts/contracts/mocks/ERC1820ImplementerMock.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity ^0.8.0;
4 |
5 | import "../utils/introspection/ERC1820Implementer.sol";
6 |
7 | contract ERC1820ImplementerMock is ERC1820Implementer {
8 | function registerInterfaceForAddress(bytes32 interfaceHash, address account) public {
9 | _registerInterfaceForAddress(interfaceHash, account);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/contracts/vendor/polygon/IFxMessageProcessor.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | // OpenZeppelin Contracts (last updated v4.6.0) (vendor/polygon/IFxMessageProcessor.sol)
3 | pragma solidity ^0.8.0;
4 |
5 | interface IFxMessageProcessor {
6 | function processMessageFromRoot(
7 | uint256 stateId,
8 | address rootMessageSender,
9 | bytes calldata data
10 | ) external;
11 | }
12 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/2764-A3D25.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/contracts/mocks/EtherReceiverMock.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity ^0.8.0;
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/permit2/test/integration/tokens/FeeOnTransferToken.t.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity ^0.8.17;
3 |
4 | import {ERC20} from "solmate/src/tokens/ERC20.sol";
5 | import {MainnetTokenTest} from "../MainnetToken.t.sol";
6 |
7 | contract FeeOnTransferTokenTest is MainnetTokenTest {
8 | function token() internal pure override returns (ERC20) {
9 | return ERC20(0xF5238462E7235c7B62811567E63Dd17d12C2EAA0);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/lib/solmate/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/v3-core/test/shared/format.ts:
--------------------------------------------------------------------------------
1 | import { Decimal } from 'decimal.js'
2 | import { BigNumberish } from 'ethers'
3 |
4 | export function formatTokenAmount(num: BigNumberish): string {
5 | return new Decimal(num.toString()).dividedBy(new Decimal(10).pow(18)).toPrecision(5)
6 | }
7 |
8 | export function formatPrice(price: BigNumberish): string {
9 | return new Decimal(price.toString()).dividedBy(new Decimal(2).pow(96)).pow(2).toPrecision(5)
10 | }
11 |
--------------------------------------------------------------------------------
/lib/v3-periphery/contracts/libraries/ChainId.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-2.0-or-later
2 | pragma solidity >=0.7.0;
3 |
4 | /// @title Function for getting the current chain ID
5 | library ChainId {
6 | /// @dev Gets the current chain ID
7 | /// @return chainId The current chain ID
8 | function get() internal view returns (uint256 chainId) {
9 | assembly {
10 | chainId := chainid()
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/test/mocks/MockPriceFeed.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: UNLICENSED
2 | pragma solidity ^0.8.0;
3 |
4 | /**
5 | * @notice Mock of price feed contract
6 | */
7 | contract MockPriceFeed {
8 | uint256 sqrtPrice;
9 |
10 | function setSqrtPrice(uint256 newSqrtPrice) external {
11 | sqrtPrice = newSqrtPrice;
12 | }
13 |
14 | function getSqrtPrice() external view returns (uint256) {
15 | return sqrtPrice;
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/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/.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/hardhat/env-contract.js:
--------------------------------------------------------------------------------
1 | extendEnvironment(env => {
2 | const { contract } = env;
3 |
4 | env.contract = function (name, body) {
5 | // remove the default account from the accounts list used in tests, in order
6 | // to protect tests against accidentally passing due to the contract
7 | // deployer being used subsequently as function caller
8 | contract(name, accounts => body(accounts.slice(1)));
9 | };
10 | });
11 |
--------------------------------------------------------------------------------
/lib/permit2/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/v3-periphery/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es2018",
4 | "module": "commonjs",
5 | "strict": true,
6 | "esModuleInterop": true,
7 | "resolveJsonModule": true,
8 | "outDir": "dist",
9 | "typeRoots": ["./typechain", "./node_modules/@types"],
10 | "types": ["@nomiclabs/hardhat-ethers", "@nomiclabs/hardhat-waffle"]
11 | },
12 | "include": ["./test"],
13 | "files": ["./hardhat.config.ts"]
14 | }
15 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/certora/harnesses/TimelockControllerHarness.sol:
--------------------------------------------------------------------------------
1 | pragma solidity ^0.8.0;
2 |
3 | import "../patched/governance/TimelockController.sol";
4 |
5 | contract TimelockControllerHarness is TimelockController {
6 | constructor(
7 | uint256 minDelay,
8 | address[] memory proposers,
9 | address[] memory executors,
10 | address admin
11 | ) TimelockController(minDelay, proposers, executors, admin) {}
12 | }
13 |
--------------------------------------------------------------------------------
/lib/permit2/.github/workflows/lint.yml:
--------------------------------------------------------------------------------
1 | name: Lint
2 |
3 | on:
4 | push:
5 | branches:
6 | - main
7 | pull_request:
8 |
9 | jobs:
10 | tests:
11 | runs-on: ubuntu-latest
12 | steps:
13 | - uses: actions/checkout@v3
14 |
15 | - name: Install Foundry
16 | uses: foundry-rs/foundry-toolchain@v1
17 | with:
18 | version: nightly
19 |
20 | - name: Check formatting
21 | run: forge fmt --check
22 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/contracts/mocks/EtherReceiverMock.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity ^0.8.0;
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/v3-core/contracts/libraries/FixedPoint96.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-2.0-or-later
2 | pragma solidity >=0.4.0;
3 |
4 | /// @title FixedPoint96
5 | /// @notice A library for handling binary fixed point numbers, see https://en.wikipedia.org/wiki/Q_(number_format)
6 | /// @dev Used in SqrtPriceMath.sol
7 | library FixedPoint96 {
8 | uint8 internal constant RESOLUTION = 96;
9 | uint256 internal constant Q96 = 0x1000000000000000000000000;
10 | }
11 |
--------------------------------------------------------------------------------
/test/libraries/PairLib.t.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: UNLICENSED
2 | pragma solidity ^0.8.19;
3 |
4 | import "forge-std/Test.sol";
5 | import "../../src/libraries/PairLib.sol";
6 |
7 | contract PairLibTest is Test {
8 | function testGetRebalanceCacheId() public {
9 | uint256 rebalanceCacheId = PairLib.getRebalanceCacheId(18 * 1e18, 18 * 1e18);
10 |
11 | assertEq(rebalanceCacheId, 332041393326771929088000000000000000000);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/lib/permit2/.github/workflows/gas.yml:
--------------------------------------------------------------------------------
1 | name: Gas
2 |
3 | on:
4 | push:
5 | branches:
6 | - main
7 | pull_request:
8 |
9 | jobs:
10 | tests:
11 | runs-on: ubuntu-latest
12 | steps:
13 | - uses: actions/checkout@v3
14 |
15 | - name: Install Foundry
16 | uses: foundry-rs/foundry-toolchain@v1
17 | with:
18 | version: nightly
19 |
20 | - name: Check gas snapshots
21 | run: forge snapshot --check
22 |
--------------------------------------------------------------------------------
/lib/permit2/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/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/permit2/lib/openzeppelin-contracts/.github/workflows/docs.yml:
--------------------------------------------------------------------------------
1 | name: Build Docs
2 |
3 | on:
4 | push:
5 | branches: [release-v*]
6 |
7 | jobs:
8 | build:
9 | runs-on: ubuntu-latest
10 | steps:
11 | - uses: actions/checkout@v3
12 | - name: Set up environment
13 | uses: ./.github/actions/setup
14 | - run: bash scripts/git-user-config.sh
15 | - run: node scripts/update-docs-branch.js
16 | - run: git push --all origin
17 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/hardhat/env-contract.js:
--------------------------------------------------------------------------------
1 | extendEnvironment(env => {
2 | const { contract } = env;
3 |
4 | env.contract = function (name, body) {
5 | // remove the default account from the accounts list used in tests, in order
6 | // to protect tests against accidentally passing due to the contract
7 | // deployer being used subsequently as function caller
8 | contract(name, accounts => body(accounts.slice(1)));
9 | };
10 | });
11 |
--------------------------------------------------------------------------------
/lib/v3-periphery/contracts/libraries/PositionKey.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-2.0-or-later
2 | pragma solidity >=0.5.0;
3 |
4 | library PositionKey {
5 | /// @dev Returns the key of the position in the core library
6 | function compute(
7 | address owner,
8 | int24 tickLower,
9 | int24 tickUpper
10 | ) internal pure returns (bytes32) {
11 | return keccak256(abi.encodePacked(owner, tickLower, tickUpper));
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/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/test/helpers/enums.js:
--------------------------------------------------------------------------------
1 | const { BN } = require('@openzeppelin/test-helpers');
2 |
3 | function Enum(...options) {
4 | return Object.fromEntries(options.map((key, i) => [key, new BN(i)]));
5 | }
6 |
7 | module.exports = {
8 | Enum,
9 | ProposalState: Enum('Pending', 'Active', 'Canceled', 'Defeated', 'Succeeded', 'Queued', 'Expired', 'Executed'),
10 | VoteType: Enum('Against', 'For', 'Abstain'),
11 | Rounding: Enum('Down', 'Up', 'Zero'),
12 | };
13 |
--------------------------------------------------------------------------------
/lib/permit2/test/mocks/MockNonPermitERC20.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity ^0.8.17;
3 |
4 | import {MockERC20} from "solmate/src/test/utils/mocks/MockERC20.sol";
5 |
6 | contract MockNonPermitERC20 is MockERC20 {
7 | constructor(string memory _name, string memory _symbol, uint8 _decimals) MockERC20(_name, _symbol, _decimals) {}
8 |
9 | function DOMAIN_SEPARATOR() public pure override returns (bytes32) {
10 | return 0;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/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/contracts/mocks/PullPaymentMock.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity ^0.8.0;
4 |
5 | import "../security/PullPayment.sol";
6 |
7 | // mock class using PullPayment
8 | contract PullPaymentMock is PullPayment {
9 | constructor() payable {}
10 |
11 | // test helper function to call asyncTransfer
12 | function callTransfer(address dest, uint256 amount) public {
13 | _asyncTransfer(dest, amount);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/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/permit2/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/permit2/lib/openzeppelin-contracts/certora/scripts/GovernorCountingSimple-counting.sh:
--------------------------------------------------------------------------------
1 | make -C certora munged
2 |
3 | certoraRun certora/harnesses/ERC20VotesHarness.sol certora/harnesses/GovernorBasicHarness.sol \
4 | --verify GovernorBasicHarness:certora/specs/GovernorCountingSimple.spec \
5 | --solc solc8.2 \
6 | --staging shelly/forSasha \
7 | --optimistic_loop \
8 | --settings -copyLoopUnroll=4 \
9 | --rule hasVotedCorrelation \
10 | --msg "$1"
11 |
--------------------------------------------------------------------------------
/lib/v3-periphery/contracts/interfaces/external/IWETH9.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-2.0-or-later
2 | pragma solidity =0.8.15;
3 |
4 | import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
5 |
6 | /// @title Interface for WETH9
7 | interface IWETH9 is IERC20 {
8 | /// @notice Deposit ether to get wrapped ether
9 | function deposit() external payable;
10 |
11 | /// @notice Withdraw wrapped ether to get ether
12 | function withdraw(uint256) external;
13 | }
14 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/.solhint.json:
--------------------------------------------------------------------------------
1 | {
2 | "rules": {
3 | "no-unused-vars": "error",
4 | "const-name-snakecase": "error",
5 | "contract-name-camelcase": "error",
6 | "event-name-camelcase": "error",
7 | "func-name-mixedcase": "error",
8 | "func-param-name-mixedcase": "error",
9 | "modifier-name-mixedcase": "error",
10 | "private-vars-leading-underscore": "error",
11 | "var-name-mixedcase": "error",
12 | "imports-on-top": "error"
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/scripts/prepare-contracts-package.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # cd to the root of the repo
4 | cd "$(git rev-parse --show-toplevel)"
5 |
6 | # avoids re-compilation during publishing of both packages
7 | if [[ ! -v ALREADY_COMPILED ]]; then
8 | npm run clean
9 | npm run prepare
10 | npm run prepack
11 | fi
12 |
13 | cp README.md contracts/
14 | mkdir contracts/build contracts/build/contracts
15 | cp -r build/contracts/*.json contracts/build/contracts
16 |
--------------------------------------------------------------------------------
/lib/v3-periphery/test/shared/ticks.ts:
--------------------------------------------------------------------------------
1 | import { BigNumber } from 'ethers'
2 |
3 | export const getMinTick = (tickSpacing: number) => Math.ceil(-887272 / tickSpacing) * tickSpacing
4 | export const getMaxTick = (tickSpacing: number) => Math.floor(887272 / tickSpacing) * tickSpacing
5 | export const getMaxLiquidityPerTick = (tickSpacing: number) =>
6 | BigNumber.from(2)
7 | .pow(128)
8 | .sub(1)
9 | .div((getMaxTick(tickSpacing) - getMinTick(tickSpacing)) / tickSpacing + 1)
10 |
--------------------------------------------------------------------------------
/test/mocks/MockERC20.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: UNLICENSED
2 | pragma solidity ^0.8.0;
3 |
4 | import {ERC20} from "@solmate/src/tokens/ERC20.sol";
5 |
6 | /**
7 | * @notice Mock of ERC20 contract
8 | */
9 | contract MockERC20 is ERC20 {
10 | constructor(string memory _name, string memory _symbol, uint8 _decimals) ERC20(_name, _symbol, _decimals) {}
11 |
12 | function mint(address account, uint256 amount) public {
13 | _mint(account, amount);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/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/contracts/mocks/token/ERC20DecimalsMock.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity ^0.8.0;
4 |
5 | import "../../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/test/utils/escrow/Escrow.test.js:
--------------------------------------------------------------------------------
1 | require('@openzeppelin/test-helpers');
2 | const { shouldBehaveLikeEscrow } = require('./Escrow.behavior');
3 |
4 | const Escrow = artifacts.require('Escrow');
5 |
6 | contract('Escrow', function (accounts) {
7 | const [owner, ...otherAccounts] = accounts;
8 |
9 | beforeEach(async function () {
10 | this.escrow = await Escrow.new({ from: owner });
11 | });
12 |
13 | shouldBehaveLikeEscrow(owner, otherAccounts);
14 | });
15 |
--------------------------------------------------------------------------------
/lib/permit2/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/permit2/lib/openzeppelin-contracts/contracts/mocks/PullPaymentMock.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity ^0.8.0;
4 |
5 | import "../security/PullPayment.sol";
6 |
7 | // mock class using PullPayment
8 | contract PullPaymentMock is PullPayment {
9 | constructor() payable {}
10 |
11 | // test helper function to call asyncTransfer
12 | function callTransfer(address dest, uint256 amount) public {
13 | _asyncTransfer(dest, amount);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/lib/v3-periphery/contracts/test/TestERC20Metadata.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: UNLICENSED
2 | pragma solidity =0.8.15;
3 |
4 | import '@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Permit.sol';
5 |
6 | contract TestERC20Metadata is ERC20Permit {
7 | constructor(
8 | uint256 amountToMint,
9 | string memory name,
10 | string memory symbol
11 | ) ERC20(name, symbol) ERC20Permit(name) {
12 | _mint(msg.sender, amountToMint);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/certora/harnesses/ERC3156FlashBorrowerHarness.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | import "../patched/interfaces/IERC3156FlashBorrower.sol";
4 |
5 | pragma solidity ^0.8.0;
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/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/permit2/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/permit2/test/mocks/MockERC1155.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity ^0.8.17;
3 |
4 | import {ERC1155} from "solmate/src/tokens/ERC1155.sol";
5 |
6 | contract MockERC1155 is ERC1155 {
7 | constructor() ERC1155() {}
8 |
9 | function mint(address to, uint256 id, uint256 amount) public {
10 | _mint(to, id, amount, "");
11 | }
12 |
13 | function uri(uint256) public view virtual override returns (string memory) {
14 | return "";
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/lib/permit2/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/permit2/lib/openzeppelin-contracts/.solhint.json:
--------------------------------------------------------------------------------
1 | {
2 | "rules": {
3 | "no-unused-vars": "error",
4 | "const-name-snakecase": "error",
5 | "contract-name-camelcase": "error",
6 | "event-name-camelcase": "error",
7 | "func-name-mixedcase": "error",
8 | "func-param-name-mixedcase": "error",
9 | "modifier-name-mixedcase": "error",
10 | "private-vars-leading-underscore": "error",
11 | "var-name-mixedcase": "error",
12 | "imports-on-top": "error"
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/certora/scripts/sanity.sh:
--------------------------------------------------------------------------------
1 | make -C certora munged
2 |
3 | for f in certora/harnesses/Wizard*.sol
4 | do
5 | echo "Processing $f"
6 | file=$(basename $f)
7 | echo ${file%.*}
8 | certoraRun certora/harnesses/$file \
9 | --verify ${file%.*}:certora/specs/sanity.spec "$@" \
10 | --solc solc8.2 --staging shelly/forSasha \
11 | --optimistic_loop \
12 | --msg "checking sanity on ${file%.*}"
13 | --settings -copyLoopUnroll=4
14 | done
15 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/scripts/prepare-contracts-package.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # cd to the root of the repo
4 | cd "$(git rev-parse --show-toplevel)"
5 |
6 | # avoids re-compilation during publishing of both packages
7 | if [[ ! -v ALREADY_COMPILED ]]; then
8 | npm run clean
9 | npm run prepare
10 | npm run prepack
11 | fi
12 |
13 | cp README.md contracts/
14 | mkdir contracts/build contracts/build/contracts
15 | cp -r build/contracts/*.json contracts/build/contracts
16 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/test/access/AccessControl.test.js:
--------------------------------------------------------------------------------
1 | const {
2 | shouldBehaveLikeAccessControl,
3 | } = require('./AccessControl.behavior.js');
4 |
5 | const AccessControlMock = artifacts.require('AccessControlMock');
6 |
7 | contract('AccessControl', function (accounts) {
8 | beforeEach(async function () {
9 | this.accessControl = await AccessControlMock.new({ from: accounts[0] });
10 | });
11 |
12 | shouldBehaveLikeAccessControl('AccessControl', ...accounts);
13 | });
14 |
--------------------------------------------------------------------------------
/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@v3
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/contracts/mocks/ERC20Mock.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity ^0.8.0;
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/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/permit2/lib/openzeppelin-contracts/test/utils/escrow/Escrow.test.js:
--------------------------------------------------------------------------------
1 | require('@openzeppelin/test-helpers');
2 | const { shouldBehaveLikeEscrow } = require('./Escrow.behavior');
3 |
4 | const Escrow = artifacts.require('Escrow');
5 |
6 | contract('Escrow', function (accounts) {
7 | const [ owner, ...otherAccounts ] = accounts;
8 |
9 | beforeEach(async function () {
10 | this.escrow = await Escrow.new({ from: owner });
11 | });
12 |
13 | shouldBehaveLikeEscrow(owner, otherAccounts);
14 | });
15 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/contracts/mocks/token/ERC4626OffsetMock.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity ^0.8.0;
4 |
5 | import "../../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/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/v3-periphery/test/__snapshots__/PositionValue.spec.ts.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[`PositionValue #fees when price is above the position range gas 1`] = `50079`;
4 |
5 | exports[`PositionValue #fees when price is below the position range gas 1`] = `50047`;
6 |
7 | exports[`PositionValue #fees when price is within the position range gas 1`] = `55665`;
8 |
9 | exports[`PositionValue #principal gas 1`] = `23808`;
10 |
11 | exports[`PositionValue #total gas 1`] = `63220`;
12 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/certora/diff/token_ERC721_ERC721.sol.patch:
--------------------------------------------------------------------------------
1 | --- token/ERC721/ERC721.sol 2023-03-07 10:48:47.736822221 +0100
2 | +++ token/ERC721/ERC721.sol 2023-03-09 19:49:39.669338673 +0100
3 | @@ -199,6 +199,11 @@
4 | return _owners[tokenId];
5 | }
6 |
7 | + // FV
8 | + function _getApproved(uint256 tokenId) internal view returns (address) {
9 | + return _tokenApprovals[tokenId];
10 | + }
11 | +
12 | /**
13 | * @dev Returns whether `tokenId` exists.
14 | *
15 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/certora/harnesses/PausableHarness.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity ^0.8.0;
4 |
5 | import "../patched/security/Pausable.sol";
6 |
7 | contract PausableHarness is Pausable {
8 | function pause() external {
9 | _pause();
10 | }
11 |
12 | function unpause() external {
13 | _unpause();
14 | }
15 |
16 | function onlyWhenPaused() external whenPaused {}
17 |
18 | function onlyWhenNotPaused() external whenNotPaused {}
19 | }
20 |
--------------------------------------------------------------------------------
/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/permit2/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "lib/forge-std"]
2 | path = lib/forge-std
3 | url = https://github.com/foundry-rs/forge-std
4 | [submodule "lib/solmate"]
5 | path = lib/solmate
6 | url = https://github.com/rari-capital/solmate
7 | [submodule "lib/openzeppelin-contracts"]
8 | path = lib/openzeppelin-contracts
9 | url = https://github.com/OpenZeppelin/openzeppelin-contracts
10 | [submodule "lib/forge-gas-snapshot"]
11 | path = lib/forge-gas-snapshot
12 | url = https://github.com/marktoda/forge-gas-snapshot
13 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/contracts/mocks/ERC20BurnableMock.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity ^0.8.0;
4 |
5 | import "../token/ERC20/extensions/ERC20Burnable.sol";
6 |
7 | contract ERC20BurnableMock is ERC20Burnable {
8 | constructor(
9 | string memory name,
10 | string memory symbol,
11 | address initialAccount,
12 | uint256 initialBalance
13 | ) ERC20(name, symbol) {
14 | _mint(initialAccount, initialBalance);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/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/permit2/src/PermitErrors.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity 0.8.17;
3 |
4 | /// @notice Shared errors between signature based transfers and allowance based transfers.
5 |
6 | /// @notice Thrown when validating an inputted signature that is stale
7 | /// @param signatureDeadline The timestamp at which a signature is no longer valid
8 | error SignatureExpired(uint256 signatureDeadline);
9 |
10 | /// @notice Thrown when validating that the inputted nonce has not been used
11 | error InvalidNonce();
12 |
--------------------------------------------------------------------------------
/lib/permit2/test/mocks/MockERC721.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity ^0.8.17;
3 |
4 | import {ERC721} from "solmate/src/tokens/ERC721.sol";
5 |
6 | contract MockERC721 is ERC721 {
7 | constructor(string memory name, string memory symbol) ERC721(name, symbol) {}
8 |
9 | function mint(address to, uint256 id) public {
10 | _mint(to, id);
11 | }
12 |
13 | function tokenURI(uint256) public view virtual override returns (string memory) {
14 | return "";
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/lib/v3-periphery/contracts/base/BlockTimestamp.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-2.0-or-later
2 | pragma solidity =0.8.15;
3 |
4 | /// @title Function for getting block timestamp
5 | /// @dev Base contract that is overridden for tests
6 | abstract contract BlockTimestamp {
7 | /// @dev Method that exists purely to be overridden for tests
8 | /// @return The current block timestamp
9 | function _blockTimestamp() internal view virtual returns (uint256) {
10 | return block.timestamp;
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/lib/v3-periphery/contracts/test/TestCallbackValidation.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: UNLICENSED
2 | pragma solidity =0.8.15;
3 |
4 | import '../libraries/CallbackValidation.sol';
5 |
6 | contract TestCallbackValidation {
7 | function verifyCallback(
8 | address factory,
9 | address tokenA,
10 | address tokenB,
11 | uint24 fee
12 | ) external view returns (IUniswapV3Pool pool) {
13 | return CallbackValidation.verifyCallback(factory, tokenA, tokenB, fee);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/contracts/mocks/ArraysImpl.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity ^0.8.0;
4 |
5 | import "../utils/Arrays.sol";
6 |
7 | contract ArraysImpl {
8 | using Arrays for uint256[];
9 |
10 | uint256[] private _array;
11 |
12 | constructor(uint256[] memory array) {
13 | _array = array;
14 | }
15 |
16 | function findUpperBound(uint256 element) external view returns (uint256) {
17 | return _array.findUpperBound(element);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/contracts/mocks/ERC20CappedMock.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity ^0.8.0;
4 |
5 | import "../token/ERC20/extensions/ERC20Capped.sol";
6 |
7 | contract ERC20CappedMock is ERC20Capped {
8 | constructor(
9 | string memory name,
10 | string memory symbol,
11 | uint256 cap
12 | ) ERC20(name, symbol) ERC20Capped(cap) {}
13 |
14 | function mint(address to, uint256 tokenId) public {
15 | _mint(to, tokenId);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/lib/v3-core/contracts/interfaces/pool/IUniswapV3PoolErrors.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-2.0-or-later
2 | pragma solidity >=0.5.0;
3 |
4 | /// @title Errors emitted by a pool
5 | /// @notice Contains all events emitted by the pool
6 | interface IUniswapV3PoolErrors {
7 | error LOK();
8 | error TLU();
9 | error TLM();
10 | error TUM();
11 | error AI();
12 | error M0();
13 | error M1();
14 | error AS();
15 | error IIA();
16 | error L();
17 | error F0();
18 | error F1();
19 | }
20 |
--------------------------------------------------------------------------------
/lib/v3-periphery/contracts/interfaces/IPeripheryImmutableState.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: GPL-2.0-or-later
2 | pragma solidity >=0.5.0;
3 |
4 | /// @title Immutable state
5 | /// @notice Functions that return immutable state of the router
6 | interface IPeripheryImmutableState {
7 | /// @return Returns the address of the Uniswap V3 factory
8 | function factory() external view returns (address);
9 |
10 | /// @return Returns the address of WETH9
11 | function WETH9() external view returns (address);
12 | }
13 |
--------------------------------------------------------------------------------
/lib/solmate/src/test/utils/DSInvariantTest.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: AGPL-3.0-only
2 | pragma solidity >=0.8.0;
3 |
4 | contract DSInvariantTest {
5 | address[] private targets;
6 |
7 | function targetContracts() public view virtual returns (address[] memory) {
8 | require(targets.length > 0, "NO_TARGET_CONTRACTS");
9 |
10 | return targets;
11 | }
12 |
13 | function addTargetContract(address newTargetContract) internal virtual {
14 | targets.push(newTargetContract);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/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 | const [proxyAdminOwner] = accounts;
7 |
8 | const createProxy = async function (implementation, _admin, initData, opts) {
9 | return ERC1967Proxy.new(implementation, initData, opts);
10 | };
11 |
12 | shouldBehaveLikeProxy(createProxy, undefined, proxyAdminOwner);
13 | });
14 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/contracts/mocks/ERC1155BurnableMock.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity ^0.8.0;
4 |
5 | import "../token/ERC1155/extensions/ERC1155Burnable.sol";
6 |
7 | contract ERC1155BurnableMock is ERC1155Burnable {
8 | constructor(string memory uri) ERC1155(uri) {}
9 |
10 | function mint(
11 | address to,
12 | uint256 id,
13 | uint256 value,
14 | bytes memory data
15 | ) public {
16 | _mint(to, id, value, data);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/lib/permit2/src/interfaces/IERC1271.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity ^0.8.0;
3 |
4 | interface IERC1271 {
5 | /// @dev Should return whether the signature provided is valid for the provided data
6 | /// @param hash Hash of the data to be signed
7 | /// @param signature Signature byte array associated with _data
8 | /// @return magicValue The bytes4 magic value 0x1626ba7e
9 | function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);
10 | }
11 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/src/interfaces/IHooks.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: UNLICENSED
2 | pragma solidity >=0.7.0;
3 |
4 | import "./IPredyPool.sol";
5 |
6 | interface IHooks {
7 | function predySettlementCallback(
8 | address quoteToken,
9 | address baseToken,
10 | bytes memory settlementData,
11 | int256 baseAmountDelta
12 | ) external;
13 |
14 | function predyTradeAfterCallback(
15 | IPredyPool.TradeParams memory tradeParams,
16 | IPredyPool.TradeResult memory tradeResult
17 | ) external;
18 | }
19 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/1f50d-195C0.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/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/permit2/lib/openzeppelin-contracts/contracts/mocks/SignatureCheckerMock.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity ^0.8.0;
4 |
5 | import "../utils/cryptography/SignatureChecker.sol";
6 |
7 | contract SignatureCheckerMock {
8 | using SignatureChecker for address;
9 |
10 | function isValidSignatureNow(
11 | address signer,
12 | bytes32 hash,
13 | bytes memory signature
14 | ) public view returns (bool) {
15 | return signer.isValidSignatureNow(hash, signature);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/lib/permit2/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 | const [proxyAdminOwner] = accounts;
7 |
8 | const createProxy = async function (implementation, _admin, initData, opts) {
9 | return ERC1967Proxy.new(implementation, initData, opts);
10 | };
11 |
12 | shouldBehaveLikeProxy(createProxy, undefined, proxyAdminOwner);
13 | });
14 |
--------------------------------------------------------------------------------
/lib/permit2/lib/solmate/src/test/utils/DSInvariantTest.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: AGPL-3.0-only
2 | pragma solidity >=0.8.0;
3 |
4 | contract DSInvariantTest {
5 | address[] private targets;
6 |
7 | function targetContracts() public view virtual returns (address[] memory) {
8 | require(targets.length > 0, "NO_TARGET_CONTRACTS");
9 |
10 | return targets;
11 | }
12 |
13 | function addTargetContract(address newTargetContract) internal virtual {
14 | targets.push(newTargetContract);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/lib/permit2/src/libraries/SafeCast160.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity ^0.8.17;
3 |
4 | library SafeCast160 {
5 | /// @notice Thrown when a valude greater than type(uint160).max is cast to uint160
6 | error UnsafeCast();
7 |
8 | /// @notice Safely casts uint256 to uint160
9 | /// @param value The uint256 to be cast
10 | function toUint160(uint256 value) internal pure returns (uint160) {
11 | if (value > type(uint160).max) revert UnsafeCast();
12 | return uint160(value);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/lib/solmate/src/test/utils/mocks/MockAuthority.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: AGPL-3.0-only
2 | pragma solidity >=0.8.0;
3 |
4 | import {Authority} from "../../../auth/Auth.sol";
5 |
6 | contract MockAuthority is Authority {
7 | bool immutable allowCalls;
8 |
9 | constructor(bool _allowCalls) {
10 | allowCalls = _allowCalls;
11 | }
12 |
13 | function canCall(
14 | address,
15 | address,
16 | bytes4
17 | ) public view override returns (bool) {
18 | return allowCalls;
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/lib/v3-periphery/contracts/test/Base64Test.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: UNLICENSED
2 | pragma solidity =0.8.15;
3 |
4 | import 'base64-sol/base64.sol';
5 |
6 | contract Base64Test {
7 | function encode(bytes memory data) external pure returns (string memory) {
8 | return Base64.encode(data);
9 | }
10 |
11 | function getGasCostOfEncode(bytes memory data) external view returns (uint256) {
12 | uint256 gasBefore = gasleft();
13 | Base64.encode(data);
14 | return gasBefore - gasleft();
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/lib/permit2/test/integration/tokens/USDT.t.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity ^0.8.17;
3 |
4 | import {SafeTransferLib} from "solmate/src/utils/SafeTransferLib.sol";
5 | import {ERC20} from "solmate/src/tokens/ERC20.sol";
6 | import {MainnetTokenTest} from "../MainnetToken.t.sol";
7 |
8 | contract USDTTest is MainnetTokenTest {
9 | using SafeTransferLib for ERC20;
10 |
11 | function token() internal pure override returns (ERC20) {
12 | return ERC20(0xdAC17F958D2ee523a2206206994597C13D831ec7);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/lib/permit2/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/.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: 14.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 | env:
19 | SKIP_COMPILE: true
20 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/contracts/mocks/ERC4626Mock.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | pragma solidity ^0.8.0;
3 |
4 | import "../token/ERC20/extensions/ERC4626.sol";
5 |
6 | contract ERC4626Mock is ERC4626 {
7 | constructor(address underlying) ERC20("ERC4626Mock", "E4626M") ERC4626(IERC20(underlying)) {}
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/permit2/lib/openzeppelin-contracts/contracts/mocks/AccessControlMock.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity ^0.8.0;
4 |
5 | import "../access/AccessControl.sol";
6 |
7 | contract AccessControlMock is AccessControl {
8 | constructor() {
9 | _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());
10 | }
11 |
12 | function setRoleAdmin(bytes32 roleId, bytes32 adminRoleId) public {
13 | _setRoleAdmin(roleId, adminRoleId);
14 | }
15 |
16 | function senderProtected(bytes32 roleId) public onlyRole(roleId) {}
17 | }
18 |
--------------------------------------------------------------------------------
/lib/permit2/lib/solmate/src/test/utils/mocks/MockAuthority.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: AGPL-3.0-only
2 | pragma solidity >=0.8.0;
3 |
4 | import {Authority} from "../../../auth/Auth.sol";
5 |
6 | contract MockAuthority is Authority {
7 | bool immutable allowCalls;
8 |
9 | constructor(bool _allowCalls) {
10 | allowCalls = _allowCalls;
11 | }
12 |
13 | function canCall(
14 | address,
15 | address,
16 | bytes4
17 | ) public view override returns (bool) {
18 | return allowCalls;
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/test/lens/Setup.t.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: UNLICENSED
2 | pragma solidity ^0.8.0;
3 |
4 | import {IPermit2} from "@uniswap/permit2/src/interfaces/IPermit2.sol";
5 | import "../../src/lens/PredyPoolQuoter.sol";
6 | import "../pool/Setup.t.sol";
7 |
8 | contract TestLens is TestPool {
9 | function setUp() public virtual override(TestPool) {
10 | TestPool.setUp();
11 |
12 | registerPair(address(currency1), address(0));
13 |
14 | predyPool.supply(1, true, 1e10);
15 | predyPool.supply(1, false, 1e10);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/discord-export/Code4rena - ARCHIVE-Q2-2024 - predy-may24 [1242872233345679501].html_Files/2705-0589F.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/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('AccessControl', ...accounts);
12 | });
13 |
--------------------------------------------------------------------------------
/lib/v3-periphery/test/shared/encodePriceSqrt.ts:
--------------------------------------------------------------------------------
1 | import bn from 'bignumber.js'
2 | import { BigNumber, BigNumberish } from 'ethers'
3 |
4 | bn.config({ EXPONENTIAL_AT: 999999, DECIMAL_PLACES: 40 })
5 |
6 | // returns the sqrt price as a 64x96
7 | export function encodePriceSqrt(reserve1: BigNumberish, reserve0: BigNumberish): BigNumber {
8 | return BigNumber.from(
9 | new bn(reserve1.toString())
10 | .div(reserve0.toString())
11 | .sqrt()
12 | .multipliedBy(new bn(2).pow(96))
13 | .integerValue(3)
14 | .toString()
15 | )
16 | }
17 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 | // OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol)
3 |
4 | pragma solidity ^0.8.0;
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 | * {BeaconProxy} will check that this address is a contract.
14 | */
15 | function implementation() external view returns (address);
16 | }
17 |
--------------------------------------------------------------------------------
/lib/permit2/lib/openzeppelin-contracts/contracts/mocks/ERC20WrapperMock.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity ^0.8.0;
4 |
5 | import "../token/ERC20/extensions/ERC20Wrapper.sol";
6 |
7 | contract ERC20WrapperMock is ERC20Wrapper {
8 | constructor(
9 | IERC20 _underlyingToken,
10 | string memory name,
11 | string memory symbol
12 | ) ERC20(name, symbol) ERC20Wrapper(_underlyingToken) {}
13 |
14 | function recover(address account) public returns (uint256) {
15 | return _recover(account);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/lib/v3-periphery/contracts/test/MockTimeSwapRouter.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: UNLICENSED
2 | pragma solidity =0.8.15;
3 | pragma abicoder v2;
4 |
5 | import '../SwapRouter.sol';
6 |
7 | contract MockTimeSwapRouter is SwapRouter {
8 | uint256 time;
9 |
10 | constructor(address _factory, address _WETH9) SwapRouter(_factory, _WETH9) {}
11 |
12 | function _blockTimestamp() internal view override returns (uint256) {
13 | return time;
14 | }
15 |
16 | function setTime(uint256 _time) external {
17 | time = _time;
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/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('ERC721', ...accounts);
14 | shouldBehaveLikeERC721Metadata('ERC721', name, symbol, ...accounts);
15 | });
16 |
--------------------------------------------------------------------------------
/lib/v3-core/contracts/test/UnsafeMathEchidnaTest.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: UNLICENSED
2 | pragma solidity =0.8.12;
3 |
4 | import {UnsafeMath} from '../libraries/UnsafeMath.sol';
5 |
6 | contract UnsafeMathEchidnaTest {
7 | function checkDivRoundingUp(uint256 x, uint256 d) external pure {
8 | require(d > 0);
9 | uint256 z = UnsafeMath.divRoundingUp(x, d);
10 | uint256 diff = z - (x / d);
11 | if (x % d == 0) {
12 | assert(diff == 0);
13 | } else {
14 | assert(diff == 1);
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/lib/openzeppelin-contracts/contracts/mocks/ERC165/ERC165ReturnBomb.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity ^0.8.0;
4 |
5 | import "../../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/permit2/lib/openzeppelin-contracts/scripts/prepare-docs.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -o errexit
4 |
5 | OUTDIR=docs/modules/api/pages/
6 |
7 | if [ ! -d node_modules ]; then
8 | npm ci
9 | fi
10 |
11 | rm -rf "$OUTDIR"
12 |
13 | solidity-docgen \
14 | -t docs \
15 | -o "$OUTDIR" \
16 | -e contracts/mocks,contracts/examples \
17 | --output-structure readmes \
18 | --helpers ./docs/helpers.js \
19 | --solc-module ./scripts/prepare-docs-solc.js
20 |
21 | rm -f "$OUTDIR"/token/*/presets.md
22 |
23 | node scripts/gen-nav.js "$OUTDIR" > "$OUTDIR/../nav.adoc"
24 |
--------------------------------------------------------------------------------
/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/contracts/mocks/token/ERC721URIStorageMock.sol:
--------------------------------------------------------------------------------
1 | // SPDX-License-Identifier: MIT
2 |
3 | pragma solidity ^0.8.0;
4 |
5 | import "../../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 |
--------------------------------------------------------------------------------