├── subgraphs-on-morph └── Goldsky-subgraph │ ├── src │ └── utils.ts │ ├── .gitignore │ └── package.json ├── cross-chain-examples └── layerzero-guide │ ├── .nvmrc │ ├── deployments │ ├── morph-holesky │ │ └── .chainId │ └── sepolia-testnet │ │ └── .chainId │ ├── solhint.config.js │ ├── .prettierrc.js │ ├── .eslintignore │ ├── .prettierignore │ ├── .gitignore │ ├── tsconfig.json │ ├── test │ └── mocks │ │ └── ERC20Mock.sol │ ├── .eslintrc.js │ └── contracts │ ├── MyOFT.sol │ └── mocks │ └── MyOFTMock.sol ├── templates └── nextjs_wagmi_template │ ├── .eslintrc.json │ ├── postcss.config.js │ ├── public │ ├── favicon.ico │ └── vercel.svg │ ├── next.config.mjs │ ├── src │ ├── pages │ │ ├── _document.tsx │ │ ├── api │ │ │ └── hello.ts │ │ └── _app.tsx │ ├── wagmiConfig.ts │ └── components │ │ ├── WalletOptions.tsx │ │ └── Account.tsx │ ├── .gitignore │ ├── tsconfig.json │ └── tailwind.config.ts ├── nfts-on-morph └── fractional_nft_guide │ ├── contract │ ├── lib │ │ └── forge-std │ │ │ ├── .gitattributes │ │ │ ├── .gitignore │ │ │ ├── test │ │ │ ├── fixtures │ │ │ │ ├── test.toml │ │ │ │ └── test.json │ │ │ ├── compilation │ │ │ │ ├── CompilationTest.sol │ │ │ │ ├── CompilationScript.sol │ │ │ │ ├── CompilationTestBase.sol │ │ │ │ └── CompilationScriptBase.sol │ │ │ └── Vm.t.sol │ │ │ ├── package.json │ │ │ └── src │ │ │ └── interfaces │ │ │ └── IERC165.sol │ ├── remappings.txt │ ├── .gitmodules │ ├── foundry.toml │ ├── .gitignore │ └── src │ │ └── OkidoToken.sol │ ├── frontend │ ├── .eslintrc.json │ ├── public │ │ ├── pex.png │ │ ├── morphLogo.png │ │ └── vercel.svg │ ├── screenshot.png │ ├── src │ │ ├── app │ │ │ └── favicon.ico │ │ ├── constants │ │ │ └── index.ts │ │ ├── components │ │ │ └── ThemeProvider.tsx │ │ └── lib │ │ │ └── utils.ts │ ├── postcss.config.mjs │ ├── components.json │ ├── next.config.mjs │ └── .gitignore │ ├── yarn.lock │ └── .gitmodules ├── yarn.lock ├── oracles-on-morph └── prediction-market-guide │ ├── contracts │ ├── foundry │ │ ├── lib │ │ │ ├── openzeppelin-contracts │ │ │ │ ├── certora │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── specs │ │ │ │ │ │ ├── methods │ │ │ │ │ │ │ ├── IERC5313.spec │ │ │ │ │ │ │ ├── IERC721Receiver.spec │ │ │ │ │ │ │ ├── IERC3156FlashBorrower.spec │ │ │ │ │ │ │ ├── IOwnable.spec │ │ │ │ │ │ │ ├── IAccessManaged.spec │ │ │ │ │ │ │ ├── IERC2612.spec │ │ │ │ │ │ │ ├── IERC3156FlashLender.spec │ │ │ │ │ │ │ ├── IOwnable2Step.spec │ │ │ │ │ │ │ └── IAccessControl.spec │ │ │ │ │ │ └── helpers │ │ │ │ │ │ │ └── helpers.spec │ │ │ │ │ ├── reports │ │ │ │ │ │ ├── 2021-10.pdf │ │ │ │ │ │ ├── 2022-03.pdf │ │ │ │ │ │ └── 2022-05.pdf │ │ │ │ │ └── harnesses │ │ │ │ │ │ ├── AccessControlHarness.sol │ │ │ │ │ │ ├── OwnableHarness.sol │ │ │ │ │ │ ├── Ownable2StepHarness.sol │ │ │ │ │ │ ├── ERC721ReceiverHarness.sol │ │ │ │ │ │ ├── NoncesHarness.sol │ │ │ │ │ │ ├── PausableHarness.sol │ │ │ │ │ │ ├── ERC3156FlashBorrowerHarness.sol │ │ │ │ │ │ ├── TimelockControllerHarness.sol │ │ │ │ │ │ └── ERC20PermitHarness.sol │ │ │ │ ├── remappings.txt │ │ │ │ ├── netlify.toml │ │ │ │ ├── .mocharc.js │ │ │ │ ├── renovate.json │ │ │ │ ├── hardhat │ │ │ │ │ ├── async-test-sanity.js │ │ │ │ │ ├── skip-foundry-tests.js │ │ │ │ │ └── remappings.js │ │ │ │ ├── test │ │ │ │ │ ├── helpers │ │ │ │ │ │ ├── constants.js │ │ │ │ │ │ ├── strings.js │ │ │ │ │ │ ├── methods.js │ │ │ │ │ │ ├── account.js │ │ │ │ │ │ ├── deploy.js │ │ │ │ │ │ └── enums.js │ │ │ │ │ ├── TESTING.md │ │ │ │ │ └── utils │ │ │ │ │ │ ├── Nonces.test.js │ │ │ │ │ │ ├── introspection │ │ │ │ │ │ └── ERC165.test.js │ │ │ │ │ │ ├── NoncesKeyed.test.js │ │ │ │ │ │ ├── cryptography │ │ │ │ │ │ └── RSA.helper.js │ │ │ │ │ │ └── Context.test.js │ │ │ │ ├── scripts │ │ │ │ │ ├── generate │ │ │ │ │ │ ├── templates │ │ │ │ │ │ │ ├── Arrays.opts.js │ │ │ │ │ │ │ ├── Packing.opts.js │ │ │ │ │ │ │ ├── EnumerableSet.opts.js │ │ │ │ │ │ │ ├── MerkleProof.opts.js │ │ │ │ │ │ │ ├── Checkpoints.opts.js │ │ │ │ │ │ │ └── EnumerableMap.opts.js │ │ │ │ │ │ ├── helpers │ │ │ │ │ │ │ └── sanitize.js │ │ │ │ │ │ └── format-lines.js │ │ │ │ │ ├── checks │ │ │ │ │ │ ├── generation.sh │ │ │ │ │ │ └── coverage.sh │ │ │ │ │ ├── solhint-custom │ │ │ │ │ │ └── package.json │ │ │ │ │ ├── prepare.sh │ │ │ │ │ ├── helpers.js │ │ │ │ │ ├── release │ │ │ │ │ │ ├── workflow │ │ │ │ │ │ │ ├── exit-prerelease.sh │ │ │ │ │ │ │ ├── rerun.js │ │ │ │ │ │ │ └── integrity-check.sh │ │ │ │ │ │ ├── version.sh │ │ │ │ │ │ └── synchronize-versions.js │ │ │ │ │ ├── git-user-config.sh │ │ │ │ │ ├── upgradeable │ │ │ │ │ │ ├── patch-save.sh │ │ │ │ │ │ └── patch-apply.sh │ │ │ │ │ └── prepack.sh │ │ │ │ ├── FUNDING.json │ │ │ │ ├── .changeset │ │ │ │ │ ├── hot-shrimps-wait.md │ │ │ │ │ ├── proud-planes-arrive.md │ │ │ │ │ ├── small-seahorses-bathe.md │ │ │ │ │ ├── tricky-bats-pretend.md │ │ │ │ │ ├── great-lions-hear.md │ │ │ │ │ ├── lovely-dodos-lay.md │ │ │ │ │ ├── healthy-books-shout.md │ │ │ │ │ ├── seven-donkeys-tap.md │ │ │ │ │ ├── weak-roses-bathe.md │ │ │ │ │ ├── pink-wasps-hammer.md │ │ │ │ │ ├── eighty-hounds-promise.md │ │ │ │ │ ├── config.json │ │ │ │ │ └── four-chairs-help.md │ │ │ │ ├── contracts │ │ │ │ │ ├── mocks │ │ │ │ │ │ ├── ERC165 │ │ │ │ │ │ │ ├── ERC165NotSupported.sol │ │ │ │ │ │ │ ├── ERC165MissingData.sol │ │ │ │ │ │ │ ├── ERC165MaliciousData.sol │ │ │ │ │ │ │ └── ERC165ReturnBomb.sol │ │ │ │ │ │ ├── token │ │ │ │ │ │ │ ├── ERC20ExcessDecimalsMock.sol │ │ │ │ │ │ │ ├── ERC20MulticallMock.sol │ │ │ │ │ │ │ ├── ERC20ApprovalMock.sol │ │ │ │ │ │ │ ├── ERC20DecimalsMock.sol │ │ │ │ │ │ │ ├── ERC20Mock.sol │ │ │ │ │ │ │ ├── ERC4626OffsetMock.sol │ │ │ │ │ │ │ ├── ERC721URIStorageMock.sol │ │ │ │ │ │ │ ├── ERC20ForceApproveMock.sol │ │ │ │ │ │ │ ├── ERC20ReturnFalseMock.sol │ │ │ │ │ │ │ └── ERC4626Mock.sol │ │ │ │ │ │ ├── proxy │ │ │ │ │ │ │ └── BadBeacon.sol │ │ │ │ │ │ ├── ReentrancyAttack.sol │ │ │ │ │ │ ├── EtherReceiverMock.sol │ │ │ │ │ │ └── Base64Dirty.sol │ │ │ │ │ ├── interfaces │ │ │ │ │ │ ├── IERC20.sol │ │ │ │ │ │ ├── IERC721.sol │ │ │ │ │ │ ├── IERC1155.sol │ │ │ │ │ │ ├── IERC165.sol │ │ │ │ │ │ ├── IERC721Receiver.sol │ │ │ │ │ │ ├── IERC1155Receiver.sol │ │ │ │ │ │ ├── IERC20Metadata.sol │ │ │ │ │ │ ├── IERC721Metadata.sol │ │ │ │ │ │ ├── IERC721Enumerable.sol │ │ │ │ │ │ ├── IERC1155MetadataURI.sol │ │ │ │ │ │ ├── IERC2612.sol │ │ │ │ │ │ ├── IERC3156.sol │ │ │ │ │ │ ├── IERC5805.sol │ │ │ │ │ │ ├── IERC5313.sol │ │ │ │ │ │ ├── IERC6372.sol │ │ │ │ │ │ └── IERC2309.sol │ │ │ │ │ ├── account │ │ │ │ │ │ └── README.adoc │ │ │ │ │ ├── token │ │ │ │ │ │ └── common │ │ │ │ │ │ │ └── README.adoc │ │ │ │ │ ├── finance │ │ │ │ │ │ └── README.adoc │ │ │ │ │ ├── utils │ │ │ │ │ │ └── Comparators.sol │ │ │ │ │ ├── proxy │ │ │ │ │ │ └── beacon │ │ │ │ │ │ │ └── IBeacon.sol │ │ │ │ │ └── access │ │ │ │ │ │ └── manager │ │ │ │ │ │ └── IAuthority.sol │ │ │ │ ├── .githooks │ │ │ │ │ └── pre-push │ │ │ │ ├── audits │ │ │ │ │ ├── 2018-10.pdf │ │ │ │ │ ├── 2023-05-v4.9.pdf │ │ │ │ │ ├── 2023-10-v5.0.pdf │ │ │ │ │ ├── 2024-10-v5.1.pdf │ │ │ │ │ ├── 2022-10-ERC4626.pdf │ │ │ │ │ └── 2022-10-Checkpoints.pdf │ │ │ │ ├── .github │ │ │ │ │ ├── ISSUE_TEMPLATE │ │ │ │ │ │ ├── config.yml │ │ │ │ │ │ └── feature_request.md │ │ │ │ │ └── workflows │ │ │ │ │ │ ├── docs.yml │ │ │ │ │ │ └── actionlint.yml │ │ │ │ ├── fv-requirements.txt │ │ │ │ ├── foundry.toml │ │ │ │ ├── .codecov.yml │ │ │ │ ├── .prettierrc │ │ │ │ ├── .gitmodules │ │ │ │ ├── .editorconfig │ │ │ │ └── .solcover.js │ │ │ ├── forge-std │ │ │ │ ├── .gitattributes │ │ │ │ ├── .gitignore │ │ │ │ ├── test │ │ │ │ │ ├── fixtures │ │ │ │ │ │ ├── test.toml │ │ │ │ │ │ └── test.json │ │ │ │ │ └── compilation │ │ │ │ │ │ ├── CompilationTest.sol │ │ │ │ │ │ ├── CompilationScript.sol │ │ │ │ │ │ ├── CompilationTestBase.sol │ │ │ │ │ │ └── CompilationScriptBase.sol │ │ │ │ ├── src │ │ │ │ │ ├── console2.sol │ │ │ │ │ └── interfaces │ │ │ │ │ │ └── IERC165.sol │ │ │ │ └── package.json │ │ │ └── pyth-sdk-solidity │ │ │ │ ├── .github │ │ │ │ └── workflows │ │ │ │ │ ├── check-formatting.yml │ │ │ │ │ ├── build.yml │ │ │ │ │ └── publish.yml │ │ │ │ └── .pre-commit-config.yaml │ │ ├── src │ │ │ └── Token.sol │ │ └── foundry.toml │ ├── hardhat │ │ ├── tsconfig.json │ │ ├── scripts │ │ │ └── deploy.ts │ │ ├── contracts │ │ │ └── Greeter.sol │ │ └── hardhat.config.ts │ └── .gitignore │ └── frontend │ ├── .eslintrc.json │ ├── next.config.mjs │ ├── src │ ├── app │ │ ├── favicon.ico │ │ └── page.tsx │ └── constants │ │ └── index.ts │ ├── postcss.config.mjs │ ├── .gitignore │ ├── tailwind.config.ts │ └── public │ └── vercel.svg ├── account-abstraction-on-morph └── Paymaster example with biconomy │ └── biconomy-aa-demo │ ├── contracts │ ├── foundry │ │ ├── lib │ │ │ ├── forge-std │ │ │ │ ├── .gitattributes │ │ │ │ ├── test │ │ │ │ │ ├── fixtures │ │ │ │ │ │ ├── test.toml │ │ │ │ │ │ └── test.json │ │ │ │ │ └── compilation │ │ │ │ │ │ ├── CompilationTest.sol │ │ │ │ │ │ ├── CompilationScript.sol │ │ │ │ │ │ ├── CompilationTestBase.sol │ │ │ │ │ │ └── CompilationScriptBase.sol │ │ │ │ ├── src │ │ │ │ │ ├── console2.sol │ │ │ │ │ └── interfaces │ │ │ │ │ │ └── IERC165.sol │ │ │ │ └── package.json │ │ │ └── openzeppelin-contracts │ │ │ │ ├── remappings.txt │ │ │ │ ├── lib │ │ │ │ ├── forge-std │ │ │ │ │ ├── .gitattributes │ │ │ │ │ ├── test │ │ │ │ │ │ ├── fixtures │ │ │ │ │ │ │ ├── test.toml │ │ │ │ │ │ │ └── test.json │ │ │ │ │ │ └── compilation │ │ │ │ │ │ │ ├── CompilationTest.sol │ │ │ │ │ │ │ ├── CompilationScript.sol │ │ │ │ │ │ │ ├── CompilationTestBase.sol │ │ │ │ │ │ │ └── CompilationScriptBase.sol │ │ │ │ │ ├── src │ │ │ │ │ │ ├── console2.sol │ │ │ │ │ │ └── interfaces │ │ │ │ │ │ │ └── IERC165.sol │ │ │ │ │ └── package.json │ │ │ │ └── halmos-cheatcodes │ │ │ │ │ └── src │ │ │ │ │ └── SymTest.sol │ │ │ │ ├── netlify.toml │ │ │ │ ├── .mocharc.js │ │ │ │ ├── renovate.json │ │ │ │ ├── certora │ │ │ │ ├── specs │ │ │ │ │ └── methods │ │ │ │ │ │ ├── IERC5313.spec │ │ │ │ │ │ ├── IERC721Receiver.spec │ │ │ │ │ │ ├── IERC3156FlashBorrower.spec │ │ │ │ │ │ ├── IOwnable.spec │ │ │ │ │ │ ├── IAccessManaged.spec │ │ │ │ │ │ ├── IERC2612.spec │ │ │ │ │ │ ├── IOwnable2Step.spec │ │ │ │ │ │ ├── IERC3156FlashLender.spec │ │ │ │ │ │ └── IAccessControl.spec │ │ │ │ ├── reports │ │ │ │ │ ├── 2021-10.pdf │ │ │ │ │ ├── 2022-03.pdf │ │ │ │ │ └── 2022-05.pdf │ │ │ │ └── harnesses │ │ │ │ │ ├── AccessControlHarness.sol │ │ │ │ │ ├── OwnableHarness.sol │ │ │ │ │ ├── Ownable2StepHarness.sol │ │ │ │ │ ├── ERC721ReceiverHarness.sol │ │ │ │ │ ├── NoncesHarness.sol │ │ │ │ │ ├── PausableHarness.sol │ │ │ │ │ ├── ERC3156FlashBorrowerHarness.sol │ │ │ │ │ ├── TimelockControllerHarness.sol │ │ │ │ │ └── ERC20PermitHarness.sol │ │ │ │ ├── hardhat │ │ │ │ ├── async-test-sanity.js │ │ │ │ ├── skip-foundry-tests.js │ │ │ │ └── remappings.js │ │ │ │ ├── test │ │ │ │ ├── helpers │ │ │ │ │ ├── constants.js │ │ │ │ │ ├── strings.js │ │ │ │ │ ├── methods.js │ │ │ │ │ ├── account.js │ │ │ │ │ ├── deploy.js │ │ │ │ │ └── enums.js │ │ │ │ ├── TESTING.md │ │ │ │ └── utils │ │ │ │ │ ├── Nonces.test.js │ │ │ │ │ ├── introspection │ │ │ │ │ └── ERC165.test.js │ │ │ │ │ └── NoncesKeyed.test.js │ │ │ │ ├── scripts │ │ │ │ ├── checks │ │ │ │ │ ├── generation.sh │ │ │ │ │ └── coverage.sh │ │ │ │ ├── generate │ │ │ │ │ ├── templates │ │ │ │ │ │ ├── Arrays.opts.js │ │ │ │ │ │ ├── Packing.opts.js │ │ │ │ │ │ ├── EnumerableSet.opts.js │ │ │ │ │ │ ├── MerkleProof.opts.js │ │ │ │ │ │ └── Checkpoints.opts.js │ │ │ │ │ ├── helpers │ │ │ │ │ │ └── sanitize.js │ │ │ │ │ └── format-lines.js │ │ │ │ ├── solhint-custom │ │ │ │ │ └── package.json │ │ │ │ ├── prepare.sh │ │ │ │ ├── helpers.js │ │ │ │ ├── git-user-config.sh │ │ │ │ ├── release │ │ │ │ │ ├── workflow │ │ │ │ │ │ ├── exit-prerelease.sh │ │ │ │ │ │ ├── rerun.js │ │ │ │ │ │ └── integrity-check.sh │ │ │ │ │ ├── version.sh │ │ │ │ │ └── synchronize-versions.js │ │ │ │ ├── upgradeable │ │ │ │ │ ├── patch-save.sh │ │ │ │ │ └── patch-apply.sh │ │ │ │ └── prepack.sh │ │ │ │ ├── .changeset │ │ │ │ ├── hot-shrimps-wait.md │ │ │ │ ├── proud-planes-arrive.md │ │ │ │ ├── great-lions-hear.md │ │ │ │ ├── small-seahorses-bathe.md │ │ │ │ ├── tricky-bats-pretend.md │ │ │ │ ├── lovely-dodos-lay.md │ │ │ │ ├── healthy-books-shout.md │ │ │ │ ├── seven-donkeys-tap.md │ │ │ │ ├── weak-roses-bathe.md │ │ │ │ ├── pink-wasps-hammer.md │ │ │ │ ├── eighty-hounds-promise.md │ │ │ │ ├── config.json │ │ │ │ └── four-chairs-help.md │ │ │ │ ├── FUNDING.json │ │ │ │ ├── contracts │ │ │ │ ├── mocks │ │ │ │ │ ├── ERC165 │ │ │ │ │ │ ├── ERC165NotSupported.sol │ │ │ │ │ │ ├── ERC165MissingData.sol │ │ │ │ │ │ ├── ERC165MaliciousData.sol │ │ │ │ │ │ └── ERC165ReturnBomb.sol │ │ │ │ │ ├── token │ │ │ │ │ │ ├── ERC20ExcessDecimalsMock.sol │ │ │ │ │ │ ├── ERC20MulticallMock.sol │ │ │ │ │ │ ├── ERC20ApprovalMock.sol │ │ │ │ │ │ ├── ERC20DecimalsMock.sol │ │ │ │ │ │ ├── ERC20Mock.sol │ │ │ │ │ │ ├── ERC4626OffsetMock.sol │ │ │ │ │ │ ├── ERC721URIStorageMock.sol │ │ │ │ │ │ ├── ERC20ForceApproveMock.sol │ │ │ │ │ │ └── ERC20ReturnFalseMock.sol │ │ │ │ │ ├── proxy │ │ │ │ │ │ └── BadBeacon.sol │ │ │ │ │ ├── ReentrancyAttack.sol │ │ │ │ │ ├── EtherReceiverMock.sol │ │ │ │ │ └── Base64Dirty.sol │ │ │ │ ├── interfaces │ │ │ │ │ ├── IERC20.sol │ │ │ │ │ ├── IERC721.sol │ │ │ │ │ ├── IERC1155.sol │ │ │ │ │ ├── IERC165.sol │ │ │ │ │ ├── IERC721Receiver.sol │ │ │ │ │ ├── IERC1155Receiver.sol │ │ │ │ │ ├── IERC20Metadata.sol │ │ │ │ │ ├── IERC721Metadata.sol │ │ │ │ │ ├── IERC721Enumerable.sol │ │ │ │ │ ├── IERC1155MetadataURI.sol │ │ │ │ │ ├── IERC2612.sol │ │ │ │ │ ├── IERC3156.sol │ │ │ │ │ ├── IERC5805.sol │ │ │ │ │ ├── IERC5313.sol │ │ │ │ │ └── IERC6372.sol │ │ │ │ ├── account │ │ │ │ │ └── README.adoc │ │ │ │ ├── token │ │ │ │ │ └── common │ │ │ │ │ │ └── README.adoc │ │ │ │ ├── finance │ │ │ │ │ └── README.adoc │ │ │ │ ├── utils │ │ │ │ │ └── Comparators.sol │ │ │ │ ├── proxy │ │ │ │ │ └── beacon │ │ │ │ │ │ └── IBeacon.sol │ │ │ │ └── access │ │ │ │ │ └── manager │ │ │ │ │ └── IAuthority.sol │ │ │ │ ├── .githooks │ │ │ │ └── pre-push │ │ │ │ ├── .github │ │ │ │ ├── ISSUE_TEMPLATE │ │ │ │ │ ├── config.yml │ │ │ │ │ └── feature_request.md │ │ │ │ └── workflows │ │ │ │ │ ├── docs.yml │ │ │ │ │ └── actionlint.yml │ │ │ │ ├── audits │ │ │ │ ├── 2018-10.pdf │ │ │ │ ├── 2023-05-v4.9.pdf │ │ │ │ ├── 2023-10-v5.0.pdf │ │ │ │ ├── 2024-10-v5.1.pdf │ │ │ │ ├── 2022-10-ERC4626.pdf │ │ │ │ └── 2022-10-Checkpoints.pdf │ │ │ │ ├── fv-requirements.txt │ │ │ │ ├── foundry.toml │ │ │ │ ├── .prettierrc │ │ │ │ ├── .codecov.yml │ │ │ │ ├── .editorconfig │ │ │ │ └── .solcover.js │ │ ├── foundry.toml │ │ ├── src │ │ │ └── Counter.sol │ │ └── script │ │ │ └── Counter.s.sol │ ├── hardhat │ │ ├── .env.example │ │ ├── tsconfig.json │ │ ├── README.md │ │ ├── scripts │ │ │ └── deploy.ts │ │ ├── contracts │ │ │ └── Greeter.sol │ │ ├── package.json │ │ └── hardhat.config.ts │ └── .gitignore │ └── frontend │ ├── .eslintrc.json │ ├── src │ ├── components │ │ └── ConnectButton.tsx │ ├── constants │ │ ├── index.ts │ │ └── abi.ts │ └── app │ │ ├── favicon.ico │ │ ├── fonts │ │ ├── GeistVF.woff │ │ └── GeistMonoVF.woff │ │ └── globals.css │ ├── next.config.mjs │ ├── public │ ├── vercel.svg │ ├── file.svg │ └── window.svg │ ├── postcss.config.mjs │ ├── .gitignore │ └── tailwind.config.ts ├── contract-deployment-examples └── hardhat-example │ ├── .env.example │ ├── .gitignore │ └── tsconfig.json └── .gitignore /subgraphs-on-morph/Goldsky-subgraph/src/utils.ts: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /cross-chain-examples/layerzero-guide/.nvmrc: -------------------------------------------------------------------------------- 1 | v18.18.0 -------------------------------------------------------------------------------- /cross-chain-examples/layerzero-guide/deployments/morph-holesky/.chainId: -------------------------------------------------------------------------------- 1 | 2810 -------------------------------------------------------------------------------- /cross-chain-examples/layerzero-guide/deployments/sepolia-testnet/.chainId: -------------------------------------------------------------------------------- 1 | 11155111 -------------------------------------------------------------------------------- /templates/nextjs_wagmi_template/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /nfts-on-morph/fractional_nft_guide/contract/lib/forge-std/.gitattributes: -------------------------------------------------------------------------------- 1 | src/Vm.sol linguist-generated 2 | -------------------------------------------------------------------------------- /nfts-on-morph/fractional_nft_guide/contract/lib/forge-std/.gitignore: -------------------------------------------------------------------------------- 1 | cache/ 2 | out/ 3 | .vscode 4 | .idea 5 | -------------------------------------------------------------------------------- /nfts-on-morph/fractional_nft_guide/frontend/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /subgraphs-on-morph/Goldsky-subgraph/.gitignore: -------------------------------------------------------------------------------- 1 | # dependencies 2 | /node_modules 3 | /generated 4 | /build 5 | -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | -------------------------------------------------------------------------------- /cross-chain-examples/layerzero-guide/solhint.config.js: -------------------------------------------------------------------------------- 1 | module.exports = require('@layerzerolabs/solhint-config'); 2 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/certora/.gitignore: -------------------------------------------------------------------------------- 1 | patched 2 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/frontend/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /nfts-on-morph/fractional_nft_guide/contract/remappings.txt: -------------------------------------------------------------------------------- 1 | @openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/ -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/forge-std/.gitattributes: -------------------------------------------------------------------------------- 1 | src/Vm.sol linguist-generated 2 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/forge-std/.gitignore: -------------------------------------------------------------------------------- 1 | cache/ 2 | out/ 3 | .vscode 4 | .idea 5 | -------------------------------------------------------------------------------- /cross-chain-examples/layerzero-guide/.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | ...require('@layerzerolabs/prettier-config-next'), 3 | }; 4 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/remappings.txt: -------------------------------------------------------------------------------- 1 | @openzeppelin/contracts/=contracts/ 2 | -------------------------------------------------------------------------------- /nfts-on-morph/fractional_nft_guide/contract/lib/forge-std/test/fixtures/test.toml: -------------------------------------------------------------------------------- 1 | a = 123 2 | b = "test" 3 | 4 | [c] 5 | a = 123 6 | b = "test" 7 | -------------------------------------------------------------------------------- /nfts-on-morph/fractional_nft_guide/yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/forge-std/.gitattributes: -------------------------------------------------------------------------------- 1 | src/Vm.sol linguist-generated 2 | -------------------------------------------------------------------------------- /templates/nextjs_wagmi_template/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/forge-std/test/fixtures/test.toml: -------------------------------------------------------------------------------- 1 | a = 123 2 | b = "test" 3 | 4 | [c] 5 | a = 123 6 | b = "test" 7 | -------------------------------------------------------------------------------- /templates/nextjs_wagmi_template/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morph-l2/morph-examples/HEAD/templates/nextjs_wagmi_template/public/favicon.ico -------------------------------------------------------------------------------- /nfts-on-morph/fractional_nft_guide/contract/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "lib/forge-std"] 2 | path = lib/forge-std 3 | url = https://github.com/foundry-rs/forge-std 4 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/netlify.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | command = "npm run docs" 3 | publish = "build/site" 4 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/frontend/next.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = {}; 3 | 4 | export default nextConfig; 5 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/remappings.txt: -------------------------------------------------------------------------------- 1 | @openzeppelin/contracts/=contracts/ 2 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/frontend/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["next/core-web-vitals", "next/typescript"] 3 | } 4 | -------------------------------------------------------------------------------- /cross-chain-examples/layerzero-guide/.eslintignore: -------------------------------------------------------------------------------- 1 | artifacts 2 | cache 3 | dist 4 | node_modules 5 | out 6 | *.log 7 | *.sol 8 | *.yaml 9 | *.lock 10 | package-lock.json -------------------------------------------------------------------------------- /nfts-on-morph/fractional_nft_guide/frontend/public/pex.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morph-l2/morph-examples/HEAD/nfts-on-morph/fractional_nft_guide/frontend/public/pex.png -------------------------------------------------------------------------------- /nfts-on-morph/fractional_nft_guide/frontend/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morph-l2/morph-examples/HEAD/nfts-on-morph/fractional_nft_guide/frontend/screenshot.png -------------------------------------------------------------------------------- /nfts-on-morph/fractional_nft_guide/contract/lib/forge-std/test/fixtures/test.json: -------------------------------------------------------------------------------- 1 | { 2 | "a": 123, 3 | "b": "test", 4 | "c": { 5 | "a": 123, 6 | "b": "test" 7 | } 8 | } -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/.mocharc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | require: 'hardhat/register', 3 | timeout: 4000, 4 | }; 5 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/lib/forge-std/.gitattributes: -------------------------------------------------------------------------------- 1 | src/Vm.sol linguist-generated 2 | -------------------------------------------------------------------------------- /contract-deployment-examples/hardhat-example/.env.example: -------------------------------------------------------------------------------- 1 | PRIVATE_KEY=0xabc123abc123abc123abc123abc123abc123abc123abc123abc123abc123abc1 2 | MORPH_TESTNET_URL=https://rpc-holesky.morphl2.io -------------------------------------------------------------------------------- /cross-chain-examples/layerzero-guide/.prettierignore: -------------------------------------------------------------------------------- 1 | artifacts/ 2 | cache/ 3 | dist/ 4 | node_modules/ 5 | out/ 6 | *.log 7 | *ignore 8 | *.yaml 9 | *.lock 10 | package-lock.json -------------------------------------------------------------------------------- /nfts-on-morph/fractional_nft_guide/frontend/public/morphLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morph-l2/morph-examples/HEAD/nfts-on-morph/fractional_nft_guide/frontend/public/morphLogo.png -------------------------------------------------------------------------------- /nfts-on-morph/fractional_nft_guide/frontend/src/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morph-l2/morph-examples/HEAD/nfts-on-morph/fractional_nft_guide/frontend/src/app/favicon.ico -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/hardhat/.env.example: -------------------------------------------------------------------------------- 1 | PRIVATE_KEY=your-private-key 2 | RPC_URL=https://rpc-quicknode-holesky.morphl2.io -------------------------------------------------------------------------------- /templates/nextjs_wagmi_template/next.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = { 3 | reactStrictMode: true, 4 | }; 5 | 6 | export default nextConfig; 7 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/forge-std/test/fixtures/test.json: -------------------------------------------------------------------------------- 1 | { 2 | "a": 123, 3 | "b": "test", 4 | "c": { 5 | "a": 123, 6 | "b": "test" 7 | } 8 | } -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["github>OpenZeppelin/configs"], 3 | "labels": ["ignore-changeset"] 4 | } 5 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/frontend/src/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morph-l2/morph-examples/HEAD/oracles-on-morph/prediction-market-guide/frontend/src/app/favicon.ico -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/forge-std/test/fixtures/test.toml: -------------------------------------------------------------------------------- 1 | a = 123 2 | b = "test" 3 | 4 | [c] 5 | a = 123 6 | b = "test" 7 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/netlify.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | command = "npm run docs" 3 | publish = "build/site" 4 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/frontend/src/components/ConnectButton.tsx: -------------------------------------------------------------------------------- 1 | export default function ConnectButton() { 2 | return ; 3 | } 4 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/certora/specs/methods/IERC5313.spec: -------------------------------------------------------------------------------- 1 | methods { 2 | function owner() external returns (address) envfree; 3 | } 4 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/hardhat/async-test-sanity.js: -------------------------------------------------------------------------------- 1 | process.on('unhandledRejection', reason => { 2 | throw new Error(reason); 3 | }); 4 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/frontend/next.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = {}; 3 | 4 | export default nextConfig; 5 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/test/helpers/constants.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | MAX_UINT48: 2n ** 48n - 1n, 3 | MAX_UINT64: 2n ** 64n - 1n, 4 | }; 5 | -------------------------------------------------------------------------------- /nfts-on-morph/fractional_nft_guide/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "contract/lib/openzeppelin-contracts"] 2 | path = contract/lib/openzeppelin-contracts 3 | url = https://github.com/OpenZeppelin/openzeppelin-contracts 4 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/scripts/generate/templates/Arrays.opts.js: -------------------------------------------------------------------------------- 1 | const TYPES = ['address', 'bytes32', 'uint256']; 2 | 3 | module.exports = { TYPES }; 4 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/.mocharc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | require: 'hardhat/register', 3 | timeout: 4000, 4 | }; 5 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/forge-std/src/console2.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.4.22 <0.9.0; 3 | 4 | import {console as console2} from "./console.sol"; 5 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/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 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/scripts/generate/templates/Packing.opts.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | SIZES: [1, 2, 4, 6, 8, 10, 12, 16, 20, 22, 24, 28, 32], 3 | }; 4 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/lib/forge-std/test/fixtures/test.toml: -------------------------------------------------------------------------------- 1 | a = 123 2 | b = "test" 3 | 4 | [c] 5 | a = 123 6 | b = "test" 7 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/scripts/solhint-custom/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "solhint-plugin-openzeppelin", 3 | "version": "0.0.0", 4 | "private": true 5 | } 6 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/frontend/public/vercel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nfts-on-morph/fractional_nft_guide/frontend/postcss.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('postcss-load-config').Config} */ 2 | const config = { 3 | plugins: { 4 | tailwindcss: {}, 5 | }, 6 | }; 7 | 8 | export default config; 9 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/FUNDING.json: -------------------------------------------------------------------------------- 1 | { 2 | "drips": { 3 | "ethereum": { 4 | "ownedBy": "0xAeb37910f93486C85A1F8F994b67E8187554d664" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/forge-std/test/fixtures/test.json: -------------------------------------------------------------------------------- 1 | { 2 | "a": 123, 3 | "b": "test", 4 | "c": { 5 | "a": 123, 6 | "b": "test" 7 | } 8 | } -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["github>OpenZeppelin/configs"], 3 | "labels": ["ignore-changeset"] 4 | } 5 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/.changeset/hot-shrimps-wait.md: -------------------------------------------------------------------------------- 1 | --- 2 | 'openzeppelin-solidity': minor 3 | --- 4 | 5 | `Packing`: Add variants for packing `bytes10` and `bytes22` 6 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/scripts/prepare.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | if git status &>/dev/null; then git config core.hooksPath .githooks; fi 6 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/frontend/postcss.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('postcss-load-config').Config} */ 2 | const config = { 3 | plugins: { 4 | tailwindcss: {}, 5 | }, 6 | }; 7 | 8 | export default config; 9 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/certora/specs/methods/IERC5313.spec: -------------------------------------------------------------------------------- 1 | methods { 2 | function owner() external returns (address) envfree; 3 | } 4 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/hardhat/async-test-sanity.js: -------------------------------------------------------------------------------- 1 | process.on('unhandledRejection', reason => { 2 | throw new Error(reason); 3 | }); 4 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/certora/specs/methods/IERC721Receiver.spec: -------------------------------------------------------------------------------- 1 | methods { 2 | function _.onERC721Received(address,address,uint256,bytes) external => DISPATCHER(true); 3 | } 4 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/contracts/mocks/ERC165/ERC165NotSupported.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | contract ERC165NotSupported {} 6 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/test/helpers/constants.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | MAX_UINT48: 2n ** 48n - 1n, 3 | MAX_UINT64: 2n ** 64n - 1n, 4 | }; 5 | -------------------------------------------------------------------------------- /nfts-on-morph/fractional_nft_guide/contract/foundry.toml: -------------------------------------------------------------------------------- 1 | [profile.default] 2 | src = "src" 3 | out = "out" 4 | libs = ["lib"] 5 | 6 | # See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options 7 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/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 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/scripts/generate/templates/Arrays.opts.js: -------------------------------------------------------------------------------- 1 | const TYPES = ['address', 'bytes32', 'uint256']; 2 | 3 | module.exports = { TYPES }; 4 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/scripts/generate/templates/Packing.opts.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | SIZES: [1, 2, 4, 6, 8, 10, 12, 16, 20, 22, 24, 28, 32], 3 | }; 4 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/.changeset/proud-planes-arrive.md: -------------------------------------------------------------------------------- 1 | --- 2 | 'openzeppelin-solidity': minor 3 | --- 4 | 5 | `Bytes`: Add a library of common operation that operate on `bytes` objects. 6 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/certora/specs/methods/IERC3156FlashBorrower.spec: -------------------------------------------------------------------------------- 1 | methods { 2 | function _.onFlashLoan(address,address,uint256,uint256,bytes) external => DISPATCHER(true); 3 | } 4 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/forge-std/src/console2.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.4.22 <0.9.0; 3 | 4 | import {console as console2} from "./console.sol"; 5 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/lib/forge-std/test/fixtures/test.json: -------------------------------------------------------------------------------- 1 | { 2 | "a": 123, 3 | "b": "test", 4 | "c": { 5 | "a": 123, 6 | "b": "test" 7 | } 8 | } -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/scripts/solhint-custom/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "solhint-plugin-openzeppelin", 3 | "version": "0.0.0", 4 | "private": true 5 | } 6 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/frontend/src/constants/index.ts: -------------------------------------------------------------------------------- 1 | import { abi } from "./abi"; 2 | 3 | const counterAddress = "0x2e9d0Ea599f8AD7E26BC25Beb6aa5f7340Fe190e"; 4 | 5 | export { counterAddress, abi }; 6 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/.changeset/small-seahorses-bathe.md: -------------------------------------------------------------------------------- 1 | --- 2 | 'openzeppelin-solidity': minor 3 | --- 4 | 5 | `ERC7579Utils`: Add a reusable library to interact with ERC-7579 modular accounts 6 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/.changeset/tricky-bats-pretend.md: -------------------------------------------------------------------------------- 1 | --- 2 | 'openzeppelin-solidity': minor 3 | --- 4 | 5 | `ERC1363Utils`: Add helper similar to the existing `ERC721Utils` and `ERC1155Utils` 6 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/.githooks/pre-push: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | if [ "${CI:-"false"}" != "true" ]; then 6 | npm run test:generation 7 | npm run lint 8 | fi 9 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/.changeset/great-lions-hear.md: -------------------------------------------------------------------------------- 1 | --- 2 | 'openzeppelin-solidity': patch 3 | --- 4 | 5 | `VotesExtended`: Create an extension of `Votes` which checkpoints balances and delegates. 6 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/audits/2018-10.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morph-l2/morph-examples/HEAD/oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/audits/2018-10.pdf -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/.changeset/hot-shrimps-wait.md: -------------------------------------------------------------------------------- 1 | --- 2 | 'openzeppelin-solidity': minor 3 | --- 4 | 5 | `Packing`: Add variants for packing `bytes10` and `bytes22` 6 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/FUNDING.json: -------------------------------------------------------------------------------- 1 | { 2 | "drips": { 3 | "ethereum": { 4 | "ownedBy": "0xAeb37910f93486C85A1F8F994b67E8187554d664" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/scripts/prepare.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | if git status &>/dev/null; then git config core.hooksPath .githooks; fi 6 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/frontend/postcss.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('postcss-load-config').Config} */ 2 | const config = { 3 | plugins: { 4 | tailwindcss: {}, 5 | }, 6 | }; 7 | 8 | export default config; 9 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/frontend/src/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morph-l2/morph-examples/HEAD/account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/frontend/src/app/favicon.ico -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/.changeset/lovely-dodos-lay.md: -------------------------------------------------------------------------------- 1 | --- 2 | 'openzeppelin-solidity': minor 3 | --- 4 | 5 | `NoncesKeyed`: Add a variant of `Nonces` that implements the ERC-4337 entrypoint nonce system. 6 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/contracts/mocks/ERC165/ERC165NotSupported.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | contract ERC165NotSupported {} 6 | -------------------------------------------------------------------------------- /contract-deployment-examples/hardhat-example/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .env 3 | 4 | # Hardhat files 5 | /cache 6 | /artifacts 7 | 8 | # TypeChain files 9 | /typechain 10 | /typechain-types 11 | 12 | # solidity-coverage files 13 | /coverage 14 | /coverage.json 15 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/.changeset/healthy-books-shout.md: -------------------------------------------------------------------------------- 1 | --- 2 | 'openzeppelin-solidity': minor 3 | --- 4 | 5 | `CAIP2` and `CAIP10`: Add libraries for formatting and parsing CAIP-2 and CAIP-10 identifiers. 6 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/audits/2023-05-v4.9.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morph-l2/morph-examples/HEAD/oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/audits/2023-05-v4.9.pdf -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/audits/2023-10-v5.0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morph-l2/morph-examples/HEAD/oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/audits/2023-10-v5.0.pdf -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/audits/2024-10-v5.1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morph-l2/morph-examples/HEAD/oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/audits/2024-10-v5.1.pdf -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/certora/specs/methods/IERC721Receiver.spec: -------------------------------------------------------------------------------- 1 | methods { 2 | function _.onERC721Received(address,address,uint256,bytes) external => DISPATCHER(true); 3 | } 4 | -------------------------------------------------------------------------------- /nfts-on-morph/fractional_nft_guide/contract/.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 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/.changeset/seven-donkeys-tap.md: -------------------------------------------------------------------------------- 1 | --- 2 | 'openzeppelin-solidity': patch 3 | --- 4 | 5 | Update some pragma directives to ensure that all file requirements match that of the files they import. 6 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/.changeset/weak-roses-bathe.md: -------------------------------------------------------------------------------- 1 | --- 2 | 'openzeppelin-solidity': minor 3 | --- 4 | 5 | `ERC4337Utils`: Add a reusable library to manipulate user operations and interact with ERC-4337 contracts 6 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/audits/2022-10-ERC4626.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morph-l2/morph-examples/HEAD/oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/audits/2022-10-ERC4626.pdf -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/lib/forge-std/src/console2.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.4.22 <0.9.0; 3 | 4 | import {console as console2} from "./console.sol"; 5 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/frontend/src/app/fonts/GeistVF.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morph-l2/morph-examples/HEAD/account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/frontend/src/app/fonts/GeistVF.woff -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/certora/reports/2021-10.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morph-l2/morph-examples/HEAD/oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/certora/reports/2021-10.pdf -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/certora/reports/2022-03.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morph-l2/morph-examples/HEAD/oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/certora/reports/2022-03.pdf -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/certora/reports/2022-05.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morph-l2/morph-examples/HEAD/oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/certora/reports/2022-05.pdf -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/scripts/helpers.js: -------------------------------------------------------------------------------- 1 | const iterate = require('../test/helpers/iterate'); 2 | const strings = require('../test/helpers/strings'); 3 | 4 | module.exports = { 5 | ...iterate, 6 | ...strings, 7 | }; 8 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/.changeset/proud-planes-arrive.md: -------------------------------------------------------------------------------- 1 | --- 2 | 'openzeppelin-solidity': minor 3 | --- 4 | 5 | `Bytes`: Add a library of common operation that operate on `bytes` objects. 6 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/certora/specs/methods/IERC3156FlashBorrower.spec: -------------------------------------------------------------------------------- 1 | methods { 2 | function _.onFlashLoan(address,address,uint256,uint256,bytes) external => DISPATCHER(true); 3 | } 4 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/frontend/src/app/fonts/GeistMonoVF.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morph-l2/morph-examples/HEAD/account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/frontend/src/app/fonts/GeistMonoVF.woff -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/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 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/audits/2022-10-Checkpoints.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morph-l2/morph-examples/HEAD/oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/audits/2022-10-Checkpoints.pdf -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/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 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/.githooks/pre-push: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | if [ "${CI:-"false"}" != "true" ]; then 6 | npm run test:generation 7 | npm run lint 8 | fi 9 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/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 | -------------------------------------------------------------------------------- /subgraphs-on-morph/Goldsky-subgraph/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "goldsky-1", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "license": "MIT", 6 | "dependencies": { 7 | "@graphprotocol/graph-cli": "^0.78.0", 8 | "@graphprotocol/graph-ts": "^0.35.1" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/.changeset/great-lions-hear.md: -------------------------------------------------------------------------------- 1 | --- 2 | 'openzeppelin-solidity': patch 3 | --- 4 | 5 | `VotesExtended`: Create an extension of `Votes` which checkpoints balances and delegates. 6 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/.changeset/small-seahorses-bathe.md: -------------------------------------------------------------------------------- 1 | --- 2 | 'openzeppelin-solidity': minor 3 | --- 4 | 5 | `ERC7579Utils`: Add a reusable library to interact with ERC-7579 modular accounts 6 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/.changeset/tricky-bats-pretend.md: -------------------------------------------------------------------------------- 1 | --- 2 | 'openzeppelin-solidity': minor 3 | --- 4 | 5 | `ERC1363Utils`: Add helper similar to the existing `ERC721Utils` and `ERC1155Utils` 6 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/certora/specs/methods/IOwnable.spec: -------------------------------------------------------------------------------- 1 | methods { 2 | function owner() external returns (address) envfree; 3 | function transferOwnership(address) external; 4 | function renounceOwnership() external; 5 | } 6 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/.changeset/lovely-dodos-lay.md: -------------------------------------------------------------------------------- 1 | --- 2 | 'openzeppelin-solidity': minor 3 | --- 4 | 5 | `NoncesKeyed`: Add a variant of `Nonces` that implements the ERC-4337 entrypoint nonce system. 6 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/.changeset/pink-wasps-hammer.md: -------------------------------------------------------------------------------- 1 | --- 2 | 'openzeppelin-solidity': patch 3 | --- 4 | 5 | `GovernorCountingOverridable`: Add a governor counting module that enables token holders to override the vote of their delegate. 6 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/test/helpers/strings.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // Capitalize the first char of a string 3 | // Example: capitalize('uint256') → 'Uint256' 4 | capitalize: str => str.charAt(0).toUpperCase() + str.slice(1), 5 | }; 6 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/.changeset/healthy-books-shout.md: -------------------------------------------------------------------------------- 1 | --- 2 | 'openzeppelin-solidity': minor 3 | --- 4 | 5 | `CAIP2` and `CAIP10`: Add libraries for formatting and parsing CAIP-2 and CAIP-10 identifiers. 6 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/.changeset/seven-donkeys-tap.md: -------------------------------------------------------------------------------- 1 | --- 2 | 'openzeppelin-solidity': patch 3 | --- 4 | 5 | Update some pragma directives to ensure that all file requirements match that of the files they import. 6 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/.changeset/weak-roses-bathe.md: -------------------------------------------------------------------------------- 1 | --- 2 | 'openzeppelin-solidity': minor 3 | --- 4 | 5 | `ERC4337Utils`: Add a reusable library to manipulate user operations and interact with ERC-4337 contracts 6 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC20} from "../token/ERC20/IERC20.sol"; 7 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/scripts/helpers.js: -------------------------------------------------------------------------------- 1 | const iterate = require('../test/helpers/iterate'); 2 | const strings = require('../test/helpers/strings'); 3 | 4 | module.exports = { 5 | ...iterate, 6 | ...strings, 7 | }; 8 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/certora/harnesses/AccessControlHarness.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | import {AccessControl} from "../patched/access/AccessControl.sol"; 5 | 6 | contract AccessControlHarness is AccessControl {} 7 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/contracts/interfaces/IERC721.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC721.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC721} from "../token/ERC721/IERC721.sol"; 7 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/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 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/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 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/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 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/contracts/interfaces/IERC1155.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC1155.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC1155} from "../token/ERC1155/IERC1155.sol"; 7 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/contracts/mocks/ERC165/ERC165MissingData.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | contract ERC165MissingData { 6 | function supportsInterface(bytes4 interfaceId) public view {} // missing return 7 | } 8 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/scripts/generate/helpers/sanitize.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | address: expr => `and(${expr}, shr(96, not(0)))`, 3 | bool: expr => `iszero(iszero(${expr}))`, 4 | bytes: (expr, size) => `and(${expr}, shl(${256 - 8 * size}, not(0)))`, 5 | }; 6 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/contracts/interfaces/IERC165.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC165} from "../utils/introspection/IERC165.sol"; 7 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/fv-requirements.txt: -------------------------------------------------------------------------------- 1 | certora-cli==4.13.1 2 | # File uses a custom name (fv-requirements.txt) so that it isn't picked by Netlify's build 3 | # whose latest Python version is 0.3.8, incompatible with most recent versions of Halmos 4 | halmos==0.2.0 5 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/.changeset/pink-wasps-hammer.md: -------------------------------------------------------------------------------- 1 | --- 2 | 'openzeppelin-solidity': patch 3 | --- 4 | 5 | `GovernorCountingOverridable`: Add a governor counting module that enables token holders to override the vote of their delegate. 6 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/audits/2018-10.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morph-l2/morph-examples/HEAD/account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/audits/2018-10.pdf -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/certora/specs/methods/IOwnable.spec: -------------------------------------------------------------------------------- 1 | methods { 2 | function owner() external returns (address) envfree; 3 | function transferOwnership(address) external; 4 | function renounceOwnership() external; 5 | } 6 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/test/helpers/strings.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | // Capitalize the first char of a string 3 | // Example: capitalize('uint256') → 'Uint256' 4 | capitalize: str => str.charAt(0).toUpperCase() + str.slice(1), 5 | }; 6 | -------------------------------------------------------------------------------- /contract-deployment-examples/hardhat-example/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2020", 4 | "module": "commonjs", 5 | "esModuleInterop": true, 6 | "forceConsistentCasingInFileNames": true, 7 | "strict": true, 8 | "skipLibCheck": true, 9 | "resolveJsonModule": true 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/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 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .env 3 | 4 | # Hardhat files 5 | contract-deploy-demo/cache 6 | /artifacts 7 | 8 | # TypeChain files 9 | /typechain 10 | /typechain-types 11 | 12 | # Foundry Files 13 | /contract-deployment-demos/foundry-demo/broadcast 14 | 15 | # solidity-coverage files 16 | /coverage 17 | /coverage.json 18 | 19 | .DS_Store -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/audits/2023-05-v4.9.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morph-l2/morph-examples/HEAD/account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/audits/2023-05-v4.9.pdf -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/audits/2023-10-v5.0.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morph-l2/morph-examples/HEAD/account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/audits/2023-10-v5.0.pdf -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/audits/2024-10-v5.1.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morph-l2/morph-examples/HEAD/account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/audits/2024-10-v5.1.pdf -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/audits/2022-10-ERC4626.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morph-l2/morph-examples/HEAD/account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/audits/2022-10-ERC4626.pdf -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/certora/specs/methods/IAccessManaged.spec: -------------------------------------------------------------------------------- 1 | methods { 2 | function authority() external returns (address) envfree; 3 | function isConsumingScheduledOp() external returns (bytes4) envfree; 4 | function setAuthority(address) external; 5 | } 6 | -------------------------------------------------------------------------------- /templates/nextjs_wagmi_template/src/pages/_document.tsx: -------------------------------------------------------------------------------- 1 | import { Html, Head, Main, NextScript } from "next/document"; 2 | 3 | export default function Document() { 4 | return ( 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/certora/reports/2021-10.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morph-l2/morph-examples/HEAD/account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/certora/reports/2021-10.pdf -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/certora/reports/2022-03.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morph-l2/morph-examples/HEAD/account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/certora/reports/2022-03.pdf -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/certora/reports/2022-05.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morph-l2/morph-examples/HEAD/account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/certora/reports/2022-05.pdf -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC20} from "../token/ERC20/IERC20.sol"; 7 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/contracts/interfaces/IERC721Receiver.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC721Receiver.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC721Receiver} from "../token/ERC721/IERC721Receiver.sol"; 7 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/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 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/audits/2022-10-Checkpoints.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/morph-l2/morph-examples/HEAD/account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/audits/2022-10-Checkpoints.pdf -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/certora/harnesses/AccessControlHarness.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | import {AccessControl} from "../patched/access/AccessControl.sol"; 5 | 6 | contract AccessControlHarness is AccessControl {} 7 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/contracts/interfaces/IERC721.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC721.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC721} from "../token/ERC721/IERC721.sol"; 7 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/contracts/interfaces/IERC1155Receiver.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC1155Receiver.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC1155Receiver} from "../token/ERC1155/IERC1155Receiver.sol"; 7 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/contracts/interfaces/IERC20Metadata.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20Metadata.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC20Metadata} from "../token/ERC20/extensions/IERC20Metadata.sol"; 7 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/contracts/interfaces/IERC1155.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC1155.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC1155} from "../token/ERC1155/IERC1155.sol"; 7 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/contracts/interfaces/IERC165.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC165} from "../utils/introspection/IERC165.sol"; 7 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/contracts/mocks/ERC165/ERC165MissingData.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | contract ERC165MissingData { 6 | function supportsInterface(bytes4 interfaceId) public view {} // missing return 7 | } 8 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/fv-requirements.txt: -------------------------------------------------------------------------------- 1 | certora-cli==4.13.1 2 | # File uses a custom name (fv-requirements.txt) so that it isn't picked by Netlify's build 3 | # whose latest Python version is 0.3.8, incompatible with most recent versions of Halmos 4 | halmos==0.2.0 5 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/scripts/generate/helpers/sanitize.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | address: expr => `and(${expr}, shr(96, not(0)))`, 3 | bool: expr => `iszero(iszero(${expr}))`, 4 | bytes: (expr, size) => `and(${expr}, shl(${256 - 8 * size}, not(0)))`, 5 | }; 6 | -------------------------------------------------------------------------------- /nfts-on-morph/fractional_nft_guide/contract/src/OkidoToken.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.19; 3 | 4 | import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; 5 | 6 | contract OkidoToken is ERC20 { 7 | constructor(uint256 initialSupply) ERC20("Okido Token", "OKD") { 8 | _mint(msg.sender, initialSupply); 9 | } 10 | } -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/contracts/interfaces/IERC721Metadata.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC721Metadata.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC721Metadata} from "../token/ERC721/extensions/IERC721Metadata.sol"; 7 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/contracts/mocks/token/ERC20ExcessDecimalsMock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | contract ERC20ExcessDecimalsMock { 6 | function decimals() public pure returns (uint256) { 7 | return type(uint256).max; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/certora/specs/methods/IERC2612.spec: -------------------------------------------------------------------------------- 1 | methods { 2 | function permit(address,address,uint256,uint256,uint8,bytes32,bytes32) external; 3 | function nonces(address) external returns (uint256) envfree; 4 | function DOMAIN_SEPARATOR() external returns (bytes32) envfree; 5 | } 6 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/contracts/interfaces/IERC721Enumerable.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC721Enumerable.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC721Enumerable} from "../token/ERC721/extensions/IERC721Enumerable.sol"; 7 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/frontend/src/constants/index.ts: -------------------------------------------------------------------------------- 1 | import { tokenAbi } from "./tokenAbi"; 2 | import { marketAbi } from "./marketAbi"; 3 | 4 | const marketAddress = "0x13Bb352291D54Fa92714C2603d6ff25aa1cc3581"; 5 | const tokenAddress = "0xcC613F491e736C26d7485906891D2b4335CF04EC"; 6 | 7 | export { tokenAbi, marketAbi, marketAddress, tokenAddress }; 8 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/src/Token.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.19; 3 | 4 | import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; 5 | 6 | contract OkidoToken is ERC20 { 7 | constructor(uint256 initialSupply) ERC20("Okido Token", "OKD") { 8 | _mint(msg.sender, initialSupply); 9 | } 10 | } -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/frontend/.gitignore: -------------------------------------------------------------------------------- 1 | # dependencies 2 | node_modules 3 | /.pnp 4 | .pnp.js 5 | .env 6 | .yarn/install-state.gz 7 | 8 | 9 | # testing 10 | /coverage 11 | 12 | # next.js 13 | /.next/ 14 | /out/ 15 | 16 | # production 17 | /build 18 | 19 | # typescript 20 | *.tsbuildinfo 21 | next-env.d.ts 22 | 23 | # vercel 24 | .vercel 25 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/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 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/contracts/interfaces/IERC1155MetadataURI.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC1155MetadataURI.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC1155MetadataURI} from "../token/ERC1155/extensions/IERC1155MetadataURI.sol"; 7 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/contracts/mocks/token/ERC20MulticallMock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | import {ERC20} from "../../token/ERC20/ERC20.sol"; 6 | import {Multicall} from "../../utils/Multicall.sol"; 7 | 8 | abstract contract ERC20MulticallMock is ERC20, Multicall {} 9 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/foundry.toml: -------------------------------------------------------------------------------- 1 | [profile.default] 2 | src = "src" 3 | out = "out" 4 | libs = ["lib"] 5 | remappings = [ 6 | "@openzeppelin/=lib/openzeppelin-contracts/", 7 | ] 8 | 9 | # See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options 10 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/certora/specs/methods/IAccessManaged.spec: -------------------------------------------------------------------------------- 1 | methods { 2 | function authority() external returns (address) envfree; 3 | function isConsumingScheduledOp() external returns (bytes4) envfree; 4 | function setAuthority(address) external; 5 | } 6 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/foundry.toml: -------------------------------------------------------------------------------- 1 | [profile.default] 2 | src = "src" 3 | out = "out" 4 | libs = ["lib"] 5 | remappings = [ 6 | "@openzeppelin/=lib/openzeppelin-contracts/", 7 | "forge-std/=lib/forge-std/src/", 8 | "@pythnetwork/=lib/pyth-sdk-solidity/" 9 | ] 10 | 11 | [rpc_endpoints] 12 | morphHolesky = "${MORPH_HOLESKY_RPC_URL}" -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/contracts/interfaces/IERC721Receiver.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC721Receiver.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC721Receiver} from "../token/ERC721/IERC721Receiver.sol"; 7 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/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 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/hardhat/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2020", 4 | "module": "commonjs", 5 | "esModuleInterop": true, 6 | "forceConsistentCasingInFileNames": true, 7 | "strict": true, 8 | "skipLibCheck": true, 9 | "resolveJsonModule": true 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/contracts/interfaces/IERC2612.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC2612.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC20Permit} from "../token/ERC20/extensions/IERC20Permit.sol"; 7 | 8 | interface IERC2612 is IERC20Permit {} 9 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/contracts/mocks/proxy/BadBeacon.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | contract BadBeaconNoImpl {} 6 | 7 | contract BadBeaconNotContract { 8 | function implementation() external pure returns (address) { 9 | return address(0x1); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/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 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/contracts/interfaces/IERC1155Receiver.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC1155Receiver.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC1155Receiver} from "../token/ERC1155/IERC1155Receiver.sol"; 7 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/contracts/interfaces/IERC20Metadata.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20Metadata.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC20Metadata} from "../token/ERC20/extensions/IERC20Metadata.sol"; 7 | -------------------------------------------------------------------------------- /nfts-on-morph/fractional_nft_guide/frontend/src/constants/index.ts: -------------------------------------------------------------------------------- 1 | import { OkidoTokenAbi } from "./okidoTokenAbi"; 2 | import { okidoFinanceAbi } from "./okidoFinanceAbi"; 3 | 4 | const okidoToken = "0x950f614d104F5cb02a509e51a03Ad1639Eb7162E"; 5 | const okidoFinance = "0x4FB7F8d4c64AA44704AF885827d0379b773c55c6"; 6 | 7 | export { OkidoTokenAbi, okidoFinanceAbi, okidoToken, okidoFinance }; 8 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/contracts/interfaces/IERC721Metadata.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC721Metadata.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC721Metadata} from "../token/ERC721/extensions/IERC721Metadata.sol"; 7 | -------------------------------------------------------------------------------- /cross-chain-examples/layerzero-guide/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .env 3 | coverage 4 | coverage.json 5 | typechain 6 | typechain-types 7 | 8 | # Hardhat files 9 | cache 10 | artifacts 11 | 12 | 13 | # LayerZero specific files 14 | .layerzero 15 | 16 | # foundry test compilation files 17 | out 18 | 19 | # pnpm 20 | pnpm-error.log 21 | 22 | # Editor and OS files 23 | .DS_Store 24 | .idea 25 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/frontend/src/app/page.tsx: -------------------------------------------------------------------------------- 1 | import Markets from "@/components/Markets"; 2 | 3 | export default function Home() { 4 | return ( 5 |
6 |

