From d651e65740ed44c6156884625f6c997589de75d4 Mon Sep 17 00:00:00 2001 From: Alain Nicolas Date: Fri, 29 Sep 2023 17:50:29 +0200 Subject: [PATCH] chore: Change the repository architecture to a monorepo --- .github/workflows/lint.yml | 45 ++++ .github/workflows/smart-contracts-test.yml | 66 +++--- .gitmodules | 21 +- .husky/pre-commit | 4 +- .env.example => contracts/.env.example | 0 .../.openzeppelin}/unknown-59140.json | 0 .../.openzeppelin}/unknown-59144.json | 0 foundry.toml => contracts/foundry.toml | 3 - .../hardhat.config.ts | 0 contracts/lib/forge-std | 1 + contracts/lib/openzeppelin-contracts | 1 + .../lib/openzeppelin-contracts-upgradeable | 1 + contracts/package.json | 64 ++++++ .../script}/deploy/deployCorrectModule.ts | 0 .../script}/deploy/deployEverything.ts | 0 .../script}/deploy/deployIncorrectModule.ts | 0 .../script}/deploy/deployMsgSenderModule.ts | 0 .../script}/deploy/postDeployment.ts | 0 .../script}/recreateNetworkFile.ts | 0 .../script}/upgrade/checkUpgradeability.ts | 0 .../script}/upgrade/checkUpgradeable.ts | 0 .../script}/upgrade/forceUpgradeEverything.ts | 0 .../script}/upgrade/upgradeEverything.ts | 0 .../src}/AttestationRegistry.sol | 0 {src => contracts/src}/ModuleRegistry.sol | 0 {src => contracts/src}/PortalRegistry.sol | 0 {src => contracts/src}/Router.sol | 0 {src => contracts/src}/SchemaRegistry.sol | 0 .../src}/example/CorrectModule.sol | 0 {src => contracts/src}/example/EASPortal.sol | 0 .../src}/example/IncorrectModule.sol | 0 .../src}/example/MsgSenderModule.sol | 0 {src => contracts/src}/example/NFTPortal.sol | 0 .../src}/example/PayableModule.sol | 0 .../src}/interface/AbstractModule.sol | 0 .../src}/interface/AbstractPortal.sol | 0 {src => contracts/src}/interface/IRouter.sol | 0 .../src}/portal/DefaultPortal.sol | 0 {src => contracts/src}/types/Structs.sol | 0 .../test}/AttestationRegistry.t.sol | 0 {test => contracts/test}/ModuleRegistry.t.sol | 0 {test => contracts/test}/PortalRegistry.t.sol | 0 {test => contracts/test}/Router.t.sol | 0 {test => contracts/test}/SchemaRegistry.t.sol | 0 .../test}/example/EASPortal.t.sol | 0 .../test}/example/MsgSenderModule.t.sol | 0 .../test}/example/NFTPortal.t.sol | 0 .../test}/example/PayableModule.t.sol | 0 .../integration/AttestationRegistryMass.t.sol | 0 .../test}/mocks/AttestationRegistryMock.sol | 0 .../test}/mocks/InvalidPortalMock.sol | 0 .../test}/mocks/ModuleRegistryMock.sol | 0 .../test}/mocks/PortalRegistryMock.sol | 0 .../test}/mocks/SchemaRegistryMock.sol | 0 .../test}/mocks/ValidPortalMock.sol | 0 .../test}/portal/DefaultPortal.t.sol | 0 lib/forge-std | 1 - lib/openzeppelin-contracts | 1 - lib/openzeppelin-contracts-upgradeable | 1 - package.json | 59 +----- pnpm-lock.yaml | 193 +++++++++--------- pnpm-workspace.yaml | 2 +- remappings.txt | 5 - subgraph/package.json | 5 +- subgraph/tsconfig.json | 3 +- tsconfig.json | 12 ++ 66 files changed, 269 insertions(+), 219 deletions(-) create mode 100644 .github/workflows/lint.yml rename .env.example => contracts/.env.example (100%) rename {.openzeppelin => contracts/.openzeppelin}/unknown-59140.json (100%) rename {.openzeppelin => contracts/.openzeppelin}/unknown-59144.json (100%) rename foundry.toml => contracts/foundry.toml (67%) rename hardhat.config.ts => contracts/hardhat.config.ts (100%) create mode 160000 contracts/lib/forge-std create mode 160000 contracts/lib/openzeppelin-contracts create mode 160000 contracts/lib/openzeppelin-contracts-upgradeable create mode 100644 contracts/package.json rename {script => contracts/script}/deploy/deployCorrectModule.ts (100%) rename {script => contracts/script}/deploy/deployEverything.ts (100%) rename {script => contracts/script}/deploy/deployIncorrectModule.ts (100%) rename {script => contracts/script}/deploy/deployMsgSenderModule.ts (100%) rename {script => contracts/script}/deploy/postDeployment.ts (100%) rename {script => contracts/script}/recreateNetworkFile.ts (100%) rename {script => contracts/script}/upgrade/checkUpgradeability.ts (100%) rename {script => contracts/script}/upgrade/checkUpgradeable.ts (100%) rename {script => contracts/script}/upgrade/forceUpgradeEverything.ts (100%) rename {script => contracts/script}/upgrade/upgradeEverything.ts (100%) rename {src => contracts/src}/AttestationRegistry.sol (100%) rename {src => contracts/src}/ModuleRegistry.sol (100%) rename {src => contracts/src}/PortalRegistry.sol (100%) rename {src => contracts/src}/Router.sol (100%) rename {src => contracts/src}/SchemaRegistry.sol (100%) rename {src => contracts/src}/example/CorrectModule.sol (100%) rename {src => contracts/src}/example/EASPortal.sol (100%) rename {src => contracts/src}/example/IncorrectModule.sol (100%) rename {src => contracts/src}/example/MsgSenderModule.sol (100%) rename {src => contracts/src}/example/NFTPortal.sol (100%) rename {src => contracts/src}/example/PayableModule.sol (100%) rename {src => contracts/src}/interface/AbstractModule.sol (100%) rename {src => contracts/src}/interface/AbstractPortal.sol (100%) rename {src => contracts/src}/interface/IRouter.sol (100%) rename {src => contracts/src}/portal/DefaultPortal.sol (100%) rename {src => contracts/src}/types/Structs.sol (100%) rename {test => contracts/test}/AttestationRegistry.t.sol (100%) rename {test => contracts/test}/ModuleRegistry.t.sol (100%) rename {test => contracts/test}/PortalRegistry.t.sol (100%) rename {test => contracts/test}/Router.t.sol (100%) rename {test => contracts/test}/SchemaRegistry.t.sol (100%) rename {test => contracts/test}/example/EASPortal.t.sol (100%) rename {test => contracts/test}/example/MsgSenderModule.t.sol (100%) rename {test => contracts/test}/example/NFTPortal.t.sol (100%) rename {test => contracts/test}/example/PayableModule.t.sol (100%) rename {test => contracts/test}/integration/AttestationRegistryMass.t.sol (100%) rename {test => contracts/test}/mocks/AttestationRegistryMock.sol (100%) rename {test => contracts/test}/mocks/InvalidPortalMock.sol (100%) rename {test => contracts/test}/mocks/ModuleRegistryMock.sol (100%) rename {test => contracts/test}/mocks/PortalRegistryMock.sol (100%) rename {test => contracts/test}/mocks/SchemaRegistryMock.sol (100%) rename {test => contracts/test}/mocks/ValidPortalMock.sol (100%) rename {test => contracts/test}/portal/DefaultPortal.t.sol (100%) delete mode 160000 lib/forge-std delete mode 160000 lib/openzeppelin-contracts delete mode 160000 lib/openzeppelin-contracts-upgradeable delete mode 100644 remappings.txt diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..b8c0fe08 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,45 @@ +name: Lint + +on: + pull_request: + branches: + - main + - dev + - release/* + push: + branches: + - main + - dev + - release/* + +jobs: + lint: + runs-on: "ubuntu-latest" + steps: + - name: "Check out the repo" + uses: "actions/checkout@v3" + + - name: "Install Pnpm" + uses: "pnpm/action-setup@v2" + with: + version: "8" + + - name: "Install Node.js" + uses: "actions/setup-node@v3" + with: + cache: "pnpm" + node-version: "lts/*" + + - name: "Install the Node.js dependencies" + run: "pnpm install" + + - name: "Check code linting" + run: "pnpm -r run lint" + + - name: "Run Prettier" + run: "pnpm run prettier" + + - name: "Add lint summary" + run: | + echo "## Lint result" >> $GITHUB_STEP_SUMMARY + echo "✅ Passed" >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/smart-contracts-test.yml b/.github/workflows/smart-contracts-test.yml index 964d50d8..54178b78 100644 --- a/.github/workflows/smart-contracts-test.yml +++ b/.github/workflows/smart-contracts-test.yml @@ -1,4 +1,4 @@ -name: Smart Contracts Test +name: Smart Contracts on: pull_request: @@ -16,39 +16,13 @@ env: FOUNDRY_PROFILE: ci jobs: - lint: - runs-on: "ubuntu-latest" - steps: - - name: "Check out the repo" - uses: "actions/checkout@v3" - - - name: "Install Foundry" - uses: "foundry-rs/foundry-toolchain@v1" - - - name: "Install Pnpm" - uses: "pnpm/action-setup@v2" - with: - version: "8" - - - name: "Install Node.js" - uses: "actions/setup-node@v3" - with: - cache: "pnpm" - node-version: "lts/*" - - - name: "Install the Node.js dependencies" - run: "pnpm install" - - - name: "Lint the contracts" - run: "pnpm lint" - - - name: "Add lint summary" - run: | - echo "## Lint result" >> $GITHUB_STEP_SUMMARY - echo "✅ Passed" >> $GITHUB_STEP_SUMMARY - build: + defaults: + run: + working-directory: contracts + runs-on: "ubuntu-latest" + steps: - name: "Check out the repo" uses: "actions/checkout@v3" @@ -70,10 +44,17 @@ jobs: echo "✅ Passed" >> $GITHUB_STEP_SUMMARY test-unit: + defaults: + run: + working-directory: contracts + env: FOUNDRY_FUZZ_RUNS: "5000" - needs: ["lint", "build"] + + needs: ["build"] + runs-on: "ubuntu-latest" + steps: - name: "Check out the repo" uses: "actions/checkout@v3" @@ -84,7 +65,7 @@ jobs: uses: "foundry-rs/foundry-toolchain@v1" - name: "Run the unit tests" - run: 'forge test --match-path "test/*"' + run: "forge test" - name: "Add test summary" run: | @@ -92,8 +73,10 @@ jobs: echo "✅ Passed" >> $GITHUB_STEP_SUMMARY coverage: - needs: ["lint", "build"] + needs: ["build"] + runs-on: "ubuntu-latest" + steps: - name: "Check out the repo" uses: "actions/checkout@v3" @@ -104,7 +87,10 @@ jobs: uses: "foundry-rs/foundry-toolchain@v1" - name: "Generate the coverage report using the unit tests" - run: 'forge coverage --match-path "test/**/*.sol" --report lcov' + run: "cd contracts && forge coverage --report lcov" + + - name: "ls" + run: "cp contracts/lcov.info ." - name: "Upload coverage report to Codecov" uses: "codecov/codecov-action@v3" @@ -126,8 +112,14 @@ jobs: echo "✅ Uploaded to Codecov" >> $GITHUB_STEP_SUMMARY upgradeability: - needs: ["lint", "build"] + defaults: + run: + working-directory: contracts + + needs: ["build"] + runs-on: "ubuntu-latest" + steps: - name: "Check out the repo" uses: "actions/checkout@v3" diff --git a/.gitmodules b/.gitmodules index 5ee5fc62..5fd4b0ed 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,11 +1,12 @@ -[submodule "lib/forge-std"] - branch = "v1" - path = "lib/forge-std" - url = "https://github.com/foundry-rs/forge-std" -[submodule "lib/openzeppelin-contracts-upgradeable"] - branch = "release-v4.9" - path = "lib/openzeppelin-contracts-upgradeable" - url = "https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable" -[submodule "lib/openzeppelin-contracts"] - path = lib/openzeppelin-contracts +[submodule "contracts/lib/forge-std"] + branch = "v1" + path = contracts/lib/forge-std + url = https://github.com/foundry-rs/forge-std +[submodule "contracts/lib/openzeppelin-contracts-upgradeable"] + branch = "release-v4.9" + path = contracts/lib/openzeppelin-contracts-upgradeable + url = https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable +[submodule "contracts/lib/openzeppelin-contracts"] + branch = "release-v4.9" + path = contracts/lib/openzeppelin-contracts url = https://github.com/OpenZeppelin/openzeppelin-contracts diff --git a/.husky/pre-commit b/.husky/pre-commit index 247c370d..36f3cf6f 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -2,5 +2,5 @@ . "$(dirname -- "$0")/_/husky.sh" pnpm run prettier:write -pnpm run lint -pnpm run test +pnpm -r run lint +pnpm -r run test diff --git a/.env.example b/contracts/.env.example similarity index 100% rename from .env.example rename to contracts/.env.example diff --git a/.openzeppelin/unknown-59140.json b/contracts/.openzeppelin/unknown-59140.json similarity index 100% rename from .openzeppelin/unknown-59140.json rename to contracts/.openzeppelin/unknown-59140.json diff --git a/.openzeppelin/unknown-59144.json b/contracts/.openzeppelin/unknown-59144.json similarity index 100% rename from .openzeppelin/unknown-59144.json rename to contracts/.openzeppelin/unknown-59144.json diff --git a/foundry.toml b/contracts/foundry.toml similarity index 67% rename from foundry.toml rename to contracts/foundry.toml index 9ed221ce..e42ad57f 100644 --- a/foundry.toml +++ b/contracts/foundry.toml @@ -8,6 +8,3 @@ linea_goerli = "${LINEA_GOERLI_RPC_URL}" [etherscan] linea_goerli = { key = "${ETHERSCAN_API_KEY}" } - - -# See more config options https://github.com/foundry-rs/foundry/tree/master/config diff --git a/hardhat.config.ts b/contracts/hardhat.config.ts similarity index 100% rename from hardhat.config.ts rename to contracts/hardhat.config.ts diff --git a/contracts/lib/forge-std b/contracts/lib/forge-std new file mode 160000 index 00000000..1d9650e9 --- /dev/null +++ b/contracts/lib/forge-std @@ -0,0 +1 @@ +Subproject commit 1d9650e951204a0ddce9ff89c32f1997984cef4d diff --git a/contracts/lib/openzeppelin-contracts b/contracts/lib/openzeppelin-contracts new file mode 160000 index 00000000..98c7a4cf --- /dev/null +++ b/contracts/lib/openzeppelin-contracts @@ -0,0 +1 @@ +Subproject commit 98c7a4cf958f7014e3c5347aeb0678b585eb870d diff --git a/contracts/lib/openzeppelin-contracts-upgradeable b/contracts/lib/openzeppelin-contracts-upgradeable new file mode 160000 index 00000000..5bc59992 --- /dev/null +++ b/contracts/lib/openzeppelin-contracts-upgradeable @@ -0,0 +1 @@ +Subproject commit 5bc59992591b84bba18dc1ac46942f1886b30ccd diff --git a/contracts/package.json b/contracts/package.json new file mode 100644 index 00000000..c8676759 --- /dev/null +++ b/contracts/package.json @@ -0,0 +1,64 @@ +{ + "name": "linea-attestation-registry-contracts", + "version": "0.0.1", + "description": "Verax Attestation Registry core smart contracts", + "keywords": [ + "linea-attestation-registry", + "blockchain", + "attestation", + "ethereum", + "foundry", + "smart-contracts", + "solidity" + ], + "repository": "github.com/Consensys/linea-attestation-registry", + "license": "MIT", + "author": "Consensys", + "files": [ + "src" + ], + "scripts": { + "build": "forge build", + "check:upgradeability": "npx hardhat run script/upgrade/checkUpgradeability.ts", + "check:upgradeability:ci": "cp .env.example .env && pnpm run check:upgradeability", + "check:upgradeable": "npx hardhat run --network linea script/upgrade/checkUpgradeable.ts", + "check:upgradeable:goerli": "npx hardhat run --network linea-goerli script/upgrade/checkUpgradeable.ts", + "clean": "rm -rf lcov.info coverage artifacts cache_hardhat cache out typechain-types", + "deploy:CorrectModule": "npx hardhat run --network linea script/deploy/deployCorrectModule.ts", + "deploy:CorrectModule:goerli": "npx hardhat run --network linea-goerli script/deploy/deployCorrectModule.ts", + "deploy:IncorrectModule": "npx hardhat run --network linea script/deploy/deployIncorrectModule.ts", + "deploy:IncorrectModule:goerli": "npx hardhat run --network linea-goerli script/deploy/deployIncorrectModule.ts", + "deploy:MsgSenderModule": "npx hardhat run --network linea script/deploy/deployMsgSenderModule.ts", + "deploy:MsgSenderModule:goerli": "npx hardhat run --network linea-goerli script/deploy/deployMsgSenderModule.ts", + "deploy:all": "npx hardhat run --network linea script/deploy/deployEverything.ts", + "deploy:all:goerli": "npx hardhat run --network linea-goerli script/deploy/deployEverything.ts", + "deploy:post": "npx hardhat run --network linea script/deploy/postDeployment.ts", + "deploy:post:goerli": "npx hardhat run --network linea-goerli script/deploy/postDeployment.ts", + "lint": "pnpm solhint \"{script,src,test}/**/*.sol\"", + "reimport": "npx hardhat run --network linea script/recreateNetworkFile.ts", + "reimport:goerli": "npx hardhat run --network linea-goerli script/recreateNetworkFile.ts", + "test": "forge test", + "upgrade:all": "npx hardhat run --network linea script/upgrade/upgradeEverything.ts", + "upgrade:all:force": "npx hardhat run --network linea script/upgrade/forceUgradeEverything.ts", + "upgrade:all:goerli": "npx hardhat run --network linea-goerli script/upgrade/upgradeEverything.ts", + "upgrade:all:goerli:force": "npx hardhat run --network linea-goerli script/upgrade/forceUgradeEverything.ts" + }, + "devDependencies": { + "@nomicfoundation/hardhat-ethers": "^3.0.4", + "@nomicfoundation/hardhat-foundry": "^1.1.1", + "@nomicfoundation/hardhat-toolbox": "^3.0.0", + "@openzeppelin/hardhat-upgrades": "^2.2.1", + "dotenv": "^16.3.1", + "ethers": "^6.7.1", + "hardhat": "^2.17.2", + "solhint": "^3.6.2", + "solhint-plugin-prettier": "^0.0.5" + }, + "pnpm": { + "overrides": { + "flat@<5.0.1": ">=5.0.1", + "tough-cookie@<4.1.3": ">=4.1.3", + "minimatch@<3.0.5": ">=3.0.5" + } + } +} diff --git a/script/deploy/deployCorrectModule.ts b/contracts/script/deploy/deployCorrectModule.ts similarity index 100% rename from script/deploy/deployCorrectModule.ts rename to contracts/script/deploy/deployCorrectModule.ts diff --git a/script/deploy/deployEverything.ts b/contracts/script/deploy/deployEverything.ts similarity index 100% rename from script/deploy/deployEverything.ts rename to contracts/script/deploy/deployEverything.ts diff --git a/script/deploy/deployIncorrectModule.ts b/contracts/script/deploy/deployIncorrectModule.ts similarity index 100% rename from script/deploy/deployIncorrectModule.ts rename to contracts/script/deploy/deployIncorrectModule.ts diff --git a/script/deploy/deployMsgSenderModule.ts b/contracts/script/deploy/deployMsgSenderModule.ts similarity index 100% rename from script/deploy/deployMsgSenderModule.ts rename to contracts/script/deploy/deployMsgSenderModule.ts diff --git a/script/deploy/postDeployment.ts b/contracts/script/deploy/postDeployment.ts similarity index 100% rename from script/deploy/postDeployment.ts rename to contracts/script/deploy/postDeployment.ts diff --git a/script/recreateNetworkFile.ts b/contracts/script/recreateNetworkFile.ts similarity index 100% rename from script/recreateNetworkFile.ts rename to contracts/script/recreateNetworkFile.ts diff --git a/script/upgrade/checkUpgradeability.ts b/contracts/script/upgrade/checkUpgradeability.ts similarity index 100% rename from script/upgrade/checkUpgradeability.ts rename to contracts/script/upgrade/checkUpgradeability.ts diff --git a/script/upgrade/checkUpgradeable.ts b/contracts/script/upgrade/checkUpgradeable.ts similarity index 100% rename from script/upgrade/checkUpgradeable.ts rename to contracts/script/upgrade/checkUpgradeable.ts diff --git a/script/upgrade/forceUpgradeEverything.ts b/contracts/script/upgrade/forceUpgradeEverything.ts similarity index 100% rename from script/upgrade/forceUpgradeEverything.ts rename to contracts/script/upgrade/forceUpgradeEverything.ts diff --git a/script/upgrade/upgradeEverything.ts b/contracts/script/upgrade/upgradeEverything.ts similarity index 100% rename from script/upgrade/upgradeEverything.ts rename to contracts/script/upgrade/upgradeEverything.ts diff --git a/src/AttestationRegistry.sol b/contracts/src/AttestationRegistry.sol similarity index 100% rename from src/AttestationRegistry.sol rename to contracts/src/AttestationRegistry.sol diff --git a/src/ModuleRegistry.sol b/contracts/src/ModuleRegistry.sol similarity index 100% rename from src/ModuleRegistry.sol rename to contracts/src/ModuleRegistry.sol diff --git a/src/PortalRegistry.sol b/contracts/src/PortalRegistry.sol similarity index 100% rename from src/PortalRegistry.sol rename to contracts/src/PortalRegistry.sol diff --git a/src/Router.sol b/contracts/src/Router.sol similarity index 100% rename from src/Router.sol rename to contracts/src/Router.sol diff --git a/src/SchemaRegistry.sol b/contracts/src/SchemaRegistry.sol similarity index 100% rename from src/SchemaRegistry.sol rename to contracts/src/SchemaRegistry.sol diff --git a/src/example/CorrectModule.sol b/contracts/src/example/CorrectModule.sol similarity index 100% rename from src/example/CorrectModule.sol rename to contracts/src/example/CorrectModule.sol diff --git a/src/example/EASPortal.sol b/contracts/src/example/EASPortal.sol similarity index 100% rename from src/example/EASPortal.sol rename to contracts/src/example/EASPortal.sol diff --git a/src/example/IncorrectModule.sol b/contracts/src/example/IncorrectModule.sol similarity index 100% rename from src/example/IncorrectModule.sol rename to contracts/src/example/IncorrectModule.sol diff --git a/src/example/MsgSenderModule.sol b/contracts/src/example/MsgSenderModule.sol similarity index 100% rename from src/example/MsgSenderModule.sol rename to contracts/src/example/MsgSenderModule.sol diff --git a/src/example/NFTPortal.sol b/contracts/src/example/NFTPortal.sol similarity index 100% rename from src/example/NFTPortal.sol rename to contracts/src/example/NFTPortal.sol diff --git a/src/example/PayableModule.sol b/contracts/src/example/PayableModule.sol similarity index 100% rename from src/example/PayableModule.sol rename to contracts/src/example/PayableModule.sol diff --git a/src/interface/AbstractModule.sol b/contracts/src/interface/AbstractModule.sol similarity index 100% rename from src/interface/AbstractModule.sol rename to contracts/src/interface/AbstractModule.sol diff --git a/src/interface/AbstractPortal.sol b/contracts/src/interface/AbstractPortal.sol similarity index 100% rename from src/interface/AbstractPortal.sol rename to contracts/src/interface/AbstractPortal.sol diff --git a/src/interface/IRouter.sol b/contracts/src/interface/IRouter.sol similarity index 100% rename from src/interface/IRouter.sol rename to contracts/src/interface/IRouter.sol diff --git a/src/portal/DefaultPortal.sol b/contracts/src/portal/DefaultPortal.sol similarity index 100% rename from src/portal/DefaultPortal.sol rename to contracts/src/portal/DefaultPortal.sol diff --git a/src/types/Structs.sol b/contracts/src/types/Structs.sol similarity index 100% rename from src/types/Structs.sol rename to contracts/src/types/Structs.sol diff --git a/test/AttestationRegistry.t.sol b/contracts/test/AttestationRegistry.t.sol similarity index 100% rename from test/AttestationRegistry.t.sol rename to contracts/test/AttestationRegistry.t.sol diff --git a/test/ModuleRegistry.t.sol b/contracts/test/ModuleRegistry.t.sol similarity index 100% rename from test/ModuleRegistry.t.sol rename to contracts/test/ModuleRegistry.t.sol diff --git a/test/PortalRegistry.t.sol b/contracts/test/PortalRegistry.t.sol similarity index 100% rename from test/PortalRegistry.t.sol rename to contracts/test/PortalRegistry.t.sol diff --git a/test/Router.t.sol b/contracts/test/Router.t.sol similarity index 100% rename from test/Router.t.sol rename to contracts/test/Router.t.sol diff --git a/test/SchemaRegistry.t.sol b/contracts/test/SchemaRegistry.t.sol similarity index 100% rename from test/SchemaRegistry.t.sol rename to contracts/test/SchemaRegistry.t.sol diff --git a/test/example/EASPortal.t.sol b/contracts/test/example/EASPortal.t.sol similarity index 100% rename from test/example/EASPortal.t.sol rename to contracts/test/example/EASPortal.t.sol diff --git a/test/example/MsgSenderModule.t.sol b/contracts/test/example/MsgSenderModule.t.sol similarity index 100% rename from test/example/MsgSenderModule.t.sol rename to contracts/test/example/MsgSenderModule.t.sol diff --git a/test/example/NFTPortal.t.sol b/contracts/test/example/NFTPortal.t.sol similarity index 100% rename from test/example/NFTPortal.t.sol rename to contracts/test/example/NFTPortal.t.sol diff --git a/test/example/PayableModule.t.sol b/contracts/test/example/PayableModule.t.sol similarity index 100% rename from test/example/PayableModule.t.sol rename to contracts/test/example/PayableModule.t.sol diff --git a/test/integration/AttestationRegistryMass.t.sol b/contracts/test/integration/AttestationRegistryMass.t.sol similarity index 100% rename from test/integration/AttestationRegistryMass.t.sol rename to contracts/test/integration/AttestationRegistryMass.t.sol diff --git a/test/mocks/AttestationRegistryMock.sol b/contracts/test/mocks/AttestationRegistryMock.sol similarity index 100% rename from test/mocks/AttestationRegistryMock.sol rename to contracts/test/mocks/AttestationRegistryMock.sol diff --git a/test/mocks/InvalidPortalMock.sol b/contracts/test/mocks/InvalidPortalMock.sol similarity index 100% rename from test/mocks/InvalidPortalMock.sol rename to contracts/test/mocks/InvalidPortalMock.sol diff --git a/test/mocks/ModuleRegistryMock.sol b/contracts/test/mocks/ModuleRegistryMock.sol similarity index 100% rename from test/mocks/ModuleRegistryMock.sol rename to contracts/test/mocks/ModuleRegistryMock.sol diff --git a/test/mocks/PortalRegistryMock.sol b/contracts/test/mocks/PortalRegistryMock.sol similarity index 100% rename from test/mocks/PortalRegistryMock.sol rename to contracts/test/mocks/PortalRegistryMock.sol diff --git a/test/mocks/SchemaRegistryMock.sol b/contracts/test/mocks/SchemaRegistryMock.sol similarity index 100% rename from test/mocks/SchemaRegistryMock.sol rename to contracts/test/mocks/SchemaRegistryMock.sol diff --git a/test/mocks/ValidPortalMock.sol b/contracts/test/mocks/ValidPortalMock.sol similarity index 100% rename from test/mocks/ValidPortalMock.sol rename to contracts/test/mocks/ValidPortalMock.sol diff --git a/test/portal/DefaultPortal.t.sol b/contracts/test/portal/DefaultPortal.t.sol similarity index 100% rename from test/portal/DefaultPortal.t.sol rename to contracts/test/portal/DefaultPortal.t.sol diff --git a/lib/forge-std b/lib/forge-std deleted file mode 160000 index 74cfb77e..00000000 --- a/lib/forge-std +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 74cfb77e308dd188d2f58864aaf44963ae6b88b1 diff --git a/lib/openzeppelin-contracts b/lib/openzeppelin-contracts deleted file mode 160000 index fd81a96f..00000000 --- a/lib/openzeppelin-contracts +++ /dev/null @@ -1 +0,0 @@ -Subproject commit fd81a96f01cc42ef1c9a5399364968d0e07e9e90 diff --git a/lib/openzeppelin-contracts-upgradeable b/lib/openzeppelin-contracts-upgradeable deleted file mode 160000 index f34a3a7e..00000000 --- a/lib/openzeppelin-contracts-upgradeable +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f34a3a7e5a1d698d87d517fda698d48286310bee diff --git a/package.json b/package.json index 61483ac9..580a02d3 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "linea-attestation-registry", "version": "0.0.1", - "description": "Core smart contracts to read and write attestations on Linea", + "description": "Verax is a shared on-chain attestation registry", "keywords": [ "linea-attestation-registry", "blockchain", @@ -14,61 +14,18 @@ "repository": "github.com/Consensys/linea-attestation-registry", "license": "MIT", "author": "Consensys", - "files": [ - "src" - ], "scripts": { - "build": "forge build", - "check:upgradeability": "npx hardhat run script/upgrade/checkUpgradeability.ts", - "check:upgradeability:ci": "cp .env.example .env && pnpm run check:upgradeability", - "check:upgradeable": "npx hardhat run --network linea script/upgrade/checkUpgradeable.ts", - "check:upgradeable:goerli": "npx hardhat run --network linea-goerli script/upgrade/checkUpgradeable.ts", - "clean": "rm -rf lcov.info coverage artifacts cache_hardhat cache out typechain-types", - "deploy:CorrectModule": "npx hardhat run --network linea script/deploy/deployCorrectModule.ts", - "deploy:CorrectModule:goerli": "npx hardhat run --network linea-goerli script/deploy/deployCorrectModule.ts", - "deploy:IncorrectModule": "npx hardhat run --network linea script/deploy/deployIncorrectModule.ts", - "deploy:IncorrectModule:goerli": "npx hardhat run --network linea-goerli script/deploy/deployIncorrectModule.ts", - "deploy:MsgSenderModule": "npx hardhat run --network linea script/deploy/deployMsgSenderModule.ts", - "deploy:MsgSenderModule:goerli": "npx hardhat run --network linea-goerli script/deploy/deployMsgSenderModule.ts", - "deploy:all": "npx hardhat run --network linea script/deploy/deployEverything.ts", - "deploy:all:goerli": "npx hardhat run --network linea-goerli script/deploy/deployEverything.ts", - "deploy:post": "npx hardhat run --network linea script/deploy/postDeployment.ts", - "deploy:post:goerli": "npx hardhat run --network linea-goerli script/deploy/postDeployment.ts", - "lint": "pnpm lint:sol && eslint . && pnpm prettier:check", - "lint:sol": "pnpm solhint \"{script,src,test}/**/*.sol\"", + "lint": "eslint .", "prepare": "husky install", - "prettier:check": "prettier --check \"**/*.{json,md,svg,yml,sol,ts}\"", - "prettier:write": "prettier --write \"**/*.{json,md,svg,yml,sol,ts}\"", - "reimport": "npx hardhat run --network linea script/recreateNetworkFile.ts", - "reimport:goerli": "npx hardhat run --network linea-goerli script/recreateNetworkFile.ts", - "test": "forge test", - "upgrade:all": "npx hardhat run --network linea script/upgrade/upgradeEverything.ts", - "upgrade:all:force": "npx hardhat run --network linea script/upgrade/forceUgradeEverything.ts", - "upgrade:all:goerli": "npx hardhat run --network linea-goerli script/upgrade/upgradeEverything.ts", - "upgrade:all:goerli:force": "npx hardhat run --network linea-goerli script/upgrade/forceUgradeEverything.ts" + "prettier": "prettier --check \"**/*.{json,md,svg,yml,sol,ts}\"", + "prettier:write": "prettier --write \"**/*.{json,md,svg,yml,sol,ts}\"" }, "devDependencies": { - "@nomicfoundation/hardhat-ethers": "^3.0.4", - "@nomicfoundation/hardhat-foundry": "^1.1.1", - "@nomicfoundation/hardhat-toolbox": "^3.0.0", - "@openzeppelin/hardhat-upgrades": "^2.2.1", - "@typescript-eslint/eslint-plugin": "^6.6.0", - "@typescript-eslint/parser": "^6.6.0", - "dotenv": "^16.3.1", - "eslint": "^8.49.0", - "ethers": "^6.7.1", - "hardhat": "^2.17.2", + "@typescript-eslint/eslint-plugin": "^6.7.3", + "@typescript-eslint/parser": "^6.7.3", + "eslint": "^8.50.0", "husky": "^8.0.3", "prettier": "^2.8.8", - "prettier-plugin-solidity": "^1.1.3", - "solhint": "^3.6.2", - "solhint-plugin-prettier": "^0.0.5" - }, - "pnpm": { - "overrides": { - "flat@<5.0.1": ">=5.0.1", - "tough-cookie@<4.1.3": ">=4.1.3", - "minimatch@<3.0.5": ">=3.0.5" - } + "prettier-plugin-solidity": "^1.1.3" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e170db4d..1154380a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,14 +4,30 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false -overrides: - flat@<5.0.1: '>=5.0.1' - tough-cookie@<4.1.3: '>=4.1.3' - minimatch@<3.0.5: '>=3.0.5' - importers: .: + devDependencies: + '@typescript-eslint/eslint-plugin': + specifier: ^6.7.3 + version: 6.7.3(@typescript-eslint/parser@6.7.3)(eslint@8.50.0)(typescript@5.2.2) + '@typescript-eslint/parser': + specifier: ^6.7.3 + version: 6.7.3(eslint@8.50.0)(typescript@5.2.2) + eslint: + specifier: ^8.50.0 + version: 8.50.0 + husky: + specifier: ^8.0.3 + version: 8.0.3 + prettier: + specifier: ^2.8.8 + version: 2.8.8 + prettier-plugin-solidity: + specifier: ^1.1.3 + version: 1.1.3(prettier@2.8.8) + + contracts: devDependencies: '@nomicfoundation/hardhat-ethers': specifier: ^3.0.4 @@ -25,33 +41,15 @@ importers: '@openzeppelin/hardhat-upgrades': specifier: ^2.2.1 version: 2.2.1(@nomicfoundation/hardhat-ethers@3.0.4)(@nomicfoundation/hardhat-verify@1.1.1)(ethers@6.7.1)(hardhat@2.17.2) - '@typescript-eslint/eslint-plugin': - specifier: ^6.6.0 - version: 6.6.0(@typescript-eslint/parser@6.6.0)(eslint@8.49.0)(typescript@5.2.2) - '@typescript-eslint/parser': - specifier: ^6.6.0 - version: 6.6.0(eslint@8.49.0)(typescript@5.2.2) dotenv: specifier: ^16.3.1 version: 16.3.1 - eslint: - specifier: ^8.49.0 - version: 8.49.0 ethers: specifier: ^6.7.1 version: 6.7.1 hardhat: specifier: ^2.17.2 version: 2.17.2(ts-node@10.9.1)(typescript@5.2.2) - husky: - specifier: ^8.0.3 - version: 8.0.3 - prettier: - specifier: ^2.8.8 - version: 2.8.8 - prettier-plugin-solidity: - specifier: ^1.1.3 - version: 1.1.3(prettier@2.8.8) solhint: specifier: ^3.6.2 version: 3.6.2 @@ -172,13 +170,13 @@ packages: '@jridgewell/trace-mapping': 0.3.9 dev: true - /@eslint-community/eslint-utils@4.4.0(eslint@8.49.0): + /@eslint-community/eslint-utils@4.4.0(eslint@8.50.0): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 dependencies: - eslint: 8.49.0 + eslint: 8.50.0 eslint-visitor-keys: 3.4.3 dev: true @@ -204,8 +202,8 @@ packages: - supports-color dev: true - /@eslint/js@8.49.0: - resolution: {integrity: sha512-1S8uAY/MTJqVx0SC4epBq+N2yhuwtNwLbJYNZyhL2pO1ZVKn5HFXav5T41Ryzy9K9V7ZId2JB2oy/W4aCd9/2w==} + /@eslint/js@8.50.0: + resolution: {integrity: sha512-NCC3zz2+nvYd+Ckfh87rA47zfu2QsQpvc6k1yzTk+b9KzRj0wkGa8LSoGOXN6Zv4lRf/EIoZ80biDh9HOI+RNQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true @@ -1681,8 +1679,8 @@ packages: '@types/node': 20.5.7 dev: true - /@typescript-eslint/eslint-plugin@6.6.0(@typescript-eslint/parser@6.6.0)(eslint@8.49.0)(typescript@5.2.2): - resolution: {integrity: sha512-CW9YDGTQnNYMIo5lMeuiIG08p4E0cXrXTbcZ2saT/ETE7dWUrNxlijsQeU04qAAKkILiLzdQz+cGFxCJjaZUmA==} + /@typescript-eslint/eslint-plugin@6.7.3(@typescript-eslint/parser@6.7.3)(eslint@8.50.0)(typescript@5.2.2): + resolution: {integrity: sha512-vntq452UHNltxsaaN+L9WyuMch8bMd9CqJ3zhzTPXXidwbf5mqqKCVXEuvRZUqLJSTLeWE65lQwyXsRGnXkCTA==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha @@ -1693,13 +1691,13 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.8.0 - '@typescript-eslint/parser': 6.6.0(eslint@8.49.0)(typescript@5.2.2) - '@typescript-eslint/scope-manager': 6.6.0 - '@typescript-eslint/type-utils': 6.6.0(eslint@8.49.0)(typescript@5.2.2) - '@typescript-eslint/utils': 6.6.0(eslint@8.49.0)(typescript@5.2.2) - '@typescript-eslint/visitor-keys': 6.6.0 + '@typescript-eslint/parser': 6.7.3(eslint@8.50.0)(typescript@5.2.2) + '@typescript-eslint/scope-manager': 6.7.3 + '@typescript-eslint/type-utils': 6.7.3(eslint@8.50.0)(typescript@5.2.2) + '@typescript-eslint/utils': 6.7.3(eslint@8.50.0)(typescript@5.2.2) + '@typescript-eslint/visitor-keys': 6.7.3 debug: 4.3.4(supports-color@8.1.1) - eslint: 8.49.0 + eslint: 8.50.0 graphemer: 1.4.0 ignore: 5.2.4 natural-compare: 1.4.0 @@ -1710,8 +1708,8 @@ packages: - supports-color dev: true - /@typescript-eslint/parser@6.6.0(eslint@8.49.0)(typescript@5.2.2): - resolution: {integrity: sha512-setq5aJgUwtzGrhW177/i+DMLqBaJbdwGj2CPIVFFLE0NCliy5ujIdLHd2D1ysmlmsjdL2GWW+hR85neEfc12w==} + /@typescript-eslint/parser@6.7.3(eslint@8.50.0)(typescript@5.2.2): + resolution: {integrity: sha512-TlutE+iep2o7R8Lf+yoer3zU6/0EAUc8QIBB3GYBc1KGz4c4TRm83xwXUZVPlZ6YCLss4r77jbu6j3sendJoiQ==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -1720,27 +1718,27 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 6.6.0 - '@typescript-eslint/types': 6.6.0 - '@typescript-eslint/typescript-estree': 6.6.0(typescript@5.2.2) - '@typescript-eslint/visitor-keys': 6.6.0 + '@typescript-eslint/scope-manager': 6.7.3 + '@typescript-eslint/types': 6.7.3 + '@typescript-eslint/typescript-estree': 6.7.3(typescript@5.2.2) + '@typescript-eslint/visitor-keys': 6.7.3 debug: 4.3.4(supports-color@8.1.1) - eslint: 8.49.0 + eslint: 8.50.0 typescript: 5.2.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/scope-manager@6.6.0: - resolution: {integrity: sha512-pT08u5W/GT4KjPUmEtc2kSYvrH8x89cVzkA0Sy2aaOUIw6YxOIjA8ilwLr/1fLjOedX1QAuBpG9XggWqIIfERw==} + /@typescript-eslint/scope-manager@6.7.3: + resolution: {integrity: sha512-wOlo0QnEou9cHO2TdkJmzF7DFGvAKEnB82PuPNHpT8ZKKaZu6Bm63ugOTn9fXNJtvuDPanBc78lGUGGytJoVzQ==} engines: {node: ^16.0.0 || >=18.0.0} dependencies: - '@typescript-eslint/types': 6.6.0 - '@typescript-eslint/visitor-keys': 6.6.0 + '@typescript-eslint/types': 6.7.3 + '@typescript-eslint/visitor-keys': 6.7.3 dev: true - /@typescript-eslint/type-utils@6.6.0(eslint@8.49.0)(typescript@5.2.2): - resolution: {integrity: sha512-8m16fwAcEnQc69IpeDyokNO+D5spo0w1jepWWY2Q6y5ZKNuj5EhVQXjtVAeDDqvW6Yg7dhclbsz6rTtOvcwpHg==} + /@typescript-eslint/type-utils@6.7.3(eslint@8.50.0)(typescript@5.2.2): + resolution: {integrity: sha512-Fc68K0aTDrKIBvLnKTZ5Pf3MXK495YErrbHb1R6aTpfK5OdSFj0rVN7ib6Tx6ePrZ2gsjLqr0s98NG7l96KSQw==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -1749,23 +1747,23 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 6.6.0(typescript@5.2.2) - '@typescript-eslint/utils': 6.6.0(eslint@8.49.0)(typescript@5.2.2) + '@typescript-eslint/typescript-estree': 6.7.3(typescript@5.2.2) + '@typescript-eslint/utils': 6.7.3(eslint@8.50.0)(typescript@5.2.2) debug: 4.3.4(supports-color@8.1.1) - eslint: 8.49.0 + eslint: 8.50.0 ts-api-utils: 1.0.3(typescript@5.2.2) typescript: 5.2.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/types@6.6.0: - resolution: {integrity: sha512-CB6QpJQ6BAHlJXdwUmiaXDBmTqIE2bzGTDLADgvqtHWuhfNP3rAOK7kAgRMAET5rDRr9Utt+qAzRBdu3AhR3sg==} + /@typescript-eslint/types@6.7.3: + resolution: {integrity: sha512-4g+de6roB2NFcfkZb439tigpAMnvEIg3rIjWQ+EM7IBaYt/CdJt6em9BJ4h4UpdgaBWdmx2iWsafHTrqmgIPNw==} engines: {node: ^16.0.0 || >=18.0.0} dev: true - /@typescript-eslint/typescript-estree@6.6.0(typescript@5.2.2): - resolution: {integrity: sha512-hMcTQ6Al8MP2E6JKBAaSxSVw5bDhdmbCEhGW/V8QXkb9oNsFkA4SBuOMYVPxD3jbtQ4R/vSODBsr76R6fP3tbA==} + /@typescript-eslint/typescript-estree@6.7.3(typescript@5.2.2): + resolution: {integrity: sha512-YLQ3tJoS4VxLFYHTw21oe1/vIZPRqAO91z6Uv0Ss2BKm/Ag7/RVQBcXTGcXhgJMdA4U+HrKuY5gWlJlvoaKZ5g==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: typescript: '*' @@ -1773,8 +1771,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 6.6.0 - '@typescript-eslint/visitor-keys': 6.6.0 + '@typescript-eslint/types': 6.7.3 + '@typescript-eslint/visitor-keys': 6.7.3 debug: 4.3.4(supports-color@8.1.1) globby: 11.1.0 is-glob: 4.0.3 @@ -1785,30 +1783,30 @@ packages: - supports-color dev: true - /@typescript-eslint/utils@6.6.0(eslint@8.49.0)(typescript@5.2.2): - resolution: {integrity: sha512-mPHFoNa2bPIWWglWYdR0QfY9GN0CfvvXX1Sv6DlSTive3jlMTUy+an67//Gysc+0Me9pjitrq0LJp0nGtLgftw==} + /@typescript-eslint/utils@6.7.3(eslint@8.50.0)(typescript@5.2.2): + resolution: {integrity: sha512-vzLkVder21GpWRrmSR9JxGZ5+ibIUSudXlW52qeKpzUEQhRSmyZiVDDj3crAth7+5tmN1ulvgKaCU2f/bPRCzg==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.49.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.50.0) '@types/json-schema': 7.0.12 '@types/semver': 7.5.1 - '@typescript-eslint/scope-manager': 6.6.0 - '@typescript-eslint/types': 6.6.0 - '@typescript-eslint/typescript-estree': 6.6.0(typescript@5.2.2) - eslint: 8.49.0 + '@typescript-eslint/scope-manager': 6.7.3 + '@typescript-eslint/types': 6.7.3 + '@typescript-eslint/typescript-estree': 6.7.3(typescript@5.2.2) + eslint: 8.50.0 semver: 7.5.4 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/visitor-keys@6.6.0: - resolution: {integrity: sha512-L61uJT26cMOfFQ+lMZKoJNbAEckLe539VhTxiGHrWl5XSKQgA0RTBZJW2HFPy5T0ZvPVSD93QsrTKDkfNwJGyQ==} + /@typescript-eslint/visitor-keys@6.7.3: + resolution: {integrity: sha512-HEVXkU9IB+nk9o63CeICMHxFWbHWr3E1mpilIQBe9+7L/lH97rleFLVtYsfnWB+JVMaiFnEaxvknvmIzX+CqVg==} engines: {node: ^16.0.0 || >=18.0.0} dependencies: - '@typescript-eslint/types': 6.6.0 + '@typescript-eslint/types': 6.7.3 eslint-visitor-keys: 3.4.3 dev: true @@ -3262,15 +3260,15 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /eslint@8.49.0: - resolution: {integrity: sha512-jw03ENfm6VJI0jA9U+8H5zfl5b+FvuU3YYvZRdZHOlU2ggJkxrlkJH4HcDrZpj6YwD8kuYqvQM8LyesoazrSOQ==} + /eslint@8.50.0: + resolution: {integrity: sha512-FOnOGSuFuFLv/Sa+FDVRZl4GGVAAFFi8LecRsI5a1tMO5HIE8nCm4ivAlzt4dT3ol/PaaGC0rJEEXQmHJBGoOg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.49.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.50.0) '@eslint-community/regexpp': 4.8.0 '@eslint/eslintrc': 2.1.2 - '@eslint/js': 8.49.0 + '@eslint/js': 8.50.0 '@humanwhocodes/config-array': 0.11.11 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 @@ -3708,6 +3706,13 @@ packages: rimraf: 3.0.2 dev: true + /flat@4.1.1: + resolution: {integrity: sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA==} + hasBin: true + dependencies: + is-buffer: 2.0.5 + dev: true + /flat@5.0.2: resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} hasBin: true @@ -5355,6 +5360,12 @@ packages: resolution: {integrity: sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==} dev: true + /minimatch@3.0.4: + resolution: {integrity: sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==} + dependencies: + brace-expansion: 1.1.11 + dev: true + /minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} dependencies: @@ -5487,7 +5498,7 @@ packages: he: 1.2.0 js-yaml: 3.13.1 log-symbols: 3.0.0 - minimatch: 8.0.4 + minimatch: 3.0.4 mkdirp: 0.5.5 ms: 2.1.1 node-environment-flags: 1.0.6 @@ -5518,7 +5529,7 @@ packages: he: 1.2.0 js-yaml: 3.13.1 log-symbols: 3.0.0 - minimatch: 8.0.4 + minimatch: 3.0.4 mkdirp: 0.5.5 ms: 2.1.1 node-environment-flags: 1.0.6 @@ -6100,10 +6111,6 @@ packages: engines: {node: '>=0.6'} dev: true - /querystringify@2.2.0: - resolution: {integrity: sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==} - dev: true - /queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} dev: true @@ -6248,7 +6255,7 @@ packages: request: 2.88.2 request-promise-core: 1.1.4(request@2.88.2) stealthy-require: 1.1.1 - tough-cookie: 4.1.3 + tough-cookie: 2.5.0 dev: true /request@2.88.2: @@ -6273,7 +6280,7 @@ packages: performance-now: 2.1.0 qs: 6.5.3 safe-buffer: 5.2.1 - tough-cookie: 4.1.3 + tough-cookie: 2.5.0 tunnel-agent: 0.6.0 uuid: 3.4.0 dev: true @@ -6292,10 +6299,6 @@ packages: resolution: {integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==} dev: true - /requires-port@1.0.0: - resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} - dev: true - /resolve-from@3.0.0: resolution: {integrity: sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw==} engines: {node: '>=4'} @@ -6356,7 +6359,7 @@ packages: resolution: {integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==} hasBin: true dependencies: - glob: 7.2.0 + glob: 7.2.3 dev: true /rimraf@3.0.2: @@ -7052,14 +7055,12 @@ packages: engines: {node: '>=0.6'} dev: true - /tough-cookie@4.1.3: - resolution: {integrity: sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==} - engines: {node: '>=6'} + /tough-cookie@2.5.0: + resolution: {integrity: sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==} + engines: {node: '>=0.8'} dependencies: psl: 1.9.0 punycode: 2.3.0 - universalify: 0.2.0 - url-parse: 1.5.10 dev: true /tr46@0.0.3: @@ -7310,11 +7311,6 @@ packages: engines: {node: '>= 4.0.0'} dev: true - /universalify@0.2.0: - resolution: {integrity: sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==} - engines: {node: '>= 4.0.0'} - dev: true - /universalify@2.0.0: resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==} engines: {node: '>= 10.0.0'} @@ -7331,13 +7327,6 @@ packages: punycode: 2.3.0 dev: true - /url-parse@1.5.10: - resolution: {integrity: sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==} - dependencies: - querystringify: 2.2.0 - requires-port: 1.0.0 - dev: true - /urlpattern-polyfill@8.0.2: resolution: {integrity: sha512-Qp95D4TPJl1kC9SKigDcqgyM2VDVO4RiJc2d4qe5GrYm+zbIQCWWKAFaJNQ4BhdFeDGwBmAxqJBwWSJDb9T3BQ==} dev: true @@ -7643,7 +7632,7 @@ packages: resolution: {integrity: sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw==} engines: {node: '>=6'} dependencies: - flat: 5.0.2 + flat: 4.1.1 lodash: 4.17.21 yargs: 13.3.2 dev: true diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 17e042cf..1a8a4af8 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,3 +1,3 @@ packages: - - '.' + - 'contracts' - 'subgraph' diff --git a/remappings.txt b/remappings.txt deleted file mode 100644 index 76f932e9..00000000 --- a/remappings.txt +++ /dev/null @@ -1,5 +0,0 @@ -ds-test/=lib/forge-std/lib/ds-test/src/ -erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/ -forge-std/=lib/forge-std/src/ -openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/ -openzeppelin/=lib/openzeppelin-contracts-upgradeable/contracts/ diff --git a/subgraph/package.json b/subgraph/package.json index 11b3bc6f..5337a3e7 100644 --- a/subgraph/package.json +++ b/subgraph/package.json @@ -1,7 +1,7 @@ { "name": "linea-attestation-registry-subgraph", "version": "0.0.1", - "description": "Subgraph to index the 4 main objects of Verax", + "description": "Subgraph to index the main objects of Verax", "keywords": [ "linea-attestation-registry", "blockchain", @@ -24,8 +24,7 @@ "deploy": "source .env && cp subgraph.mainnet.yaml subgraph.yaml && pnpm run build && graph deploy --network linea-mainnet --node $DEPLOY_ENDPOINT_MAINNET --headers \"{\\\"Authorization\\\": \\\"Basic $IPFS_IDENTIFIERS\\\"}\" --ipfs $IPFS_ENDPOINT --version-label v0.0.1 Consensys/linea-attestation-registry", "deploy:goerli": "source .env && cp subgraph.goerli.yaml subgraph.yaml && pnpm run build:goerli && graph deploy --network linea-goerli --node $DEPLOY_ENDPOINT_GOERLI --headers \"{\\\"Authorization\\\": \\\"Basic $IPFS_IDENTIFIERS\\\"}\" --ipfs $IPFS_ENDPOINT --version-label v0.0.5 Consensys/linea-attestation-registry", "remove": "source .env && graph remove --node $DEPLOY_ENDPOINT_MAINNET Consensys/linea-attestation-registry", - "remove:goerli": "source .env && graph remove --node $DEPLOY_ENDPOINT_GOERLI Consensys/linea-attestation-registry", - "test": "graph test" + "remove:goerli": "source .env && graph remove --node $DEPLOY_ENDPOINT_GOERLI Consensys/linea-attestation-registry" }, "devDependencies": { "@graphprotocol/graph-cli": "0.58.0", diff --git a/subgraph/tsconfig.json b/subgraph/tsconfig.json index 5c5d17c9..a6d2ae82 100644 --- a/subgraph/tsconfig.json +++ b/subgraph/tsconfig.json @@ -1,4 +1,3 @@ { - "extends": "@graphprotocol/graph-ts/types/tsconfig.base.json", - "include": ["src"] + "extends": "@graphprotocol/graph-ts/types/tsconfig.base.json" } diff --git a/tsconfig.json b/tsconfig.json index 76d87175..a15e2c79 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,5 +1,9 @@ { "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "incremental": true, "target": "ESNext", "allowJs": false, "skipLibCheck": true, @@ -14,6 +18,14 @@ "noEmit": true, "noFallthroughCasesInSwitch": true }, + "references": [ + { + "path": "contracts" + }, + { + "path": "subgraph" + } + ], "include": ["**/*.ts"], "exclude": ["node_modules", "typechain-types"] }