diff --git a/.gitmodules b/.gitmodules index 1d2ad06..08c4a63 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,28 +1,4 @@ -[submodule "lib/forge-std"] - path = lib/forge-std - url = https://github.com/foundry-rs/forge-std - branch = v1 -[submodule "lib/openzeppelin-contracts"] - path = lib/openzeppelin-contracts - url = https://github.com/OpenZeppelin/openzeppelin-contracts - branch = release-v5.0 -[submodule "lib/openzeppelin-contracts-upgradeable"] - path = lib/openzeppelin-contracts-upgradeable - url = https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable - branch = release-v5.0 [submodule "lib/account-abstraction"] path = lib/account-abstraction url = https://github.com/eth-infinitism/account-abstraction branch = releases/v0.7 -[submodule "lib/solady"] - path = lib/solady - url = https://github.com/vectorized/solady -[submodule "lib/FreshCryptoLib"] - path = lib/FreshCryptoLib - url = https://github.com/rdubois-crypto/FreshCryptoLib -[submodule "lib/p256-verifier"] - path = lib/p256-verifier - url = https://github.com/daimo-eth/p256-verifier -[submodule "lib/modular-account-libs"] - path = lib/modular-account-libs - url = https://github.com/erc6900/modular-account-libs diff --git a/foundry.toml b/foundry.toml index b174572..ee79208 100644 --- a/foundry.toml +++ b/foundry.toml @@ -7,6 +7,8 @@ libs = ['lib'] solc_version = "0.8.24" test = 'test' via_ir = true +auto_detect_solc = false +auto_detect_remappings = false [fuzz] runs = 1024 diff --git a/lib/FreshCryptoLib b/lib/FreshCryptoLib deleted file mode 160000 index 8179e08..0000000 --- a/lib/FreshCryptoLib +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8179e08cac72072bd260796633fec41fdfd5b441 diff --git a/lib/forge-std b/lib/forge-std deleted file mode 160000 index 1714bee..0000000 --- a/lib/forge-std +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1714bee72e286e73f76e320d110e0eaf5c4e649d diff --git a/lib/modular-account-libs b/lib/modular-account-libs deleted file mode 160000 index 5d9d0e4..0000000 --- a/lib/modular-account-libs +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 5d9d0e403332251045eee2954c2a8b7ea0bae953 diff --git a/lib/openzeppelin-contracts b/lib/openzeppelin-contracts deleted file mode 160000 index dbb6104..0000000 --- a/lib/openzeppelin-contracts +++ /dev/null @@ -1 +0,0 @@ -Subproject commit dbb6104ce834628e473d2173bbc9d47f81a9eec3 diff --git a/lib/openzeppelin-contracts-upgradeable b/lib/openzeppelin-contracts-upgradeable deleted file mode 160000 index 723f8ca..0000000 --- a/lib/openzeppelin-contracts-upgradeable +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 723f8cab09cdae1aca9ec9cc1cfa040c2d4b06c1 diff --git a/lib/p256-verifier b/lib/p256-verifier deleted file mode 160000 index 607d3ec..0000000 --- a/lib/p256-verifier +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 607d3ec8377a3f59d65eca60d87dee8485d2ebcc diff --git a/lib/solady b/lib/solady deleted file mode 160000 index 4f50982..0000000 --- a/lib/solady +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 4f50982008973b1431768a75fb88ac8eca21b9f6 diff --git a/package.json b/package.json index b072a8e..f1fe5da 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,14 @@ }, "author": "circle", "license": "GPL-3.0-or-later", + "dependencies": { + "@modular-account-libs": "github:erc6900/modular-account-libs#v0.8.0-rc.0", + "@openzeppelin/contracts": "5.0.2", + "@openzeppelin/contracts-upgradeable": "5.0.2", + "fcl": "github:rdubois-crypto/FreshCryptoLib#8179e08cac72072bd260796633fec41fdfd5b441", + "forge-std": "github:foundry-rs/forge-std#v1.9.2", + "solady": "0.0.243" + }, "devDependencies": { "solhint": "^5.0.3" }, diff --git a/remappings.txt b/remappings.txt index ca12766..2f57a80 100644 --- a/remappings.txt +++ b/remappings.txt @@ -1,13 +1,7 @@ +@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/ +@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/ @account-abstraction/=lib/account-abstraction/ -@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/ -@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/ -ds-test/=lib/forge-std/lib/ds-test/src/ -eth-gas-reporter/=node_modules/eth-gas-reporter/ -forge-std/=lib/forge-std/ -hardhat/=node_modules/hardhat/ -@modular-account/=lib/modular-account/src -@solady/=lib/solady/src/ -@fcl/=lib/FreshCryptoLib/solidity/src -@p256-verifier/=lib/p256-verifier/src -@webauthn-sol/=lib/webauthn-sol/src/ -@modular-account-libs/=lib/modular-account-libs/src/ +@modular-account-libs/=node_modules/@modular-account-libs/src/ +@solady/=node_modules/solady/src/ +@fcl/=node_modules/fcl/solidity/src/ +forge-std/=node_modules/forge-std/ diff --git a/test/libs/webauthn/Utils.sol b/test/libs/webauthn/Utils.sol index 91373c3..38d193d 100644 --- a/test/libs/webauthn/Utils.sol +++ b/test/libs/webauthn/Utils.sol @@ -18,8 +18,8 @@ */ pragma solidity 0.8.24; -import {FCL_Elliptic_ZZ} from "FreshCryptoLib/FCL_elliptic.sol"; -import {Base64Url} from "FreshCryptoLib/utils/Base64Url.sol"; +import {FCL_Elliptic_ZZ} from "@fcl/FCL_elliptic.sol"; +import {Base64Url} from "@fcl/utils/Base64Url.sol"; struct WebAuthnInfo { bytes authenticatorData; diff --git a/yarn.lock b/yarn.lock index 84d5cd0..c61f83d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -25,6 +25,20 @@ js-tokens "^4.0.0" picocolors "^1.0.0" +"@modular-account-libs@github:erc6900/modular-account-libs#v0.8.0-rc.0": + version "0.8.0-rc.0" + resolved "https://codeload.github.com/erc6900/modular-account-libs/tar.gz/d64adb5bd100d6ad64d0a83b5dc13b356423d852" + +"@openzeppelin/contracts-upgradeable@5.0.2": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-5.0.2.tgz#3e5321a2ecdd0b206064356798c21225b6ec7105" + integrity sha512-0MmkHSHiW2NRFiT9/r5Lu4eJq5UJ4/tzlOgYXNAIj/ONkQTVnz22pLxDvp4C4uZ9he7ZFvGn3Driptn1/iU7tQ== + +"@openzeppelin/contracts@5.0.2": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-5.0.2.tgz#b1d03075e49290d06570b2fd42154d76c2a5d210" + integrity sha512-ytPc6eLGcHHnapAZ9S+5qsdomhjo6QBHTDRRBFfTxXIpsicMhVPouPgmUPebZZZGX7vt9USA+Z+0M0dSVtSUEA== + "@pnpm/config.env-replace@^1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@pnpm/config.env-replace/-/config.env-replace-1.1.0.tgz#ab29da53df41e8948a00f2433f085f54de8b3a4c" @@ -280,6 +294,14 @@ fast-uri@^3.0.1: resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-3.0.2.tgz#d78b298cf70fd3b752fd951175a3da6a7b48f024" integrity sha512-GR6f0hD7XXyNJa25Tb9BuIdN0tdr+0BMi6/CJPH3wJO1JjNG3n/VsSw38AwRdKZABm8lGbPfakLRkYzx2V9row== +"fcl@github:rdubois-crypto/FreshCryptoLib#8179e08cac72072bd260796633fec41fdfd5b441": + version "0.0.0" + resolved "https://codeload.github.com/rdubois-crypto/FreshCryptoLib/tar.gz/8179e08cac72072bd260796633fec41fdfd5b441" + +"forge-std@github:foundry-rs/forge-std#v1.9.2": + version "1.9.2" + resolved "https://codeload.github.com/foundry-rs/forge-std/tar.gz/1714bee72e286e73f76e320d110e0eaf5c4e649d" + form-data-encoder@^2.1.2: version "2.1.4" resolved "https://registry.yarnpkg.com/form-data-encoder/-/form-data-encoder-2.1.4.tgz#261ea35d2a70d48d30ec7a9603130fa5515e9cd5" @@ -619,6 +641,11 @@ slice-ansi@^4.0.0: astral-regex "^2.0.0" is-fullwidth-code-point "^3.0.0" +solady@0.0.243: + version "0.0.243" + resolved "https://registry.yarnpkg.com/solady/-/solady-0.0.243.tgz#f1d3063206f44111c45a987d66f68a0a72c9f60e" + integrity sha512-KwYZ79Sx+KUQ04d4dyj5P+ny1yi1LYDYv2ixZtgr43Eyn3PTvc+21do+eHG63vl4ZSREh3B3W9BAIgar68qF1A== + solhint@^5.0.3: version "5.0.3" resolved "https://registry.yarnpkg.com/solhint/-/solhint-5.0.3.tgz#b57f6d2534fe09a60f9db1b92e834363edd1cbde"