7 | Crypto Prediction Market 8 |

9 | 10 |
11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /templates/nextjs_wagmi_template/src/wagmiConfig.ts: -------------------------------------------------------------------------------- 1 | import { http, createConfig } from 'wagmi' 2 | import { morphSepolia } from 'wagmi/chains' 3 | import { injected, metaMask } from 'wagmi/connectors' 4 | 5 | export const config = createConfig({ 6 | chains: [morphSepolia], 7 | connectors: [ 8 | metaMask(), 9 | ], 10 | transports: { 11 | [morphSepolia.id]: http(), 12 | }, 13 | }) -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/certora/specs/methods/IERC2612.spec: -------------------------------------------------------------------------------- 1 | methods { 2 | function permit(address,address,uint256,uint256,uint8,bytes32,bytes32) external; 3 | function nonces(address) external returns (uint256) envfree; 4 | function DOMAIN_SEPARATOR() external returns (bytes32) envfree; 5 | } 6 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/contracts/mocks/token/ERC20ExcessDecimalsMock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | contract ERC20ExcessDecimalsMock { 6 | function decimals() public pure returns (uint256) { 7 | return type(uint256).max; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/frontend/.gitignore: -------------------------------------------------------------------------------- 1 | # dependencies 2 | /node_modules 3 | /.pnp 4 | .pnp.js 5 | .env 6 | .yarn/install-state.gz 7 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | 15 | # production 16 | /build 17 | 18 | # typescript 19 | *.tsbuildinfo 20 | next-env.d.ts 21 | 22 | # vercel 23 | .vercel 24 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/contracts/account/README.adoc: -------------------------------------------------------------------------------- 1 | = Account 2 | 3 | [.readme-notice] 4 | NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/account 5 | 6 | This directory includes contracts to build accounts for ERC-4337. 7 | 8 | == Utilities 9 | 10 | {{ERC4337Utils}} 11 | 12 | {{ERC7579Utils}} 13 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/contracts/interfaces/IERC3156.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC3156.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC3156FlashBorrower} from "./IERC3156FlashBorrower.sol"; 7 | import {IERC3156FlashLender} from "./IERC3156FlashLender.sol"; 8 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/contracts/interfaces/IERC721Enumerable.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC721Enumerable.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC721Enumerable} from "../token/ERC721/extensions/IERC721Enumerable.sol"; 7 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/contracts/mocks/token/ERC20MulticallMock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | import {ERC20} from "../../token/ERC20/ERC20.sol"; 6 | import {Multicall} from "../../utils/Multicall.sol"; 7 | 8 | abstract contract ERC20MulticallMock is ERC20, Multicall {} 9 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/.changeset/eighty-hounds-promise.md: -------------------------------------------------------------------------------- 1 | --- 2 | 'openzeppelin-solidity': minor 3 | --- 4 | 5 | `Strings`: Add `parseUint`, `parseInt`, `parseHexUint` and `parseAddress` to parse strings into numbers and addresses. Also provide variants of these functions that parse substrings, and `tryXxx` variants that do not revert on invalid input. 6 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/certora/specs/methods/IERC3156FlashLender.spec: -------------------------------------------------------------------------------- 1 | methods { 2 | function maxFlashLoan(address) external returns (uint256) envfree; 3 | function flashFee(address,uint256) external returns (uint256) envfree; 4 | function flashLoan(address,address,uint256,bytes) external returns (bool); 5 | } 6 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/certora/specs/methods/IOwnable2Step.spec: -------------------------------------------------------------------------------- 1 | methods { 2 | function owner() external returns (address) envfree; 3 | function pendingOwner() external returns (address) envfree; 4 | function transferOwnership(address) external; 5 | function acceptOwnership() external; 6 | function renounceOwnership() external; 7 | } 8 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/foundry.toml: -------------------------------------------------------------------------------- 1 | [profile.default] 2 | solc_version = '0.8.24' 3 | evm_version = 'cancun' 4 | optimizer = true 5 | optimizer-runs = 200 6 | src = 'contracts' 7 | out = 'out' 8 | libs = ['node_modules', 'lib'] 9 | test = 'test' 10 | cache_path = 'cache_forge' 11 | 12 | [fuzz] 13 | runs = 5000 14 | max_test_rejects = 150000 15 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/contracts/interfaces/IERC1155MetadataURI.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC1155MetadataURI.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC1155MetadataURI} from "../token/ERC1155/extensions/IERC1155MetadataURI.sol"; 7 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/contracts/interfaces/IERC2612.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC2612.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC20Permit} from "../token/ERC20/extensions/IERC20Permit.sol"; 7 | 8 | interface IERC2612 is IERC20Permit {} 9 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/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 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/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 | ignore: 14 | - "test" 15 | - "contracts/mocks" 16 | - "contracts/vendor" 17 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 120, 3 | "singleQuote": true, 4 | "trailingComma": "all", 5 | "arrowParens": "avoid", 6 | "overrides": [ 7 | { 8 | "files": "*.sol", 9 | "options": { 10 | "singleQuote": false 11 | } 12 | } 13 | ], 14 | "plugins": ["prettier-plugin-solidity"] 15 | } 16 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/pyth-sdk-solidity/.github/workflows/check-formatting.yml: -------------------------------------------------------------------------------- 1 | name: Check formatting 2 | 3 | on: 4 | pull_request: 5 | push: 6 | branches: [main] 7 | 8 | jobs: 9 | pre-commit: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v2 13 | - uses: actions/setup-python@v2 14 | - uses: pre-commit/action@v2.0.3 15 | -------------------------------------------------------------------------------- /templates/nextjs_wagmi_template/src/pages/api/hello.ts: -------------------------------------------------------------------------------- 1 | // Next.js API route support: https://nextjs.org/docs/api-routes/introduction 2 | import type { NextApiRequest, NextApiResponse } from "next"; 3 | 4 | type Data = { 5 | name: string; 6 | }; 7 | 8 | export default function handler( 9 | req: NextApiRequest, 10 | res: NextApiResponse, 11 | ) { 12 | res.status(200).json({ name: "John Doe" }); 13 | } 14 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/contracts/mocks/proxy/BadBeacon.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | contract BadBeaconNoImpl {} 6 | 7 | contract BadBeaconNotContract { 8 | function implementation() external pure returns (address) { 9 | return address(0x1); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/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 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/src/Counter.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity ^0.8.13; 3 | 4 | contract Counter { 5 | uint256 public number; 6 | 7 | function setNumber(uint256 newNumber) public { 8 | number = newNumber; 9 | } 10 | 11 | function increment() public { 12 | number++; 13 | } 14 | } -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/certora/harnesses/OwnableHarness.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | import {Ownable} from "../patched/access/Ownable.sol"; 5 | 6 | contract OwnableHarness is Ownable { 7 | constructor(address initialOwner) Ownable(initialOwner) {} 8 | 9 | function restricted() external onlyOwner {} 10 | } 11 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/contracts/interfaces/IERC5805.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5805.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IVotes} from "../governance/utils/IVotes.sol"; 7 | import {IERC6372} from "./IERC6372.sol"; 8 | 9 | interface IERC5805 is IERC6372, IVotes {} 10 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/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 | -------------------------------------------------------------------------------- /cross-chain-examples/layerzero-guide/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "exclude": ["node_modules"], 3 | "include": ["deploy", "tasks", "test", "hardhat.config.ts"], 4 | "compilerOptions": { 5 | "target": "es2020", 6 | "module": "commonjs", 7 | "esModuleInterop": true, 8 | "forceConsistentCasingInFileNames": true, 9 | "strict": true, 10 | "skipLibCheck": true, 11 | "resolveJsonModule": true 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/contracts/interfaces/IERC3156.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC3156.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IERC3156FlashBorrower} from "./IERC3156FlashBorrower.sol"; 7 | import {IERC3156FlashLender} from "./IERC3156FlashLender.sol"; 8 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/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 ERC-721 and ERC-1155. 6 | ** For ERC-721 consider {ERC721Royalty} which clears the royalty information from storage on burn. 7 | 8 | == Contracts 9 | 10 | {{ERC2981}} 11 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/contracts/account/README.adoc: -------------------------------------------------------------------------------- 1 | = Account 2 | 3 | [.readme-notice] 4 | NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/account 5 | 6 | This directory includes contracts to build accounts for ERC-4337. 7 | 8 | == Utilities 9 | 10 | {{ERC4337Utils}} 11 | 12 | {{ERC7579Utils}} 13 | -------------------------------------------------------------------------------- /nfts-on-morph/fractional_nft_guide/frontend/src/components/ThemeProvider.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import * as React from "react" 4 | import { ThemeProvider as NextThemesProvider } from "next-themes" 5 | import { type ThemeProviderProps } from "next-themes/dist/types" 6 | 7 | export function ThemeProvider({ children, ...props }: ThemeProviderProps) { 8 | return {children} 9 | } 10 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/certora/specs/methods/IOwnable2Step.spec: -------------------------------------------------------------------------------- 1 | methods { 2 | function owner() external returns (address) envfree; 3 | function pendingOwner() external returns (address) envfree; 4 | function transferOwnership(address) external; 5 | function acceptOwnership() external; 6 | function renounceOwnership() external; 7 | } 8 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/foundry.toml: -------------------------------------------------------------------------------- 1 | [profile.default] 2 | solc_version = '0.8.24' 3 | evm_version = 'cancun' 4 | optimizer = true 5 | optimizer-runs = 200 6 | src = 'contracts' 7 | out = 'out' 8 | libs = ['node_modules', 'lib'] 9 | test = 'test' 10 | cache_path = 'cache_forge' 11 | 12 | [fuzz] 13 | runs = 5000 14 | max_test_rejects = 150000 15 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/hardhat/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "module": "CommonJS", 5 | "moduleResolution": "node", 6 | "strict": true, 7 | "esModuleInterop": true, 8 | "outDir": "dist", 9 | "declaration": true, 10 | "resolveJsonModule": true 11 | }, 12 | "include": ["./scripts", "./test"], 13 | "files": ["./hardhat.config.ts"] 14 | } 15 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/.changeset/eighty-hounds-promise.md: -------------------------------------------------------------------------------- 1 | --- 2 | 'openzeppelin-solidity': minor 3 | --- 4 | 5 | `Strings`: Add `parseUint`, `parseInt`, `parseHexUint` and `parseAddress` to parse strings into numbers and addresses. Also provide variants of these functions that parse substrings, and `tryXxx` variants that do not revert on invalid input. 6 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/certora/specs/methods/IERC3156FlashLender.spec: -------------------------------------------------------------------------------- 1 | methods { 2 | function maxFlashLoan(address) external returns (uint256) envfree; 3 | function flashFee(address,uint256) external returns (uint256) envfree; 4 | function flashLoan(address,address,uint256,bytes) external returns (bool); 5 | } 6 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 120, 3 | "singleQuote": true, 4 | "trailingComma": "all", 5 | "arrowParens": "avoid", 6 | "overrides": [ 7 | { 8 | "files": "*.sol", 9 | "options": { 10 | "singleQuote": false 11 | } 12 | } 13 | ], 14 | "plugins": ["prettier-plugin-solidity"] 15 | } 16 | -------------------------------------------------------------------------------- /nfts-on-morph/fractional_nft_guide/frontend/src/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { type ClassValue, clsx } from "clsx"; 2 | import { twMerge } from "tailwind-merge"; 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)); 6 | } 7 | 8 | export const truncateAddress = (address: any) => { 9 | if (!address) return ""; 10 | return `${address.substring(0, 6)}...${address.substring( 11 | address.length - 4 12 | )}`; 13 | }; 14 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/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 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/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 | ignore: 14 | - "test" 15 | - "contracts/mocks" 16 | - "contracts/vendor" 17 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/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 | -------------------------------------------------------------------------------- /cross-chain-examples/layerzero-guide/test/mocks/ERC20Mock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity ^0.8.20; 3 | 4 | import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; 5 | 6 | contract ERC20Mock is ERC20 { 7 | constructor(string memory _name, string memory _symbol) ERC20(_name, _symbol) {} 8 | 9 | function mint(address _to, uint256 _amount) public { 10 | _mint(_to, _amount); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/certora/harnesses/Ownable2StepHarness.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | import {Ownable2Step, Ownable} from "../patched/access/Ownable2Step.sol"; 5 | 6 | contract Ownable2StepHarness is Ownable2Step { 7 | constructor(address initialOwner) Ownable(initialOwner) {} 8 | 9 | function restricted() external onlyOwner {} 10 | } 11 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/certora/harnesses/OwnableHarness.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | import {Ownable} from "../patched/access/Ownable.sol"; 5 | 6 | contract OwnableHarness is Ownable { 7 | constructor(address initialOwner) Ownable(initialOwner) {} 8 | 9 | function restricted() external onlyOwner {} 10 | } 11 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/contracts/interfaces/IERC5805.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5805.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | import {IVotes} from "../governance/utils/IVotes.sol"; 7 | import {IERC6372} from "./IERC6372.sol"; 8 | 9 | interface IERC5805 is IERC6372, IVotes {} 10 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/.changeset/four-chairs-help.md: -------------------------------------------------------------------------------- 1 | --- 2 | "openzeppelin-solidity": minor 3 | --- 4 | 5 | `Clones`: Add `cloneWithImmutableArgs` and `cloneDeterministicWithImmutableArgs` variants that create clones with per-instance immutable arguments. The immutable arguments can be retrieved using `fetchCloneArgs`. The corresponding `predictDeterministicWithImmutableArgs` function is also included. 6 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/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 ERC-721 and ERC-1155. 6 | ** For ERC-721 consider {ERC721Royalty} which clears the royalty information from storage on burn. 7 | 8 | == Contracts 9 | 10 | {{ERC2981}} 11 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/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 | [submodule "lib/halmos-cheatcodes"] 9 | path = lib/halmos-cheatcodes 10 | url = https://github.com/a16z/halmos-cheatcodes 11 | -------------------------------------------------------------------------------- /cross-chain-examples/layerzero-guide/.eslintrc.js: -------------------------------------------------------------------------------- 1 | require('@rushstack/eslint-patch/modern-module-resolution'); 2 | 3 | module.exports = { 4 | root: true, 5 | extends: ['@layerzerolabs/eslint-config-next/recommended'], 6 | rules: { 7 | // @layerzerolabs/eslint-config-next defines rules for turborepo-based projects 8 | // that are not relevant for this particular project 9 | 'turbo/no-undeclared-env-vars': 'off', 10 | }, 11 | }; 12 | -------------------------------------------------------------------------------- /nfts-on-morph/fractional_nft_guide/frontend/components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "default", 4 | "rsc": true, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind.config.ts", 8 | "css": "src/app/globals.css", 9 | "baseColor": "slate", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils" 16 | } 17 | } -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/frontend/public/file.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/frontend/public/window.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/scripts/generate/templates/EnumerableSet.opts.js: -------------------------------------------------------------------------------- 1 | const { capitalize } = require('../../helpers'); 2 | 3 | const mapType = str => (str == 'uint256' ? 'Uint' : capitalize(str)); 4 | 5 | const formatType = type => ({ 6 | name: `${mapType(type)}Set`, 7 | type, 8 | }); 9 | 10 | const TYPES = ['bytes32', 'address', 'uint256'].map(formatType); 11 | 12 | module.exports = { TYPES, formatType }; 13 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/scripts/generate/templates/MerkleProof.opts.js: -------------------------------------------------------------------------------- 1 | const { product } = require('../../helpers'); 2 | 3 | const OPTS = product( 4 | [ 5 | { suffix: '', location: 'memory' }, 6 | { suffix: 'Calldata', location: 'calldata' }, 7 | ], 8 | [{ visibility: 'pure' }, { visibility: 'view', hash: 'hasher' }], 9 | ).map(objs => Object.assign({}, ...objs)); 10 | 11 | module.exports = { OPTS }; 12 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/contracts/mocks/ReentrancyAttack.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | import {Context} from "../utils/Context.sol"; 6 | 7 | contract ReentrancyAttack is Context { 8 | function callSender(bytes calldata data) public { 9 | (bool success, ) = _msgSender().call(data); 10 | require(success, "ReentrancyAttack: failed call"); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/contracts/mocks/token/ERC20ApprovalMock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | import {ERC20} from "../../token/ERC20/ERC20.sol"; 5 | 6 | abstract contract ERC20ApprovalMock is ERC20 { 7 | function _approve(address owner, address spender, uint256 amount, bool) internal virtual override { 8 | super._approve(owner, spender, amount, true); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/contracts/mocks/ERC165/ERC165MaliciousData.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | contract ERC165MaliciousData { 6 | function supportsInterface(bytes4) public pure returns (bool) { 7 | assembly { 8 | mstore(0, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) 9 | return(0, 32) 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/test/helpers/methods.js: -------------------------------------------------------------------------------- 1 | const { ethers } = require('hardhat'); 2 | 3 | const selector = signature => ethers.FunctionFragment.from(signature).selector; 4 | 5 | const interfaceId = signatures => 6 | ethers.toBeHex( 7 | signatures.reduce((acc, signature) => acc ^ ethers.toBigInt(selector(signature)), 0n), 8 | 4, 9 | ); 10 | 11 | module.exports = { 12 | selector, 13 | interfaceId, 14 | }; 15 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/.changeset/four-chairs-help.md: -------------------------------------------------------------------------------- 1 | --- 2 | "openzeppelin-solidity": minor 3 | --- 4 | 5 | `Clones`: Add `cloneWithImmutableArgs` and `cloneDeterministicWithImmutableArgs` variants that create clones with per-instance immutable arguments. The immutable arguments can be retrieved using `fetchCloneArgs`. The corresponding `predictDeterministicWithImmutableArgs` function is also included. 6 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/certora/harnesses/Ownable2StepHarness.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | import {Ownable2Step, Ownable} from "../patched/access/Ownable2Step.sol"; 5 | 6 | contract Ownable2StepHarness is Ownable2Step { 7 | constructor(address initialOwner) Ownable(initialOwner) {} 8 | 9 | function restricted() external onlyOwner {} 10 | } 11 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/certora/harnesses/ERC721ReceiverHarness.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | import "../patched/interfaces/IERC721Receiver.sol"; 6 | 7 | contract ERC721ReceiverHarness is IERC721Receiver { 8 | function onERC721Received(address, address, uint256, bytes calldata) external pure returns (bytes4) { 9 | return this.onERC721Received.selector; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/.gitignore: -------------------------------------------------------------------------------- 1 | # Hardhat 2 | /artifacts 3 | /cache 4 | /typechain 5 | /typechain-types 6 | coverage.json 7 | coverage/ 8 | node_modules/ 9 | /broadcast 10 | 11 | # Foundry 12 | /out 13 | /cache 14 | /cache_hardhat 15 | /broadcast 16 | 17 | # Coverage 18 | coverage/ 19 | coverage.json 20 | 21 | # Hardhat files 22 | cache/ 23 | artifacts/ 24 | 25 | # Foundry files 26 | forge-cache/ 27 | out/ 28 | 29 | # Docs 30 | docs/ 31 | 32 | # Debug files 33 | *.log 34 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/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 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/hardhat/scripts/deploy.ts: -------------------------------------------------------------------------------- 1 | import { ethers } from "hardhat"; 2 | 3 | async function main() { 4 | const Greeter = await ethers.getContractFactory("Greeter"); 5 | const greeter = await Greeter.deploy("Hello, Morph Holesky!"); 6 | 7 | await greeter.waitForDeployment(); 8 | 9 | console.log("Greeter deployed to:", await greeter.getAddress()); 10 | } 11 | 12 | main().catch((error) => { 13 | console.error(error); 14 | process.exitCode = 1; 15 | }); 16 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/scripts/generate/templates/EnumerableSet.opts.js: -------------------------------------------------------------------------------- 1 | const { capitalize } = require('../../helpers'); 2 | 3 | const mapType = str => (str == 'uint256' ? 'Uint' : capitalize(str)); 4 | 5 | const formatType = type => ({ 6 | name: `${mapType(type)}Set`, 7 | type, 8 | }); 9 | 10 | const TYPES = ['bytes32', 'address', 'uint256'].map(formatType); 11 | 12 | module.exports = { TYPES, formatType }; 13 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/scripts/generate/templates/MerkleProof.opts.js: -------------------------------------------------------------------------------- 1 | const { product } = require('../../helpers'); 2 | 3 | const OPTS = product( 4 | [ 5 | { suffix: '', location: 'memory' }, 6 | { suffix: 'Calldata', location: 'calldata' }, 7 | ], 8 | [{ visibility: 'pure' }, { visibility: 'view', hash: 'hasher' }], 9 | ).map(objs => Object.assign({}, ...objs)); 10 | 11 | module.exports = { OPTS }; 12 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/contracts/mocks/EtherReceiverMock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | contract EtherReceiverMock { 6 | bool private _acceptEther; 7 | 8 | function setAcceptEther(bool acceptEther) public { 9 | _acceptEther = acceptEther; 10 | } 11 | 12 | receive() external payable { 13 | if (!_acceptEther) { 14 | revert(); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/contracts/mocks/ReentrancyAttack.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | import {Context} from "../utils/Context.sol"; 6 | 7 | contract ReentrancyAttack is Context { 8 | function callSender(bytes calldata data) public { 9 | (bool success, ) = _msgSender().call(data); 10 | require(success, "ReentrancyAttack: failed call"); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /nfts-on-morph/fractional_nft_guide/contract/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 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/.gitignore: -------------------------------------------------------------------------------- 1 | # Hardhat 2 | /artifacts 3 | /cache 4 | /typechain 5 | /typechain-types 6 | coverage.json 7 | coverage/ 8 | node_modules/ 9 | 10 | # Foundry 11 | /out 12 | /cache 13 | /cache_hardhat 14 | /broadcast 15 | 16 | # Coverage 17 | coverage/ 18 | coverage.json 19 | 20 | # Hardhat files 21 | cache/ 22 | artifacts/ 23 | 24 | # Foundry files 25 | forge-cache/ 26 | out/ 27 | 28 | # Docs 29 | docs/ 30 | 31 | # Debug files 32 | *.log 33 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/contracts/mocks/ERC165/ERC165MaliciousData.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | contract ERC165MaliciousData { 6 | function supportsInterface(bytes4) public pure returns (bool) { 7 | assembly { 8 | mstore(0, 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) 9 | return(0, 32) 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/contracts/mocks/token/ERC20ApprovalMock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | import {ERC20} from "../../token/ERC20/ERC20.sol"; 5 | 6 | abstract contract ERC20ApprovalMock is ERC20 { 7 | function _approve(address owner, address spender, uint256 amount, bool) internal virtual override { 8 | super._approve(owner, spender, amount, true); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/test/helpers/methods.js: -------------------------------------------------------------------------------- 1 | const { ethers } = require('hardhat'); 2 | 3 | const selector = signature => ethers.FunctionFragment.from(signature).selector; 4 | 5 | const interfaceId = signatures => 6 | ethers.toBeHex( 7 | signatures.reduce((acc, signature) => acc ^ ethers.toBigInt(selector(signature)), 0n), 8 | 4, 9 | ); 10 | 11 | module.exports = { 12 | selector, 13 | interfaceId, 14 | }; 15 | -------------------------------------------------------------------------------- /nfts-on-morph/fractional_nft_guide/contract/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 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/certora/specs/methods/IAccessControl.spec: -------------------------------------------------------------------------------- 1 | methods { 2 | function DEFAULT_ADMIN_ROLE() external returns (bytes32) envfree; 3 | function hasRole(bytes32, address) external returns(bool) envfree; 4 | function getRoleAdmin(bytes32) external returns(bytes32) envfree; 5 | function grantRole(bytes32, address) external; 6 | function revokeRole(bytes32, address) external; 7 | function renounceRole(bytes32, address) external; 8 | } 9 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/certora/harnesses/ERC721ReceiverHarness.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | import "../patched/interfaces/IERC721Receiver.sol"; 6 | 7 | contract ERC721ReceiverHarness is IERC721Receiver { 8 | function onERC721Received(address, address, uint256, bytes calldata) external pure returns (bytes4) { 9 | return this.onERC721Received.selector; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /nfts-on-morph/fractional_nft_guide/contract/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 | -------------------------------------------------------------------------------- /nfts-on-morph/fractional_nft_guide/frontend/next.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = { 3 | images: { 4 | remotePatterns: [ 5 | { 6 | protocol: "https", 7 | hostname: "img.freepik.com", 8 | }, 9 | { 10 | protocol: "https", 11 | hostname: "www.freepik.com", 12 | }, 13 | { 14 | protocol: "https", 15 | hostname: "www.loom.com", 16 | }, 17 | ], 18 | }, 19 | }; 20 | 21 | export default nextConfig; 22 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/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 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/hardhat/contracts/Greeter.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.19; 3 | 4 | contract Greeter { 5 | string private greeting; 6 | 7 | constructor(string memory _greeting) { 8 | greeting = _greeting; 9 | } 10 | 11 | function greet() public view returns (string memory) { 12 | return greeting; 13 | } 14 | 15 | function setGreeting(string memory _greeting) public { 16 | greeting = _greeting; 17 | } 18 | } 19 | 20 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/frontend/src/app/globals.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | :root { 6 | --background: #ffffff; 7 | --foreground: #171717; 8 | } 9 | 10 | @media (prefers-color-scheme: dark) { 11 | :root { 12 | --background: #0a0a0a; 13 | --foreground: #ededed; 14 | } 15 | } 16 | 17 | body { 18 | color: var(--foreground); 19 | background: var(--background); 20 | font-family: Arial, Helvetica, sans-serif; 21 | } 22 | -------------------------------------------------------------------------------- /nfts-on-morph/fractional_nft_guide/contract/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 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/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 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/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 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/hardhat/README.md: -------------------------------------------------------------------------------- 1 | # Sample Hardhat Project 2 | 3 | This project demonstrates a basic Hardhat use case. It comes with a sample contract, a test for that contract, and a Hardhat Ignition module that deploys that contract. 4 | 5 | Try running some of the following tasks: 6 | 7 | ```shell 8 | npx hardhat help 9 | npx hardhat test 10 | REPORT_GAS=true npx hardhat test 11 | npx hardhat node 12 | npx hardhat ignition deploy ./ignition/modules/Lock.ts 13 | ``` 14 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/hardhat/scripts/deploy.ts: -------------------------------------------------------------------------------- 1 | import { ethers } from "hardhat"; 2 | 3 | async function main() { 4 | const Greeter = await ethers.getContractFactory("Greeter"); 5 | const greeter = await Greeter.deploy("Hello, Morph Holesky!"); 6 | 7 | await greeter.waitForDeployment(); 8 | 9 | console.log("Greeter deployed to:", await greeter.getAddress()); 10 | } 11 | 12 | main().catch((error) => { 13 | console.error(error); 14 | process.exitCode = 1; 15 | }); 16 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/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 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/contracts/mocks/EtherReceiverMock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | contract EtherReceiverMock { 6 | bool private _acceptEther; 7 | 8 | function setAcceptEther(bool acceptEther) public { 9 | _acceptEther = acceptEther; 10 | } 11 | 12 | receive() external payable { 13 | if (!_acceptEther) { 14 | revert(); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/scripts/checks/coverage.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | export COVERAGE=true 6 | export FOUNDRY_FUZZ_RUNS=10 7 | 8 | # Hardhat coverage 9 | hardhat coverage 10 | 11 | if [ "${CI:-"false"}" == "true" ]; then 12 | # Foundry coverage 13 | forge coverage --report lcov --ir-minimum 14 | # Remove zero hits 15 | sed -i '/,0/d' lcov.info 16 | fi 17 | 18 | # Reports are then uploaded to Codecov automatically by workflow, and merged. 19 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/SymTest.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0 2 | pragma solidity >=0.8.0 <0.9.0; 3 | 4 | import {SVM} from "./SVM.sol"; 5 | 6 | abstract contract SymTest { 7 | // SVM cheat code address: 0xf3993a62377bcd56ae39d773740a5390411e8bc9 8 | address internal constant SVM_ADDRESS = address(uint160(uint256(keccak256("svm cheat code")))); 9 | 10 | SVM internal constant svm = SVM(SVM_ADDRESS); 11 | } 12 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/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 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/certora/harnesses/NoncesHarness.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | import {Nonces} from "../patched/utils/Nonces.sol"; 5 | 6 | contract NoncesHarness is Nonces { 7 | function useNonce(address account) external returns (uint256) { 8 | return _useNonce(account); 9 | } 10 | 11 | function useCheckedNonce(address account, uint256 nonce) external { 12 | _useCheckedNonce(account, nonce); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/certora/specs/methods/IAccessControl.spec: -------------------------------------------------------------------------------- 1 | methods { 2 | function DEFAULT_ADMIN_ROLE() external returns (bytes32) envfree; 3 | function hasRole(bytes32, address) external returns(bool) envfree; 4 | function getRoleAdmin(bytes32) external returns(bytes32) envfree; 5 | function grantRole(bytes32, address) external; 6 | function revokeRole(bytes32, address) external; 7 | function renounceRole(bytes32, address) external; 8 | } 9 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/hardhat/contracts/Greeter.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.19; 3 | 4 | contract Greeter { 5 | string private greeting; 6 | 7 | constructor(string memory _greeting) { 8 | greeting = _greeting; 9 | } 10 | 11 | function greet() public view returns (string memory) { 12 | return greeting; 13 | } 14 | 15 | function setGreeting(string memory _greeting) public { 16 | greeting = _greeting; 17 | } 18 | } -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/hardhat/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hardhat", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "devDependencies": { 13 | "@nomicfoundation/hardhat-toolbox": "^5.0.0", 14 | "hardhat": "^2.22.15" 15 | }, 16 | "dependencies": { 17 | "dotenv": "^16.4.5" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /templates/nextjs_wagmi_template/src/components/WalletOptions.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react' 2 | import { Connector, useConnect } from 'wagmi' 3 | 4 | export function WalletOptions() { 5 | const { connectors, connect, status } = useConnect() 6 | console.log(connectors) 7 | const connector = connectors[0] 8 | console.log({status}) 9 | return ( 10 | 13 | ) 14 | } -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/contracts/mocks/token/ERC20DecimalsMock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | import {ERC20} from "../../token/ERC20/ERC20.sol"; 6 | 7 | abstract contract ERC20DecimalsMock is ERC20 { 8 | uint8 private immutable _decimals; 9 | 10 | constructor(uint8 decimals_) { 11 | _decimals = decimals_; 12 | } 13 | 14 | function decimals() public view override returns (uint8) { 15 | return _decimals; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/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 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/.github/workflows/docs.yml: -------------------------------------------------------------------------------- 1 | name: Build Docs 2 | 3 | on: 4 | push: 5 | branches: [release-v*] 6 | 7 | permissions: 8 | contents: write 9 | 10 | jobs: 11 | build: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: actions/checkout@v4 15 | - name: Set up environment 16 | uses: ./.github/actions/setup 17 | - run: bash scripts/git-user-config.sh 18 | - run: node scripts/update-docs-branch.js 19 | - run: git push --all origin 20 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/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 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/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 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/contracts/mocks/token/ERC20Mock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | import {ERC20} from "../../token/ERC20/ERC20.sol"; 5 | 6 | contract ERC20Mock is ERC20 { 7 | constructor() ERC20("ERC20Mock", "E20M") {} 8 | 9 | function mint(address account, uint256 amount) external { 10 | _mint(account, amount); 11 | } 12 | 13 | function burn(address account, uint256 amount) external { 14 | _burn(account, amount); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/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 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/pyth-sdk-solidity/.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | on: 3 | push: 4 | branches: [main] 5 | pull_request: 6 | branches: [main] 7 | jobs: 8 | abi-check: 9 | name: Check contracts can be built 10 | runs-on: ubuntu-latest 11 | steps: 12 | - name: Checkout sources 13 | uses: actions/checkout@v3 14 | - uses: actions/setup-node@v3 15 | with: 16 | node-version: 14 17 | - run: npm ci 18 | - name: Build 19 | run: npm run build-mock 20 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/scripts/checks/coverage.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | export COVERAGE=true 6 | export FOUNDRY_FUZZ_RUNS=10 7 | 8 | # Hardhat coverage 9 | hardhat coverage 10 | 11 | if [ "${CI:-"false"}" == "true" ]; then 12 | # Foundry coverage 13 | forge coverage --report lcov --ir-minimum 14 | # Remove zero hits 15 | sed -i '/,0/d' lcov.info 16 | fi 17 | 18 | # Reports are then uploaded to Codecov automatically by workflow, and merged. 19 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/certora/harnesses/PausableHarness.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | import {Pausable} from "../patched/utils/Pausable.sol"; 5 | 6 | contract PausableHarness is Pausable { 7 | function pause() external { 8 | _pause(); 9 | } 10 | 11 | function unpause() external { 12 | _unpause(); 13 | } 14 | 15 | function onlyWhenPaused() external whenPaused {} 16 | 17 | function onlyWhenNotPaused() external whenNotPaused {} 18 | } 19 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/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 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/certora/harnesses/NoncesHarness.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | import {Nonces} from "../patched/utils/Nonces.sol"; 5 | 6 | contract NoncesHarness is Nonces { 7 | function useNonce(address account) external returns (uint256) { 8 | return _useNonce(account); 9 | } 10 | 11 | function useCheckedNonce(address account, uint256 nonce) external { 12 | _useCheckedNonce(account, nonce); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/script/Counter.s.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity ^0.8.13; 3 | 4 | import {Script, console} from "forge-std/Script.sol"; 5 | import {Counter} from "../src/Counter.sol"; 6 | 7 | contract CounterScript is Script { 8 | function setUp() public {} 9 | 10 | function run() public returns (Counter) { 11 | vm.startBroadcast(); 12 | Counter counter = new Counter(); 13 | vm.stopBroadcast(); 14 | 15 | return counter; 16 | } 17 | } -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/frontend/tailwind.config.ts: -------------------------------------------------------------------------------- 1 | import type { Config } from "tailwindcss"; 2 | 3 | const config: Config = { 4 | content: [ 5 | "./src/pages/**/*.{js,ts,jsx,tsx,mdx}", 6 | "./src/components/**/*.{js,ts,jsx,tsx,mdx}", 7 | "./src/app/**/*.{js,ts,jsx,tsx,mdx}", 8 | ], 9 | theme: { 10 | extend: { 11 | colors: { 12 | background: "var(--background)", 13 | foreground: "var(--foreground)", 14 | }, 15 | }, 16 | }, 17 | plugins: [], 18 | }; 19 | export default config; 20 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/certora/harnesses/ERC3156FlashBorrowerHarness.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | import {IERC3156FlashBorrower} from "../patched/interfaces/IERC3156FlashBorrower.sol"; 4 | 5 | pragma solidity ^0.8.20; 6 | 7 | contract ERC3156FlashBorrowerHarness is IERC3156FlashBorrower { 8 | bytes32 somethingToReturn; 9 | 10 | function onFlashLoan(address, address, uint256, uint256, bytes calldata) external view override returns (bytes32) { 11 | return somethingToReturn; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/certora/harnesses/TimelockControllerHarness.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | import {TimelockController} from "../patched/governance/TimelockController.sol"; 5 | 6 | contract TimelockControllerHarness is TimelockController { 7 | constructor( 8 | uint256 minDelay, 9 | address[] memory proposers, 10 | address[] memory executors, 11 | address admin 12 | ) TimelockController(minDelay, proposers, executors, admin) {} 13 | } 14 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/contracts/mocks/token/ERC4626OffsetMock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | import {ERC4626} from "../../token/ERC20/extensions/ERC4626.sol"; 6 | 7 | abstract contract ERC4626OffsetMock is ERC4626 { 8 | uint8 private immutable _offset; 9 | 10 | constructor(uint8 offset_) { 11 | _offset = offset_; 12 | } 13 | 14 | function _decimalsOffset() internal view virtual override returns (uint8) { 15 | return _offset; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/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 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/contracts/mocks/Base64Dirty.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | import {Base64} from "../utils/Base64.sol"; 6 | 7 | contract Base64Dirty { 8 | struct A { 9 | uint256 value; 10 | } 11 | 12 | function encode(bytes memory input) public pure returns (string memory) { 13 | A memory unused = A({value: type(uint256).max}); 14 | // To silence warning 15 | unused; 16 | 17 | return Base64.encode(input); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/pyth-sdk-solidity/.github/workflows/publish.yml: -------------------------------------------------------------------------------- 1 | name: Node.js Package Publish 2 | on: 3 | release: 4 | types: [created] 5 | jobs: 6 | build: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/checkout@v2 10 | - uses: actions/setup-node@v2 11 | with: 12 | node-version: "12.x" 13 | registry-url: "https://registry.npmjs.org" 14 | - run: npm ci 15 | - run: npm publish --access public 16 | env: 17 | NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} 18 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/test/helpers/account.js: -------------------------------------------------------------------------------- 1 | const { ethers } = require('hardhat'); 2 | const { impersonateAccount, setBalance } = require('@nomicfoundation/hardhat-network-helpers'); 3 | 4 | // Hardhat default balance 5 | const DEFAULT_BALANCE = 10000n * ethers.WeiPerEther; 6 | 7 | const impersonate = (account, balance = DEFAULT_BALANCE) => 8 | impersonateAccount(account) 9 | .then(() => setBalance(account, balance)) 10 | .then(() => ethers.getSigner(account)); 11 | 12 | module.exports = { 13 | impersonate, 14 | }; 15 | -------------------------------------------------------------------------------- /templates/nextjs_wagmi_template/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | .yarn/install-state.gz 8 | 9 | # testing 10 | /coverage 11 | 12 | # next.js 13 | /.next/ 14 | /out/ 15 | 16 | # production 17 | /build 18 | 19 | # misc 20 | .DS_Store 21 | *.pem 22 | 23 | # debug 24 | npm-debug.log* 25 | yarn-debug.log* 26 | yarn-error.log* 27 | 28 | # local env files 29 | .env*.local 30 | 31 | # vercel 32 | .vercel 33 | 34 | # typescript 35 | *.tsbuildinfo 36 | next-env.d.ts 37 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/.github/workflows/docs.yml: -------------------------------------------------------------------------------- 1 | name: Build Docs 2 | 3 | on: 4 | push: 5 | branches: [release-v*] 6 | 7 | permissions: 8 | contents: write 9 | 10 | jobs: 11 | build: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: actions/checkout@v4 15 | - name: Set up environment 16 | uses: ./.github/actions/setup 17 | - run: bash scripts/git-user-config.sh 18 | - run: node scripts/update-docs-branch.js 19 | - run: git push --all origin 20 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/contracts/mocks/token/ERC20DecimalsMock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | import {ERC20} from "../../token/ERC20/ERC20.sol"; 6 | 7 | abstract contract ERC20DecimalsMock is ERC20 { 8 | uint8 private immutable _decimals; 9 | 10 | constructor(uint8 decimals_) { 11 | _decimals = decimals_; 12 | } 13 | 14 | function decimals() public view override returns (uint8) { 15 | return _decimals; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/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 | -------------------------------------------------------------------------------- /cross-chain-examples/layerzero-guide/contracts/MyOFT.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity ^0.8.22; 3 | 4 | import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; 5 | import { OFT } from "@layerzerolabs/oft-evm/contracts/OFT.sol"; 6 | 7 | contract MyOFT is OFT { 8 | constructor( 9 | string memory _name, 10 | string memory _symbol, 11 | address _lzEndpoint, 12 | address _delegate 13 | ) OFT(_name, _symbol, _lzEndpoint, _delegate) Ownable(_delegate) { 14 | _mint(msg.sender, 100_000 * 10 ** 18); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/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 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/pyth-sdk-solidity/.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | repos: 2 | - repo: https://github.com/pre-commit/pre-commit-hooks 3 | rev: v3.2.0 4 | hooks: 5 | - id: trailing-whitespace 6 | - id: end-of-file-fixer 7 | - id: check-added-large-files 8 | args: ["--maxkb=1024"] 9 | - repo: https://github.com/pre-commit/mirrors-prettier 10 | rev: "v2.7.1" 11 | hooks: 12 | - id: prettier 13 | additional_dependencies: 14 | - "prettier@2.7.1" 15 | - "prettier-plugin-solidity@1.0.0-rc.1" 16 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/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 | -------------------------------------------------------------------------------- /cross-chain-examples/layerzero-guide/contracts/mocks/MyOFTMock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: UNLICENSED 2 | pragma solidity ^0.8.22; 3 | 4 | import { MyOFT } from "../MyOFT.sol"; 5 | 6 | // @dev WARNING: This is for testing purposes only 7 | contract MyOFTMock is MyOFT { 8 | constructor( 9 | string memory _name, 10 | string memory _symbol, 11 | address _lzEndpoint, 12 | address _delegate 13 | ) MyOFT(_name, _symbol, _lzEndpoint, _delegate) {} 14 | 15 | function mint(address _to, uint256 _amount) public { 16 | _mint(_to, _amount); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/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 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/hardhat/hardhat.config.ts: -------------------------------------------------------------------------------- 1 | import { HardhatUserConfig } from "hardhat/config"; 2 | import "@nomicfoundation/hardhat-toolbox"; 3 | import * as dotenv from "dotenv"; 4 | 5 | dotenv.config(); 6 | 7 | const config: HardhatUserConfig = { 8 | solidity: "0.8.19", 9 | networks: { 10 | morphHolesky: { 11 | url: process.env.RPC_URL as string, 12 | accounts: 13 | process.env.PRIVATE_KEY !== undefined 14 | ? [process.env.PRIVATE_KEY as string] 15 | : [], 16 | }, 17 | }, 18 | }; 19 | 20 | export default config; 21 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/contracts/mocks/token/ERC20Mock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | import {ERC20} from "../../token/ERC20/ERC20.sol"; 5 | 6 | contract ERC20Mock is ERC20 { 7 | constructor() ERC20("ERC20Mock", "E20M") {} 8 | 9 | function mint(address account, uint256 amount) external { 10 | _mint(account, amount); 11 | } 12 | 13 | function burn(address account, uint256 amount) external { 14 | _burn(account, amount); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/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 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/scripts/generate/templates/Checkpoints.opts.js: -------------------------------------------------------------------------------- 1 | // OPTIONS 2 | const VALUE_SIZES = [224, 208, 160]; 3 | 4 | const defaultOpts = size => ({ 5 | historyTypeName: `Trace${size}`, 6 | checkpointTypeName: `Checkpoint${size}`, 7 | checkpointFieldName: '_checkpoints', 8 | keyTypeName: `uint${256 - size}`, 9 | keyFieldName: '_key', 10 | valueTypeName: `uint${size}`, 11 | valueFieldName: '_value', 12 | }); 13 | 14 | module.exports = { 15 | VALUE_SIZES, 16 | OPTS: VALUE_SIZES.map(size => defaultOpts(size)), 17 | }; 18 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/certora/harnesses/PausableHarness.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | import {Pausable} from "../patched/utils/Pausable.sol"; 5 | 6 | contract PausableHarness is Pausable { 7 | function pause() external { 8 | _pause(); 9 | } 10 | 11 | function unpause() external { 12 | _unpause(); 13 | } 14 | 15 | function onlyWhenPaused() external whenPaused {} 16 | 17 | function onlyWhenNotPaused() external whenNotPaused {} 18 | } 19 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/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 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/contracts/interfaces/IERC5313.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5313.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | /** 7 | * @dev Interface for the Light Contract Ownership Standard. 8 | * 9 | * A standardized minimal interface required to identify an account that controls a contract 10 | */ 11 | interface IERC5313 { 12 | /** 13 | * @dev Gets the address of the owner. 14 | */ 15 | function owner() external view returns (address); 16 | } 17 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/test/utils/Nonces.test.js: -------------------------------------------------------------------------------- 1 | const { ethers } = require('hardhat'); 2 | const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); 3 | const { shouldBehaveLikeNonces } = require('./Nonces.behavior'); 4 | 5 | async function fixture() { 6 | const mock = await ethers.deployContract('$Nonces'); 7 | return { mock }; 8 | } 9 | 10 | describe('Nonces', function () { 11 | beforeEach(async function () { 12 | Object.assign(this, await loadFixture(fixture)); 13 | }); 14 | 15 | shouldBehaveLikeNonces(); 16 | }); 17 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/certora/harnesses/ERC3156FlashBorrowerHarness.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | import {IERC3156FlashBorrower} from "../patched/interfaces/IERC3156FlashBorrower.sol"; 4 | 5 | pragma solidity ^0.8.20; 6 | 7 | contract ERC3156FlashBorrowerHarness is IERC3156FlashBorrower { 8 | bytes32 somethingToReturn; 9 | 10 | function onFlashLoan(address, address, uint256, uint256, bytes calldata) external view override returns (bytes32) { 11 | return somethingToReturn; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/certora/harnesses/TimelockControllerHarness.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | import {TimelockController} from "../patched/governance/TimelockController.sol"; 5 | 6 | contract TimelockControllerHarness is TimelockController { 7 | constructor( 8 | uint256 minDelay, 9 | address[] memory proposers, 10 | address[] memory executors, 11 | address admin 12 | ) TimelockController(minDelay, proposers, executors, admin) {} 13 | } 14 | -------------------------------------------------------------------------------- /templates/nextjs_wagmi_template/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "lib": ["dom", "dom.iterable", "esnext"], 4 | "allowJs": true, 5 | "skipLibCheck": true, 6 | "strict": true, 7 | "noEmit": true, 8 | "esModuleInterop": true, 9 | "module": "esnext", 10 | "moduleResolution": "bundler", 11 | "resolveJsonModule": true, 12 | "isolatedModules": true, 13 | "jsx": "preserve", 14 | "incremental": true, 15 | "paths": { 16 | "@/*": ["./src/*"] 17 | } 18 | }, 19 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], 20 | "exclude": ["node_modules"] 21 | } 22 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/contracts/mocks/token/ERC4626OffsetMock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | import {ERC4626} from "../../token/ERC20/extensions/ERC4626.sol"; 6 | 7 | abstract contract ERC4626OffsetMock is ERC4626 { 8 | uint8 private immutable _offset; 9 | 10 | constructor(uint8 offset_) { 11 | _offset = offset_; 12 | } 13 | 14 | function _decimalsOffset() internal view virtual override returns (uint8) { 15 | return _offset; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/contracts/mocks/Base64Dirty.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | import {Base64} from "../utils/Base64.sol"; 6 | 7 | contract Base64Dirty { 8 | struct A { 9 | uint256 value; 10 | } 11 | 12 | function encode(bytes memory input) public pure returns (string memory) { 13 | A memory unused = A({value: type(uint256).max}); 14 | // To silence warning 15 | unused; 16 | 17 | return Base64.encode(input); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/test/helpers/account.js: -------------------------------------------------------------------------------- 1 | const { ethers } = require('hardhat'); 2 | const { impersonateAccount, setBalance } = require('@nomicfoundation/hardhat-network-helpers'); 3 | 4 | // Hardhat default balance 5 | const DEFAULT_BALANCE = 10000n * ethers.WeiPerEther; 6 | 7 | const impersonate = (account, balance = DEFAULT_BALANCE) => 8 | impersonateAccount(account) 9 | .then(() => setBalance(account, balance)) 10 | .then(() => ethers.getSigner(account)); 11 | 12 | module.exports = { 13 | impersonate, 14 | }; 15 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/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 | // Work around stack too deep for coverage 14 | configureYulOptimizer: true, 15 | solcOptimizerDetails: { 16 | yul: true, 17 | yulDetails: { 18 | optimizerSteps: '', 19 | }, 20 | }, 21 | }; 22 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/contracts/finance/README.adoc: -------------------------------------------------------------------------------- 1 | = Finance 2 | 3 | [.readme-notice] 4 | NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/finance 5 | 6 | This directory includes primitives for financial systems: 7 | 8 | - {VestingWallet} handles the vesting of Ether and ERC-20 tokens for a given beneficiary. Custody of multiple tokens can 9 | be given to this contract, which will release the token to the beneficiary following a given, customizable, vesting 10 | schedule. 11 | 12 | == Contracts 13 | 14 | {{VestingWallet}} 15 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/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 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/contracts/utils/Comparators.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.1.0) (utils/Comparators.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | /** 7 | * @dev Provides a set of functions to compare values. 8 | * 9 | * _Available since v5.1._ 10 | */ 11 | library Comparators { 12 | function lt(uint256 a, uint256 b) internal pure returns (bool) { 13 | return a < b; 14 | } 15 | 16 | function gt(uint256 a, uint256 b) internal pure returns (bool) { 17 | return a > b; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/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 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/hardhat/hardhat.config.ts: -------------------------------------------------------------------------------- 1 | import { HardhatUserConfig } from "hardhat/config"; 2 | import "@nomicfoundation/hardhat-toolbox"; 3 | import * as dotenv from "dotenv"; 4 | 5 | dotenv.config(); 6 | 7 | const config: HardhatUserConfig = { 8 | solidity: "0.8.19", 9 | networks: { 10 | morphHolesky: { 11 | url: process.env.RPC_URL as string, 12 | accounts: 13 | process.env.PRIVATE_KEY !== undefined 14 | ? [process.env.PRIVATE_KEY as string] 15 | : [], 16 | }, 17 | }, 18 | }; 19 | 20 | export default config; 21 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/test/helpers/deploy.js: -------------------------------------------------------------------------------- 1 | const { artifacts, ethers } = require('hardhat'); 2 | const { setCode } = require('@nomicfoundation/hardhat-network-helpers'); 3 | const { generators } = require('./random'); 4 | 5 | const forceDeployCode = (name, address = generators.address(), runner = ethers.provider) => 6 | artifacts 7 | .readArtifact(name) 8 | .then(({ abi, deployedBytecode }) => 9 | setCode(address, deployedBytecode).then(() => new ethers.Contract(address, abi, runner)), 10 | ); 11 | 12 | module.exports = { 13 | forceDeployCode, 14 | }; 15 | -------------------------------------------------------------------------------- /templates/nextjs_wagmi_template/src/pages/_app.tsx: -------------------------------------------------------------------------------- 1 | import "@/styles/globals.css"; 2 | import type { AppProps } from "next/app"; 3 | import { WagmiProvider } from "wagmi"; 4 | import { config } from "@/wagmiConfig"; 5 | import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; 6 | 7 | const queryClient = new QueryClient(); 8 | 9 | export default function App({ Component, pageProps }: AppProps) { 10 | return ( 11 | 12 | 13 | 14 | 15 | 16 | ); 17 | } 18 | -------------------------------------------------------------------------------- /templates/nextjs_wagmi_template/tailwind.config.ts: -------------------------------------------------------------------------------- 1 | import type { Config } from "tailwindcss"; 2 | 3 | const config: Config = { 4 | content: [ 5 | "./src/pages/**/*.{js,ts,jsx,tsx,mdx}", 6 | "./src/components/**/*.{js,ts,jsx,tsx,mdx}", 7 | "./src/app/**/*.{js,ts,jsx,tsx,mdx}", 8 | ], 9 | theme: { 10 | extend: { 11 | backgroundImage: { 12 | "gradient-radial": "radial-gradient(var(--tw-gradient-stops))", 13 | "gradient-conic": 14 | "conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))", 15 | }, 16 | }, 17 | }, 18 | plugins: [], 19 | }; 20 | export default config; 21 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/scripts/generate/templates/Checkpoints.opts.js: -------------------------------------------------------------------------------- 1 | // OPTIONS 2 | const VALUE_SIZES = [224, 208, 160]; 3 | 4 | const defaultOpts = size => ({ 5 | historyTypeName: `Trace${size}`, 6 | checkpointTypeName: `Checkpoint${size}`, 7 | checkpointFieldName: '_checkpoints', 8 | keyTypeName: `uint${256 - size}`, 9 | keyFieldName: '_key', 10 | valueTypeName: `uint${size}`, 11 | valueFieldName: '_value', 12 | }); 13 | 14 | module.exports = { 15 | VALUE_SIZES, 16 | OPTS: VALUE_SIZES.map(size => defaultOpts(size)), 17 | }; 18 | -------------------------------------------------------------------------------- /nfts-on-morph/fractional_nft_guide/contract/lib/forge-std/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "forge-std", 3 | "version": "1.8.2", 4 | "description": "Forge Standard Library is a collection of helpful contracts and libraries for use with Forge and Foundry.", 5 | "homepage": "https://book.getfoundry.sh/forge/forge-std", 6 | "bugs": "https://github.com/foundry-rs/forge-std/issues", 7 | "license": "(Apache-2.0 OR MIT)", 8 | "author": "Contributors to Forge Standard Library", 9 | "files": [ 10 | "src/**/*" 11 | ], 12 | "repository": { 13 | "type": "git", 14 | "url": "https://github.com/foundry-rs/forge-std.git" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/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 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/test/utils/introspection/ERC165.test.js: -------------------------------------------------------------------------------- 1 | const { ethers } = require('hardhat'); 2 | const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); 3 | 4 | const { shouldSupportInterfaces } = require('./SupportsInterface.behavior'); 5 | 6 | async function fixture() { 7 | return { 8 | mock: await ethers.deployContract('$ERC165'), 9 | }; 10 | } 11 | 12 | describe('ERC165', function () { 13 | beforeEach(async function () { 14 | Object.assign(this, await loadFixture(fixture)); 15 | }); 16 | 17 | shouldSupportInterfaces(); 18 | }); 19 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/contracts/interfaces/IERC5313.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5313.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | /** 7 | * @dev Interface for the Light Contract Ownership Standard. 8 | * 9 | * A standardized minimal interface required to identify an account that controls a contract 10 | */ 11 | interface IERC5313 { 12 | /** 13 | * @dev Gets the address of the owner. 14 | */ 15 | function owner() external view returns (address); 16 | } 17 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/test/utils/Nonces.test.js: -------------------------------------------------------------------------------- 1 | const { ethers } = require('hardhat'); 2 | const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); 3 | const { shouldBehaveLikeNonces } = require('./Nonces.behavior'); 4 | 5 | async function fixture() { 6 | const mock = await ethers.deployContract('$Nonces'); 7 | return { mock }; 8 | } 9 | 10 | describe('Nonces', function () { 11 | beforeEach(async function () { 12 | Object.assign(this, await loadFixture(fixture)); 13 | }); 14 | 15 | shouldBehaveLikeNonces(); 16 | }); 17 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (proxy/beacon/IBeacon.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | /** 7 | * @dev This is the interface that {BeaconProxy} expects of its beacon. 8 | */ 9 | interface IBeacon { 10 | /** 11 | * @dev Must return an address that can be used as a delegate call target. 12 | * 13 | * {UpgradeableBeacon} will check that this address is a contract. 14 | */ 15 | function implementation() external view returns (address); 16 | } 17 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/scripts/release/workflow/integrity-check.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | CHECKSUMS="$RUNNER_TEMP/checksums.txt" 6 | 7 | # Extract tarball content into a tmp directory 8 | tar xf "$TARBALL" -C "$RUNNER_TEMP" 9 | 10 | # Move to extracted directory 11 | cd "$RUNNER_TEMP/package" 12 | 13 | # Checksum all Solidity files 14 | find . -type f -name "*.sol" | xargs shasum > "$CHECKSUMS" 15 | 16 | # Back to directory with git contents 17 | cd "$GITHUB_WORKSPACE/contracts" 18 | 19 | # Check against tarball contents 20 | shasum -c "$CHECKSUMS" 21 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/contracts/access/manager/IAuthority.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (access/manager/IAuthority.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | /** 7 | * @dev Standard interface for permissioning originally defined in Dappsys. 8 | */ 9 | interface IAuthority { 10 | /** 11 | * @dev Returns true if the caller can invoke on a target the function identified by a function selector. 12 | */ 13 | function canCall(address caller, address target, bytes4 selector) external view returns (bool allowed); 14 | } 15 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/contracts/mocks/ERC165/ERC165ReturnBomb.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | import {IERC165} from "../../utils/introspection/IERC165.sol"; 6 | 7 | contract ERC165ReturnBombMock is IERC165 { 8 | function supportsInterface(bytes4 interfaceId) public pure override returns (bool) { 9 | if (interfaceId == type(IERC165).interfaceId) { 10 | assembly { 11 | mstore(0, 1) 12 | } 13 | } 14 | assembly { 15 | return(0, 101500) 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /templates/nextjs_wagmi_template/public/vercel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nfts-on-morph/fractional_nft_guide/contract/lib/forge-std/src/interfaces/IERC165.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.6.2; 3 | 4 | interface IERC165 { 5 | /// @notice Query if a contract implements an interface 6 | /// @param interfaceID The interface identifier, as specified in ERC-165 7 | /// @dev Interface identification is specified in ERC-165. This function 8 | /// uses less than 30,000 gas. 9 | /// @return `true` if the contract implements `interfaceID` and 10 | /// `interfaceID` is not 0xffffffff, `false` otherwise 11 | function supportsInterface(bytes4 interfaceID) external view returns (bool); 12 | } 13 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/forge-std/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "forge-std", 3 | "version": "1.9.4", 4 | "description": "Forge Standard Library is a collection of helpful contracts and libraries for use with Forge and Foundry.", 5 | "homepage": "https://book.getfoundry.sh/forge/forge-std", 6 | "bugs": "https://github.com/foundry-rs/forge-std/issues", 7 | "license": "(Apache-2.0 OR MIT)", 8 | "author": "Contributors to Forge Standard Library", 9 | "files": [ 10 | "src/**/*" 11 | ], 12 | "repository": { 13 | "type": "git", 14 | "url": "https://github.com/foundry-rs/forge-std.git" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/scripts/release/synchronize-versions.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | // Synchronizes the version in contracts/package.json with the one in package.json. 4 | // This is run automatically when npm version is run. 5 | 6 | const fs = require('fs'); 7 | 8 | setVersion('package.json', 'contracts/package.json'); 9 | 10 | function setVersion(from, to) { 11 | const fromJson = JSON.parse(fs.readFileSync(from)); 12 | const toJson = JSON.parse(fs.readFileSync(to)); 13 | toJson.version = fromJson.version; 14 | fs.writeFileSync(to, JSON.stringify(toJson, null, 2) + '\n'); 15 | } 16 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/frontend/tailwind.config.ts: -------------------------------------------------------------------------------- 1 | import type { Config } from "tailwindcss"; 2 | 3 | const config: Config = { 4 | content: [ 5 | "./src/pages/**/*.{js,ts,jsx,tsx,mdx}", 6 | "./src/components/**/*.{js,ts,jsx,tsx,mdx}", 7 | "./src/app/**/*.{js,ts,jsx,tsx,mdx}", 8 | ], 9 | theme: { 10 | extend: { 11 | backgroundImage: { 12 | "gradient-radial": "radial-gradient(var(--tw-gradient-stops))", 13 | "gradient-conic": 14 | "conic-gradient(from 180deg at 50% 50%, var(--tw-gradient-stops))", 15 | }, 16 | }, 17 | }, 18 | plugins: [], 19 | }; 20 | export default config; 21 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/contracts/finance/README.adoc: -------------------------------------------------------------------------------- 1 | = Finance 2 | 3 | [.readme-notice] 4 | NOTE: This document is better viewed at https://docs.openzeppelin.com/contracts/api/finance 5 | 6 | This directory includes primitives for financial systems: 7 | 8 | - {VestingWallet} handles the vesting of Ether and ERC-20 tokens for a given beneficiary. Custody of multiple tokens can 9 | be given to this contract, which will release the token to the beneficiary following a given, customizable, vesting 10 | schedule. 11 | 12 | == Contracts 13 | 14 | {{VestingWallet}} 15 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/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 | // Work around stack too deep for coverage 14 | configureYulOptimizer: true, 15 | solcOptimizerDetails: { 16 | yul: true, 17 | yulDetails: { 18 | optimizerSteps: '', 19 | }, 20 | }, 21 | }; 22 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/contracts/utils/Comparators.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.1.0) (utils/Comparators.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | /** 7 | * @dev Provides a set of functions to compare values. 8 | * 9 | * _Available since v5.1._ 10 | */ 11 | library Comparators { 12 | function lt(uint256 a, uint256 b) internal pure returns (bool) { 13 | return a < b; 14 | } 15 | 16 | function gt(uint256 a, uint256 b) internal pure returns (bool) { 17 | return a > b; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /nfts-on-morph/fractional_nft_guide/frontend/public/vercel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/contracts/mocks/token/ERC721URIStorageMock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | import {ERC721URIStorage} from "../../token/ERC721/extensions/ERC721URIStorage.sol"; 6 | 7 | abstract contract ERC721URIStorageMock is ERC721URIStorage { 8 | string private _baseTokenURI; 9 | 10 | function _baseURI() internal view virtual override returns (string memory) { 11 | return _baseTokenURI; 12 | } 13 | 14 | function setBaseURI(string calldata newBaseTokenURI) public { 15 | _baseTokenURI = newBaseTokenURI; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /templates/nextjs_wagmi_template/src/components/Account.tsx: -------------------------------------------------------------------------------- 1 | import { useAccount, useDisconnect, useEnsAvatar, useEnsName } from 'wagmi' 2 | import Image from 'next/image' 3 | 4 | export function Account() { 5 | const { address } = useAccount() 6 | const { disconnect } = useDisconnect() 7 | const { data: ensName } = useEnsName({ address }) 8 | const { data: ensAvatar } = useEnsAvatar({ name: ensName! }) 9 | 10 | return ( 11 |
12 | {address &&

{address}

} 13 | 14 |
15 | ) 16 | } -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/test/helpers/deploy.js: -------------------------------------------------------------------------------- 1 | const { artifacts, ethers } = require('hardhat'); 2 | const { setCode } = require('@nomicfoundation/hardhat-network-helpers'); 3 | const { generators } = require('./random'); 4 | 5 | const forceDeployCode = (name, address = generators.address(), runner = ethers.provider) => 6 | artifacts 7 | .readArtifact(name) 8 | .then(({ abi, deployedBytecode }) => 9 | setCode(address, deployedBytecode).then(() => new ethers.Contract(address, abi, runner)), 10 | ); 11 | 12 | module.exports = { 13 | forceDeployCode, 14 | }; 15 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/forge-std/src/interfaces/IERC165.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.6.2; 3 | 4 | interface IERC165 { 5 | /// @notice Query if a contract implements an interface 6 | /// @param interfaceID The interface identifier, as specified in ERC-165 7 | /// @dev Interface identification is specified in ERC-165. This function 8 | /// uses less than 30,000 gas. 9 | /// @return `true` if the contract implements `interfaceID` and 10 | /// `interfaceID` is not 0xffffffff, `false` otherwise 11 | function supportsInterface(bytes4 interfaceID) external view returns (bool); 12 | } 13 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/scripts/prepack.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | shopt -s globstar 5 | 6 | # cross platform `mkdir -p` 7 | mkdirp() { 8 | node -e "fs.mkdirSync('$1', { recursive: true })" 9 | } 10 | 11 | # cd to the root of the repo 12 | cd "$(git rev-parse --show-toplevel)" 13 | 14 | npm run clean 15 | 16 | env COMPILE_MODE=production npm run compile 17 | 18 | mkdirp contracts/build/contracts 19 | cp artifacts/contracts/**/*.json contracts/build/contracts 20 | rm contracts/build/contracts/*.dbg.json 21 | node scripts/remove-ignored-artifacts.js 22 | 23 | cp README.md contracts/ 24 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/frontend/public/vercel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/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 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/test/utils/introspection/ERC165.test.js: -------------------------------------------------------------------------------- 1 | const { ethers } = require('hardhat'); 2 | const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); 3 | 4 | const { shouldSupportInterfaces } = require('./SupportsInterface.behavior'); 5 | 6 | async function fixture() { 7 | return { 8 | mock: await ethers.deployContract('$ERC165'), 9 | }; 10 | } 11 | 12 | describe('ERC165', function () { 13 | beforeEach(async function () { 14 | Object.assign(this, await loadFixture(fixture)); 15 | }); 16 | 17 | shouldSupportInterfaces(); 18 | }); 19 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/certora/harnesses/ERC20PermitHarness.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | import {ERC20Permit, ERC20} from "../patched/token/ERC20/extensions/ERC20Permit.sol"; 5 | 6 | contract ERC20PermitHarness is ERC20Permit { 7 | constructor(string memory name, string memory symbol) ERC20(name, symbol) ERC20Permit(name) {} 8 | 9 | function mint(address account, uint256 amount) external { 10 | _mint(account, amount); 11 | } 12 | 13 | function burn(address account, uint256 amount) external { 14 | _burn(account, amount); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/contracts/mocks/token/ERC20ForceApproveMock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | import {ERC20} from "../../token/ERC20/ERC20.sol"; 6 | 7 | // contract that replicate USDT (0xdac17f958d2ee523a2206206994597c13d831ec7) approval behavior 8 | abstract contract ERC20ForceApproveMock is ERC20 { 9 | function approve(address spender, uint256 amount) public virtual override returns (bool) { 10 | require(amount == 0 || allowance(msg.sender, spender) == 0, "USDT approval failure"); 11 | return super.approve(spender, amount); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/scripts/release/workflow/integrity-check.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | CHECKSUMS="$RUNNER_TEMP/checksums.txt" 6 | 7 | # Extract tarball content into a tmp directory 8 | tar xf "$TARBALL" -C "$RUNNER_TEMP" 9 | 10 | # Move to extracted directory 11 | cd "$RUNNER_TEMP/package" 12 | 13 | # Checksum all Solidity files 14 | find . -type f -name "*.sol" | xargs shasum > "$CHECKSUMS" 15 | 16 | # Back to directory with git contents 17 | cd "$GITHUB_WORKSPACE/contracts" 18 | 19 | # Check against tarball contents 20 | shasum -c "$CHECKSUMS" 21 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/hardhat/remappings.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | const { task } = require('hardhat/config'); 3 | const { TASK_COMPILE_GET_REMAPPINGS } = require('hardhat/builtin-tasks/task-names'); 4 | 5 | task(TASK_COMPILE_GET_REMAPPINGS).setAction((taskArgs, env, runSuper) => 6 | runSuper().then(remappings => 7 | Object.assign( 8 | remappings, 9 | Object.fromEntries( 10 | fs 11 | .readFileSync('remappings.txt', 'utf-8') 12 | .split('\n') 13 | .filter(Boolean) 14 | .map(line => line.trim().split('=')), 15 | ), 16 | ), 17 | ), 18 | ); 19 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/contracts/mocks/ERC165/ERC165ReturnBomb.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | import {IERC165} from "../../utils/introspection/IERC165.sol"; 6 | 7 | contract ERC165ReturnBombMock is IERC165 { 8 | function supportsInterface(bytes4 interfaceId) public pure override returns (bool) { 9 | if (interfaceId == type(IERC165).interfaceId) { 10 | assembly { 11 | mstore(0, 1) 12 | } 13 | } 14 | assembly { 15 | return(0, 101500) 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/contracts/proxy/beacon/IBeacon.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (proxy/beacon/IBeacon.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | /** 7 | * @dev This is the interface that {BeaconProxy} expects of its beacon. 8 | */ 9 | interface IBeacon { 10 | /** 11 | * @dev Must return an address that can be used as a delegate call target. 12 | * 13 | * {UpgradeableBeacon} will check that this address is a contract. 14 | */ 15 | function implementation() external view returns (address); 16 | } 17 | -------------------------------------------------------------------------------- /nfts-on-morph/fractional_nft_guide/frontend/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # Various IDEs and Editors 4 | .vscode/ 5 | .idea/ 6 | **/*~ 7 | 8 | # dependencies 9 | /node_modules 10 | /.pnp 11 | .pnp.js 12 | .yarn/install-state.gz 13 | 14 | # testing 15 | /coverage 16 | 17 | # next.js 18 | /.next/ 19 | /out/ 20 | 21 | # production 22 | /build 23 | 24 | # misc 25 | .DS_Store 26 | *.pem 27 | 28 | # debug 29 | npm-debug.log* 30 | yarn-debug.log* 31 | yarn-error.log* 32 | 33 | # local env files 34 | .env*.local 35 | .env 36 | 37 | # vercel 38 | .vercel 39 | 40 | # typescript 41 | *.tsbuildinfo 42 | next-env.d.ts 43 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/contracts/access/manager/IAuthority.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (access/manager/IAuthority.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | /** 7 | * @dev Standard interface for permissioning originally defined in Dappsys. 8 | */ 9 | interface IAuthority { 10 | /** 11 | * @dev Returns true if the caller can invoke on a target the function identified by a function selector. 12 | */ 13 | function canCall(address caller, address target, bytes4 selector) external view returns (bool allowed); 14 | } 15 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/test/utils/NoncesKeyed.test.js: -------------------------------------------------------------------------------- 1 | const { ethers } = require('hardhat'); 2 | const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); 3 | const { shouldBehaveLikeNonces, shouldBehaveLikeNoncesKeyed } = require('./Nonces.behavior'); 4 | 5 | async function fixture() { 6 | const mock = await ethers.deployContract('$NoncesKeyed'); 7 | return { mock }; 8 | } 9 | 10 | describe('NoncesKeyed', function () { 11 | beforeEach(async function () { 12 | Object.assign(this, await loadFixture(fixture)); 13 | }); 14 | 15 | shouldBehaveLikeNonces(); 16 | shouldBehaveLikeNoncesKeyed(); 17 | }); 18 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/forge-std/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "forge-std", 3 | "version": "1.9.4", 4 | "description": "Forge Standard Library is a collection of helpful contracts and libraries for use with Forge and Foundry.", 5 | "homepage": "https://book.getfoundry.sh/forge/forge-std", 6 | "bugs": "https://github.com/foundry-rs/forge-std/issues", 7 | "license": "(Apache-2.0 OR MIT)", 8 | "author": "Contributors to Forge Standard Library", 9 | "files": [ 10 | "src/**/*" 11 | ], 12 | "repository": { 13 | "type": "git", 14 | "url": "https://github.com/foundry-rs/forge-std.git" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/scripts/release/synchronize-versions.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | // Synchronizes the version in contracts/package.json with the one in package.json. 4 | // This is run automatically when npm version is run. 5 | 6 | const fs = require('fs'); 7 | 8 | setVersion('package.json', 'contracts/package.json'); 9 | 10 | function setVersion(from, to) { 11 | const fromJson = JSON.parse(fs.readFileSync(from)); 12 | const toJson = JSON.parse(fs.readFileSync(to)); 13 | toJson.version = fromJson.version; 14 | fs.writeFileSync(to, JSON.stringify(toJson, null, 2) + '\n'); 15 | } 16 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/frontend/src/constants/abi.ts: -------------------------------------------------------------------------------- 1 | export const abi = [ 2 | { 3 | type: "function", 4 | name: "increment", 5 | inputs: [], 6 | outputs: [], 7 | stateMutability: "nonpayable", 8 | }, 9 | { 10 | type: "function", 11 | name: "number", 12 | inputs: [], 13 | outputs: [{ name: "", type: "uint256", internalType: "uint256" }], 14 | stateMutability: "view", 15 | }, 16 | { 17 | type: "function", 18 | name: "setNumber", 19 | inputs: [{ name: "newNumber", type: "uint256", internalType: "uint256" }], 20 | outputs: [], 21 | stateMutability: "nonpayable", 22 | }, 23 | ]; 24 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/contracts/mocks/token/ERC20ReturnFalseMock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | import {ERC20} from "../../token/ERC20/ERC20.sol"; 6 | 7 | abstract contract ERC20ReturnFalseMock is ERC20 { 8 | function transfer(address, uint256) public pure override returns (bool) { 9 | return false; 10 | } 11 | 12 | function transferFrom(address, address, uint256) public pure override returns (bool) { 13 | return false; 14 | } 15 | 16 | function approve(address, uint256) public pure override returns (bool) { 17 | return false; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/test/helpers/enums.js: -------------------------------------------------------------------------------- 1 | function Enum(...options) { 2 | return Object.fromEntries(options.map((key, i) => [key, BigInt(i)])); 3 | } 4 | 5 | module.exports = { 6 | Enum, 7 | ProposalState: Enum('Pending', 'Active', 'Canceled', 'Defeated', 'Succeeded', 'Queued', 'Expired', 'Executed'), 8 | VoteType: Object.assign(Enum('Against', 'For', 'Abstain'), { Parameters: 255n }), 9 | Rounding: Enum('Floor', 'Ceil', 'Trunc', 'Expand'), 10 | OperationState: Enum('Unset', 'Waiting', 'Ready', 'Done'), 11 | RevertType: Enum('None', 'RevertWithoutMessage', 'RevertWithMessage', 'RevertWithCustomError', 'Panic'), 12 | }; 13 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/contracts/interfaces/IERC6372.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC6372.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | interface IERC6372 { 7 | /** 8 | * @dev Clock used for flagging checkpoints. Can be overridden to implement timestamp based checkpoints (and voting). 9 | */ 10 | function clock() external view returns (uint48); 11 | 12 | /** 13 | * @dev Description of the clock 14 | */ 15 | // solhint-disable-next-line func-name-mixedcase 16 | function CLOCK_MODE() external view returns (string memory); 17 | } 18 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/contracts/mocks/token/ERC721URIStorageMock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | import {ERC721URIStorage} from "../../token/ERC721/extensions/ERC721URIStorage.sol"; 6 | 7 | abstract contract ERC721URIStorageMock is ERC721URIStorage { 8 | string private _baseTokenURI; 9 | 10 | function _baseURI() internal view virtual override returns (string memory) { 11 | return _baseTokenURI; 12 | } 13 | 14 | function setBaseURI(string calldata newBaseTokenURI) public { 15 | _baseTokenURI = newBaseTokenURI; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/.github/workflows/actionlint.yml: -------------------------------------------------------------------------------- 1 | name: lint workflows 2 | 3 | on: 4 | pull_request: 5 | paths: 6 | - '.github/**/*.ya?ml' 7 | 8 | jobs: 9 | lint: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v4 13 | - name: Add problem matchers 14 | run: | 15 | # https://github.com/rhysd/actionlint/blob/3a2f2c7/docs/usage.md#problem-matchers 16 | curl -LO https://raw.githubusercontent.com/rhysd/actionlint/main/.github/actionlint-matcher.json 17 | echo "::add-matcher::actionlint-matcher.json" 18 | - uses: docker://rhysd/actionlint:latest 19 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/contracts/mocks/token/ERC4626Mock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | import {IERC20, ERC20} from "../../token/ERC20/ERC20.sol"; 5 | import {ERC4626} from "../../token/ERC20/extensions/ERC4626.sol"; 6 | 7 | contract ERC4626Mock is ERC4626 { 8 | constructor(address underlying) ERC20("ERC4626Mock", "E4626M") ERC4626(IERC20(underlying)) {} 9 | 10 | function mint(address account, uint256 amount) external { 11 | _mint(account, amount); 12 | } 13 | 14 | function burn(address account, uint256 amount) external { 15 | _burn(account, amount); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/test/utils/cryptography/RSA.helper.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const fs = require('fs'); 3 | 4 | module.exports = function* parse(file) { 5 | const cache = {}; 6 | const data = fs.readFileSync(path.resolve(__dirname, file), 'utf8'); 7 | for (const line of data.split('\r\n')) { 8 | const groups = line.match(/^(?\w+) = (?\w+)(?.*)$/)?.groups; 9 | if (groups) { 10 | const { key, value, extra } = groups; 11 | cache[key] = value; 12 | if (groups.key === 'Result') { 13 | yield Object.assign({ extra: extra.trim() }, cache); 14 | } 15 | } 16 | } 17 | }; 18 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/forge-std/src/interfaces/IERC165.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.6.2; 3 | 4 | interface IERC165 { 5 | /// @notice Query if a contract implements an interface 6 | /// @param interfaceID The interface identifier, as specified in ERC-165 7 | /// @dev Interface identification is specified in ERC-165. This function 8 | /// uses less than 30,000 gas. 9 | /// @return `true` if the contract implements `interfaceID` and 10 | /// `interfaceID` is not 0xffffffff, `false` otherwise 11 | function supportsInterface(bytes4 interfaceID) external view returns (bool); 12 | } 13 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/certora/harnesses/ERC20PermitHarness.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.20; 3 | 4 | import {ERC20Permit, ERC20} from "../patched/token/ERC20/extensions/ERC20Permit.sol"; 5 | 6 | contract ERC20PermitHarness is ERC20Permit { 7 | constructor(string memory name, string memory symbol) ERC20(name, symbol) ERC20Permit(name) {} 8 | 9 | function mint(address account, uint256 amount) external { 10 | _mint(account, amount); 11 | } 12 | 13 | function burn(address account, uint256 amount) external { 14 | _burn(account, amount); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/contracts/mocks/token/ERC20ForceApproveMock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | import {ERC20} from "../../token/ERC20/ERC20.sol"; 6 | 7 | // contract that replicate USDT (0xdac17f958d2ee523a2206206994597c13d831ec7) approval behavior 8 | abstract contract ERC20ForceApproveMock is ERC20 { 9 | function approve(address spender, uint256 amount) public virtual override returns (bool) { 10 | require(amount == 0 || allowance(msg.sender, spender) == 0, "USDT approval failure"); 11 | return super.approve(spender, amount); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/scripts/prepack.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | shopt -s globstar 5 | 6 | # cross platform `mkdir -p` 7 | mkdirp() { 8 | node -e "fs.mkdirSync('$1', { recursive: true })" 9 | } 10 | 11 | # cd to the root of the repo 12 | cd "$(git rev-parse --show-toplevel)" 13 | 14 | npm run clean 15 | 16 | env COMPILE_MODE=production npm run compile 17 | 18 | mkdirp contracts/build/contracts 19 | cp artifacts/contracts/**/*.json contracts/build/contracts 20 | rm contracts/build/contracts/*.dbg.json 21 | node scripts/remove-ignored-artifacts.js 22 | 23 | cp README.md contracts/ 24 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/test/utils/Context.test.js: -------------------------------------------------------------------------------- 1 | const { ethers } = require('hardhat'); 2 | const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); 3 | 4 | const { shouldBehaveLikeRegularContext } = require('./Context.behavior'); 5 | 6 | async function fixture() { 7 | const [sender] = await ethers.getSigners(); 8 | const context = await ethers.deployContract('ContextMock', []); 9 | return { sender, context }; 10 | } 11 | 12 | describe('Context', function () { 13 | beforeEach(async function () { 14 | Object.assign(this, await loadFixture(fixture)); 15 | }); 16 | 17 | shouldBehaveLikeRegularContext(); 18 | }); 19 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/hardhat/remappings.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | const { task } = require('hardhat/config'); 3 | const { TASK_COMPILE_GET_REMAPPINGS } = require('hardhat/builtin-tasks/task-names'); 4 | 5 | task(TASK_COMPILE_GET_REMAPPINGS).setAction((taskArgs, env, runSuper) => 6 | runSuper().then(remappings => 7 | Object.assign( 8 | remappings, 9 | Object.fromEntries( 10 | fs 11 | .readFileSync('remappings.txt', 'utf-8') 12 | .split('\n') 13 | .filter(Boolean) 14 | .map(line => line.trim().split('=')), 15 | ), 16 | ), 17 | ), 18 | ); 19 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/lib/forge-std/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "forge-std", 3 | "version": "1.9.4", 4 | "description": "Forge Standard Library is a collection of helpful contracts and libraries for use with Forge and Foundry.", 5 | "homepage": "https://book.getfoundry.sh/forge/forge-std", 6 | "bugs": "https://github.com/foundry-rs/forge-std/issues", 7 | "license": "(Apache-2.0 OR MIT)", 8 | "author": "Contributors to Forge Standard Library", 9 | "files": [ 10 | "src/**/*" 11 | ], 12 | "repository": { 13 | "type": "git", 14 | "url": "https://github.com/foundry-rs/forge-std.git" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/contracts/interfaces/IERC2309.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC2309.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | /** 7 | * @dev ERC-2309: ERC-721 Consecutive Transfer Extension. 8 | */ 9 | interface IERC2309 { 10 | /** 11 | * @dev Emitted when the tokens from `fromTokenId` to `toTokenId` are transferred from `fromAddress` to `toAddress`. 12 | */ 13 | event ConsecutiveTransfer( 14 | uint256 indexed fromTokenId, 15 | uint256 toTokenId, 16 | address indexed fromAddress, 17 | address indexed toAddress 18 | ); 19 | } 20 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/certora/specs/helpers/helpers.spec: -------------------------------------------------------------------------------- 1 | // environment 2 | definition nonpayable(env e) returns bool = e.msg.value == 0; 3 | definition nonzerosender(env e) returns bool = e.msg.sender != 0; 4 | definition sanity(env e) returns bool = clock(e) > 0 && clock(e) <= max_uint48; 5 | 6 | // math 7 | definition min(mathint a, mathint b) returns mathint = a < b ? a : b; 8 | definition max(mathint a, mathint b) returns mathint = a > b ? a : b; 9 | 10 | // time 11 | definition clock(env e) returns mathint = to_mathint(e.block.timestamp); 12 | definition isSetAndPast(env e, uint48 timepoint) returns bool = timepoint != 0 && to_mathint(timepoint) <= clock(e); 13 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/test/helpers/enums.js: -------------------------------------------------------------------------------- 1 | function Enum(...options) { 2 | return Object.fromEntries(options.map((key, i) => [key, BigInt(i)])); 3 | } 4 | 5 | module.exports = { 6 | Enum, 7 | ProposalState: Enum('Pending', 'Active', 'Canceled', 'Defeated', 'Succeeded', 'Queued', 'Expired', 'Executed'), 8 | VoteType: Object.assign(Enum('Against', 'For', 'Abstain'), { Parameters: 255n }), 9 | Rounding: Enum('Floor', 'Ceil', 'Trunc', 'Expand'), 10 | OperationState: Enum('Unset', 'Waiting', 'Ready', 'Done'), 11 | RevertType: Enum('None', 'RevertWithoutMessage', 'RevertWithMessage', 'RevertWithCustomError', 'Panic'), 12 | }; 13 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/test/utils/NoncesKeyed.test.js: -------------------------------------------------------------------------------- 1 | const { ethers } = require('hardhat'); 2 | const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers'); 3 | const { shouldBehaveLikeNonces, shouldBehaveLikeNoncesKeyed } = require('./Nonces.behavior'); 4 | 5 | async function fixture() { 6 | const mock = await ethers.deployContract('$NoncesKeyed'); 7 | return { mock }; 8 | } 9 | 10 | describe('NoncesKeyed', function () { 11 | beforeEach(async function () { 12 | Object.assign(this, await loadFixture(fixture)); 13 | }); 14 | 15 | shouldBehaveLikeNonces(); 16 | shouldBehaveLikeNoncesKeyed(); 17 | }); 18 | -------------------------------------------------------------------------------- /nfts-on-morph/fractional_nft_guide/contract/lib/forge-std/test/Vm.t.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.8.0 <0.9.0; 3 | 4 | import {Test} from "../src/Test.sol"; 5 | import {Vm, VmSafe} from "../src/Vm.sol"; 6 | 7 | contract VmTest is Test { 8 | // This test ensures that functions are never accidentally removed from a Vm interface, or 9 | // inadvertently moved between Vm and VmSafe. This test must be updated each time a function is 10 | // added to or removed from Vm or VmSafe. 11 | function test_interfaceId() public pure { 12 | assertEq(type(VmSafe).interfaceId, bytes4(0x536a6b28), "VmSafe"); 13 | assertEq(type(Vm).interfaceId, bytes4(0xb91a22ba), "Vm"); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /oracles-on-morph/prediction-market-guide/contracts/foundry/lib/openzeppelin-contracts/scripts/generate/templates/EnumerableMap.opts.js: -------------------------------------------------------------------------------- 1 | const { capitalize } = require('../../helpers'); 2 | 3 | const mapType = str => (str == 'uint256' ? 'Uint' : capitalize(str)); 4 | 5 | const formatType = (keyType, valueType) => ({ 6 | name: `${mapType(keyType)}To${mapType(valueType)}Map`, 7 | keyType, 8 | valueType, 9 | }); 10 | 11 | const TYPES = ['uint256', 'address', 'bytes32'] 12 | .flatMap((key, _, array) => array.map(value => [key, value])) 13 | .slice(0, -1) // remove bytes32 → byte32 (last one) that is already defined 14 | .map(args => formatType(...args)); 15 | 16 | module.exports = { 17 | TYPES, 18 | formatType, 19 | }; 20 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/contracts/interfaces/IERC6372.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC6372.sol) 3 | 4 | pragma solidity ^0.8.20; 5 | 6 | interface IERC6372 { 7 | /** 8 | * @dev Clock used for flagging checkpoints. Can be overridden to implement timestamp based checkpoints (and voting). 9 | */ 10 | function clock() external view returns (uint48); 11 | 12 | /** 13 | * @dev Description of the clock 14 | */ 15 | // solhint-disable-next-line func-name-mixedcase 16 | function CLOCK_MODE() external view returns (string memory); 17 | } 18 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/contracts/mocks/token/ERC20ReturnFalseMock.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | 3 | pragma solidity ^0.8.20; 4 | 5 | import {ERC20} from "../../token/ERC20/ERC20.sol"; 6 | 7 | abstract contract ERC20ReturnFalseMock is ERC20 { 8 | function transfer(address, uint256) public pure override returns (bool) { 9 | return false; 10 | } 11 | 12 | function transferFrom(address, address, uint256) public pure override returns (bool) { 13 | return false; 14 | } 15 | 16 | function approve(address, uint256) public pure override returns (bool) { 17 | return false; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/lib/forge-std/src/interfaces/IERC165.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.6.2; 3 | 4 | interface IERC165 { 5 | /// @notice Query if a contract implements an interface 6 | /// @param interfaceID The interface identifier, as specified in ERC-165 7 | /// @dev Interface identification is specified in ERC-165. This function 8 | /// uses less than 30,000 gas. 9 | /// @return `true` if the contract implements `interfaceID` and 10 | /// `interfaceID` is not 0xffffffff, `false` otherwise 11 | function supportsInterface(bytes4 interfaceID) external view returns (bool); 12 | } 13 | -------------------------------------------------------------------------------- /account-abstraction-on-morph/Paymaster example with biconomy/biconomy-aa-demo/contracts/foundry/lib/openzeppelin-contracts/.github/workflows/actionlint.yml: -------------------------------------------------------------------------------- 1 | name: lint workflows 2 | 3 | on: 4 | pull_request: 5 | paths: 6 | - '.github/**/*.ya?ml' 7 | 8 | jobs: 9 | lint: 10 | runs-on: ubuntu-latest 11 | steps: 12 | - uses: actions/checkout@v4 13 | - name: Add problem matchers 14 | run: | 15 | # https://github.com/rhysd/actionlint/blob/3a2f2c7/docs/usage.md#problem-matchers 16 | curl -LO https://raw.githubusercontent.com/rhysd/actionlint/main/.github/actionlint-matcher.json 17 | echo "::add-matcher::actionlint-matcher.json" 18 | - uses: docker://rhysd/actionlint:latest 19 | --------------------------------------------------------------------------------