diff --git a/.github/workflows/explorer-deploy-preview.yml b/.github/workflows/explorer-deploy-preview.yml index 5eea6f0d..cb351bd4 100644 --- a/.github/workflows/explorer-deploy-preview.yml +++ b/.github/workflows/explorer-deploy-preview.yml @@ -4,9 +4,8 @@ on: pull_request: branches: - dev - push: - branches: - - dev + paths: + - explorer/** jobs: deploy-explorer-preview: diff --git a/.github/workflows/smart-contracts.yml b/.github/workflows/smart-contracts.yml index 0a96621c..3a59d1f4 100644 --- a/.github/workflows/smart-contracts.yml +++ b/.github/workflows/smart-contracts.yml @@ -29,6 +29,34 @@ jobs: with: submodules: recursive + - name: Install Pnpm + uses: pnpm/action-setup@v2 + with: + version: 8 + run_install: false + + - name: Install Node.js + uses: actions/setup-node@v3 + with: + node-version: 18 + cache: pnpm + + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install --frozen-lockfile + - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 @@ -61,6 +89,34 @@ jobs: with: submodules: recursive + - name: Install Pnpm + uses: pnpm/action-setup@v2 + with: + version: 8 + run_install: false + + - name: Install Node.js + uses: actions/setup-node@v3 + with: + node-version: 18 + cache: pnpm + + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install --frozen-lockfile + - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 @@ -83,6 +139,34 @@ jobs: with: submodules: recursive + - name: Install Pnpm + uses: pnpm/action-setup@v2 + with: + version: 8 + run_install: false + + - name: Install Node.js + uses: actions/setup-node@v3 + with: + node-version: 18 + cache: pnpm + + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install --frozen-lockfile + - name: Install Foundry uses: foundry-rs/foundry-toolchain@v1 @@ -104,7 +188,7 @@ jobs: uses: terencetcf/github-actions-lcov-minimum-coverage-checker@v1 with: coverage-file: lcov.info - minimum-coverage: 96 + minimum-coverage: 95 - name: Add coverage summary run: | @@ -168,6 +252,39 @@ jobs: if: steps.check-changes.outputs.changed == 'true' run: pnpm install --frozen-lockfile + - name: Install Pnpm + if: steps.check-changes.outputs.changed == 'true' + uses: pnpm/action-setup@v2 + with: + version: 8 + run_install: false + + - name: Install Node.js + if: steps.check-changes.outputs.changed == 'true' + uses: actions/setup-node@v3 + with: + node-version: 18 + cache: pnpm + + - name: Get pnpm store directory + if: steps.check-changes.outputs.changed == 'true' + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - uses: actions/cache@v3 + if: steps.check-changes.outputs.changed == 'true' + name: Setup pnpm cache + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + if: steps.check-changes.outputs.changed == 'true' + run: pnpm install --frozen-lockfile + - name: Install Foundry if: steps.check-changes.outputs.changed == 'true' uses: foundry-rs/foundry-toolchain@v1 @@ -197,16 +314,16 @@ jobs: if: steps.check-changes.outputs.changed == 'true' run: pnpm run check:upgradeability linea - - name: Create Arbitrum testnet env file + - name: Create Arbitrum Sepolia env file if: steps.check-changes.outputs.changed == 'true' run: | rm .env - cp ./env/.env.arbitrum-goerli .env + cp ./env/.env.arbitrum-sepolia .env echo INFURA_KEY=${{ secrets.INFURA_KEY }} >> .env - - name: Check contracts upgradeability on Arbitrum testnet + - name: Check contracts upgradeability on Arbitrum Sepolia if: steps.check-changes.outputs.changed == 'true' - run: pnpm run check:upgradeability arbitrum-goerli + run: pnpm run check:upgradeability arbitrum-sepolia - name: Create Arbitrum mainnet env file if: steps.check-changes.outputs.changed == 'true' diff --git a/.github/workflows/website-build.yml b/.github/workflows/tutorial-build.yml similarity index 89% rename from .github/workflows/website-build.yml rename to .github/workflows/tutorial-build.yml index ef459d04..45d1c14d 100644 --- a/.github/workflows/website-build.yml +++ b/.github/workflows/tutorial-build.yml @@ -1,4 +1,4 @@ -name: Build website +name: Build tutorial on: pull_request: @@ -13,12 +13,12 @@ on: - release/* jobs: - build-website: + build-tutorial: runs-on: ubuntu-latest defaults: run: - working-directory: website + working-directory: tutorial steps: - name: Check out the repo @@ -57,5 +57,5 @@ jobs: - name: Add build summary run: | - echo "## Website build result" >> $GITHUB_STEP_SUMMARY + echo "## Tutorial build result" >> $GITHUB_STEP_SUMMARY echo "✅ Passed" >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/tutorial-deploy-preview.yml b/.github/workflows/tutorial-deploy-preview.yml new file mode 100644 index 00000000..739cbe82 --- /dev/null +++ b/.github/workflows/tutorial-deploy-preview.yml @@ -0,0 +1,96 @@ +name: Deploy preview tutorial + +on: + pull_request: + branches: + - dev + paths: + - tutorial/** + +jobs: + deploy-tutorial-preview: + runs-on: ubuntu-latest + + defaults: + run: + working-directory: tutorial + + steps: + - name: Check out the repo + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - id: check-changes + run: | + if [ -n "$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} | grep '^tutorial/')" ]; then + echo "::set-output name=changed::true" + else + echo "::set-output name=changed::false" + fi + + - name: Install Pnpm + if: steps.check-changes.outputs.changed == 'true' + uses: pnpm/action-setup@v2 + with: + version: 8 + run_install: false + + - name: Install Node.js + if: steps.check-changes.outputs.changed == 'true' + uses: actions/setup-node@v3 + with: + node-version: 18 + cache: pnpm + + - name: Get pnpm store directory + if: steps.check-changes.outputs.changed == 'true' + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - uses: actions/cache@v3 + if: steps.check-changes.outputs.changed == 'true' + name: Setup pnpm cache + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + if: steps.check-changes.outputs.changed == 'true' + run: pnpm install --frozen-lockfile + + - name: Build + if: steps.check-changes.outputs.changed == 'true' + run: pnpm run build:netlify + env: + VITE_WALLETCONNECT_PROJECT_ID: ${{ secrets.VITE_WALLETCONNECT_PROJECT_ID }} + + - name: Deploy to Netlify + if: steps.check-changes.outputs.changed == 'true' + uses: nwtgck/actions-netlify@v2.0 + with: + publish-dir: "./tutorial/dist" + github-token: ${{ secrets.GITHUB_TOKEN }} + deploy-message: "Deploy from GitHub Actions" + enable-pull-request-comment: true + enable-commit-comment: true + overwrites-pull-request-comment: true + env: + NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} + NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID_TUTORIAL_STAGING }} + timeout-minutes: 1 + + - name: Add tutorial deployment summary + if: steps.check-changes.outputs.changed == 'true' + run: | + echo "## Tutorial staging deployment result" >> $GITHUB_STEP_SUMMARY + echo "✅ Passed" >> $GITHUB_STEP_SUMMARY + + - name: Add tutorial deployment summary + if: steps.check-changes.outputs.changed == 'false' + run: | + echo "## Tutorial staging deployment result" >> $GITHUB_STEP_SUMMARY + echo "✅ No change detected in the tutorial" >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/tutorial-deploy-prod.yml b/.github/workflows/tutorial-deploy-prod.yml new file mode 100644 index 00000000..eece14df --- /dev/null +++ b/.github/workflows/tutorial-deploy-prod.yml @@ -0,0 +1,67 @@ +name: Deploy production tutorial + +on: + workflow_dispatch: + push: + branches: + - dev + paths: + - tutorial/** + +jobs: + deploy-tutorial-prod: + runs-on: ubuntu-latest + + defaults: + run: + working-directory: tutorial + + steps: + - name: Check out the repo + uses: actions/checkout@v4 + + - name: Install Pnpm + uses: pnpm/action-setup@v2 + with: + version: 8 + run_install: false + + - name: Install Node.js + uses: actions/setup-node@v3 + with: + node-version: 18 + cache: pnpm + + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Build + run: pnpm run build:netlify + env: + VITE_WALLETCONNECT_PROJECT_ID: ${{ secrets.VITE_WALLETCONNECT_PROJECT_ID }} + + - name: Deploy tutorial to Netlify + uses: netlify/actions/cli@master + env: + NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} + NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID_TUTORIAL }} + with: + args: deploy --dir=./tutorial/dist --filter tutorial --prod + + - name: Add tutorial deployment summary + run: | + echo "## Tutorial production deployment result" >> $GITHUB_STEP_SUMMARY + echo "✅ Passed" >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/website-deploy.yml b/.github/workflows/website-deploy.yml index a8e232c8..d1ac4c2b 100644 --- a/.github/workflows/website-deploy.yml +++ b/.github/workflows/website-deploy.yml @@ -1,6 +1,7 @@ name: Deploy website on: + workflow_dispatch: push: branches: ["dev"] paths: @@ -31,48 +32,22 @@ jobs: - name: Check out the repo uses: actions/checkout@v4 - - name: Install Pnpm - uses: pnpm/action-setup@v2 - with: - version: 8 - run_install: false - - - name: Install Node.js - uses: actions/setup-node@v3 - with: - node-version: 18 - cache: pnpm + - name: Setup Pages + uses: actions/configure-pages@v4 - - name: Get pnpm store directory - shell: bash + - name: Copy the HTML page to a dedicated folder run: | - echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - - - uses: actions/cache@v3 - name: Setup pnpm cache - with: - path: ${{ env.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- - - - name: Install dependencies - run: pnpm install --frozen-lockfile - - - name: Build - run: pnpm run build - - - name: Setup Pages - uses: actions/configure-pages@v3 + mkdir -p dist + cp index.html dist/index.html - name: Upload artifact - uses: actions/upload-pages-artifact@v2 + uses: actions/upload-pages-artifact@v3 with: path: "./website/dist" - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v2 + uses: actions/deploy-pages@v4 - name: Add website deployment summary run: | diff --git a/.gitignore b/.gitignore index 25ed6556..0986732c 100644 --- a/.gitignore +++ b/.gitignore @@ -16,8 +16,9 @@ node_modules lcov.info coverage -# Hardhat +# Contracts cache_hardhat +cache_forge artifacts typechain-types @@ -39,3 +40,79 @@ dist .DS_Store tracking.json source.json + +# Everything below is related to the Snap +dist/ +build/ +coverage/ +.cache/ +public/ + +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Coverage directory used by tools like istanbul +*.lcov + +# nyc test coverage +.nyc_output + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env.test + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# yarn v2 +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* diff --git a/.husky/pre-commit b/.husky/pre-commit index 36f3cf6f..d3836ab6 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -3,4 +3,4 @@ pnpm run prettier:write pnpm -r run lint -pnpm -r run test +pnpm --filter "{contracts}" run test diff --git a/.prettierignore b/.prettierignore index f2b415b6..96e423da 100644 --- a/.prettierignore +++ b/.prettierignore @@ -13,6 +13,7 @@ build .graphclient snap dist +cache_forge # files *.env @@ -21,3 +22,4 @@ dist .pnp.* lcov.info pnpm-lock.yaml +.latest.json diff --git a/README.md b/README.md index a11dfe0b..549b5398 100644 --- a/README.md +++ b/README.md @@ -13,13 +13,12 @@ the network.

Links • - Repo Organisation • + Repository OrganisationGetting StartedContributingContracts Addresses • - Subgraphs Addresses • - Linking Attestations • - Off-chain Attestations • + Subgraphs URLs • + Network PrefixesLicense

@@ -28,7 +27,7 @@ the network. 📚 [Documentation](https://docs.ver.ax/) 🔍 [Subgraphs](#subgraphs-addresses) 🧱 [Verax SDK](https://www.npmjs.com/package/@verax-attestation-registry/verax-sdk) -🌍 Verax Explorer (_Coming soon_) +🌍 [Explorer](https://explorer.ver.ax) ## Repository Organisation @@ -36,48 +35,28 @@ the network. . ├── contracts # All smart contracts needed to run Verax ├── explorer # Explorer frontend to discover the main objects +├── governance # Governance NFTs ├── sdk # An SDK to easily interact with the contracts and the subgraphs ├── snap # A MetaMask Snap to leverage the attestions in transactions ├── subgraph # The subgraph indexing all the data generated by the contracts +├── tutorial # An example project to show how to use the SDK and the platform ├── website # Verax landing page and ``` +Each package has its own README file for more details and installation process description. + ## Getting Started ### Prerequisites - [Node.js](https://nodejs.org/en/) (>= 18) -### Global installation +### Global setup ```bash pnpm i ``` -### Contracts - -Check the dedicated [README](./contracts/README.md) for more details. - -### Explorer - -Check the dedicated [README](./explorer/README.md) for more details. - -### SDK - -Check the dedicated [README](./sdk/README.md) for more details. - -### Snap - -Check the dedicated [README](./snap/README.md) for more details. - -### Subgraph - -Check the dedicated [README](./subgraph/README.md) for more details. - -### Website - -Check the dedicated [README](./website/README.md) for more details. - ## Contributing Verax Attestation Registry is a community-lead initiative, with developers from various companies and different @@ -89,15 +68,19 @@ Don't hesitate to check our [Contribution Guide](./CONTRIBUTING.md) before pushi The main contracts (i.e. the "registries") and the helpers contracts are deployed on: -- Linea Testnet +- Linea Goerli (Deprecated) +- Linea Sepolia - Linea Mainnet -- Arbitrum Testnet +- Arbitrum Sepolia - Arbitrum Mainnet +- Arbitrum Nova +- Base Sepolia +- Base Mainnet Here are the addresses on those networks:
- Linea Testnet + Linea Goerli (Deprecated) - Router = [0x736c78b2f2cBf4F921E8551b2acB6A5Edc9177D5](https://goerli.lineascan.build/address/0x736c78b2f2cBf4F921E8551b2acB6A5Edc9177D5) @@ -114,6 +97,22 @@ Here are the addresses on those networks:
+
+ Linea Sepolia + +- Router = + [0xAfA952790492DDeB474012cEA12ba34B788ab39F](https://sepolia.lineascan.build/address/0xAfA952790492DDeB474012cEA12ba34B788ab39F) +- AttestationRegistry = + [0xDaf3C3632327343f7df0Baad2dc9144fa4e1001F](https://sepolia.lineascan.build/address/0xDaf3C3632327343f7df0Baad2dc9144fa4e1001F) +- ModuleRegistry = + [0x3C443B9f0c8ed3A3270De7A4815487BA3223C2Fa](https://sepolia.lineascan.build/address/0x3C443B9f0c8ed3A3270De7A4815487BA3223C2Fa) +- PortalRegistry = + [0xF35fe79104e157703dbCC3Baa72a81A99591744D](https://sepolia.lineascan.build/address/0xF35fe79104e157703dbCC3Baa72a81A99591744D) +- SchemaRegistry = + [0x90b8542d7288a83EC887229A7C727989C3b56209](https://sepolia.lineascan.build/address/0x90b8542d7288a83EC887229A7C727989C3b56209) + +
+
Linea Mainnet @@ -133,20 +132,20 @@ Here are the addresses on those networks:
- Arbitrum Testnet + Arbitrum Sepolia - Router = - [0x746390cB11913d8F93BDF8a974cFEC724039B3Cc](https://goerli.arbiscan.io/address/0x746390cB11913d8F93BDF8a974cFEC724039B3Cc) + [0x374B686137eC0DB442a8d833451f8C12cD4B5De4](https://sepolia.arbiscan.io/address/0x374B686137eC0DB442a8d833451f8C12cD4B5De4) - AttestationRegistry = - [0xCD839595FdA5A8111d5E03D42d9D9af60ee67B66](https://goerli.arbiscan.io/address/0xCD839595FdA5A8111d5E03D42d9D9af60ee67B66) + [0xee5e23492bf49C1F4CF0676b3bF49d78A6dD61c5](https://sepolia.arbiscan.io/address/0xee5e23492bf49C1F4CF0676b3bF49d78A6dD61c5) - ModuleRegistry = - [0x58EE79284bE65b217Db408A0991314f9Ae84348A](https://goerli.arbiscan.io/address/0x58EE79284bE65b217Db408A0991314f9Ae84348A) + [0xEC572277d4E87a64DcfA774ED219Dd4E69E4BDc6](https://sepolia.arbiscan.io/address/0xEC572277d4E87a64DcfA774ED219Dd4E69E4BDc6) - PortalRegistry = - [0x7d6a914C1e33C141CB4a5e0095c1075E5649aFB2](https://goerli.arbiscan.io/address/0x7d6a914C1e33C141CB4a5e0095c1075E5649aFB2) + [0x1ceb52584B6C45C7049dc7fDC476bC138E4beaDE](https://sepolia.arbiscan.io/address/0x1ceb52584B6C45C7049dc7fDC476bC138E4beaDE) - SchemaRegistry = - [0x129043e80e0B4C7da61a622df0912c31D3414AA7](https://goerli.arbiscan.io/address/0x129043e80e0B4C7da61a622df0912c31D3414AA7) + [0x025531b655D9EE335B8E6cc4C118b313f26ACc8F](https://sepolia.arbiscan.io/address/0x025531b655D9EE335B8E6cc4C118b313f26ACc8F) - AttestationReader = - [0x055E7d488eCACf9f1B0B42659c331C037505D4a1](https://goerli.arbiscan.io/address/0x055E7d488eCACf9f1B0B42659c331C037505D4a1) + [0xBdC45324AB9A7e82Ae15324a3d8352b513Ee2788](https://sepolia.arbiscan.io/address/0xBdC45324AB9A7e82Ae15324a3d8352b513Ee2788)
@@ -168,42 +167,80 @@ Here are the addresses on those networks: -## Subgraphs Addresses +
+ Arbitrum Nova -- [Linea Testnet](https://graph-query.goerli.linea.build/subgraphs/name/Consensys/linea-attestation-registry/graphql) -- [Linea Mainnet](https://graph-query.linea.build/subgraphs/name/Consensys/linea-attestation-registry/graphql) -- [Arbitrum Goerli](https://api.thegraph.com/subgraphs/name/cliqueofficial/verax-arbitrum-goerli) -- [Arbitrum Mainnet](https://api.thegraph.com/subgraphs/name/cliqueofficial/verax-arbitrum) +- Router = + [0xC81B5149D9Cd49195D00EFb16FED89f3Ba78E03B](https://nova.arbiscan.io/address/0xc81b5149d9cd49195d00efb16fed89f3ba78e03b) +- AttestationRegistry = + [0xB9Cf26ED827Eb4A7079e8dedB0ea93D932A2e3e8](https://nova.arbiscan.io/address/0xB9Cf26ED827Eb4A7079e8dedB0ea93D932A2e3e8) +- ModuleRegistry = + [0x46F7471cd2C1d69Cb5e62c1a34F3fCAf81304Fc3](https://nova.arbiscan.io/address/0x46F7471cd2C1d69Cb5e62c1a34F3fCAf81304Fc3) +- PortalRegistry = + [0xADc8da3d3388dEe74C7134fC4AEe1cF866Da5d38](https://nova.arbiscan.io/address/0xADc8da3d3388dEe74C7134fC4AEe1cF866Da5d38) +- SchemaRegistry = + [0x9b5BABcEbf0E8550da1eCDe5674783179B6557FB](https://nova.arbiscan.io/address/0x9b5BABcEbf0E8550da1eCDe5674783179B6557FB) +- AttestationReader = + [0x7A22D0Fba31a4d5b5E4F5263379B4dbf3707b48c](https://nova.arbiscan.io/address/0x7A22D0Fba31a4d5b5E4F5263379B4dbf3707b48c) -## Linking Attestations +
-Verax Attestation Registry allows creating links ("relationships") between attestations. -🔗 Go to the [official documentation](https://docs.ver.ax/developer-guides/for-attestation-issuers/link-attestations) -for more details +
+ Base Sepolia -Verax offers 2 Schemas to cover most use cases: +- Router = + [0xE235826514945186227918325D3E5b5f873861A6](https://sepolia.basescan.org/address/0xE235826514945186227918325D3E5b5f873861A6) +- AttestationRegistry = + [0x374B686137eC0DB442a8d833451f8C12cD4B5De4](https://sepolia.basescan.org/address/0x374B686137eC0DB442a8d833451f8C12cD4B5De4) +- ModuleRegistry = + [0xEC572277d4E87a64DcfA774ED219Dd4E69E4BDc6](https://sepolia.basescan.org/address/0xEC572277d4E87a64DcfA774ED219Dd4E69E4BDc6) +- PortalRegistry = + [0x025531b655D9EE335B8E6cc4C118b313f26ACc8F](https://sepolia.basescan.org/address/0x025531b655D9EE335B8E6cc4C118b313f26ACc8F) +- SchemaRegistry = + [0x66D2F3DCc970343b83a6263E20832184fa71CFe7](https://sepolia.basescan.org/address/0x66D2F3DCc970343b83a6263E20832184fa71CFe7) -- The **Relationship** Schema, with ID `0x41b8c81288eebbf173b2f54b9fb2f1d37f2caca51ef39e8f99299b53c2599a3a` -- The **Named Graph Relationship** Schema with ID `0x8f83a0ef7871f63455a506f6bca0db98a88721764ae6dbde2afddd8e12e442b8` +
-## Off-chain Attestations +
+ Base Mainnet -To handle large payloads to attest and avoid increasing the gas cost for the attestation process, it is possible to host -the attested payload off-chain. In this case, the on-chain attestation will only contain a link to the attested payload, -based on a dedicated Schema called **Offchain**. It is available with ID -`0xa288e257097a4bed4166c002cb6911713edacc88e30b6cb2b0104df9c365327d`. +- Router = + [0x63b2d528805Fc9373586366705852FA89debd4d0](https://basescan.org/address/0x63b2d528805Fc9373586366705852FA89debd4d0) +- AttestationRegistry = + [0xA0080DBd35711faD39258E45d9A5D798852b05D4](https://basescan.org/address/0xA0080DBd35711faD39258E45d9A5D798852b05D4) +- ModuleRegistry = + [0xAd0C12db58098A6665CBEf48f60eB67d81d1F1ff](https://basescan.org/address/0xAd0C12db58098A6665CBEf48f60eB67d81d1F1ff) +- PortalRegistry = + [0xcbf28432C25B400E645F0EaC05F8954e8EE7c0d6](https://basescan.org/address/0xcbf28432C25B400E645F0EaC05F8954e8EE7c0d6) +- SchemaRegistry = + [0x8081dCd745f160c148Eb5be510F78628A0951c31](https://basescan.org/address/0x8081dCd745f160c148Eb5be510F78628A0951c31) -To use it, simply pass a payload with the following content: +
-```json -{ - "schemaId": "0x41b8c81288eebbf173b2f54b9fb2f1d37f2caca51ef39e8f99299b53c2599a3b", - "uri": "https://example.com/payload/123" -} -``` +## Subgraphs URLs -- `schemaId`: the ID of the Schema encoding the complete (off-chain) payload -- `uri`: the link to the complete (off-chain) payload +- [Linea Goerli (Deprecated)](https://api.goldsky.com/api/public/project_clqghnrbp9nx201wtgylv8748/subgraphs/verax/subgraph-testnet/gn) +- [Linea Sepolia](https://api.studio.thegraph.com/query/67521/verax-v1-linea-sepolia/v0.0.1) +- [Linea Mainnet](https://graph-query.linea.build/subgraphs/name/Consensys/linea-attestation-registry/graphql) +- [Arbitrum Sepolia](https://api.studio.thegraph.com/query/67946/verax-arbitrum-sepolia/v0.0.2) +- [Arbitrum Mainnet](https://api.thegraph.com/subgraphs/name/cliqueofficial/verax-arbitrum) +- [Arbitrum Nova](https://api.goldsky.com/api/public/project_clr9aj9alwgwg01q7ci1rh781/subgraphs/verax-arbitrum-nova/0.0.5/gn) +- [Base Sepolia](https://api.studio.thegraph.com/query/67521/verax-v1-base-sepolia/v0.0.1) +- [Base Mainnet](https://api.studio.thegraph.com/query/67521/verax-v1-base/v0.0.1) + +## Network Prefixes + +To easily differentiate the networks on which an attestation has been made, we use network prefixes for the Attestation +ID. This prefix is defined in the `contracts/script/utils.ts` file. + +- Linea Goerli (Deprecated) - `0x0000` +- Linea Sepolia - `0x0000` +- Linea Mainnet - `0x0000` +- Arbitrum Sepolia - `0x0001` +- Arbitrum Mainnet - `0x0001` +- Arbitrum Nova - `0x0002` +- Base Sepolia - `0x0005` +- Base Mainnet - `0x0005` ## License diff --git a/contracts/.npmignore b/contracts/.npmignore new file mode 100644 index 00000000..379bd471 --- /dev/null +++ b/contracts/.npmignore @@ -0,0 +1,9 @@ +.openzeppelin +deployments +env +script +test +.env +foundry.toml +hardhat.config.ts +tsconfig.json diff --git a/contracts/.openzeppelin/arbitrum-goerli.json b/contracts/.openzeppelin/arbitrum-goerli.json index 152719c8..d3fc56db 100644 --- a/contracts/.openzeppelin/arbitrum-goerli.json +++ b/contracts/.openzeppelin/arbitrum-goerli.json @@ -49,7 +49,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -58,7 +58,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -66,7 +66,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -74,7 +74,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -82,7 +82,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "ATTESTATION_REGISTRY", @@ -158,7 +158,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -167,7 +167,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -175,7 +175,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -183,7 +183,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -191,7 +191,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -373,7 +373,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -382,7 +382,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -390,7 +390,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -398,7 +398,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -406,7 +406,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -514,7 +514,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -523,7 +523,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -531,7 +531,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -539,7 +539,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -547,7 +547,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -691,7 +691,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -700,7 +700,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -708,7 +708,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -716,7 +716,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -724,7 +724,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -842,7 +842,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -851,7 +851,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -859,7 +859,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -867,7 +867,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -875,7 +875,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -943,7 +943,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -952,7 +952,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -960,7 +960,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -968,7 +968,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -976,7 +976,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -1158,7 +1158,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -1167,7 +1167,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -1175,7 +1175,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -1183,7 +1183,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -1191,7 +1191,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -1299,7 +1299,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -1308,7 +1308,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -1316,7 +1316,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -1324,7 +1324,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -1332,7 +1332,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -1476,7 +1476,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -1485,7 +1485,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -1493,7 +1493,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -1501,7 +1501,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -1509,7 +1509,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -1639,7 +1639,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -1648,7 +1648,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -1656,7 +1656,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -1664,7 +1664,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -1672,7 +1672,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -1862,7 +1862,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -1871,7 +1871,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -1879,7 +1879,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -1887,7 +1887,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -1895,7 +1895,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", diff --git a/contracts/.openzeppelin/arbitrum-nova.json b/contracts/.openzeppelin/arbitrum-nova.json new file mode 100644 index 00000000..97d00a84 --- /dev/null +++ b/contracts/.openzeppelin/arbitrum-nova.json @@ -0,0 +1,955 @@ +{ + "manifestVersion": "3.2", + "admin": { + "address": "0xF318A96f3A7AB731CCF837cb99A82a4a5d973e96", + "txHash": "0x08993a854d4381837715cfa190b699a86a7e86ce7e4905aa590f7d2551ad01d7" + }, + "proxies": [ + { + "address": "0xC81B5149D9Cd49195D00EFb16FED89f3Ba78E03B", + "txHash": "0x785aaa879e29731cc7ee57f412597642c98448f79dd22a79f629ef0773be1f16", + "kind": "transparent" + }, + { + "address": "0xB9Cf26ED827Eb4A7079e8dedB0ea93D932A2e3e8", + "txHash": "0x05ee92525d3b2c79b684562f4bd6acb126338939a2c044c4b712165aa8bc5b70", + "kind": "transparent" + }, + { + "address": "0x46F7471cd2C1d69Cb5e62c1a34F3fCAf81304Fc3", + "txHash": "0x89c1eb8595e045e312457acad456c857ca429a452c34125d6371a230b96a2c82", + "kind": "transparent" + }, + { + "address": "0xADc8da3d3388dEe74C7134fC4AEe1cF866Da5d38", + "txHash": "0xe63780a4948181ec3e340ae0ca427d6f11091e9e1b49635a0cbb5b2eec1aed6d", + "kind": "transparent" + }, + { + "address": "0x9b5BABcEbf0E8550da1eCDe5674783179B6557FB", + "txHash": "0xdc5d5085485f234f5754ed060b247a5a35731a64c7ec7e526f6344e0975982d2", + "kind": "transparent" + }, + { + "address": "0x7A22D0Fba31a4d5b5E4F5263379B4dbf3707b48c", + "txHash": "0xc3aa5dfc8c185aa12eb36e304d7d5426a213b19ceed674513319f7ded2615714", + "kind": "transparent" + } + ], + "impls": { + "4353fbe787c13443291bba3d18e906853909285ba948d10f4d95994940b68c97": { + "address": "0x4B226C4Ca8b303cF38B8927940A8a1B4E452D66A", + "txHash": "0x3d032d18b9974500ccb943667c4e74de8cb795e3e56c2a5b438c67ae3ecc3fb7", + "layout": { + "solcVersion": "0.8.21", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "ATTESTATION_REGISTRY", + "offset": 0, + "slot": "101", + "type": "t_address", + "contract": "Router", + "src": "src/Router.sol:13" + }, + { + "label": "MODULE_REGISTRY", + "offset": 0, + "slot": "102", + "type": "t_address", + "contract": "Router", + "src": "src/Router.sol:14" + }, + { + "label": "PORTAL_REGISTRY", + "offset": 0, + "slot": "103", + "type": "t_address", + "contract": "Router", + "src": "src/Router.sol:15" + }, + { + "label": "SCHEMA_REGISTRY", + "offset": 0, + "slot": "104", + "type": "t_address", + "contract": "Router", + "src": "src/Router.sol:16" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + }, + "afc9287c19cb1b830999d2016348e104b2143101ed97ea26cf1c1b48849ca551": { + "address": "0xF2FaAE8f4A14BED20a3Abc011a5baaB76aeCDcb6", + "txHash": "0x6e604cfd76157a23c1eb5bc6d702f0e6042dba4816da366cfee74e2f5e9213d6", + "layout": { + "solcVersion": "0.8.21", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "router", + "offset": 0, + "slot": "101", + "type": "t_contract(IRouter)7410", + "contract": "AttestationRegistry", + "src": "src/AttestationRegistry.sol:17" + }, + { + "label": "version", + "offset": 20, + "slot": "101", + "type": "t_uint16", + "contract": "AttestationRegistry", + "src": "src/AttestationRegistry.sol:19" + }, + { + "label": "attestationIdCounter", + "offset": 22, + "slot": "101", + "type": "t_uint32", + "contract": "AttestationRegistry", + "src": "src/AttestationRegistry.sol:20" + }, + { + "label": "attestations", + "offset": 0, + "slot": "102", + "type": "t_mapping(t_bytes32,t_struct(Attestation)8775_storage)", + "contract": "AttestationRegistry", + "src": "src/AttestationRegistry.sol:22" + }, + { + "label": "chainPrefix", + "offset": 0, + "slot": "103", + "type": "t_uint256", + "contract": "AttestationRegistry", + "src": "src/AttestationRegistry.sol:24" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_bytes_storage": { + "label": "bytes", + "numberOfBytes": "32" + }, + "t_contract(IRouter)7410": { + "label": "contract IRouter", + "numberOfBytes": "20" + }, + "t_mapping(t_bytes32,t_struct(Attestation)8775_storage)": { + "label": "mapping(bytes32 => struct Attestation)", + "numberOfBytes": "32" + }, + "t_struct(Attestation)8775_storage": { + "label": "struct Attestation", + "members": [ + { + "label": "attestationId", + "type": "t_bytes32", + "offset": 0, + "slot": "0" + }, + { + "label": "schemaId", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + }, + { + "label": "replacedBy", + "type": "t_bytes32", + "offset": 0, + "slot": "2" + }, + { + "label": "attester", + "type": "t_address", + "offset": 0, + "slot": "3" + }, + { + "label": "portal", + "type": "t_address", + "offset": 0, + "slot": "4" + }, + { + "label": "attestedDate", + "type": "t_uint64", + "offset": 20, + "slot": "4" + }, + { + "label": "expirationDate", + "type": "t_uint64", + "offset": 0, + "slot": "5" + }, + { + "label": "revocationDate", + "type": "t_uint64", + "offset": 8, + "slot": "5" + }, + { + "label": "version", + "type": "t_uint16", + "offset": 16, + "slot": "5" + }, + { + "label": "revoked", + "type": "t_bool", + "offset": 18, + "slot": "5" + }, + { + "label": "subject", + "type": "t_bytes_storage", + "offset": 0, + "slot": "6" + }, + { + "label": "attestationData", + "type": "t_bytes_storage", + "offset": 0, + "slot": "7" + } + ], + "numberOfBytes": "256" + }, + "t_uint16": { + "label": "uint16", + "numberOfBytes": "2" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + }, + "855a9f1d8e96c2bd24b6a929c90e3681a27dfdf6e80bf08bdaf0de5f33e7accf": { + "address": "0x80c2E4937157C104ACda9b64F1AD8F2EFf808d77", + "txHash": "0x4481571891995c765276308e1f91bb5c167bd0a33047e054f667f69841b0608d", + "layout": { + "solcVersion": "0.8.21", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "router", + "offset": 0, + "slot": "101", + "type": "t_contract(IRouter)7410", + "contract": "ModuleRegistry", + "src": "src/ModuleRegistry.sol:19" + }, + { + "label": "modules", + "offset": 0, + "slot": "102", + "type": "t_mapping(t_address,t_struct(Module)8807_storage)", + "contract": "ModuleRegistry", + "src": "src/ModuleRegistry.sol:21" + }, + { + "label": "moduleAddresses", + "offset": 0, + "slot": "103", + "type": "t_array(t_address)dyn_storage", + "contract": "ModuleRegistry", + "src": "src/ModuleRegistry.sol:23" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_address)dyn_storage": { + "label": "address[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(IRouter)7410": { + "label": "contract IRouter", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_struct(Module)8807_storage)": { + "label": "mapping(address => struct Module)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Module)8807_storage": { + "label": "struct Module", + "members": [ + { + "label": "moduleAddress", + "type": "t_address", + "offset": 0, + "slot": "0" + }, + { + "label": "name", + "type": "t_string_storage", + "offset": 0, + "slot": "1" + }, + { + "label": "description", + "type": "t_string_storage", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + }, + "6a363cbbef1041962fe59a76993db35c8e1078fc08b62ce3c7093407d7e8a39d": { + "address": "0x337F01f3DA4DE2F99d5B9859f396050b0BC9C4a8", + "txHash": "0x6d6883953bbba09e99c59b67f14570fda7ae84326abcd5cb046ad27069c66d3e", + "layout": { + "solcVersion": "0.8.21", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "router", + "offset": 0, + "slot": "101", + "type": "t_contract(IRouter)7410", + "contract": "PortalRegistry", + "src": "src/PortalRegistry.sol:20" + }, + { + "label": "portals", + "offset": 0, + "slot": "102", + "type": "t_mapping(t_address,t_struct(Portal)8800_storage)", + "contract": "PortalRegistry", + "src": "src/PortalRegistry.sol:22" + }, + { + "label": "issuers", + "offset": 0, + "slot": "103", + "type": "t_mapping(t_address,t_bool)", + "contract": "PortalRegistry", + "src": "src/PortalRegistry.sol:24" + }, + { + "label": "portalAddresses", + "offset": 0, + "slot": "104", + "type": "t_array(t_address)dyn_storage", + "contract": "PortalRegistry", + "src": "src/PortalRegistry.sol:26" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_address)dyn_storage": { + "label": "address[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(IRouter)7410": { + "label": "contract IRouter", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(Portal)8800_storage)": { + "label": "mapping(address => struct Portal)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Portal)8800_storage": { + "label": "struct Portal", + "members": [ + { + "label": "id", + "type": "t_address", + "offset": 0, + "slot": "0" + }, + { + "label": "ownerAddress", + "type": "t_address", + "offset": 0, + "slot": "1" + }, + { + "label": "modules", + "type": "t_array(t_address)dyn_storage", + "offset": 0, + "slot": "2" + }, + { + "label": "isRevocable", + "type": "t_bool", + "offset": 0, + "slot": "3" + }, + { + "label": "name", + "type": "t_string_storage", + "offset": 0, + "slot": "4" + }, + { + "label": "description", + "type": "t_string_storage", + "offset": 0, + "slot": "5" + }, + { + "label": "ownerName", + "type": "t_string_storage", + "offset": 0, + "slot": "6" + } + ], + "numberOfBytes": "224" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + }, + "68d0630cb0ae02e0e7d37f7e07193d62999ecb9070d3ca38b245f3954a34b089": { + "address": "0xd23BA3E22dC9728B6b1CC7250040C34423B6Db94", + "txHash": "0x2825e9f4e5f5624ac23c27a1544b2ab672d660daeb4abaf20a4df61a0f5065d1", + "layout": { + "solcVersion": "0.8.21", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "router", + "offset": 0, + "slot": "101", + "type": "t_contract(IRouter)7410", + "contract": "SchemaRegistry", + "src": "src/SchemaRegistry.sol:16" + }, + { + "label": "schemas", + "offset": 0, + "slot": "102", + "type": "t_mapping(t_bytes32,t_struct(Schema)8784_storage)", + "contract": "SchemaRegistry", + "src": "src/SchemaRegistry.sol:18" + }, + { + "label": "schemaIds", + "offset": 0, + "slot": "103", + "type": "t_array(t_bytes32)dyn_storage", + "contract": "SchemaRegistry", + "src": "src/SchemaRegistry.sol:20" + }, + { + "label": "schemasIssuers", + "offset": 0, + "slot": "104", + "type": "t_mapping(t_bytes32,t_address)", + "contract": "SchemaRegistry", + "src": "src/SchemaRegistry.sol:22" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(IRouter)7410": { + "label": "contract IRouter", + "numberOfBytes": "20" + }, + "t_mapping(t_bytes32,t_address)": { + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(Schema)8784_storage)": { + "label": "mapping(bytes32 => struct Schema)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Schema)8784_storage": { + "label": "struct Schema", + "members": [ + { + "label": "name", + "type": "t_string_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "description", + "type": "t_string_storage", + "offset": 0, + "slot": "1" + }, + { + "label": "context", + "type": "t_string_storage", + "offset": 0, + "slot": "2" + }, + { + "label": "schema", + "type": "t_string_storage", + "offset": 0, + "slot": "3" + } + ], + "numberOfBytes": "128" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + }, + "cc3bd5ce0f70ee7ad8fd47bda375d640dc7035da4746a94f0ccf30df96358f53": { + "address": "0x1Cc982044486fA5620C1b57B2E666755dE340A3F", + "txHash": "0xba6c2a6808146e6d46f9dc20435b21271af2014f3b0cbc453bbbb979e48fcc88", + "layout": { + "solcVersion": "0.8.21", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "router", + "offset": 0, + "slot": "101", + "type": "t_contract(IRouter)7410", + "contract": "AttestationReader", + "src": "src/AttestationReader.sol:17" + }, + { + "label": "easRegistry", + "offset": 0, + "slot": "102", + "type": "t_contract(IEAS)7361", + "contract": "AttestationReader", + "src": "src/AttestationReader.sol:18" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(IEAS)7361": { + "label": "contract IEAS", + "numberOfBytes": "20" + }, + "t_contract(IRouter)7410": { + "label": "contract IRouter", + "numberOfBytes": "20" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + } + } +} diff --git a/contracts/.openzeppelin/arbitrum-one.json b/contracts/.openzeppelin/arbitrum-one.json index 6c685dff..19073512 100644 --- a/contracts/.openzeppelin/arbitrum-one.json +++ b/contracts/.openzeppelin/arbitrum-one.json @@ -74,7 +74,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -83,7 +83,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -91,7 +91,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -99,7 +99,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -107,7 +107,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "ATTESTATION_REGISTRY", @@ -183,7 +183,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -192,7 +192,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -200,7 +200,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -208,7 +208,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -216,7 +216,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -398,7 +398,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -407,7 +407,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -415,7 +415,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -423,7 +423,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -431,7 +431,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -539,7 +539,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -548,7 +548,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -556,7 +556,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -564,7 +564,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -572,7 +572,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -716,7 +716,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -725,7 +725,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -733,7 +733,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -741,7 +741,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -749,7 +749,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -867,7 +867,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -876,7 +876,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -884,7 +884,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -892,7 +892,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -900,7 +900,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -968,7 +968,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -977,7 +977,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -985,7 +985,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -993,7 +993,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -1001,7 +1001,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -1183,7 +1183,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -1192,7 +1192,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -1200,7 +1200,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -1208,7 +1208,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -1216,7 +1216,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -1324,7 +1324,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -1333,7 +1333,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -1341,7 +1341,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -1349,7 +1349,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -1357,7 +1357,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -1501,7 +1501,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -1510,7 +1510,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -1518,7 +1518,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -1526,7 +1526,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -1534,7 +1534,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -1664,7 +1664,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -1673,7 +1673,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -1681,7 +1681,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -1689,7 +1689,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -1697,7 +1697,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -1887,7 +1887,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -1896,7 +1896,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -1904,7 +1904,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -1912,7 +1912,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -1920,7 +1920,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", diff --git a/contracts/.openzeppelin/unknown-421614.json b/contracts/.openzeppelin/unknown-421614.json new file mode 100644 index 00000000..8ce7b785 --- /dev/null +++ b/contracts/.openzeppelin/unknown-421614.json @@ -0,0 +1,990 @@ +{ + "manifestVersion": "3.2", + "admin": { + "address": "0x582Ca0f4482166A01b19FE1D0abeF0b9b236228f", + "txHash": "0x5aaf78d707f4e65d32850b48fb1a76d9452d3db9694e9557a681bd137c3e3102" + }, + "proxies": [ + { + "address": "0xB3311B3CfF2752cd26B9964D3d7CB0FeB0b0d215", + "txHash": "0x32da5e77879ee163c1cd20ebfc11eceeb0e733e710f7b3ccdf7ea1428dbccf2c", + "kind": "transparent" + }, + { + "address": "0xFd3b9e9C60e9E7694751CfA8B10dE5850bC78C2F", + "txHash": "0x5eec0eebcc1a970851cf8b71cb0a8d804d546015ebe687a7113e9c4109e22fa7", + "kind": "transparent" + }, + { + "address": "0xAfA952790492DDeB474012cEA12ba34B788ab39F", + "txHash": "0xe0484186ea4a03565f270ad04189bc6a65ef109414c482c469b5f4a9cb670d47", + "kind": "transparent" + }, + { + "address": "0xDaf3C3632327343f7df0Baad2dc9144fa4e1001F", + "txHash": "0xb32a0f1a9112db269ac78bcbde4345ec979a300745bd634627b7088b74c9e738", + "kind": "transparent" + }, + { + "address": "0x3C443B9f0c8ed3A3270De7A4815487BA3223C2Fa", + "txHash": "0xa78db07197fd6a89481fc333b097a3325bae6d6f466dedce8325ec3842fbb850", + "kind": "transparent" + }, + { + "address": "0xF35fe79104e157703dbCC3Baa72a81A99591744D", + "txHash": "0x5722e1fada891bfab790e923d5ff34e3443c21a43aed749b64c19504a4f3e4d9", + "kind": "transparent" + }, + { + "address": "0x90b8542d7288a83EC887229A7C727989C3b56209", + "txHash": "0xa30c59c8ad0b5d51b40f56c2b9a7842d49de0f2ee98a6e15776c33e501b05dc1", + "kind": "transparent" + }, + { + "address": "0x374B686137eC0DB442a8d833451f8C12cD4B5De4", + "txHash": "0x0d2a15e13c597ff83198f277d292ab7239be1e5bb3f945a1cd3b1e821dcd4cee", + "kind": "transparent" + }, + { + "address": "0xee5e23492bf49C1F4CF0676b3bF49d78A6dD61c5", + "txHash": "0xe3e62ae45ba6bbe3c9f140309d7730443be9ba8eea7edc966b648f742584c830", + "kind": "transparent" + }, + { + "address": "0xEC572277d4E87a64DcfA774ED219Dd4E69E4BDc6", + "txHash": "0xaeb66da666a008cd562b0aff112b21853fd6d3c6cf22d330118cc5d0fc10f099", + "kind": "transparent" + }, + { + "address": "0x1ceb52584B6C45C7049dc7fDC476bC138E4beaDE", + "txHash": "0x1367304df4a656bfc769c40f7a8b6f260108041cbe26bfeb097e90aba74e4857", + "kind": "transparent" + }, + { + "address": "0x025531b655D9EE335B8E6cc4C118b313f26ACc8F", + "txHash": "0xb739a2255836a940c9554689542d04b04de5f4b23583cc960652a7c8592f12bc", + "kind": "transparent" + }, + { + "address": "0xBdC45324AB9A7e82Ae15324a3d8352b513Ee2788", + "txHash": "0xf31671c1adbbc4ff36610a7780edab9e711d513c426ce1fff6f59cbe1f880f07", + "kind": "transparent" + } + ], + "impls": { + "4353fbe787c13443291bba3d18e906853909285ba948d10f4d95994940b68c97": { + "address": "0x79E25CD672032F3a7A315312d54F28ce3aBE3847", + "txHash": "0xb35dd9772daa68dcfc246d763779f1b2c315149105126dfd61d0f182260d79ef", + "layout": { + "solcVersion": "0.8.21", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "ATTESTATION_REGISTRY", + "offset": 0, + "slot": "101", + "type": "t_address", + "contract": "Router", + "src": "src/Router.sol:13" + }, + { + "label": "MODULE_REGISTRY", + "offset": 0, + "slot": "102", + "type": "t_address", + "contract": "Router", + "src": "src/Router.sol:14" + }, + { + "label": "PORTAL_REGISTRY", + "offset": 0, + "slot": "103", + "type": "t_address", + "contract": "Router", + "src": "src/Router.sol:15" + }, + { + "label": "SCHEMA_REGISTRY", + "offset": 0, + "slot": "104", + "type": "t_address", + "contract": "Router", + "src": "src/Router.sol:16" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + }, + "afc9287c19cb1b830999d2016348e104b2143101ed97ea26cf1c1b48849ca551": { + "address": "0xe3c36DEB0Ce1444fc8c847d6865217A6B2133765", + "txHash": "0x38e1b2030b5951246753ea6463d39247f739522b325c223e6cd6c3b5ff4944f4", + "layout": { + "solcVersion": "0.8.21", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "router", + "offset": 0, + "slot": "101", + "type": "t_contract(IRouter)3696", + "contract": "AttestationRegistry", + "src": "src/AttestationRegistry.sol:17" + }, + { + "label": "version", + "offset": 20, + "slot": "101", + "type": "t_uint16", + "contract": "AttestationRegistry", + "src": "src/AttestationRegistry.sol:19" + }, + { + "label": "attestationIdCounter", + "offset": 22, + "slot": "101", + "type": "t_uint32", + "contract": "AttestationRegistry", + "src": "src/AttestationRegistry.sol:20" + }, + { + "label": "attestations", + "offset": 0, + "slot": "102", + "type": "t_mapping(t_bytes32,t_struct(Attestation)4148_storage)", + "contract": "AttestationRegistry", + "src": "src/AttestationRegistry.sol:22" + }, + { + "label": "chainPrefix", + "offset": 0, + "slot": "103", + "type": "t_uint256", + "contract": "AttestationRegistry", + "src": "src/AttestationRegistry.sol:24" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_bytes_storage": { + "label": "bytes", + "numberOfBytes": "32" + }, + "t_contract(IRouter)3696": { + "label": "contract IRouter", + "numberOfBytes": "20" + }, + "t_mapping(t_bytes32,t_struct(Attestation)4148_storage)": { + "label": "mapping(bytes32 => struct Attestation)", + "numberOfBytes": "32" + }, + "t_struct(Attestation)4148_storage": { + "label": "struct Attestation", + "members": [ + { + "label": "attestationId", + "type": "t_bytes32", + "offset": 0, + "slot": "0" + }, + { + "label": "schemaId", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + }, + { + "label": "replacedBy", + "type": "t_bytes32", + "offset": 0, + "slot": "2" + }, + { + "label": "attester", + "type": "t_address", + "offset": 0, + "slot": "3" + }, + { + "label": "portal", + "type": "t_address", + "offset": 0, + "slot": "4" + }, + { + "label": "attestedDate", + "type": "t_uint64", + "offset": 20, + "slot": "4" + }, + { + "label": "expirationDate", + "type": "t_uint64", + "offset": 0, + "slot": "5" + }, + { + "label": "revocationDate", + "type": "t_uint64", + "offset": 8, + "slot": "5" + }, + { + "label": "version", + "type": "t_uint16", + "offset": 16, + "slot": "5" + }, + { + "label": "revoked", + "type": "t_bool", + "offset": 18, + "slot": "5" + }, + { + "label": "subject", + "type": "t_bytes_storage", + "offset": 0, + "slot": "6" + }, + { + "label": "attestationData", + "type": "t_bytes_storage", + "offset": 0, + "slot": "7" + } + ], + "numberOfBytes": "256" + }, + "t_uint16": { + "label": "uint16", + "numberOfBytes": "2" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + }, + "855a9f1d8e96c2bd24b6a929c90e3681a27dfdf6e80bf08bdaf0de5f33e7accf": { + "address": "0x73B98ad14694f879D89e8D73D90583AB0D0f804d", + "txHash": "0x5aa46c7b2e7851837722fdf77c42256d617c197f89dc44f8e58fd0a26dc78ffd", + "layout": { + "solcVersion": "0.8.21", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "router", + "offset": 0, + "slot": "101", + "type": "t_contract(IRouter)3696", + "contract": "ModuleRegistry", + "src": "src/ModuleRegistry.sol:19" + }, + { + "label": "modules", + "offset": 0, + "slot": "102", + "type": "t_mapping(t_address,t_struct(Module)4180_storage)", + "contract": "ModuleRegistry", + "src": "src/ModuleRegistry.sol:21" + }, + { + "label": "moduleAddresses", + "offset": 0, + "slot": "103", + "type": "t_array(t_address)dyn_storage", + "contract": "ModuleRegistry", + "src": "src/ModuleRegistry.sol:23" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_address)dyn_storage": { + "label": "address[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(IRouter)3696": { + "label": "contract IRouter", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_struct(Module)4180_storage)": { + "label": "mapping(address => struct Module)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Module)4180_storage": { + "label": "struct Module", + "members": [ + { + "label": "moduleAddress", + "type": "t_address", + "offset": 0, + "slot": "0" + }, + { + "label": "name", + "type": "t_string_storage", + "offset": 0, + "slot": "1" + }, + { + "label": "description", + "type": "t_string_storage", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + }, + "4354fba979d8af67ae201159e1b7f7c6048ac523a759db0e2d448b58a54cde2a": { + "address": "0x6BEb40d8fF2D9c9F4c434825F2c84B40Cbc4a6A4", + "txHash": "0xd9fbac0f66bb2cbab2c09a0b13bd2907bbe96c67dd25a384a779ce80109f7fbe", + "layout": { + "solcVersion": "0.8.21", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "router", + "offset": 0, + "slot": "101", + "type": "t_contract(IRouter)3696", + "contract": "PortalRegistry", + "src": "src/PortalRegistry.sol:21" + }, + { + "label": "portals", + "offset": 0, + "slot": "102", + "type": "t_mapping(t_address,t_struct(Portal)4173_storage)", + "contract": "PortalRegistry", + "src": "src/PortalRegistry.sol:23" + }, + { + "label": "issuers", + "offset": 0, + "slot": "103", + "type": "t_mapping(t_address,t_bool)", + "contract": "PortalRegistry", + "src": "src/PortalRegistry.sol:25" + }, + { + "label": "portalAddresses", + "offset": 0, + "slot": "104", + "type": "t_array(t_address)dyn_storage", + "contract": "PortalRegistry", + "src": "src/PortalRegistry.sol:27" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_address)dyn_storage": { + "label": "address[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(IRouter)3696": { + "label": "contract IRouter", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(Portal)4173_storage)": { + "label": "mapping(address => struct Portal)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Portal)4173_storage": { + "label": "struct Portal", + "members": [ + { + "label": "id", + "type": "t_address", + "offset": 0, + "slot": "0" + }, + { + "label": "ownerAddress", + "type": "t_address", + "offset": 0, + "slot": "1" + }, + { + "label": "modules", + "type": "t_array(t_address)dyn_storage", + "offset": 0, + "slot": "2" + }, + { + "label": "isRevocable", + "type": "t_bool", + "offset": 0, + "slot": "3" + }, + { + "label": "name", + "type": "t_string_storage", + "offset": 0, + "slot": "4" + }, + { + "label": "description", + "type": "t_string_storage", + "offset": 0, + "slot": "5" + }, + { + "label": "ownerName", + "type": "t_string_storage", + "offset": 0, + "slot": "6" + } + ], + "numberOfBytes": "224" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + }, + "68d0630cb0ae02e0e7d37f7e07193d62999ecb9070d3ca38b245f3954a34b089": { + "address": "0x4594A8DA79F6bb2C75E548F185B5BDbE5fEdb759", + "txHash": "0x414beff902789c0c8a52cded182b0b6642aa0e6cac623416ffa1a452b021db74", + "layout": { + "solcVersion": "0.8.21", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "router", + "offset": 0, + "slot": "101", + "type": "t_contract(IRouter)3696", + "contract": "SchemaRegistry", + "src": "src/SchemaRegistry.sol:16" + }, + { + "label": "schemas", + "offset": 0, + "slot": "102", + "type": "t_mapping(t_bytes32,t_struct(Schema)4157_storage)", + "contract": "SchemaRegistry", + "src": "src/SchemaRegistry.sol:18" + }, + { + "label": "schemaIds", + "offset": 0, + "slot": "103", + "type": "t_array(t_bytes32)dyn_storage", + "contract": "SchemaRegistry", + "src": "src/SchemaRegistry.sol:20" + }, + { + "label": "schemasIssuers", + "offset": 0, + "slot": "104", + "type": "t_mapping(t_bytes32,t_address)", + "contract": "SchemaRegistry", + "src": "src/SchemaRegistry.sol:22" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(IRouter)3696": { + "label": "contract IRouter", + "numberOfBytes": "20" + }, + "t_mapping(t_bytes32,t_address)": { + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(Schema)4157_storage)": { + "label": "mapping(bytes32 => struct Schema)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Schema)4157_storage": { + "label": "struct Schema", + "members": [ + { + "label": "name", + "type": "t_string_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "description", + "type": "t_string_storage", + "offset": 0, + "slot": "1" + }, + { + "label": "context", + "type": "t_string_storage", + "offset": 0, + "slot": "2" + }, + { + "label": "schema", + "type": "t_string_storage", + "offset": 0, + "slot": "3" + } + ], + "numberOfBytes": "128" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + }, + "cc3bd5ce0f70ee7ad8fd47bda375d640dc7035da4746a94f0ccf30df96358f53": { + "address": "0x4371Cc5C503e1285875016C9B65c7278f1EDFc56", + "txHash": "0x3bc3b75e678867356521e969e4642917c81f35113305a4f2c191f50ba3c3df43", + "layout": { + "solcVersion": "0.8.21", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "router", + "offset": 0, + "slot": "101", + "type": "t_contract(IRouter)7517", + "contract": "AttestationReader", + "src": "src/AttestationReader.sol:17" + }, + { + "label": "easRegistry", + "offset": 0, + "slot": "102", + "type": "t_contract(IEAS)7468", + "contract": "AttestationReader", + "src": "src/AttestationReader.sol:18" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(IEAS)7468": { + "label": "contract IEAS", + "numberOfBytes": "20" + }, + "t_contract(IRouter)7517": { + "label": "contract IRouter", + "numberOfBytes": "20" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + } + } +} diff --git a/contracts/.openzeppelin/unknown-59140.json b/contracts/.openzeppelin/unknown-59140.json index 340581cc..6a25edad 100644 --- a/contracts/.openzeppelin/unknown-59140.json +++ b/contracts/.openzeppelin/unknown-59140.json @@ -41,7 +41,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -50,7 +50,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -58,7 +58,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -66,7 +66,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -74,7 +74,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -255,7 +255,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -264,7 +264,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -272,7 +272,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -280,7 +280,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -288,7 +288,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -468,7 +468,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -477,7 +477,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -485,7 +485,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -493,7 +493,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -501,7 +501,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -607,7 +607,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -616,7 +616,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -624,7 +624,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -632,7 +632,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -640,7 +640,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -782,7 +782,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -791,7 +791,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -799,7 +799,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -807,7 +807,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -815,7 +815,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "ATTESTATION_REGISTRY", @@ -902,7 +902,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -911,7 +911,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -919,7 +919,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -927,7 +927,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -935,7 +935,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -1052,7 +1052,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -1061,7 +1061,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -1069,7 +1069,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -1077,7 +1077,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -1085,7 +1085,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -1266,7 +1266,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -1275,7 +1275,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -1283,7 +1283,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -1291,7 +1291,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -1299,7 +1299,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -1406,7 +1406,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -1415,7 +1415,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -1423,7 +1423,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -1431,7 +1431,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -1439,7 +1439,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -1581,7 +1581,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -1590,7 +1590,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -1598,7 +1598,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -1606,7 +1606,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -1614,7 +1614,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -1795,7 +1795,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -1804,7 +1804,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -1812,7 +1812,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -1820,7 +1820,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -1828,7 +1828,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -1935,7 +1935,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -1944,7 +1944,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -1952,7 +1952,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -1960,7 +1960,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -1968,7 +1968,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -2111,7 +2111,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -2120,7 +2120,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -2128,7 +2128,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -2136,7 +2136,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -2144,7 +2144,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -2262,7 +2262,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -2271,7 +2271,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -2279,7 +2279,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:40" }, { "label": "_owner", @@ -2287,7 +2287,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -2295,13 +2295,13 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", "offset": 0, "slot": "101", - "type": "t_contract(IRouter)7517", + "type": "t_contract(IRouter)7833", "contract": "AttestationReader", "src": "src/AttestationReader.sol:17" }, @@ -2309,7 +2309,7 @@ "label": "easRegistry", "offset": 0, "slot": "102", - "type": "t_contract(IEAS)7468", + "type": "t_contract(IEAS)7784", "contract": "AttestationReader", "src": "src/AttestationReader.sol:18" } @@ -2331,11 +2331,11 @@ "label": "bool", "numberOfBytes": "1" }, - "t_contract(IEAS)7468": { + "t_contract(IEAS)7784": { "label": "contract IEAS", "numberOfBytes": "20" }, - "t_contract(IRouter)7517": { + "t_contract(IRouter)7833": { "label": "contract IRouter", "numberOfBytes": "20" }, @@ -2367,7 +2367,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -2376,7 +2376,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -2384,7 +2384,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -2392,7 +2392,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -2400,7 +2400,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -2582,7 +2582,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -2591,7 +2591,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -2599,7 +2599,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -2607,7 +2607,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -2615,7 +2615,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -2723,7 +2723,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -2732,7 +2732,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -2740,7 +2740,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -2748,7 +2748,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -2756,7 +2756,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -2900,7 +2900,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -2909,7 +2909,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -2917,7 +2917,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -2925,7 +2925,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -2933,7 +2933,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -3051,7 +3051,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -3060,7 +3060,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -3068,7 +3068,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -3076,7 +3076,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -3084,7 +3084,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -3265,7 +3265,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -3274,7 +3274,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -3282,7 +3282,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:40" }, { "label": "_owner", @@ -3290,7 +3290,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -3298,13 +3298,13 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", "offset": 0, "slot": "101", - "type": "t_contract(IRouter)7517", + "type": "t_contract(IRouter)7833", "contract": "ModuleRegistry", "src": "src/ModuleRegistry.sol:19" }, @@ -3312,7 +3312,7 @@ "label": "modules", "offset": 0, "slot": "102", - "type": "t_mapping(t_address,t_struct(Module)8914_storage)", + "type": "t_mapping(t_address,t_struct(Module)9366_storage)", "contract": "ModuleRegistry", "src": "src/ModuleRegistry.sol:21" }, @@ -3346,11 +3346,11 @@ "label": "bool", "numberOfBytes": "1" }, - "t_contract(IRouter)7517": { + "t_contract(IRouter)7833": { "label": "contract IRouter", "numberOfBytes": "20" }, - "t_mapping(t_address,t_struct(Module)8914_storage)": { + "t_mapping(t_address,t_struct(Module)9366_storage)": { "label": "mapping(address => struct Module)", "numberOfBytes": "32" }, @@ -3358,7 +3358,7 @@ "label": "string", "numberOfBytes": "32" }, - "t_struct(Module)8914_storage": { + "t_struct(Module)9366_storage": { "label": "struct Module", "members": [ { @@ -3405,7 +3405,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -3414,7 +3414,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -3422,7 +3422,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -3430,7 +3430,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -3438,7 +3438,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -3581,7 +3581,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -3590,7 +3590,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -3598,7 +3598,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -3606,7 +3606,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -3614,7 +3614,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -3743,7 +3743,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -3752,7 +3752,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -3760,7 +3760,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:40" }, { "label": "_owner", @@ -3768,7 +3768,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -3776,13 +3776,13 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", "offset": 0, "slot": "101", - "type": "t_contract(IRouter)7517", + "type": "t_contract(IRouter)7833", "contract": "SchemaRegistry", "src": "src/SchemaRegistry.sol:16" }, @@ -3790,7 +3790,7 @@ "label": "schemas", "offset": 0, "slot": "102", - "type": "t_mapping(t_bytes32,t_struct(Schema)8891_storage)", + "type": "t_mapping(t_bytes32,t_struct(Schema)9343_storage)", "contract": "SchemaRegistry", "src": "src/SchemaRegistry.sol:18" }, @@ -3836,7 +3836,7 @@ "label": "bytes32", "numberOfBytes": "32" }, - "t_contract(IRouter)7517": { + "t_contract(IRouter)7833": { "label": "contract IRouter", "numberOfBytes": "20" }, @@ -3844,7 +3844,7 @@ "label": "mapping(bytes32 => address)", "numberOfBytes": "32" }, - "t_mapping(t_bytes32,t_struct(Schema)8891_storage)": { + "t_mapping(t_bytes32,t_struct(Schema)9343_storage)": { "label": "mapping(bytes32 => struct Schema)", "numberOfBytes": "32" }, @@ -3852,7 +3852,7 @@ "label": "string", "numberOfBytes": "32" }, - "t_struct(Schema)8891_storage": { + "t_struct(Schema)9343_storage": { "label": "struct Schema", "members": [ { @@ -3906,7 +3906,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -3915,7 +3915,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -3923,7 +3923,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:40" }, { "label": "_owner", @@ -3931,7 +3931,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -3939,13 +3939,13 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", "offset": 0, "slot": "101", - "type": "t_contract(IRouter)7517", + "type": "t_contract(IRouter)7833", "contract": "AttestationRegistry", "src": "src/AttestationRegistry.sol:17" }, @@ -3969,7 +3969,7 @@ "label": "attestations", "offset": 0, "slot": "102", - "type": "t_mapping(t_bytes32,t_struct(Attestation)8882_storage)", + "type": "t_mapping(t_bytes32,t_struct(Attestation)9334_storage)", "contract": "AttestationRegistry", "src": "src/AttestationRegistry.sol:22" }, @@ -4007,15 +4007,15 @@ "label": "bytes", "numberOfBytes": "32" }, - "t_contract(IRouter)7517": { + "t_contract(IRouter)7833": { "label": "contract IRouter", "numberOfBytes": "20" }, - "t_mapping(t_bytes32,t_struct(Attestation)8882_storage)": { + "t_mapping(t_bytes32,t_struct(Attestation)9334_storage)": { "label": "mapping(bytes32 => struct Attestation)", "numberOfBytes": "32" }, - "t_struct(Attestation)8882_storage": { + "t_struct(Attestation)9334_storage": { "label": "struct Attestation", "members": [ { @@ -4129,7 +4129,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -4138,7 +4138,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -4146,7 +4146,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -4154,7 +4154,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -4162,7 +4162,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -4306,7 +4306,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -4315,7 +4315,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -4323,7 +4323,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -4331,7 +4331,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -4339,7 +4339,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", diff --git a/contracts/.openzeppelin/unknown-59141.json b/contracts/.openzeppelin/unknown-59141.json new file mode 100644 index 00000000..7061ed00 --- /dev/null +++ b/contracts/.openzeppelin/unknown-59141.json @@ -0,0 +1,849 @@ +{ + "manifestVersion": "3.2", + "admin": { + "address": "0xe3c36DEB0Ce1444fc8c847d6865217A6B2133765", + "txHash": "0x00ecb5162b671108f9948d246549bf5b4c8d727cc243618f2564d5b370627fe9" + }, + "proxies": [ + { + "address": "0xAfA952790492DDeB474012cEA12ba34B788ab39F", + "txHash": "0xe8c34aa200872dc9022d21aa6bb813b7c9fbbd98c044ec2d73613ddfecfcd5aa", + "kind": "transparent" + }, + { + "address": "0xDaf3C3632327343f7df0Baad2dc9144fa4e1001F", + "txHash": "0x63183b30de004a1d60e66b70027d4e950dbd6b07e6c82526fd4a71a352b10803", + "kind": "transparent" + }, + { + "address": "0x3C443B9f0c8ed3A3270De7A4815487BA3223C2Fa", + "txHash": "0xa6b763170c1e32183580127ac55560059157888665c6f378888c3ffafc473d5a", + "kind": "transparent" + }, + { + "address": "0xF35fe79104e157703dbCC3Baa72a81A99591744D", + "txHash": "0x3989f4e8939ab719bdf7d0654c8db5a6b74bfe41b650efc53c99b98741badbb8", + "kind": "transparent" + }, + { + "address": "0x90b8542d7288a83EC887229A7C727989C3b56209", + "txHash": "0xe90fe88a6c060550b8628aadace6029f25aedb28602aafcc4cd383f9bbf1f1ae", + "kind": "transparent" + } + ], + "impls": { + "4353fbe787c13443291bba3d18e906853909285ba948d10f4d95994940b68c97": { + "address": "0xFd3b9e9C60e9E7694751CfA8B10dE5850bC78C2F", + "txHash": "0x2ed953ae7c1147a261c4c023779fa103f7a59fb53bb2b80e40993aae92bb568d", + "layout": { + "solcVersion": "0.8.21", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + }, + { + "label": "ATTESTATION_REGISTRY", + "offset": 0, + "slot": "101", + "type": "t_address", + "contract": "Router", + "src": "src/Router.sol:13" + }, + { + "label": "MODULE_REGISTRY", + "offset": 0, + "slot": "102", + "type": "t_address", + "contract": "Router", + "src": "src/Router.sol:14" + }, + { + "label": "PORTAL_REGISTRY", + "offset": 0, + "slot": "103", + "type": "t_address", + "contract": "Router", + "src": "src/Router.sol:15" + }, + { + "label": "SCHEMA_REGISTRY", + "offset": 0, + "slot": "104", + "type": "t_address", + "contract": "Router", + "src": "src/Router.sol:16" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + }, + "afc9287c19cb1b830999d2016348e104b2143101ed97ea26cf1c1b48849ca551": { + "address": "0x73B98ad14694f879D89e8D73D90583AB0D0f804d", + "txHash": "0x67344a83bd800a1541f7f091863b16440385dabb4c5291e7c671e424261c2691", + "layout": { + "solcVersion": "0.8.21", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + }, + { + "label": "router", + "offset": 0, + "slot": "101", + "type": "t_contract(IRouter)7813", + "contract": "AttestationRegistry", + "src": "src/AttestationRegistry.sol:17" + }, + { + "label": "version", + "offset": 20, + "slot": "101", + "type": "t_uint16", + "contract": "AttestationRegistry", + "src": "src/AttestationRegistry.sol:19" + }, + { + "label": "attestationIdCounter", + "offset": 22, + "slot": "101", + "type": "t_uint32", + "contract": "AttestationRegistry", + "src": "src/AttestationRegistry.sol:20" + }, + { + "label": "attestations", + "offset": 0, + "slot": "102", + "type": "t_mapping(t_bytes32,t_struct(Attestation)9314_storage)", + "contract": "AttestationRegistry", + "src": "src/AttestationRegistry.sol:22" + }, + { + "label": "chainPrefix", + "offset": 0, + "slot": "103", + "type": "t_uint256", + "contract": "AttestationRegistry", + "src": "src/AttestationRegistry.sol:24" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_bytes_storage": { + "label": "bytes", + "numberOfBytes": "32" + }, + "t_contract(IRouter)7813": { + "label": "contract IRouter", + "numberOfBytes": "20" + }, + "t_mapping(t_bytes32,t_struct(Attestation)9314_storage)": { + "label": "mapping(bytes32 => struct Attestation)", + "numberOfBytes": "32" + }, + "t_struct(Attestation)9314_storage": { + "label": "struct Attestation", + "members": [ + { + "label": "attestationId", + "type": "t_bytes32", + "offset": 0, + "slot": "0" + }, + { + "label": "schemaId", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + }, + { + "label": "replacedBy", + "type": "t_bytes32", + "offset": 0, + "slot": "2" + }, + { + "label": "attester", + "type": "t_address", + "offset": 0, + "slot": "3" + }, + { + "label": "portal", + "type": "t_address", + "offset": 0, + "slot": "4" + }, + { + "label": "attestedDate", + "type": "t_uint64", + "offset": 20, + "slot": "4" + }, + { + "label": "expirationDate", + "type": "t_uint64", + "offset": 0, + "slot": "5" + }, + { + "label": "revocationDate", + "type": "t_uint64", + "offset": 8, + "slot": "5" + }, + { + "label": "version", + "type": "t_uint16", + "offset": 16, + "slot": "5" + }, + { + "label": "revoked", + "type": "t_bool", + "offset": 18, + "slot": "5" + }, + { + "label": "subject", + "type": "t_bytes_storage", + "offset": 0, + "slot": "6" + }, + { + "label": "attestationData", + "type": "t_bytes_storage", + "offset": 0, + "slot": "7" + } + ], + "numberOfBytes": "256" + }, + "t_uint16": { + "label": "uint16", + "numberOfBytes": "2" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + }, + "855a9f1d8e96c2bd24b6a929c90e3681a27dfdf6e80bf08bdaf0de5f33e7accf": { + "address": "0x6BEb40d8fF2D9c9F4c434825F2c84B40Cbc4a6A4", + "txHash": "0xee751c37f9c94d0918e2159ec7bd7ae27a9d72440809c2b728a2f333062350fc", + "layout": { + "solcVersion": "0.8.21", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + }, + { + "label": "router", + "offset": 0, + "slot": "101", + "type": "t_contract(IRouter)7813", + "contract": "ModuleRegistry", + "src": "src/ModuleRegistry.sol:19" + }, + { + "label": "modules", + "offset": 0, + "slot": "102", + "type": "t_mapping(t_address,t_struct(Module)9346_storage)", + "contract": "ModuleRegistry", + "src": "src/ModuleRegistry.sol:21" + }, + { + "label": "moduleAddresses", + "offset": 0, + "slot": "103", + "type": "t_array(t_address)dyn_storage", + "contract": "ModuleRegistry", + "src": "src/ModuleRegistry.sol:23" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_address)dyn_storage": { + "label": "address[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(IRouter)7813": { + "label": "contract IRouter", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_struct(Module)9346_storage)": { + "label": "mapping(address => struct Module)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Module)9346_storage": { + "label": "struct Module", + "members": [ + { + "label": "moduleAddress", + "type": "t_address", + "offset": 0, + "slot": "0" + }, + { + "label": "name", + "type": "t_string_storage", + "offset": 0, + "slot": "1" + }, + { + "label": "description", + "type": "t_string_storage", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + }, + "4354fba979d8af67ae201159e1b7f7c6048ac523a759db0e2d448b58a54cde2a": { + "address": "0x4594A8DA79F6bb2C75E548F185B5BDbE5fEdb759", + "txHash": "0xcb3f7bf8ca629f542298366009cbc10cf6a2f41ba6d91986a88bf9e75fa80cd8", + "layout": { + "solcVersion": "0.8.21", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + }, + { + "label": "router", + "offset": 0, + "slot": "101", + "type": "t_contract(IRouter)7813", + "contract": "PortalRegistry", + "src": "src/PortalRegistry.sol:21" + }, + { + "label": "portals", + "offset": 0, + "slot": "102", + "type": "t_mapping(t_address,t_struct(Portal)9339_storage)", + "contract": "PortalRegistry", + "src": "src/PortalRegistry.sol:23" + }, + { + "label": "issuers", + "offset": 0, + "slot": "103", + "type": "t_mapping(t_address,t_bool)", + "contract": "PortalRegistry", + "src": "src/PortalRegistry.sol:25" + }, + { + "label": "portalAddresses", + "offset": 0, + "slot": "104", + "type": "t_array(t_address)dyn_storage", + "contract": "PortalRegistry", + "src": "src/PortalRegistry.sol:27" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_address)dyn_storage": { + "label": "address[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(IRouter)7813": { + "label": "contract IRouter", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(Portal)9339_storage)": { + "label": "mapping(address => struct Portal)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Portal)9339_storage": { + "label": "struct Portal", + "members": [ + { + "label": "id", + "type": "t_address", + "offset": 0, + "slot": "0" + }, + { + "label": "ownerAddress", + "type": "t_address", + "offset": 0, + "slot": "1" + }, + { + "label": "modules", + "type": "t_array(t_address)dyn_storage", + "offset": 0, + "slot": "2" + }, + { + "label": "isRevocable", + "type": "t_bool", + "offset": 0, + "slot": "3" + }, + { + "label": "name", + "type": "t_string_storage", + "offset": 0, + "slot": "4" + }, + { + "label": "description", + "type": "t_string_storage", + "offset": 0, + "slot": "5" + }, + { + "label": "ownerName", + "type": "t_string_storage", + "offset": 0, + "slot": "6" + } + ], + "numberOfBytes": "224" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + }, + "68d0630cb0ae02e0e7d37f7e07193d62999ecb9070d3ca38b245f3954a34b089": { + "address": "0x4371Cc5C503e1285875016C9B65c7278f1EDFc56", + "txHash": "0x94cd0857e20ab84ab3daf3aa27845a91d14b8bd68192bdca9476b438b6f3a876", + "layout": { + "solcVersion": "0.8.21", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + }, + { + "label": "router", + "offset": 0, + "slot": "101", + "type": "t_contract(IRouter)7813", + "contract": "SchemaRegistry", + "src": "src/SchemaRegistry.sol:16" + }, + { + "label": "schemas", + "offset": 0, + "slot": "102", + "type": "t_mapping(t_bytes32,t_struct(Schema)9323_storage)", + "contract": "SchemaRegistry", + "src": "src/SchemaRegistry.sol:18" + }, + { + "label": "schemaIds", + "offset": 0, + "slot": "103", + "type": "t_array(t_bytes32)dyn_storage", + "contract": "SchemaRegistry", + "src": "src/SchemaRegistry.sol:20" + }, + { + "label": "schemasIssuers", + "offset": 0, + "slot": "104", + "type": "t_mapping(t_bytes32,t_address)", + "contract": "SchemaRegistry", + "src": "src/SchemaRegistry.sol:22" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(IRouter)7813": { + "label": "contract IRouter", + "numberOfBytes": "20" + }, + "t_mapping(t_bytes32,t_address)": { + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(Schema)9323_storage)": { + "label": "mapping(bytes32 => struct Schema)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Schema)9323_storage": { + "label": "struct Schema", + "members": [ + { + "label": "name", + "type": "t_string_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "description", + "type": "t_string_storage", + "offset": 0, + "slot": "1" + }, + { + "label": "context", + "type": "t_string_storage", + "offset": 0, + "slot": "2" + }, + { + "label": "schema", + "type": "t_string_storage", + "offset": 0, + "slot": "3" + } + ], + "numberOfBytes": "128" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + } + } +} diff --git a/contracts/.openzeppelin/unknown-59144.json b/contracts/.openzeppelin/unknown-59144.json index 4d7b20a8..8bc56a23 100644 --- a/contracts/.openzeppelin/unknown-59144.json +++ b/contracts/.openzeppelin/unknown-59144.json @@ -44,7 +44,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -53,7 +53,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -61,7 +61,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -69,7 +69,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -77,7 +77,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "ATTESTATION_REGISTRY", @@ -154,7 +154,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -163,7 +163,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -171,7 +171,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -179,7 +179,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -187,7 +187,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -368,7 +368,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -377,7 +377,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -385,7 +385,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -393,7 +393,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -401,7 +401,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -508,7 +508,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -517,7 +517,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -525,7 +525,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -533,7 +533,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -541,7 +541,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -684,7 +684,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -693,7 +693,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -701,7 +701,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -709,7 +709,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -717,7 +717,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -834,7 +834,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -843,7 +843,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -851,7 +851,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -859,7 +859,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -867,7 +867,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -1048,7 +1048,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -1057,7 +1057,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -1065,7 +1065,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -1073,7 +1073,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -1081,7 +1081,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -1224,7 +1224,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -1233,7 +1233,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -1241,7 +1241,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -1249,7 +1249,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -1257,7 +1257,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -1443,7 +1443,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -1452,7 +1452,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -1460,7 +1460,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -1468,7 +1468,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -1476,7 +1476,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -1584,7 +1584,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -1593,7 +1593,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -1601,7 +1601,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -1609,7 +1609,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -1617,7 +1617,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -1760,7 +1760,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -1769,7 +1769,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -1777,7 +1777,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -1785,7 +1785,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -1793,7 +1793,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -1910,7 +1910,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -1919,7 +1919,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -1927,7 +1927,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -1935,7 +1935,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -1943,7 +1943,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -2011,7 +2011,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -2020,7 +2020,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -2028,7 +2028,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -2036,7 +2036,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -2044,7 +2044,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -2225,7 +2225,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -2234,7 +2234,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -2242,7 +2242,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -2250,7 +2250,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -2258,7 +2258,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -2365,7 +2365,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -2374,7 +2374,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -2382,7 +2382,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -2390,7 +2390,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -2398,7 +2398,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -2541,7 +2541,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -2550,7 +2550,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -2558,7 +2558,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -2566,7 +2566,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -2574,7 +2574,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -2703,7 +2703,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -2712,7 +2712,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -2720,7 +2720,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -2728,7 +2728,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -2736,7 +2736,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -2866,7 +2866,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -2875,7 +2875,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -2883,7 +2883,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -2891,7 +2891,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -2899,7 +2899,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -3089,7 +3089,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -3098,7 +3098,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -3106,7 +3106,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -3114,7 +3114,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -3122,7 +3122,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", @@ -3266,7 +3266,7 @@ "slot": "0", "type": "t_uint8", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", "retypedFrom": "bool" }, { @@ -3275,7 +3275,7 @@ "slot": "0", "type": "t_bool", "contract": "Initializable", - "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" }, { "label": "__gap", @@ -3283,7 +3283,7 @@ "slot": "1", "type": "t_array(t_uint256)50_storage", "contract": "ContextUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" }, { "label": "_owner", @@ -3291,7 +3291,7 @@ "slot": "51", "type": "t_address", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" }, { "label": "__gap", @@ -3299,7 +3299,7 @@ "slot": "52", "type": "t_array(t_uint256)49_storage", "contract": "OwnableUpgradeable", - "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" }, { "label": "router", diff --git a/contracts/.openzeppelin/unknown-8453.json b/contracts/.openzeppelin/unknown-8453.json new file mode 100644 index 00000000..1fc8a76f --- /dev/null +++ b/contracts/.openzeppelin/unknown-8453.json @@ -0,0 +1,955 @@ +{ + "manifestVersion": "3.2", + "admin": { + "address": "0x39e0033027F40A47F737C0E97720F2e7Add95211", + "txHash": "0x7a3832d46172dcab5dff1183f1eac2528054bc34ddbfc6f23bbb6bf078578479" + }, + "proxies": [ + { + "address": "0x63b2d528805Fc9373586366705852FA89debd4d0", + "txHash": "0x117cca5f44a5367432d28530da173d07243a27fc99b42a88039d3f10d3c64fce", + "kind": "transparent" + }, + { + "address": "0xA0080DBd35711faD39258E45d9A5D798852b05D4", + "txHash": "0x81d7a18f2c8f11e14f192183897a2387df700ce52c1e4670685bc6418d454d83", + "kind": "transparent" + }, + { + "address": "0xAd0C12db58098A6665CBEf48f60eB67d81d1F1ff", + "txHash": "0x02ecaf30c64129ec25e9b05f27aae3ee96ee2c8a2dad5ab06c856f98470b2fb3", + "kind": "transparent" + }, + { + "address": "0xcbf28432C25B400E645F0EaC05F8954e8EE7c0d6", + "txHash": "0xc0e96592e2688dd1727c0c939d8b6db1bcf8342ba459c13206076848d17b55ea", + "kind": "transparent" + }, + { + "address": "0x8081dCd745f160c148Eb5be510F78628A0951c31", + "txHash": "0x30065f64b6283cef0664657928de0813b403142f60f22420023015c0244dd7e8", + "kind": "transparent" + }, + { + "address": "0xD2E0469237b19A6cE2a326fC2cabf233FB5B31ca", + "txHash": "0xfaa4d2a51d405a214045e51486b32be22504e7693fb4eaf73a7ee11a261c05b6", + "kind": "transparent" + } + ], + "impls": { + "4353fbe787c13443291bba3d18e906853909285ba948d10f4d95994940b68c97": { + "address": "0xF2c4Faee2BA3Bd2DA439E0D08f00D3f59783811A", + "txHash": "0xce532dff69f0d1af1c3103688cfbea21ae025d910069e7f68f1fed331ecba098", + "layout": { + "solcVersion": "0.8.21", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + }, + { + "label": "ATTESTATION_REGISTRY", + "offset": 0, + "slot": "101", + "type": "t_address", + "contract": "Router", + "src": "src/Router.sol:13" + }, + { + "label": "MODULE_REGISTRY", + "offset": 0, + "slot": "102", + "type": "t_address", + "contract": "Router", + "src": "src/Router.sol:14" + }, + { + "label": "PORTAL_REGISTRY", + "offset": 0, + "slot": "103", + "type": "t_address", + "contract": "Router", + "src": "src/Router.sol:15" + }, + { + "label": "SCHEMA_REGISTRY", + "offset": 0, + "slot": "104", + "type": "t_address", + "contract": "Router", + "src": "src/Router.sol:16" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + }, + "afc9287c19cb1b830999d2016348e104b2143101ed97ea26cf1c1b48849ca551": { + "address": "0x7863e2C6B11227eA058934E2E43e5B3b746Ea7B0", + "txHash": "0x4b8c55433838424b44fb11124872ffd4e73aa5f09290789d0b554a4e718f71ae", + "layout": { + "solcVersion": "0.8.21", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + }, + { + "label": "router", + "offset": 0, + "slot": "101", + "type": "t_contract(IRouter)7813", + "contract": "AttestationRegistry", + "src": "src/AttestationRegistry.sol:17" + }, + { + "label": "version", + "offset": 20, + "slot": "101", + "type": "t_uint16", + "contract": "AttestationRegistry", + "src": "src/AttestationRegistry.sol:19" + }, + { + "label": "attestationIdCounter", + "offset": 22, + "slot": "101", + "type": "t_uint32", + "contract": "AttestationRegistry", + "src": "src/AttestationRegistry.sol:20" + }, + { + "label": "attestations", + "offset": 0, + "slot": "102", + "type": "t_mapping(t_bytes32,t_struct(Attestation)9314_storage)", + "contract": "AttestationRegistry", + "src": "src/AttestationRegistry.sol:22" + }, + { + "label": "chainPrefix", + "offset": 0, + "slot": "103", + "type": "t_uint256", + "contract": "AttestationRegistry", + "src": "src/AttestationRegistry.sol:24" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_bytes_storage": { + "label": "bytes", + "numberOfBytes": "32" + }, + "t_contract(IRouter)7813": { + "label": "contract IRouter", + "numberOfBytes": "20" + }, + "t_mapping(t_bytes32,t_struct(Attestation)9314_storage)": { + "label": "mapping(bytes32 => struct Attestation)", + "numberOfBytes": "32" + }, + "t_struct(Attestation)9314_storage": { + "label": "struct Attestation", + "members": [ + { + "label": "attestationId", + "type": "t_bytes32", + "offset": 0, + "slot": "0" + }, + { + "label": "schemaId", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + }, + { + "label": "replacedBy", + "type": "t_bytes32", + "offset": 0, + "slot": "2" + }, + { + "label": "attester", + "type": "t_address", + "offset": 0, + "slot": "3" + }, + { + "label": "portal", + "type": "t_address", + "offset": 0, + "slot": "4" + }, + { + "label": "attestedDate", + "type": "t_uint64", + "offset": 20, + "slot": "4" + }, + { + "label": "expirationDate", + "type": "t_uint64", + "offset": 0, + "slot": "5" + }, + { + "label": "revocationDate", + "type": "t_uint64", + "offset": 8, + "slot": "5" + }, + { + "label": "version", + "type": "t_uint16", + "offset": 16, + "slot": "5" + }, + { + "label": "revoked", + "type": "t_bool", + "offset": 18, + "slot": "5" + }, + { + "label": "subject", + "type": "t_bytes_storage", + "offset": 0, + "slot": "6" + }, + { + "label": "attestationData", + "type": "t_bytes_storage", + "offset": 0, + "slot": "7" + } + ], + "numberOfBytes": "256" + }, + "t_uint16": { + "label": "uint16", + "numberOfBytes": "2" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + }, + "855a9f1d8e96c2bd24b6a929c90e3681a27dfdf6e80bf08bdaf0de5f33e7accf": { + "address": "0x20771528c8CB6CcBc9a2A1aE52412D03F154C94e", + "txHash": "0xcacfc26450b40a859e2145f2b32bd5f4fa9dda301d05b17e12f42688a066ffbc", + "layout": { + "solcVersion": "0.8.21", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + }, + { + "label": "router", + "offset": 0, + "slot": "101", + "type": "t_contract(IRouter)7813", + "contract": "ModuleRegistry", + "src": "src/ModuleRegistry.sol:19" + }, + { + "label": "modules", + "offset": 0, + "slot": "102", + "type": "t_mapping(t_address,t_struct(Module)9346_storage)", + "contract": "ModuleRegistry", + "src": "src/ModuleRegistry.sol:21" + }, + { + "label": "moduleAddresses", + "offset": 0, + "slot": "103", + "type": "t_array(t_address)dyn_storage", + "contract": "ModuleRegistry", + "src": "src/ModuleRegistry.sol:23" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_address)dyn_storage": { + "label": "address[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(IRouter)7813": { + "label": "contract IRouter", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_struct(Module)9346_storage)": { + "label": "mapping(address => struct Module)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Module)9346_storage": { + "label": "struct Module", + "members": [ + { + "label": "moduleAddress", + "type": "t_address", + "offset": 0, + "slot": "0" + }, + { + "label": "name", + "type": "t_string_storage", + "offset": 0, + "slot": "1" + }, + { + "label": "description", + "type": "t_string_storage", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + }, + "4354fba979d8af67ae201159e1b7f7c6048ac523a759db0e2d448b58a54cde2a": { + "address": "0xB0c43b8Ade08A550ece33F1e0D08d611285dB1Ac", + "txHash": "0xc0e684b5e648d5f9780a8fa065733ba7dffc91856ab92be75dd672e9b8ed7b8a", + "layout": { + "solcVersion": "0.8.21", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + }, + { + "label": "router", + "offset": 0, + "slot": "101", + "type": "t_contract(IRouter)7813", + "contract": "PortalRegistry", + "src": "src/PortalRegistry.sol:21" + }, + { + "label": "portals", + "offset": 0, + "slot": "102", + "type": "t_mapping(t_address,t_struct(Portal)9339_storage)", + "contract": "PortalRegistry", + "src": "src/PortalRegistry.sol:23" + }, + { + "label": "issuers", + "offset": 0, + "slot": "103", + "type": "t_mapping(t_address,t_bool)", + "contract": "PortalRegistry", + "src": "src/PortalRegistry.sol:25" + }, + { + "label": "portalAddresses", + "offset": 0, + "slot": "104", + "type": "t_array(t_address)dyn_storage", + "contract": "PortalRegistry", + "src": "src/PortalRegistry.sol:27" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_address)dyn_storage": { + "label": "address[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(IRouter)7813": { + "label": "contract IRouter", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(Portal)9339_storage)": { + "label": "mapping(address => struct Portal)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Portal)9339_storage": { + "label": "struct Portal", + "members": [ + { + "label": "id", + "type": "t_address", + "offset": 0, + "slot": "0" + }, + { + "label": "ownerAddress", + "type": "t_address", + "offset": 0, + "slot": "1" + }, + { + "label": "modules", + "type": "t_array(t_address)dyn_storage", + "offset": 0, + "slot": "2" + }, + { + "label": "isRevocable", + "type": "t_bool", + "offset": 0, + "slot": "3" + }, + { + "label": "name", + "type": "t_string_storage", + "offset": 0, + "slot": "4" + }, + { + "label": "description", + "type": "t_string_storage", + "offset": 0, + "slot": "5" + }, + { + "label": "ownerName", + "type": "t_string_storage", + "offset": 0, + "slot": "6" + } + ], + "numberOfBytes": "224" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + }, + "68d0630cb0ae02e0e7d37f7e07193d62999ecb9070d3ca38b245f3954a34b089": { + "address": "0xCE84ee14DC25281DaADC6441E61dC511A6bE02aF", + "txHash": "0x8ce5d1c8e53029d24a99855d05547e44a786f26dd4d2822ba9705f24b6ec04b0", + "layout": { + "solcVersion": "0.8.21", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + }, + { + "label": "router", + "offset": 0, + "slot": "101", + "type": "t_contract(IRouter)7813", + "contract": "SchemaRegistry", + "src": "src/SchemaRegistry.sol:16" + }, + { + "label": "schemas", + "offset": 0, + "slot": "102", + "type": "t_mapping(t_bytes32,t_struct(Schema)9323_storage)", + "contract": "SchemaRegistry", + "src": "src/SchemaRegistry.sol:18" + }, + { + "label": "schemaIds", + "offset": 0, + "slot": "103", + "type": "t_array(t_bytes32)dyn_storage", + "contract": "SchemaRegistry", + "src": "src/SchemaRegistry.sol:20" + }, + { + "label": "schemasIssuers", + "offset": 0, + "slot": "104", + "type": "t_mapping(t_bytes32,t_address)", + "contract": "SchemaRegistry", + "src": "src/SchemaRegistry.sol:22" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(IRouter)7813": { + "label": "contract IRouter", + "numberOfBytes": "20" + }, + "t_mapping(t_bytes32,t_address)": { + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(Schema)9323_storage)": { + "label": "mapping(bytes32 => struct Schema)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Schema)9323_storage": { + "label": "struct Schema", + "members": [ + { + "label": "name", + "type": "t_string_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "description", + "type": "t_string_storage", + "offset": 0, + "slot": "1" + }, + { + "label": "context", + "type": "t_string_storage", + "offset": 0, + "slot": "2" + }, + { + "label": "schema", + "type": "t_string_storage", + "offset": 0, + "slot": "3" + } + ], + "numberOfBytes": "128" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + }, + "cc3bd5ce0f70ee7ad8fd47bda375d640dc7035da4746a94f0ccf30df96358f53": { + "address": "0x5F297C8778DD168aFB1BAb93aD347f85F699A092", + "txHash": "0x5853b55920eba320306e67fe24b6c30589fc581a656aa6a1653747be60a72463", + "layout": { + "solcVersion": "0.8.21", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + }, + { + "label": "router", + "offset": 0, + "slot": "101", + "type": "t_contract(IRouter)7813", + "contract": "AttestationReader", + "src": "src/AttestationReader.sol:17" + }, + { + "label": "easRegistry", + "offset": 0, + "slot": "102", + "type": "t_contract(IEAS)7764", + "contract": "AttestationReader", + "src": "src/AttestationReader.sol:18" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(IEAS)7764": { + "label": "contract IEAS", + "numberOfBytes": "20" + }, + "t_contract(IRouter)7813": { + "label": "contract IRouter", + "numberOfBytes": "20" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + } + } +} diff --git a/contracts/.openzeppelin/unknown-84532.json b/contracts/.openzeppelin/unknown-84532.json new file mode 100644 index 00000000..540c6151 --- /dev/null +++ b/contracts/.openzeppelin/unknown-84532.json @@ -0,0 +1,849 @@ +{ + "manifestVersion": "3.2", + "admin": { + "address": "0xA4a7517F62216BD42e42a67dF09C25adc72A5897", + "txHash": "0x75f8e1cc7f0baeed65ae21e0347df03f013262857139add0f0cc3625fddd81d0" + }, + "proxies": [ + { + "address": "0xE235826514945186227918325D3E5b5f873861A6", + "txHash": "0xece646880c516e2c80a0f56300939b9503870629193d28d42f8b296949510617", + "kind": "transparent" + }, + { + "address": "0x374B686137eC0DB442a8d833451f8C12cD4B5De4", + "txHash": "0x71313463a1bc7a75dfbb19a976c8743181239e5324cbee56eb055e9357f39430", + "kind": "transparent" + }, + { + "address": "0xEC572277d4E87a64DcfA774ED219Dd4E69E4BDc6", + "txHash": "0x0514ad8636e72e1adec2a329852e3c802d328fa7d7b8a95f20a23727d149be63", + "kind": "transparent" + }, + { + "address": "0x025531b655D9EE335B8E6cc4C118b313f26ACc8F", + "txHash": "0x96929d2c945be815be13ffb307f6b35ed1fe79193109415b956257f2c485ee84", + "kind": "transparent" + }, + { + "address": "0x66D2F3DCc970343b83a6263E20832184fa71CFe7", + "txHash": "0x4d8a4152f77a9fd3424b87f58733eaafbfb0ed6f47179830ed893842839c652e", + "kind": "transparent" + } + ], + "impls": { + "4353fbe787c13443291bba3d18e906853909285ba948d10f4d95994940b68c97": { + "address": "0x6c46c245918d4fcfC13F0a9e2e49d4E2739A353a", + "txHash": "0x25063ec837814e5dda2cb0142471bb783ee91de48608912f3487e0870961150c", + "layout": { + "solcVersion": "0.8.21", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + }, + { + "label": "ATTESTATION_REGISTRY", + "offset": 0, + "slot": "101", + "type": "t_address", + "contract": "Router", + "src": "src/Router.sol:13" + }, + { + "label": "MODULE_REGISTRY", + "offset": 0, + "slot": "102", + "type": "t_address", + "contract": "Router", + "src": "src/Router.sol:14" + }, + { + "label": "PORTAL_REGISTRY", + "offset": 0, + "slot": "103", + "type": "t_address", + "contract": "Router", + "src": "src/Router.sol:15" + }, + { + "label": "SCHEMA_REGISTRY", + "offset": 0, + "slot": "104", + "type": "t_address", + "contract": "Router", + "src": "src/Router.sol:16" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + }, + "afc9287c19cb1b830999d2016348e104b2143101ed97ea26cf1c1b48849ca551": { + "address": "0x51929da151eC2C5a5881C750E5b9941eACC46c1d", + "txHash": "0x6abced8a4fbfdad2e6055f7105419834f58616574339e191ebcebd0510c0f643", + "layout": { + "solcVersion": "0.8.21", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + }, + { + "label": "router", + "offset": 0, + "slot": "101", + "type": "t_contract(IRouter)7813", + "contract": "AttestationRegistry", + "src": "src/AttestationRegistry.sol:17" + }, + { + "label": "version", + "offset": 20, + "slot": "101", + "type": "t_uint16", + "contract": "AttestationRegistry", + "src": "src/AttestationRegistry.sol:19" + }, + { + "label": "attestationIdCounter", + "offset": 22, + "slot": "101", + "type": "t_uint32", + "contract": "AttestationRegistry", + "src": "src/AttestationRegistry.sol:20" + }, + { + "label": "attestations", + "offset": 0, + "slot": "102", + "type": "t_mapping(t_bytes32,t_struct(Attestation)9314_storage)", + "contract": "AttestationRegistry", + "src": "src/AttestationRegistry.sol:22" + }, + { + "label": "chainPrefix", + "offset": 0, + "slot": "103", + "type": "t_uint256", + "contract": "AttestationRegistry", + "src": "src/AttestationRegistry.sol:24" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_bytes_storage": { + "label": "bytes", + "numberOfBytes": "32" + }, + "t_contract(IRouter)7813": { + "label": "contract IRouter", + "numberOfBytes": "20" + }, + "t_mapping(t_bytes32,t_struct(Attestation)9314_storage)": { + "label": "mapping(bytes32 => struct Attestation)", + "numberOfBytes": "32" + }, + "t_struct(Attestation)9314_storage": { + "label": "struct Attestation", + "members": [ + { + "label": "attestationId", + "type": "t_bytes32", + "offset": 0, + "slot": "0" + }, + { + "label": "schemaId", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + }, + { + "label": "replacedBy", + "type": "t_bytes32", + "offset": 0, + "slot": "2" + }, + { + "label": "attester", + "type": "t_address", + "offset": 0, + "slot": "3" + }, + { + "label": "portal", + "type": "t_address", + "offset": 0, + "slot": "4" + }, + { + "label": "attestedDate", + "type": "t_uint64", + "offset": 20, + "slot": "4" + }, + { + "label": "expirationDate", + "type": "t_uint64", + "offset": 0, + "slot": "5" + }, + { + "label": "revocationDate", + "type": "t_uint64", + "offset": 8, + "slot": "5" + }, + { + "label": "version", + "type": "t_uint16", + "offset": 16, + "slot": "5" + }, + { + "label": "revoked", + "type": "t_bool", + "offset": 18, + "slot": "5" + }, + { + "label": "subject", + "type": "t_bytes_storage", + "offset": 0, + "slot": "6" + }, + { + "label": "attestationData", + "type": "t_bytes_storage", + "offset": 0, + "slot": "7" + } + ], + "numberOfBytes": "256" + }, + "t_uint16": { + "label": "uint16", + "numberOfBytes": "2" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + }, + "855a9f1d8e96c2bd24b6a929c90e3681a27dfdf6e80bf08bdaf0de5f33e7accf": { + "address": "0xee5e23492bf49C1F4CF0676b3bF49d78A6dD61c5", + "txHash": "0xa25bded572ec67144109228cb5ebd05304aecf55b7735f177b52c1336c6731bf", + "layout": { + "solcVersion": "0.8.21", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + }, + { + "label": "router", + "offset": 0, + "slot": "101", + "type": "t_contract(IRouter)7813", + "contract": "ModuleRegistry", + "src": "src/ModuleRegistry.sol:19" + }, + { + "label": "modules", + "offset": 0, + "slot": "102", + "type": "t_mapping(t_address,t_struct(Module)9346_storage)", + "contract": "ModuleRegistry", + "src": "src/ModuleRegistry.sol:21" + }, + { + "label": "moduleAddresses", + "offset": 0, + "slot": "103", + "type": "t_array(t_address)dyn_storage", + "contract": "ModuleRegistry", + "src": "src/ModuleRegistry.sol:23" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_address)dyn_storage": { + "label": "address[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(IRouter)7813": { + "label": "contract IRouter", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_struct(Module)9346_storage)": { + "label": "mapping(address => struct Module)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Module)9346_storage": { + "label": "struct Module", + "members": [ + { + "label": "moduleAddress", + "type": "t_address", + "offset": 0, + "slot": "0" + }, + { + "label": "name", + "type": "t_string_storage", + "offset": 0, + "slot": "1" + }, + { + "label": "description", + "type": "t_string_storage", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + }, + "4354fba979d8af67ae201159e1b7f7c6048ac523a759db0e2d448b58a54cde2a": { + "address": "0x1ceb52584B6C45C7049dc7fDC476bC138E4beaDE", + "txHash": "0xa094dfeb0673be1418c4adf3bb7ce33e959643d631655562b290c95b7f8a1844", + "layout": { + "solcVersion": "0.8.21", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + }, + { + "label": "router", + "offset": 0, + "slot": "101", + "type": "t_contract(IRouter)7813", + "contract": "PortalRegistry", + "src": "src/PortalRegistry.sol:21" + }, + { + "label": "portals", + "offset": 0, + "slot": "102", + "type": "t_mapping(t_address,t_struct(Portal)9339_storage)", + "contract": "PortalRegistry", + "src": "src/PortalRegistry.sol:23" + }, + { + "label": "issuers", + "offset": 0, + "slot": "103", + "type": "t_mapping(t_address,t_bool)", + "contract": "PortalRegistry", + "src": "src/PortalRegistry.sol:25" + }, + { + "label": "portalAddresses", + "offset": 0, + "slot": "104", + "type": "t_array(t_address)dyn_storage", + "contract": "PortalRegistry", + "src": "src/PortalRegistry.sol:27" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_address)dyn_storage": { + "label": "address[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_contract(IRouter)7813": { + "label": "contract IRouter", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(Portal)9339_storage)": { + "label": "mapping(address => struct Portal)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Portal)9339_storage": { + "label": "struct Portal", + "members": [ + { + "label": "id", + "type": "t_address", + "offset": 0, + "slot": "0" + }, + { + "label": "ownerAddress", + "type": "t_address", + "offset": 0, + "slot": "1" + }, + { + "label": "modules", + "type": "t_array(t_address)dyn_storage", + "offset": 0, + "slot": "2" + }, + { + "label": "isRevocable", + "type": "t_bool", + "offset": 0, + "slot": "3" + }, + { + "label": "name", + "type": "t_string_storage", + "offset": 0, + "slot": "4" + }, + { + "label": "description", + "type": "t_string_storage", + "offset": 0, + "slot": "5" + }, + { + "label": "ownerName", + "type": "t_string_storage", + "offset": 0, + "slot": "6" + } + ], + "numberOfBytes": "224" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + }, + "68d0630cb0ae02e0e7d37f7e07193d62999ecb9070d3ca38b245f3954a34b089": { + "address": "0xBdC45324AB9A7e82Ae15324a3d8352b513Ee2788", + "txHash": "0x0e2a0e5b600e7ead95ccdeb85ac42e83c5ba293afdd529f10280064bc6ba2ac2", + "layout": { + "solcVersion": "0.8.21", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_owner", + "offset": 0, + "slot": "51", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol:94" + }, + { + "label": "router", + "offset": 0, + "slot": "101", + "type": "t_contract(IRouter)7813", + "contract": "SchemaRegistry", + "src": "src/SchemaRegistry.sol:16" + }, + { + "label": "schemas", + "offset": 0, + "slot": "102", + "type": "t_mapping(t_bytes32,t_struct(Schema)9323_storage)", + "contract": "SchemaRegistry", + "src": "src/SchemaRegistry.sol:18" + }, + { + "label": "schemaIds", + "offset": 0, + "slot": "103", + "type": "t_array(t_bytes32)dyn_storage", + "contract": "SchemaRegistry", + "src": "src/SchemaRegistry.sol:20" + }, + { + "label": "schemasIssuers", + "offset": 0, + "slot": "104", + "type": "t_mapping(t_bytes32,t_address)", + "contract": "SchemaRegistry", + "src": "src/SchemaRegistry.sol:22" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(IRouter)7813": { + "label": "contract IRouter", + "numberOfBytes": "20" + }, + "t_mapping(t_bytes32,t_address)": { + "label": "mapping(bytes32 => address)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(Schema)9323_storage)": { + "label": "mapping(bytes32 => struct Schema)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Schema)9323_storage": { + "label": "struct Schema", + "members": [ + { + "label": "name", + "type": "t_string_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "description", + "type": "t_string_storage", + "offset": 0, + "slot": "1" + }, + { + "label": "context", + "type": "t_string_storage", + "offset": 0, + "slot": "2" + }, + { + "label": "schema", + "type": "t_string_storage", + "offset": 0, + "slot": "3" + } + ], + "numberOfBytes": "128" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + } + } +} diff --git a/.solhint.json b/contracts/.solhint.json similarity index 100% rename from .solhint.json rename to contracts/.solhint.json diff --git a/snap/LICENSE b/contracts/LICENSE similarity index 100% rename from snap/LICENSE rename to contracts/LICENSE diff --git a/contracts/README.md b/contracts/README.md index 4fdd1825..b54885c0 100644 --- a/contracts/README.md +++ b/contracts/README.md @@ -98,22 +98,6 @@ network files describing the deployed contracts. ## Utils -### Encode - -Change the data you want to encode in `contracts/script/encode.ts`, then run: - -``` -pnpm run encode -``` - -### Decode - -Change the data you want to decode in `contracts/script/decode.ts`, then run: - -``` -pnpm run decode -``` - ### Verify with arguments Change the arguments you want to use fpr the verify action in `contracts/script/arguments.ts`, then run: diff --git a/contracts/deployments/arbitrum-nova/AttestationReader.json b/contracts/deployments/arbitrum-nova/AttestationReader.json new file mode 100644 index 00000000..ea215943 --- /dev/null +++ b/contracts/deployments/arbitrum-nova/AttestationReader.json @@ -0,0 +1,215 @@ +{ + "address": "0x7A22D0Fba31a4d5b5E4F5263379B4dbf3707b48c", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "EASAddressInvalid", + "type": "error" + }, + { + "inputs": [], + "name": "RouterInvalid", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [], + "name": "easRegistry", + "outputs": [ + { + "internalType": "contract IEAS", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "uid", + "type": "bytes32" + } + ], + "name": "getAttestation", + "outputs": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "uid", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "schema", + "type": "bytes32" + }, + { + "internalType": "uint64", + "name": "time", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "expirationTime", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "revocationTime", + "type": "uint64" + }, + { + "internalType": "bytes32", + "name": "refUID", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "internalType": "address", + "name": "attester", + "type": "address" + }, + { + "internalType": "bool", + "name": "revocable", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "data", + "type": "bytes" + } + ], + "internalType": "struct Attestation", + "name": "attestation", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "router", + "outputs": [ + { + "internalType": "contract IRouter", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_easRegistryAddress", + "type": "address" + } + ], + "name": "updateEASRegistryAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_router", + "type": "address" + } + ], + "name": "updateRouter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/contracts/deployments/arbitrum-nova/AttestationRegistry.json b/contracts/deployments/arbitrum-nova/AttestationRegistry.json new file mode 100644 index 00000000..415f5d69 --- /dev/null +++ b/contracts/deployments/arbitrum-nova/AttestationRegistry.json @@ -0,0 +1,658 @@ +{ + "address": "0xB9Cf26ED827Eb4A7079e8dedB0ea93D932A2e3e8", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "AlreadyRevoked", + "type": "error" + }, + { + "inputs": [], + "name": "ArrayLengthMismatch", + "type": "error" + }, + { + "inputs": [], + "name": "AttestationDataFieldEmpty", + "type": "error" + }, + { + "inputs": [], + "name": "AttestationNotAttested", + "type": "error" + }, + { + "inputs": [], + "name": "AttestationNotRevocable", + "type": "error" + }, + { + "inputs": [], + "name": "AttestationSubjectFieldEmpty", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyAttestingPortal", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyPortal", + "type": "error" + }, + { + "inputs": [], + "name": "RouterInvalid", + "type": "error" + }, + { + "inputs": [], + "name": "SchemaNotRegistered", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "attestationId", + "type": "bytes32" + } + ], + "name": "AttestationRegistered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "attestationId", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "bytes32", + "name": "replacedBy", + "type": "bytes32" + } + ], + "name": "AttestationReplaced", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bytes32", + "name": "attestationId", + "type": "bytes32" + } + ], + "name": "AttestationRevoked", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint16", + "name": "version", + "type": "uint16" + } + ], + "name": "VersionUpdated", + "type": "event" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "schemaId", + "type": "bytes32" + }, + { + "internalType": "uint64", + "name": "expirationDate", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "subject", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "attestationData", + "type": "bytes" + } + ], + "internalType": "struct AttestationPayload", + "name": "attestationPayload", + "type": "tuple" + }, + { + "internalType": "address", + "name": "attester", + "type": "address" + } + ], + "name": "attest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "id", + "type": "uint256" + } + ], + "name": "balanceOf", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "accounts", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "ids", + "type": "uint256[]" + } + ], + "name": "balanceOfBatch", + "outputs": [ + { + "internalType": "uint256[]", + "name": "", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "schemaId", + "type": "bytes32" + }, + { + "internalType": "uint64", + "name": "expirationDate", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "subject", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "attestationData", + "type": "bytes" + } + ], + "internalType": "struct AttestationPayload[]", + "name": "attestationsPayloads", + "type": "tuple[]" + }, + { + "internalType": "address", + "name": "attester", + "type": "address" + } + ], + "name": "bulkAttest", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32[]", + "name": "attestationIds", + "type": "bytes32[]" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "schemaId", + "type": "bytes32" + }, + { + "internalType": "uint64", + "name": "expirationDate", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "subject", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "attestationData", + "type": "bytes" + } + ], + "internalType": "struct AttestationPayload[]", + "name": "attestationPayloads", + "type": "tuple[]" + }, + { + "internalType": "address", + "name": "attester", + "type": "address" + } + ], + "name": "bulkReplace", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32[]", + "name": "attestationIds", + "type": "bytes32[]" + } + ], + "name": "bulkRevoke", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "attestationId", + "type": "bytes32" + } + ], + "name": "getAttestation", + "outputs": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "attestationId", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "schemaId", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "replacedBy", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "attester", + "type": "address" + }, + { + "internalType": "address", + "name": "portal", + "type": "address" + }, + { + "internalType": "uint64", + "name": "attestedDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "expirationDate", + "type": "uint64" + }, + { + "internalType": "uint64", + "name": "revocationDate", + "type": "uint64" + }, + { + "internalType": "uint16", + "name": "version", + "type": "uint16" + }, + { + "internalType": "bool", + "name": "revoked", + "type": "bool" + }, + { + "internalType": "bytes", + "name": "subject", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "attestationData", + "type": "bytes" + } + ], + "internalType": "struct Attestation", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getAttestationIdCounter", + "outputs": [ + { + "internalType": "uint32", + "name": "", + "type": "uint32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getVersionNumber", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "incrementVersionNumber", + "outputs": [ + { + "internalType": "uint16", + "name": "", + "type": "uint16" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "attestationId", + "type": "bytes32" + } + ], + "name": "isRegistered", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "portalId", + "type": "address" + } + ], + "name": "isRevocable", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "bytes32", + "name": "schemaId", + "type": "bytes32" + }, + { + "internalType": "uint64", + "name": "expirationDate", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "subject", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "attestationData", + "type": "bytes" + } + ], + "internalType": "struct AttestationPayload[]", + "name": "attestationsPayloads", + "type": "tuple[]" + }, + { + "internalType": "address", + "name": "portal", + "type": "address" + } + ], + "name": "massImport", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "attestationId", + "type": "bytes32" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "schemaId", + "type": "bytes32" + }, + { + "internalType": "uint64", + "name": "expirationDate", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "subject", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "attestationData", + "type": "bytes" + } + ], + "internalType": "struct AttestationPayload", + "name": "attestationPayload", + "type": "tuple" + }, + { + "internalType": "address", + "name": "attester", + "type": "address" + } + ], + "name": "replace", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "attestationId", + "type": "bytes32" + } + ], + "name": "revoke", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "router", + "outputs": [ + { + "internalType": "contract IRouter", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_router", + "type": "address" + } + ], + "name": "updateRouter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/contracts/deployments/arbitrum-nova/ModuleRegistry.json b/contracts/deployments/arbitrum-nova/ModuleRegistry.json new file mode 100644 index 00000000..69cdc17e --- /dev/null +++ b/contracts/deployments/arbitrum-nova/ModuleRegistry.json @@ -0,0 +1,395 @@ +{ + "address": "0x46F7471cd2C1d69Cb5e62c1a34F3fCAf81304Fc3", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "AttestationPayloadMissing", + "type": "error" + }, + { + "inputs": [], + "name": "ModuleAddressInvalid", + "type": "error" + }, + { + "inputs": [], + "name": "ModuleAlreadyExists", + "type": "error" + }, + { + "inputs": [], + "name": "ModuleInvalid", + "type": "error" + }, + { + "inputs": [], + "name": "ModuleNameMissing", + "type": "error" + }, + { + "inputs": [], + "name": "ModuleNotRegistered", + "type": "error" + }, + { + "inputs": [], + "name": "ModuleValidationPayloadMismatch", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyIssuer", + "type": "error" + }, + { + "inputs": [], + "name": "RouterInvalid", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + }, + { + "indexed": false, + "internalType": "address", + "name": "moduleAddress", + "type": "address" + } + ], + "name": "ModuleRegistered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "modulesAddresses", + "type": "address[]" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "schemaId", + "type": "bytes32" + }, + { + "internalType": "uint64", + "name": "expirationDate", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "subject", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "attestationData", + "type": "bytes" + } + ], + "internalType": "struct AttestationPayload[]", + "name": "attestationsPayloads", + "type": "tuple[]" + }, + { + "internalType": "bytes[][]", + "name": "validationPayloads", + "type": "bytes[][]" + } + ], + "name": "bulkRunModules", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "getModulesNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "contractAddress", + "type": "address" + } + ], + "name": "isContractAddress", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "moduleAddress", + "type": "address" + } + ], + "name": "isRegistered", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "moduleAddresses", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "id", + "type": "address" + } + ], + "name": "modules", + "outputs": [ + { + "internalType": "address", + "name": "moduleAddress", + "type": "address" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + }, + { + "internalType": "address", + "name": "moduleAddress", + "type": "address" + } + ], + "name": "register", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "router", + "outputs": [ + { + "internalType": "contract IRouter", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "modulesAddresses", + "type": "address[]" + }, + { + "components": [ + { + "internalType": "bytes32", + "name": "schemaId", + "type": "bytes32" + }, + { + "internalType": "uint64", + "name": "expirationDate", + "type": "uint64" + }, + { + "internalType": "bytes", + "name": "subject", + "type": "bytes" + }, + { + "internalType": "bytes", + "name": "attestationData", + "type": "bytes" + } + ], + "internalType": "struct AttestationPayload", + "name": "attestationPayload", + "type": "tuple" + }, + { + "internalType": "bytes[]", + "name": "validationPayloads", + "type": "bytes[]" + }, + { + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "runModules", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_router", + "type": "address" + } + ], + "name": "updateRouter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/contracts/deployments/arbitrum-nova/PortalRegistry.json b/contracts/deployments/arbitrum-nova/PortalRegistry.json new file mode 100644 index 00000000..5195e035 --- /dev/null +++ b/contracts/deployments/arbitrum-nova/PortalRegistry.json @@ -0,0 +1,403 @@ +{ + "address": "0xADc8da3d3388dEe74C7134fC4AEe1cF866Da5d38", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "OnlyIssuer", + "type": "error" + }, + { + "inputs": [], + "name": "PortalAddressInvalid", + "type": "error" + }, + { + "inputs": [], + "name": "PortalAlreadyExists", + "type": "error" + }, + { + "inputs": [], + "name": "PortalDescriptionMissing", + "type": "error" + }, + { + "inputs": [], + "name": "PortalInvalid", + "type": "error" + }, + { + "inputs": [], + "name": "PortalNameMissing", + "type": "error" + }, + { + "inputs": [], + "name": "PortalNotRegistered", + "type": "error" + }, + { + "inputs": [], + "name": "PortalOwnerNameMissing", + "type": "error" + }, + { + "inputs": [], + "name": "RouterInvalid", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "issuerAddress", + "type": "address" + } + ], + "name": "IssuerAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "issuerAddress", + "type": "address" + } + ], + "name": "IssuerRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + }, + { + "indexed": false, + "internalType": "address", + "name": "portalAddress", + "type": "address" + } + ], + "name": "PortalRegistered", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "address[]", + "name": "modules", + "type": "address[]" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + }, + { + "internalType": "bool", + "name": "isRevocable", + "type": "bool" + }, + { + "internalType": "string", + "name": "ownerName", + "type": "string" + } + ], + "name": "deployDefaultPortal", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "id", + "type": "address" + } + ], + "name": "getPortalByAddress", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "id", + "type": "address" + }, + { + "internalType": "address", + "name": "ownerAddress", + "type": "address" + }, + { + "internalType": "address[]", + "name": "modules", + "type": "address[]" + }, + { + "internalType": "bool", + "name": "isRevocable", + "type": "bool" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + }, + { + "internalType": "string", + "name": "ownerName", + "type": "string" + } + ], + "internalType": "struct Portal", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getPortalsCount", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "issuer", + "type": "address" + } + ], + "name": "isIssuer", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "id", + "type": "address" + } + ], + "name": "isRegistered", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "id", + "type": "address" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + }, + { + "internalType": "bool", + "name": "isRevocable", + "type": "bool" + }, + { + "internalType": "string", + "name": "ownerName", + "type": "string" + } + ], + "name": "register", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "issuer", + "type": "address" + } + ], + "name": "removeIssuer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "router", + "outputs": [ + { + "internalType": "contract IRouter", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "issuer", + "type": "address" + } + ], + "name": "setIssuer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_router", + "type": "address" + } + ], + "name": "updateRouter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/contracts/deployments/arbitrum-nova/Router.json b/contracts/deployments/arbitrum-nova/Router.json new file mode 100644 index 00000000..e334c877 --- /dev/null +++ b/contracts/deployments/arbitrum-nova/Router.json @@ -0,0 +1,233 @@ +{ + "address": "0xC81B5149D9Cd49195D00EFb16FED89f3Ba78E03B", + "abi": [ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "registryAddress", + "type": "address" + } + ], + "name": "AttestationRegistryUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "registryAddress", + "type": "address" + } + ], + "name": "ModuleRegistryUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "registryAddress", + "type": "address" + } + ], + "name": "PortalRegistryUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "registryAddress", + "type": "address" + } + ], + "name": "SchemaRegistryUpdated", + "type": "event" + }, + { + "inputs": [], + "name": "getAttestationRegistry", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getModuleRegistry", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getPortalRegistry", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getSchemaRegistry", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_attestationRegistry", + "type": "address" + } + ], + "name": "updateAttestationRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_moduleRegistry", + "type": "address" + } + ], + "name": "updateModuleRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_portalRegistry", + "type": "address" + } + ], + "name": "updatePortalRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_schemaRegistry", + "type": "address" + } + ], + "name": "updateSchemaRegistry", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/contracts/deployments/arbitrum-nova/SchemaRegistry.json b/contracts/deployments/arbitrum-nova/SchemaRegistry.json new file mode 100644 index 00000000..2f1513c6 --- /dev/null +++ b/contracts/deployments/arbitrum-nova/SchemaRegistry.json @@ -0,0 +1,396 @@ +{ + "address": "0x9b5BABcEbf0E8550da1eCDe5674783179B6557FB", + "abi": [ + { + "inputs": [], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "IssuerInvalid", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyAssignedIssuer", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyIssuer", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyPortalRegistry", + "type": "error" + }, + { + "inputs": [], + "name": "RouterInvalid", + "type": "error" + }, + { + "inputs": [], + "name": "SchemaAlreadyExists", + "type": "error" + }, + { + "inputs": [], + "name": "SchemaNameMissing", + "type": "error" + }, + { + "inputs": [], + "name": "SchemaNotRegistered", + "type": "error" + }, + { + "inputs": [], + "name": "SchemaStringMissing", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + } + ], + "name": "SchemaContextUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "bytes32", + "name": "id", + "type": "bytes32" + }, + { + "indexed": false, + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "indexed": false, + "internalType": "string", + "name": "description", + "type": "string" + }, + { + "indexed": false, + "internalType": "string", + "name": "context", + "type": "string" + }, + { + "indexed": false, + "internalType": "string", + "name": "schemaString", + "type": "string" + } + ], + "name": "SchemaCreated", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + }, + { + "internalType": "string", + "name": "context", + "type": "string" + }, + { + "internalType": "string", + "name": "schemaString", + "type": "string" + } + ], + "name": "createSchema", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "schema", + "type": "string" + } + ], + "name": "getIdFromSchemaString", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "pure", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "schemaId", + "type": "bytes32" + } + ], + "name": "getSchema", + "outputs": [ + { + "components": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + }, + { + "internalType": "string", + "name": "context", + "type": "string" + }, + { + "internalType": "string", + "name": "schema", + "type": "string" + } + ], + "internalType": "struct Schema", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getSchemasNumber", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "schemaId", + "type": "bytes32" + } + ], + "name": "isRegistered", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "router", + "outputs": [ + { + "internalType": "contract IRouter", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "schemaIds", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "schemaId", + "type": "bytes32" + }, + { + "internalType": "string", + "name": "context", + "type": "string" + } + ], + "name": "updateContext", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "oldIssuer", + "type": "address" + }, + { + "internalType": "address", + "name": "newIssuer", + "type": "address" + } + ], + "name": "updateMatchingSchemaIssuers", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_router", + "type": "address" + } + ], + "name": "updateRouter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "schemaId", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "issuer", + "type": "address" + } + ], + "name": "updateSchemaIssuer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ] +} diff --git a/contracts/env/.env.arbitrum-nova b/contracts/env/.env.arbitrum-nova new file mode 100644 index 00000000..5e6c32fe --- /dev/null +++ b/contracts/env/.env.arbitrum-nova @@ -0,0 +1,14 @@ +# Config +INFURA_KEY= + +PRIVATE_KEY_NOVA=0000000000000000000000000000000000000000000000000000000000000001 + +ARBISCAN_NOVA_API_KEY= + +# Contracts +ROUTER_ADDRESS=0xC81B5149D9Cd49195D00EFb16FED89f3Ba78E03B +ATTESTATION_REGISTRY_ADDRESS=0xB9Cf26ED827Eb4A7079e8dedB0ea93D932A2e3e8 +MODULE_REGISTRY_ADDRESS=0x46F7471cd2C1d69Cb5e62c1a34F3fCAf81304Fc3 +PORTAL_REGISTRY_ADDRESS=0xADc8da3d3388dEe74C7134fC4AEe1cF866Da5d38 +SCHEMA_REGISTRY_ADDRESS=0x9b5BABcEbf0E8550da1eCDe5674783179B6557FB +ATTESTATION_READER_ADDRESS=0x7A22D0Fba31a4d5b5E4F5263379B4dbf3707b48c \ No newline at end of file diff --git a/contracts/env/.env.arbitrum-sepolia b/contracts/env/.env.arbitrum-sepolia new file mode 100644 index 00000000..1a3c63de --- /dev/null +++ b/contracts/env/.env.arbitrum-sepolia @@ -0,0 +1,14 @@ +# Config +INFURA_KEY= + +PRIVATE_KEY_ARBITRUM_TESTNET=0000000000000000000000000000000000000000000000000000000000000001 + +ARBISCAN_API_KEY= + +# Contracts +ROUTER_ADDRESS=0x374B686137eC0DB442a8d833451f8C12cD4B5De4 +ATTESTATION_REGISTRY_ADDRESS=0xee5e23492bf49C1F4CF0676b3bF49d78A6dD61c5 +MODULE_REGISTRY_ADDRESS=0xEC572277d4E87a64DcfA774ED219Dd4E69E4BDc6 +PORTAL_REGISTRY_ADDRESS=0x1ceb52584B6C45C7049dc7fDC476bC138E4beaDE +SCHEMA_REGISTRY_ADDRESS=0x025531b655D9EE335B8E6cc4C118b313f26ACc8F +ATTESTATION_READER_ADDRESS=0xBdC45324AB9A7e82Ae15324a3d8352b513Ee2788 diff --git a/contracts/env/.env.base b/contracts/env/.env.base new file mode 100644 index 00000000..073d0339 --- /dev/null +++ b/contracts/env/.env.base @@ -0,0 +1,16 @@ +# Config +INFURA_KEY= + +PRIVATE_KEY_LINEA_TESTNET=0000000000000000000000000000000000000000000000000000000000000001 + +LINEASCAN_API_KEY= + +# Contracts +ROUTER_ADDRESS=0x63b2d528805Fc9373586366705852FA89debd4d0 +PORTAL_REGISTRY_ADDRESS=0xcbf28432C25B400E645F0EaC05F8954e8EE7c0d6 +SCHEMA_REGISTRY_ADDRESS=0x8081dCd745f160c148Eb5be510F78628A0951c31 +MODULE_REGISTRY_ADDRESS=0xAd0C12db58098A6665CBEf48f60eB67d81d1F1ff +ATTESTATION_REGISTRY_ADDRESS=0xA0080DBd35711faD39258E45d9A5D798852b05D4 +ATTESTATION_READER_ADDRESS= +EAS_REGISTRY_ADDRESS= + diff --git a/contracts/env/.env.base-sepolia b/contracts/env/.env.base-sepolia new file mode 100644 index 00000000..70457123 --- /dev/null +++ b/contracts/env/.env.base-sepolia @@ -0,0 +1,16 @@ +# Config +INFURA_KEY= + +PRIVATE_KEY_LINEA_TESTNET=0000000000000000000000000000000000000000000000000000000000000001 + +LINEASCAN_API_KEY= + +# Contracts +ROUTER_ADDRESS=0xE235826514945186227918325D3E5b5f873861A6 +PORTAL_REGISTRY_ADDRESS=0x025531b655D9EE335B8E6cc4C118b313f26ACc8F +SCHEMA_REGISTRY_ADDRESS=0x66D2F3DCc970343b83a6263E20832184fa71CFe7 +MODULE_REGISTRY_ADDRESS=0xEC572277d4E87a64DcfA774ED219Dd4E69E4BDc6 +ATTESTATION_REGISTRY_ADDRESS=0x374B686137eC0DB442a8d833451f8C12cD4B5De4 +ATTESTATION_READER_ADDRESS= +EAS_REGISTRY_ADDRESS= + diff --git a/contracts/env/.env.linea-sepolia b/contracts/env/.env.linea-sepolia new file mode 100644 index 00000000..873a632e --- /dev/null +++ b/contracts/env/.env.linea-sepolia @@ -0,0 +1,16 @@ +# Config +INFURA_KEY= + +PRIVATE_KEY_LINEA_TESTNET=0000000000000000000000000000000000000000000000000000000000000001 + +LINEASCAN_API_KEY= + +# Contracts +ROUTER_ADDRESS=0xAfA952790492DDeB474012cEA12ba34B788ab39F +PORTAL_REGISTRY_ADDRESS=0xF35fe79104e157703dbCC3Baa72a81A99591744D +SCHEMA_REGISTRY_ADDRESS=0x90b8542d7288a83EC887229A7C727989C3b56209 +MODULE_REGISTRY_ADDRESS=0x3C443B9f0c8ed3A3270De7A4815487BA3223C2Fa +ATTESTATION_REGISTRY_ADDRESS=0xDaf3C3632327343f7df0Baad2dc9144fa4e1001F +ATTESTATION_READER_ADDRESS= +EAS_REGISTRY_ADDRESS= + diff --git a/contracts/foundry.toml b/contracts/foundry.toml index e42ad57f..13ef067f 100644 --- a/contracts/foundry.toml +++ b/contracts/foundry.toml @@ -1,10 +1,7 @@ [profile.default] -src = "src" -out = "out" -libs = ["lib"] - -[rpc_endpoints] -linea_goerli = "${LINEA_GOERLI_RPC_URL}" - -[etherscan] -linea_goerli = { key = "${ETHERSCAN_API_KEY}" } +src = 'src' +out = 'out' +libs = ['node_modules', 'lib'] +test = 'test' +cache_path = 'cache_forge' +allow_paths = ["../node_modules"] diff --git a/contracts/hardhat.config.ts b/contracts/hardhat.config.ts index eab3660c..eb751d49 100644 --- a/contracts/hardhat.config.ts +++ b/contracts/hardhat.config.ts @@ -20,20 +20,36 @@ const config: HardhatUserConfig = { defaultNetwork: "linea-goerli", networks: { hardhat: {}, - "arbitrum-goerli": { - url: "https://goerli-rollup.arbitrum.io/rpc", + "arbitrum-sepolia": { + url: `https://arbitrum-sepolia.infura.io/v3/${process.env.INFURA_KEY ?? ""}`, accounts: - process.env.PRIVATE_KEY_ARBITRUM_TESTNET !== undefined ? [process.env.PRIVATE_KEY_ARBITRUM_TESTNET] : [], + process.env.PRIVATE_KEY_ARBITRUM_SEPOLIA !== undefined ? [process.env.PRIVATE_KEY_ARBITRUM_SEPOLIA] : [], }, arbitrum: { url: "https://arb1.arbitrum.io/rpc", accounts: process.env.PRIVATE_KEY_ARBITRUM_MAINNET !== undefined ? [process.env.PRIVATE_KEY_ARBITRUM_MAINNET] : [], }, + "arbitrum-nova": { + url: "https://arbitrum-nova.publicnode.com", + accounts: process.env.PRIVATE_KEY_NOVA !== undefined ? [process.env.PRIVATE_KEY_NOVA] : [], + }, + "base-sepolia": { + url: `https://sepolia.base.org`, + accounts: process.env.PRIVATE_KEY_LINEA_TESTNET !== undefined ? [process.env.PRIVATE_KEY_LINEA_TESTNET] : [], + }, + base: { + url: `https://mainnet.base.org`, + accounts: process.env.PRIVATE_KEY_LINEA_MAINNET !== undefined ? [process.env.PRIVATE_KEY_LINEA_MAINNET] : [], + }, "linea-goerli": { url: `https://linea-goerli.infura.io/v3/${process.env.INFURA_KEY ?? ""}`, accounts: process.env.PRIVATE_KEY_LINEA_TESTNET !== undefined ? [process.env.PRIVATE_KEY_LINEA_TESTNET] : [], }, + "linea-sepolia": { + url: `https://linea-sepolia.infura.io/v3/${process.env.INFURA_KEY ?? ""}`, + accounts: process.env.PRIVATE_KEY_LINEA_SEPOLIA !== undefined ? [process.env.PRIVATE_KEY_LINEA_SEPOLIA] : [], + }, linea: { url: `https://linea-mainnet.infura.io/v3/${process.env.INFURA_KEY ?? ""}`, accounts: process.env.PRIVATE_KEY_LINEA_MAINNET !== undefined ? [process.env.PRIVATE_KEY_LINEA_MAINNET] : [], @@ -49,8 +65,13 @@ const config: HardhatUserConfig = { etherscan: { apiKey: { "arbitrum-goerli": process.env.ARBISCAN_API_KEY ?? "", + "arbitrum-sepolia": process.env.ARBISCAN_API_KEY ?? "", arbitrum: process.env.ARBISCAN_API_KEY ?? "", + "arbitrum-nova": process.env.ARBISCAN_NOVA_API_KEY ?? "", + "base-sepolia": process.env.BASESCAN_API_KEY ?? "", + base: process.env.BASESCAN_API_KEY ?? "", "linea-goerli": process.env.LINEASCAN_API_KEY ?? "", + "linea-sepolia": process.env.LINEASCAN_API_KEY ?? "", linea: process.env.LINEASCAN_API_KEY ?? "", "scroll-sepolia": process.env.SCROLL_API_KEY ?? "", }, @@ -63,6 +84,14 @@ const config: HardhatUserConfig = { browserURL: "https://goerli.arbiscan.io", }, }, + { + network: "arbitrum-sepolia", + chainId: 421614, + urls: { + apiURL: "https://api-sepolia.arbiscan.io/api", + browserURL: "https://sepolia.arbiscan.io", + }, + }, { network: "arbitrum", chainId: 42161, @@ -71,6 +100,30 @@ const config: HardhatUserConfig = { browserURL: "https://arbiscan.io", }, }, + { + network: "arbitrum-nova", + chainId: 42170, + urls: { + apiURL: "https://api-nova.arbiscan.io/api", + browserURL: "https://nova.arbiscan.io/", + }, + }, + { + network: "base-sepolia", + chainId: 84532, + urls: { + apiURL: "https://api-sepolia.basescan.org/api", + browserURL: "https://sepolia.basescan.org/", + }, + }, + { + network: "base", + chainId: 8453, + urls: { + apiURL: "https://api.basescan.org/api", + browserURL: "https://basescan.org", + }, + }, { network: "linea-goerli", chainId: 59140, @@ -79,6 +132,14 @@ const config: HardhatUserConfig = { browserURL: "https://goerli.lineascan.build", }, }, + { + network: "linea-sepolia", + chainId: 59141, + urls: { + apiURL: "https://api-sepolia.lineascan.build/api", + browserURL: "https://sepolia.lineascan.build", + }, + }, { network: "linea", chainId: 59144, diff --git a/contracts/lib/forge-std b/contracts/lib/forge-std index f73c73d2..bb4ceea9 160000 --- a/contracts/lib/forge-std +++ b/contracts/lib/forge-std @@ -1 +1 @@ -Subproject commit f73c73d2018eb6a111f35e4dae7b4f27401e9421 +Subproject commit bb4ceea94d6f10eeb5b41dc2391c6c8bf8e734ef diff --git a/contracts/lib/openzeppelin-contracts b/contracts/lib/openzeppelin-contracts deleted file mode 160000 index 9329cfac..00000000 --- a/contracts/lib/openzeppelin-contracts +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9329cfacd4c7d20bcb43d772d947ff9e39b65df9 diff --git a/contracts/lib/openzeppelin-contracts-upgradeable b/contracts/lib/openzeppelin-contracts-upgradeable deleted file mode 160000 index 5bc59992..00000000 --- a/contracts/lib/openzeppelin-contracts-upgradeable +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 5bc59992591b84bba18dc1ac46942f1886b30ccd diff --git a/contracts/package.json b/contracts/package.json index 33529d5d..2b34ed94 100644 --- a/contracts/package.json +++ b/contracts/package.json @@ -1,13 +1,14 @@ { - "name": "linea-attestation-registry-contracts", - "version": "0.0.1", + "name": "@verax-attestation-registry/verax-contracts", + "version": "0.0.4", "description": "Verax Attestation Registry core smart contracts", "keywords": [ - "linea-attestation-registry", + "verax", "blockchain", "attestation", "ethereum", "foundry", + "hardhat", "smart-contracts", "solidity" ], @@ -15,40 +16,45 @@ "license": "MIT", "author": "Consensys", "files": [ - "src" + "contracts/**/*.sol", + "build/*.json", + "!contracts/examples/**/*" ], "scripts": { "build": "forge build", "check:implementations": "npx hardhat run script/upgrade/checkImplementations.ts", "check:upgradeability": "npx hardhat run script/upgrade/checkUpgradeability.ts --network", - "clean": "rm -rf lcov.info coverage artifacts cache_hardhat cache out typechain-types", - "decode": "npx hardhat run script/decode.ts", + "clean": "rm -rf lcov.info coverage artifacts cache_forge cache_hardhat cache out typechain-types build contracts", "deploy": "npx hardhat run script/deploy/deployEverything.ts --network", "deploy:issuers": "npx hardhat run script/deploy/deployIssuers.ts --network", "deploy:post": "npx hardhat run script/deploy/postDeployment.ts --network", "deploy:stdlib": "npx hardhat run script/deploy/deployStdLib.ts --network", - "encode": "npx hardhat run script/encode.ts", - "lint": "pnpm solhint \"{script,src,test}/**/*.sol\"", - "massImport:prepare": "npx hardhat run script/massImport/prepareData.ts", - "massImport:attest": "npx hardhat run script/massImport/massImport.ts --network", + "lint": "pnpm solhint \"{script,src,test}/**/*.sol\" -c .solhint.json", + "postpack": "./postpack.sh", + "prepack": "./prepack.sh", + "prepublishOnly": "pnpm run clean && pnpm run lint && pnpm run build && pnpm run test", + "publish:dry-run": "pnpm publish --dry-run --no-git-checks", + "publish:public": "pnpm publish --access public --no-git-checks", "reimport": "npx hardhat run script/recreateNetworkFile.ts --network", "test": "forge test", + "test:coverage": "forge coverage --report lcov && genhtml lcov.info -o coverage/html", "upgrade": "npx hardhat run script/upgrade/upgradeEverything.ts --network", "upgrade:force": "npx hardhat run script/upgrade/forceUpgradeEverything.ts --network" }, + "dependencies": { + "@openzeppelin/contracts": "4.9.6", + "@openzeppelin/contracts-upgradeable": "4.9.6" + }, "devDependencies": { - "@nomicfoundation/hardhat-ethers": "^3.0.4", + "@nomicfoundation/hardhat-ethers": "^3.0.5", "@nomicfoundation/hardhat-foundry": "^1.1.1", - "@nomicfoundation/hardhat-toolbox": "^3.0.0", - "@openzeppelin/hardhat-upgrades": "^2.3.3", - "dotenv": "^16.3.1", - "ethers": "^6.8.1", - "hardhat": "^2.19.0", - "solhint": "^3.6.2", - "solhint-plugin-prettier": "^0.0.5" - }, - "dependencies": { - "@consensys/linea-sdk": "^0.1.6", - "@types/node": "^20.9.0" + "@nomicfoundation/hardhat-toolbox": "^5.0.0", + "@openzeppelin/hardhat-upgrades": "^3.0.5", + "@types/node": "^18.16.0", + "dotenv": "^16.4.5", + "ethers": "^6.12.0", + "hardhat": "^2.22.3", + "solhint": "^4.5.4", + "solhint-plugin-prettier": "^0.1.0" } } diff --git a/contracts/postpack.sh b/contracts/postpack.sh new file mode 100755 index 00000000..e7390759 --- /dev/null +++ b/contracts/postpack.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# Check if 'contracts' directory exists and remove it +if [ -d "contracts" ]; then + rm -rf contracts + echo "contracts directory removed" +else + echo "contracts directory does not exist" +fi + +# Check if 'build' directory exists and remove it +if [ -d "build" ]; then + rm -rf build + echo "build directory removed" +else + echo "build directory does not exist" +fi diff --git a/contracts/prepack.sh b/contracts/prepack.sh new file mode 100755 index 00000000..78c3620d --- /dev/null +++ b/contracts/prepack.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# Create 'contracts' directory if it doesn't exist +mkdir -p contracts + +# Copy the contents of 'src' into 'contracts' +cp -R src/* contracts/ + +# Create 'build' directory if it doesn't exist +mkdir -p build + +# copy all JSON files from 'out' (including subdirectories) into 'build' +find out -name '*.json' -exec cp {} build \; diff --git a/contracts/script/decode.ts b/contracts/script/decode.ts deleted file mode 100644 index 84ae4ebd..00000000 --- a/contracts/script/decode.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { AbiCoder } from "ethers"; - -/* - * This script aims to rec recreate a lost "network file". - * Forces the import of an existing proxy contract deployment to be used with this plugin. - * OpenZeppelin doc: https://docs.openzeppelin.com/upgrades-plugins/1.x/api-hardhat-upgrades#force-import - * OpenZeppelin doc on network files: https://docs.openzeppelin.com/upgrades-plugins/1.x/network-files - */ -async function main() { - console.log("Decoding..."); - - const abiCoder = new AbiCoder(); - const decoded = abiCoder.decode(["address"], "0x000000000000000000000000809e815596abeb3764abf81be2dc39fbbacc9949"); - - console.log(`Decoded to ${decoded}`); -} - -// We recommend this pattern to be able to use async/await everywhere -// and properly handle errors. -main().catch((error) => { - console.error(error); - process.exitCode = 1; -}); diff --git a/contracts/script/deploy/deployEverything.ts b/contracts/script/deploy/deployEverything.ts index 219396ae..ddbd346d 100644 --- a/contracts/script/deploy/deployEverything.ts +++ b/contracts/script/deploy/deployEverything.ts @@ -16,6 +16,8 @@ async function main() { const routerProxyAddress = await router.getAddress(); const routerImplementationAddress = await upgrades.erc1967.getImplementationAddress(routerProxyAddress); + await new Promise((resolve) => setTimeout(resolve, 5000)); // Wait for 5 seconds + await run("verify:verify", { address: routerProxyAddress, }); @@ -35,6 +37,8 @@ async function main() { attestationRegistryProxyAddress, ); + await new Promise((resolve) => setTimeout(resolve, 5000)); // Wait for 5 seconds + await run("verify:verify", { address: attestationRegistryProxyAddress, }); @@ -54,6 +58,8 @@ async function main() { moduleRegistryProxyAddress, ); + await new Promise((resolve) => setTimeout(resolve, 5000)); // Wait for 5 seconds + await run("verify:verify", { address: moduleRegistryProxyAddress, }); @@ -73,6 +79,8 @@ async function main() { portalRegistryProxyAddress, ); + await new Promise((resolve) => setTimeout(resolve, 5000)); // Wait for 5 seconds + await run("verify:verify", { address: portalRegistryProxyAddress, }); @@ -92,6 +100,8 @@ async function main() { schemaRegistryProxyAddress, ); + await new Promise((resolve) => setTimeout(resolve, 5000)); // Wait for 5 seconds + await run("verify:verify", { address: schemaRegistryProxyAddress, }); @@ -111,6 +121,8 @@ async function main() { attestationReaderProxyAddress, ); + await new Promise((resolve) => setTimeout(resolve, 5000)); // Wait for 5 seconds + await run("verify:verify", { address: attestationReaderProxyAddress, }); diff --git a/contracts/script/encode.ts b/contracts/script/encode.ts deleted file mode 100644 index 85cdb63b..00000000 --- a/contracts/script/encode.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { AbiCoder } from "ethers"; - -/* - * This script aims to rec recreate a lost "network file". - * Forces the import of an existing proxy contract deployment to be used with this plugin. - * OpenZeppelin doc: https://docs.openzeppelin.com/upgrades-plugins/1.x/api-hardhat-upgrades#force-import - * OpenZeppelin doc on network files: https://docs.openzeppelin.com/upgrades-plugins/1.x/network-files - */ -async function main() { - console.log("Encoding..."); - - const abiCoder = new AbiCoder(); - const encoded = abiCoder.encode(["address"], ["0x809e815596AbEB3764aBf81BE2DC39fBBAcc9949"]); - - console.log(`Encoded to ${encoded}`); -} - -// We recommend this pattern to be able to use async/await everywhere -// and properly handle errors. -main().catch((error) => { - console.error(error); - process.exitCode = 1; -}); diff --git a/contracts/script/massImport/massImport.ts b/contracts/script/massImport/massImport.ts deleted file mode 100644 index 81d73a3c..00000000 --- a/contracts/script/massImport/massImport.ts +++ /dev/null @@ -1,396 +0,0 @@ -import fs from "fs"; -import { config } from "dotenv"; -import path from "path"; -import { AbiCoder, isAddress, parseUnits } from "ethers"; -import { ethers } from "hardhat"; -import { AttestationRegistry } from "../../typechain-types"; -import { HardhatEthersProvider } from "@nomicfoundation/hardhat-ethers/internal/hardhat-ethers-provider"; - -config(); - -const processedBatchIds: number[] = []; - -// ********************************************************************************* -// ********************************* CONFIGURATION ********************************* -// ********************************************************************************* - -const DEFAULT_MAX_FEE_PER_GAS = parseUnits("100", "gwei").toString(); -const DEFAULT_GAS_ESTIMATION_PERCENTILE = "10"; -const DEFAULT_GAS_PRICE_CAP = parseUnits("5", "gwei").toString(); - -type Config = { - inputFile: string; - trackingFile: string; - portalAddress: `0x${string}`; - maxFeePerGas: number; - gasEstimationPercentile: number; - gasPriceCap: number; - attestationRegistry: AttestationRegistry; -}; - -type AttestationPayload = { - schemaId: string; - expirationDate: number; - subject: string; - attestationData: string; -}; - -type Batch = { - id: number; - payloads: AttestationPayload[]; -}; - -type BatchMonitor = { - id: number; - payloads: AttestationPayload[]; - transactionHash?: string; -}; - -enum BatchStatuses { - Failed = "Failed", - Success = "Success", - Pending = "Pending", -} - -type TrackingData = { - payloads: AttestationPayload[]; - status: BatchStatuses; - transactionHash?: string; - error?: unknown; -}; - -type Fees = { - maxFeePerGas: bigint; - maxPriorityFeePerGas?: bigint; -}; - -type FeeHistory = { - oldestBlock: number; - reward: string[][]; - baseFeePerGas: string[]; - gasUsedRatio: number[]; -}; - -function requireEnv(name: string): string { - const envVariable = process.env[name]; - if (!envVariable) { - throw new Error(`Missing ${name} environment variable.`); - } - return envVariable; -} - -async function getConfig(): Promise { - const inputFile = requireEnv("INPUT_FILE"); - const trackingFile = requireEnv("TRACKING_FILE"); - const portalAddress = requireEnv("PORTAL_ADDRESS"); - const attestationRegistryAddress = requireEnv("ATTESTATION_REGISTRY_ADDRESS"); - - if (!isAddress(portalAddress)) { - throw new Error(`Portal address is not a valid Ethereum address.`); - } - - if (!isAddress(attestationRegistryAddress)) { - throw new Error(`Attestation Registry address is not a valid Ethereum address.`); - } - - if (path.extname(inputFile) !== ".json") { - throw new Error(`File ${inputFile} is not a JSON file.`); - } - - if (path.extname(trackingFile) !== ".json") { - throw new Error(`File ${trackingFile} is not a JSON file.`); - } - - if (!fs.existsSync(inputFile)) { - throw new Error(`File ${inputFile} does not exist.`); - } - - const attestationRegistry: AttestationRegistry = await ethers.getContractAt( - "AttestationRegistry", - attestationRegistryAddress, - ); - - return { - inputFile, - trackingFile, - portalAddress: portalAddress as `0x${string}`, - maxFeePerGas: parseInt(process.env.MAX_FEE_PER_GAS ?? DEFAULT_MAX_FEE_PER_GAS), - gasEstimationPercentile: parseInt(process.env.GAS_ESTIMATION_PERCENTILE ?? DEFAULT_GAS_ESTIMATION_PERCENTILE), - gasPriceCap: parseFloat(process.env.GAS_PRICE_CAP ?? DEFAULT_GAS_PRICE_CAP), - attestationRegistry, - }; -} - -// ********************************************************************************* -// ********************************* UTILS FUNCTIONS ******************************* -// ********************************************************************************* - -export const wait = (timeout: number) => new Promise((resolve) => setTimeout(resolve, timeout)); - -function createTrackingFile(path: string): Map { - if (fs.existsSync(path)) { - const mapAsArray = fs.readFileSync(path, "utf-8"); - return new Map(JSON.parse(mapAsArray)); - } - - fs.writeFileSync(path, JSON.stringify(Array.from(new Map().entries()))); - return new Map(); -} - -function updateTrackingFile(trackingData: Map, path: string) { - fs.writeFileSync(path, JSON.stringify(Array.from(trackingData.entries()), null, 2)); -} - -async function processPendingBatches( - provider: HardhatEthersProvider, - batches: Batch[], - trackingData: Map, - trackingFile: string, -): Promise<(Batch & { transactionHash?: string })[]> { - const pendingBatches = batches - .filter((batch) => trackingData.get(batch.id)?.status === BatchStatuses.Pending) - .map((batch) => ({ - ...batch, - transactionHash: trackingData.get(batch.id)?.transactionHash, - })); - - const remainingPendingBatches: BatchMonitor[] = []; - - for (const { transactionHash, id, payloads } of pendingBatches) { - if (!transactionHash) { - remainingPendingBatches.push({ - id, - payloads, - transactionHash: "", - }); - continue; - } - - const receipt = await provider.getTransactionReceipt(transactionHash); - - if (!receipt) { - remainingPendingBatches.push({ id, payloads, transactionHash }); - continue; - } - - if (receipt.status == 0) { - // track failing batches - trackingData.set(id, { - payloads, - transactionHash, - status: BatchStatuses.Failed, - }); - - console.log(`Transaction reverted. Hash: ${transactionHash}, batchId: ${id}`); - updateTrackingFile(trackingData, trackingFile); - - // continue the batch loop - continue; - } - // track successful batches - trackingData.set(id, { - payloads, - transactionHash, - status: BatchStatuses.Success, - }); - - updateTrackingFile(trackingData, trackingFile); - console.log(`Transaction successful. Hash: ${transactionHash}, batchId: ${id}`); - } - - return remainingPendingBatches; -} - -async function get1559Fees( - provider: HardhatEthersProvider, - maxFeePerGasFromConfig: bigint, - percentile: number, -): Promise { - const { reward, baseFeePerGas }: FeeHistory = await provider.send("eth_feeHistory", ["0x4", "latest", [percentile]]); - - const maxPriorityFeePerGas = - reward.reduce((acc: bigint, currentValue: string[]) => acc + BigInt(currentValue[0]), 0n) / BigInt(reward.length); - - if (maxPriorityFeePerGas && maxPriorityFeePerGas > maxFeePerGasFromConfig) { - throw new Error( - `Estimated miner tip of ${maxPriorityFeePerGas} exceeds configured max fee per gas of ${maxFeePerGasFromConfig}.`, - ); - } - - const maxFeePerGas = BigInt(baseFeePerGas[baseFeePerGas.length - 1]) * 2n + maxPriorityFeePerGas; - - if (maxFeePerGas > 0n && maxPriorityFeePerGas > 0n) { - return { - maxPriorityFeePerGas, - maxFeePerGas: maxFeePerGas > maxFeePerGasFromConfig ? maxFeePerGasFromConfig : maxFeePerGas, - }; - } - - return { - maxFeePerGas: maxFeePerGasFromConfig, - }; -} - -// ********************************************************************************* -// ********************************* MAIN FUNCTION ********************************* -// ********************************************************************************* - -async function main() { - const { - inputFile, - trackingFile, - portalAddress, - maxFeePerGas, - gasEstimationPercentile, - gasPriceCap, - attestationRegistry, - } = await getConfig(); - - const provider = ethers.provider; - const { chainId } = await provider.getNetwork(); - const eip1559GasProvider = async () => get1559Fees(provider, BigInt(maxFeePerGas), gasEstimationPercentile); - - const trackingData = createTrackingFile(trackingFile); - - const readFile = fs.readFileSync(inputFile, "utf-8"); - const batches: Batch[] = JSON.parse(readFile); - - const filteredBatches = batches.filter( - (batch) => trackingData.get(batch.id)?.status === BatchStatuses.Failed || !trackingData.has(batch.id), - ); - - console.log("Processing pending batches..."); - const remainingPendingBatches = await processPendingBatches(provider, batches, trackingData, trackingFile); - - if (remainingPendingBatches.length !== 0) { - console.warn(`The following batches are still pending: ${JSON.stringify(remainingPendingBatches, null, 2)}`); - return; - } - - const accounts = await ethers.getSigners(); - const signer = accounts[0]; - let nonce = await provider.getTransactionCount(signer.address); - - const pendingTransactions = []; - - console.log(`Total number of batches to process: ${filteredBatches.length}.`); - - for (const [index, batch] of filteredBatches.entries()) { - try { - let fees = await eip1559GasProvider(); - - while (fees.maxFeePerGas > gasPriceCap) { - console.warn(`Max fee per gas (${fees.maxFeePerGas.toString()}) exceeds gas price cap (${gasPriceCap})`); - - const currentBlockNumber = await provider.getBlockNumber(); - while ((await provider.getBlockNumber()) === currentBlockNumber) { - console.warn(`Waiting for next block: ${currentBlockNumber}`); - await wait(4_000); - } - - fees = await eip1559GasProvider(); - } - - const abiCoder = new AbiCoder(); - batch.payloads.forEach((payload) => { - payload.schemaId = "0xd1664d97bd195df77e3d5fe78c1737ab3adaa38bbe52a680d1aa30fa51f186ba"; - payload.subject = abiCoder.encode(["address"], [payload.subject]); - payload.attestationData = abiCoder.encode(["uint8"], [payload.attestationData]); - payload.expirationDate = 1793835110; - // TODO: add an expirationDate? - }); - - const transactionGasLimit = await attestationRegistry.massImport.estimateGas(batch.payloads, portalAddress); - - const txResponse = await attestationRegistry.massImport(batch.payloads, portalAddress, { - type: 2, - gasLimit: transactionGasLimit, - chainId, - maxFeePerGas: fees.maxFeePerGas, - maxPriorityFeePerGas: fees.maxPriorityFeePerGas, - nonce, - }); - - pendingTransactions.push({ txResponse, batch }); - - trackingData.set(batch.id, { - payloads: batch.payloads, - status: BatchStatuses.Pending, - transactionHash: txResponse.hash, - }); - - updateTrackingFile(trackingData, trackingFile); - - processedBatchIds.push(batch.id); - - console.log(`Batch with ID = ${batch.id} sent.`); - nonce = nonce + 1; - } catch (error) { - trackingData.set(batch.id, { - payloads: batch.payloads, - status: BatchStatuses.Failed, - error, - }); - updateTrackingFile(trackingData, trackingFile); - console.error(error); - console.error(`Batch with ID=${batch.id} failed.\n Stopping script execution.`); - return; - } - - if (index + (1 % 15) === 0) { - console.log(`Pause the execution for 60 seconds...`); - await wait(60_000); - } - } - - if (pendingTransactions.length !== 0) { - console.log(`Waiting for all receipts...`); - } - - const transactionsInfos = await Promise.all( - pendingTransactions.map(async ({ txResponse, batch }) => { - return { - transactionReceipt: await txResponse.wait(), - batch, - }; - }), - ); - - for (const { batch, transactionReceipt } of transactionsInfos) { - if (transactionReceipt) { - if (transactionReceipt.status == 0) { - trackingData.set(batch.id, { - payloads: batch.payloads, - status: BatchStatuses.Failed, - transactionHash: transactionReceipt.hash, - }); - - console.log(`Transaction reverted. Hash: ${transactionReceipt.hash}, batchId: ${batch.id}`); - updateTrackingFile(trackingData, trackingFile); - continue; - } - - trackingData.set(batch.id, { - payloads: batch.payloads, - status: BatchStatuses.Success, - transactionHash: transactionReceipt.hash, - }); - - updateTrackingFile(trackingData, trackingFile); - console.log(`Transaction successful. Hash: ${transactionReceipt.hash}, batchId: ${batch.id}`); - } - } -} - -main() - .then(() => process.exit(0)) - .catch((error) => { - console.error(error); - process.exit(1); - }); - -process.on("SIGINT", () => { - console.log(`Processed batches: ${JSON.stringify(processedBatchIds, null, 2)}`); - console.log("\nGracefully shutting down from SIGINT (Ctrl-C)"); - process.exit(1); -}); diff --git a/contracts/script/massImport/prepareData.ts b/contracts/script/massImport/prepareData.ts deleted file mode 100644 index 9b6d2997..00000000 --- a/contracts/script/massImport/prepareData.ts +++ /dev/null @@ -1,90 +0,0 @@ -import fs from "fs"; - -const BATCH_LENGTH = 100; - -type RawPayload = { - subject: string; - attestationData: string; -}; - -type Batch = { - id: number; - payloads: RawPayload[]; -}; - -const convertScoreToAttestation = (score: string): string => { - const scoreNumber = parseInt(score); - let result = 5; - - if (scoreNumber > 2500 && scoreNumber < 2740) { - result = 4; - } else if (scoreNumber >= 2740 && scoreNumber < 3050) { - result = 3; - } else if (scoreNumber >= 3050 && scoreNumber < 3400) { - result = 2; - } else if (scoreNumber >= 3400) { - result = 5; - } - - return result.toString(); -}; - -const csvToJSON = (csv: string) => { - const lines = csv.split("\n"); - const result: RawPayload[] = []; - - // Ignore line 0 (headers) - for (let i = 1; i < lines.length; i++) { - const currentLine = lines[i].split(","); - const address = currentLine[0]; - const rawScore = currentLine[1]; - - if (address !== "" && rawScore !== "") { - const attestationData = convertScoreToAttestation(rawScore); - result.push({ subject: currentLine[0], attestationData }); - } - } - - return result; -}; - -const createBatches = (rawPayloads: RawPayload[]) => { - return Array.from({ length: Math.ceil(rawPayloads.length / BATCH_LENGTH) }, (v, i) => - rawPayloads.slice(i * BATCH_LENGTH, i * BATCH_LENGTH + BATCH_LENGTH), - ).reverse(); -}; - -const generateBatchIds = (batches: RawPayload[][]): Batch[] => { - return batches.map((batch, index) => { - return { id: index, payloads: batch }; - }); -}; - -const generateSourceFile = (batches: Batch[]) => { - fs.writeFileSync("script/massImport/source.json", JSON.stringify(batches, null, 2)); -}; - -async function main() { - console.log("Source file generating..."); - const readFile = fs.readFileSync("script/massImport/rawData.csv", "utf-8"); - const parsedData: RawPayload[] = csvToJSON(readFile); - - console.log(`Raw input contains ${parsedData.length} lines`); - - const batches: RawPayload[][] = createBatches(parsedData); - - console.log(`We have ${batches.length} batches of ${BATCH_LENGTH} items`); - - const finalBatches = generateBatchIds(batches); - - generateSourceFile(finalBatches); - - console.log("Source file generated!"); -} - -main() - .then(() => process.exit(0)) - .catch((error) => { - console.error(error); - process.exit(1); - }); diff --git a/contracts/script/massImport/rawData.csv b/contracts/script/massImport/rawData.csv deleted file mode 100644 index 7d786bdc..00000000 --- a/contracts/script/massImport/rawData.csv +++ /dev/null @@ -1,17 +0,0 @@ -address,score -0x00d3081e9Ea91bCE2Cca7f47441BD185D0c2ACb1,200 -0x0c9850593Bd7669482306Fa4842746B980b7178d,2625 -0x0fAc332044f88BA323668a25C9784F067ad4c8A5,2646 -0x0e33A836cBF2eddB71C7947103757018a2Eef173,3600 -0x07b09E76d65dFA50f8783c591081530780aa415c,3050 -0x0DCC943109388789e15c383A96326dDc76e62d26,2740 -0x073fb47D6d2feba8fa22524108408F4737520E96,3400 -0x09E693650FC485EB3eEdC858eae7C07388c3c930,2740 -0x06f6B9568b51bA25CAa536473d1Aa367602a8A1b,2741 -0x08DB6Ed9B20E68F9d8DdC8991C32Ac8036Cb308d,2500 -0x022C0A0A236774fA6C19A2d2bD65D67daC8C8c9a,2499 -0x0d7c8d9065D0a47091A29df260F50cEc68c4b2Ce,2501 -0x0Eb3E48a8b4a6c9BBe5f3AAf3bac67E4ED2CC682,3201 -0x009Cc0D57e3EC92174Bede1F5D53f2e3fC5B056F,2006 -0x0515f116646BE7897F751804ef8A110f6661F6cd,3421 -0x0C1DcEf58202FF2b58FC6ddE481588bdbE2e5920,2635 diff --git a/contracts/script/utils.ts b/contracts/script/utils.ts index 93f73522..fb7180f4 100644 --- a/contracts/script/utils.ts +++ b/contracts/script/utils.ts @@ -2,12 +2,22 @@ export const getChainPrefix = (chainId: bigint): `0x${string}` => { switch (chainId) { case 59140n: // Linea testnet return "0x0000000000000000000000000000000000000000000000000000000000000000"; + case 59141n: // Linea Sepolia + return "0x0000000000000000000000000000000000000000000000000000000000000000"; case 59144n: // Linea mainnet return "0x0000000000000000000000000000000000000000000000000000000000000000"; case 421613n: // Arbitrum testnet return "0x0001000000000000000000000000000000000000000000000000000000000000"; + case 421614n: // Arbitrum Sepolia + return "0x0001000000000000000000000000000000000000000000000000000000000000"; case 42161n: // Arbitrum mainnet return "0x0001000000000000000000000000000000000000000000000000000000000000"; + case 42170n: // Arbitrum nova + return "0x0002000000000000000000000000000000000000000000000000000000000000"; + case 84532n: // Base Sepolia + return "0x0005000000000000000000000000000000000000000000000000000000000000"; + case 8453n: // Base mainnet + return "0x0005000000000000000000000000000000000000000000000000000000000000"; default: throw new Error("Unknown network"); } diff --git a/contracts/src/AttestationReader.sol b/contracts/src/AttestationReader.sol index c46f0757..43687186 100644 --- a/contracts/src/AttestationReader.sol +++ b/contracts/src/AttestationReader.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.21; -import { OwnableUpgradeable } from "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol"; +import { OwnableUpgradeable } from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import { Attestation as EASAttestation, IEAS } from "./interfaces/IEAS.sol"; import { Attestation } from "./types/Structs.sol"; import { AttestationRegistry } from "./AttestationRegistry.sol"; diff --git a/contracts/src/AttestationRegistry.sol b/contracts/src/AttestationRegistry.sol index 0a2b8841..ffe4a0ac 100644 --- a/contracts/src/AttestationRegistry.sol +++ b/contracts/src/AttestationRegistry.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.21; -import { OwnableUpgradeable } from "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol"; +import { OwnableUpgradeable } from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import { Attestation, AttestationPayload } from "./types/Structs.sol"; import { PortalRegistry } from "./PortalRegistry.sol"; import { SchemaRegistry } from "./SchemaRegistry.sol"; diff --git a/contracts/src/ModuleRegistry.sol b/contracts/src/ModuleRegistry.sol index 76e1f95b..f7a0b971 100644 --- a/contracts/src/ModuleRegistry.sol +++ b/contracts/src/ModuleRegistry.sol @@ -3,9 +3,10 @@ pragma solidity 0.8.21; import { AttestationPayload, Module } from "./types/Structs.sol"; import { AbstractModule } from "./abstracts/AbstractModule.sol"; -import { OwnableUpgradeable } from "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol"; +import { AbstractModuleV2 } from "./abstracts/AbstractModuleV2.sol"; +import { OwnableUpgradeable } from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; // solhint-disable-next-line max-line-length -import { ERC165CheckerUpgradeable } from "openzeppelin-contracts-upgradeable/contracts/utils/introspection/ERC165CheckerUpgradeable.sol"; +import { ERC165CheckerUpgradeable } from "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165CheckerUpgradeable.sol"; import { PortalRegistry } from "./PortalRegistry.sol"; import { IRouter } from "./interfaces/IRouter.sol"; import { uncheckedInc32 } from "./Common.sol"; @@ -102,8 +103,11 @@ contract ModuleRegistry is OwnableUpgradeable { if (bytes(name).length == 0) revert ModuleNameMissing(); // Check if moduleAddress is a smart contract address if (!isContractAddress(moduleAddress)) revert ModuleAddressInvalid(); - // Check if module has implemented AbstractModule - if (!ERC165CheckerUpgradeable.supportsInterface(moduleAddress, type(AbstractModule).interfaceId)) { + // Check if module has implemented AbstractModule or AbstractModuleV2 + if ( + !ERC165CheckerUpgradeable.supportsInterface(moduleAddress, type(AbstractModule).interfaceId) && + !ERC165CheckerUpgradeable.supportsInterface(moduleAddress, type(AbstractModuleV2).interfaceId) + ) { revert ModuleInvalid(); } // Module address is used to identify uniqueness of the module @@ -127,18 +131,56 @@ contract ModuleRegistry is OwnableUpgradeable { bytes[] memory validationPayloads, uint256 value ) public { - // If no modules provided, bypass module validation + // If no module provided, bypass module validation if (modulesAddresses.length == 0) return; // Each module involved must have a corresponding item from the validation payload if (modulesAddresses.length != validationPayloads.length) revert ModuleValidationPayloadMismatch(); - // For each module check if it is registered and call run method + // For each module, check if it is registered and call its run method for (uint32 i = 0; i < modulesAddresses.length; i = uncheckedInc32(i)) { if (!isRegistered(modulesAddresses[i])) revert ModuleNotRegistered(); + // solhint-disable avoid-tx-origin AbstractModule(modulesAddresses[i]).run(attestationPayload, validationPayloads[i], tx.origin, value); } } + /** + * @notice Executes the V2 run method for all given Modules that are registered + * @param modulesAddresses the addresses of the registered modules + * @param attestationPayload the payload to attest + * @param validationPayloads the payloads to check for each module (one payload per module) + * @param value the value (ETH) optionally passed in the attesting transaction + * @param initialCaller the address of the initial caller (transaction sender) + * @param attester the address defined by the Portal as the attester for this payload + * @dev check if modules are registered and execute the V2 run method for each module + */ + function runModulesV2( + address[] memory modulesAddresses, + AttestationPayload memory attestationPayload, + bytes[] memory validationPayloads, + uint256 value, + address initialCaller, + address attester + ) public { + // If no module provided, bypass module validation + if (modulesAddresses.length == 0) return; + // Each module involved must have a corresponding item from the validation payload + if (modulesAddresses.length != validationPayloads.length) revert ModuleValidationPayloadMismatch(); + + // For each module, check if it is registered and call its run method + for (uint32 i = 0; i < modulesAddresses.length; i = uncheckedInc32(i)) { + if (!isRegistered(modulesAddresses[i])) revert ModuleNotRegistered(); + AbstractModuleV2(modulesAddresses[i]).run( + attestationPayload, + validationPayloads[i], + initialCaller, + value, + attester, + msg.sender + ); + } + } + /** * @notice Executes the modules validation for all attestations payloads for all given Modules that are registered * @param modulesAddresses the addresses of the registered modules @@ -157,6 +199,26 @@ contract ModuleRegistry is OwnableUpgradeable { } } + /** + * @notice Executes the V2 modules validation for all attestations payloads for all given V2 Modules that are registered + * @param modulesAddresses the addresses of the registered modules + * @param attestationPayloads the payloads to attest + * @param validationPayloads the payloads to check for each module + * @dev NOTE: Currently the bulk run modules does not handle payable modules + * a default value of 0 is used. + */ + function bulkRunModulesV2( + address[] memory modulesAddresses, + AttestationPayload[] memory attestationPayloads, + bytes[][] memory validationPayloads, + address initialCaller, + address attester + ) public { + for (uint32 i = 0; i < attestationPayloads.length; i = uncheckedInc32(i)) { + runModulesV2(modulesAddresses, attestationPayloads[i], validationPayloads[i], 0, initialCaller, attester); + } + } + /** * @notice Get the number of Modules managed by the contract * @return The number of Modules already registered diff --git a/contracts/src/PortalRegistry.sol b/contracts/src/PortalRegistry.sol index 137b908e..e6a4c21f 100644 --- a/contracts/src/PortalRegistry.sol +++ b/contracts/src/PortalRegistry.sol @@ -1,9 +1,9 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.21; -import { OwnableUpgradeable } from "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol"; +import { OwnableUpgradeable } from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; // solhint-disable-next-line max-line-length -import { ERC165CheckerUpgradeable } from "openzeppelin-contracts-upgradeable/contracts/utils/introspection/ERC165CheckerUpgradeable.sol"; +import { ERC165CheckerUpgradeable } from "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165CheckerUpgradeable.sol"; import { AbstractPortal } from "./abstracts/AbstractPortal.sol"; import { DefaultPortal } from "./DefaultPortal.sol"; import { SchemaRegistry } from "./SchemaRegistry.sol"; diff --git a/contracts/src/Router.sol b/contracts/src/Router.sol index 536a5106..794b7e20 100644 --- a/contracts/src/Router.sol +++ b/contracts/src/Router.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.21; -import { OwnableUpgradeable } from "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol"; +import { OwnableUpgradeable } from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import { IRouter } from "./interfaces/IRouter.sol"; /** diff --git a/contracts/src/SchemaRegistry.sol b/contracts/src/SchemaRegistry.sol index ccc5c902..e76908fb 100644 --- a/contracts/src/SchemaRegistry.sol +++ b/contracts/src/SchemaRegistry.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.21; -import { OwnableUpgradeable } from "openzeppelin-contracts-upgradeable/contracts/access/OwnableUpgradeable.sol"; +import { OwnableUpgradeable } from "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import { Schema } from "./types/Structs.sol"; import { PortalRegistry } from "./PortalRegistry.sol"; import { IRouter } from "./interfaces/IRouter.sol"; diff --git a/contracts/src/abstracts/AbstractModule.sol b/contracts/src/abstracts/AbstractModule.sol index 70ed7ed9..0e0d817e 100644 --- a/contracts/src/abstracts/AbstractModule.sol +++ b/contracts/src/abstracts/AbstractModule.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.21; import { AttestationPayload } from "../types/Structs.sol"; -import { IERC165 } from "openzeppelin-contracts/contracts/utils/introspection/IERC165.sol"; +import { IERC165 } from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; /** * @title Abstract Module diff --git a/contracts/src/abstracts/AbstractModuleV2.sol b/contracts/src/abstracts/AbstractModuleV2.sol new file mode 100644 index 00000000..5f5dd1d0 --- /dev/null +++ b/contracts/src/abstracts/AbstractModuleV2.sol @@ -0,0 +1,42 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.21; + +import { AttestationPayload } from "../types/Structs.sol"; +import { IERC165 } from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; + +/** + * @title Abstract Module V2 + * @author Consensys + * @notice Defines the minimal Module V2 interface + */ +abstract contract AbstractModuleV2 is IERC165 { + /// @notice Error thrown when someone else than the portal's owner is trying to revoke + error OnlyPortalOwner(); + + /** + * @notice Executes the module's custom logic + * @param attestationPayload The incoming attestation data + * @param validationPayload Additional data required for verification + * @param initialCaller The address of the initial caller (transaction sender) + * @param value The value (ETH) optionally passed in the attesting transaction + * @param attester The address defined by the Portal as the attester for this payload + * @param portal The issuing Portal's address + */ + function run( + AttestationPayload memory attestationPayload, + bytes memory validationPayload, + address initialCaller, + uint256 value, + address attester, + address portal + ) public virtual; + + /** + * @notice Checks if the contract implements the Module interface. + * @param interfaceID The ID of the interface to check. + * @return A boolean indicating interface support. + */ + function supportsInterface(bytes4 interfaceID) public pure virtual override returns (bool) { + return interfaceID == type(AbstractModuleV2).interfaceId || interfaceID == type(IERC165).interfaceId; + } +} diff --git a/contracts/src/abstracts/AbstractPortal.sol b/contracts/src/abstracts/AbstractPortal.sol index 27d86d34..cd9d3c4d 100644 --- a/contracts/src/abstracts/AbstractPortal.sol +++ b/contracts/src/abstracts/AbstractPortal.sol @@ -5,14 +5,14 @@ import { AttestationRegistry } from "../AttestationRegistry.sol"; import { ModuleRegistry } from "../ModuleRegistry.sol"; import { PortalRegistry } from "../PortalRegistry.sol"; import { AttestationPayload } from "../types/Structs.sol"; -import { IERC165 } from "openzeppelin-contracts/contracts/utils/introspection/ERC165.sol"; +import { IERC165 } from "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import { IRouter } from "../interfaces/IRouter.sol"; import { IPortal } from "../interfaces/IPortal.sol"; /** * @title Abstract Portal * @author Consensys - * @notice This contract is an abstract contract with basic Portal logic + * @notice This contract is an abstracts contract with basic Portal logic * to be inherited. We strongly encourage all Portals to implement * this contract. */ @@ -61,6 +61,20 @@ abstract contract AbstractPortal is IPortal { attestationRegistry.attest(attestationPayload, getAttester()); } + /** + * @notice Attest the schema with given attestationPayload and validationPayload + * @param attestationPayload the payload to attest + * @param validationPayloads the payloads to validate via the modules to issue the attestations + * @dev Runs all modules for the portal and registers the attestation using AttestationRegistry + */ + function attestV2(AttestationPayload memory attestationPayload, bytes[] memory validationPayloads) public payable { + moduleRegistry.runModulesV2(modules, attestationPayload, validationPayloads, msg.value, msg.sender, getAttester()); + + _onAttestV2(attestationPayload, validationPayloads, msg.value); + + attestationRegistry.attest(attestationPayload, getAttester()); + } + /** * @notice Bulk attest the schema with payloads to attest and validation payloads * @param attestationsPayloads the payloads to attest @@ -74,6 +88,19 @@ abstract contract AbstractPortal is IPortal { attestationRegistry.bulkAttest(attestationsPayloads, getAttester()); } + /** + * @notice Bulk attest the schema with payloads to attest and validation payloads + * @param attestationPayloads the payloads to attest + * @param validationPayloads the payloads to validate via the modules to issue the attestations + */ + function bulkAttestV2(AttestationPayload[] memory attestationPayloads, bytes[][] memory validationPayloads) public { + moduleRegistry.bulkRunModulesV2(modules, attestationPayloads, validationPayloads, msg.sender, getAttester()); + + _onBulkAttest(attestationPayloads, validationPayloads); + + attestationRegistry.bulkAttest(attestationPayloads, getAttester()); + } + /** * @notice Replaces the attestation for the given identifier and replaces it with a new attestation * @param attestationId the ID of the attestation to replace @@ -169,6 +196,18 @@ abstract contract AbstractPortal is IPortal { */ function _onAttest(AttestationPayload memory attestationPayload, address attester, uint256 value) internal virtual {} + /** + * @notice Optional method run before a payload is attested + * @param attestationPayload the attestation payload to attest + * @param validationPayloads the payloads to validate via the modules + * @param value the value sent with the attestation + */ + function _onAttestV2( + AttestationPayload memory attestationPayload, + bytes[] memory validationPayloads, + uint256 value + ) internal virtual {} + /** * @notice Optional method run when an attestation is replaced * @param attestationId the ID of the attestation being replaced diff --git a/contracts/src/examples/modules/ERC712ModuleV2.sol b/contracts/src/examples/modules/ERC712ModuleV2.sol new file mode 100644 index 00000000..c75a26c2 --- /dev/null +++ b/contracts/src/examples/modules/ERC712ModuleV2.sol @@ -0,0 +1,67 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.21; + +import { AbstractModuleV2 } from "../../abstracts/AbstractModuleV2.sol"; +import { AttestationPayload } from "../../types/Structs.sol"; + +/** + * @notice Definition of EIP-712 domain + */ +struct EIP712Domain { + string name; + string version; + uint256 chainId; + address verifyingContract; +} + +contract ERC712ModuleV2 is AbstractModuleV2 { + EIP712Domain public domain; + address public sender; + address public receiver; + + error InvalidSignature(); + + constructor(EIP712Domain memory _domain, address _sender, address _receiver) { + domain = _domain; + sender = _sender; + receiver = _receiver; + } + + /** + * @inheritdoc AbstractModuleV2 + * @notice This method is used to run the module's validation logic + * @param validationPayload - Payload containing the serialized hash. The last one is the 'Root'. + * @param initialCaller - The initial transaction sender + */ + function run( + AttestationPayload memory /*attestationPayload*/, + bytes memory validationPayload, + address initialCaller, + uint256 /*value*/, + address /*attester*/, + address /*portal*/ + ) public view override { + (uint8 v, bytes32 r, bytes32 s) = abi.decode(validationPayload, (uint8, bytes32, bytes32)); + + bytes32 DOMAIN_TYPE_HASH = keccak256( + "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)" + ); + bytes32 domainHash = keccak256( + abi.encode( + DOMAIN_TYPE_HASH, + keccak256(bytes(domain.name)), + keccak256(bytes(domain.version)), + domain.chainId, + domain.verifyingContract + ) + ); + bytes32 TXN_TYPE_HASH = keccak256("Transaction(address from,address to,uint256 value)"); + bytes32 structHash = keccak256(abi.encode(TXN_TYPE_HASH, sender, receiver, uint256(1234))); + bytes32 hash = keccak256(abi.encodePacked("\x19\x01", domainHash, structHash)); + + address signer = ecrecover(hash, v, r, s); + if (signer != initialCaller) { + revert InvalidSignature(); + } + } +} diff --git a/contracts/src/examples/modules/MerkleProofModuleV2.sol b/contracts/src/examples/modules/MerkleProofModuleV2.sol new file mode 100644 index 00000000..b4438006 --- /dev/null +++ b/contracts/src/examples/modules/MerkleProofModuleV2.sol @@ -0,0 +1,50 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.21; + +import { AbstractModuleV2 } from "../../abstracts/AbstractModuleV2.sol"; +import { AttestationPayload } from "../../types/Structs.sol"; +import { uncheckedInc256 } from "../../Common.sol"; + +contract MerkleProofModuleV2 is AbstractModuleV2 { + error MerkelProofVerifyFailed(); + + /** + * @inheritdoc AbstractModuleV2 + * @notice This method is used to run the module's validation logic + * @param attestationPayload - AttestationPayload containing the user address as `subject` + * and nonce as `attestationData` + * @param validationPayload - validationPayload containing the serialized hash.The last one is the 'Root'. + */ + function run( + AttestationPayload memory attestationPayload, + bytes memory validationPayload, + address /*initialCaller*/, + uint256 /*value*/, + address /*attester*/, + address /*portal*/ + ) public pure override { + bytes32[] memory proof = abi.decode(validationPayload, (bytes32[])); + bytes32 hash = bytes32(attestationPayload.attestationData); + /* + * @notice We send the hardcoded third leaf to verify. + */ + uint256 index = 2; + for (uint256 i = index + 1; i < proof.length; i = uncheckedInc256(i)) { + bytes32 proofElement = proof[i]; + + if (index % 2 == 0) { + hash = keccak256(abi.encodePacked(hash, proofElement)); + } else { + hash = keccak256(abi.encodePacked(proofElement, hash)); + } + index = index / 2; + if (index == 0) { + break; + } + } + + if (hash != proof[proof.length - 1]) { + revert MerkelProofVerifyFailed(); + } + } +} diff --git a/contracts/src/examples/portals/EASPortal.sol b/contracts/src/examples/portals/EASPortal.sol index 544aeeeb..aa466ac3 100644 --- a/contracts/src/examples/portals/EASPortal.sol +++ b/contracts/src/examples/portals/EASPortal.sol @@ -11,7 +11,7 @@ import { uncheckedInc256 } from "../../Common.sol"; * @notice This is an example of how to maintain interoperability with EAS - https://attest.sh */ contract EASPortal is AbstractPortal { - // @notice This struct is defined in EAS's contracts' codebase + // @notice This struct is defined in EAS's src' codebase // solhint-disable-next-line max-line-length // this definition was taken from: https://github.com/ethereum-attestation-service/eas-contracts/blob/master/contracts/IEAS.sol#L9 struct AttestationRequestData { @@ -23,7 +23,7 @@ contract EASPortal is AbstractPortal { uint256 value; } - // @notice This struct is defined in EAS's contracts' codebase + // @notice This struct is defined in EAS's src' codebase // solhint-disable-next-line max-line-length // definition taken from: https://github.com/ethereum-attestation-service/eas-contracts/blob/master/contracts/IEAS.sol#L19 struct AttestationRequest { diff --git a/contracts/src/examples/portals/NFTPortal.sol b/contracts/src/examples/portals/NFTPortal.sol index ebfd9cb9..04e18532 100644 --- a/contracts/src/examples/portals/NFTPortal.sol +++ b/contracts/src/examples/portals/NFTPortal.sol @@ -1,8 +1,9 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.21; -import { IERC721, ERC721 } from "openzeppelin-contracts/contracts/token/ERC721/ERC721.sol"; -import { IERC165 } from "openzeppelin-contracts/contracts/utils/introspection/ERC165.sol"; +import { ERC721 } from "@openzeppelin/contracts/token/ERC721/ERC721.sol"; +import { IERC721, ERC721 } from "@openzeppelin/contracts/token/ERC721/ERC721.sol"; +import { IERC165 } from "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import { AbstractPortal } from "../../abstracts/AbstractPortal.sol"; import { Attestation, AttestationPayload } from "../../types/Structs.sol"; import { IPortal } from "../../interfaces/IPortal.sol"; diff --git a/contracts/src/interfaces/IPortal.sol b/contracts/src/interfaces/IPortal.sol index 7ede1e2f..cbd641d7 100644 --- a/contracts/src/interfaces/IPortal.sol +++ b/contracts/src/interfaces/IPortal.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.21; -import { IERC165 } from "openzeppelin-contracts/contracts/utils/introspection/ERC165.sol"; +import { IERC165 } from "@openzeppelin/contracts/utils/introspection/ERC165.sol"; /** * @title IPortal diff --git a/contracts/src/stdlib/ECDSAModule.sol b/contracts/src/stdlib/ECDSAModule.sol index 6f27b45d..cf76e0d3 100644 --- a/contracts/src/stdlib/ECDSAModule.sol +++ b/contracts/src/stdlib/ECDSAModule.sol @@ -4,7 +4,7 @@ pragma solidity 0.8.21; import { AbstractModule } from "../abstracts/AbstractModule.sol"; import { AttestationPayload } from "../types/Structs.sol"; import { PortalRegistry } from "../PortalRegistry.sol"; -import { ECDSA } from "openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol"; +import { ECDSA } from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; /** * @title Signature Module diff --git a/contracts/src/stdlib/ECDSAModuleV2.sol b/contracts/src/stdlib/ECDSAModuleV2.sol new file mode 100644 index 00000000..b9070e54 --- /dev/null +++ b/contracts/src/stdlib/ECDSAModuleV2.sol @@ -0,0 +1,83 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.21; + +import { AbstractModuleV2 } from "../abstracts/AbstractModuleV2.sol"; +import { AttestationPayload } from "../types/Structs.sol"; +import { PortalRegistry } from "../PortalRegistry.sol"; +import { ECDSA } from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; + +/** + * @title ECDSA Module V2 + * @author Consensys + * @notice This Module can be used by Portal creators to + * require a signature of the attestation payload + * from an authorized signer before issuing the attestation. + * @dev DISCLAIMER: This module doesn't check that a signature can be used only once! + */ +contract ECDSAModuleV2 is AbstractModuleV2 { + using ECDSA for bytes32; + + PortalRegistry public portalRegistry; + + mapping(address portal => mapping(address signer => bool authorizedSigners)) public authorizedSigners; + + /// @notice Error thrown when an array length mismatch occurs + error ArrayLengthMismatch(); + /// @notice Error thrown when a signer is not authorized by the module + error SignerNotAuthorized(); + + /// @notice Event emitted when the authorized signers are set + event SignersAuthorized(address indexed portal, address[] signers, bool[] authorizationStatus); + + modifier onlyPortalOwner(address portal) { + if (msg.sender != portalRegistry.getPortalByAddress(portal).ownerAddress) revert OnlyPortalOwner(); + _; + } + + /** + * @notice Contract constructor sets the portal registry + */ + constructor(address _portalRegistry) { + portalRegistry = PortalRegistry(_portalRegistry); + } + + /** + * @notice Set the authorized status of signers + * @param signers The signers to be set + * @param authorizationStatus The authorization status of signers + * @dev The length of `signers` and `authorizationStatus` must be the same + */ + function setAuthorizedSigners( + address portal, + address[] memory signers, + bool[] memory authorizationStatus + ) public onlyPortalOwner(portal) { + if (signers.length != authorizationStatus.length) revert ArrayLengthMismatch(); + + for (uint256 i = 0; i < signers.length; i++) { + authorizedSigners[portal][signers[i]] = authorizationStatus[i]; + } + + emit SignersAuthorized(portal, signers, authorizationStatus); + } + + /** + * @inheritdoc AbstractModuleV2 + * @param attestationPayload The Payload of the attestation + * @param validationPayload The validation payload required for the module, in this case the signature of the payload + * @param portal The Portal issuing the attestation + * @notice If the signer of the transaction payload is not an expected address, an error is thrown + */ + function run( + AttestationPayload memory attestationPayload, + bytes memory validationPayload, + address /*initialCaller*/, + uint256 /*value*/, + address /*attester*/, + address portal + ) public view override { + bytes32 messageHash = keccak256(abi.encode(attestationPayload)); + address messageSigner = messageHash.toEthSignedMessageHash().recover(validationPayload); + if (!authorizedSigners[portal][messageSigner]) revert SignerNotAuthorized(); + } +} diff --git a/contracts/src/stdlib/ERC1271Module.sol b/contracts/src/stdlib/ERC1271Module.sol index 1bf6ab64..98595185 100644 --- a/contracts/src/stdlib/ERC1271Module.sol +++ b/contracts/src/stdlib/ERC1271Module.sol @@ -96,6 +96,7 @@ contract ERC1271Module is ERC1271, AbstractModule { bytes32 s; uint8 v; + // solhint-disable no-inline-assembly assembly { r := mload(add(_signature, 0x20)) s := mload(add(_signature, 0x40)) diff --git a/contracts/src/stdlib/ERC1271ModuleV2.sol b/contracts/src/stdlib/ERC1271ModuleV2.sol new file mode 100644 index 00000000..3458a8e7 --- /dev/null +++ b/contracts/src/stdlib/ERC1271ModuleV2.sol @@ -0,0 +1,100 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.21; + +import { AbstractModuleV2 } from "../abstracts/AbstractModuleV2.sol"; +import { PortalRegistry } from "../PortalRegistry.sol"; +import { AttestationPayload } from "../types/Structs.sol"; +import { ECDSA } from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; +import { IERC1271 } from "@openzeppelin/contracts/interfaces/IERC1271.sol"; +import { Address } from "@openzeppelin/contracts/utils/Address.sol"; + +/** + * @title ERC-1271 Module V2 + * @author Consensys + * @notice This Module can be used by Portal creators to + * require an ERC_1271 signature of the attestation payload + * from an authorized signer before issuing the attestation. + * @dev DISCLAIMER: This module doesn't check that a signature can be used only once! + */ +contract ERC1271ModuleV2 is AbstractModuleV2 { + using ECDSA for bytes32; + using Address for address; + + PortalRegistry public portalRegistry; + + mapping(address portal => mapping(address signer => bool authorizedSigners)) public authorizedSigners; + + /// @notice Error thrown when an array length mismatch occurs + error ArrayLengthMismatch(); + /// @notice Error thrown when a signer is not authorized by the module + error SignerNotAuthorized(); + /// @notice Error thrown when a signature is invalid + error InvalidSignature(); + /// @notice Error thrown when a signature validation fails + error FailedValidation(); + + /// @notice Event emitted when the authorized signers are set + event SignersAuthorized(address indexed portal, address[] signers, bool[] authorizationStatus); + + modifier onlyPortalOwner(address portal) { + if (msg.sender != portalRegistry.getPortalByAddress(portal).ownerAddress) revert OnlyPortalOwner(); + _; + } + + /** + * @notice Contract constructor sets the portal registry + */ + constructor(address _portalRegistry) { + portalRegistry = PortalRegistry(_portalRegistry); + } + + /** + * @notice Set the accepted status of schemaIds + * @param signers The signers to be set + * @param authorizationStatus The authorization status of signers + * @dev The length of `signers` and `authorizationStatus` must be the same + */ + function setAuthorizedSigners( + address portal, + address[] memory signers, + bool[] memory authorizationStatus + ) public onlyPortalOwner(portal) { + if (signers.length != authorizationStatus.length) revert ArrayLengthMismatch(); + + for (uint256 i = 0; i < signers.length; i++) { + authorizedSigners[portal][signers[i]] = authorizationStatus[i]; + } + + emit SignersAuthorized(portal, signers, authorizationStatus); + } + + /** + * @inheritdoc AbstractModuleV2 + * @param attestationPayload The Payload of the attestation + * @param validationPayload The validation payload required for the module, in this case the signature of the payload + * @param portal The Portal issuing the attestation + * @notice If the signer of the transaction payload is not an expected address, an error is thrown + */ + function run( + AttestationPayload memory attestationPayload, + bytes memory validationPayload, + address /*initialCaller*/, + uint256 /*value*/, + address /*attester*/, + address portal + ) public view override { + bytes32 messageHash = keccak256(abi.encode(attestationPayload)); + address messageSigner = messageHash.toEthSignedMessageHash().recover(validationPayload); + if (!authorizedSigners[portal][messageSigner]) revert SignerNotAuthorized(); + + if (messageSigner.isContract()) { + try IERC1271(messageSigner).isValidSignature(messageHash.toEthSignedMessageHash(), validationPayload) returns ( + bytes4 magicValue + ) { + if (magicValue != IERC1271.isValidSignature.selector) revert InvalidSignature(); + } catch { + revert FailedValidation(); + } + } + } +} diff --git a/contracts/src/stdlib/FeeModuleV2.sol b/contracts/src/stdlib/FeeModuleV2.sol new file mode 100644 index 00000000..177fd6ed --- /dev/null +++ b/contracts/src/stdlib/FeeModuleV2.sol @@ -0,0 +1,73 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.21; + +import { AbstractModuleV2 } from "../abstracts/AbstractModuleV2.sol"; +import { AttestationPayload } from "../types/Structs.sol"; +import { PortalRegistry } from "../PortalRegistry.sol"; + +/** + * @title Fee Module V2 + * @author Consensys + * @notice This module can be used by portal creators to enforce a fee on attestations. + * @dev This Module checks the fee is sent, but doesn't collect the fee + */ +contract FeeModuleV2 is AbstractModuleV2 { + PortalRegistry public portalRegistry; + + mapping(address portal => mapping(bytes32 schemaId => uint256 attestationFee)) public attestationFees; + + /// @notice Error thrown when an array length mismatch occurs + error ArrayLengthMismatch(); + /// @notice Error thrown when an invalid attestation fee is provided + error InvalidAttestationFee(); + + modifier onlyPortalOwner(address portal) { + if (msg.sender != portalRegistry.getPortalByAddress(portal).ownerAddress) revert OnlyPortalOwner(); + _; + } + + event FeesSet(address portal, bytes32[] schemaIds, uint256[] attestationFees); + + /** + * @notice Contract constructor sets the Portal Registry + */ + constructor(address _portalRegistry) { + portalRegistry = PortalRegistry(_portalRegistry); + } + + /** + * @notice Set the fee required to attest for a given Portal and one or multiple Schemas + * @param portal The Portal targeted by the fees + * @param schemaIds The Schema IDs to set the fees for + * @param fees The fees required to attest with the Schemas on the Portal + * @dev The length of `schemaIds` and `attestationFees` must be the same + * Only the Portal owner can call this function to set the fees on his Portal + */ + function setFees(address portal, bytes32[] memory schemaIds, uint256[] memory fees) public onlyPortalOwner(portal) { + if (schemaIds.length != fees.length) revert ArrayLengthMismatch(); + + for (uint256 i = 0; i < schemaIds.length; i++) { + attestationFees[portal][schemaIds[i]] = fees[i]; + } + + emit FeesSet(portal, schemaIds, fees); + } + + /** + * @inheritdoc AbstractModuleV2 + * @param value The value sent for the attestation (= the fee) + * @param portal The Portal issuing the attestation + * @notice If the provided fee is not enough, an error is thrown + */ + function run( + AttestationPayload memory attestationPayload, + bytes memory /*validationPayload*/, + address /*initialCaller*/, + uint256 value, + address /*attester*/, + address portal + ) public view override { + uint256 attestationFee = attestationFees[portal][attestationPayload.schemaId]; + if (value < attestationFee) revert InvalidAttestationFee(); + } +} diff --git a/contracts/src/stdlib/IndexerModuleV2.sol b/contracts/src/stdlib/IndexerModuleV2.sol new file mode 100644 index 00000000..9fbd8ece --- /dev/null +++ b/contracts/src/stdlib/IndexerModuleV2.sol @@ -0,0 +1,208 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.21; + +import { AbstractModuleV2 } from "../abstracts/AbstractModuleV2.sol"; +import { AttestationPayload, Attestation } from "../types/Structs.sol"; +import { Router } from "../Router.sol"; +import { AttestationRegistry } from "../AttestationRegistry.sol"; +import { PortalRegistry } from "../PortalRegistry.sol"; + +/** + * @title IndexerModule V2 + * @author Clique + * @dev The contract is responsible for indexing attestations by various parameters. + * It allows for efficient retrieval of attestations based on these parameters. + * DISCLAIMER: This Module doesn't un-index revoked attestations. + * DISCLAIMER: This Module doesn't work as intended when bulk attesting. + * DISCLAIMER: This Module doesn't consider the chain prefix to generate the indexed attestation ID. + */ +contract IndexerModuleV2 is AbstractModuleV2 { + Router public router; + + mapping(bytes subject => bytes32[] attestationIds) private attestationIdsBySubject; + mapping(bytes subject => mapping(bytes32 schemaId => bytes32[] attestationIds)) + private attestationIdsBySubjectBySchema; + mapping(address attester => bytes32[] attestationIds) private attestationIdsByAttester; + mapping(bytes32 schema => bytes32[] attestationIds) private attestationIdsBySchema; + mapping(address portal => bytes32[] attestationIds) private attestationIdsByPortal; + mapping(address portal => mapping(bytes subject => bytes32[] attestationIds)) private attestationIdsByPortalBySubject; + mapping(bytes32 attestationId => bool status) private indexedAttestations; + + /// @notice Error thrown when something else than a registered Portal is trying to index an Attestation + error OnlyRegisteredPortal(); + + /// @dev Emitted when an attestation is indexed. + event AttestationIndexed(bytes32 attestationId); + + modifier onlyRegisteredPortal(address portal) { + if (PortalRegistry(router.getPortalRegistry()).isRegistered(portal)) revert OnlyRegisteredPortal(); + _; + } + + /** + * @dev Contract constructor sets the router. + * @param _router The address of the router. + */ + constructor(address _router) { + router = Router(_router); + } + + /** + * @inheritdoc AbstractModuleV2 + * @param attestationPayload The Payload of the attestation + * @param attester The address attesting the payload + * @param portal The Portal issuing the attestation + * @notice If the signer of the transaction payload is not an expected address, an error is thrown + */ + function run( + AttestationPayload memory attestationPayload, + bytes memory /*validationPayload*/, + address /*initialCaller*/, + uint256 /*value*/, + address attester, + address portal + ) public override onlyRegisteredPortal(portal) { + Attestation memory attestation = _buildAttestation(attestationPayload, attester, portal); + _indexAttestation(attestation); + } + + /** + * @dev Indexes an attestation. + * @param attestationId The ID of the attestation to index. + */ + function indexAttestation(bytes32 attestationId) public { + AttestationRegistry attestationRegistry = AttestationRegistry(router.getAttestationRegistry()); + Attestation memory attestation = attestationRegistry.getAttestation(attestationId); + _indexAttestation(attestation); + } + + /** + * @dev Indexes multiple attestations. + * @param attestationIds An array of attestation IDs to index. + */ + function indexAttestations(bytes32[] calldata attestationIds) external { + uint256 length = attestationIds.length; + for (uint256 i = 0; i < length; i++) { + indexAttestation(attestationIds[i]); + } + } + + /** + * @dev Returns the attestation IDs for a given subject. + * @param subject The subject to retrieve attestation IDs for. + * @return An array of attestation IDs. + */ + function getAttestationIdsBySubject(bytes memory subject) external view returns (bytes32[] memory) { + return attestationIdsBySubject[subject]; + } + + /** + * @dev Returns the attestation IDs for a given subject and schema. + * @param subject The subject to retrieve attestation IDs for. + * @param schemaId The schema ID to retrieve attestation IDs for. + * @return An array of attestation IDs. + */ + function getAttestationIdsBySubjectBySchema( + bytes memory subject, + bytes32 schemaId + ) external view returns (bytes32[] memory) { + return attestationIdsBySubjectBySchema[subject][schemaId]; + } + + /** + * @dev Returns the attestation IDs for a given attester. + * @param attester The attester to retrieve attestation IDs for. + * @return An array of attestation IDs. + */ + function getAttestationIdsByAttester(address attester) external view returns (bytes32[] memory) { + return attestationIdsByAttester[attester]; + } + + /** + * @dev Returns the attestation IDs for a given schema. + * @param schema The schema to retrieve attestation IDs for. + * @return An array of attestation IDs. + */ + function getAttestationIdsBySchema(bytes32 schema) external view returns (bytes32[] memory) { + return attestationIdsBySchema[schema]; + } + + /** + * @dev Returns the attestation IDs for a given portal. + * @param portal The portal to retrieve attestation IDs for. + * @return An array of attestation IDs. + */ + function getAttestationIdsByPortal(address portal) external view returns (bytes32[] memory) { + return attestationIdsByPortal[portal]; + } + + /** + * @dev Returns the attestation IDs for a given portal and subject. + * @param portal The portal to retrieve attestation IDs for. + * @param subject The subject to retrieve attestation IDs for. + * @return An array of attestation IDs. + */ + function getAttestationIdsByPortalBySubject( + address portal, + bytes memory subject + ) external view returns (bytes32[] memory) { + return attestationIdsByPortalBySubject[portal][subject]; + } + + /** + * @dev Returns the indexed status of an attestation. + * @param attestationId The ID of the attestation to check. + * @return The indexed status of the attestation. + */ + function getIndexedAttestationStatus(bytes32 attestationId) external view returns (bool) { + return indexedAttestations[attestationId]; + } + + /** + * @dev Indexes an attestation. + * @param attestation The attestation to index. + */ + function _indexAttestation(Attestation memory attestation) internal { + if (indexedAttestations[attestation.attestationId]) { + return; + } + attestationIdsBySubject[attestation.subject].push(attestation.attestationId); + attestationIdsBySubjectBySchema[attestation.subject][attestation.schemaId].push(attestation.attestationId); + attestationIdsByAttester[attestation.attester].push(attestation.attestationId); + attestationIdsBySchema[attestation.schemaId].push(attestation.attestationId); + attestationIdsByPortal[attestation.portal].push(attestation.attestationId); + attestationIdsByPortalBySubject[attestation.portal][attestation.subject].push(attestation.attestationId); + indexedAttestations[attestation.attestationId] = true; + + emit AttestationIndexed(attestation.attestationId); + } + + /** + * @dev Builds an attestation. + * @param attestationPayload The payload of the attestation. + * @return The built attestation. + */ + function _buildAttestation( + AttestationPayload memory attestationPayload, + address attester, + address portal + ) internal view returns (Attestation memory) { + AttestationRegistry attestationRegistry = AttestationRegistry(router.getAttestationRegistry()); + return + Attestation( + // TODO: Consider the chain prefix to generate the attestation ID + bytes32(abi.encode(attestationRegistry.getAttestationIdCounter() + 1)), + attestationPayload.schemaId, + bytes32(0), + attester, + portal, + uint64(block.timestamp), + attestationPayload.expirationDate, + 0, + attestationRegistry.getVersionNumber(), + false, + attestationPayload.subject, + attestationPayload.attestationData + ); + } +} diff --git a/contracts/src/stdlib/IssuersModuleV2.sol b/contracts/src/stdlib/IssuersModuleV2.sol new file mode 100644 index 00000000..e86c3692 --- /dev/null +++ b/contracts/src/stdlib/IssuersModuleV2.sol @@ -0,0 +1,42 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.21; + +import { AbstractModuleV2 } from "../abstracts/AbstractModuleV2.sol"; +import { AttestationPayload } from "../types/Structs.sol"; +import { PortalRegistry } from "../PortalRegistry.sol"; + +/** + * @title Issuers Module V2 + * @author Consensys + * @notice This Modules checks if the subject of an Attestation is registered as an Issuer + */ +contract IssuersModuleV2 is AbstractModuleV2 { + PortalRegistry public portalRegistry; + + /// @notice Error thrown when the subject of an Attestation is not an Issuer + error UnauthorizedSubject(); + + constructor(address _portalRegistry) { + portalRegistry = PortalRegistry(_portalRegistry); + } + + /** + * @inheritdoc AbstractModuleV2 + * @notice If the Attestation subject is not an Issuer, an error is thrown + */ + function run( + AttestationPayload memory attestationPayload, + bytes memory /*validationPayload*/, + address /*initialCaller*/, + uint256 /*value*/, + address /*attester*/, + address /*portal*/ + ) public view override { + address subject = address(0); + + if (attestationPayload.subject.length == 32) subject = abi.decode(attestationPayload.subject, (address)); + if (attestationPayload.subject.length == 20) subject = address(uint160(bytes20(attestationPayload.subject))); + + if (!portalRegistry.isIssuer(subject)) revert UnauthorizedSubject(); + } +} diff --git a/contracts/src/stdlib/SchemaModuleV2.sol b/contracts/src/stdlib/SchemaModuleV2.sol new file mode 100644 index 00000000..f7f9964d --- /dev/null +++ b/contracts/src/stdlib/SchemaModuleV2.sol @@ -0,0 +1,75 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.21; + +import { AbstractModuleV2 } from "../abstracts/AbstractModuleV2.sol"; +import { AttestationPayload } from "../types/Structs.sol"; +import { PortalRegistry } from "../PortalRegistry.sol"; + +/** + * @title Schema Module V2 + * @author Consensys + * @notice This module can be used by portal creators to + * enforce a schemaId check before issuing attestations. + */ +contract SchemaModuleV2 is AbstractModuleV2 { + PortalRegistry public portalRegistry; + + mapping(address portal => mapping(bytes32 schemaId => bool authorized)) public authorizedSchemaIds; + + /// @notice Error thrown when an array length mismatch occurs + error ArrayLengthMismatch(); + /// @notice Error thrown when a schemaId is not authorized by the module + error SchemaNotAuthorized(); + + /// @notice Event emitted when the authorized schemas are set + event SchemasAuthorized(address indexed portal, bytes32[] schemas, bool[] authorizedStatus); + + modifier onlyPortalOwner(address portal) { + if (msg.sender != portalRegistry.getPortalByAddress(portal).ownerAddress) revert OnlyPortalOwner(); + _; + } + + /** + * @notice Contract constructor sets the portal registry + */ + constructor(address _portalRegistry) { + portalRegistry = PortalRegistry(_portalRegistry); + } + + /** + * @notice Set the authorized status of Schemas + * @param schemaIds The schema IDs to be set + * @param authorizedStatus The authorized status of Schemas + * @dev The length of `schemaIds` and `authorizedStatus` must be the same + */ + function setAuthorizedSchemaIds( + address portal, + bytes32[] memory schemaIds, + bool[] memory authorizedStatus + ) public onlyPortalOwner(portal) { + if (schemaIds.length != authorizedStatus.length) revert ArrayLengthMismatch(); + + for (uint256 i = 0; i < schemaIds.length; i++) { + authorizedSchemaIds[portal][schemaIds[i]] = authorizedStatus[i]; + } + + emit SchemasAuthorized(portal, schemaIds, authorizedStatus); + } + + /** + * @inheritdoc AbstractModuleV2 + * @param attestationPayload The incoming attestation data + * @param portal The Portal issuing the attestation + * @notice If the Schema used in the attestation payload is not authorized for the Portal, an error is thrown + */ + function run( + AttestationPayload memory attestationPayload, + bytes memory /*_validationPayload*/, + address /*initialCaller*/, + uint256 /*value*/, + address /*attester*/, + address portal + ) public view override { + if (!authorizedSchemaIds[portal][attestationPayload.schemaId]) revert SchemaNotAuthorized(); + } +} diff --git a/contracts/src/stdlib/SenderModuleV2.sol b/contracts/src/stdlib/SenderModuleV2.sol new file mode 100644 index 00000000..260cc241 --- /dev/null +++ b/contracts/src/stdlib/SenderModuleV2.sol @@ -0,0 +1,74 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.21; + +import { AbstractModuleV2 } from "../abstracts/AbstractModuleV2.sol"; +import { AttestationPayload } from "../types/Structs.sol"; +import { PortalRegistry } from "../PortalRegistry.sol"; + +/** + * @title Sender Module V2 + * @author Consensys + * @notice This Module checks if the transaction sender is authorized for a specific Portal + */ +contract SenderModuleV2 is AbstractModuleV2 { + PortalRegistry public portalRegistry; + + mapping(address portal => mapping(address sender => bool authorized)) public authorizedSenders; + + /// @notice Error thrown when an array length mismatch occurs + error ArrayLengthMismatch(); + /// @notice Error thrown when the transaction sender is not authorized + error UnauthorizedSender(); + + /// @notice Event emitted when the authorized senders are set + event SendersAuthorized(address indexed portal, address[] senders, bool[] authorizedStatus); + + modifier onlyPortalOwner(address portal) { + if (msg.sender != portalRegistry.getPortalByAddress(portal).ownerAddress) revert OnlyPortalOwner(); + _; + } + + /** + * @notice Contract constructor sets the portal registry + */ + constructor(address _portalRegistry) { + portalRegistry = PortalRegistry(_portalRegistry); + } + + /** + * @notice Set the authorized status of senders + * @param senders The senders to be set + * @param authorizedStatus The authorized status of senders + * @dev The length of `senders` and `authorizedStatus` must be the same + */ + function setAuthorizedSenders( + address portal, + address[] memory senders, + bool[] memory authorizedStatus + ) public onlyPortalOwner(portal) { + if (senders.length != authorizedStatus.length) revert ArrayLengthMismatch(); + + for (uint256 i = 0; i < senders.length; i++) { + authorizedSenders[portal][senders[i]] = authorizedStatus[i]; + } + + emit SendersAuthorized(portal, senders, authorizedStatus); + } + + /** + * @inheritdoc AbstractModuleV2 + * @param initialCaller The initial transaction sender + * @param portal The Portal issuing the attestation + * @notice If the transaction sender is not the expected address, an error is thrown + */ + function run( + AttestationPayload memory /*attestationPayload*/, + bytes memory /*validationPayload*/, + address initialCaller, + uint256 /*value*/, + address /*attester*/, + address portal + ) public view override { + if (!authorizedSenders[portal][initialCaller]) revert UnauthorizedSender(); + } +} diff --git a/contracts/test/AttestationReader.t.sol b/contracts/test/AttestationReader.t.sol index 2d3e1c15..77eb9f7a 100644 --- a/contracts/test/AttestationReader.t.sol +++ b/contracts/test/AttestationReader.t.sol @@ -131,7 +131,7 @@ contract AttestationReaderTest is Test { return attestation; } - function _assertAttestation(EASAttestation memory attestation1, EASAttestation memory attestation2) internal { + function _assertAttestation(EASAttestation memory attestation1, EASAttestation memory attestation2) internal pure { assertEq(attestation1.uid, attestation2.uid); assertEq(attestation1.schema, attestation2.schema); assertEq(attestation1.time, attestation2.time); diff --git a/contracts/test/AttestationRegistry.t.sol b/contracts/test/AttestationRegistry.t.sol index 182f7ce4..1488cf9d 100644 --- a/contracts/test/AttestationRegistry.t.sol +++ b/contracts/test/AttestationRegistry.t.sol @@ -52,7 +52,7 @@ contract AttestationRegistryTest is Test { PortalRegistry(portalRegistryAddress).register(portal, "Name", "Description", true, "Owner name"); } - function test_setup() public { + function test_setup() public view { // Check Router address address routerAddress = address(attestationRegistry.router()); assertEq(routerAddress, address(router)); @@ -474,7 +474,7 @@ contract AttestationRegistryTest is Test { assertEq(revokedAttestation2.revocationDate, block.timestamp); } - function test_isRevocable() public { + function test_isRevocable() public view { bool isRevocable = attestationRegistry.isRevocable(portal); assertTrue(isRevocable); } @@ -645,7 +645,7 @@ contract AttestationRegistryTest is Test { attestationRegistry.balanceOfBatch(owners, ids); } - function test_attestationRegistry() public { + function test_attestationRegistry() public view { bytes32 attestationId = attestationRegistryHarness.exposed_generateAttestationId(0); assertEq(attestationId, 0x0003000000000000000000000000000000000000000000000000000000000000); @@ -679,7 +679,7 @@ contract AttestationRegistryTest is Test { return attestation; } - function _assertAttestation(Attestation memory attestation1, Attestation memory attestation2) internal { + function _assertAttestation(Attestation memory attestation1, Attestation memory attestation2) internal pure { assertEq(attestation1.attestationId, attestation2.attestationId); assertEq(attestation1.schemaId, attestation2.schemaId); assertEq(attestation1.portal, attestation2.portal); diff --git a/contracts/test/DefaultPortal.t.sol b/contracts/test/DefaultPortal.t.sol index 7b100f16..a10b2bf5 100644 --- a/contracts/test/DefaultPortal.t.sol +++ b/contracts/test/DefaultPortal.t.sol @@ -9,7 +9,7 @@ import { CorrectModule } from "./mocks/CorrectModuleMock.sol"; import { AttestationRegistryMock } from "./mocks/AttestationRegistryMock.sol"; import { ModuleRegistryMock } from "./mocks/ModuleRegistryMock.sol"; import { PortalRegistryMock } from "./mocks/PortalRegistryMock.sol"; -import { ERC165Upgradeable } from "openzeppelin-contracts-upgradeable/contracts/utils/introspection/ERC165Upgradeable.sol"; +import { ERC165Upgradeable } from "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol"; import { Router } from "./../src/Router.sol"; contract DefaultPortalTest is Test { @@ -44,7 +44,7 @@ contract DefaultPortalTest is Test { portalRegistryMock.register(address(defaultPortal), "Name", "Description", true, "Owner name"); } - function test_setUp() public { + function test_setup() public view { assertEq(address(defaultPortal.modules(0)), address(modules[0])); assertEq(address(defaultPortal.moduleRegistry()), address(moduleRegistryMock)); assertEq(address(defaultPortal.attestationRegistry()), address(attestationRegistryMock)); @@ -52,7 +52,7 @@ contract DefaultPortalTest is Test { assertEq(portalRegistryMock.getPortalByAddress(address(defaultPortal)).ownerAddress, portalOwner); } - function test_getModules() public { + function test_getModules() public view { address[] memory _modules = defaultPortal.getModules(); assertEq(_modules, modules); } @@ -195,7 +195,7 @@ contract DefaultPortalTest is Test { defaultPortal.bulkRevoke(attestationsToRevoke); } - function test_supportsInterface() public { + function test_supportsInterface() public view { bool isIERC165Supported = defaultPortal.supportsInterface(type(ERC165Upgradeable).interfaceId); assertEq(isIERC165Supported, true); bool isAbstractPortalSupported = defaultPortal.supportsInterface(type(AbstractPortal).interfaceId); diff --git a/contracts/test/ModuleRegistry.t.sol b/contracts/test/ModuleRegistry.t.sol index 955b1f19..de3a3ba1 100644 --- a/contracts/test/ModuleRegistry.t.sol +++ b/contracts/test/ModuleRegistry.t.sol @@ -4,6 +4,7 @@ pragma solidity 0.8.21; import { Test } from "forge-std/Test.sol"; import { ModuleRegistry } from "../src/ModuleRegistry.sol"; import { CorrectModule } from "./mocks/CorrectModuleMock.sol"; +import { CorrectModuleV2 } from "./mocks/CorrectModuleV2Mock.sol"; import { IncorrectModule } from "./mocks/IncorrectModuleMock.sol"; import { PortalRegistryMock } from "./mocks/PortalRegistryMock.sol"; import { AttestationPayload } from "../src/types/Structs.sol"; @@ -64,7 +65,7 @@ contract ModuleRegistryTest is Test { testModuleRegistry.updateRouter(address(0)); } - function test_isContractAddress() public { + function test_isContractAddress() public view { // isContractAddress should return false for EOA address address eoaAddress = vm.addr(1); bool eoaAddressResult = moduleRegistry.isContractAddress(eoaAddress); @@ -147,11 +148,33 @@ contract ModuleRegistryTest is Test { moduleRegistry.runModules(moduleAddresses, attestationPayload, validationPayload, 0); } + function test_runModulesV2() public { + // Register 2 modules + address[] memory moduleAddresses = new address[](2); + moduleAddresses[0] = address(new CorrectModuleV2()); + moduleAddresses[1] = address(new CorrectModuleV2()); + vm.startPrank(user); + moduleRegistry.register("Module1", "Description1", moduleAddresses[0]); + moduleRegistry.register("Module2", "Description2", moduleAddresses[1]); + vm.stopPrank(); + // Create validation payload + bytes[] memory validationPayload = new bytes[](2); + + moduleRegistry.runModulesV2( + moduleAddresses, + attestationPayload, + validationPayload, + 0, + address(makeAddr("initialCaller")), + address(makeAddr("attester")) + ); + } + function test_runModules_ModuleValidationPayloadMismatch() public { // Register 2 modules address[] memory moduleAddresses = new address[](2); - moduleAddresses[0] = address(new CorrectModule()); - moduleAddresses[1] = address(new CorrectModule()); + moduleAddresses[0] = address(new CorrectModuleV2()); + moduleAddresses[1] = address(new CorrectModuleV2()); vm.startPrank(user); moduleRegistry.register("Module1", "Description1", moduleAddresses[0]); moduleRegistry.register("Module2", "Description2", moduleAddresses[1]); @@ -164,6 +187,30 @@ contract ModuleRegistryTest is Test { moduleRegistry.runModules(moduleAddresses, attestationPayload, validationPayload, 0); } + function test_runModuleV2s_ModuleValidationPayloadMismatch() public { + // Register 2 modules + address[] memory moduleAddresses = new address[](2); + moduleAddresses[0] = address(new CorrectModuleV2()); + moduleAddresses[1] = address(new CorrectModuleV2()); + vm.startPrank(user); + moduleRegistry.register("Module1", "Description1", moduleAddresses[0]); + moduleRegistry.register("Module2", "Description2", moduleAddresses[1]); + vm.stopPrank(); + + // Create validation payload + bytes[] memory validationPayload = new bytes[](1); + + vm.expectRevert(ModuleRegistry.ModuleValidationPayloadMismatch.selector); + moduleRegistry.runModulesV2( + moduleAddresses, + attestationPayload, + validationPayload, + 0, + address(makeAddr("initialCaller")), + address(makeAddr("attester")) + ); + } + function test_runModules_withoutModule() public { // Register a module address[] memory moduleAddresses = new address[](0); @@ -174,6 +221,23 @@ contract ModuleRegistryTest is Test { moduleRegistry.runModules(moduleAddresses, attestationPayload, validationPayload, 0); } + function test_runModulesV2_withoutModule() public { + // Register a module + address[] memory moduleAddresses = new address[](0); + + // Create validation payload + bytes[] memory validationPayload = new bytes[](0); + + moduleRegistry.runModulesV2( + moduleAddresses, + attestationPayload, + validationPayload, + 0, + address(makeAddr("initialCaller")), + address(makeAddr("attester")) + ); + } + function test_runModules_ModuleNotRegistered() public { // Create 2 modules without registration address[] memory moduleAddresses = new address[](2); @@ -188,6 +252,27 @@ contract ModuleRegistryTest is Test { moduleRegistry.runModules(moduleAddresses, attestationPayload, validationPayload, 0); } + function test_runModulesV2_ModuleNotRegistered() public { + // Create 2 modules without registration + address[] memory moduleAddresses = new address[](2); + moduleAddresses[0] = address(new CorrectModuleV2()); + moduleAddresses[1] = address(new CorrectModuleV2()); + + // Create validation payload + bytes[] memory validationPayload = new bytes[](2); + + // execute runModules + vm.expectRevert(ModuleRegistry.ModuleNotRegistered.selector); + moduleRegistry.runModulesV2( + moduleAddresses, + attestationPayload, + validationPayload, + 0, + address(makeAddr("initialCaller")), + address(makeAddr("attester")) + ); + } + function test_bulkRunModules() public { // Register 2 modules address[] memory moduleAddresses = new address[](2); @@ -213,6 +298,37 @@ contract ModuleRegistryTest is Test { vm.stopPrank(); } + function test_bulkRunModulesV2() public { + // Register 2 modules + address[] memory moduleAddresses = new address[](2); + moduleAddresses[0] = address(new CorrectModuleV2()); + moduleAddresses[1] = address(new CorrectModuleV2()); + vm.startPrank(user); + moduleRegistry.register("Module1", "Description1", moduleAddresses[0]); + moduleRegistry.register("Module2", "Description2", moduleAddresses[1]); + + // Create validation payloads + bytes[] memory validationPayload1 = new bytes[](2); + bytes[] memory validationPayload2 = new bytes[](2); + + bytes[][] memory validationPayloads = new bytes[][](2); + validationPayloads[0] = validationPayload1; + validationPayloads[1] = validationPayload2; + + AttestationPayload[] memory attestationPayloads = new AttestationPayload[](2); + attestationPayloads[0] = attestationPayload; + attestationPayloads[1] = attestationPayload; + + moduleRegistry.bulkRunModulesV2( + moduleAddresses, + attestationPayloads, + validationPayloads, + address(makeAddr("initialCaller")), + address(makeAddr("attester")) + ); + vm.stopPrank(); + } + function test_getModuleAddress() public { vm.prank(user); moduleRegistry.register(expectedName, expectedDescription, expectedAddress); diff --git a/contracts/test/PortalRegistry.t.sol b/contracts/test/PortalRegistry.t.sol index d2a8539c..548171d9 100644 --- a/contracts/test/PortalRegistry.t.sol +++ b/contracts/test/PortalRegistry.t.sol @@ -272,7 +272,7 @@ contract PortalRegistryTest is Test { assertEq(portalRegistry.isRegistered(address(validPortalMock)), true); } - function _assertPortal(Portal memory portal1, Portal memory portal2) internal { + function _assertPortal(Portal memory portal1, Portal memory portal2) internal pure { assertEq(portal1.name, portal2.name); assertEq(portal1.description, portal2.description); assertEq(portal1.isRevocable, portal2.isRevocable); diff --git a/contracts/test/SchemaRegistry.t.sol b/contracts/test/SchemaRegistry.t.sol index aa3afa10..a0c5dc5f 100644 --- a/contracts/test/SchemaRegistry.t.sol +++ b/contracts/test/SchemaRegistry.t.sol @@ -95,7 +95,7 @@ contract SchemaRegistryTest is Test { schemaRegistry.updateMatchingSchemaIssuers(user, address(2)); } - function test_getIdFromSchemaString() public { + function test_getIdFromSchemaString() public view { bytes32 id = schemaRegistry.getIdFromSchemaString(expectedString); assertEq(id, expectedId); } @@ -229,7 +229,7 @@ contract SchemaRegistryTest is Test { vm.stopPrank(); } - function _assertSchema(Schema memory schema1, Schema memory schema2) internal { + function _assertSchema(Schema memory schema1, Schema memory schema2) internal pure { assertEq(schema2.name, schema1.name); assertEq(schema2.description, schema1.description); assertEq(schema2.context, schema1.context); diff --git a/contracts/test/examples/modules/ERC712Module.t.sol b/contracts/test/examples/modules/ERC712Module.t.sol index 1c50c76b..2da496dd 100644 --- a/contracts/test/examples/modules/ERC712Module.t.sol +++ b/contracts/test/examples/modules/ERC712Module.t.sol @@ -92,7 +92,7 @@ contract ERC712ModuleTest is Test { erc712Module.run(attestationPayload, signature, not_signer, 0); } - function test_ERC712Module_supportsInterface() public { + function test_ERC712Module_supportsInterface() public view { bool isAbstractModuleSupported = erc712Module.supportsInterface(type(AbstractModule).interfaceId); assertEq(isAbstractModuleSupported, true); } diff --git a/contracts/test/examples/modules/ERC712ModuleV2.t.sol b/contracts/test/examples/modules/ERC712ModuleV2.t.sol new file mode 100644 index 00000000..3642a131 --- /dev/null +++ b/contracts/test/examples/modules/ERC712ModuleV2.t.sol @@ -0,0 +1,120 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.21; + +import { Test } from "forge-std/Test.sol"; +import { ERC712ModuleV2, EIP712Domain, AbstractModuleV2 } from "../../../src/examples/modules/ERC712ModuleV2.sol"; +import { AttestationPayload } from "../../../src/types/Structs.sol"; + +contract ERC712ModuleV2Test is Test { + ERC712ModuleV2 private erc712Module; + address private signer; + uint256 private signerPk; + address private receiver; + bytes32 private eip712DomainHash; + bytes32 private constant DOMAIN_TYPE_HASH = + keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"); + bytes32 private constant TXN_TYPE_HASH = keccak256("Transaction(address from,address to,uint256 value)"); + + event ModuleRegistered(string name, string description, address moduleAddress); + + function setUp() public { + (signer, signerPk) = makeAddrAndKey("veraxSigner"); + address contractAddress = makeAddr("contract"); + receiver = makeAddr("receiver"); + EIP712Domain memory domain = EIP712Domain({ + name: "tester", + version: "1.0", + chainId: uint256(1234), + verifyingContract: contractAddress + }); + erc712Module = new ERC712ModuleV2(domain, signer, receiver); + + eip712DomainHash = keccak256( + abi.encode( + DOMAIN_TYPE_HASH, + keccak256(bytes(domain.name)), + keccak256(bytes(domain.version)), + domain.chainId, + domain.verifyingContract + ) + ); + + vm.deal(contractAddress, 1 ether); + } + + function test_ERC712Module_verifySuccess() public { + bytes32 hashStruct = keccak256(abi.encode(TXN_TYPE_HASH, signer, receiver, uint256(1234))); + bytes32 hash = keccak256(abi.encodePacked("\x19\x01", eip712DomainHash, hashStruct)); + + (uint8 v, bytes32 r, bytes32 s) = vm.sign(signerPk, hash); + bytes memory signature = abi.encode(v, r, s); + + AttestationPayload memory attestationPayload = AttestationPayload( + bytes32("12345678"), + 0, + bytes("subject"), + abi.encode(hash) + ); + erc712Module.run( + attestationPayload, + signature, + signer, + 0, + address(makeAddr("attester")), + address(makeAddr("portal")) + ); + } + + function test_ERC712Module_invalidSignature() public { + bytes32 hash = keccak256(abi.encode(signer, receiver, uint256(1234))); + + (uint8 v, bytes32 r, bytes32 s) = vm.sign(signerPk, hash); + bytes memory signature = abi.encode(v, r, s); + + address not_signer = makeAddr("not_origin_signer"); + AttestationPayload memory attestationPayload = AttestationPayload( + bytes32("12345678"), + 0, + bytes("subject"), + abi.encode(hash) + ); + vm.expectRevert(ERC712ModuleV2.InvalidSignature.selector); + erc712Module.run( + attestationPayload, + signature, + not_signer, + 0, + address(makeAddr("attester")), + address(makeAddr("portal")) + ); + } + + function test_ERC712Module_invalidSignatureByWrongHash() public { + bytes32 hash = keccak256(abi.encode(signer, receiver, uint256(1234))); + + (uint8 v, bytes32 r, bytes32 s) = vm.sign(signerPk, hash); + bytes memory signature = abi.encode(v, r, s); + + address not_signer = makeAddr("not_origin_signer"); + AttestationPayload memory attestationPayload = AttestationPayload( + bytes32("12345678"), + 0, + bytes("subject"), + abi.encode(bytes32("0000")) + ); + vm.expectRevert(ERC712ModuleV2.InvalidSignature.selector); + erc712Module.run( + attestationPayload, + signature, + not_signer, + 0, + address(makeAddr("attester")), + address(makeAddr("portal")) + ); + } + + function test_ERC712Module_supportsInterface() public view { + bool isAbstractModuleSupported = erc712Module.supportsInterface(type(AbstractModuleV2).interfaceId); + assertEq(isAbstractModuleSupported, true); + } +} diff --git a/contracts/test/examples/modules/MerkleProofModule.t.sol b/contracts/test/examples/modules/MerkleProofModule.t.sol index 2fe8bcbe..411043bf 100644 --- a/contracts/test/examples/modules/MerkleProofModule.t.sol +++ b/contracts/test/examples/modules/MerkleProofModule.t.sol @@ -67,7 +67,7 @@ contract MerkleProofModuleTest is Test { merkleProofModule.run(attestationPayload, proofData, user, 0); } - function test_MerkleProofModule_supportsInterface() public { + function test_MerkleProofModule_supportsInterface() public view { bool isAbstractModuleSupported = merkleProofModule.supportsInterface(type(AbstractModule).interfaceId); assertEq(isAbstractModuleSupported, true); } diff --git a/contracts/test/examples/modules/MerkleProofModuleV2.t.sol b/contracts/test/examples/modules/MerkleProofModuleV2.t.sol new file mode 100644 index 00000000..7a2e6f4a --- /dev/null +++ b/contracts/test/examples/modules/MerkleProofModuleV2.t.sol @@ -0,0 +1,88 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.21; + +import { Test } from "forge-std/Test.sol"; +import { AbstractModuleV2 } from "../../../src/abstracts/AbstractModuleV2.sol"; +import { MerkleProofModuleV2 } from "../../../src/examples/modules/MerkleProofModuleV2.sol"; +import { AttestationPayload } from "../../../src/types/Structs.sol"; +import { uncheckedInc256 } from "../../../src/Common.sol"; + +contract MerkleProofModuleV2Test is Test { + MerkleProofModuleV2 private merkleProofModule; + + event ModuleRegistered(string name, string description, address moduleAddress); + + function setUp() public { + merkleProofModule = new MerkleProofModuleV2(); + } + + function buildMerkleTree() private pure returns (bytes32[] memory) { + bytes32[] memory hashes = new bytes32[](7); + string[4] memory transactions = ["alice -> bob", "bob -> dave", "carol -> alice", "dave -> bob"]; + for (uint256 i = 0; i < transactions.length; i = uncheckedInc256(i)) { + hashes[i] = keccak256(abi.encodePacked(transactions[i])); + } + + uint256 n = transactions.length; + uint256 offset = 0; + uint256 current = n; + + while (n > 0) { + for (uint256 i = 0; i < n - 1; i += 2) { + hashes[current] = keccak256(abi.encodePacked(hashes[offset + i], hashes[offset + i + 1])); + current += 1; + } + offset += n; + n = n / 2; + } + return hashes; + } + + function test_MerkleProofModule_MerkleProofInvalidation() public { + bytes32[] memory hashes = buildMerkleTree(); + // Replace by an invalid root node. + hashes[hashes.length - 1] = bytes32("0"); + AttestationPayload memory attestationPayload = AttestationPayload( + bytes32("1234"), + 0, + abi.encode("attestee_id"), + bytes.concat(hashes[2]) + ); + address user = makeAddr("user"); + bytes memory proofData = abi.encode(hashes); + vm.expectRevert(MerkleProofModuleV2.MerkelProofVerifyFailed.selector); + merkleProofModule.run( + attestationPayload, + proofData, + user, + 0, + address(makeAddr("attester")), + address(makeAddr("portal")) + ); + } + + function test_MerkleProofModule_MerkleProofVerifySuccess() public { + bytes32[] memory hashes = buildMerkleTree(); + AttestationPayload memory attestationPayload = AttestationPayload( + bytes32("1234"), + 0, + abi.encode("attestee_id"), + bytes.concat(hashes[2]) + ); + address user = makeAddr("user"); + bytes memory proofData = abi.encode(hashes); + merkleProofModule.run( + attestationPayload, + proofData, + user, + 0, + address(makeAddr("attester")), + address(makeAddr("portal")) + ); + } + + function test_MerkleProofModule_supportsInterface() public view { + bool isAbstractModuleSupported = merkleProofModule.supportsInterface(type(AbstractModuleV2).interfaceId); + assertEq(isAbstractModuleSupported, true); + } +} diff --git a/contracts/test/examples/portals/EASPortal.t.sol b/contracts/test/examples/portals/EASPortal.t.sol index 5f9bff17..571418d1 100644 --- a/contracts/test/examples/portals/EASPortal.t.sol +++ b/contracts/test/examples/portals/EASPortal.t.sol @@ -7,7 +7,7 @@ import { Router } from "../../../src/Router.sol"; import { AbstractPortal } from "../../../src/abstracts/AbstractPortal.sol"; import { AttestationRegistryMock } from "../../mocks/AttestationRegistryMock.sol"; import { ModuleRegistryMock } from "../../mocks/ModuleRegistryMock.sol"; -import { ERC165Upgradeable } from "openzeppelin-contracts-upgradeable/contracts/utils/introspection/ERC165Upgradeable.sol"; +import { ERC165Upgradeable } from "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol"; contract EASPortalTest is Test { address public attester = makeAddr("attester"); @@ -150,7 +150,7 @@ contract EASPortalTest is Test { easPortal.bulkRevoke(attestationsToRevoke); } - function test_supportsInterface() public { + function test_supportsInterface() public view { bool isIERC165Supported = easPortal.supportsInterface(type(ERC165Upgradeable).interfaceId); assertEq(isIERC165Supported, true); bool isEASAbstractPortalSupported = easPortal.supportsInterface(type(AbstractPortal).interfaceId); diff --git a/contracts/test/examples/portals/NFTPortal.t.sol b/contracts/test/examples/portals/NFTPortal.t.sol index c586ad8b..ae2e52df 100644 --- a/contracts/test/examples/portals/NFTPortal.t.sol +++ b/contracts/test/examples/portals/NFTPortal.t.sol @@ -8,8 +8,8 @@ import { AbstractPortal } from "../../../src/abstracts/AbstractPortal.sol"; import { AttestationPayload } from "../../../src/types/Structs.sol"; import { AttestationRegistryMock } from "../../mocks/AttestationRegistryMock.sol"; import { ModuleRegistryMock } from "../../mocks/ModuleRegistryMock.sol"; -import { IERC721 } from "openzeppelin-contracts/contracts/token/ERC721/ERC721.sol"; -import { IERC165 } from "openzeppelin-contracts/contracts/utils/introspection/ERC165.sol"; +import { IERC721 } from "@openzeppelin/contracts/token/ERC721/ERC721.sol"; +import { IERC165 } from "@openzeppelin/contracts/utils/introspection/ERC165.sol"; contract NFTPortalTest is Test { address public attester = makeAddr("attester"); @@ -48,19 +48,19 @@ contract NFTPortalTest is Test { nftPortal.attest(attestationPayload, validationPayload); } - function test_balanceOf() public { + function test_balanceOf() public view { uint256 balance = nftPortal.balanceOf(address(1)); assertEq(balance, 2); } - function test_ownerOf() public { + function test_ownerOf() public view { address ownerOfFirstAttestation = nftPortal.ownerOf(1); address ownerOfSecondAttestation = nftPortal.ownerOf(2); assertEq(ownerOfFirstAttestation, address(1)); assertEq(ownerOfSecondAttestation, address(1)); } - function testSupportsInterface() public { + function testSupportsInterface() public view { bool isIERC165Supported = nftPortal.supportsInterface(type(IERC165).interfaceId); assertTrue(isIERC165Supported); bool isIERC721Supported = nftPortal.supportsInterface(type(IERC721).interfaceId); diff --git a/contracts/test/harness/AttestationRegistryHarness.sol b/contracts/test/harness/AttestationRegistryHarness.sol index 527a75be..85186dac 100644 --- a/contracts/test/harness/AttestationRegistryHarness.sol +++ b/contracts/test/harness/AttestationRegistryHarness.sol @@ -8,7 +8,7 @@ import { AttestationRegistry } from "../../src/AttestationRegistry.sol"; * @author Consensys * @notice A "harness" contract aims to expose internal functions of a tested contract * In this case, it exposes the `generateAttestationId` function of the AttestationRegistry contract - * @dev Foundry doc on harness contracts: https://book.getfoundry.sh/tutorials/best-practices#internal-functions + * @dev Foundry doc on harness src: https://book.getfoundry.sh/tutorials/best-practices#internal-functions */ contract AttestationRegistryHarness is AttestationRegistry { function exposed_generateAttestationId(uint256 id) external view returns (bytes32) { diff --git a/contracts/test/integration/IssuersPortalV2.t.sol b/contracts/test/integration/IssuersPortalV2.t.sol new file mode 100644 index 00000000..6750e22a --- /dev/null +++ b/contracts/test/integration/IssuersPortalV2.t.sol @@ -0,0 +1,145 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.21; + +import { Test, Vm } from "forge-std/Test.sol"; +import { Router } from "../../src/Router.sol"; +import { AttestationPayload } from "../../src/types/Structs.sol"; +import { AttestationRegistry } from "../../src/AttestationRegistry.sol"; +import { ModuleRegistry } from "../../src/ModuleRegistry.sol"; +import { SchemaRegistry } from "../../src/SchemaRegistry.sol"; +import { PortalRegistry } from "../../src/PortalRegistry.sol"; +import { IssuersModuleV2 } from "../../src/stdlib/IssuersModuleV2.sol"; +import { SenderModuleV2 } from "../../src/stdlib/SenderModuleV2.sol"; +import { DefaultPortal } from "../../src/DefaultPortal.sol"; + +contract IssuersPortalTest is Test { + address public issuerAddress = makeAddr("issuer"); + Router public router = new Router(); + SchemaRegistry public schemaRegistry = new SchemaRegistry(); + PortalRegistry public portalRegistry = new PortalRegistry(); + ModuleRegistry public moduleRegistry = new ModuleRegistry(); + AttestationRegistry public attestationRegistry = new AttestationRegistry(); + IssuersModuleV2 public issuersModule; + SenderModuleV2 public senderModule; + bytes32 public schemaId = bytes32(0); + DefaultPortal public issuersPortal; + + event Initialized(uint8 version); + event AttestationRegistered(bytes32 indexed attestationId); + event BulkAttestationsRegistered(); + + function setUp() public { + vm.startPrank(address(0)); + + router.initialize(); + router.updateSchemaRegistry(address(schemaRegistry)); + router.updatePortalRegistry(address(portalRegistry)); + router.updateModuleRegistry(address(moduleRegistry)); + router.updateAttestationRegistry(address(attestationRegistry)); + + schemaRegistry.updateRouter(address(router)); + portalRegistry.updateRouter(address(router)); + moduleRegistry.updateRouter(address(router)); + attestationRegistry.updateRouter(address(router)); + + issuersModule = new IssuersModuleV2(address(portalRegistry)); + senderModule = new SenderModuleV2(address(portalRegistry)); + + portalRegistry.setIssuer(address(0)); + portalRegistry.setIssuer(issuerAddress); + + moduleRegistry.register("IssuersModuleV2", "IssuersModule description", address(issuersModule)); + moduleRegistry.register("SenderModuleV2", "SenderModule description", address(senderModule)); + + schemaId = schemaRegistry.getIdFromSchemaString( + "(string name, string description, string logoURL, string[] keywords, string CTATitle, string CTALink)" + ); + schemaRegistry.createSchema( + "Issuer", + "Describes an Issuer for the Verax Attestation Registry", + "https://schema.org/Property", + "(string name, string description, string logoURL, string[] keywords, string CTATitle, string CTALink)" + ); + + address[] memory modules = new address[](2); + modules[0] = address(senderModule); + modules[1] = address(issuersModule); + + vm.recordLogs(); + portalRegistry.deployDefaultPortal(modules, "IssuersPortal", "IssuersPortal description", true, "Verax"); + Vm.Log[] memory entries = vm.getRecordedLogs(); + + // Get the address of the Portal that was just deployed and registered + (, , address portalAddress) = abi.decode(entries[0].data, (string, string, address)); + issuersPortal = DefaultPortal(portalAddress); + + address[] memory senders = new address[](1); + senders[0] = address(0); + bool[] memory statuses = new bool[](1); + statuses[0] = true; + + senderModule.setAuthorizedSenders(address(issuersPortal), senders, statuses); + + vm.stopPrank(); + } + + function test_attestV2() public { + string memory name = "Issuer name"; + string memory description = "Issuer name"; + string memory logoURL = "https://example.com/logo"; + string[] memory keywords = new string[](1); + keywords[0] = "Keyword 1"; + string memory CTATitle = "Issuer CTA"; + string memory CTALink = "https://example.com/cta"; + + AttestationPayload memory attestationPayload = AttestationPayload( + schemaId, + 0, + abi.encode(issuerAddress), + abi.encode(name, description, logoURL, keywords, CTATitle, CTALink) + ); + + bytes[] memory validationPayload = new bytes[](2); + validationPayload[0] = abi.encode(address(issuersPortal)); + + vm.prank(address(0), address(0)); + vm.expectEmit(address(attestationRegistry)); + emit AttestationRegistered(0x0000000000000000000000000000000000000000000000000000000000000001); + issuersPortal.attestV2(attestationPayload, validationPayload); + } + + function test_bulkAttestV2() public { + string memory name = "Issuer name"; + string memory description = "Issuer name"; + string memory logoURL = "https://example.com/logo"; + string[] memory keywords = new string[](1); + keywords[0] = "Keyword 1"; + string memory CTATitle = "Issuer CTA"; + string memory CTALink = "https://example.com/cta"; + + AttestationPayload memory attestationPayload = AttestationPayload( + schemaId, + 0, + abi.encode(issuerAddress), + abi.encode(name, description, logoURL, keywords, CTATitle, CTALink) + ); + + AttestationPayload[] memory attestationPayloads = new AttestationPayload[](2); + attestationPayloads[0] = attestationPayload; + attestationPayloads[1] = attestationPayload; + + bytes[] memory validationPayload = new bytes[](2); + validationPayload[0] = abi.encode(address(issuersPortal)); + + bytes[][] memory validationPayloads = new bytes[][](2); + validationPayloads[0] = validationPayload; + validationPayloads[1] = validationPayload; + + vm.startPrank(address(0), address(0)); + vm.expectEmit(address(attestationRegistry)); + emit AttestationRegistered(0x0000000000000000000000000000000000000000000000000000000000000001); + emit AttestationRegistered(0x0000000000000000000000000000000000000000000000000000000000000002); + issuersPortal.bulkAttestV2(attestationPayloads, validationPayloads); + vm.stopPrank(); + } +} diff --git a/contracts/test/mocks/CorrectModuleV2Mock.sol b/contracts/test/mocks/CorrectModuleV2Mock.sol new file mode 100644 index 00000000..ce4b2825 --- /dev/null +++ b/contracts/test/mocks/CorrectModuleV2Mock.sol @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.21; + +import { AbstractModuleV2 } from "../../src/abstracts/AbstractModuleV2.sol"; +import { AttestationPayload } from "../../src/types/Structs.sol"; + +/** + * @title Correct Module V2 + * @author Consensys + * @notice This contract illustrates a valid Module that follows the AbstractModule interface + */ +contract CorrectModuleV2 is AbstractModuleV2 { + /// @dev This empty method prevents Foundry from counting this contract in code coverage + function test() public {} + + /// @inheritdoc AbstractModuleV2 + function run( + AttestationPayload memory /*attestationPayload*/, + bytes memory /*validationPayload*/, + address /*initialCaller*/, + uint256 /*value*/, + address /*attester*/, + address /*portal*/ + ) public pure override {} +} diff --git a/contracts/test/mocks/IPortalImplementation.sol b/contracts/test/mocks/IPortalImplementation.sol index bc47b275..6c684389 100644 --- a/contracts/test/mocks/IPortalImplementation.sol +++ b/contracts/test/mocks/IPortalImplementation.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.21; import { IPortal } from "../../src/interfaces/IPortal.sol"; -import { IERC165 } from "openzeppelin-contracts/contracts/utils/introspection/ERC165.sol"; +import { IERC165 } from "@openzeppelin/contracts/utils/introspection/ERC165.sol"; contract IPortalImplementation is IPortal { function test() public {} diff --git a/contracts/test/mocks/IncorrectModuleMock.sol b/contracts/test/mocks/IncorrectModuleMock.sol index fc849a18..11533ab9 100644 --- a/contracts/test/mocks/IncorrectModuleMock.sol +++ b/contracts/test/mocks/IncorrectModuleMock.sol @@ -6,6 +6,4 @@ pragma solidity 0.8.21; * @author Consensys * @notice This contract illustrates an invalid Module that doesn't follow the AbstractModule interface */ -contract IncorrectModule { - -} +contract IncorrectModule {} diff --git a/contracts/test/stdlib/ECDSAModule.t.sol b/contracts/test/stdlib/ECDSAModule.t.sol index 1840bad0..b6db105c 100644 --- a/contracts/test/stdlib/ECDSAModule.t.sol +++ b/contracts/test/stdlib/ECDSAModule.t.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.21; import { Test } from "forge-std/Test.sol"; -import { ECDSA } from "openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol"; +import { ECDSA } from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import { ECDSAModule, AbstractModule } from "../../src/stdlib/ECDSAModule.sol"; import { AttestationPayload } from "../../src/types/Structs.sol"; diff --git a/contracts/test/stdlib/ECDSAModuleV2.t.sol b/contracts/test/stdlib/ECDSAModuleV2.t.sol new file mode 100644 index 00000000..b63bf9d1 --- /dev/null +++ b/contracts/test/stdlib/ECDSAModuleV2.t.sol @@ -0,0 +1,95 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.21; + +import { Test } from "forge-std/Test.sol"; +import { ECDSA } from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; + +import { ECDSAModuleV2, AbstractModuleV2 } from "../../src/stdlib/ECDSAModuleV2.sol"; +import { AttestationPayload } from "../../src/types/Structs.sol"; +import { PortalRegistryMock } from "../mocks/PortalRegistryMock.sol"; + +contract ECDSAModuleV2Test is Test { + using ECDSA for bytes32; + + ECDSAModuleV2 private ecdsaModule; + address private signer1; + uint256 private signerPk1; + address private signer2; + uint256 private signerPk2; + address private portal = makeAddr("portal"); + AttestationPayload private attestationPayload; + PortalRegistryMock private portalRegistry; + + address private portalOwner = makeAddr("portalOwner"); + address private user = makeAddr("user"); + uint256 private nonce = 1234567; + + address[] private signers = new address[](2); + bool[] private authorizationStatus = new bool[](2); + + event SignersAuthorized(address indexed portal, address[] signers, bool[] authorizationStatus); + + function setUp() public { + (signer1, signerPk1) = makeAddrAndKey("signer1"); + (signer2, signerPk2) = makeAddrAndKey("signer2"); + + signers[0] = signer1; + signers[1] = signer2; + + authorizationStatus[0] = true; + authorizationStatus[1] = true; + + vm.startPrank(portalOwner); + // add portal to mock registry + portalRegistry = new PortalRegistryMock(); + portalRegistry.register(address(portal), "portal", "portal", false, "portal"); + + ecdsaModule = new ECDSAModuleV2(address(portalRegistry)); + vm.stopPrank(); + } + + function test_setAuthorizedSigners() public { + vm.prank(portalOwner); + vm.expectEmit({ emitter: address(ecdsaModule) }); + emit SignersAuthorized(portal, signers, authorizationStatus); + ecdsaModule.setAuthorizedSigners(address(portal), signers, authorizationStatus); + } + + function test_setAuthorizedSigners_OnlyPortalOwner() public { + vm.prank(user); + vm.expectRevert(AbstractModuleV2.OnlyPortalOwner.selector); + ecdsaModule.setAuthorizedSigners(address(portal), signers, authorizationStatus); + } + + function test_setAuthorizedSigners_ArrayLengthMismatch() public { + vm.prank(portalOwner); + vm.expectRevert(ECDSAModuleV2.ArrayLengthMismatch.selector); + ecdsaModule.setAuthorizedSigners(address(portal), signers, new bool[](1)); + } + + function test_run() public { + vm.prank(portalOwner); + ecdsaModule.setAuthorizedSigners(address(portal), signers, authorizationStatus); + + AttestationPayload memory aPayload = AttestationPayload(bytes32("1"), 0, bytes(""), bytes("")); + bytes memory validationPayload = makeSignature(signerPk1, aPayload); + + vm.prank(portal); + ecdsaModule.run(aPayload, validationPayload, signer1, 0, address(makeAddr("attester")), portal); + } + + function test_run_SignerNotAuthorized() public { + AttestationPayload memory aPayload = AttestationPayload(bytes32("1"), 0, bytes(""), bytes("")); + bytes memory validationPayload = makeSignature(signerPk1, aPayload); + + vm.prank(portal); + vm.expectRevert(ECDSAModuleV2.SignerNotAuthorized.selector); + ecdsaModule.run(aPayload, validationPayload, signer1, 0, address(makeAddr("attester")), portal); + } + + function makeSignature(uint256 signerPk, AttestationPayload memory payload) private pure returns (bytes memory) { + bytes32 messageHash = keccak256(abi.encode(payload)).toEthSignedMessageHash(); + (uint8 v, bytes32 r, bytes32 s) = vm.sign(signerPk, messageHash); + return abi.encodePacked(r, s, v); + } +} diff --git a/contracts/test/stdlib/ERC1271Module.t.sol b/contracts/test/stdlib/ERC1271Module.t.sol index a0cfaae1..f3702290 100644 --- a/contracts/test/stdlib/ERC1271Module.t.sol +++ b/contracts/test/stdlib/ERC1271Module.t.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.21; import { Test } from "forge-std/Test.sol"; -import { ECDSA } from "openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol"; +import { ECDSA } from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import { ERC1271Module, AbstractModule } from "../../src/stdlib/ERC1271Module.sol"; import { AttestationPayload } from "../../src/types/Structs.sol"; diff --git a/contracts/test/stdlib/ERC1271ModuleV2.t.sol b/contracts/test/stdlib/ERC1271ModuleV2.t.sol new file mode 100644 index 00000000..2aac97af --- /dev/null +++ b/contracts/test/stdlib/ERC1271ModuleV2.t.sol @@ -0,0 +1,102 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.21; + +import { Test } from "forge-std/Test.sol"; +import { ECDSA } from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; + +import { ERC1271ModuleV2, AbstractModuleV2 } from "../../src/stdlib/ERC1271ModuleV2.sol"; +import { AttestationPayload } from "../../src/types/Structs.sol"; +import { PortalRegistryMock } from "../mocks/PortalRegistryMock.sol"; + +contract ERC1271ModuleV2Test is Test { + using ECDSA for bytes32; + + ERC1271ModuleV2 private erc1271Module; + address private signer1; + uint256 private signerPk1; + address private signer2; + uint256 private signerPk2; + address private portal = makeAddr("portal"); + AttestationPayload private attestationPayload; + PortalRegistryMock private portalRegistry; + + address private portalOwner = makeAddr("portalOwner"); + address private user = makeAddr("user"); + uint256 private nonce = 1234567; + + address[] private signers = new address[](2); + bool[] private authorizationStatus = new bool[](2); + + event SignersAuthorized(address indexed portal, address[] signers, bool[] authorizationStatus); + + function setUp() public { + (signer1, signerPk1) = makeAddrAndKey("signer1"); + (signer2, signerPk2) = makeAddrAndKey("signer2"); + + signers[0] = signer1; + signers[1] = signer2; + + authorizationStatus[0] = true; + authorizationStatus[1] = false; + + vm.startPrank(portalOwner); + // add portal to mock registry + portalRegistry = new PortalRegistryMock(); + portalRegistry.register(address(portal), "portal", "portal", false, "portal"); + + erc1271Module = new ERC1271ModuleV2(address(portalRegistry)); + vm.stopPrank(); + } + + function test_setAuthorizedSigners() public { + vm.prank(portalOwner); + vm.expectEmit({ emitter: address(erc1271Module) }); + emit SignersAuthorized(portal, signers, authorizationStatus); + erc1271Module.setAuthorizedSigners(address(portal), signers, authorizationStatus); + } + + function test_setAuthorizedSigners_OnlyPortalOwner() public { + vm.prank(user); + vm.expectRevert(AbstractModuleV2.OnlyPortalOwner.selector); + erc1271Module.setAuthorizedSigners(address(portal), signers, authorizationStatus); + } + + function test_setAuthorizedSigners_ArrayLengthMismatch() public { + vm.prank(portalOwner); + vm.expectRevert(ERC1271ModuleV2.ArrayLengthMismatch.selector); + erc1271Module.setAuthorizedSigners(address(portal), signers, new bool[](1)); + } + + function test_run() public { + vm.prank(portalOwner); + erc1271Module.setAuthorizedSigners(portal, signers, authorizationStatus); + attestationPayload = AttestationPayload(bytes32(uint256(1234)), 0, abi.encode(user), ""); + + bytes32 hash = createMessageHash(attestationPayload); + (uint8 v, bytes32 r, bytes32 s) = vm.sign(signerPk1, hash); + + bytes memory signature = abi.encodePacked(r, s, v); + + vm.prank(portal); + erc1271Module.run(attestationPayload, signature, signer1, 0, address(makeAddr("attester")), portal); + } + + function test_run_SignerNotAuthorized() public { + vm.prank(portalOwner); + erc1271Module.setAuthorizedSigners(portal, signers, authorizationStatus); + attestationPayload = AttestationPayload(bytes32(uint256(1234)), 0, abi.encode(user), ""); + + bytes32 hash = createMessageHash(attestationPayload); + (uint8 v, bytes32 r, bytes32 s) = vm.sign(signerPk2, hash); + + bytes memory signature = abi.encodePacked(r, s, v); + + vm.prank(portal); + vm.expectRevert(ERC1271ModuleV2.SignerNotAuthorized.selector); + erc1271Module.run(attestationPayload, signature, signer2, 0, address(makeAddr("attester")), portal); + } + + function createMessageHash(AttestationPayload memory payload) internal pure returns (bytes32) { + return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", keccak256(abi.encode(payload)))); + } +} diff --git a/contracts/test/stdlib/FeeModuleV2.t.sol b/contracts/test/stdlib/FeeModuleV2.t.sol new file mode 100644 index 00000000..80cfe534 --- /dev/null +++ b/contracts/test/stdlib/FeeModuleV2.t.sol @@ -0,0 +1,90 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.21; + +import { Test } from "forge-std/Test.sol"; +import { FeeModuleV2, AbstractModuleV2 } from "../../src/stdlib/FeeModuleV2.sol"; +import { AttestationPayload } from "../../src/types/Structs.sol"; +import { PortalRegistryMock } from "../mocks/PortalRegistryMock.sol"; + +contract FeeModuleV2Test is Test { + FeeModuleV2 private feeModule; + PortalRegistryMock private portalRegistry; + AttestationPayload private attestationPayload; + + address private portal = makeAddr("portal"); + address private user1 = makeAddr("user1"); + address private user2 = makeAddr("user2"); + + bytes32[] private schemaIds; + uint256[] private attestationFees; + + event FeesSet(address portal, bytes32[] schemaIds, uint256[] attestationFees); + + function setUp() public { + vm.startPrank(user1); + // Initialize your FeeModule and AttestationPayload here + portalRegistry = new PortalRegistryMock(); + feeModule = new FeeModuleV2(address(portalRegistry)); + + // register portal + portalRegistry.register(address(portal), "portal", "portal", false, "portal"); + + schemaIds = new bytes32[](2); + schemaIds[0] = bytes32("schema1"); + schemaIds[1] = bytes32("schema2"); + + attestationFees = new uint256[](2); + attestationFees[0] = 1; + attestationFees[1] = 2; + } + + function test_setFees() public { + vm.expectEmit({ emitter: address(feeModule) }); + emit FeesSet(portal, schemaIds, attestationFees); + feeModule.setFees(portal, schemaIds, attestationFees); + } + + function test_setFees_ArrayLengthMismatch() public { + vm.expectRevert(FeeModuleV2.ArrayLengthMismatch.selector); + feeModule.setFees(portal, new bytes32[](1), new uint256[](2)); + } + + function test_setFees_OnlyPortalOwner() public { + vm.startPrank(user2); + vm.expectRevert(AbstractModuleV2.OnlyPortalOwner.selector); + feeModule.setFees(portal, schemaIds, attestationFees); + vm.stopPrank(); + } + + function test_run_TwoPortals() public { + address portal2 = makeAddr("portal2"); + vm.startPrank(user2); + portalRegistry.register(address(portal2), "portal2", "portal2", false, "portal2"); + + // Set fees for both portals + vm.startPrank(user1); + feeModule.setFees(portal, schemaIds, attestationFees); + vm.startPrank(user2); + feeModule.setFees(portal2, schemaIds, attestationFees); + vm.stopPrank(); + + // Test with sufficient fees + vm.startPrank(portal); + AttestationPayload memory attestationPayload1 = AttestationPayload(schemaIds[0], 0, new bytes(0), new bytes(0)); + feeModule.run(attestationPayload1, new bytes(0), user1, attestationFees[0], address(makeAddr("attester")), portal); + + // Test with insufficient fees + vm.startPrank(portal2); + AttestationPayload memory attestationPayload2 = AttestationPayload(schemaIds[1], 0, new bytes(0), new bytes(0)); + vm.expectRevert(FeeModuleV2.InvalidAttestationFee.selector); + feeModule.run(attestationPayload2, new bytes(0), user1, 0, address(makeAddr("attester")), portal); + } + + function test_run_InvalidAttestationFee() public { + feeModule.setFees(portal, schemaIds, attestationFees); + AttestationPayload memory payload = AttestationPayload(schemaIds[0], 0, new bytes(0), new bytes(0)); + vm.expectRevert(FeeModuleV2.InvalidAttestationFee.selector); + vm.startPrank(portal); + feeModule.run(payload, new bytes(0), user1, 0, address(makeAddr("attester")), portal); + } +} diff --git a/contracts/test/stdlib/IndexerModule.t.sol b/contracts/test/stdlib/IndexerModule.t.sol index d4c7ecd3..2a3c3dad 100644 --- a/contracts/test/stdlib/IndexerModule.t.sol +++ b/contracts/test/stdlib/IndexerModule.t.sol @@ -2,7 +2,7 @@ pragma solidity 0.8.21; import { Test } from "forge-std/Test.sol"; -import { ECDSA } from "openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol"; +import { ECDSA } from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import { IndexerModule } from "../../src/stdlib/IndexerModule.sol"; import { AttestationPayload } from "../../src/types/Structs.sol"; @@ -95,12 +95,12 @@ contract IndexerModuleTest is Test { assertEq(attestationIds.length, 2); } - function test_getAttestationIdsBySubject() public { + function test_getAttestationIdsBySubject() public view { bytes32[] memory attestationIds = indexerModule.getAttestationIdsBySubject(payload1.subject); assertEq(attestationIds[0], bytes32(abi.encode(1))); } - function test_getAttestationIdsBySubjectBySchema() public { + function test_getAttestationIdsBySubjectBySchema() public view { bytes32[] memory attestationIds = indexerModule.getAttestationIdsBySubjectBySchema( payload1.subject, payload1.schemaId @@ -108,27 +108,27 @@ contract IndexerModuleTest is Test { assertEq(attestationIds[0], bytes32(abi.encode(1))); } - function test_getAttestationIdsByAttester() public { + function test_getAttestationIdsByAttester() public view { bytes32[] memory attestationIds = indexerModule.getAttestationIdsByAttester(user); assertEq(attestationIds[0], bytes32(abi.encode(1))); } - function test_getAttestationIdsBySchema() public { + function test_getAttestationIdsBySchema() public view { bytes32[] memory attestationIds = indexerModule.getAttestationIdsBySchema(payload1.schemaId); assertEq(attestationIds[0], bytes32(abi.encode(1))); } - function test_getAttestationIdsByPortal() public { + function test_getAttestationIdsByPortal() public view { bytes32[] memory attestationIds = indexerModule.getAttestationIdsByPortal(portalOwner); assertEq(attestationIds[0], bytes32(abi.encode(1))); } - function test_getAttestationByPortalBySubject() public { + function test_getAttestationByPortalBySubject() public view { bytes32[] memory attestationIds = indexerModule.getAttestationIdsByPortalBySubject(portalOwner, payload1.subject); assertEq(attestationIds[0], bytes32(abi.encode(1))); } - function test_getIndexedAttestationStatus() public { + function test_getIndexedAttestationStatus() public view { bool status = indexerModule.getIndexedAttestationStatus(bytes32(abi.encode(1))); assertEq(status, true); } diff --git a/contracts/test/stdlib/IndexerModuleV2.t.sol b/contracts/test/stdlib/IndexerModuleV2.t.sol new file mode 100644 index 00000000..cd591f59 --- /dev/null +++ b/contracts/test/stdlib/IndexerModuleV2.t.sol @@ -0,0 +1,135 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.21; + +import { Test } from "forge-std/Test.sol"; +import { ECDSA } from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; + +import { IndexerModuleV2 } from "../../src/stdlib/IndexerModuleV2.sol"; +import { AttestationPayload } from "../../src/types/Structs.sol"; +import { PortalRegistryMock } from "../mocks/PortalRegistryMock.sol"; +import { AttestationRegistryMock } from "../mocks/AttestationRegistryMock.sol"; +import { SchemaRegistryMock } from "../mocks/SchemaRegistryMock.sol"; +import { Router } from "../../src/Router.sol"; +import { ValidPortalMock } from "../mocks/ValidPortalMock.sol"; + +contract IndexerModuleV2Test is Test { + using ECDSA for bytes32; + + IndexerModuleV2 private indexerModule; + AttestationPayload private attestationPayload; + PortalRegistryMock private portalRegistry; + AttestationRegistryMock private attestationRegistry; + SchemaRegistryMock private schemaRegistry; + Router private router; + + address private user = makeAddr("user"); + address private portal = makeAddr("portal"); + address private portalOwner = makeAddr("portalOwner"); + + AttestationPayload private payload1; + AttestationPayload private payload2; + AttestationPayload private payload3; + + event AttestationIndexed(bytes32 attestationId); + + function setUp() public { + vm.startPrank(portalOwner); + // add portal to mock registry + portalRegistry = new PortalRegistryMock(); + portalRegistry.register(address(portal), "portal", "portal", false, "portal"); + + attestationRegistry = new AttestationRegistryMock(); + + router = new Router(); + router.initialize(); + router.updatePortalRegistry(address(portalRegistry)); + router.updateAttestationRegistry(address(attestationRegistry)); + router.updateSchemaRegistry(address(schemaRegistry)); + + payload1 = AttestationPayload(bytes32("1"), 0, bytes(""), bytes("")); + payload2 = AttestationPayload(bytes32("1"), 0, bytes(""), bytes("")); + payload3 = AttestationPayload(bytes32("2"), 0, bytes(""), bytes("")); + + attestationRegistry.attest(payload1, user); + attestationRegistry.attest(payload2, user); + + indexerModule = new IndexerModuleV2(address(router)); + + indexerModule.indexAttestation(bytes32(abi.encode(1))); + + vm.stopPrank(); + } + + function test_run() public { + address[] memory modules = new address[](0); + ValidPortalMock validPortal = new ValidPortalMock(modules, address(router)); + vm.prank(address(validPortal)); + vm.expectEmit({ emitter: address(indexerModule) }); + emit AttestationIndexed(bytes32(abi.encode(3))); + indexerModule.run(payload3, bytes(""), address(0), 0, address(makeAddr("attester")), address(validPortal)); + assertEq(indexerModule.getIndexedAttestationStatus(bytes32(abi.encode(3))), true); + } + + function test_indexAttestation() public { + vm.expectEmit({ emitter: address(indexerModule) }); + emit AttestationIndexed(bytes32(abi.encode(2))); + indexerModule.indexAttestation(bytes32(abi.encode(2))); + } + + function test_indexAttestations() public { + bytes32[] memory attestationIds = new bytes32[](2); + attestationIds[0] = bytes32(abi.encode(1)); + attestationIds[1] = bytes32(abi.encode(2)); + indexerModule.indexAttestations(attestationIds); + assertEq(indexerModule.getIndexedAttestationStatus(attestationIds[0]), true); + assertEq(indexerModule.getIndexedAttestationStatus(attestationIds[1]), true); + } + + function test_indexAttestation_CannotBeIndexedTwice() public { + vm.expectEmit({ emitter: address(indexerModule) }); + emit AttestationIndexed(bytes32(abi.encode(2))); + indexerModule.indexAttestation(bytes32(abi.encode(2))); + indexerModule.indexAttestation(bytes32(abi.encode(2))); + + bytes32[] memory attestationIds = indexerModule.getAttestationIdsBySubject(payload1.subject); + assertEq(attestationIds.length, 2); + } + + function test_getAttestationIdsBySubject() public view { + bytes32[] memory attestationIds = indexerModule.getAttestationIdsBySubject(payload1.subject); + assertEq(attestationIds[0], bytes32(abi.encode(1))); + } + + function test_getAttestationIdsBySubjectBySchema() public view { + bytes32[] memory attestationIds = indexerModule.getAttestationIdsBySubjectBySchema( + payload1.subject, + payload1.schemaId + ); + assertEq(attestationIds[0], bytes32(abi.encode(1))); + } + + function test_getAttestationIdsByAttester() public view { + bytes32[] memory attestationIds = indexerModule.getAttestationIdsByAttester(user); + assertEq(attestationIds[0], bytes32(abi.encode(1))); + } + + function test_getAttestationIdsBySchema() public view { + bytes32[] memory attestationIds = indexerModule.getAttestationIdsBySchema(payload1.schemaId); + assertEq(attestationIds[0], bytes32(abi.encode(1))); + } + + function test_getAttestationIdsByPortal() public view { + bytes32[] memory attestationIds = indexerModule.getAttestationIdsByPortal(portalOwner); + assertEq(attestationIds[0], bytes32(abi.encode(1))); + } + + function test_getAttestationByPortalBySubject() public view { + bytes32[] memory attestationIds = indexerModule.getAttestationIdsByPortalBySubject(portalOwner, payload1.subject); + assertEq(attestationIds[0], bytes32(abi.encode(1))); + } + + function test_getIndexedAttestationStatus() public view { + bool status = indexerModule.getIndexedAttestationStatus(bytes32(abi.encode(1))); + assertEq(status, true); + } +} diff --git a/contracts/test/stdlib/IssuersModule.t.sol b/contracts/test/stdlib/IssuersModule.t.sol index 0a7f8c37..4411c05b 100644 --- a/contracts/test/stdlib/IssuersModule.t.sol +++ b/contracts/test/stdlib/IssuersModule.t.sol @@ -23,7 +23,7 @@ contract IssuersModuleTest is Test { vm.stopPrank(); } - function test_setup() public { + function test_setup() public view { assertEq(portalRegistry.isIssuer(issuerAddress), true); } diff --git a/contracts/test/stdlib/IssuersModuleV2.t.sol b/contracts/test/stdlib/IssuersModuleV2.t.sol new file mode 100644 index 00000000..e820755a --- /dev/null +++ b/contracts/test/stdlib/IssuersModuleV2.t.sol @@ -0,0 +1,72 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.21; + +import { Test } from "forge-std/Test.sol"; +import { IssuersModuleV2 } from "../../../src/stdlib/IssuersModuleV2.sol"; +import { AttestationPayload } from "../../../src/types/Structs.sol"; +import { PortalRegistryMock } from "../mocks/PortalRegistryMock.sol"; + +contract IssuersModuleV2Test is Test { + IssuersModuleV2 private issuersModule; + PortalRegistryMock private portalRegistry; + + address private issuerAddress = makeAddr("issuer"); + address private portal = makeAddr("portal"); + + function setUp() public { + vm.startPrank(address(0)); + + portalRegistry = new PortalRegistryMock(); + issuersModule = new IssuersModuleV2(address(portalRegistry)); + + portalRegistry.setIssuer(issuerAddress); + + vm.stopPrank(); + } + + function test_setup() public view { + assertEq(portalRegistry.isIssuer(issuerAddress), true); + } + + function test_run_encodedSubject() public { + AttestationPayload memory attestationPayload = AttestationPayload( + bytes32("schema1"), + 0, + abi.encode(issuerAddress), + new bytes(0) + ); + issuersModule.run(attestationPayload, "", makeAddr("sender"), 0, address(makeAddr("attester")), portal); + } + + function test_run_rawSubject() public { + AttestationPayload memory attestationPayload = AttestationPayload( + bytes32("schema1"), + 0, + abi.encodePacked(issuerAddress), + new bytes(0) + ); + issuersModule.run(attestationPayload, "", makeAddr("sender"), 0, address(makeAddr("attester")), portal); + } + + function test_run_unauthorized_encodedSubject() public { + AttestationPayload memory attestationPayload = AttestationPayload( + bytes32("schema1"), + 0, + abi.encode(makeAddr("user")), + new bytes(0) + ); + vm.expectRevert(IssuersModuleV2.UnauthorizedSubject.selector); + issuersModule.run(attestationPayload, "", makeAddr("sender"), 0, address(makeAddr("attester")), portal); + } + + function test_run_unauthorized_rawSubject() public { + AttestationPayload memory attestationPayload = AttestationPayload( + bytes32("schema1"), + 0, + abi.encodePacked(makeAddr("user")), + new bytes(0) + ); + vm.expectRevert(IssuersModuleV2.UnauthorizedSubject.selector); + issuersModule.run(attestationPayload, "", makeAddr("sender"), 0, address(makeAddr("attester")), portal); + } +} diff --git a/contracts/test/stdlib/SchemaModuleV2.t.sol b/contracts/test/stdlib/SchemaModuleV2.t.sol new file mode 100644 index 00000000..158065dd --- /dev/null +++ b/contracts/test/stdlib/SchemaModuleV2.t.sol @@ -0,0 +1,85 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.21; + +import { Test } from "forge-std/Test.sol"; +import { SchemaModuleV2, AbstractModuleV2 } from "../../src/stdlib/SchemaModuleV2.sol"; +import { AttestationPayload } from "../../src/types/Structs.sol"; +import { PortalRegistryMock } from "../mocks/PortalRegistryMock.sol"; + +contract SchemaModuleV2Test is Test { + SchemaModuleV2 private schemaModule; + AttestationPayload private attestationPayload; + PortalRegistryMock private portalRegistry; + + address private portalOwner = makeAddr("portalOwner"); + address private portal = makeAddr("portal"); + + bytes32[] private schemaIds; + bool[] private authorizedStatus; + + function setUp() public { + vm.startPrank(portalOwner); + + portalRegistry = new PortalRegistryMock(); + schemaModule = new SchemaModuleV2(address(portalRegistry)); + + attestationPayload = AttestationPayload(bytes32("schema1"), 0, new bytes(0), new bytes(0)); + + portalRegistry.register(address(portal), "portal", "portal", false, "portal"); + + schemaIds = new bytes32[](2); + schemaIds[0] = bytes32("schema1"); + schemaIds[1] = bytes32("schema2"); + + authorizedStatus = new bool[](2); + authorizedStatus[0] = true; + authorizedStatus[1] = false; + vm.stopPrank(); + } + + function test_setAuthorizedSchemaIds() public { + vm.prank(portalOwner); + schemaModule.setAuthorizedSchemaIds(portal, schemaIds, authorizedStatus); + assertTrue(schemaModule.authorizedSchemaIds(portal, schemaIds[0])); + assertFalse(schemaModule.authorizedSchemaIds(portal, schemaIds[1])); + } + + function test_setAuthorizedSchemaIds_ArrayLengthMismatch() public { + vm.prank(portalOwner); + vm.expectRevert(SchemaModuleV2.ArrayLengthMismatch.selector); + schemaModule.setAuthorizedSchemaIds(portal, new bytes32[](1), new bool[](2)); + } + + function test_setAuthorizedSchemaIds_OnlyPortalOwner() public { + vm.startPrank(makeAddr("not portal owner")); + vm.expectRevert(AbstractModuleV2.OnlyPortalOwner.selector); + schemaModule.setAuthorizedSchemaIds(portal, schemaIds, authorizedStatus); + vm.stopPrank(); + } + + function test_run() public { + vm.prank(portalOwner); + schemaModule.setAuthorizedSchemaIds(portal, schemaIds, authorizedStatus); + schemaModule.run( + attestationPayload, + new bytes(0), + address(makeAddr("initialCaller")), + 0, + address(makeAddr("attester")), + portal + ); + } + + function test_run_SchemaNotAuthorized() public { + attestationPayload.schemaId = bytes32("schema3"); + vm.expectRevert(SchemaModuleV2.SchemaNotAuthorized.selector); + schemaModule.run( + attestationPayload, + new bytes(0), + address(makeAddr("initialCaller")), + 0, + address(makeAddr("attester")), + portal + ); + } +} diff --git a/contracts/test/stdlib/SenderModuleV2.t.sol b/contracts/test/stdlib/SenderModuleV2.t.sol new file mode 100644 index 00000000..4cc55c4b --- /dev/null +++ b/contracts/test/stdlib/SenderModuleV2.t.sol @@ -0,0 +1,90 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.21; + +import { Test } from "forge-std/Test.sol"; +import { SenderModuleV2, AbstractModuleV2 } from "../../src/stdlib/SenderModuleV2.sol"; +import { AttestationPayload } from "../../src/types/Structs.sol"; +import { PortalRegistryMock } from "../mocks/PortalRegistryMock.sol"; + +contract SenderModuleV2Test is Test { + SenderModuleV2 private senderModule; + AttestationPayload private attestationPayload; + PortalRegistryMock private portalRegistry; + + address private portalOwner = makeAddr("portalOwner"); + address private authorizedSender = makeAddr("user1"); + address private notAuthorizedSender = makeAddr("user2"); + address private portal = makeAddr("portal"); + + address[] private senders; + bool[] private authorizedStatus; + + function setUp() public { + vm.startPrank(portalOwner); + + portalRegistry = new PortalRegistryMock(); + senderModule = new SenderModuleV2(address(portalRegistry)); + + attestationPayload = AttestationPayload(bytes32("schema1"), 0, new bytes(0), new bytes(0)); + + portalRegistry.register(address(portal), "portal", "portal", false, "portal"); + + senders = new address[](2); + senders[0] = authorizedSender; + senders[1] = notAuthorizedSender; + + authorizedStatus = new bool[](2); + authorizedStatus[0] = true; + authorizedStatus[1] = false; + + vm.stopPrank(); + } + + function test_setAuthorizedSenders() public { + vm.prank(portalOwner); + senderModule.setAuthorizedSenders(portal, senders, authorizedStatus); + assertTrue(senderModule.authorizedSenders(portal, authorizedSender)); + assertFalse(senderModule.authorizedSenders(portal, notAuthorizedSender)); + } + + function test_setAuthorizedSenders_ArrayLengthMismatch() public { + bool[] memory wrongLengthStatus = new bool[](1); + vm.prank(portalOwner); + vm.expectRevert(SenderModuleV2.ArrayLengthMismatch.selector); + senderModule.setAuthorizedSenders(portal, senders, wrongLengthStatus); + } + + function test_setAuthorizedSenders_OnlyPortalOwner() public { + vm.startPrank(makeAddr("not portal owner")); + vm.expectRevert(AbstractModuleV2.OnlyPortalOwner.selector); + senderModule.setAuthorizedSenders(portal, senders, authorizedStatus); + vm.stopPrank(); + } + + function test_run() public { + vm.prank(portalOwner); + senderModule.setAuthorizedSenders(portal, senders, authorizedStatus); + senderModule.run( + attestationPayload, + abi.encode(address(portal)), + authorizedSender, + 0, + address(makeAddr("attester")), + address(portal) + ); + } + + function test_run_UnauthorizedSender() public { + vm.prank(portalOwner); + senderModule.setAuthorizedSenders(portal, senders, authorizedStatus); + vm.expectRevert(SenderModuleV2.UnauthorizedSender.selector); + senderModule.run( + attestationPayload, + abi.encode(address(portal)), + notAuthorizedSender, + 0, + address(makeAddr("attester")), + address(portal) + ); + } +} diff --git a/explorer/.eslintrc.cjs b/explorer/.eslintrc.cjs index 2484e49f..61b6fec2 100644 --- a/explorer/.eslintrc.cjs +++ b/explorer/.eslintrc.cjs @@ -5,7 +5,6 @@ module.exports = { 'eslint:recommended', 'plugin:@typescript-eslint/recommended', 'plugin:react-hooks/recommended', - 'plugin:prettier/recommended', 'plugin:import/recommended', 'plugin:import/typescript', ], diff --git a/explorer/package.json b/explorer/package.json index a2960477..6736fdb7 100644 --- a/explorer/package.json +++ b/explorer/package.json @@ -26,12 +26,12 @@ "dependencies": { "@radix-ui/react-dropdown-menu": "^2.0.6", "@tanstack/react-table": "^8.10.7", - "@verax-attestation-registry/verax-sdk": "1.0.2", + "@verax-attestation-registry/verax-sdk": "1.7.1", "@wagmi/core": "^1.4.7", "abitype": "^0.10.3", "class-variance-authority": "^0.7.0", "clsx": "^2.0.0", - "connectkit": "^1.5.3", + "connectkit": "1.5.3", "framer-motion": "^10.16.12", "i18next": "^23.7.8", "lucide-react": "^0.292.0", @@ -46,9 +46,9 @@ "tailwind-merge": "^2.0.0", "tailwindcss-animate": "^1.0.7", "usehooks-ts": "^2.9.1", - "viem": "^1.18.9", + "viem": "1.18.9", "vite-tsconfig-paths": "^4.2.1", - "wagmi": "^1.4.6" + "wagmi": "1.4.6" }, "devDependencies": { "@types/node": "^20.9.2", @@ -70,8 +70,8 @@ "postcss": "^8.4.31", "prettier": "^3.1.0", "tailwindcss": "^3.3.5", - "typescript": "^5.2.2", - "vite": "^4.5.1", + "typescript": "5.2.2", + "vite": "^4.5.3", "vite-plugin-radar": "^0.9.1", "vite-plugin-svgr": "^4.2.0" } diff --git a/explorer/src/assets/issuers/aspecta.svg b/explorer/src/assets/issuers/aspecta.svg new file mode 100644 index 00000000..5c772072 --- /dev/null +++ b/explorer/src/assets/issuers/aspecta.svg @@ -0,0 +1,45 @@ + + + + + + + diff --git a/explorer/src/assets/issuers/automata.svg b/explorer/src/assets/issuers/automata.svg new file mode 100644 index 00000000..60221ceb --- /dev/null +++ b/explorer/src/assets/issuers/automata.svg @@ -0,0 +1,21 @@ + + + + + + + + + diff --git a/explorer/src/assets/issuers/reclaim.svg b/explorer/src/assets/issuers/reclaim.svg new file mode 100644 index 00000000..6c7d490c --- /dev/null +++ b/explorer/src/assets/issuers/reclaim.svg @@ -0,0 +1,44 @@ + + + + + + diff --git a/explorer/src/assets/issuers/rubyscore.svg b/explorer/src/assets/issuers/rubyscore.svg new file mode 100644 index 00000000..d8dde47f --- /dev/null +++ b/explorer/src/assets/issuers/rubyscore.svg @@ -0,0 +1,1111 @@ + + + + + diff --git a/explorer/src/assets/locales/en/en.json b/explorer/src/assets/locales/en/en.json index 3987824e..84c29790 100644 --- a/explorer/src/assets/locales/en/en.json +++ b/explorer/src/assets/locales/en/en.json @@ -16,7 +16,8 @@ "previous": "Previous", "next": "Next", "learnMore": "Learn More", - "getStarted": "Get Started" + "getStarted": "Get Started", + "viewMyAttestations": "View My Attestations" }, "messages": { "empty": "Empty", @@ -25,7 +26,8 @@ "noResults": "No Results", "hasntBeenFound": "hasn`t been found", "searchNotFound": "Nothing found on “{{search}}” search request", - "searchFound": "{{count}} results found on “{{search}}” search request" + "searchFound": "{{count}} results found on “{{search}}” search request", + "perPage": "per page" }, "routes": { "issuers": "Issuers", @@ -35,6 +37,8 @@ "info": { "title": "Info", "about": "About", + "twitter": "Twitter", + "lens": "Lens", "github": "Github", "documentation": "Documentation" } @@ -52,7 +56,7 @@ "home": { "title": "Your Reputation Under Your Control", "description": "Explore the ecosystem to find out how you can unlock your data from across the web and share it with the world on your own terms", - "exploreEcosystem": "or explore the ecosystem", + "exploreEcosystem": "or explore the ecosystem...", "info": { "issueYourAttestation": "Want to issue your own attestation?", "aboutVerax": "Want to know more about Verax?" @@ -140,6 +144,14 @@ "title": "Revokable", "yes": "Yes", "no": "No" + }, + "list": { + "title": "Explore Portals", + "columns": { + "name": "Portal Name", + "description": "Portal Description", + "owner": "Owner Address" + } } } } diff --git a/explorer/src/assets/logo/beta-dark.svg b/explorer/src/assets/logo/beta-dark.svg new file mode 100644 index 00000000..5c18ac65 --- /dev/null +++ b/explorer/src/assets/logo/beta-dark.svg @@ -0,0 +1,7 @@ + + + + diff --git a/explorer/src/assets/logo/beta-light-strong.svg b/explorer/src/assets/logo/beta-light-strong.svg new file mode 100644 index 00000000..4932a70d --- /dev/null +++ b/explorer/src/assets/logo/beta-light-strong.svg @@ -0,0 +1,7 @@ + + + + diff --git a/explorer/src/assets/logo/beta-light.svg b/explorer/src/assets/logo/beta-light.svg new file mode 100644 index 00000000..a8c8ac4b --- /dev/null +++ b/explorer/src/assets/logo/beta-light.svg @@ -0,0 +1,7 @@ + + + + diff --git a/explorer/src/assets/logo/verax-logo-dark-mode.svg b/explorer/src/assets/logo/verax-logo-dark-mode.svg deleted file mode 100644 index 8a904026..00000000 --- a/explorer/src/assets/logo/verax-logo-dark-mode.svg +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/explorer/src/assets/logo/verax-logo-dark.svg b/explorer/src/assets/logo/verax-logo-dark.svg new file mode 100644 index 00000000..532bc3db --- /dev/null +++ b/explorer/src/assets/logo/verax-logo-dark.svg @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/explorer/src/assets/logo/verax-logo-grey.svg b/explorer/src/assets/logo/verax-logo-grey-light.svg similarity index 100% rename from explorer/src/assets/logo/verax-logo-grey.svg rename to explorer/src/assets/logo/verax-logo-grey-light.svg diff --git a/explorer/src/assets/logo/verax-logo.svg b/explorer/src/assets/logo/verax-logo-light.svg similarity index 100% rename from explorer/src/assets/logo/verax-logo.svg rename to explorer/src/assets/logo/verax-logo-light.svg diff --git a/explorer/src/assets/networks/arbitrum-nova-dark.svg b/explorer/src/assets/networks/arbitrum-nova-dark.svg new file mode 100644 index 00000000..ae766afc --- /dev/null +++ b/explorer/src/assets/networks/arbitrum-nova-dark.svg @@ -0,0 +1,36 @@ + + + + + + + + + + + + + diff --git a/explorer/src/assets/networks/arbitrum-nova.svg b/explorer/src/assets/networks/arbitrum-nova.svg new file mode 100644 index 00000000..93c9580c --- /dev/null +++ b/explorer/src/assets/networks/arbitrum-nova.svg @@ -0,0 +1,36 @@ + + + + + + + + + + + + + diff --git a/explorer/src/assets/networks/arbitrum-sepolia.svg b/explorer/src/assets/networks/arbitrum-sepolia.svg new file mode 100644 index 00000000..ea09a8cc --- /dev/null +++ b/explorer/src/assets/networks/arbitrum-sepolia.svg @@ -0,0 +1,36 @@ + + + + + + + + + + + + + diff --git a/explorer/src/assets/networks/base-dark.svg b/explorer/src/assets/networks/base-dark.svg new file mode 100644 index 00000000..74641c6f --- /dev/null +++ b/explorer/src/assets/networks/base-dark.svg @@ -0,0 +1,17 @@ + + + + + diff --git a/explorer/src/assets/networks/base-sepolia.svg b/explorer/src/assets/networks/base-sepolia.svg new file mode 100644 index 00000000..5399325b --- /dev/null +++ b/explorer/src/assets/networks/base-sepolia.svg @@ -0,0 +1,17 @@ + + + + + diff --git a/explorer/src/assets/networks/base.svg b/explorer/src/assets/networks/base.svg new file mode 100644 index 00000000..b12932f8 --- /dev/null +++ b/explorer/src/assets/networks/base.svg @@ -0,0 +1,16 @@ + + + + + diff --git a/explorer/src/assets/networks/linea-sepolia.svg b/explorer/src/assets/networks/linea-sepolia.svg new file mode 100644 index 00000000..0eddf2a8 --- /dev/null +++ b/explorer/src/assets/networks/linea-sepolia.svg @@ -0,0 +1,7 @@ + + + + diff --git a/explorer/src/assets/socials/lens.svg b/explorer/src/assets/socials/lens.svg new file mode 100644 index 00000000..b5c01930 --- /dev/null +++ b/explorer/src/assets/socials/lens.svg @@ -0,0 +1,8 @@ + + + diff --git a/explorer/src/assets/socials/twitter-x.svg b/explorer/src/assets/socials/twitter-x.svg new file mode 100644 index 00000000..29c27c0a --- /dev/null +++ b/explorer/src/assets/socials/twitter-x.svg @@ -0,0 +1,6 @@ + + + diff --git a/explorer/src/components/Footer/index.tsx b/explorer/src/components/Footer/index.tsx index 8e52ca29..2ab34fa9 100644 --- a/explorer/src/components/Footer/index.tsx +++ b/explorer/src/components/Footer/index.tsx @@ -1,9 +1,11 @@ import { useTernaryDarkMode } from "usehooks-ts"; +import BetaDark from "@/assets/logo/beta-dark.svg?react"; +import BetaLight from "@/assets/logo/beta-light.svg?react"; import HapiLogoDark from "@/assets/logo/hapi-dark.svg?react"; import HapiLogo from "@/assets/logo/hapi.svg?react"; import VeraxLogoGreyDark from "@/assets/logo/verax-logo-grey-dark.svg?react"; -import VeraxLogoGrey from "@/assets/logo/verax-logo-grey.svg?react"; +import VeraxLogoGrey from "@/assets/logo/verax-logo-grey-light.svg?react"; import { Link } from "@/components/Link"; import { INFO_LIST } from "@/constants/components"; import { APP_ROUTES } from "@/routes/constants"; @@ -15,8 +17,9 @@ export const Footer: React.FC = () => {