← Back to all products
$15
Swap Router Contract
Battle-tested swap router with multi-hop routing, fee tiers, and MEV-resistant execution.
MakeTOMLPythonJavaScriptYAMLShellMarkdownJSON
📁 File Structure 1176 files
swap-router-contract/
├── LICENSE
├── README.md
├── cache/
│ └── solidity-files-cache.json
├── examples/
│ └── integration.md
├── foundry.toml
├── lib/
│ ├── forge-std/
│ │ ├── .git/
│ │ │ ├── HEAD
│ │ │ ├── config
│ │ │ ├── description
│ │ │ ├── hooks/
│ │ │ │ ├── applypatch-msg.sample
│ │ │ │ ├── commit-msg.sample
│ │ │ │ ├── fsmonitor-watchman.sample
│ │ │ │ ├── post-update.sample
│ │ │ │ ├── pre-applypatch.sample
│ │ │ │ ├── pre-commit.sample
│ │ │ │ ├── pre-merge-commit.sample
│ │ │ │ ├── pre-push.sample
│ │ │ │ ├── pre-rebase.sample
│ │ │ │ ├── pre-receive.sample
│ │ │ │ ├── prepare-commit-msg.sample
│ │ │ │ └── update.sample
│ │ │ ├── index
│ │ │ ├── info/
│ │ │ │ └── exclude
│ │ │ ├── logs/
│ │ │ │ ├── HEAD
│ │ │ │ └── refs/
│ │ │ │ ├── heads/
│ │ │ │ │ └── master
│ │ │ │ └── remotes/
│ │ │ │ └── origin/
│ │ │ │ └── HEAD
│ │ │ ├── objects/
│ │ │ │ ├── 00/
│ │ │ │ │ └── af755074180de76e043aedd78dd7d8490ef8a9
│ │ │ │ ├── 02/
│ │ │ │ │ └── b248bd0338b6e5c619ef7373587d67240b0330
│ │ │ │ ├── 03/
│ │ │ │ │ └── 7e78d499c2b2d20b374c5b9873c25b60102349
│ │ │ │ ├── 0a/
│ │ │ │ │ ├── 0200bca9c32af9fc3d784cc0c9eed5a37849f0
│ │ │ │ │ └── c1b691ad9f289f63967d9807b3b292118c9521
│ │ │ │ ├── 11/
│ │ │ │ │ ├── 46a8df556cabbd84c94e568d087e6c75473a21
│ │ │ │ │ └── e76b4c5cd7c4e64e91b0e7e752474ea1de9646
│ │ │ │ ├── 13/
│ │ │ │ │ └── 015e4fc6b869824b7da3849ab2525936b67a76
│ │ │ │ ├── 16/
│ │ │ │ │ └── 7523082bcc6a4e6dc020141fdac3b17848c41e
│ │ │ │ ├── 19/
│ │ │ │ │ └── 942f78db95de013184882153d7c2e29e454e1c
│ │ │ │ ├── 1a/
│ │ │ │ │ └── 17fe134105e16979ba18ea46b7b771230e8122
│ │ │ │ ├── 1b/
│ │ │ │ │ └── 9a72a5c413542d616ef2dcc9524bc982920f8b
│ │ │ │ ├── 1d/
│ │ │ │ │ └── eb6d22265d56283f840df7dc2507abb67e3afd
│ │ │ │ ├── 1e/
│ │ │ │ │ ├── 427de4eefa374fcdfaa8e70681914216b1c765
│ │ │ │ │ └── cdbbf7232cdce05bc7ead79a06a6cfccd40434
│ │ │ │ ├── 25/
│ │ │ │ │ └── 7559546b763ec5fa7371fb77fef9102db86446
│ │ │ │ ├── 27/
│ │ │ │ │ └── 042d458c62fb3b24ff926f3eb2328ccc291fa7
│ │ │ │ ├── 28/
│ │ │ │ │ ├── c91a912b3df6013f16459dbf57cb9c403faf5b
│ │ │ │ │ └── f98304ac6db414af24a4e9cb31407dd524329f
│ │ │ │ ├── 2c/
│ │ │ │ │ ├── 79b6e2595ace70aee3ff2195b2193a5765d4a0
│ │ │ │ │ └── 8944222af289f8406076eb32de573bab7226cd
│ │ │ │ ├── 30/
│ │ │ │ │ ├── 35880eefda9c8cb5d8e1e925e4bd5b68e6bb2f
│ │ │ │ │ ├── 6dda99fcbe285299c8d3280a7a0bc25c4d0940
│ │ │ │ │ └── 82c518187a69f4cf44d970f182fbdd0b450624
│ │ │ │ ├── 32/
│ │ │ │ │ └── fe5bfa929cc019dc1e3644bef6dd811d19efa5
│ │ │ │ ├── 33/
│ │ │ │ │ └── b815fcbd48540497c3b4ff78eae0da791b7e2c
│ │ │ │ ├── 3d/
│ │ │ │ │ ├── 35bb583a0c39032b18a2a74706634e7e175cec
│ │ │ │ │ ├── 37207e53868705dd6d9715d4066b6e607562ec
│ │ │ │ │ └── 670cb7e401394121823578dc8b7cea463182e0
│ │ │ │ ├── 4f/
│ │ │ │ │ └── ed0b5232555fe242dedc0599050ff5507b1561
│ │ │ │ ├── 55/
│ │ │ │ │ └── 94a54a8a8c15a929a685e366e81dc0dd750c01
│ │ │ │ ├── 5b/
│ │ │ │ │ └── a888e8c1e91db418ac1e79971500ca06ea4600
│ │ │ │ ├── 60/
│ │ │ │ │ ├── 35b855c4d30adf752a769e930cca62bafe61d5
│ │ │ │ │ └── 692bc750201a04049c9e76ffe738cca4f7a868
│ │ │ │ ├── 69/
│ │ │ │ │ └── 88ac409490d957b19e01a38fa3930307f804ef
│ │ │ │ ├── 6a/
│ │ │ │ │ └── 94133e06453f1066ee343056b4c2cbfb725a58
│ │ │ │ ├── 6b/
│ │ │ │ │ └── 67d0e5d1a8a613cda42009040baafeff758615
│ │ │ │ ├── 6e/
│ │ │ │ │ └── fbfa658120d115c574df3eb7179c2080c248c0
│ │ │ │ ├── 72/
│ │ │ │ │ └── 4738b8f520558dd757ea4f86d9147657d14b58
│ │ │ │ ├── 75/
│ │ │ │ │ ├── 329739d3f54ebe67ade87933b00ed3887076de
│ │ │ │ │ ├── 53ce4acca97effffa1e8e8fc27ca84a3f6a3d6
│ │ │ │ │ └── 6106d3884268923babcd1ed686641ba482fa8e
│ │ │ │ ├── 82/
│ │ │ │ │ └── b33c2cd44138ddca3af6de0c2c6e1b35d26e51
│ │ │ │ ├── 86/
│ │ │ │ │ └── 8829dd74bf6001ee402b276a755118fd3de009
│ │ │ │ ├── 8d/
│ │ │ │ │ └── d7b4732c42d4b162475935e97637f8ae6c40a7
│ │ │ │ ├── 8e/
│ │ │ │ │ └── d524ecde96c4e2f9d965e4e6f3413370934445
│ │ │ │ ├── 8f/
│ │ │ │ │ └── 4aa895b4987cf6c579825580c92ba7cf694316
│ │ │ │ ├── 94/
│ │ │ │ │ └── df1594514fa821fc797a317c24fd93d6c83180
│ │ │ │ ├── 95/
│ │ │ │ │ └── a5bf95e91c98e2f6db6e36d144ce81846a9ebb
│ │ │ │ ├── 98/
│ │ │ │ │ └── 0f766ac23b59f66ca7db1ffee381c7089ded1a
│ │ │ │ ├── 9a/
│ │ │ │ │ └── 03145ac28bfe70cd9e9083ac6adf9e0f480ab2
│ │ │ │ ├── 9b/
│ │ │ │ │ └── f979dc5a510529f8a15efe9e0719dc775f64c0
│ │ │ │ ├── 9c/
│ │ │ │ │ └── 081f7897762d596368b35d5cd49aa38490f395
│ │ │ │ ├── 9f/
│ │ │ │ │ └── 069ef8cb2470e0b8398d506d2fd22d7df08af1
│ │ │ │ ├── a5/
│ │ │ │ │ └── 198d82e9e86a646b678409307e6cac0a02a40c
│ │ │ │ ├── ab/
│ │ │ │ │ ├── 87da38525cb8bc768e4e424101e3c58e9713b9
│ │ │ │ │ └── d515cc474f3101ab46023ef6a411817ac9a2cc
│ │ │ │ ├── af/
│ │ │ │ │ └── 91dd81cc40571b59c9521edfd101eb99c441af
│ │ │ │ ├── b9/
│ │ │ │ │ └── 0dc3f940e4e78c9feff3bb9603aa075fa5c0c1
│ │ │ │ ├── bd/
│ │ │ │ │ └── 1609bf813ddf25d70ef7614360ab7d1009e2f5
│ │ │ │ ├── be/
│ │ │ │ │ └── e1f9923a408728465b3c053378ae1d4b5a4052
│ │ │ │ ├── c0/
│ │ │ │ │ └── a3d3acf0d1140162b398c687c87428d3fbe18c
│ │ │ │ ├── c1/
│ │ │ │ │ └── 3126afc05598088a79850ae34b7ed0c7d0b965
│ │ │ │ ├── c6/
│ │ │ │ │ └── b128d1a97476fa6ab349a9e3184b9a37dd4584
│ │ │ │ ├── c7/
│ │ │ │ │ └── a36ed4dc711120ed6ee4a90ea886d30e7863e2
│ │ │ │ ├── ca/
│ │ │ │ │ └── ebf6d965a8bdef2c3bb7ecb79c58ac3d468c65
│ │ │ │ ├── cf/
│ │ │ │ │ └── 01a499fbc56499b51f087c7cad0cec85fabaaa
│ │ │ │ ├── d4/
│ │ │ │ │ ├── 3fa8a7abcb977ac9168ec6addb33af09d82504
│ │ │ │ │ └── 48b0fa3f8ac921f5b8ecb6f930678a838569cc
│ │ │ │ ├── d9/
│ │ │ │ │ └── 48010fe9f8ee530774c9c9d1f5ee4922f77673
│ │ │ │ ├── da/
│ │ │ │ │ └── ad7d976d38c469c3c60953f57bfa39f56d8bcb
│ │ │ │ ├── de/
│ │ │ │ │ ├── 35fdc265c33216ae54190902f6cc60d5123425
│ │ │ │ │ └── 5b53698f070b99aa9980d3d48be86349ab42ff
│ │ │ │ ├── e1/
│ │ │ │ │ ├── 2d0600a3fe145e5685c156110845db578d5d2a
│ │ │ │ │ └── e6f93912dc7732aa19dcc85aeeda0bbb41053f
│ │ │ │ ├── e6/
│ │ │ │ │ ├── 3fce43182674d22e9ec9c987dec410596b612d
│ │ │ │ │ └── dcccca5850acb2c3da93bd558a137b88c78c43
│ │ │ │ └── fc/
│ │ │ │ └── ed182216c565d7dced7323f5754c725129a1a6
│ │ │ ├── packed-refs
│ │ │ ├── refs/
│ │ │ │ ├── heads/
│ │ │ │ │ └── master
│ │ │ │ └── remotes/
│ │ │ │ └── origin/
│ │ │ │ └── HEAD
│ │ │ └── shallow
│ │ ├── .github/
│ │ │ ├── CODEOWNERS
│ │ │ ├── dependabot.yml
│ │ │ └── workflows/
│ │ │ ├── ci.yml
│ │ │ └── sync.yml
│ │ ├── CONTRIBUTING.md
│ │ ├── LICENSE-APACHE
│ │ ├── LICENSE-MIT
│ │ ├── README.md
│ │ ├── RELEASE_CHECKLIST.md
│ │ ├── foundry.toml
│ │ ├── package.json
│ │ ├── scripts/
│ │ │ └── vm.py
│ │ ├── src/
│ │ │ ├── Base.sol
│ │ │ ├── Config.sol
│ │ │ ├── LibVariable.sol
│ │ │ ├── Script.sol
│ │ │ ├── StdAssertions.sol
│ │ │ ├── StdChains.sol
│ │ │ ├── StdCheats.sol
│ │ │ ├── StdConfig.sol
│ │ │ ├── StdConstants.sol
│ │ │ ├── StdError.sol
│ │ │ ├── StdInvariant.sol
│ │ │ ├── StdJson.sol
│ │ │ ├── StdMath.sol
│ │ │ ├── StdStorage.sol
│ │ │ ├── StdStyle.sol
│ │ │ ├── StdToml.sol
│ │ │ ├── StdUtils.sol
│ │ │ ├── Test.sol
│ │ │ ├── Vm.sol
│ │ │ ├── console.sol
│ │ │ ├── console2.sol
│ │ │ ├── interfaces/
│ │ │ │ ├── IERC1155.sol
│ │ │ │ ├── IERC165.sol
│ │ │ │ ├── IERC20.sol
│ │ │ │ ├── IERC4626.sol
│ │ │ │ ├── IERC6909.sol
│ │ │ │ ├── IERC721.sol
│ │ │ │ ├── IERC7540.sol
│ │ │ │ ├── IERC7575.sol
│ │ │ │ └── IMulticall3.sol
│ │ │ └── safeconsole.sol
│ │ └── test/
│ │ ├── CommonBase.t.sol
│ │ ├── Config.t.sol
│ │ ├── LibVariable.t.sol
│ │ ├── StdAssertions.t.sol
│ │ ├── StdChains.t.sol
│ │ ├── StdCheats.t.sol
│ │ ├── StdConstants.t.sol
│ │ ├── StdError.t.sol
│ │ ├── StdJson.t.sol
│ │ ├── StdMath.t.sol
│ │ ├── StdStorage.t.sol
│ │ ├── StdStyle.t.sol
│ │ ├── StdToml.t.sol
│ │ ├── StdUtils.t.sol
│ │ ├── Vm.t.sol
│ │ ├── compilation/
│ │ │ ├── CompilationScript.sol
│ │ │ ├── CompilationScriptBase.sol
│ │ │ ├── CompilationTest.sol
│ │ │ └── CompilationTestBase.sol
│ │ └── fixtures/
│ │ ├── broadcast.log.json
│ │ ├── config.toml
│ │ ├── test.json
│ │ └── test.toml
│ └── openzeppelin-contracts/
│ ├── .changeset/
│ │ ├── better-tires-pull.md
│ │ ├── blue-jars-lay.md
│ │ ├── bright-cooks-brush.md
│ │ ├── chatty-dryers-joke.md
│ │ ├── config.json
│ │ ├── cool-clocks-tick.md
│ │ ├── curly-pandas-flow.md
│ │ ├── dark-papers-call.md
│ │ ├── erc4337-drop-draft-prefix.md
│ │ ├── flat-flies-hear.md
│ │ ├── floppy-symbols-burn.md
│ │ ├── fruity-coats-smash.md
│ │ ├── gentle-apples-dance.md
│ │ ├── happy-pants-decide.md
│ │ ├── heavy-pots-reply.md
│ │ ├── legal-cameras-sin.md
│ │ ├── noisy-dragons-paint.md
│ │ ├── polite-cups-shine.md
│ │ ├── polite-geckos-peel.md
│ │ ├── rare-bushes-march.md
│ │ ├── red-gifts-appear.md
│ │ ├── shy-poets-look.md
│ │ ├── silver-falcons-lay.md
│ │ ├── smooth-cows-notice.md
│ │ ├── some-dolls-shine.md
│ │ ├── spicy-seals-bake.md
│ │ ├── sweet-houses-cheer.md
│ │ ├── swift-trees-build.md
│ │ ├── tame-rules-run.md
│ │ ├── tangy-jokes-begin.md
│ │ ├── tidy-turkeys-build.md
│ │ └── whole-items-rule.md
│ ├── .git/
│ │ ├── HEAD
│ │ ├── config
│ │ ├── description
│ │ ├── hooks/
│ │ │ ├── applypatch-msg.sample
│ │ │ ├── commit-msg.sample
│ │ │ ├── fsmonitor-watchman.sample
│ │ │ ├── post-update.sample
│ │ │ ├── pre-applypatch.sample
│ │ │ ├── pre-commit.sample
│ │ │ ├── pre-merge-commit.sample
│ │ │ ├── pre-push.sample
│ │ │ ├── pre-rebase.sample
│ │ │ ├── pre-receive.sample
│ │ │ ├── prepare-commit-msg.sample
│ │ │ └── update.sample
│ │ ├── index
│ │ ├── info/
│ │ │ └── exclude
│ │ ├── logs/
│ │ │ ├── HEAD
│ │ │ └── refs/
│ │ │ ├── heads/
│ │ │ │ └── master
│ │ │ └── remotes/
│ │ │ └── origin/
│ │ │ └── HEAD
│ │ ├── objects/
│ │ │ └── pack/
│ │ │ ├── pack-bf0bd768e5d580656ce16d0d6fb959a93a578dc2.idx
│ │ │ └── pack-bf0bd768e5d580656ce16d0d6fb959a93a578dc2.pack
│ │ ├── packed-refs
│ │ ├── refs/
│ │ │ ├── heads/
│ │ │ │ └── master
│ │ │ └── remotes/
│ │ │ └── origin/
│ │ │ └── HEAD
│ │ └── shallow
│ ├── .github/
│ │ ├── CODEOWNERS
│ │ ├── ISSUE_TEMPLATE/
│ │ │ ├── bug_report.md
│ │ │ ├── config.yml
│ │ │ └── feature_request.md
│ │ ├── PULL_REQUEST_TEMPLATE.md
│ │ ├── actions/
│ │ │ ├── gas-compare/
│ │ │ │ └── action.yml
│ │ │ ├── setup/
│ │ │ │ └── action.yml
│ │ │ └── storage-layout/
│ │ │ └── action.yml
│ │ └── workflows/
│ │ ├── actionlint.yml
│ │ ├── changeset.yml
│ │ ├── checks.yml
│ │ ├── docs.yml
│ │ ├── formal-verification.yml
│ │ ├── release-cycle.yml
│ │ ├── release-upgradeable.yml
│ │ └── upgradeable.yml
│ ├── .husky/
│ │ └── pre-commit
│ ├── CHANGELOG.md
│ ├── CODE_OF_CONDUCT.md
│ ├── CONTRIBUTING.md
│ ├── FUNDING.json
│ ├── GUIDELINES.md
│ ├── LICENSE
│ ├── README.md
│ ├── RELEASING.md
│ ├── SECURITY.md
│ ├── audits/
│ │ ├── 2017-03.md
│ │ ├── 2018-10.pdf
│ │ ├── 2022-10-Checkpoints.pdf
│ │ ├── 2022-10-ERC4626.pdf
│ │ ├── 2023-05-v4.9.pdf
│ │ ├── 2023-10-v5.0.pdf
│ │ ├── 2024-10-v5.1.pdf
│ │ ├── 2024-12-v5.2.pdf
│ │ ├── 2025-04-v5.3.pdf
│ │ ├── 2025-07-v5.4.pdf
│ │ ├── 2025-10-v5.5.pdf
│ │ ├── 2025-11-RLP.pdf
│ │ ├── 2026-02-v5.6.pdf
│ │ └── README.md
│ ├── contracts/
│ │ ├── access/
│ │ │ ├── AccessControl.sol
│ │ │ ├── IAccessControl.sol
│ │ │ ├── Ownable.sol
│ │ │ ├── Ownable2Step.sol
│ │ │ ├── README.adoc
│ │ │ ├── extensions/
│ │ │ │ ├── AccessControlDefaultAdminRules.sol
│ │ │ │ ├── AccessControlEnumerable.sol
│ │ │ │ ├── IAccessControlDefaultAdminRules.sol
│ │ │ │ └── IAccessControlEnumerable.sol
│ │ │ └── manager/
│ │ │ ├── AccessManaged.sol
│ │ │ ├── AccessManager.sol
│ │ │ ├── AuthorityUtils.sol
│ │ │ ├── IAccessManaged.sol
│ │ │ ├── IAccessManager.sol
│ │ │ └── IAuthority.sol
│ │ ├── account/
│ │ │ ├── Account.sol
│ │ │ ├── README.adoc
│ │ │ ├── extensions/
│ │ │ │ ├── draft-AccountERC7579.sol
│ │ │ │ ├── draft-AccountERC7579Hooked.sol
│ │ │ │ └── draft-ERC7821.sol
│ │ │ ├── paymaster/
│ │ │ │ ├── Paymaster.sol
│ │ │ │ └── extensions/
│ │ │ │ ├── PaymasterERC20.sol
│ │ │ │ ├── PaymasterERC20Guarantor.sol
│ │ │ │ ├── PaymasterERC721Owner.sol
│ │ │ │ └── PaymasterSigner.sol
│ │ │ └── utils/
│ │ │ ├── EIP7702Utils.sol
│ │ │ ├── ERC4337Utils.sol
│ │ │ └── draft-ERC7579Utils.sol
│ │ ├── crosschain/
│ │ │ ├── CrosschainLinked.sol
│ │ │ ├── CrosschainRemoteExecutor.sol
│ │ │ ├── ERC7786Recipient.sol
│ │ │ ├── README.adoc
│ │ │ └── bridges/
│ │ │ ├── BridgeERC1155.sol
│ │ │ ├── BridgeERC20.sol
│ │ │ ├── BridgeERC721.sol
│ │ │ ├── BridgeERC7802.sol
│ │ │ └── abstract/
│ │ │ ├── BridgeFungible.sol
│ │ │ ├── BridgeMultiToken.sol
│ │ │ └── BridgeNonFungible.sol
│ │ ├── finance/
│ │ │ ├── README.adoc
│ │ │ ├── VestingWallet.sol
│ │ │ └── VestingWalletCliff.sol
│ │ ├── governance/
│ │ │ ├── Governor.sol
│ │ │ ├── IGovernor.sol
│ │ │ ├── README.adoc
│ │ │ ├── TimelockController.sol
│ │ │ ├── extensions/
│ │ │ │ ├── GovernorCountingFractional.sol
│ │ │ │ ├── GovernorCountingOverridable.sol
│ │ │ │ ├── GovernorCountingSimple.sol
│ │ │ │ ├── GovernorCrosschain.sol
│ │ │ │ ├── GovernorNoncesKeyed.sol
│ │ │ │ ├── GovernorPreventLateQuorum.sol
│ │ │ │ ├── GovernorProposalGuardian.sol
│ │ │ │ ├── GovernorSequentialProposalId.sol
│ │ │ │ ├── GovernorSettings.sol
│ │ │ │ ├── GovernorStorage.sol
│ │ │ │ ├── GovernorSuperQuorum.sol
│ │ │ │ ├── GovernorTimelockAccess.sol
│ │ │ │ ├── GovernorTimelockCompound.sol
│ │ │ │ ├── GovernorTimelockControl.sol
│ │ │ │ ├── GovernorVotes.sol
│ │ │ │ ├── GovernorVotesQuorumFraction.sol
│ │ │ │ └── GovernorVotesSuperQuorumFraction.sol
│ │ │ └── utils/
│ │ │ ├── IVotes.sol
│ │ │ ├── Votes.sol
│ │ │ └── VotesExtended.sol
│ │ ├── interfaces/
│ │ │ ├── IERC1155.sol
│ │ │ ├── IERC1155MetadataURI.sol
│ │ │ ├── IERC1155Receiver.sol
│ │ │ ├── IERC1271.sol
│ │ │ ├── IERC1363.sol
│ │ │ ├── IERC1363Receiver.sol
│ │ │ ├── IERC1363Spender.sol
│ │ │ ├── IERC165.sol
│ │ │ ├── IERC1820Implementer.sol
│ │ │ ├── IERC1820Registry.sol
│ │ │ ├── IERC1967.sol
│ │ │ ├── IERC20.sol
│ │ │ ├── IERC20Metadata.sol
│ │ │ ├── IERC2309.sol
│ │ │ ├── IERC2612.sol
│ │ │ ├── IERC2981.sol
│ │ │ ├── IERC3156.sol
│ │ │ ├── IERC3156FlashBorrower.sol
│ │ │ ├── IERC3156FlashLender.sol
│ │ │ ├── IERC4337.sol
│ │ │ ├── IERC4626.sol
│ │ │ ├── IERC4906.sol
│ │ │ ├── IERC5267.sol
│ │ │ ├── IERC5313.sol
│ │ │ ├── IERC5805.sol
│ │ │ ├── IERC6372.sol
│ │ │ ├── IERC6909.sol
│ │ │ ├── IERC721.sol
│ │ │ ├── IERC721Enumerable.sol
│ │ │ ├── IERC721Metadata.sol
│ │ │ ├── IERC721Receiver.sol
│ │ │ ├── IERC7751.sol
│ │ │ ├── IERC777.sol
│ │ │ ├── IERC777Recipient.sol
│ │ │ ├── IERC777Sender.sol
│ │ │ ├── IERC7913.sol
│ │ │ ├── README.adoc
│ │ │ ├── draft-IERC1822.sol
│ │ │ ├── draft-IERC6093.sol
│ │ │ ├── draft-IERC7579.sol
│ │ │ ├── draft-IERC7674.sol
│ │ │ ├── draft-IERC7786.sol
│ │ │ ├── draft-IERC7802.sol
│ │ │ └── draft-IERC7821.sol
│ │ ├── metatx/
│ │ │ ├── ERC2771Context.sol
│ │ │ ├── ERC2771Forwarder.sol
│ │ │ └── README.adoc
│ │ ├── mocks/
│ │ │ ├── AccessManagedTarget.sol
│ │ │ ├── AccessManagerMock.sol
│ │ │ ├── ArraysMock.sol
│ │ │ ├── AuthorityMock.sol
│ │ │ ├── Base64Dirty.sol
│ │ │ ├── BatchCaller.sol
│ │ │ ├── CallReceiverMock.sol
│ │ │ ├── ConstructorMock.sol
│ │ │ ├── ContextMock.sol
│ │ │ ├── DummyImplementation.sol
│ │ │ ├── EIP712Verifier.sol
│ │ │ ├── ERC1271WalletMock.sol
│ │ │ ├── ERC165Mock.sol
│ │ │ ├── ERC2771ContextMock.sol
│ │ │ ├── ERC3156FlashBorrowerMock.sol
│ │ │ ├── EtherReceiverMock.sol
│ │ │ ├── InitializableMock.sol
│ │ │ ├── MerkleProofCustomHashMock.sol
│ │ │ ├── MerkleTreeMock.sol
│ │ │ ├── MulticallHelper.sol
│ │ │ ├── MultipleInheritanceInitializableMocks.sol
│ │ │ ├── PausableMock.sol
│ │ │ ├── ReentrancyAttack.sol
│ │ │ ├── ReentrancyMock.sol
│ │ │ ├── ReentrancyTransientMock.sol
│ │ │ ├── RegressionImplementation.sol
│ │ │ ├── SingleInheritanceInitializableMocks.sol
│ │ │ ├── Stateless.sol
│ │ │ ├── StorageSlotMock.sol
│ │ │ ├── TimelockReentrant.sol
│ │ │ ├── TransientSlotMock.sol
│ │ │ ├── UpgradeableBeaconMock.sol
│ │ │ ├── VotesExtendedMock.sol
│ │ │ ├── VotesMock.sol
│ │ │ ├── account/
│ │ │ │ ├── AccountMock.sol
│ │ │ │ ├── modules/
│ │ │ │ │ └── ERC7579Mock.sol
│ │ │ │ ├── paymaster/
│ │ │ │ │ ├── PaymasterERC20Mock.sol
│ │ │ │ │ ├── PaymasterERC721OwnerMock.sol
│ │ │ │ │ └── PaymasterSignerMock.sol
│ │ │ │ └── utils/
│ │ │ │ └── ERC7579UtilsMock.sol
│ │ │ ├── compound/
│ │ │ │ └── CompTimelock.sol
│ │ │ ├── crosschain/
│ │ │ │ ├── ERC7786GatewayMock.sol
│ │ │ │ └── ERC7786RecipientMock.sol
│ │ │ ├── docs/
│ │ │ │ ├── AccessManagerEnumerable.sol
│ │ │ │ ├── ERC20WithAutoMinerReward.sol
│ │ │ │ ├── ERC4626Fees.sol
│ │ │ │ ├── MyNFT.sol
│ │ │ │ ├── access-control/
│ │ │ │ │ ├── AccessControlERC20MintBase.sol
│ │ │ │ │ ├── AccessControlERC20MintMissing.sol
│ │ │ │ │ ├── AccessControlERC20MintOnlyRole.sol
│ │ │ │ │ ├── AccessControlModified.sol
│ │ │ │ │ ├── AccessManagedERC20MintBase.sol
│ │ │ │ │ └── MyContractOwnable.sol
│ │ │ │ ├── account/
│ │ │ │ │ ├── MyAccountEIP7702.sol
│ │ │ │ │ ├── MyFactoryAccount.sol
│ │ │ │ │ └── paymaster/
│ │ │ │ │ └── PaymasterECDSASigner.sol
│ │ │ │ ├── governance/
│ │ │ │ │ ├── MyGovernor.sol
│ │ │ │ │ ├── MyToken.sol
│ │ │ │ │ ├── MyTokenTimestampBased.sol
│ │ │ │ │ └── MyTokenWrapped.sol
│ │ │ │ ├── token/
│ │ │ │ │ ├── ERC1155/
│ │ │ │ │ │ ├── GameItems.sol
│ │ │ │ │ │ └── MyERC115HolderContract.sol
│ │ │ │ │ ├── ERC20/
│ │ │ │ │ │ └── GLDToken.sol
│ │ │ │ │ ├── ERC6909/
│ │ │ │ │ │ └── ERC6909GameItems.sol
│ │ │ │ │ └── ERC721/
│ │ │ │ │ └── GameItem.sol
│ │ │ │ └── utilities/
│ │ │ │ ├── Base64NFT.sol
│ │ │ │ └── Multicall.sol
│ │ │ ├── governance/
│ │ │ │ ├── GovernorCountingOverridableMock.sol
│ │ │ │ ├── GovernorCrosschain.sol
│ │ │ │ ├── GovernorFractionalMock.sol
│ │ │ │ ├── GovernorMock.sol
│ │ │ │ ├── GovernorNoncesKeyedMock.sol
│ │ │ │ ├── GovernorPreventLateQuorumMock.sol
│ │ │ │ ├── GovernorProposalGuardianMock.sol
│ │ │ │ ├── GovernorQueueingFailedMock.sol
│ │ │ │ ├── GovernorSequentialProposalIdMock.sol
│ │ │ │ ├── GovernorStorageMock.sol
│ │ │ │ ├── GovernorSuperQuorumMock.sol
│ │ │ │ ├── GovernorTimelockAccessMock.sol
│ │ │ │ ├── GovernorTimelockCompoundMock.sol
│ │ │ │ ├── GovernorTimelockControlMock.sol
│ │ │ │ ├── GovernorVoteMock.sol
│ │ │ │ ├── GovernorVotesSuperQuorumFractionMock.sol
│ │ │ │ └── GovernorWithParamsMock.sol
│ │ │ ├── proxy/
│ │ │ │ ├── BadBeacon.sol
│ │ │ │ ├── ClashingImplementation.sol
│ │ │ │ ├── ERC1967ProxyUnsafe.sol
│ │ │ │ └── UUPSUpgradeableMock.sol
│ │ │ ├── token/
│ │ │ │ ├── ERC1155ReceiverMock.sol
│ │ │ │ ├── ERC1363ForceApproveMock.sol
│ │ │ │ ├── ERC1363NoReturnMock.sol
│ │ │ │ ├── ERC1363ReceiverMock.sol
│ │ │ │ ├── ERC1363ReturnFalseMock.sol
│ │ │ │ ├── ERC1363SpenderMock.sol
│ │ │ │ ├── ERC20ApprovalMock.sol
│ │ │ │ ├── ERC20BlocklistMock.sol
│ │ │ │ ├── ERC20BridgeableMock.sol
│ │ │ │ ├── ERC20DecimalsMock.sol
│ │ │ │ ├── ERC20ExcessDecimalsMock.sol
│ │ │ │ ├── ERC20FlashMintMock.sol
│ │ │ │ ├── ERC20ForceApproveMock.sol
│ │ │ │ ├── ERC20GetterHelper.sol
│ │ │ │ ├── ERC20Mock.sol
│ │ │ │ ├── ERC20MulticallMock.sol
│ │ │ │ ├── ERC20NoReturnMock.sol
│ │ │ │ ├── ERC20Reentrant.sol
│ │ │ │ ├── ERC20ReturnFalseMock.sol
│ │ │ │ ├── ERC20VotesAdditionalCheckpointsMock.sol
│ │ │ │ ├── ERC20VotesLegacyMock.sol
│ │ │ │ ├── ERC20VotesTimestampMock.sol
│ │ │ │ ├── ERC4626LimitsMock.sol
│ │ │ │ ├── ERC4626Mock.sol
│ │ │ │ ├── ERC4626OffsetMock.sol
│ │ │ │ ├── ERC4646FeesMock.sol
│ │ │ │ ├── ERC721ConsecutiveEnumerableMock.sol
│ │ │ │ ├── ERC721ConsecutiveMock.sol
│ │ │ │ ├── ERC721ReceiverMock.sol
│ │ │ │ └── ERC721URIStorageMock.sol
│ │ │ └── utils/
│ │ │ └── cryptography/
│ │ │ └── ERC7739Mock.sol
│ │ ├── package.json
│ │ ├── proxy/
│ │ │ ├── Clones.sol
│ │ │ ├── ERC1967/
│ │ │ │ ├── ERC1967Proxy.sol
│ │ │ │ └── ERC1967Utils.sol
│ │ │ ├── Proxy.sol
│ │ │ ├── README.adoc
│ │ │ ├── beacon/
│ │ │ │ ├── BeaconProxy.sol
│ │ │ │ ├── IBeacon.sol
│ │ │ │ └── UpgradeableBeacon.sol
│ │ │ ├── transparent/
│ │ │ │ ├── ProxyAdmin.sol
│ │ │ │ └── TransparentUpgradeableProxy.sol
│ │ │ └── utils/
│ │ │ ├── Initializable.sol
│ │ │ └── UUPSUpgradeable.sol
│ │ ├── token/
│ │ │ ├── ERC1155/
│ │ │ │ ├── ERC1155.sol
│ │ │ │ ├── IERC1155.sol
│ │ │ │ ├── IERC1155Receiver.sol
│ │ │ │ ├── README.adoc
│ │ │ │ ├── extensions/
│ │ │ │ │ ├── ERC1155Burnable.sol
│ │ │ │ │ ├── ERC1155Crosschain.sol
│ │ │ │ │ ├── ERC1155Pausable.sol
│ │ │ │ │ ├── ERC1155Supply.sol
│ │ │ │ │ ├── ERC1155URIStorage.sol
│ │ │ │ │ └── IERC1155MetadataURI.sol
│ │ │ │ └── utils/
│ │ │ │ ├── ERC1155Holder.sol
│ │ │ │ └── ERC1155Utils.sol
│ │ │ ├── ERC20/
│ │ │ │ ├── ERC20.sol
│ │ │ │ ├── IERC20.sol
│ │ │ │ ├── README.adoc
│ │ │ │ ├── extensions/
│ │ │ │ │ ├── ERC1363.sol
│ │ │ │ │ ├── ERC20Burnable.sol
│ │ │ │ │ ├── ERC20Capped.sol
│ │ │ │ │ ├── ERC20Crosschain.sol
│ │ │ │ │ ├── ERC20FlashMint.sol
│ │ │ │ │ ├── ERC20Pausable.sol
│ │ │ │ │ ├── ERC20Permit.sol
│ │ │ │ │ ├── ERC20Votes.sol
│ │ │ │ │ ├── ERC20Wrapper.sol
│ │ │ │ │ ├── ERC4626.sol
│ │ │ │ │ ├── IERC20Metadata.sol
│ │ │ │ │ ├── IERC20Permit.sol
│ │ │ │ │ ├── draft-ERC20Bridgeable.sol
│ │ │ │ │ └── draft-ERC20TemporaryApproval.sol
│ │ │ │ └── utils/
│ │ │ │ ├── ERC1363Utils.sol
│ │ │ │ └── SafeERC20.sol
│ │ │ ├── ERC6909/
│ │ │ │ ├── ERC6909.sol
│ │ │ │ ├── README.adoc
│ │ │ │ └── extensions/
│ │ │ │ ├── ERC6909ContentURI.sol
│ │ │ │ ├── ERC6909Metadata.sol
│ │ │ │ └── ERC6909TokenSupply.sol
│ │ │ ├── ERC721/
│ │ │ │ ├── ERC721.sol
│ │ │ │ ├── IERC721.sol
│ │ │ │ ├── IERC721Receiver.sol
│ │ │ │ ├── README.adoc
│ │ │ │ ├── extensions/
│ │ │ │ │ ├── ERC721Burnable.sol
│ │ │ │ │ ├── ERC721Consecutive.sol
│ │ │ │ │ ├── ERC721Crosschain.sol
│ │ │ │ │ ├── ERC721Enumerable.sol
│ │ │ │ │ ├── ERC721Pausable.sol
│ │ │ │ │ ├── ERC721Royalty.sol
│ │ │ │ │ ├── ERC721URIStorage.sol
│ │ │ │ │ ├── ERC721Votes.sol
│ │ │ │ │ ├── ERC721Wrapper.sol
│ │ │ │ │ ├── IERC721Enumerable.sol
│ │ │ │ │ └── IERC721Metadata.sol
│ │ │ │ └── utils/
│ │ │ │ ├── ERC721Holder.sol
│ │ │ │ └── ERC721Utils.sol
│ │ │ └── common/
│ │ │ ├── ERC2981.sol
│ │ │ └── README.adoc
│ │ ├── utils/
│ │ │ ├── Address.sol
│ │ │ ├── Arrays.sol
│ │ │ ├── Base58.sol
│ │ │ ├── Base64.sol
│ │ │ ├── Blockhash.sol
│ │ │ ├── Bytes.sol
│ │ │ ├── CAIP10.sol
│ │ │ ├── CAIP2.sol
│ │ │ ├── Calldata.sol
│ │ │ ├── Comparators.sol
│ │ │ ├── Context.sol
│ │ │ ├── Create2.sol
│ │ │ ├── Create3.sol
│ │ │ ├── ERC6372Utils.sol
│ │ │ ├── Errors.sol
│ │ │ ├── LowLevelCall.sol
│ │ │ ├── Memory.sol
│ │ │ ├── Multicall.sol
│ │ │ ├── Nonces.sol
│ │ │ ├── NoncesKeyed.sol
│ │ │ ├── Packing.sol
│ │ │ ├── Panic.sol
│ │ │ ├── Pausable.sol
│ │ │ ├── README.adoc
│ │ │ ├── RLP.sol
│ │ │ ├── ReentrancyGuard.sol
│ │ │ ├── ReentrancyGuardTransient.sol
│ │ │ ├── RelayedCall.sol
│ │ │ ├── ShortStrings.sol
│ │ │ ├── SimulateCall.sol
│ │ │ ├── SlotDerivation.sol
│ │ │ ├── StorageSlot.sol
│ │ │ ├── Strings.sol
│ │ │ ├── TransientSlot.sol
│ │ │ ├── cryptography/
│ │ │ │ ├── ECDSA.sol
│ │ │ │ ├── EIP712.sol
│ │ │ │ ├── Hashes.sol
│ │ │ │ ├── MerkleProof.sol
│ │ │ │ ├── MessageHashUtils.sol
│ │ │ │ ├── P256.sol
│ │ │ │ ├── README.adoc
│ │ │ │ ├── RSA.sol
│ │ │ │ ├── SignatureChecker.sol
│ │ │ │ ├── TrieProof.sol
│ │ │ │ ├── WebAuthn.sol
│ │ │ │ ├── draft-ERC7739Utils.sol
│ │ │ │ ├── signers/
│ │ │ │ │ ├── AbstractSigner.sol
│ │ │ │ │ ├── MultiSignerERC7913.sol
│ │ │ │ │ ├── MultiSignerERC7913Weighted.sol
│ │ │ │ │ ├── SignerECDSA.sol
│ │ │ │ │ ├── SignerEIP7702.sol
│ │ │ │ │ ├── SignerERC7913.sol
│ │ │ │ │ ├── SignerP256.sol
│ │ │ │ │ ├── SignerRSA.sol
│ │ │ │ │ ├── SignerWebAuthn.sol
│ │ │ │ │ └── draft-ERC7739.sol
│ │ │ │ └── verifiers/
│ │ │ │ ├── ERC7913P256Verifier.sol
│ │ │ │ ├── ERC7913RSAVerifier.sol
│ │ │ │ └── ERC7913WebAuthnVerifier.sol
│ │ │ ├── draft-InteroperableAddress.sol
│ │ │ ├── introspection/
│ │ │ │ ├── ERC165.sol
│ │ │ │ ├── ERC165Checker.sol
│ │ │ │ └── IERC165.sol
│ │ │ ├── math/
│ │ │ │ ├── Math.sol
│ │ │ │ ├── SafeCast.sol
│ │ │ │ └── SignedMath.sol
│ │ │ ├── structs/
│ │ │ │ ├── Accumulators.sol
│ │ │ │ ├── BitMaps.sol
│ │ │ │ ├── Checkpoints.sol
│ │ │ │ ├── CircularBuffer.sol
│ │ │ │ ├── DoubleEndedQueue.sol
│ │ │ │ ├── EnumerableMap.sol
│ │ │ │ ├── EnumerableSet.sol
│ │ │ │ ├── Heap.sol
│ │ │ │ └── MerkleTree.sol
│ │ │ └── types/
│ │ │ └── Time.sol
│ │ └── vendor/
│ │ └── compound/
│ │ ├── ICompoundTimelock.sol
│ │ └── LICENSE
│ ├── docs/
│ │ ├── README.md
│ │ ├── antora.yml
│ │ ├── config.js
│ │ ├── modules/
│ │ │ └── ROOT/
│ │ │ ├── images/
│ │ │ │ ├── access-control-multiple.svg
│ │ │ │ ├── access-manager-functions.svg
│ │ │ │ ├── access-manager.svg
│ │ │ │ ├── erc4626-attack-3a.png
│ │ │ │ ├── erc4626-attack-3b.png
│ │ │ │ ├── erc4626-attack-6.png
│ │ │ │ ├── erc4626-attack.png
│ │ │ │ ├── erc4626-deposit.png
│ │ │ │ ├── erc4626-mint.png
│ │ │ │ ├── erc4626-rate-linear.png
│ │ │ │ ├── erc4626-rate-loglog.png
│ │ │ │ ├── erc4626-rate-loglogext.png
│ │ │ │ ├── tally-exec.png
│ │ │ │ └── tally-vote.png
│ │ │ ├── nav.adoc
│ │ │ └── pages/
│ │ │ ├── access-control.adoc
│ │ │ ├── account-abstraction.adoc
│ │ │ ├── accounts.adoc
│ │ │ ├── backwards-compatibility.adoc
│ │ │ ├── eoa-delegation.adoc
│ │ │ ├── erc1155.adoc
│ │ │ ├── erc20-supply.adoc
│ │ │ ├── erc20.adoc
│ │ │ ├── erc4626.adoc
│ │ │ ├── erc6909.adoc
│ │ │ ├── erc721.adoc
│ │ │ ├── extending-contracts.adoc
│ │ │ ├── faq.adoc
│ │ │ ├── governance.adoc
│ │ │ ├── index.adoc
│ │ │ ├── multisig.adoc
│ │ │ ├── paymasters.adoc
│ │ │ ├── tokens.adoc
│ │ │ ├── upgradeable.adoc
│ │ │ ├── utilities.adoc
│ │ │ └── wizard.adoc
│ │ └── templates/
│ │ ├── contract.hbs
│ │ ├── helpers.js
│ │ ├── page.hbs
│ │ └── properties.js
│ ├── eslint.config.mjs
│ ├── foundry.toml
│ ├── fv-requirements.txt
│ ├── fv/
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── diff/
│ │ │ ├── access_manager_AccessManager.sol.patch
│ │ │ ├── account_extensions_draft-AccountERC7579.sol.patch
│ │ │ └── token_ERC721_ERC721.sol.patch
│ │ ├── harnesses/
│ │ │ ├── AccessControlDefaultAdminRulesHarness.sol
│ │ │ ├── AccessControlHarness.sol
│ │ │ ├── AccessManagedHarness.sol
│ │ │ ├── AccessManagerHarness.sol
│ │ │ ├── AccountHarness.sol
│ │ │ ├── DoubleEndedQueueHarness.sol
│ │ │ ├── ERC20FlashMintHarness.sol
│ │ │ ├── ERC20PermitHarness.sol
│ │ │ ├── ERC20WrapperHarness.sol
│ │ │ ├── ERC3156FlashBorrowerHarness.sol
│ │ │ ├── ERC721Harness.sol
│ │ │ ├── ERC721ReceiverHarness.sol
│ │ │ ├── EnumerableMapHarness.sol
│ │ │ ├── EnumerableSetHarness.sol
│ │ │ ├── InitializableHarness.sol
│ │ │ ├── NoncesHarness.sol
│ │ │ ├── Ownable2StepHarness.sol
│ │ │ ├── OwnableHarness.sol
│ │ │ ├── PausableHarness.sol
│ │ │ └── TimelockControllerHarness.sol
│ │ ├── reports/
│ │ │ ├── 2021-10.pdf
│ │ │ ├── 2022-03.pdf
│ │ │ └── 2022-05.pdf
│ │ ├── run.js
│ │ └── specs/
│ │ ├── AccessControl.conf
│ │ ├── AccessControl.spec
│ │ ├── AccessControlDefaultAdminRules.conf
│ │ ├── AccessControlDefaultAdminRules.spec
│ │ ├── AccessManaged.conf
│ │ ├── AccessManaged.spec
│ │ ├── AccessManager.conf
│ │ ├── AccessManager.spec
│ │ ├── Account.conf
│ │ ├── Account.spec
│ │ ├── DoubleEndedQueue.conf
│ │ ├── DoubleEndedQueue.spec
│ │ ├── ERC20.conf
│ │ ├── ERC20.spec
│ │ ├── ERC20FlashMint.conf
│ │ ├── ERC20FlashMint.spec
│ │ ├── ERC20Wrapper.conf
│ │ ├── ERC20Wrapper.spec
│ │ ├── ERC721.conf
│ │ ├── ERC721.spec
│ │ ├── EnumerableMap.conf
│ │ ├── EnumerableMap.spec
│ │ ├── EnumerableSet.conf
│ │ ├── EnumerableSet.spec
│ │ ├── Initializable.conf
│ │ ├── Initializable.spec
│ │ ├── Nonces.conf
│ │ ├── Nonces.spec
│ │ ├── Ownable.conf
│ │ ├── Ownable.spec
│ │ ├── Ownable2Step.conf
│ │ ├── Ownable2Step.spec
│ │ ├── Pausable.conf
│ │ ├── Pausable.spec
│ │ ├── TimelockController.conf
│ │ ├── TimelockController.spec
│ │ ├── helpers/
│ │ │ └── helpers.spec
│ │ └── methods/
│ │ ├── IAccessControl.spec
│ │ ├── IAccessControlDefaultAdminRules.spec
│ │ ├── IAccessManaged.spec
│ │ ├── IAccessManager.spec
│ │ ├── IAccount.spec
│ │ ├── IERC20.spec
│ │ ├── IERC2612.spec
│ │ ├── IERC3156FlashBorrower.spec
│ │ ├── IERC3156FlashLender.spec
│ │ ├── IERC5313.spec
│ │ ├── IERC721.spec
│ │ ├── IERC721Receiver.spec
│ │ ├── IOwnable.spec
│ │ └── IOwnable2Step.spec
│ ├── hardhat.config.js
│ ├── hardhat/
│ │ ├── async-test-sanity.js
│ │ ├── env-artifacts.js
│ │ ├── ignore-unreachable-warnings.js
│ │ ├── remappings.js
│ │ ├── skip-foundry-tests.js
│ │ └── task-test-get-files.js
│ ├── logo.svg
│ ├── netlify.toml
│ ├── package-lock.json
│ ├── package.json
│ ├── remappings.txt
│ ├── renovate.json
│ ├── scripts/
│ │ ├── checks/
│ │ │ ├── compare-layout.js
│ │ │ ├── compareGasReports.js
│ │ │ ├── coverage.sh
│ │ │ ├── extract-layout.js
│ │ │ ├── generation.sh
│ │ │ ├── inheritance-ordering.js
│ │ │ └── pragma-validity.js
│ │ ├── fetch-common-contracts.js
│ │ ├── gen-nav.js
│ │ ├── generate/
│ │ │ ├── format-lines.js
│ │ │ ├── helpers/
│ │ │ │ └── sanitize.js
│ │ │ ├── run.js
│ │ │ └── templates/
│ │ │ ├── Arrays.js
│ │ │ ├── Arrays.opts.js
│ │ │ ├── Checkpoints.js
│ │ │ ├── Checkpoints.opts.js
│ │ │ ├── Checkpoints.t.js
│ │ │ ├── Enumerable.opts.js
│ │ │ ├── EnumerableMap.js
│ │ │ ├── EnumerableSet.js
│ │ │ ├── MerkleProof.js
│ │ │ ├── MerkleProof.opts.js
│ │ │ ├── Packing.js
│ │ │ ├── Packing.opts.js
│ │ │ ├── Packing.t.js
│ │ │ ├── SafeCast.js
│ │ │ ├── Slot.opts.js
│ │ │ ├── SlotDerivation.js
│ │ │ ├── SlotDerivation.t.js
│ │ │ ├── StorageSlot.js
│ │ │ ├── StorageSlotMock.js
│ │ │ ├── TransientSlot.js
│ │ │ ├── TransientSlotMock.js
│ │ │ └── conversion.js
│ │ ├── get-contracts-metadata.js
│ │ ├── git-user-config.sh
│ │ ├── helpers.js
│ │ ├── minimize-pragma.js
│ │ ├── prepack.sh
│ │ ├── prepare-docs.sh
│ │ ├── release/
│ │ │ ├── format-changelog.js
│ │ │ ├── synchronize-versions.js
│ │ │ ├── update-comment.js
│ │ │ ├── version.sh
│ │ │ └── workflow/
│ │ │ ├── check-upgradeable.sh
│ │ │ ├── exit-prerelease.sh
│ │ │ ├── github-release.js
│ │ │ ├── integrity-check.sh
│ │ │ ├── pack.sh
│ │ │ ├── publish.sh
│ │ │ ├── rerun.js
│ │ │ ├── set-changesets-pr-title.js
│ │ │ ├── start.sh
│ │ │ └── state.js
│ │ ├── remove-ignored-artifacts.js
│ │ ├── set-max-old-space-size.sh
│ │ ├── solc-versions.js
│ │ ├── solhint-custom/
│ │ │ ├── index.js
│ │ │ └── package.json
│ │ ├── update-docs-branch.js
│ │ └── upgradeable/
│ │ ├── README.md
│ │ ├── alias/
│ │ │ ├── Initializable.sol
│ │ │ └── UUPSUpgradeable.sol
│ │ ├── patch-apply.sh
│ │ ├── patch-save.sh
│ │ ├── transpile-onto.sh
│ │ ├── transpile.sh
│ │ └── upgradeable.patch
│ ├── slither.config.json
│ ├── solhint.config.js
│ └── test/
│ ├── TESTING.md
│ ├── access/
│ │ ├── AccessControl.behavior.js
│ │ ├── AccessControl.test.js
│ │ ├── Ownable.test.js
│ │ ├── Ownable2Step.test.js
│ │ ├── extensions/
│ │ │ ├── AccessControlDefaultAdminRules.test.js
│ │ │ └── AccessControlEnumerable.test.js
│ │ └── manager/
│ │ ├── AccessManaged.test.js
│ │ ├── AccessManager.behavior.js
│ │ ├── AccessManager.predicate.js
│ │ ├── AccessManager.test.js
│ │ └── AuthorityUtils.test.js
│ ├── account/
│ │ ├── Account.behavior.js
│ │ ├── Account.test.js
│ │ ├── AccountECDSA.test.js
│ │ ├── AccountEIP7702.t.sol
│ │ ├── AccountEIP7702.test.js
│ │ ├── AccountERC7913.test.js
│ │ ├── AccountMultiSigner.test.js
│ │ ├── AccountMultiSignerWeighted.test.js
│ │ ├── AccountP256.test.js
│ │ ├── AccountRSA.test.js
│ │ ├── AccountWebAuthn.test.js
│ │ ├── examples/
│ │ │ └── AccountEIP7702WithModulesMock.test.js
│ │ ├── extensions/
│ │ │ ├── AccountERC7579.behavior.js
│ │ │ ├── AccountERC7579.test.js
│ │ │ ├── AccountERC7579Hooked.test.js
│ │ │ └── ERC7821.behavior.js
│ │ ├── paymaster/
│ │ │ ├── Paymaster.behavior.js
│ │ │ ├── PaymasterERC20.test.js
│ │ │ ├── PaymasterERC20Guarantor.test.js
│ │ │ ├── PaymasterERC721Owner.test.js
│ │ │ └── PaymasterSigner.test.js
│ │ └── utils/
│ │ ├── EIP7702Utils.test.js
│ │ ├── ERC4337Utils.test.js
│ │ ├── draft-ERC7579Utils.t.sol
│ │ └── draft-ERC7579Utils.test.js
│ ├── crosschain/
│ │ ├── BridgeERC1155.behavior.js
│ │ ├── BridgeERC1155.test.js
│ │ ├── BridgeERC20.behavior.js
│ │ ├── BridgeERC20.test.js
│ │ ├── BridgeERC721.behavior.js
│ │ ├── BridgeERC721.test.js
│ │ ├── CrosschainExecutor.test.js
│ │ └── ERC7786Recipient.test.js
│ ├── finance/
│ │ ├── VestingWallet.behavior.js
│ │ ├── VestingWallet.test.js
│ │ └── VestingWalletCliff.test.js
│ ├── governance/
│ │ ├── Governor.t.sol
│ │ ├── Governor.test.js
│ │ ├── TimelockController.test.js
│ │ ├── extensions/
│ │ │ ├── GovernorCountingFractional.test.js
│ │ │ ├── GovernorCountingOverridable.test.js
│ │ │ ├── GovernorCrosschain.test.js
│ │ │ ├── GovernorERC721.test.js
│ │ │ ├── GovernorNoncesKeyed.test.js
│ │ │ ├── GovernorPreventLateQuorum.test.js
│ │ │ ├── GovernorProposalGuardian.test.js
│ │ │ ├── GovernorSequentialProposalId.test.js
│ │ │ ├── GovernorStorage.test.js
│ │ │ ├── GovernorSuperQuorum.test.js
│ │ │ ├── GovernorSuperQuorumGreaterThanQuorum.t.sol
│ │ │ ├── GovernorTimelockAccess.test.js
│ │ │ ├── GovernorTimelockCompound.test.js
│ │ │ ├── GovernorTimelockControl.test.js
│ │ │ ├── GovernorVotesQuorumFraction.test.js
│ │ │ ├── GovernorVotesSuperQuorumFraction.test.js
│ │ │ └── GovernorWithParams.test.js
│ │ └── utils/
│ │ ├── ERC6372.behavior.js
│ │ ├── Votes.behavior.js
│ │ ├── Votes.test.js
│ │ └── VotesExtended.test.js
│ ├── helpers/
│ │ ├── access-manager.js
│ │ ├── account.js
│ │ ├── chains.js
│ │ ├── constants.js
│ │ ├── deploy.js
│ │ ├── eip712-types.js
│ │ ├── eip712.js
│ │ ├── enums.js
│ │ ├── erc4337.js
│ │ ├── erc7579.js
│ │ ├── erc7739.js
│ │ ├── governance.js
│ │ ├── iterate.js
│ │ ├── math.js
│ │ ├── methods.js
│ │ ├── precompiles.js
│ │ ├── random.js
│ │ ├── signers.js
│ │ ├── storage.js
│ │ ├── strings.js
│ │ ├── time.js
│ │ ├── trie.js
│ │ └── txpool.js
│ ├── metatx/
│ │ ├── ERC2771Context.test.js
│ │ ├── ERC2771Forwarder.t.sol
│ │ └── ERC2771Forwarder.test.js
│ ├── proxy/
│ │ ├── Clones.behaviour.js
│ │ ├── Clones.t.sol
│ │ ├── Clones.test.js
│ │ ├── ERC1967/
│ │ │ ├── ERC1967Proxy.test.js
│ │ │ └── ERC1967Utils.test.js
│ │ ├── Proxy.behaviour.js
│ │ ├── beacon/
│ │ │ ├── BeaconProxy.test.js
│ │ │ └── UpgradeableBeacon.test.js
│ │ ├── transparent/
│ │ │ ├── ProxyAdmin.test.js
│ │ │ ├── TransparentUpgradeableProxy.behaviour.js
│ │ │ └── TransparentUpgradeableProxy.test.js
│ │ └── utils/
│ │ ├── Initializable.test.js
│ │ └── UUPSUpgradeable.test.js
│ ├── sanity.test.js
│ ├── token/
│ │ ├── ERC1155/
│ │ │ ├── ERC1155.behavior.js
│ │ │ ├── ERC1155.test.js
│ │ │ ├── extensions/
│ │ │ │ ├── ERC1155Burnable.test.js
│ │ │ │ ├── ERC1155Crosschain.test.js
│ │ │ │ ├── ERC1155Pausable.test.js
│ │ │ │ ├── ERC1155Supply.test.js
│ │ │ │ └── ERC1155URIStorage.test.js
│ │ │ └── utils/
│ │ │ ├── ERC1155Holder.test.js
│ │ │ └── ERC1155Utils.test.js
│ │ ├── ERC20/
│ │ │ ├── ERC20.behavior.js
│ │ │ ├── ERC20.test.js
│ │ │ ├── extensions/
│ │ │ │ ├── ERC1363.test.js
│ │ │ │ ├── ERC20Burnable.test.js
│ │ │ │ ├── ERC20Capped.test.js
│ │ │ │ ├── ERC20Crosschain.test.js
│ │ │ │ ├── ERC20FlashMint.test.js
│ │ │ │ ├── ERC20Pausable.test.js
│ │ │ │ ├── ERC20Permit.test.js
│ │ │ │ ├── ERC20Votes.test.js
│ │ │ │ ├── ERC20Wrapper.test.js
│ │ │ │ ├── ERC4626.t.sol
│ │ │ │ ├── ERC4626.test.js
│ │ │ │ ├── draft-ERC20Bridgeable.test.js
│ │ │ │ └── draft-ERC20TemporaryApproval.test.js
│ │ │ └── utils/
│ │ │ └── SafeERC20.test.js
│ │ ├── ERC6909/
│ │ │ ├── ERC6909.behavior.js
│ │ │ ├── ERC6909.test.js
│ │ │ └── extensions/
│ │ │ ├── ERC6909ContentURI.test.js
│ │ │ ├── ERC6909Metadata.test.js
│ │ │ └── ERC6909TokenSupply.test.js
│ │ ├── ERC721/
│ │ │ ├── ERC721.behavior.js
│ │ │ ├── ERC721.test.js
│ │ │ ├── ERC721Enumerable.test.js
│ │ │ ├── extensions/
│ │ │ │ ├── ERC721Burnable.test.js
│ │ │ │ ├── ERC721Consecutive.t.sol
│ │ │ │ ├── ERC721Consecutive.test.js
│ │ │ │ ├── ERC721Crosschain.test.js
│ │ │ │ ├── ERC721Pausable.test.js
│ │ │ │ ├── ERC721Royalty.test.js
│ │ │ │ ├── ERC721URIStorage.test.js
│ │ │ │ ├── ERC721Votes.test.js
│ │ │ │ └── ERC721Wrapper.test.js
│ │ │ └── utils/
│ │ │ ├── ERC721Holder.test.js
│ │ │ └── ERC721Utils.test.js
│ │ └── common/
│ │ └── ERC2981.behavior.js
│ └── utils/
│ ├── Address.test.js
│ ├── Arrays.t.sol
│ ├── Arrays.test.js
│ ├── Base58.t.sol
│ ├── Base58.test.js
│ ├── Base64.t.sol
│ ├── Base64.test.js
│ ├── Blockhash.t.sol
│ ├── Blockhash.test.js
│ ├── Bytes.t.sol
│ ├── Bytes.test.js
│ ├── CAIP.test.js
│ ├── Calldata.test.js
│ ├── Context.behavior.js
│ ├── Context.test.js
│ ├── Create2.t.sol
│ ├── Create2.test.js
│ ├── Create3.t.sol
│ ├── Create3.test.js
│ ├── ERC6372Utils.test.js
│ ├── LowLevelCall.test.js
│ ├── Memory.t.sol
│ ├── Memory.test.js
│ ├── Multicall.test.js
│ ├── Nonces.behavior.js
│ ├── Nonces.test.js
│ ├── NoncesKeyed.t.sol
│ ├── NoncesKeyed.test.js
│ ├── Packing.t.sol
│ ├── Packing.test.js
│ ├── Panic.test.js
│ ├── Pausable.test.js
│ ├── RLP.t.sol
│ ├── RLP.test.js
│ ├── ReentrancyGuard.test.js
│ ├── RelayedCall.test.js
│ ├── ShortStrings.t.sol
│ ├── ShortStrings.test.js
│ ├── SimulatedCall.test.js
│ ├── SlotDerivation.t.sol
│ ├── SlotDerivation.test.js
│ ├── StorageSlot.test.js
│ ├── Strings.t.sol
│ ├── Strings.test.js
│ ├── TransientSlot.test.js
│ ├── cryptography/
│ │ ├── ECDSA.test.js
│ │ ├── EIP712.test.js
│ │ ├── ERC1271.behavior.js
│ │ ├── ERC7739.test.js
│ │ ├── ERC7739Utils.test.js
│ │ ├── MerkleProof.test.js
│ │ ├── MessageHashUtils.t.sol
│ │ ├── MessageHashUtils.test.js
│ │ ├── P256.t.sol
│ │ ├── P256.test.js
│ │ ├── RSA.helper.js
│ │ ├── RSA.test.js
│ │ ├── SigVer15_186-3.rsp
│ │ ├── SignatureChecker.test.js
│ │ ├── TrieProof.test.js
│ │ ├── WebAuthn.t.sol
│ │ └── ecdsa_secp256r1_sha256_p1363_test.json
│ ├── draft-InteroperableAddress.t.sol
│ ├── draft-InteroperableAddress.test.js
│ ├── introspection/
│ │ ├── ERC165.test.js
│ │ ├── ERC165Checker.test.js
│ │ └── SupportsInterface.behavior.js
│ ├── math/
│ │ ├── Math.t.sol
│ │ ├── Math.test.js
│ │ ├── SafeCast.test.js
│ │ ├── SignedMath.t.sol
│ │ └── SignedMath.test.js
│ ├── structs/
│ │ ├── Accumulators.t.sol
│ │ ├── BitMap.test.js
│ │ ├── Checkpoints.t.sol
│ │ ├── Checkpoints.test.js
│ │ ├── CircularBuffer.test.js
│ │ ├── DoubleEndedQueue.test.js
│ │ ├── EnumerableMap.behavior.js
│ │ ├── EnumerableMap.test.js
│ │ ├── EnumerableSet.behavior.js
│ │ ├── EnumerableSet.test.js
│ │ ├── Heap.t.sol
│ │ ├── Heap.test.js
│ │ └── MerkleTree.test.js
│ └── types/
│ └── Time.test.js
├── out/
│ ├── Base.sol/
│ │ ├── CommonBase.json
│ │ ├── ScriptBase.json
│ │ └── TestBase.json
│ ├── Context.sol/
│ │ └── Context.json
│ ├── CryptoForgeRouter.sol/
│ │ └── CryptoForgeRouter.json
│ ├── CryptoForgeRouter.t.sol/
│ │ └── CryptoForgeRouterTest.json
│ ├── Deploy.s.sol/
│ │ └── Deploy.json
│ ├── ERC20.sol/
│ │ └── ERC20.json
│ ├── ICryptoForgeRouter.sol/
│ │ └── ICryptoForgeRouter.json
│ ├── IDEXAdapter.sol/
│ │ └── IDEXAdapter.json
│ ├── IERC1363.sol/
│ │ └── IERC1363.json
│ ├── IERC165.sol/
│ │ └── IERC165.json
│ ├── IERC20.sol/
│ │ └── IERC20.json
│ ├── IERC20Metadata.sol/
│ │ └── IERC20Metadata.json
│ ├── IMulticall3.sol/
│ │ └── IMulticall3.json
│ ├── MockDEX.sol/
│ │ └── MockDEX.json
│ ├── MockERC20.sol/
│ │ └── MockERC20.json
│ ├── Ownable.sol/
│ │ └── Ownable.json
│ ├── Ownable2Step.sol/
│ │ └── Ownable2Step.json
│ ├── Pausable.sol/
│ │ └── Pausable.json
│ ├── ReentrancyGuard.sol/
│ │ └── ReentrancyGuard.json
│ ├── SafeERC20.sol/
│ │ └── SafeERC20.json
│ ├── Script.sol/
│ │ └── Script.json
│ ├── StdAssertions.sol/
│ │ └── StdAssertions.json
│ ├── StdChains.sol/
│ │ └── StdChains.json
│ ├── StdCheats.sol/
│ │ ├── StdCheats.json
│ │ └── StdCheatsSafe.json
│ ├── StdConstants.sol/
│ │ └── StdConstants.json
│ ├── StdError.sol/
│ │ └── stdError.json
│ ├── StdInvariant.sol/
│ │ └── StdInvariant.json
│ ├── StdJson.sol/
│ │ └── stdJson.json
│ ├── StdMath.sol/
│ │ └── stdMath.json
│ ├── StdStorage.sol/
│ │ ├── stdStorage.json
│ │ └── stdStorageSafe.json
│ ├── StdStyle.sol/
│ │ └── StdStyle.json
│ ├── StdToml.sol/
│ │ └── stdToml.json
│ ├── StdUtils.sol/
│ │ └── StdUtils.json
│ ├── StorageSlot.sol/
│ │ └── StorageSlot.json
│ ├── SwapLib.sol/
│ │ └── SwapLib.json
│ ├── Test.sol/
│ │ └── Test.json
│ ├── UniswapV2Adapter.sol/
│ │ ├── IUniswapV2Router02.json
│ │ └── UniswapV2Adapter.json
│ ├── UniswapV3Adapter.sol/
│ │ ├── IQuoterV2.json
│ │ ├── ISwapRouter.json
│ │ └── UniswapV3Adapter.json
│ ├── Vm.sol/
│ │ ├── Vm.json
│ │ └── VmSafe.json
│ ├── build-info/
│ │ └── 6fdd73bb4b0194c66e3e513e95a2c917.json
│ ├── console.sol/
│ │ └── console.json
│ ├── draft-IERC6093.sol/
│ │ ├── IERC1155Errors.json
│ │ ├── IERC20Errors.json
│ │ └── IERC721Errors.json
│ └── safeconsole.sol/
│ └── safeconsole.json
├── script/
│ └── Deploy.s.sol
├── security-notes.md
├── src/
│ ├── CryptoForgeRouter.sol
│ ├── adapters/
│ │ ├── UniswapV2Adapter.sol
│ │ └── UniswapV3Adapter.sol
│ ├── interfaces/
│ │ ├── ICryptoForgeRouter.sol
│ │ └── IDEXAdapter.sol
│ └── libraries/
│ └── SwapLib.sol
└── test/
├── CryptoForgeRouter.t.sol
└── mocks/
├── MockDEX.sol
└── MockERC20.sol
📖 Documentation Preview README excerpt
Swap Router Contract
Multi-DEX swap router with fee-recipient monetization. Routes trades across Uniswap V2/V3 and any DEX adapter.
Product 1 of the [defi-router](../../) store. Part of the CryptoForge DeFi toolkit.
Price: $14.99 | License: MIT | Solidity: ^0.8.24 | Framework: Foundry
Overview
CryptoForgeRouter is a production-ready multi-DEX swap router that monetizes trade routing via a configurable protocol fee (0.05%-1%) sent to a fee recipient address. Built on OpenZeppelin v5 with defense-in-depth security patterns.
Key Features
- Multi-DEX routing -- Adapter pattern supports Uniswap V2/V3, SushiSwap, Curve, Balancer, and any custom DEX
- Fee-recipient monetization -- Configurable protocol fee (5-100 bps) collected on every swap
- Multi-hop swaps -- Route through intermediate tokens (A -> B -> C) with mixed adapters per hop
- Permit2 support -- Gasless token approvals via Uniswap's Permit2 signatures
- 24-hour timelock -- Fee rate changes are delayed, giving users predictability
- Emergency controls -- Pause all swaps + sweep stuck tokens
- Ownable2Step -- Two-step ownership transfer prevents accidental loss of admin control
- ReentrancyGuard + CEI -- All swap functions are reentrant-safe
- Deadline enforcement -- All swaps revert if deadline has passed
Architecture
┌─────────────────────────────────────────────────────────────────────────┐
│ CryptoForgeRouter │
│ │
│ ┌──────────────────────────┐ ┌──────────────────────────────────────┐ │
│ │ Fee Collection │ │ Adapter Registry │ │
│ │ rate: 30 bps (0.30%) │ │ UNISWAP_V2 → UniswapV2Adapter │ │
│ │ recipient: 0x... │ │ UNISWAP_V3 → UniswapV3Adapter │ │
│ │ collected on input token │ │ SUSHISWAP → SushiAdapter │ │
│ │ 24h timelock on changes │ │ CURVE → CurveAdapter │ │
│ └──────────────────────────┘ └──────────────────────────────────────┘ │
│ │
│ ┌──────────────────────────┐ ┌──────────────────────────────────────┐ │
│ │ Swap Functions │ │ Emergency Module │ │
│ │ swapExactTokensForTokens │ │ pause() — halts all swaps │ │
│ │ swapTokensForExactTokens │ │ unpause() — resumes swaps │ │
│ │ multiHopSwap │ │ sweepToken() — recover stuck funds │ │
│ │ swapWithPermit2 │ │ │ │
│ └──────────────────────────┘ └──────────────────────────────────────┘ │
│ │
│ User ──→ Router ──→ [Fee deducted] ──→ Adapter ──→ DEX ──→ User │
└─────────────────────────────────────────────────────────────────────────┘
Fee Model
The protocol fee is deducted from the input token before the swap executes. This ensures:
- Fee is always collected regardless of DEX behavior
- Fee is denominated in the token the user is selling
- No dependency on output price for fee calculation
Fee Formula
... continues with setup instructions, usage examples, and more.
📄 Code Sample .py preview
lib/forge-std/scripts/vm.py
#!/usr/bin/env python3
import argparse
import copy
import json
import re
import subprocess
from enum import Enum as PyEnum
from pathlib import Path
from typing import Callable, Optional, Union
from urllib import request
VoidFn = Callable[[], None]
CHEATCODES_JSON_URL = "https://raw.githubusercontent.com/foundry-rs/foundry/master/crates/cheatcodes/assets/cheatcodes.json"
OUT_PATH = "src/Vm.sol"
VM_SAFE_DOC = """\
/// The `VmSafe` interface does not allow manipulation of the EVM state or other actions that may
/// result in Script simulations differing from on-chain execution. It is recommended to only use
/// these cheats in scripts.
"""
VM_DOC = """\
/// The `Vm` interface does allow manipulation of the EVM state. These are all intended to be used
/// in tests, but it is not recommended to use these cheats in scripts.
"""
def main():
parser = argparse.ArgumentParser(
description="Generate Vm.sol based on the cheatcodes json created by Foundry")
parser.add_argument(
"--from",
metavar="PATH",
dest="path",
required=False,
help="path to a json file containing the Vm interface, as generated by Foundry")
args = parser.parse_args()
json_str = request.urlopen(CHEATCODES_JSON_URL).read().decode("utf-8") if args.path is None else Path(args.path).read_text()
contract = Cheatcodes.from_json(json_str)
ccs = contract.cheatcodes
ccs = list(filter(lambda cc: cc.status not in ["experimental", "internal"], ccs))
ccs.sort(key=lambda cc: cc.func.id)
safe = list(filter(lambda cc: cc.safety == "safe", ccs))
safe.sort(key=CmpCheatcode)
unsafe = list(filter(lambda cc: cc.safety == "unsafe", ccs))
unsafe.sort(key=CmpCheatcode)
# ... 587 more lines ...