From 757f9f3d5dbe3df1a10a239c2bd5bdbdaa5f2471 Mon Sep 17 00:00:00 2001 From: Roberto Cantu Date: Tue, 5 Dec 2023 15:17:51 -0600 Subject: [PATCH 01/44] Remove metatx checks --- .github/workflows/release.yml | 416 +++++++++--------- .../components/utils/ForwardedContext.sol | 30 +- releases/1.2.9/index.yml | 22 + releases/1.2.9/polygon/config/upgrade.json | 113 +++++ 4 files changed, 348 insertions(+), 233 deletions(-) create mode 100644 releases/1.2.9/index.yml create mode 100644 releases/1.2.9/polygon/config/upgrade.json diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 26e09e67..3868e0d7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -85,225 +85,225 @@ jobs: with: token: ${{ secrets.CODECOV_TOKEN }} - # prepare: - # name: Prepare release - # if: startsWith(github.head_ref, 'release/') - # runs-on: ubuntu-22.04 - # needs: coverage - # outputs: - # release_version: ${{ steps.parse.outputs.release_version }} - # release_path: ${{ steps.parse.outputs.release_path }} - # release_network: ${{ steps.parse.outputs.release_network }} - # release_title: ${{ steps.parse.outputs.release_title }} - # release_description: ${{ steps.parse.outputs.release_description }} - # release_multisig: ${{ steps.parse.outputs.release_multisig }} - # release_audited: ${{ steps.parse.outputs.release_audited }} - # release_deploy_cmd: ${{ steps.parse.outputs.release_deploy_cmd }} - # release_verify_cmd: ${{ steps.parse.outputs.release_verify_cmd }} - # release_finish_cmd: ${{ steps.parse.outputs.release_finish_cmd }} - # steps: - # - uses: actions/checkout@v3 - # with: - # ref: ${{ github.event.pull_request.head.sha }} - # fetch-depth: 0 + prepare: + name: Prepare release + if: startsWith(github.head_ref, 'release/') + runs-on: ubuntu-22.04 + needs: coverage + outputs: + release_version: ${{ steps.parse.outputs.release_version }} + release_path: ${{ steps.parse.outputs.release_path }} + release_network: ${{ steps.parse.outputs.release_network }} + release_title: ${{ steps.parse.outputs.release_title }} + release_description: ${{ steps.parse.outputs.release_description }} + release_multisig: ${{ steps.parse.outputs.release_multisig }} + release_audited: ${{ steps.parse.outputs.release_audited }} + release_deploy_cmd: ${{ steps.parse.outputs.release_deploy_cmd }} + release_verify_cmd: ${{ steps.parse.outputs.release_verify_cmd }} + release_finish_cmd: ${{ steps.parse.outputs.release_finish_cmd }} + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 0 - # - name: Parse release info - # id: parse - # run: | - # version=${BRANCH_NAME#release\/} - # release_path=releases/$version - # network=$(yq -r .network $release_path/index.yml) - # path=$release_path/$network - # echo "release_version=$version" >> $GITHUB_OUTPUT - # echo "release_path=$path" >> $GITHUB_OUTPUT - # echo "release_network=$network" >> $GITHUB_OUTPUT - # echo "release_multisig=$(jq -r .$network releases/deployments/multisigs.json)" >> $GITHUB_OUTPUT - # echo "release_deploy_cmd=$(yq -r '.deploy // ""' $release_path/index.yml)" >> $GITHUB_OUTPUT - # echo "release_verify_cmd=$(yq -r '.verify // ""' $release_path/index.yml)" >> $GITHUB_OUTPUT - # echo "release_finish_cmd=$(yq -r '.finish // ""' $release_path/index.yml)" >> $GITHUB_OUTPUT - # echo "release_audited=$(yq -r '.audited // ""' $release_path/index.yml)" >> $GITHUB_OUTPUT - # echo "release_title=$(yq -r '.title // ""' $release_path/index.yml)" >> $GITHUB_OUTPUT - # echo "release_description<> $GITHUB_OUTPUT - # echo "$(yq -r '.description // ""' $release_path/index.yml)" >> $GITHUB_OUTPUT - # echo "DESCRIPTION_DELIMITER" >> $GITHUB_OUTPUT - # env: - # BRANCH_NAME: ${{ github.head_ref }} + - name: Parse release info + id: parse + run: | + version=${BRANCH_NAME#release\/} + release_path=releases/$version + network=$(yq -r .network $release_path/index.yml) + path=$release_path/$network + echo "release_version=$version" >> $GITHUB_OUTPUT + echo "release_path=$path" >> $GITHUB_OUTPUT + echo "release_network=$network" >> $GITHUB_OUTPUT + echo "release_multisig=$(jq -r .$network releases/deployments/multisigs.json)" >> $GITHUB_OUTPUT + echo "release_deploy_cmd=$(yq -r '.deploy // ""' $release_path/index.yml)" >> $GITHUB_OUTPUT + echo "release_verify_cmd=$(yq -r '.verify // ""' $release_path/index.yml)" >> $GITHUB_OUTPUT + echo "release_finish_cmd=$(yq -r '.finish // ""' $release_path/index.yml)" >> $GITHUB_OUTPUT + echo "release_audited=$(yq -r '.audited // ""' $release_path/index.yml)" >> $GITHUB_OUTPUT + echo "release_title=$(yq -r '.title // ""' $release_path/index.yml)" >> $GITHUB_OUTPUT + echo "release_description<> $GITHUB_OUTPUT + echo "$(yq -r '.description // ""' $release_path/index.yml)" >> $GITHUB_OUTPUT + echo "DESCRIPTION_DELIMITER" >> $GITHUB_OUTPUT + env: + BRANCH_NAME: ${{ github.head_ref }} - # - name: Output summary - # run: | - # echo "## $TITLE" >> $GITHUB_STEP_SUMMARY - # echo "" >> $GITHUB_STEP_SUMMARY - # echo "**Network:** $NETWORK" >> $GITHUB_STEP_SUMMARY - # echo "**Commit:** [\`$COMMIT\`]($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/tree/$COMMIT)" >> $GITHUB_STEP_SUMMARY - # echo "" >> $GITHUB_STEP_SUMMARY - # echo "$DESCRIPTION" >> $GITHUB_STEP_SUMMARY - # echo "" >> $GITHUB_STEP_SUMMARY - # env: - # TITLE: ${{ steps.parse.outputs.release_title }} - # DESCRIPTION: ${{ steps.parse.outputs.release_description }} - # NETWORK: ${{ steps.parse.outputs.release_network }} - # COMMIT: ${{ github.event.pull_request.head.sha }} + - name: Output summary + run: | + echo "## $TITLE" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "**Network:** $NETWORK" >> $GITHUB_STEP_SUMMARY + echo "**Commit:** [\`$COMMIT\`]($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/tree/$COMMIT)" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "$DESCRIPTION" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + env: + TITLE: ${{ steps.parse.outputs.release_title }} + DESCRIPTION: ${{ steps.parse.outputs.release_description }} + NETWORK: ${{ steps.parse.outputs.release_network }} + COMMIT: ${{ github.event.pull_request.head.sha }} - # - name: Output audit info - # if: "steps.parse.outputs.release_audited != ''" - # run: | - # echo "---" >> $GITHUB_STEP_SUMMARY - # echo "### Audit" >> $GITHUB_STEP_SUMMARY - # echo "Audited contracts at commit [\`$AUDIT_COMMIT\`]($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/tree/$AUDIT_COMMIT) :detective:" >> $GITHUB_STEP_SUMMARY - # audit_diff="$(git diff $AUDIT_COMMIT *.sol)" - # if [[ -z $audit_diff ]]; then - # echo "Contracts have not been modified since audit :heavy_check_mark:" >> $GITHUB_STEP_SUMMARY - # else - # echo "Contracts have been modified since audit :warning:" >> $GITHUB_STEP_SUMMARY - # echo "" >> $GITHUB_STEP_SUMMARY - # echo "\`\`\`diff" >> $GITHUB_STEP_SUMMARY - # echo "$audit_diff" >> $GITHUB_STEP_SUMMARY - # echo "\`\`\`" >> $GITHUB_STEP_SUMMARY - # fi - # env: - # AUDIT_COMMIT: ${{ steps.parse.outputs.release_audited }} + - name: Output audit info + if: "steps.parse.outputs.release_audited != ''" + run: | + echo "---" >> $GITHUB_STEP_SUMMARY + echo "### Audit" >> $GITHUB_STEP_SUMMARY + echo "Audited contracts at commit [\`$AUDIT_COMMIT\`]($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/tree/$AUDIT_COMMIT) :detective:" >> $GITHUB_STEP_SUMMARY + audit_diff="$(git diff $AUDIT_COMMIT *.sol)" + if [[ -z $audit_diff ]]; then + echo "Contracts have not been modified since audit :heavy_check_mark:" >> $GITHUB_STEP_SUMMARY + else + echo "Contracts have been modified since audit :warning:" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "\`\`\`diff" >> $GITHUB_STEP_SUMMARY + echo "$audit_diff" >> $GITHUB_STEP_SUMMARY + echo "\`\`\`" >> $GITHUB_STEP_SUMMARY + fi + env: + AUDIT_COMMIT: ${{ steps.parse.outputs.release_audited }} - # deploy: - # name: Deploy contracts - # if: startsWith(github.head_ref, 'release/') - # runs-on: ubuntu-22.04 - # timeout-minutes: 20 - # needs: prepare - # environment: production - # outputs: - # deploy_commit: ${{ steps.commit.outputs.commit_hash }} - # steps: - # - uses: actions/checkout@v3 - # with: - # ref: ${{ github.event.pull_request.head.sha }} - # - uses: actions/setup-node@v3 - # with: - # node-version: '14' - # cache: 'yarn' - # - run: yarn install --frozen-lockfile + deploy: + name: Deploy contracts + if: startsWith(github.head_ref, 'release/') + runs-on: ubuntu-22.04 + timeout-minutes: 20 + needs: prepare + environment: production + outputs: + deploy_commit: ${{ steps.commit.outputs.commit_hash }} + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha }} + - uses: actions/setup-node@v3 + with: + node-version: '14' + cache: 'yarn' + - run: yarn install --frozen-lockfile - # - name: Get build artifacts - # uses: actions/download-artifact@v3 - # with: - # name: contract-artifacts + - name: Get build artifacts + uses: actions/download-artifact@v3 + with: + name: contract-artifacts - # - name: Deploy contracts - # run: eval yarn hardhat --network ${{ needs.prepare.outputs.release_network }} ${{ needs.prepare.outputs.release_deploy_cmd }} - # env: - # INFURA_PROJECT_ID: '${{ secrets.INFURA_PROJECT_ID }}' - # MUMBAI_MNEMONIC: '${{ secrets.MUMBAI_MNEMONIC }}' - # MUMBAI_NODE: '${{ secrets.MUMBAI_NODE }}' - # POLYGON_MNEMONIC: '${{ secrets.POLYGON_MNEMONIC }}' - # POLYGON_NODE: '${{ secrets.POLYGON_NODE }}' - # POLYGON_GAS_PRICE: 1200000000000 - # DEBUG: '@openzeppelin:*' - # # ETHERSCAN "${{ secrets.ETHERSCAN }}" - # POLYSCAN: '${{ secrets.POLYSCAN }}' - # RELEASE_PATH: '${{ needs.prepare.outputs.release_path }}' - # MULTISIG_ADDRESS: '${{ needs.prepare.outputs.release_multisig }}' + - name: Deploy contracts + run: eval yarn hardhat --network ${{ needs.prepare.outputs.release_network }} ${{ needs.prepare.outputs.release_deploy_cmd }} + env: + INFURA_PROJECT_ID: '${{ secrets.INFURA_PROJECT_ID }}' + MUMBAI_MNEMONIC: '${{ secrets.MUMBAI_MNEMONIC }}' + MUMBAI_NODE: '${{ secrets.MUMBAI_NODE }}' + POLYGON_MNEMONIC: '${{ secrets.POLYGON_MNEMONIC }}' + POLYGON_NODE: '${{ secrets.POLYGON_NODE }}' + POLYGON_GAS_PRICE: 1200000000000 + DEBUG: '@openzeppelin:*' + # ETHERSCAN "${{ secrets.ETHERSCAN }}" + POLYSCAN: '${{ secrets.POLYSCAN }}' + RELEASE_PATH: '${{ needs.prepare.outputs.release_path }}' + MULTISIG_ADDRESS: '${{ needs.prepare.outputs.release_multisig }}' - # - name: Commit changes - # uses: stefanzweifel/git-auto-commit-action@v4 - # id: commit - # if: always() - # with: - # commit_message: Update registries of deployed addresses - # file_pattern: '.openzeppelin/ releases/' - # skip_checkout: true - # # tagging_message: '${{ needs.prepare.outputs.release_version }}' + - name: Commit changes + uses: stefanzweifel/git-auto-commit-action@v4 + id: commit + if: always() + with: + commit_message: Update registries of deployed addresses + file_pattern: '.openzeppelin/ releases/' + skip_checkout: true + # tagging_message: '${{ needs.prepare.outputs.release_version }}' - # verify: - # name: Verify contracts - # if: "startsWith(github.head_ref, 'release/') && needs.prepare.outputs.release_verify_cmd != ''" - # runs-on: ubuntu-22.04 - # timeout-minutes: 60 - # needs: - # - build - # - prepare - # - deploy - # steps: - # - uses: actions/checkout@v3 - # with: - # ref: ${{ needs.deploy.outputs.deploy_commit || github.event.pull_request.head.sha }} - # - uses: actions/setup-node@v3 - # with: - # node-version: '14' - # cache: 'yarn' - # - run: yarn install --frozen-lockfile + verify: + name: Verify contracts + if: "startsWith(github.head_ref, 'release/') && needs.prepare.outputs.release_verify_cmd != ''" + runs-on: ubuntu-22.04 + timeout-minutes: 60 + needs: + - build + - prepare + - deploy + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ needs.deploy.outputs.deploy_commit || github.event.pull_request.head.sha }} + - uses: actions/setup-node@v3 + with: + node-version: '14' + cache: 'yarn' + - run: yarn install --frozen-lockfile - # - name: Get build artifacts - # uses: actions/download-artifact@v3 - # with: - # name: contract-artifacts + - name: Get build artifacts + uses: actions/download-artifact@v3 + with: + name: contract-artifacts - # - name: Verify contracts - # shell: bash - # run: | - # yarn hardhat --network ${{ needs.prepare.outputs.release_network }} ${{ needs.prepare.outputs.release_verify_cmd }} ${{ needs.prepare.outputs.release_version }} - # env: - # INFURA_PROJECT_ID: '${{ secrets.INFURA_PROJECT_ID }}' - # MUMBAI_MNEMONIC: '${{ secrets.MUMBAI_MNEMONIC }}' - # MUMBAI_NODE: '${{ secrets.MUMBAI_NODE }}' - # POLYGON_MNEMONIC: '${{ secrets.POLYGON_MNEMONIC }}' - # POLYGON_NODE: '${{ secrets.POLYGON_NODE }}' - # # ETHERSCAN "${{ secrets.ETHERSCAN }}" - # POLYSCAN: '${{ secrets.POLYSCAN }}' - # RELEASE_PATH: '${{ needs.prepare.outputs.release_path }}' - # ARTIFACT_REFERENCE_URL: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' + - name: Verify contracts + shell: bash + run: | + yarn hardhat --network ${{ needs.prepare.outputs.release_network }} ${{ needs.prepare.outputs.release_verify_cmd }} ${{ needs.prepare.outputs.release_version }} + env: + INFURA_PROJECT_ID: '${{ secrets.INFURA_PROJECT_ID }}' + MUMBAI_MNEMONIC: '${{ secrets.MUMBAI_MNEMONIC }}' + MUMBAI_NODE: '${{ secrets.MUMBAI_NODE }}' + POLYGON_MNEMONIC: '${{ secrets.POLYGON_MNEMONIC }}' + POLYGON_NODE: '${{ secrets.POLYGON_NODE }}' + # ETHERSCAN "${{ secrets.ETHERSCAN }}" + POLYSCAN: '${{ secrets.POLYSCAN }}' + RELEASE_PATH: '${{ needs.prepare.outputs.release_path }}' + ARTIFACT_REFERENCE_URL: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' - # finish-release: - # name: Finish release - # if: "startsWith(github.head_ref, 'release/')" - # runs-on: ubuntu-22.04 - # timeout-minutes: 20 - # environment: production - # needs: - # - prepare - # # - deploy - # steps: - # - uses: actions/checkout@v3 - # with: - # ref: ${{ needs.deploy.outputs.deploy_commit || github.event.pull_request.head.sha }} - # - uses: actions/setup-node@v3 - # with: - # node-version: '14' - # cache: 'yarn' - # - run: yarn install --frozen-lockfile + finish-release: + name: Finish release + if: "startsWith(github.head_ref, 'release/')" + runs-on: ubuntu-22.04 + timeout-minutes: 20 + environment: production + needs: + - prepare + # - deploy + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ needs.deploy.outputs.deploy_commit || github.event.pull_request.head.sha }} + - uses: actions/setup-node@v3 + with: + node-version: '14' + cache: 'yarn' + - run: yarn install --frozen-lockfile - # - name: Get build artifacts - # uses: actions/download-artifact@v3 - # with: - # name: contract-artifacts + - name: Get build artifacts + uses: actions/download-artifact@v3 + with: + name: contract-artifacts - # - name: Complete release - # if: "needs.prepare.outputs.release_finish_cmd != ''" - # shell: bash - # run: | - # yarn hardhat --network ${{ needs.prepare.outputs.release_network }} ${{ needs.prepare.outputs.release_finish_cmd }} ${{ needs.prepare.outputs.release_version }} "${{ needs.prepare.outputs.release_title }}" "${{ needs.prepare.outputs.release_description }}" - # env: - # INFURA_PROJECT_ID: '${{ secrets.INFURA_PROJECT_ID }}' - # MUMBAI_MNEMONIC: '${{ secrets.MUMBAI_MNEMONIC }}' - # MUMBAI_NODE: '${{ secrets.MUMBAI_NODE }}' - # POLYGON_MNEMONIC: "${{ secrets.POLYGON_MNEMONIC }}" - # POLYGON_NODE: "${{ secrets.POLYGON_NODE }}" - # POLYGON_GAS_PRICE: 1200000000000 - # DEBUG: '@openzeppelin:*' - # # ETHERSCAN "${{ secrets.ETHERSCAN }}" - # POLYSCAN: '${{ secrets.POLYSCAN }}' - # DEFENDER_API_KEY: '${{ secrets.DEFENDER_API_KEY }}' - # DEFENDER_API_SECRET: '${{ secrets.DEFENDER_API_SECRET }}' - # RELEASE_PATH: '${{ needs.prepare.outputs.release_path }}' - # MULTISIG_ADDRESS: '${{ needs.prepare.outputs.release_multisig }}' + - name: Complete release + if: "needs.prepare.outputs.release_finish_cmd != ''" + shell: bash + run: | + yarn hardhat --network ${{ needs.prepare.outputs.release_network }} ${{ needs.prepare.outputs.release_finish_cmd }} ${{ needs.prepare.outputs.release_version }} "${{ needs.prepare.outputs.release_title }}" "${{ needs.prepare.outputs.release_description }}" + env: + INFURA_PROJECT_ID: '${{ secrets.INFURA_PROJECT_ID }}' + MUMBAI_MNEMONIC: '${{ secrets.MUMBAI_MNEMONIC }}' + MUMBAI_NODE: '${{ secrets.MUMBAI_NODE }}' + POLYGON_MNEMONIC: "${{ secrets.POLYGON_MNEMONIC }}" + POLYGON_NODE: "${{ secrets.POLYGON_NODE }}" + POLYGON_GAS_PRICE: 1200000000000 + DEBUG: '@openzeppelin:*' + # ETHERSCAN "${{ secrets.ETHERSCAN }}" + POLYSCAN: '${{ secrets.POLYSCAN }}' + DEFENDER_API_KEY: '${{ secrets.DEFENDER_API_KEY }}' + DEFENDER_API_SECRET: '${{ secrets.DEFENDER_API_SECRET }}' + RELEASE_PATH: '${{ needs.prepare.outputs.release_path }}' + MULTISIG_ADDRESS: '${{ needs.prepare.outputs.release_multisig }}' - # - name: Link to run in PR - # uses: actions/github-script@v6 - # env: - # RUN_URL: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' - # with: - # script: | - # github.rest.issues.createComment({ - # issue_number: context.issue.number, - # owner: context.repo.owner, - # repo: context.repo.repo, - # body: `[**Deploy finished**](${process.env.RUN_URL})`, - # }); + - name: Link to run in PR + uses: actions/github-script@v6 + env: + RUN_URL: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' + with: + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: `[**Deploy finished**](${process.env.RUN_URL})`, + }); diff --git a/contracts/components/utils/ForwardedContext.sol b/contracts/components/utils/ForwardedContext.sol index d4b92c4f..e92f7f88 100644 --- a/contracts/components/utils/ForwardedContext.sol +++ b/contracts/components/utils/ForwardedContext.sol @@ -10,9 +10,6 @@ abstract contract ForwardedContext is ContextUpgradeable { /// @custom:oz-upgrades-unsafe-allow state-variable-immutable address private immutable _trustedForwarder; - uint256 private constant ADDRESS_SIZE_BYTES = 20; - - /// @custom:oz-upgrades-unsafe-allow constructor constructor(address trustedForwarder) { // WARNING: do not set this address to other than a deployed Forwarder instance. // Forwarder is critical infrastructure with priviledged address, it is safe for the limited @@ -20,36 +17,19 @@ abstract contract ForwardedContext is ContextUpgradeable { _trustedForwarder = trustedForwarder; } - /// Checks if `forwarder` address provided is the trustedForwarder set in the constructor. - function isTrustedForwarder(address forwarder) public view virtual returns (bool) { - return forwarder == _trustedForwarder; - } - /** - * @notice Gets sender of the transaction of signer if meta transaction. - * @dev If the tx is sent by the trusted forwarded, we assume it is a meta transaction and - * the signer address is encoded in the last 20 bytes of msg.data. + * @notice Gets sender of the transaction. * @return sender address of sender of the transaction of signer if meta transaction. */ function _msgSender() internal view virtual override returns (address sender) { - if (isTrustedForwarder(msg.sender)) { - return address(bytes20(msg.data[msg.data.length - ADDRESS_SIZE_BYTES: msg.data.length])); - } else { - return super._msgSender(); - } + return super._msgSender(); } /** - * @notice Gets msg.data of the transaction or meta-tx. - * @dev If the tx is sent by the trusted forwarded, we assume it is a meta transaction and - * msg.data must have the signer address (encoded in the last 20 bytes of msg.data) removed. - * @return msg.data of the transaction of msg.data - signer address if meta transaction. + * @notice Gets msg.data of the transaction. + * @return msg.data of the transaction of msg.data. */ function _msgData() internal view virtual override returns (bytes calldata) { - if (isTrustedForwarder(msg.sender)) { - return msg.data[:msg.data.length - ADDRESS_SIZE_BYTES]; - } else { - return super._msgData(); - } + return super._msgData(); } } diff --git a/releases/1.2.9/index.yml b/releases/1.2.9/index.yml new file mode 100644 index 00000000..de32f7e0 --- /dev/null +++ b/releases/1.2.9/index.yml @@ -0,0 +1,22 @@ +title: Remove metatransaction functionality +network: polygon +deploy: prepare-upgrade 1.2.9 +verify: verify-deployed +finish: propose-admin +description: | + ## Deployed new implementations: + - AccessManager + - AgentRegistry + - ScannerPoolRegistry + - Dispatch + - StakeAllocator + - RewardsDistributor + - SlashingController + - StakeSubjectGateway + - FortaStaking + + ## Output tx: + - `ForwardedContext` no longer checks for valid forwarder + - New implementations all inherited `BaseComponentUpgradeable`, + which in turn inherited `ForwardedContext`. Hence the + number of new implementations. \ No newline at end of file diff --git a/releases/1.2.9/polygon/config/upgrade.json b/releases/1.2.9/polygon/config/upgrade.json new file mode 100644 index 00000000..56ee83a5 --- /dev/null +++ b/releases/1.2.9/polygon/config/upgrade.json @@ -0,0 +1,113 @@ +{ + "AccessManager": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder" + ] + } + } + }, + "AgentRegistry": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder" + ] + } + } + }, + "ScannerPoolRegistry": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder", "deployment.stake-allocator" + ] + } + + } + }, + "Dispatch": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder" + ] + } + } + }, + "StakeAllocator": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder", "deployment.stake-subject-gateway", "deployment.rewards-distributor" + ] + } + + } + }, + "RewardsDistributor": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder", "deployment.forta", "deployment.stake-subject-gateway" + ] + } + + } + }, + "SlashingController": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder", "deployment.forta" + ] + } + } + }, + "StakeSubjectGateway": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder" + ] + } + } + }, + "FortaStaking": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder" + ] + } + } + } +} \ No newline at end of file From 0917e7913b2a6a7371dc6ae8e29f5096ffa735b7 Mon Sep 17 00:00:00 2001 From: Roberto Cantu Date: Tue, 5 Dec 2023 15:31:23 -0600 Subject: [PATCH 02/44] Update workflow (prepare needs build); skip forwarder tests --- .github/workflows/release.yml | 3 ++- test/forwarder/forwarder.test.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3868e0d7..04431953 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -89,7 +89,8 @@ jobs: name: Prepare release if: startsWith(github.head_ref, 'release/') runs-on: ubuntu-22.04 - needs: coverage + # needs: coverage + needs: build outputs: release_version: ${{ steps.parse.outputs.release_version }} release_path: ${{ steps.parse.outputs.release_path }} diff --git a/test/forwarder/forwarder.test.js b/test/forwarder/forwarder.test.js index c639c62f..adc381f8 100644 --- a/test/forwarder/forwarder.test.js +++ b/test/forwarder/forwarder.test.js @@ -2,7 +2,8 @@ const { ethers } = require('hardhat'); const { expect } = require('chai'); const { prepare } = require('../fixture'); -describe('Forwarder', function () { +// Skipped since removing forwarder/metatx functionality +describe.skip('Forwarder', function () { prepare(); describe('forward transactions', async function () { From 571406cd0bc24076561d911f6128a03f874de704 Mon Sep 17 00:00:00 2001 From: Roberto Cantu Date: Tue, 5 Dec 2023 15:40:29 -0600 Subject: [PATCH 03/44] Add comment to ForwardedContext constructor --- contracts/components/utils/ForwardedContext.sol | 1 + 1 file changed, 1 insertion(+) diff --git a/contracts/components/utils/ForwardedContext.sol b/contracts/components/utils/ForwardedContext.sol index e92f7f88..baec0839 100644 --- a/contracts/components/utils/ForwardedContext.sol +++ b/contracts/components/utils/ForwardedContext.sol @@ -10,6 +10,7 @@ abstract contract ForwardedContext is ContextUpgradeable { /// @custom:oz-upgrades-unsafe-allow state-variable-immutable address private immutable _trustedForwarder; + /// @custom:oz-upgrades-unsafe-allow constructor constructor(address trustedForwarder) { // WARNING: do not set this address to other than a deployed Forwarder instance. // Forwarder is critical infrastructure with priviledged address, it is safe for the limited From a39b2c0aee8b5c3d261a503098146d14ca89f715 Mon Sep 17 00:00:00 2001 From: RCantu92 Date: Tue, 5 Dec 2023 21:48:38 +0000 Subject: [PATCH 04/44] Update registries of deployed addresses --- .openzeppelin/polygon.json | 1871 +++++++++++++++++ .../polygon/output/prepared-upgrades.json | 79 + 2 files changed, 1950 insertions(+) create mode 100644 releases/1.2.9/polygon/output/prepared-upgrades.json diff --git a/.openzeppelin/polygon.json b/.openzeppelin/polygon.json index 6a1945c8..50800435 100644 --- a/.openzeppelin/polygon.json +++ b/.openzeppelin/polygon.json @@ -14975,6 +14975,1877 @@ } } } + }, + "e60900508ba207f310421d8d4cf18709f142a424cf7bb2b969128924007e4d56": { + "address": "0x739707848131F41aCd1d78A56FE0eA02052811Df", + "txHash": "0xc171ff10dde98403bbff504b3d56a43520378af4bcf5b52f6a119ba0da19b4cd", + "layout": { + "solcVersion": "0.8.9", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC165Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol:41" + }, + { + "label": "_roles", + "offset": 0, + "slot": "101", + "type": "t_mapping(t_bytes32,t_struct(RoleData)5114_storage)", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:61" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:259" + }, + { + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC1967UpgradeUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:211" + }, + { + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage", + "contract": "UUPSUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:107" + }, + { + "label": "__gap", + "offset": 0, + "slot": "251", + "type": "t_array(t_uint256)50_storage", + "contract": "AccessManager", + "src": "contracts/components/access/AccessManager.sol:75" + } + ], + "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_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(RoleData)5114_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32" + }, + "t_struct(RoleData)5114_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "members", + "type": "t_mapping(t_address,t_bool)", + "offset": 0, + "slot": "0" + }, + { + "label": "adminRole", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "8829a21650e75ad56379b4bf8694309dcbdc5170ac497b93e9457f8c2424bd92": { + "address": "0xE7e6c9A579eF43FfE629F9B99a9e4585ae69ED9c", + "txHash": "0x5d67f669e2be69d767a1b3dcb00087d4521a7142c48389e2107a5e18545bde4a", + "layout": { + "solcVersion": "0.8.9", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_accessControl", + "offset": 0, + "slot": "51", + "type": "t_contract(IAccessControl)15000", + "contract": "AccessManagedUpgradeable", + "src": "contracts/components/utils/AccessManaged.sol:16" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessManagedUpgradeable", + "src": "contracts/components/utils/AccessManaged.sol:68" + }, + { + "label": "_deprecated_router", + "offset": 0, + "slot": "101", + "type": "t_address", + "contract": "RoutedUpgradeable", + "src": "contracts/components/utils/Routed.sol:16", + "retypedFrom": "contract IRouter", + "renamedFrom": "_router" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "RoutedUpgradeable", + "src": "contracts/components/utils/Routed.sol:35" + }, + { + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC1967UpgradeUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:211" + }, + { + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage", + "contract": "UUPSUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:107" + }, + { + "label": "__gap", + "offset": 0, + "slot": "251", + "type": "t_array(t_uint256)50_storage", + "contract": "BaseComponentUpgradeable", + "src": "contracts/components/BaseComponentUpgradeable.sol:62" + }, + { + "label": "_commits", + "offset": 0, + "slot": "301", + "type": "t_mapping(t_bytes32,t_uint256)", + "contract": "FrontRunningProtection", + "src": "contracts/tools/FrontRunningProtection.sol:12" + }, + { + "label": "__gap", + "offset": 0, + "slot": "302", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC165Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol:41" + }, + { + "label": "_name", + "offset": 0, + "slot": "352", + "type": "t_string_storage", + "contract": "ERC721Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:25" + }, + { + "label": "_symbol", + "offset": 0, + "slot": "353", + "type": "t_string_storage", + "contract": "ERC721Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:28" + }, + { + "label": "_owners", + "offset": 0, + "slot": "354", + "type": "t_mapping(t_uint256,t_address)", + "contract": "ERC721Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:31" + }, + { + "label": "_balances", + "offset": 0, + "slot": "355", + "type": "t_mapping(t_address,t_uint256)", + "contract": "ERC721Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:34" + }, + { + "label": "_tokenApprovals", + "offset": 0, + "slot": "356", + "type": "t_mapping(t_uint256,t_address)", + "contract": "ERC721Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:37" + }, + { + "label": "_operatorApprovals", + "offset": 0, + "slot": "357", + "type": "t_mapping(t_address,t_mapping(t_address,t_bool))", + "contract": "ERC721Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:40" + }, + { + "label": "__gap", + "offset": 0, + "slot": "358", + "type": "t_array(t_uint256)44_storage", + "contract": "ERC721Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:465" + }, + { + "label": "_subjectGateway", + "offset": 0, + "slot": "402", + "type": "t_contract(IStakeSubjectGateway)131769", + "contract": "DirectStakeSubjectUpgradeable", + "src": "contracts/components/staking/stake_subjects/DirectStakeSubject.sol:16", + "retypedFrom": "IStakeController", + "renamedFrom": "_stakeController" + }, + { + "label": "__gap", + "offset": 0, + "slot": "403", + "type": "t_array(t_uint256)4_storage", + "contract": "DirectStakeSubjectUpgradeable", + "src": "contracts/components/staking/stake_subjects/DirectStakeSubject.sol:64" + }, + { + "label": "_stakeThreshold", + "offset": 0, + "slot": "407", + "type": "t_struct(StakeThreshold)131636_storage", + "contract": "AgentRegistryCore", + "src": "contracts/components/agents/AgentRegistryCore.sol:14" + }, + { + "label": "frontRunningDelay", + "offset": 0, + "slot": "410", + "type": "t_uint256", + "contract": "AgentRegistryCore", + "src": "contracts/components/agents/AgentRegistryCore.sol:16" + }, + { + "label": "__gap", + "offset": 0, + "slot": "411", + "type": "t_array(t_uint256)41_storage", + "contract": "AgentRegistryCore", + "src": "contracts/components/agents/AgentRegistryCore.sol:199" + }, + { + "label": "_disabled", + "offset": 0, + "slot": "452", + "type": "t_mapping(t_uint256,t_struct(BitMap)21309_storage)", + "contract": "AgentRegistryEnable", + "src": "contracts/components/agents/AgentRegistryEnable.sol:24" + }, + { + "label": "__gap", + "offset": 0, + "slot": "453", + "type": "t_array(t_uint256)49_storage", + "contract": "AgentRegistryEnable", + "src": "contracts/components/agents/AgentRegistryEnable.sol:157" + }, + { + "label": "_agentMetadata", + "offset": 0, + "slot": "502", + "type": "t_mapping(t_uint256,t_struct(AgentMetadata)119170_storage)", + "contract": "AgentRegistryMetadata", + "src": "contracts/components/agents/AgentRegistryMetadata.sol:15" + }, + { + "label": "_agentMetadataUniqueness", + "offset": 0, + "slot": "503", + "type": "t_mapping(t_bytes32,t_bool)", + "contract": "AgentRegistryMetadata", + "src": "contracts/components/agents/AgentRegistryMetadata.sol:16" + }, + { + "label": "__gap", + "offset": 0, + "slot": "504", + "type": "t_array(t_uint256)48_storage", + "contract": "AgentRegistryMetadata", + "src": "contracts/components/agents/AgentRegistryMetadata.sol:69" + }, + { + "label": "_allAgents", + "offset": 0, + "slot": "552", + "type": "t_struct(UintSet)21908_storage", + "contract": "AgentRegistryEnumerable", + "src": "contracts/components/agents/AgentRegistryEnumerable.sol:12" + }, + { + "label": "_chainAgents", + "offset": 0, + "slot": "554", + "type": "t_mapping(t_uint256,t_struct(UintSet)21908_storage)", + "contract": "AgentRegistryEnumerable", + "src": "contracts/components/agents/AgentRegistryEnumerable.sol:13" + }, + { + "label": "__gap", + "offset": 0, + "slot": "555", + "type": "t_array(t_uint256)48_storage", + "contract": "AgentRegistryEnumerable", + "src": "contracts/components/agents/AgentRegistryEnumerable.sol:94" + }, + { + "label": "__gap", + "offset": 0, + "slot": "603", + "type": "t_array(t_uint256)50_storage", + "contract": "AgentRegistry", + "src": "contracts/components/agents/AgentRegistry.sol:109" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)41_storage": { + "label": "uint256[41]", + "numberOfBytes": "1312" + }, + "t_array(t_uint256)44_storage": { + "label": "uint256[44]", + "numberOfBytes": "1408" + }, + "t_array(t_uint256)48_storage": { + "label": "uint256[48]", + "numberOfBytes": "1536" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)4_storage": { + "label": "uint256[4]", + "numberOfBytes": "128" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_array(t_uint256)dyn_storage": { + "label": "uint256[]", + "numberOfBytes": "32" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(IAccessControl)15000": { + "label": "contract IAccessControl", + "numberOfBytes": "20" + }, + "t_contract(IStakeSubjectGateway)131769": { + "label": "contract IStakeSubjectGateway", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_mapping(t_address,t_bool))": { + "label": "mapping(address => mapping(address => bool))", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_bool)": { + "label": "mapping(bytes32 => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_uint256)": { + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_address)": { + "label": "mapping(uint256 => address)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_struct(AgentMetadata)119170_storage)": { + "label": "mapping(uint256 => struct AgentRegistryMetadata.AgentMetadata)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_struct(BitMap)21309_storage)": { + "label": "mapping(uint256 => struct BitMaps.BitMap)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_struct(UintSet)21908_storage)": { + "label": "mapping(uint256 => struct EnumerableSet.UintSet)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_uint256)": { + "label": "mapping(uint256 => uint256)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(AgentMetadata)119170_storage": { + "label": "struct AgentRegistryMetadata.AgentMetadata", + "members": [ + { + "label": "version", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "metadata", + "type": "t_string_storage", + "offset": 0, + "slot": "1" + }, + { + "label": "chainIds", + "type": "t_array(t_uint256)dyn_storage", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_struct(BitMap)21309_storage": { + "label": "struct BitMaps.BitMap", + "members": [ + { + "label": "_data", + "type": "t_mapping(t_uint256,t_uint256)", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Set)21450_storage": { + "label": "struct EnumerableSet.Set", + "members": [ + { + "label": "_values", + "type": "t_array(t_bytes32)dyn_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "_indexes", + "type": "t_mapping(t_bytes32,t_uint256)", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_struct(StakeThreshold)131636_storage": { + "label": "struct IStakeSubject.StakeThreshold", + "members": [ + { + "label": "min", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "max", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "activated", + "type": "t_bool", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_struct(UintSet)21908_storage": { + "label": "struct EnumerableSet.UintSet", + "members": [ + { + "label": "_inner", + "type": "t_struct(Set)21450_storage", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "927c68f6745ff5cb0be4fe36e92092d4753815bb00f263b83376c2a120ee09f3": { + "address": "0x92FA117c7c071cC11b544931c46c9e3096d6FcB1", + "txHash": "0x8f1d7887cd4a7822985459c06f06366484d37cac241ee0aab15eff7e82aa9df1", + "layout": { + "solcVersion": "0.8.9", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_accessControl", + "offset": 0, + "slot": "51", + "type": "t_contract(IAccessControl)15000", + "contract": "AccessManagedUpgradeable", + "src": "contracts/components/utils/AccessManaged.sol:16" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessManagedUpgradeable", + "src": "contracts/components/utils/AccessManaged.sol:68" + }, + { + "label": "_deprecated_router", + "offset": 0, + "slot": "101", + "type": "t_address", + "contract": "RoutedUpgradeable", + "src": "contracts/components/utils/Routed.sol:16", + "retypedFrom": "contract IRouter", + "renamedFrom": "_router" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "RoutedUpgradeable", + "src": "contracts/components/utils/Routed.sol:35" + }, + { + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC1967UpgradeUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:211" + }, + { + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage", + "contract": "UUPSUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:107" + }, + { + "label": "__gap", + "offset": 0, + "slot": "251", + "type": "t_array(t_uint256)50_storage", + "contract": "BaseComponentUpgradeable", + "src": "contracts/components/BaseComponentUpgradeable.sol:62" + }, + { + "label": "__gap", + "offset": 0, + "slot": "301", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC165Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol:41" + }, + { + "label": "_name", + "offset": 0, + "slot": "351", + "type": "t_string_storage", + "contract": "ERC721Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:25" + }, + { + "label": "_symbol", + "offset": 0, + "slot": "352", + "type": "t_string_storage", + "contract": "ERC721Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:28" + }, + { + "label": "_owners", + "offset": 0, + "slot": "353", + "type": "t_mapping(t_uint256,t_address)", + "contract": "ERC721Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:31" + }, + { + "label": "_balances", + "offset": 0, + "slot": "354", + "type": "t_mapping(t_address,t_uint256)", + "contract": "ERC721Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:34" + }, + { + "label": "_tokenApprovals", + "offset": 0, + "slot": "355", + "type": "t_mapping(t_uint256,t_address)", + "contract": "ERC721Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:37" + }, + { + "label": "_operatorApprovals", + "offset": 0, + "slot": "356", + "type": "t_mapping(t_address,t_mapping(t_address,t_bool))", + "contract": "ERC721Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:40" + }, + { + "label": "__gap", + "offset": 0, + "slot": "357", + "type": "t_array(t_uint256)44_storage", + "contract": "ERC721Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:465" + }, + { + "label": "_ownedTokens", + "offset": 0, + "slot": "401", + "type": "t_mapping(t_address,t_mapping(t_uint256,t_uint256))", + "contract": "ERC721EnumerableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol:22" + }, + { + "label": "_ownedTokensIndex", + "offset": 0, + "slot": "402", + "type": "t_mapping(t_uint256,t_uint256)", + "contract": "ERC721EnumerableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol:25" + }, + { + "label": "_allTokens", + "offset": 0, + "slot": "403", + "type": "t_array(t_uint256)dyn_storage", + "contract": "ERC721EnumerableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol:28" + }, + { + "label": "_allTokensIndex", + "offset": 0, + "slot": "404", + "type": "t_mapping(t_uint256,t_uint256)", + "contract": "ERC721EnumerableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol:31" + }, + { + "label": "__gap", + "offset": 0, + "slot": "405", + "type": "t_array(t_uint256)46_storage", + "contract": "ERC721EnumerableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol:175" + }, + { + "label": "_subjectGateway", + "offset": 0, + "slot": "451", + "type": "t_contract(IStakeSubjectGateway)131769", + "contract": "DelegatedStakeSubjectUpgradeable", + "src": "contracts/components/staking/stake_subjects/DelegatedStakeSubject.sol:14" + }, + { + "label": "__gap", + "offset": 0, + "slot": "452", + "type": "t_array(t_uint256)4_storage", + "contract": "DelegatedStakeSubjectUpgradeable", + "src": "contracts/components/staking/stake_subjects/DelegatedStakeSubject.sol:51" + }, + { + "label": "_HASHED_NAME", + "offset": 0, + "slot": "456", + "type": "t_bytes32", + "contract": "EIP712Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol:32" + }, + { + "label": "_HASHED_VERSION", + "offset": 0, + "slot": "457", + "type": "t_bytes32", + "contract": "EIP712Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol:33" + }, + { + "label": "__gap", + "offset": 0, + "slot": "458", + "type": "t_array(t_uint256)50_storage", + "contract": "EIP712Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol:120" + }, + { + "label": "_scannerPoolIdCounter", + "offset": 0, + "slot": "508", + "type": "t_struct(Counter)11323_storage", + "contract": "ScannerPoolRegistryCore", + "src": "contracts/components/scanner_pools/ScannerPoolRegistryCore.sol:44" + }, + { + "label": "_scannerNodes", + "offset": 0, + "slot": "509", + "type": "t_mapping(t_address,t_struct(ScannerNode)120655_storage)", + "contract": "ScannerPoolRegistryCore", + "src": "contracts/components/scanner_pools/ScannerPoolRegistryCore.sol:46" + }, + { + "label": "_scannerNodeOwnership", + "offset": 0, + "slot": "510", + "type": "t_mapping(t_uint256,t_struct(AddressSet)21751_storage)", + "contract": "ScannerPoolRegistryCore", + "src": "contracts/components/scanner_pools/ScannerPoolRegistryCore.sol:48" + }, + { + "label": "_enabledScanners", + "offset": 0, + "slot": "511", + "type": "t_mapping(t_uint256,t_uint256)", + "contract": "ScannerPoolRegistryCore", + "src": "contracts/components/scanner_pools/ScannerPoolRegistryCore.sol:50" + }, + { + "label": "_scannerStakeThresholds", + "offset": 0, + "slot": "512", + "type": "t_mapping(t_uint256,t_struct(StakeThreshold)131636_storage)", + "contract": "ScannerPoolRegistryCore", + "src": "contracts/components/scanner_pools/ScannerPoolRegistryCore.sol:52" + }, + { + "label": "_scannerPoolChainId", + "offset": 0, + "slot": "513", + "type": "t_mapping(t_uint256,t_uint256)", + "contract": "ScannerPoolRegistryCore", + "src": "contracts/components/scanner_pools/ScannerPoolRegistryCore.sol:54" + }, + { + "label": "registrationDelay", + "offset": 0, + "slot": "514", + "type": "t_uint256", + "contract": "ScannerPoolRegistryCore", + "src": "contracts/components/scanner_pools/ScannerPoolRegistryCore.sol:56" + }, + { + "label": "__gap", + "offset": 0, + "slot": "515", + "type": "t_array(t_uint256)38_storage", + "contract": "ScannerPoolRegistryCore", + "src": "contracts/components/scanner_pools/ScannerPoolRegistryCore.sol:569" + }, + { + "label": "_managers", + "offset": 0, + "slot": "553", + "type": "t_mapping(t_uint256,t_struct(AddressSet)21751_storage)", + "contract": "ScannerPoolRegistryManaged", + "src": "contracts/components/scanner_pools/ScannerPoolRegistryManaged.sol:13" + }, + { + "label": "__gap", + "offset": 0, + "slot": "554", + "type": "t_array(t_uint256)49_storage", + "contract": "ScannerPoolRegistryManaged", + "src": "contracts/components/scanner_pools/ScannerPoolRegistryManaged.sol:84" + }, + { + "label": "__gap", + "offset": 0, + "slot": "603", + "type": "t_array(t_uint256)50_storage", + "contract": "ScannerPoolRegistry", + "src": "contracts/components/scanner_pools/ScannerPoolRegistry.sol:85" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)38_storage": { + "label": "uint256[38]", + "numberOfBytes": "1216" + }, + "t_array(t_uint256)44_storage": { + "label": "uint256[44]", + "numberOfBytes": "1408" + }, + "t_array(t_uint256)46_storage": { + "label": "uint256[46]", + "numberOfBytes": "1472" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)4_storage": { + "label": "uint256[4]", + "numberOfBytes": "128" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_array(t_uint256)dyn_storage": { + "label": "uint256[]", + "numberOfBytes": "32" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(IAccessControl)15000": { + "label": "contract IAccessControl", + "numberOfBytes": "20" + }, + "t_contract(IStakeSubjectGateway)131769": { + "label": "contract IStakeSubjectGateway", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_mapping(t_address,t_bool))": { + "label": "mapping(address => mapping(address => bool))", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_mapping(t_uint256,t_uint256))": { + "label": "mapping(address => mapping(uint256 => uint256))", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(ScannerNode)120655_storage)": { + "label": "mapping(address => struct ScannerPoolRegistryCore.ScannerNode)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_uint256)": { + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_address)": { + "label": "mapping(uint256 => address)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_struct(AddressSet)21751_storage)": { + "label": "mapping(uint256 => struct EnumerableSet.AddressSet)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_struct(StakeThreshold)131636_storage)": { + "label": "mapping(uint256 => struct IStakeSubject.StakeThreshold)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_uint256)": { + "label": "mapping(uint256 => uint256)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(AddressSet)21751_storage": { + "label": "struct EnumerableSet.AddressSet", + "members": [ + { + "label": "_inner", + "type": "t_struct(Set)21450_storage", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Counter)11323_storage": { + "label": "struct CountersUpgradeable.Counter", + "members": [ + { + "label": "_value", + "type": "t_uint256", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(ScannerNode)120655_storage": { + "label": "struct ScannerPoolRegistryCore.ScannerNode", + "members": [ + { + "label": "registered", + "type": "t_bool", + "offset": 0, + "slot": "0" + }, + { + "label": "disabled", + "type": "t_bool", + "offset": 1, + "slot": "0" + }, + { + "label": "scannerPoolId", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "chainId", + "type": "t_uint256", + "offset": 0, + "slot": "2" + }, + { + "label": "metadata", + "type": "t_string_storage", + "offset": 0, + "slot": "3" + } + ], + "numberOfBytes": "128" + }, + "t_struct(Set)21450_storage": { + "label": "struct EnumerableSet.Set", + "members": [ + { + "label": "_values", + "type": "t_array(t_bytes32)dyn_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "_indexes", + "type": "t_mapping(t_bytes32,t_uint256)", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_struct(StakeThreshold)131636_storage": { + "label": "struct IStakeSubject.StakeThreshold", + "members": [ + { + "label": "min", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "max", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "activated", + "type": "t_bool", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "1c7686f285cd882b2bf422672fc7d9db905d1dbf0c0982e0584625bbb503f9dd": { + "address": "0xB5F1A9C329924Fe8203A91aa891182d4E331fF0A", + "txHash": "0x6f2d6f3891fecf009e99ebe84c4d566bcdb7ad219871a376245f78cdf4665230", + "layout": { + "solcVersion": "0.8.9", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_accessControl", + "offset": 0, + "slot": "51", + "type": "t_contract(IAccessControl)15000", + "contract": "AccessManagedUpgradeable", + "src": "contracts/components/utils/AccessManaged.sol:16" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessManagedUpgradeable", + "src": "contracts/components/utils/AccessManaged.sol:68" + }, + { + "label": "_deprecated_router", + "offset": 0, + "slot": "101", + "type": "t_address", + "contract": "RoutedUpgradeable", + "src": "contracts/components/utils/Routed.sol:16", + "retypedFrom": "contract IRouter", + "renamedFrom": "_router" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "RoutedUpgradeable", + "src": "contracts/components/utils/Routed.sol:35" + }, + { + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC1967UpgradeUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:211" + }, + { + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage", + "contract": "UUPSUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:107" + }, + { + "label": "__gap", + "offset": 0, + "slot": "251", + "type": "t_array(t_uint256)50_storage", + "contract": "BaseComponentUpgradeable", + "src": "contracts/components/BaseComponentUpgradeable.sol:62" + }, + { + "label": "_agents", + "offset": 0, + "slot": "301", + "type": "t_contract(AgentRegistry)118195", + "contract": "Dispatch", + "src": "contracts/components/dispatch/Dispatch.sol:18" + }, + { + "label": "_scanners_deprecated", + "offset": 0, + "slot": "302", + "type": "t_contract(ScannerRegistry)122945", + "contract": "Dispatch", + "src": "contracts/components/dispatch/Dispatch.sol:20", + "renamedFrom": "_scanners" + }, + { + "label": "scannerToAgents", + "offset": 0, + "slot": "303", + "type": "t_mapping(t_uint256,t_struct(UintSet)21908_storage)", + "contract": "Dispatch", + "src": "contracts/components/dispatch/Dispatch.sol:21" + }, + { + "label": "agentToScanners", + "offset": 0, + "slot": "304", + "type": "t_mapping(t_uint256,t_struct(UintSet)21908_storage)", + "contract": "Dispatch", + "src": "contracts/components/dispatch/Dispatch.sol:22" + }, + { + "label": "_scannerPools", + "offset": 0, + "slot": "305", + "type": "t_contract(ScannerPoolRegistry)120613", + "contract": "Dispatch", + "src": "contracts/components/dispatch/Dispatch.sol:24" + }, + { + "label": "__gap", + "offset": 0, + "slot": "306", + "type": "t_array(t_uint256)47_storage", + "contract": "Dispatch", + "src": "contracts/components/dispatch/Dispatch.sol:345" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)47_storage": { + "label": "uint256[47]", + "numberOfBytes": "1504" + }, + "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(AgentRegistry)118195": { + "label": "contract AgentRegistry", + "numberOfBytes": "20" + }, + "t_contract(IAccessControl)15000": { + "label": "contract IAccessControl", + "numberOfBytes": "20" + }, + "t_contract(ScannerPoolRegistry)120613": { + "label": "contract ScannerPoolRegistry", + "numberOfBytes": "20" + }, + "t_contract(ScannerRegistry)122945": { + "label": "contract ScannerRegistry", + "numberOfBytes": "20" + }, + "t_mapping(t_bytes32,t_uint256)": { + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_struct(UintSet)21908_storage)": { + "label": "mapping(uint256 => struct EnumerableSet.UintSet)", + "numberOfBytes": "32" + }, + "t_struct(Set)21450_storage": { + "label": "struct EnumerableSet.Set", + "members": [ + { + "label": "_values", + "type": "t_array(t_bytes32)dyn_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "_indexes", + "type": "t_mapping(t_bytes32,t_uint256)", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_struct(UintSet)21908_storage": { + "label": "struct EnumerableSet.UintSet", + "members": [ + { + "label": "_inner", + "type": "t_struct(Set)21450_storage", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "4b618c6967a7e1138d04244a50ed279d55f8e1c5a8ccb39515fcf8d61793c84d": { + "address": "0x8A9B40aE0cCa4f602CA3E4f68114b69C794571F0", + "txHash": "0x8231590b07879281abe5fd95609f8ca7848c362f40c092d60cea81ba50e804ab", + "layout": { + "solcVersion": "0.8.9", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_accessControl", + "offset": 0, + "slot": "51", + "type": "t_contract(IAccessControl)15000", + "contract": "AccessManagedUpgradeable", + "src": "contracts/components/utils/AccessManaged.sol:16" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessManagedUpgradeable", + "src": "contracts/components/utils/AccessManaged.sol:68" + }, + { + "label": "_deprecated_router", + "offset": 0, + "slot": "101", + "type": "t_address", + "contract": "RoutedUpgradeable", + "src": "contracts/components/utils/Routed.sol:16", + "retypedFrom": "contract IRouter", + "renamedFrom": "_router" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "RoutedUpgradeable", + "src": "contracts/components/utils/Routed.sol:35" + }, + { + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC1967UpgradeUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:211" + }, + { + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage", + "contract": "UUPSUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:107" + }, + { + "label": "__gap", + "offset": 0, + "slot": "251", + "type": "t_array(t_uint256)50_storage", + "contract": "BaseComponentUpgradeable", + "src": "contracts/components/BaseComponentUpgradeable.sol:62" + }, + { + "label": "_allocatedStake", + "offset": 0, + "slot": "301", + "type": "t_struct(Balances)133658_storage", + "contract": "StakeAllocator", + "src": "contracts/components/staking/allocation/StakeAllocator.sol:37" + }, + { + "label": "_unallocatedStake", + "offset": 0, + "slot": "303", + "type": "t_struct(Balances)133658_storage", + "contract": "StakeAllocator", + "src": "contracts/components/staking/allocation/StakeAllocator.sol:39" + } + ], + "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(IAccessControl)15000": { + "label": "contract IAccessControl", + "numberOfBytes": "20" + }, + "t_mapping(t_uint256,t_uint256)": { + "label": "mapping(uint256 => uint256)", + "numberOfBytes": "32" + }, + "t_struct(Balances)133658_storage": { + "label": "struct Distributions.Balances", + "members": [ + { + "label": "_balances", + "type": "t_mapping(t_uint256,t_uint256)", + "offset": 0, + "slot": "0" + }, + { + "label": "_totalSupply", + "type": "t_uint256", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "d0421b5a01173f803ed4925cf86906beaad723bef92779c8de57497d88086feb": { + "address": "0xfc3642038a312Ff983BdBC1F5C900eEC20AaFfB6", + "txHash": "0xa31c30f5f228b0f8bfe9b01c571c2f737613109a83035fd282cd19cd981c4256", + "layout": { + "solcVersion": "0.8.9", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_accessControl", + "offset": 0, + "slot": "51", + "type": "t_contract(IAccessControl)15000", + "contract": "AccessManagedUpgradeable", + "src": "contracts/components/utils/AccessManaged.sol:16" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessManagedUpgradeable", + "src": "contracts/components/utils/AccessManaged.sol:68" + }, + { + "label": "_deprecated_router", + "offset": 0, + "slot": "101", + "type": "t_address", + "contract": "RoutedUpgradeable", + "src": "contracts/components/utils/Routed.sol:16", + "retypedFrom": "contract IRouter", + "renamedFrom": "_router" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "RoutedUpgradeable", + "src": "contracts/components/utils/Routed.sol:35" + }, + { + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC1967UpgradeUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:211" + }, + { + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage", + "contract": "UUPSUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:107" + }, + { + "label": "__gap", + "offset": 0, + "slot": "251", + "type": "t_array(t_uint256)50_storage", + "contract": "BaseComponentUpgradeable", + "src": "contracts/components/BaseComponentUpgradeable.sol:62" + }, + { + "label": "unclaimedRewards", + "offset": 0, + "slot": "301", + "type": "t_uint256", + "contract": "RewardsDistributor", + "src": "contracts/components/staking/rewards/RewardsDistributor.sol:36" + }, + { + "label": "_rewardsAccumulators", + "offset": 0, + "slot": "302", + "type": "t_mapping(t_uint256,t_struct(DelegatedAccRewards)128442_storage)", + "contract": "RewardsDistributor", + "src": "contracts/components/staking/rewards/RewardsDistributor.sol:38" + }, + { + "label": "rewardsPerEpoch", + "offset": 0, + "slot": "303", + "type": "t_mapping(t_uint256,t_mapping(t_uint256,t_uint256))", + "contract": "RewardsDistributor", + "src": "contracts/components/staking/rewards/RewardsDistributor.sol:40" + }, + { + "label": "rewardedEpochs", + "offset": 0, + "slot": "304", + "type": "t_mapping(t_uint256,t_mapping(t_uint256,t_bool))", + "contract": "RewardsDistributor", + "src": "contracts/components/staking/rewards/RewardsDistributor.sol:42" + }, + { + "label": "claimedRewardsPerEpoch", + "offset": 0, + "slot": "305", + "type": "t_mapping(t_uint256,t_mapping(t_uint256,t_mapping(t_address,t_bool)))", + "contract": "RewardsDistributor", + "src": "contracts/components/staking/rewards/RewardsDistributor.sol:44" + }, + { + "label": "delegationFees", + "offset": 0, + "slot": "306", + "type": "t_mapping(t_uint256,t_array(t_struct(DelegationFee)128474_storage)2_storage)", + "contract": "RewardsDistributor", + "src": "contracts/components/staking/rewards/RewardsDistributor.sol:51" + }, + { + "label": "delegationParamsEpochDelay", + "offset": 0, + "slot": "307", + "type": "t_uint256", + "contract": "RewardsDistributor", + "src": "contracts/components/staking/rewards/RewardsDistributor.sol:53" + }, + { + "label": "defaultFeeBps", + "offset": 0, + "slot": "308", + "type": "t_uint256", + "contract": "RewardsDistributor", + "src": "contracts/components/staking/rewards/RewardsDistributor.sol:54" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_struct(DelegationFee)128474_storage)2_storage": { + "label": "struct RewardsDistributor.DelegationFee[2]", + "numberOfBytes": "64" + }, + "t_array(t_struct(EpochCheckpoint)127855_storage)dyn_storage": { + "label": "struct Accumulators.EpochCheckpoint[]", + "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(IAccessControl)15000": { + "label": "contract IAccessControl", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(Accumulator)127860_storage)": { + "label": "mapping(address => struct Accumulators.Accumulator)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_array(t_struct(DelegationFee)128474_storage)2_storage)": { + "label": "mapping(uint256 => struct RewardsDistributor.DelegationFee[2])", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_bool)": { + "label": "mapping(uint256 => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_mapping(t_address,t_bool))": { + "label": "mapping(uint256 => mapping(address => bool))", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_mapping(t_uint256,t_bool))": { + "label": "mapping(uint256 => mapping(uint256 => bool))", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_mapping(t_uint256,t_mapping(t_address,t_bool)))": { + "label": "mapping(uint256 => mapping(uint256 => mapping(address => bool)))", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_mapping(t_uint256,t_uint256))": { + "label": "mapping(uint256 => mapping(uint256 => uint256))", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_struct(DelegatedAccRewards)128442_storage)": { + "label": "mapping(uint256 => struct RewardsDistributor.DelegatedAccRewards)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_uint256)": { + "label": "mapping(uint256 => uint256)", + "numberOfBytes": "32" + }, + "t_struct(Accumulator)127860_storage": { + "label": "struct Accumulators.Accumulator", + "members": [ + { + "label": "checkpoints", + "type": "t_array(t_struct(EpochCheckpoint)127855_storage)dyn_storage", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(DelegatedAccRewards)128442_storage": { + "label": "struct RewardsDistributor.DelegatedAccRewards", + "members": [ + { + "label": "delegated", + "type": "t_struct(Accumulator)127860_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "delegators", + "type": "t_struct(Accumulator)127860_storage", + "offset": 0, + "slot": "1" + }, + { + "label": "delegatorsTotal", + "type": "t_struct(Accumulator)127860_storage", + "offset": 0, + "slot": "2" + }, + { + "label": "delegatorsPortions", + "type": "t_mapping(t_address,t_struct(Accumulator)127860_storage)", + "offset": 0, + "slot": "3" + } + ], + "numberOfBytes": "128" + }, + "t_struct(DelegationFee)128474_storage": { + "label": "struct RewardsDistributor.DelegationFee", + "members": [ + { + "label": "feeBps", + "type": "t_uint16", + "offset": 0, + "slot": "0" + }, + { + "label": "sinceEpoch", + "type": "t_uint240", + "offset": 2, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(EpochCheckpoint)127855_storage": { + "label": "struct Accumulators.EpochCheckpoint", + "members": [ + { + "label": "timestamp", + "type": "t_uint32", + "offset": 0, + "slot": "0" + }, + { + "label": "rate", + "type": "t_uint224", + "offset": 4, + "slot": "0" + }, + { + "label": "value", + "type": "t_uint256", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint16": { + "label": "uint16", + "numberOfBytes": "2" + }, + "t_uint224": { + "label": "uint224", + "numberOfBytes": "28" + }, + "t_uint240": { + "label": "uint240", + "numberOfBytes": "30" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } } } } diff --git a/releases/1.2.9/polygon/output/prepared-upgrades.json b/releases/1.2.9/polygon/output/prepared-upgrades.json new file mode 100644 index 00000000..49d54ff8 --- /dev/null +++ b/releases/1.2.9/polygon/output/prepared-upgrades.json @@ -0,0 +1,79 @@ +{ + "access-manager": { + "impl": { + "address": "0x739707848131F41aCd1d78A56FE0eA02052811Df", + "constructor-args": [ + "0xff771084D7C2e54C0F9cA79dA23656514D2c5dd2" + ], + "init-args": [], + "name": "AccessManager", + "timeout": 1200000, + "version": "0.1.0" + } + }, + "agent-registry": { + "impl": { + "address": "0xE7e6c9A579eF43FfE629F9B99a9e4585ae69ED9c", + "constructor-args": [ + "0xff771084D7C2e54C0F9cA79dA23656514D2c5dd2" + ], + "init-args": [], + "name": "AgentRegistry", + "timeout": 1200000, + "version": "0.1.6" + } + }, + "scanner-pool-registry": { + "impl": { + "address": "0x92FA117c7c071cC11b544931c46c9e3096d6FcB1", + "constructor-args": [ + "0xff771084D7C2e54C0F9cA79dA23656514D2c5dd2", + "0x5B73756e637A77Fa52e5Ce71EC6189A4C775c6FA" + ], + "init-args": [], + "name": "ScannerPoolRegistry", + "timeout": 1200000, + "version": "0.1.0" + } + }, + "dispatch": { + "impl": { + "address": "0xB5F1A9C329924Fe8203A91aa891182d4E331fF0A", + "constructor-args": [ + "0xff771084D7C2e54C0F9cA79dA23656514D2c5dd2" + ], + "init-args": [], + "name": "Dispatch", + "timeout": 1200000, + "version": "0.1.5" + } + }, + "stake-allocator": { + "impl": { + "address": "0x8A9B40aE0cCa4f602CA3E4f68114b69C794571F0", + "constructor-args": [ + "0xff771084D7C2e54C0F9cA79dA23656514D2c5dd2", + "0x587969Add789c13F64Bcc34Ff253BD9BFB78f38a", + "0xf7239f26b79145297737166b0C66F4919af9c507" + ], + "init-args": [], + "name": "StakeAllocator", + "timeout": 1200000, + "version": "0.1.0" + } + }, + "rewards-distributor": { + "impl": { + "address": "0xfc3642038a312Ff983BdBC1F5C900eEC20AaFfB6", + "constructor-args": [ + "0xff771084D7C2e54C0F9cA79dA23656514D2c5dd2", + "0x9ff62d1FC52A907B6DCbA8077c2DDCA6E6a9d3e1", + "0x587969Add789c13F64Bcc34Ff253BD9BFB78f38a" + ], + "init-args": [], + "name": "RewardsDistributor", + "timeout": 1200000, + "version": "0.1.0" + } + } +} \ No newline at end of file From 10dbadbdf6b3734f2973edf4ab2b2175266d58c1 Mon Sep 17 00:00:00 2001 From: Roberto Cantu Date: Tue, 5 Dec 2023 15:56:32 -0600 Subject: [PATCH 05/44] Remove SlashingController from upgrade.json; update release workflow --- .github/workflows/release.yml | 4 ++-- releases/1.2.9/index.yml | 1 - releases/1.2.9/polygon/config/upgrade.json | 12 ------------ 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 04431953..e431b0c4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -259,8 +259,8 @@ jobs: timeout-minutes: 20 environment: production needs: - - prepare - # - deploy + # - prepare + - deploy steps: - uses: actions/checkout@v3 with: diff --git a/releases/1.2.9/index.yml b/releases/1.2.9/index.yml index de32f7e0..021f7a33 100644 --- a/releases/1.2.9/index.yml +++ b/releases/1.2.9/index.yml @@ -11,7 +11,6 @@ description: | - Dispatch - StakeAllocator - RewardsDistributor - - SlashingController - StakeSubjectGateway - FortaStaking diff --git a/releases/1.2.9/polygon/config/upgrade.json b/releases/1.2.9/polygon/config/upgrade.json index 56ee83a5..1799a7ae 100644 --- a/releases/1.2.9/polygon/config/upgrade.json +++ b/releases/1.2.9/polygon/config/upgrade.json @@ -74,18 +74,6 @@ } }, - "SlashingController": { - "impl": { - "opts": { - "unsafe-allow": [ - "delegatecall" - ], - "constructor-args": [ - "deployment.forwarder", "deployment.forta" - ] - } - } - }, "StakeSubjectGateway": { "impl": { "opts": { From 1ad631aded022dbc2ac17490f9b49c2851bf64e7 Mon Sep 17 00:00:00 2001 From: RCantu92 Date: Tue, 5 Dec 2023 22:14:42 +0000 Subject: [PATCH 06/44] Update registries of deployed addresses --- .openzeppelin/polygon.json | 569 ++++++++++++++++++ .../polygon/output/prepared-upgrades.json | 24 + 2 files changed, 593 insertions(+) diff --git a/.openzeppelin/polygon.json b/.openzeppelin/polygon.json index 50800435..c97e3f64 100644 --- a/.openzeppelin/polygon.json +++ b/.openzeppelin/polygon.json @@ -16846,6 +16846,575 @@ } } } + }, + "3c0c4a8e04aaf670c8acbfb266d6da3562e912405ce93ea31220aab33b2f09ec": { + "address": "0x6C85A754F9c79178D9701e91C29C995f227D7551", + "txHash": "0x137bf8433128f04ccfbef81e9901c14b5ae2a3d71fd05f54409f5a1218488cb9", + "layout": { + "solcVersion": "0.8.9", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_accessControl", + "offset": 0, + "slot": "51", + "type": "t_contract(IAccessControl)15000", + "contract": "AccessManagedUpgradeable", + "src": "contracts/components/utils/AccessManaged.sol:16" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessManagedUpgradeable", + "src": "contracts/components/utils/AccessManaged.sol:68" + }, + { + "label": "_deprecated_router", + "offset": 0, + "slot": "101", + "type": "t_address", + "contract": "RoutedUpgradeable", + "src": "contracts/components/utils/Routed.sol:16", + "retypedFrom": "contract IRouter", + "renamedFrom": "_router" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "RoutedUpgradeable", + "src": "contracts/components/utils/Routed.sol:35" + }, + { + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC1967UpgradeUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:211" + }, + { + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage", + "contract": "UUPSUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:107" + }, + { + "label": "__gap", + "offset": 0, + "slot": "251", + "type": "t_array(t_uint256)50_storage", + "contract": "BaseComponentUpgradeable", + "src": "contracts/components/BaseComponentUpgradeable.sol:62" + }, + { + "label": "_fortaStaking", + "offset": 0, + "slot": "301", + "type": "t_contract(FortaStaking)126178", + "contract": "StakeSubjectGateway", + "src": "contracts/components/staking/stake_subjects/StakeSubjectGateway.sol:17" + }, + { + "label": "_stakeSubjects", + "offset": 0, + "slot": "302", + "type": "t_mapping(t_uint8,t_address)", + "contract": "StakeSubjectGateway", + "src": "contracts/components/staking/stake_subjects/StakeSubjectGateway.sol:21", + "retypedFrom": "mapping(uint8 => contract IStakeSubject)", + "renamedFrom": "_stakeSubjectHandlers" + } + ], + "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(FortaStaking)126178": { + "label": "contract FortaStaking", + "numberOfBytes": "20" + }, + "t_contract(IAccessControl)15000": { + "label": "contract IAccessControl", + "numberOfBytes": "20" + }, + "t_mapping(t_uint8,t_address)": { + "label": "mapping(uint8 => address)", + "numberOfBytes": "32" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "8c0ce41525320fcf3697006300ba522ed3ace1d66eeac06661e597850b6c4813": { + "address": "0xeA359707f17Aeb000c9385b4Bfd1cC7be62d4Bc7", + "txHash": "0x7478e61790678d8c661f18ee5413d51cf1959537e47164e24a5245fd4a5bedc3", + "layout": { + "solcVersion": "0.8.9", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_accessControl", + "offset": 0, + "slot": "51", + "type": "t_contract(IAccessControl)15000", + "contract": "AccessManagedUpgradeable", + "src": "contracts/components/utils/AccessManaged.sol:16" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessManagedUpgradeable", + "src": "contracts/components/utils/AccessManaged.sol:68" + }, + { + "label": "_deprecated_router", + "offset": 0, + "slot": "101", + "type": "t_address", + "contract": "RoutedUpgradeable", + "src": "contracts/components/utils/Routed.sol:16", + "retypedFrom": "contract IRouter", + "renamedFrom": "_router" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "RoutedUpgradeable", + "src": "contracts/components/utils/Routed.sol:35" + }, + { + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC1967UpgradeUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:211" + }, + { + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage", + "contract": "UUPSUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:107" + }, + { + "label": "__gap", + "offset": 0, + "slot": "251", + "type": "t_array(t_uint256)50_storage", + "contract": "BaseComponentUpgradeable", + "src": "contracts/components/BaseComponentUpgradeable.sol:62" + }, + { + "label": "__gap", + "offset": 0, + "slot": "301", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC165Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol:41" + }, + { + "label": "_balances", + "offset": 0, + "slot": "351", + "type": "t_mapping(t_uint256,t_mapping(t_address,t_uint256))", + "contract": "ERC1155Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol:25" + }, + { + "label": "_operatorApprovals", + "offset": 0, + "slot": "352", + "type": "t_mapping(t_address,t_mapping(t_address,t_bool))", + "contract": "ERC1155Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol:28" + }, + { + "label": "_uri", + "offset": 0, + "slot": "353", + "type": "t_string_storage", + "contract": "ERC1155Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol:31" + }, + { + "label": "__gap", + "offset": 0, + "slot": "354", + "type": "t_array(t_uint256)47_storage", + "contract": "ERC1155Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol:528" + }, + { + "label": "_totalSupply", + "offset": 0, + "slot": "401", + "type": "t_mapping(t_uint256,t_uint256)", + "contract": "ERC1155SupplyUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155SupplyUpgradeable.sol:23" + }, + { + "label": "__gap", + "offset": 0, + "slot": "402", + "type": "t_array(t_uint256)49_storage", + "contract": "ERC1155SupplyUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155SupplyUpgradeable.sol:76" + }, + { + "label": "stakedToken", + "offset": 0, + "slot": "451", + "type": "t_contract(IERC20)16030", + "contract": "FortaStaking", + "src": "contracts/components/staking/FortaStaking.sol:60" + }, + { + "label": "_activeStake", + "offset": 0, + "slot": "452", + "type": "t_struct(Balances)133658_storage", + "contract": "FortaStaking", + "src": "contracts/components/staking/FortaStaking.sol:63" + }, + { + "label": "_inactiveStake", + "offset": 0, + "slot": "454", + "type": "t_struct(Balances)133658_storage", + "contract": "FortaStaking", + "src": "contracts/components/staking/FortaStaking.sol:65" + }, + { + "label": "_lockingDelay", + "offset": 0, + "slot": "456", + "type": "t_mapping(t_uint256,t_mapping(t_address,t_struct(Timestamp)17859_storage))", + "contract": "FortaStaking", + "src": "contracts/components/staking/FortaStaking.sol:67" + }, + { + "label": "_rewards", + "offset": 0, + "slot": "457", + "type": "t_struct(Balances)133658_storage", + "contract": "FortaStaking", + "src": "contracts/components/staking/FortaStaking.sol:70" + }, + { + "label": "_released", + "offset": 0, + "slot": "459", + "type": "t_mapping(t_uint256,t_struct(SignedBalances)133772_storage)", + "contract": "FortaStaking", + "src": "contracts/components/staking/FortaStaking.sol:72" + }, + { + "label": "_deprecated_frozen", + "offset": 0, + "slot": "460", + "type": "t_mapping(t_uint256,t_bool)", + "contract": "FortaStaking", + "src": "contracts/components/staking/FortaStaking.sol:75", + "renamedFrom": "_frozen" + }, + { + "label": "_withdrawalDelay", + "offset": 0, + "slot": "461", + "type": "t_uint64", + "contract": "FortaStaking", + "src": "contracts/components/staking/FortaStaking.sol:76" + }, + { + "label": "_treasury", + "offset": 8, + "slot": "461", + "type": "t_address", + "contract": "FortaStaking", + "src": "contracts/components/staking/FortaStaking.sol:79" + }, + { + "label": "subjectGateway", + "offset": 0, + "slot": "462", + "type": "t_contract(IStakeSubjectGateway)131769", + "contract": "FortaStaking", + "src": "contracts/components/staking/FortaStaking.sol:82", + "retypedFrom": "IStakeController", + "renamedFrom": "_stakingParameters" + }, + { + "label": "slashDelegatorsPercent", + "offset": 0, + "slot": "463", + "type": "t_uint256", + "contract": "FortaStaking", + "src": "contracts/components/staking/FortaStaking.sol:84" + }, + { + "label": "allocator", + "offset": 0, + "slot": "464", + "type": "t_contract(IStakeAllocator)126629", + "contract": "FortaStaking", + "src": "contracts/components/staking/FortaStaking.sol:85" + }, + { + "label": "openProposals", + "offset": 0, + "slot": "465", + "type": "t_mapping(t_uint256,t_uint256)", + "contract": "FortaStaking", + "src": "contracts/components/staking/FortaStaking.sol:86" + }, + { + "label": "_reentrancyStatus", + "offset": 0, + "slot": "466", + "type": "t_uint256", + "contract": "FortaStaking", + "src": "contracts/components/staking/FortaStaking.sol:88" + }, + { + "label": "__gap", + "offset": 0, + "slot": "467", + "type": "t_array(t_uint256)36_storage", + "contract": "FortaStaking", + "src": "contracts/components/staking/FortaStaking.sol:714" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)36_storage": { + "label": "uint256[36]", + "numberOfBytes": "1152" + }, + "t_array(t_uint256)47_storage": { + "label": "uint256[47]", + "numberOfBytes": "1504" + }, + "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(IAccessControl)15000": { + "label": "contract IAccessControl", + "numberOfBytes": "20" + }, + "t_contract(IERC20)16030": { + "label": "contract IERC20", + "numberOfBytes": "20" + }, + "t_contract(IStakeAllocator)126629": { + "label": "contract IStakeAllocator", + "numberOfBytes": "20" + }, + "t_contract(IStakeSubjectGateway)131769": { + "label": "contract IStakeSubjectGateway", + "numberOfBytes": "20" + }, + "t_int256": { + "label": "int256", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_int256)": { + "label": "mapping(address => int256)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_mapping(t_address,t_bool))": { + "label": "mapping(address => mapping(address => bool))", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(Timestamp)17859_storage)": { + "label": "mapping(address => struct Timers.Timestamp)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_bool)": { + "label": "mapping(uint256 => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_mapping(t_address,t_struct(Timestamp)17859_storage))": { + "label": "mapping(uint256 => mapping(address => struct Timers.Timestamp))", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_mapping(t_address,t_uint256))": { + "label": "mapping(uint256 => mapping(address => uint256))", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_struct(SignedBalances)133772_storage)": { + "label": "mapping(uint256 => struct Distributions.SignedBalances)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_uint256)": { + "label": "mapping(uint256 => uint256)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Balances)133658_storage": { + "label": "struct Distributions.Balances", + "members": [ + { + "label": "_balances", + "type": "t_mapping(t_uint256,t_uint256)", + "offset": 0, + "slot": "0" + }, + { + "label": "_totalSupply", + "type": "t_uint256", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_struct(SignedBalances)133772_storage": { + "label": "struct Distributions.SignedBalances", + "members": [ + { + "label": "_balances", + "type": "t_mapping(t_address,t_int256)", + "offset": 0, + "slot": "0" + }, + { + "label": "_totalSupply", + "type": "t_int256", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Timestamp)17859_storage": { + "label": "struct Timers.Timestamp", + "members": [ + { + "label": "_deadline", + "type": "t_uint64", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } } } } diff --git a/releases/1.2.9/polygon/output/prepared-upgrades.json b/releases/1.2.9/polygon/output/prepared-upgrades.json index 49d54ff8..e68b637f 100644 --- a/releases/1.2.9/polygon/output/prepared-upgrades.json +++ b/releases/1.2.9/polygon/output/prepared-upgrades.json @@ -75,5 +75,29 @@ "timeout": 1200000, "version": "0.1.0" } + }, + "stake-subject-gateway": { + "impl": { + "address": "0x6C85A754F9c79178D9701e91C29C995f227D7551", + "constructor-args": [ + "0xff771084D7C2e54C0F9cA79dA23656514D2c5dd2" + ], + "init-args": [], + "name": "StakeSubjectGateway", + "timeout": 1200000, + "version": "0.1.1" + } + }, + "forta-staking": { + "impl": { + "address": "0xeA359707f17Aeb000c9385b4Bfd1cC7be62d4Bc7", + "constructor-args": [ + "0xff771084D7C2e54C0F9cA79dA23656514D2c5dd2" + ], + "init-args": [], + "name": "FortaStaking", + "timeout": 1200000, + "version": "0.1.2" + } } } \ No newline at end of file From eb7ce86ba037bca6778bc9666fca8d2605f7255f Mon Sep 17 00:00:00 2001 From: Roberto Cantu Date: Tue, 5 Dec 2023 20:01:22 -0600 Subject: [PATCH 07/44] release/1.2.9 --- .github/workflows/release.yml | 154 ++++++++++----------- releases/1.2.2/polygon/config/upgrade.json | 87 ++++++++++++ releases/1.2.9/index.yml | 18 +-- releases/1.2.9/mumbai/config/upgrade.json | 101 ++++++++++++++ 4 files changed, 267 insertions(+), 93 deletions(-) create mode 100644 releases/1.2.9/mumbai/config/upgrade.json diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e431b0c4..59fd9721 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,50 +40,50 @@ jobs: path: | artifacts cache/*.json - test: - name: Test release - if: startsWith(github.head_ref, 'release/') - runs-on: ubuntu-22.04 - # timeout-minutes: 20 - needs: build - steps: - - uses: actions/checkout@v3 - with: - ref: ${{ github.event.pull_request.head.sha }} - - uses: actions/setup-node@v3 - with: - node-version: '14' - cache: 'yarn' - - run: yarn install --frozen-lockfile + # test: + # name: Test release + # if: startsWith(github.head_ref, 'release/') + # runs-on: ubuntu-22.04 + # # timeout-minutes: 20 + # needs: build + # steps: + # - uses: actions/checkout@v3 + # with: + # ref: ${{ github.event.pull_request.head.sha }} + # - uses: actions/setup-node@v3 + # with: + # node-version: '14' + # cache: 'yarn' + # - run: yarn install --frozen-lockfile - - name: Get build artifacts - uses: actions/download-artifact@v3 - with: - name: contract-artifacts + # - name: Get build artifacts + # uses: actions/download-artifact@v3 + # with: + # name: contract-artifacts - - name: Run unit tests - run: yarn test --no-compile + # - name: Run unit tests + # run: yarn test --no-compile - coverage: - name: Code coverage - if: startsWith(github.head_ref, 'release/') - runs-on: ubuntu-22.04 - # needs: test - needs: build - steps: - - uses: actions/checkout@v3 - with: - ref: ${{ github.event.pull_request.head.sha }} - - uses: actions/setup-node@v3 - with: - node-version: '14' - cache: 'yarn' - - run: yarn install --frozen-lockfile + # coverage: + # name: Code coverage + # if: startsWith(github.head_ref, 'release/') + # runs-on: ubuntu-22.04 + # needs: test + # # needs: build + # steps: + # - uses: actions/checkout@v3 + # with: + # ref: ${{ github.event.pull_request.head.sha }} + # - uses: actions/setup-node@v3 + # with: + # node-version: '14' + # cache: 'yarn' + # - run: yarn install --frozen-lockfile - - run: yarn coverage - - uses: codecov/codecov-action@v3 - with: - token: ${{ secrets.CODECOV_TOKEN }} + # - run: yarn coverage + # - uses: codecov/codecov-action@v3 + # with: + # token: ${{ secrets.CODECOV_TOKEN }} prepare: name: Prepare release @@ -213,44 +213,44 @@ jobs: skip_checkout: true # tagging_message: '${{ needs.prepare.outputs.release_version }}' - verify: - name: Verify contracts - if: "startsWith(github.head_ref, 'release/') && needs.prepare.outputs.release_verify_cmd != ''" - runs-on: ubuntu-22.04 - timeout-minutes: 60 - needs: - - build - - prepare - - deploy - steps: - - uses: actions/checkout@v3 - with: - ref: ${{ needs.deploy.outputs.deploy_commit || github.event.pull_request.head.sha }} - - uses: actions/setup-node@v3 - with: - node-version: '14' - cache: 'yarn' - - run: yarn install --frozen-lockfile + # verify: + # name: Verify contracts + # if: "startsWith(github.head_ref, 'release/') && needs.prepare.outputs.release_verify_cmd != ''" + # runs-on: ubuntu-22.04 + # timeout-minutes: 60 + # needs: + # - build + # - prepare + # - deploy + # steps: + # - uses: actions/checkout@v3 + # with: + # ref: ${{ needs.deploy.outputs.deploy_commit || github.event.pull_request.head.sha }} + # - uses: actions/setup-node@v3 + # with: + # node-version: '14' + # cache: 'yarn' + # - run: yarn install --frozen-lockfile - - name: Get build artifacts - uses: actions/download-artifact@v3 - with: - name: contract-artifacts + # - name: Get build artifacts + # uses: actions/download-artifact@v3 + # with: + # name: contract-artifacts - - name: Verify contracts - shell: bash - run: | - yarn hardhat --network ${{ needs.prepare.outputs.release_network }} ${{ needs.prepare.outputs.release_verify_cmd }} ${{ needs.prepare.outputs.release_version }} - env: - INFURA_PROJECT_ID: '${{ secrets.INFURA_PROJECT_ID }}' - MUMBAI_MNEMONIC: '${{ secrets.MUMBAI_MNEMONIC }}' - MUMBAI_NODE: '${{ secrets.MUMBAI_NODE }}' - POLYGON_MNEMONIC: '${{ secrets.POLYGON_MNEMONIC }}' - POLYGON_NODE: '${{ secrets.POLYGON_NODE }}' - # ETHERSCAN "${{ secrets.ETHERSCAN }}" - POLYSCAN: '${{ secrets.POLYSCAN }}' - RELEASE_PATH: '${{ needs.prepare.outputs.release_path }}' - ARTIFACT_REFERENCE_URL: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' + # - name: Verify contracts + # shell: bash + # run: | + # yarn hardhat --network ${{ needs.prepare.outputs.release_network }} ${{ needs.prepare.outputs.release_verify_cmd }} ${{ needs.prepare.outputs.release_version }} + # env: + # INFURA_PROJECT_ID: '${{ secrets.INFURA_PROJECT_ID }}' + # MUMBAI_MNEMONIC: '${{ secrets.MUMBAI_MNEMONIC }}' + # MUMBAI_NODE: '${{ secrets.MUMBAI_NODE }}' + # POLYGON_MNEMONIC: '${{ secrets.POLYGON_MNEMONIC }}' + # POLYGON_NODE: '${{ secrets.POLYGON_NODE }}' + # # ETHERSCAN "${{ secrets.ETHERSCAN }}" + # POLYSCAN: '${{ secrets.POLYSCAN }}' + # RELEASE_PATH: '${{ needs.prepare.outputs.release_path }}' + # ARTIFACT_REFERENCE_URL: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' finish-release: name: Finish release @@ -259,7 +259,7 @@ jobs: timeout-minutes: 20 environment: production needs: - # - prepare + - prepare - deploy steps: - uses: actions/checkout@v3 diff --git a/releases/1.2.2/polygon/config/upgrade.json b/releases/1.2.2/polygon/config/upgrade.json index 0a4e97bc..1799a7ae 100644 --- a/releases/1.2.2/polygon/config/upgrade.json +++ b/releases/1.2.2/polygon/config/upgrade.json @@ -1,4 +1,66 @@ { + "AccessManager": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder" + ] + } + } + }, + "AgentRegistry": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder" + ] + } + } + }, + "ScannerPoolRegistry": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder", "deployment.stake-allocator" + ] + } + + } + }, + "Dispatch": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder" + ] + } + } + }, + "StakeAllocator": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder", "deployment.stake-subject-gateway", "deployment.rewards-distributor" + ] + } + + } + }, "RewardsDistributor": { "impl": { "opts": { @@ -9,6 +71,31 @@ "deployment.forwarder", "deployment.forta", "deployment.stake-subject-gateway" ] } + + } + }, + "StakeSubjectGateway": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder" + ] + } + } + }, + "FortaStaking": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder" + ] + } } } } \ No newline at end of file diff --git a/releases/1.2.9/index.yml b/releases/1.2.9/index.yml index 021f7a33..53899200 100644 --- a/releases/1.2.9/index.yml +++ b/releases/1.2.9/index.yml @@ -1,21 +1,7 @@ -title: Remove metatransaction functionality +title: Release network: polygon deploy: prepare-upgrade 1.2.9 verify: verify-deployed finish: propose-admin description: | - ## Deployed new implementations: - - AccessManager - - AgentRegistry - - ScannerPoolRegistry - - Dispatch - - StakeAllocator - - RewardsDistributor - - StakeSubjectGateway - - FortaStaking - - ## Output tx: - - `ForwardedContext` no longer checks for valid forwarder - - New implementations all inherited `BaseComponentUpgradeable`, - which in turn inherited `ForwardedContext`. Hence the - number of new implementations. \ No newline at end of file + Release/1.9.0 \ No newline at end of file diff --git a/releases/1.2.9/mumbai/config/upgrade.json b/releases/1.2.9/mumbai/config/upgrade.json new file mode 100644 index 00000000..1799a7ae --- /dev/null +++ b/releases/1.2.9/mumbai/config/upgrade.json @@ -0,0 +1,101 @@ +{ + "AccessManager": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder" + ] + } + } + }, + "AgentRegistry": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder" + ] + } + } + }, + "ScannerPoolRegistry": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder", "deployment.stake-allocator" + ] + } + + } + }, + "Dispatch": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder" + ] + } + } + }, + "StakeAllocator": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder", "deployment.stake-subject-gateway", "deployment.rewards-distributor" + ] + } + + } + }, + "RewardsDistributor": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder", "deployment.forta", "deployment.stake-subject-gateway" + ] + } + + } + }, + "StakeSubjectGateway": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder" + ] + } + } + }, + "FortaStaking": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder" + ] + } + } + } +} \ No newline at end of file From f50621e50bb6a31372c0022e4424438b9a1345ab Mon Sep 17 00:00:00 2001 From: Roberto Cantu Date: Tue, 5 Dec 2023 20:04:23 -0600 Subject: [PATCH 08/44] release/1.2.10 --- releases/{1.2.9 => 1.2.10}/index.yml | 2 +- releases/{1.2.9 => 1.2.10}/mumbai/config/upgrade.json | 0 releases/{1.2.9 => 1.2.10}/polygon/config/upgrade.json | 0 .../{1.2.9 => 1.2.10}/polygon/output/prepared-upgrades.json | 0 4 files changed, 1 insertion(+), 1 deletion(-) rename releases/{1.2.9 => 1.2.10}/index.yml (77%) rename releases/{1.2.9 => 1.2.10}/mumbai/config/upgrade.json (100%) rename releases/{1.2.9 => 1.2.10}/polygon/config/upgrade.json (100%) rename releases/{1.2.9 => 1.2.10}/polygon/output/prepared-upgrades.json (100%) diff --git a/releases/1.2.9/index.yml b/releases/1.2.10/index.yml similarity index 77% rename from releases/1.2.9/index.yml rename to releases/1.2.10/index.yml index 53899200..d4654be0 100644 --- a/releases/1.2.9/index.yml +++ b/releases/1.2.10/index.yml @@ -1,6 +1,6 @@ title: Release network: polygon -deploy: prepare-upgrade 1.2.9 +deploy: prepare-upgrade 1.2.10 verify: verify-deployed finish: propose-admin description: | diff --git a/releases/1.2.9/mumbai/config/upgrade.json b/releases/1.2.10/mumbai/config/upgrade.json similarity index 100% rename from releases/1.2.9/mumbai/config/upgrade.json rename to releases/1.2.10/mumbai/config/upgrade.json diff --git a/releases/1.2.9/polygon/config/upgrade.json b/releases/1.2.10/polygon/config/upgrade.json similarity index 100% rename from releases/1.2.9/polygon/config/upgrade.json rename to releases/1.2.10/polygon/config/upgrade.json diff --git a/releases/1.2.9/polygon/output/prepared-upgrades.json b/releases/1.2.10/polygon/output/prepared-upgrades.json similarity index 100% rename from releases/1.2.9/polygon/output/prepared-upgrades.json rename to releases/1.2.10/polygon/output/prepared-upgrades.json From 686466e8ecf96052c80f9cf6398222eaa24a0169 Mon Sep 17 00:00:00 2001 From: Roberto Cantu Date: Tue, 5 Dec 2023 20:07:12 -0600 Subject: [PATCH 09/44] release.yml --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 59fd9721..d901e186 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -251,6 +251,7 @@ jobs: # POLYSCAN: '${{ secrets.POLYSCAN }}' # RELEASE_PATH: '${{ needs.prepare.outputs.release_path }}' # ARTIFACT_REFERENCE_URL: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' + # finish-release: name: Finish release From 2e5095332d1133d5f4b7f72bfd9e78ef107c7691 Mon Sep 17 00:00:00 2001 From: Roberto Cantu Date: Tue, 5 Dec 2023 20:08:34 -0600 Subject: [PATCH 10/44] workflow on push --- .github/workflows/release.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d901e186..405ba0db 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,7 +2,7 @@ name: Release on: - pull_request: + push: branches: - 'master' - 'release/**' @@ -251,7 +251,6 @@ jobs: # POLYSCAN: '${{ secrets.POLYSCAN }}' # RELEASE_PATH: '${{ needs.prepare.outputs.release_path }}' # ARTIFACT_REFERENCE_URL: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' - # finish-release: name: Finish release From bddfaa4f9dbf2f35eebbaba45ae1588763c7d154 Mon Sep 17 00:00:00 2001 From: Roberto Cantu Date: Tue, 5 Dec 2023 20:09:38 -0600 Subject: [PATCH 11/44] workflow on push --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 405ba0db..54781f1d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -84,6 +84,7 @@ jobs: # - uses: codecov/codecov-action@v3 # with: # token: ${{ secrets.CODECOV_TOKEN }} + # prepare: name: Prepare release From 4aabc3bce31545f86d63d4c3e0dd39a893abf607 Mon Sep 17 00:00:00 2001 From: Roberto Cantu Date: Tue, 5 Dec 2023 20:12:12 -0600 Subject: [PATCH 12/44] if checks removed --- .github/workflows/release.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 54781f1d..94966469 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ defaults: jobs: build: name: Build release - if: startsWith(github.head_ref, 'release/') + # if: startsWith(github.head_ref, 'release/') runs-on: ubuntu-22.04 timeout-minutes: 10 env: @@ -88,7 +88,7 @@ jobs: prepare: name: Prepare release - if: startsWith(github.head_ref, 'release/') + # if: startsWith(github.head_ref, 'release/') runs-on: ubuntu-22.04 # needs: coverage needs: build @@ -167,7 +167,7 @@ jobs: deploy: name: Deploy contracts - if: startsWith(github.head_ref, 'release/') + # if: startsWith(github.head_ref, 'release/') runs-on: ubuntu-22.04 timeout-minutes: 20 needs: prepare @@ -255,7 +255,7 @@ jobs: finish-release: name: Finish release - if: "startsWith(github.head_ref, 'release/')" + # if: "startsWith(github.head_ref, 'release/')" runs-on: ubuntu-22.04 timeout-minutes: 20 environment: production From 2a46ee59bd1b0fd8c020e601772638e86e76e40d Mon Sep 17 00:00:00 2001 From: Roberto Cantu Date: Tue, 5 Dec 2023 20:15:07 -0600 Subject: [PATCH 13/44] mumbai release --- releases/1.2.10/index.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/releases/1.2.10/index.yml b/releases/1.2.10/index.yml index d4654be0..eedb536e 100644 --- a/releases/1.2.10/index.yml +++ b/releases/1.2.10/index.yml @@ -1,7 +1,7 @@ title: Release -network: polygon +network: mumbai deploy: prepare-upgrade 1.2.10 verify: verify-deployed finish: propose-admin description: | - Release/1.9.0 \ No newline at end of file + release/1.2.10 \ No newline at end of file From 71d7405dc5a783e14ee18600a430b944a6fc7e01 Mon Sep 17 00:00:00 2001 From: Roberto Cantu Date: Tue, 5 Dec 2023 20:18:31 -0600 Subject: [PATCH 14/44] on pull_request --- .github/workflows/release.yml | 10 +++++----- releases/1.2.10/index.yml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 94966469..d240a0f7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,7 +2,7 @@ name: Release on: - push: + pull_request: branches: - 'master' - 'release/**' @@ -14,7 +14,7 @@ defaults: jobs: build: name: Build release - # if: startsWith(github.head_ref, 'release/') + if: startsWith(github.head_ref, 'release/') runs-on: ubuntu-22.04 timeout-minutes: 10 env: @@ -88,7 +88,7 @@ jobs: prepare: name: Prepare release - # if: startsWith(github.head_ref, 'release/') + if: startsWith(github.head_ref, 'release/') runs-on: ubuntu-22.04 # needs: coverage needs: build @@ -167,7 +167,7 @@ jobs: deploy: name: Deploy contracts - # if: startsWith(github.head_ref, 'release/') + if: startsWith(github.head_ref, 'release/') runs-on: ubuntu-22.04 timeout-minutes: 20 needs: prepare @@ -255,7 +255,7 @@ jobs: finish-release: name: Finish release - # if: "startsWith(github.head_ref, 'release/')" + if: "startsWith(github.head_ref, 'release/')" runs-on: ubuntu-22.04 timeout-minutes: 20 environment: production diff --git a/releases/1.2.10/index.yml b/releases/1.2.10/index.yml index eedb536e..76ddf6a6 100644 --- a/releases/1.2.10/index.yml +++ b/releases/1.2.10/index.yml @@ -1,5 +1,5 @@ title: Release -network: mumbai +network: polygon deploy: prepare-upgrade 1.2.10 verify: verify-deployed finish: propose-admin From ebe18e88b06c41c7f2ccb408eb81b53c1ff02e0a Mon Sep 17 00:00:00 2001 From: Roberto Cantu Date: Tue, 5 Dec 2023 20:29:46 -0600 Subject: [PATCH 15/44] Mumbai release --- .github/workflows/release.yml | 72 +++++++++++++++++------------------ releases/1.2.10/index.yml | 2 +- 2 files changed, 37 insertions(+), 37 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d240a0f7..33e5cff2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -214,44 +214,44 @@ jobs: skip_checkout: true # tagging_message: '${{ needs.prepare.outputs.release_version }}' - # verify: - # name: Verify contracts - # if: "startsWith(github.head_ref, 'release/') && needs.prepare.outputs.release_verify_cmd != ''" - # runs-on: ubuntu-22.04 - # timeout-minutes: 60 - # needs: - # - build - # - prepare - # - deploy - # steps: - # - uses: actions/checkout@v3 - # with: - # ref: ${{ needs.deploy.outputs.deploy_commit || github.event.pull_request.head.sha }} - # - uses: actions/setup-node@v3 - # with: - # node-version: '14' - # cache: 'yarn' - # - run: yarn install --frozen-lockfile + verify: + name: Verify contracts + if: "startsWith(github.head_ref, 'release/') && needs.prepare.outputs.release_verify_cmd != ''" + runs-on: ubuntu-22.04 + timeout-minutes: 60 + needs: + - build + - prepare + - deploy + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ needs.deploy.outputs.deploy_commit || github.event.pull_request.head.sha }} + - uses: actions/setup-node@v3 + with: + node-version: '14' + cache: 'yarn' + - run: yarn install --frozen-lockfile - # - name: Get build artifacts - # uses: actions/download-artifact@v3 - # with: - # name: contract-artifacts + - name: Get build artifacts + uses: actions/download-artifact@v3 + with: + name: contract-artifacts - # - name: Verify contracts - # shell: bash - # run: | - # yarn hardhat --network ${{ needs.prepare.outputs.release_network }} ${{ needs.prepare.outputs.release_verify_cmd }} ${{ needs.prepare.outputs.release_version }} - # env: - # INFURA_PROJECT_ID: '${{ secrets.INFURA_PROJECT_ID }}' - # MUMBAI_MNEMONIC: '${{ secrets.MUMBAI_MNEMONIC }}' - # MUMBAI_NODE: '${{ secrets.MUMBAI_NODE }}' - # POLYGON_MNEMONIC: '${{ secrets.POLYGON_MNEMONIC }}' - # POLYGON_NODE: '${{ secrets.POLYGON_NODE }}' - # # ETHERSCAN "${{ secrets.ETHERSCAN }}" - # POLYSCAN: '${{ secrets.POLYSCAN }}' - # RELEASE_PATH: '${{ needs.prepare.outputs.release_path }}' - # ARTIFACT_REFERENCE_URL: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' + - name: Verify contracts + shell: bash + run: | + yarn hardhat --network ${{ needs.prepare.outputs.release_network }} ${{ needs.prepare.outputs.release_verify_cmd }} ${{ needs.prepare.outputs.release_version }} + env: + INFURA_PROJECT_ID: '${{ secrets.INFURA_PROJECT_ID }}' + MUMBAI_MNEMONIC: '${{ secrets.MUMBAI_MNEMONIC }}' + MUMBAI_NODE: '${{ secrets.MUMBAI_NODE }}' + POLYGON_MNEMONIC: '${{ secrets.POLYGON_MNEMONIC }}' + POLYGON_NODE: '${{ secrets.POLYGON_NODE }}' + # ETHERSCAN "${{ secrets.ETHERSCAN }}" + POLYSCAN: '${{ secrets.POLYSCAN }}' + RELEASE_PATH: '${{ needs.prepare.outputs.release_path }}' + ARTIFACT_REFERENCE_URL: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' finish-release: name: Finish release diff --git a/releases/1.2.10/index.yml b/releases/1.2.10/index.yml index 76ddf6a6..eedb536e 100644 --- a/releases/1.2.10/index.yml +++ b/releases/1.2.10/index.yml @@ -1,5 +1,5 @@ title: Release -network: polygon +network: mumbai deploy: prepare-upgrade 1.2.10 verify: verify-deployed finish: propose-admin From a0c988dfee473c6f23d34fcb7aab20f5418a4b90 Mon Sep 17 00:00:00 2001 From: RCantu92 Date: Wed, 6 Dec 2023 02:38:36 +0000 Subject: [PATCH 16/44] Update registries of deployed addresses --- .openzeppelin/polygon-mumbai.json | 2440 +++++++++++++++++ .../mumbai/output/prepared-upgrades.json | 103 + 2 files changed, 2543 insertions(+) create mode 100644 releases/1.2.10/mumbai/output/prepared-upgrades.json diff --git a/.openzeppelin/polygon-mumbai.json b/.openzeppelin/polygon-mumbai.json index 79257003..101bc49d 100644 --- a/.openzeppelin/polygon-mumbai.json +++ b/.openzeppelin/polygon-mumbai.json @@ -26056,6 +26056,2446 @@ } } } + }, + "d0bd647c27815443147cf12f86888eadf3e01b201ecc0f1878c4f039b73bf903": { + "address": "0x5Da21607E9e2bCA241E0EA46e27cea3bB8404505", + "txHash": "0xea3dc230043755a9099da2f33d97e1b123a5b779c02dcd5d20a0426ee05eaa9c", + "layout": { + "solcVersion": "0.8.9", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC165Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol:41" + }, + { + "label": "_roles", + "offset": 0, + "slot": "101", + "type": "t_mapping(t_bytes32,t_struct(RoleData)5114_storage)", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:61" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:259" + }, + { + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC1967UpgradeUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:211" + }, + { + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage", + "contract": "UUPSUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:107" + }, + { + "label": "__gap", + "offset": 0, + "slot": "251", + "type": "t_array(t_uint256)50_storage", + "contract": "AccessManager", + "src": "contracts/components/access/AccessManager.sol:75" + } + ], + "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_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(RoleData)5114_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32" + }, + "t_struct(RoleData)5114_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "members", + "type": "t_mapping(t_address,t_bool)", + "offset": 0, + "slot": "0" + }, + { + "label": "adminRole", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "54797d2d8f362dbe3d406dc47db64613f53c30e367ecc4af0957b4cdec9ba2b2": { + "address": "0xD25Fd5B722606d08A5DdCD00e969513d06d98d89", + "txHash": "0xf176cdf2140db8ccb8a6d12f06ba5983491b1fbe5f47f388a98e657bb0a9d56d", + "layout": { + "solcVersion": "0.8.9", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_accessControl", + "offset": 0, + "slot": "51", + "type": "t_contract(IAccessControl)15000", + "contract": "AccessManagedUpgradeable", + "src": "contracts/components/utils/AccessManaged.sol:16" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessManagedUpgradeable", + "src": "contracts/components/utils/AccessManaged.sol:68" + }, + { + "label": "_deprecated_router", + "offset": 0, + "slot": "101", + "type": "t_address", + "contract": "RoutedUpgradeable", + "src": "contracts/components/utils/Routed.sol:16", + "retypedFrom": "contract IRouter", + "renamedFrom": "_router" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "RoutedUpgradeable", + "src": "contracts/components/utils/Routed.sol:35" + }, + { + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC1967UpgradeUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:211" + }, + { + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage", + "contract": "UUPSUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:107" + }, + { + "label": "__gap", + "offset": 0, + "slot": "251", + "type": "t_array(t_uint256)50_storage", + "contract": "BaseComponentUpgradeable", + "src": "contracts/components/BaseComponentUpgradeable.sol:62" + }, + { + "label": "_commits", + "offset": 0, + "slot": "301", + "type": "t_mapping(t_bytes32,t_uint256)", + "contract": "FrontRunningProtection", + "src": "contracts/tools/FrontRunningProtection.sol:12" + }, + { + "label": "__gap", + "offset": 0, + "slot": "302", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC165Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol:41" + }, + { + "label": "_name", + "offset": 0, + "slot": "352", + "type": "t_string_storage", + "contract": "ERC721Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:25" + }, + { + "label": "_symbol", + "offset": 0, + "slot": "353", + "type": "t_string_storage", + "contract": "ERC721Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:28" + }, + { + "label": "_owners", + "offset": 0, + "slot": "354", + "type": "t_mapping(t_uint256,t_address)", + "contract": "ERC721Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:31" + }, + { + "label": "_balances", + "offset": 0, + "slot": "355", + "type": "t_mapping(t_address,t_uint256)", + "contract": "ERC721Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:34" + }, + { + "label": "_tokenApprovals", + "offset": 0, + "slot": "356", + "type": "t_mapping(t_uint256,t_address)", + "contract": "ERC721Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:37" + }, + { + "label": "_operatorApprovals", + "offset": 0, + "slot": "357", + "type": "t_mapping(t_address,t_mapping(t_address,t_bool))", + "contract": "ERC721Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:40" + }, + { + "label": "__gap", + "offset": 0, + "slot": "358", + "type": "t_array(t_uint256)44_storage", + "contract": "ERC721Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:465" + }, + { + "label": "_subjectGateway", + "offset": 0, + "slot": "402", + "type": "t_contract(IStakeSubjectGateway)131769", + "contract": "DirectStakeSubjectUpgradeable", + "src": "contracts/components/staking/stake_subjects/DirectStakeSubject.sol:16", + "retypedFrom": "IStakeController", + "renamedFrom": "_stakeController" + }, + { + "label": "__gap", + "offset": 0, + "slot": "403", + "type": "t_array(t_uint256)4_storage", + "contract": "DirectStakeSubjectUpgradeable", + "src": "contracts/components/staking/stake_subjects/DirectStakeSubject.sol:64" + }, + { + "label": "_stakeThreshold", + "offset": 0, + "slot": "407", + "type": "t_struct(StakeThreshold)131636_storage", + "contract": "AgentRegistryCore", + "src": "contracts/components/agents/AgentRegistryCore.sol:14" + }, + { + "label": "frontRunningDelay", + "offset": 0, + "slot": "410", + "type": "t_uint256", + "contract": "AgentRegistryCore", + "src": "contracts/components/agents/AgentRegistryCore.sol:16" + }, + { + "label": "__gap", + "offset": 0, + "slot": "411", + "type": "t_array(t_uint256)41_storage", + "contract": "AgentRegistryCore", + "src": "contracts/components/agents/AgentRegistryCore.sol:199" + }, + { + "label": "_disabled", + "offset": 0, + "slot": "452", + "type": "t_mapping(t_uint256,t_struct(BitMap)21309_storage)", + "contract": "AgentRegistryEnable", + "src": "contracts/components/agents/AgentRegistryEnable.sol:24" + }, + { + "label": "__gap", + "offset": 0, + "slot": "453", + "type": "t_array(t_uint256)49_storage", + "contract": "AgentRegistryEnable", + "src": "contracts/components/agents/AgentRegistryEnable.sol:157" + }, + { + "label": "_agentMetadata", + "offset": 0, + "slot": "502", + "type": "t_mapping(t_uint256,t_struct(AgentMetadata)119170_storage)", + "contract": "AgentRegistryMetadata", + "src": "contracts/components/agents/AgentRegistryMetadata.sol:15" + }, + { + "label": "_agentMetadataUniqueness", + "offset": 0, + "slot": "503", + "type": "t_mapping(t_bytes32,t_bool)", + "contract": "AgentRegistryMetadata", + "src": "contracts/components/agents/AgentRegistryMetadata.sol:16" + }, + { + "label": "__gap", + "offset": 0, + "slot": "504", + "type": "t_array(t_uint256)48_storage", + "contract": "AgentRegistryMetadata", + "src": "contracts/components/agents/AgentRegistryMetadata.sol:69" + }, + { + "label": "_allAgents", + "offset": 0, + "slot": "552", + "type": "t_struct(UintSet)21908_storage", + "contract": "AgentRegistryEnumerable", + "src": "contracts/components/agents/AgentRegistryEnumerable.sol:12" + }, + { + "label": "_chainAgents", + "offset": 0, + "slot": "554", + "type": "t_mapping(t_uint256,t_struct(UintSet)21908_storage)", + "contract": "AgentRegistryEnumerable", + "src": "contracts/components/agents/AgentRegistryEnumerable.sol:13" + }, + { + "label": "__gap", + "offset": 0, + "slot": "555", + "type": "t_array(t_uint256)48_storage", + "contract": "AgentRegistryEnumerable", + "src": "contracts/components/agents/AgentRegistryEnumerable.sol:94" + }, + { + "label": "__gap", + "offset": 0, + "slot": "603", + "type": "t_array(t_uint256)50_storage", + "contract": "AgentRegistry", + "src": "contracts/components/agents/AgentRegistry.sol:109" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)41_storage": { + "label": "uint256[41]", + "numberOfBytes": "1312" + }, + "t_array(t_uint256)44_storage": { + "label": "uint256[44]", + "numberOfBytes": "1408" + }, + "t_array(t_uint256)48_storage": { + "label": "uint256[48]", + "numberOfBytes": "1536" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)4_storage": { + "label": "uint256[4]", + "numberOfBytes": "128" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_array(t_uint256)dyn_storage": { + "label": "uint256[]", + "numberOfBytes": "32" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(IAccessControl)15000": { + "label": "contract IAccessControl", + "numberOfBytes": "20" + }, + "t_contract(IStakeSubjectGateway)131769": { + "label": "contract IStakeSubjectGateway", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_mapping(t_address,t_bool))": { + "label": "mapping(address => mapping(address => bool))", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_bool)": { + "label": "mapping(bytes32 => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_uint256)": { + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_address)": { + "label": "mapping(uint256 => address)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_struct(AgentMetadata)119170_storage)": { + "label": "mapping(uint256 => struct AgentRegistryMetadata.AgentMetadata)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_struct(BitMap)21309_storage)": { + "label": "mapping(uint256 => struct BitMaps.BitMap)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_struct(UintSet)21908_storage)": { + "label": "mapping(uint256 => struct EnumerableSet.UintSet)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_uint256)": { + "label": "mapping(uint256 => uint256)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(AgentMetadata)119170_storage": { + "label": "struct AgentRegistryMetadata.AgentMetadata", + "members": [ + { + "label": "version", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "metadata", + "type": "t_string_storage", + "offset": 0, + "slot": "1" + }, + { + "label": "chainIds", + "type": "t_array(t_uint256)dyn_storage", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_struct(BitMap)21309_storage": { + "label": "struct BitMaps.BitMap", + "members": [ + { + "label": "_data", + "type": "t_mapping(t_uint256,t_uint256)", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Set)21450_storage": { + "label": "struct EnumerableSet.Set", + "members": [ + { + "label": "_values", + "type": "t_array(t_bytes32)dyn_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "_indexes", + "type": "t_mapping(t_bytes32,t_uint256)", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_struct(StakeThreshold)131636_storage": { + "label": "struct IStakeSubject.StakeThreshold", + "members": [ + { + "label": "min", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "max", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "activated", + "type": "t_bool", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_struct(UintSet)21908_storage": { + "label": "struct EnumerableSet.UintSet", + "members": [ + { + "label": "_inner", + "type": "t_struct(Set)21450_storage", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "94a7a479d024477e7117bad1387906288d9e138abe8dbef4831a2d612ba4ce6f": { + "address": "0x72eaaBB3f5908D5Ac4Fce00285B5af120BA3EcAC", + "txHash": "0x2426cb7fb1f0b99c5ff5bd90157b61979cb27c2a355f174031db6cc92defcc37", + "layout": { + "solcVersion": "0.8.9", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_accessControl", + "offset": 0, + "slot": "51", + "type": "t_contract(IAccessControl)15000", + "contract": "AccessManagedUpgradeable", + "src": "contracts/components/utils/AccessManaged.sol:16" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessManagedUpgradeable", + "src": "contracts/components/utils/AccessManaged.sol:68" + }, + { + "label": "_deprecated_router", + "offset": 0, + "slot": "101", + "type": "t_address", + "contract": "RoutedUpgradeable", + "src": "contracts/components/utils/Routed.sol:16", + "retypedFrom": "contract IRouter", + "renamedFrom": "_router" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "RoutedUpgradeable", + "src": "contracts/components/utils/Routed.sol:35" + }, + { + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC1967UpgradeUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:211" + }, + { + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage", + "contract": "UUPSUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:107" + }, + { + "label": "__gap", + "offset": 0, + "slot": "251", + "type": "t_array(t_uint256)50_storage", + "contract": "BaseComponentUpgradeable", + "src": "contracts/components/BaseComponentUpgradeable.sol:62" + }, + { + "label": "__gap", + "offset": 0, + "slot": "301", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC165Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol:41" + }, + { + "label": "_name", + "offset": 0, + "slot": "351", + "type": "t_string_storage", + "contract": "ERC721Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:25" + }, + { + "label": "_symbol", + "offset": 0, + "slot": "352", + "type": "t_string_storage", + "contract": "ERC721Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:28" + }, + { + "label": "_owners", + "offset": 0, + "slot": "353", + "type": "t_mapping(t_uint256,t_address)", + "contract": "ERC721Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:31" + }, + { + "label": "_balances", + "offset": 0, + "slot": "354", + "type": "t_mapping(t_address,t_uint256)", + "contract": "ERC721Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:34" + }, + { + "label": "_tokenApprovals", + "offset": 0, + "slot": "355", + "type": "t_mapping(t_uint256,t_address)", + "contract": "ERC721Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:37" + }, + { + "label": "_operatorApprovals", + "offset": 0, + "slot": "356", + "type": "t_mapping(t_address,t_mapping(t_address,t_bool))", + "contract": "ERC721Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:40" + }, + { + "label": "__gap", + "offset": 0, + "slot": "357", + "type": "t_array(t_uint256)44_storage", + "contract": "ERC721Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol:465" + }, + { + "label": "_ownedTokens", + "offset": 0, + "slot": "401", + "type": "t_mapping(t_address,t_mapping(t_uint256,t_uint256))", + "contract": "ERC721EnumerableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol:22" + }, + { + "label": "_ownedTokensIndex", + "offset": 0, + "slot": "402", + "type": "t_mapping(t_uint256,t_uint256)", + "contract": "ERC721EnumerableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol:25" + }, + { + "label": "_allTokens", + "offset": 0, + "slot": "403", + "type": "t_array(t_uint256)dyn_storage", + "contract": "ERC721EnumerableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol:28" + }, + { + "label": "_allTokensIndex", + "offset": 0, + "slot": "404", + "type": "t_mapping(t_uint256,t_uint256)", + "contract": "ERC721EnumerableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol:31" + }, + { + "label": "__gap", + "offset": 0, + "slot": "405", + "type": "t_array(t_uint256)46_storage", + "contract": "ERC721EnumerableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol:175" + }, + { + "label": "_subjectGateway", + "offset": 0, + "slot": "451", + "type": "t_contract(IStakeSubjectGateway)131769", + "contract": "DelegatedStakeSubjectUpgradeable", + "src": "contracts/components/staking/stake_subjects/DelegatedStakeSubject.sol:14" + }, + { + "label": "__gap", + "offset": 0, + "slot": "452", + "type": "t_array(t_uint256)4_storage", + "contract": "DelegatedStakeSubjectUpgradeable", + "src": "contracts/components/staking/stake_subjects/DelegatedStakeSubject.sol:51" + }, + { + "label": "_HASHED_NAME", + "offset": 0, + "slot": "456", + "type": "t_bytes32", + "contract": "EIP712Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol:32" + }, + { + "label": "_HASHED_VERSION", + "offset": 0, + "slot": "457", + "type": "t_bytes32", + "contract": "EIP712Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol:33" + }, + { + "label": "__gap", + "offset": 0, + "slot": "458", + "type": "t_array(t_uint256)50_storage", + "contract": "EIP712Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol:120" + }, + { + "label": "_scannerPoolIdCounter", + "offset": 0, + "slot": "508", + "type": "t_struct(Counter)11323_storage", + "contract": "ScannerPoolRegistryCore", + "src": "contracts/components/scanner_pools/ScannerPoolRegistryCore.sol:44" + }, + { + "label": "_scannerNodes", + "offset": 0, + "slot": "509", + "type": "t_mapping(t_address,t_struct(ScannerNode)120655_storage)", + "contract": "ScannerPoolRegistryCore", + "src": "contracts/components/scanner_pools/ScannerPoolRegistryCore.sol:46" + }, + { + "label": "_scannerNodeOwnership", + "offset": 0, + "slot": "510", + "type": "t_mapping(t_uint256,t_struct(AddressSet)21751_storage)", + "contract": "ScannerPoolRegistryCore", + "src": "contracts/components/scanner_pools/ScannerPoolRegistryCore.sol:48" + }, + { + "label": "_enabledScanners", + "offset": 0, + "slot": "511", + "type": "t_mapping(t_uint256,t_uint256)", + "contract": "ScannerPoolRegistryCore", + "src": "contracts/components/scanner_pools/ScannerPoolRegistryCore.sol:50" + }, + { + "label": "_scannerStakeThresholds", + "offset": 0, + "slot": "512", + "type": "t_mapping(t_uint256,t_struct(StakeThreshold)131636_storage)", + "contract": "ScannerPoolRegistryCore", + "src": "contracts/components/scanner_pools/ScannerPoolRegistryCore.sol:52" + }, + { + "label": "_scannerPoolChainId", + "offset": 0, + "slot": "513", + "type": "t_mapping(t_uint256,t_uint256)", + "contract": "ScannerPoolRegistryCore", + "src": "contracts/components/scanner_pools/ScannerPoolRegistryCore.sol:54" + }, + { + "label": "registrationDelay", + "offset": 0, + "slot": "514", + "type": "t_uint256", + "contract": "ScannerPoolRegistryCore", + "src": "contracts/components/scanner_pools/ScannerPoolRegistryCore.sol:56" + }, + { + "label": "__gap", + "offset": 0, + "slot": "515", + "type": "t_array(t_uint256)38_storage", + "contract": "ScannerPoolRegistryCore", + "src": "contracts/components/scanner_pools/ScannerPoolRegistryCore.sol:569" + }, + { + "label": "_managers", + "offset": 0, + "slot": "553", + "type": "t_mapping(t_uint256,t_struct(AddressSet)21751_storage)", + "contract": "ScannerPoolRegistryManaged", + "src": "contracts/components/scanner_pools/ScannerPoolRegistryManaged.sol:13" + }, + { + "label": "__gap", + "offset": 0, + "slot": "554", + "type": "t_array(t_uint256)49_storage", + "contract": "ScannerPoolRegistryManaged", + "src": "contracts/components/scanner_pools/ScannerPoolRegistryManaged.sol:84" + }, + { + "label": "__gap", + "offset": 0, + "slot": "603", + "type": "t_array(t_uint256)50_storage", + "contract": "ScannerPoolRegistry", + "src": "contracts/components/scanner_pools/ScannerPoolRegistry.sol:85" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)38_storage": { + "label": "uint256[38]", + "numberOfBytes": "1216" + }, + "t_array(t_uint256)44_storage": { + "label": "uint256[44]", + "numberOfBytes": "1408" + }, + "t_array(t_uint256)46_storage": { + "label": "uint256[46]", + "numberOfBytes": "1472" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)4_storage": { + "label": "uint256[4]", + "numberOfBytes": "128" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_array(t_uint256)dyn_storage": { + "label": "uint256[]", + "numberOfBytes": "32" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(IAccessControl)15000": { + "label": "contract IAccessControl", + "numberOfBytes": "20" + }, + "t_contract(IStakeSubjectGateway)131769": { + "label": "contract IStakeSubjectGateway", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_mapping(t_address,t_bool))": { + "label": "mapping(address => mapping(address => bool))", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_mapping(t_uint256,t_uint256))": { + "label": "mapping(address => mapping(uint256 => uint256))", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(ScannerNode)120655_storage)": { + "label": "mapping(address => struct ScannerPoolRegistryCore.ScannerNode)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_uint256)": { + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_address)": { + "label": "mapping(uint256 => address)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_struct(AddressSet)21751_storage)": { + "label": "mapping(uint256 => struct EnumerableSet.AddressSet)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_struct(StakeThreshold)131636_storage)": { + "label": "mapping(uint256 => struct IStakeSubject.StakeThreshold)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_uint256)": { + "label": "mapping(uint256 => uint256)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(AddressSet)21751_storage": { + "label": "struct EnumerableSet.AddressSet", + "members": [ + { + "label": "_inner", + "type": "t_struct(Set)21450_storage", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Counter)11323_storage": { + "label": "struct CountersUpgradeable.Counter", + "members": [ + { + "label": "_value", + "type": "t_uint256", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(ScannerNode)120655_storage": { + "label": "struct ScannerPoolRegistryCore.ScannerNode", + "members": [ + { + "label": "registered", + "type": "t_bool", + "offset": 0, + "slot": "0" + }, + { + "label": "disabled", + "type": "t_bool", + "offset": 1, + "slot": "0" + }, + { + "label": "scannerPoolId", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "chainId", + "type": "t_uint256", + "offset": 0, + "slot": "2" + }, + { + "label": "metadata", + "type": "t_string_storage", + "offset": 0, + "slot": "3" + } + ], + "numberOfBytes": "128" + }, + "t_struct(Set)21450_storage": { + "label": "struct EnumerableSet.Set", + "members": [ + { + "label": "_values", + "type": "t_array(t_bytes32)dyn_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "_indexes", + "type": "t_mapping(t_bytes32,t_uint256)", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_struct(StakeThreshold)131636_storage": { + "label": "struct IStakeSubject.StakeThreshold", + "members": [ + { + "label": "min", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "max", + "type": "t_uint256", + "offset": 0, + "slot": "1" + }, + { + "label": "activated", + "type": "t_bool", + "offset": 0, + "slot": "2" + } + ], + "numberOfBytes": "96" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "efc99acc97abee837da8cc257730e18c426643f12b2bc2543844cd249ad2f5b1": { + "address": "0x0ed550214869C3c3D5C05b97A8Bb9388125C4919", + "txHash": "0x27f60ed0905ccfd6958faf919fbb7da6d7bbad413e3e4bf4ed2de777c4b947d4", + "layout": { + "solcVersion": "0.8.9", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_accessControl", + "offset": 0, + "slot": "51", + "type": "t_contract(IAccessControl)15000", + "contract": "AccessManagedUpgradeable", + "src": "contracts/components/utils/AccessManaged.sol:16" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessManagedUpgradeable", + "src": "contracts/components/utils/AccessManaged.sol:68" + }, + { + "label": "_deprecated_router", + "offset": 0, + "slot": "101", + "type": "t_address", + "contract": "RoutedUpgradeable", + "src": "contracts/components/utils/Routed.sol:16", + "retypedFrom": "contract IRouter", + "renamedFrom": "_router" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "RoutedUpgradeable", + "src": "contracts/components/utils/Routed.sol:35" + }, + { + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC1967UpgradeUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:211" + }, + { + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage", + "contract": "UUPSUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:107" + }, + { + "label": "__gap", + "offset": 0, + "slot": "251", + "type": "t_array(t_uint256)50_storage", + "contract": "BaseComponentUpgradeable", + "src": "contracts/components/BaseComponentUpgradeable.sol:62" + }, + { + "label": "_agents", + "offset": 0, + "slot": "301", + "type": "t_contract(AgentRegistry)118195", + "contract": "Dispatch", + "src": "contracts/components/dispatch/Dispatch.sol:18" + }, + { + "label": "_scanners_deprecated", + "offset": 0, + "slot": "302", + "type": "t_contract(ScannerRegistry)122945", + "contract": "Dispatch", + "src": "contracts/components/dispatch/Dispatch.sol:20", + "renamedFrom": "_scanners" + }, + { + "label": "scannerToAgents", + "offset": 0, + "slot": "303", + "type": "t_mapping(t_uint256,t_struct(UintSet)21908_storage)", + "contract": "Dispatch", + "src": "contracts/components/dispatch/Dispatch.sol:21" + }, + { + "label": "agentToScanners", + "offset": 0, + "slot": "304", + "type": "t_mapping(t_uint256,t_struct(UintSet)21908_storage)", + "contract": "Dispatch", + "src": "contracts/components/dispatch/Dispatch.sol:22" + }, + { + "label": "_scannerPools", + "offset": 0, + "slot": "305", + "type": "t_contract(ScannerPoolRegistry)120613", + "contract": "Dispatch", + "src": "contracts/components/dispatch/Dispatch.sol:24" + }, + { + "label": "__gap", + "offset": 0, + "slot": "306", + "type": "t_array(t_uint256)47_storage", + "contract": "Dispatch", + "src": "contracts/components/dispatch/Dispatch.sol:345" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)47_storage": { + "label": "uint256[47]", + "numberOfBytes": "1504" + }, + "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(AgentRegistry)118195": { + "label": "contract AgentRegistry", + "numberOfBytes": "20" + }, + "t_contract(IAccessControl)15000": { + "label": "contract IAccessControl", + "numberOfBytes": "20" + }, + "t_contract(ScannerPoolRegistry)120613": { + "label": "contract ScannerPoolRegistry", + "numberOfBytes": "20" + }, + "t_contract(ScannerRegistry)122945": { + "label": "contract ScannerRegistry", + "numberOfBytes": "20" + }, + "t_mapping(t_bytes32,t_uint256)": { + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_struct(UintSet)21908_storage)": { + "label": "mapping(uint256 => struct EnumerableSet.UintSet)", + "numberOfBytes": "32" + }, + "t_struct(Set)21450_storage": { + "label": "struct EnumerableSet.Set", + "members": [ + { + "label": "_values", + "type": "t_array(t_bytes32)dyn_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "_indexes", + "type": "t_mapping(t_bytes32,t_uint256)", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_struct(UintSet)21908_storage": { + "label": "struct EnumerableSet.UintSet", + "members": [ + { + "label": "_inner", + "type": "t_struct(Set)21450_storage", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "c1bda122405ed268cea47b9146909690cd93f4bdeb2698a4d81a4b2b3f9b9d96": { + "address": "0x70FBC65e20DFe5ACDA5665f98A6CdA98800cC637", + "txHash": "0x7fe2089b5a2defb19fb734087022e2f97c061814883e0e93c53ecb2575e36b61", + "layout": { + "solcVersion": "0.8.9", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_accessControl", + "offset": 0, + "slot": "51", + "type": "t_contract(IAccessControl)15000", + "contract": "AccessManagedUpgradeable", + "src": "contracts/components/utils/AccessManaged.sol:16" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessManagedUpgradeable", + "src": "contracts/components/utils/AccessManaged.sol:68" + }, + { + "label": "_deprecated_router", + "offset": 0, + "slot": "101", + "type": "t_address", + "contract": "RoutedUpgradeable", + "src": "contracts/components/utils/Routed.sol:16", + "retypedFrom": "contract IRouter", + "renamedFrom": "_router" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "RoutedUpgradeable", + "src": "contracts/components/utils/Routed.sol:35" + }, + { + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC1967UpgradeUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:211" + }, + { + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage", + "contract": "UUPSUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:107" + }, + { + "label": "__gap", + "offset": 0, + "slot": "251", + "type": "t_array(t_uint256)50_storage", + "contract": "BaseComponentUpgradeable", + "src": "contracts/components/BaseComponentUpgradeable.sol:62" + }, + { + "label": "_allocatedStake", + "offset": 0, + "slot": "301", + "type": "t_struct(Balances)133658_storage", + "contract": "StakeAllocator", + "src": "contracts/components/staking/allocation/StakeAllocator.sol:37" + }, + { + "label": "_unallocatedStake", + "offset": 0, + "slot": "303", + "type": "t_struct(Balances)133658_storage", + "contract": "StakeAllocator", + "src": "contracts/components/staking/allocation/StakeAllocator.sol:39" + } + ], + "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(IAccessControl)15000": { + "label": "contract IAccessControl", + "numberOfBytes": "20" + }, + "t_mapping(t_uint256,t_uint256)": { + "label": "mapping(uint256 => uint256)", + "numberOfBytes": "32" + }, + "t_struct(Balances)133658_storage": { + "label": "struct Distributions.Balances", + "members": [ + { + "label": "_balances", + "type": "t_mapping(t_uint256,t_uint256)", + "offset": 0, + "slot": "0" + }, + { + "label": "_totalSupply", + "type": "t_uint256", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "890390964ee9ba9ec8e2683d93cd61b2c8cd8528c553288729ee05418e7720e0": { + "address": "0x09803F257AB3D8a390837640ED9D9F4Eb22c1453", + "txHash": "0x4d4948d0e1dbc4c8f67c39a95dd810f45c3aa035d0889376399f691372005b4f", + "layout": { + "solcVersion": "0.8.9", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_accessControl", + "offset": 0, + "slot": "51", + "type": "t_contract(IAccessControl)15000", + "contract": "AccessManagedUpgradeable", + "src": "contracts/components/utils/AccessManaged.sol:16" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessManagedUpgradeable", + "src": "contracts/components/utils/AccessManaged.sol:68" + }, + { + "label": "_deprecated_router", + "offset": 0, + "slot": "101", + "type": "t_address", + "contract": "RoutedUpgradeable", + "src": "contracts/components/utils/Routed.sol:16", + "retypedFrom": "contract IRouter", + "renamedFrom": "_router" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "RoutedUpgradeable", + "src": "contracts/components/utils/Routed.sol:35" + }, + { + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC1967UpgradeUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:211" + }, + { + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage", + "contract": "UUPSUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:107" + }, + { + "label": "__gap", + "offset": 0, + "slot": "251", + "type": "t_array(t_uint256)50_storage", + "contract": "BaseComponentUpgradeable", + "src": "contracts/components/BaseComponentUpgradeable.sol:62" + }, + { + "label": "unclaimedRewards", + "offset": 0, + "slot": "301", + "type": "t_uint256", + "contract": "RewardsDistributor", + "src": "contracts/components/staking/rewards/RewardsDistributor.sol:36" + }, + { + "label": "_rewardsAccumulators", + "offset": 0, + "slot": "302", + "type": "t_mapping(t_uint256,t_struct(DelegatedAccRewards)128442_storage)", + "contract": "RewardsDistributor", + "src": "contracts/components/staking/rewards/RewardsDistributor.sol:38" + }, + { + "label": "rewardsPerEpoch", + "offset": 0, + "slot": "303", + "type": "t_mapping(t_uint256,t_mapping(t_uint256,t_uint256))", + "contract": "RewardsDistributor", + "src": "contracts/components/staking/rewards/RewardsDistributor.sol:40" + }, + { + "label": "rewardedEpochs", + "offset": 0, + "slot": "304", + "type": "t_mapping(t_uint256,t_mapping(t_uint256,t_bool))", + "contract": "RewardsDistributor", + "src": "contracts/components/staking/rewards/RewardsDistributor.sol:42" + }, + { + "label": "claimedRewardsPerEpoch", + "offset": 0, + "slot": "305", + "type": "t_mapping(t_uint256,t_mapping(t_uint256,t_mapping(t_address,t_bool)))", + "contract": "RewardsDistributor", + "src": "contracts/components/staking/rewards/RewardsDistributor.sol:44" + }, + { + "label": "delegationFees", + "offset": 0, + "slot": "306", + "type": "t_mapping(t_uint256,t_array(t_struct(DelegationFee)128474_storage)2_storage)", + "contract": "RewardsDistributor", + "src": "contracts/components/staking/rewards/RewardsDistributor.sol:51" + }, + { + "label": "delegationParamsEpochDelay", + "offset": 0, + "slot": "307", + "type": "t_uint256", + "contract": "RewardsDistributor", + "src": "contracts/components/staking/rewards/RewardsDistributor.sol:53" + }, + { + "label": "defaultFeeBps", + "offset": 0, + "slot": "308", + "type": "t_uint256", + "contract": "RewardsDistributor", + "src": "contracts/components/staking/rewards/RewardsDistributor.sol:54" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_struct(DelegationFee)128474_storage)2_storage": { + "label": "struct RewardsDistributor.DelegationFee[2]", + "numberOfBytes": "64" + }, + "t_array(t_struct(EpochCheckpoint)127855_storage)dyn_storage": { + "label": "struct Accumulators.EpochCheckpoint[]", + "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(IAccessControl)15000": { + "label": "contract IAccessControl", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(Accumulator)127860_storage)": { + "label": "mapping(address => struct Accumulators.Accumulator)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_array(t_struct(DelegationFee)128474_storage)2_storage)": { + "label": "mapping(uint256 => struct RewardsDistributor.DelegationFee[2])", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_bool)": { + "label": "mapping(uint256 => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_mapping(t_address,t_bool))": { + "label": "mapping(uint256 => mapping(address => bool))", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_mapping(t_uint256,t_bool))": { + "label": "mapping(uint256 => mapping(uint256 => bool))", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_mapping(t_uint256,t_mapping(t_address,t_bool)))": { + "label": "mapping(uint256 => mapping(uint256 => mapping(address => bool)))", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_mapping(t_uint256,t_uint256))": { + "label": "mapping(uint256 => mapping(uint256 => uint256))", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_struct(DelegatedAccRewards)128442_storage)": { + "label": "mapping(uint256 => struct RewardsDistributor.DelegatedAccRewards)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_uint256)": { + "label": "mapping(uint256 => uint256)", + "numberOfBytes": "32" + }, + "t_struct(Accumulator)127860_storage": { + "label": "struct Accumulators.Accumulator", + "members": [ + { + "label": "checkpoints", + "type": "t_array(t_struct(EpochCheckpoint)127855_storage)dyn_storage", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(DelegatedAccRewards)128442_storage": { + "label": "struct RewardsDistributor.DelegatedAccRewards", + "members": [ + { + "label": "delegated", + "type": "t_struct(Accumulator)127860_storage", + "offset": 0, + "slot": "0" + }, + { + "label": "delegators", + "type": "t_struct(Accumulator)127860_storage", + "offset": 0, + "slot": "1" + }, + { + "label": "delegatorsTotal", + "type": "t_struct(Accumulator)127860_storage", + "offset": 0, + "slot": "2" + }, + { + "label": "delegatorsPortions", + "type": "t_mapping(t_address,t_struct(Accumulator)127860_storage)", + "offset": 0, + "slot": "3" + } + ], + "numberOfBytes": "128" + }, + "t_struct(DelegationFee)128474_storage": { + "label": "struct RewardsDistributor.DelegationFee", + "members": [ + { + "label": "feeBps", + "type": "t_uint16", + "offset": 0, + "slot": "0" + }, + { + "label": "sinceEpoch", + "type": "t_uint240", + "offset": 2, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(EpochCheckpoint)127855_storage": { + "label": "struct Accumulators.EpochCheckpoint", + "members": [ + { + "label": "timestamp", + "type": "t_uint32", + "offset": 0, + "slot": "0" + }, + { + "label": "rate", + "type": "t_uint224", + "offset": 4, + "slot": "0" + }, + { + "label": "value", + "type": "t_uint256", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint16": { + "label": "uint16", + "numberOfBytes": "2" + }, + "t_uint224": { + "label": "uint224", + "numberOfBytes": "28" + }, + "t_uint240": { + "label": "uint240", + "numberOfBytes": "30" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint32": { + "label": "uint32", + "numberOfBytes": "4" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "c4aa183d4d0641a55a20a71c344a64e7b2836a4164ab67a9889d83451304ab77": { + "address": "0x40998890c1ad5B22CBe2deB9671E9df91b79dd16", + "txHash": "0x8bb8fc841ce096673ce0b4452a194b37dd3e8f0bf33008a7949b6d4730dac884", + "layout": { + "solcVersion": "0.8.9", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_accessControl", + "offset": 0, + "slot": "51", + "type": "t_contract(IAccessControl)15000", + "contract": "AccessManagedUpgradeable", + "src": "contracts/components/utils/AccessManaged.sol:16" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessManagedUpgradeable", + "src": "contracts/components/utils/AccessManaged.sol:68" + }, + { + "label": "_deprecated_router", + "offset": 0, + "slot": "101", + "type": "t_address", + "contract": "RoutedUpgradeable", + "src": "contracts/components/utils/Routed.sol:16", + "retypedFrom": "contract IRouter", + "renamedFrom": "_router" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "RoutedUpgradeable", + "src": "contracts/components/utils/Routed.sol:35" + }, + { + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC1967UpgradeUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:211" + }, + { + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage", + "contract": "UUPSUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:107" + }, + { + "label": "__gap", + "offset": 0, + "slot": "251", + "type": "t_array(t_uint256)50_storage", + "contract": "BaseComponentUpgradeable", + "src": "contracts/components/BaseComponentUpgradeable.sol:62" + }, + { + "label": "_fortaStaking", + "offset": 0, + "slot": "301", + "type": "t_contract(FortaStaking)126178", + "contract": "StakeSubjectGateway", + "src": "contracts/components/staking/stake_subjects/StakeSubjectGateway.sol:17" + }, + { + "label": "_stakeSubjects", + "offset": 0, + "slot": "302", + "type": "t_mapping(t_uint8,t_address)", + "contract": "StakeSubjectGateway", + "src": "contracts/components/staking/stake_subjects/StakeSubjectGateway.sol:21", + "retypedFrom": "mapping(uint8 => contract IStakeSubject)", + "renamedFrom": "_stakeSubjectHandlers" + } + ], + "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(FortaStaking)126178": { + "label": "contract FortaStaking", + "numberOfBytes": "20" + }, + "t_contract(IAccessControl)15000": { + "label": "contract IAccessControl", + "numberOfBytes": "20" + }, + "t_mapping(t_uint8,t_address)": { + "label": "mapping(uint8 => address)", + "numberOfBytes": "32" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } + }, + "738e5c2b523394ab70389f31b14fb68816c97ed48cd0690cb74be82e5a94d207": { + "address": "0x8fd9d47e80f1d711aA97C4926e5E7CB3462455E8", + "txHash": "0x83cf385914bf5a7d7f531e8e30d6473bfc4fa3c17d2d7c2d0fb3606ae80d5756", + "layout": { + "solcVersion": "0.8.9", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_accessControl", + "offset": 0, + "slot": "51", + "type": "t_contract(IAccessControl)15000", + "contract": "AccessManagedUpgradeable", + "src": "contracts/components/utils/AccessManaged.sol:16" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessManagedUpgradeable", + "src": "contracts/components/utils/AccessManaged.sol:68" + }, + { + "label": "_deprecated_router", + "offset": 0, + "slot": "101", + "type": "t_address", + "contract": "RoutedUpgradeable", + "src": "contracts/components/utils/Routed.sol:16", + "retypedFrom": "contract IRouter", + "renamedFrom": "_router" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "RoutedUpgradeable", + "src": "contracts/components/utils/Routed.sol:35" + }, + { + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC1967UpgradeUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:211" + }, + { + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage", + "contract": "UUPSUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:107" + }, + { + "label": "__gap", + "offset": 0, + "slot": "251", + "type": "t_array(t_uint256)50_storage", + "contract": "BaseComponentUpgradeable", + "src": "contracts/components/BaseComponentUpgradeable.sol:62" + }, + { + "label": "__gap", + "offset": 0, + "slot": "301", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC165Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol:41" + }, + { + "label": "_balances", + "offset": 0, + "slot": "351", + "type": "t_mapping(t_uint256,t_mapping(t_address,t_uint256))", + "contract": "ERC1155Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol:25" + }, + { + "label": "_operatorApprovals", + "offset": 0, + "slot": "352", + "type": "t_mapping(t_address,t_mapping(t_address,t_bool))", + "contract": "ERC1155Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol:28" + }, + { + "label": "_uri", + "offset": 0, + "slot": "353", + "type": "t_string_storage", + "contract": "ERC1155Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol:31" + }, + { + "label": "__gap", + "offset": 0, + "slot": "354", + "type": "t_array(t_uint256)47_storage", + "contract": "ERC1155Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol:528" + }, + { + "label": "_totalSupply", + "offset": 0, + "slot": "401", + "type": "t_mapping(t_uint256,t_uint256)", + "contract": "ERC1155SupplyUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155SupplyUpgradeable.sol:23" + }, + { + "label": "__gap", + "offset": 0, + "slot": "402", + "type": "t_array(t_uint256)49_storage", + "contract": "ERC1155SupplyUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC1155/extensions/ERC1155SupplyUpgradeable.sol:76" + }, + { + "label": "stakedToken", + "offset": 0, + "slot": "451", + "type": "t_contract(IERC20)16030", + "contract": "FortaStaking", + "src": "contracts/components/staking/FortaStaking.sol:60" + }, + { + "label": "_activeStake", + "offset": 0, + "slot": "452", + "type": "t_struct(Balances)133658_storage", + "contract": "FortaStaking", + "src": "contracts/components/staking/FortaStaking.sol:63" + }, + { + "label": "_inactiveStake", + "offset": 0, + "slot": "454", + "type": "t_struct(Balances)133658_storage", + "contract": "FortaStaking", + "src": "contracts/components/staking/FortaStaking.sol:65" + }, + { + "label": "_lockingDelay", + "offset": 0, + "slot": "456", + "type": "t_mapping(t_uint256,t_mapping(t_address,t_struct(Timestamp)17859_storage))", + "contract": "FortaStaking", + "src": "contracts/components/staking/FortaStaking.sol:67" + }, + { + "label": "_rewards", + "offset": 0, + "slot": "457", + "type": "t_struct(Balances)133658_storage", + "contract": "FortaStaking", + "src": "contracts/components/staking/FortaStaking.sol:70" + }, + { + "label": "_released", + "offset": 0, + "slot": "459", + "type": "t_mapping(t_uint256,t_struct(SignedBalances)133772_storage)", + "contract": "FortaStaking", + "src": "contracts/components/staking/FortaStaking.sol:72" + }, + { + "label": "_deprecated_frozen", + "offset": 0, + "slot": "460", + "type": "t_mapping(t_uint256,t_bool)", + "contract": "FortaStaking", + "src": "contracts/components/staking/FortaStaking.sol:75", + "renamedFrom": "_frozen" + }, + { + "label": "_withdrawalDelay", + "offset": 0, + "slot": "461", + "type": "t_uint64", + "contract": "FortaStaking", + "src": "contracts/components/staking/FortaStaking.sol:76" + }, + { + "label": "_treasury", + "offset": 8, + "slot": "461", + "type": "t_address", + "contract": "FortaStaking", + "src": "contracts/components/staking/FortaStaking.sol:79" + }, + { + "label": "subjectGateway", + "offset": 0, + "slot": "462", + "type": "t_contract(IStakeSubjectGateway)131769", + "contract": "FortaStaking", + "src": "contracts/components/staking/FortaStaking.sol:82", + "retypedFrom": "IStakeController", + "renamedFrom": "_stakingParameters" + }, + { + "label": "slashDelegatorsPercent", + "offset": 0, + "slot": "463", + "type": "t_uint256", + "contract": "FortaStaking", + "src": "contracts/components/staking/FortaStaking.sol:84" + }, + { + "label": "allocator", + "offset": 0, + "slot": "464", + "type": "t_contract(IStakeAllocator)126629", + "contract": "FortaStaking", + "src": "contracts/components/staking/FortaStaking.sol:85" + }, + { + "label": "openProposals", + "offset": 0, + "slot": "465", + "type": "t_mapping(t_uint256,t_uint256)", + "contract": "FortaStaking", + "src": "contracts/components/staking/FortaStaking.sol:86" + }, + { + "label": "_reentrancyStatus", + "offset": 0, + "slot": "466", + "type": "t_uint256", + "contract": "FortaStaking", + "src": "contracts/components/staking/FortaStaking.sol:88" + }, + { + "label": "__gap", + "offset": 0, + "slot": "467", + "type": "t_array(t_uint256)36_storage", + "contract": "FortaStaking", + "src": "contracts/components/staking/FortaStaking.sol:714" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)36_storage": { + "label": "uint256[36]", + "numberOfBytes": "1152" + }, + "t_array(t_uint256)47_storage": { + "label": "uint256[47]", + "numberOfBytes": "1504" + }, + "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(IAccessControl)15000": { + "label": "contract IAccessControl", + "numberOfBytes": "20" + }, + "t_contract(IERC20)16030": { + "label": "contract IERC20", + "numberOfBytes": "20" + }, + "t_contract(IStakeAllocator)126629": { + "label": "contract IStakeAllocator", + "numberOfBytes": "20" + }, + "t_contract(IStakeSubjectGateway)131769": { + "label": "contract IStakeSubjectGateway", + "numberOfBytes": "20" + }, + "t_int256": { + "label": "int256", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_int256)": { + "label": "mapping(address => int256)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_mapping(t_address,t_bool))": { + "label": "mapping(address => mapping(address => bool))", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(Timestamp)17859_storage)": { + "label": "mapping(address => struct Timers.Timestamp)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_bool)": { + "label": "mapping(uint256 => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_mapping(t_address,t_struct(Timestamp)17859_storage))": { + "label": "mapping(uint256 => mapping(address => struct Timers.Timestamp))", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_mapping(t_address,t_uint256))": { + "label": "mapping(uint256 => mapping(address => uint256))", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_struct(SignedBalances)133772_storage)": { + "label": "mapping(uint256 => struct Distributions.SignedBalances)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_uint256)": { + "label": "mapping(uint256 => uint256)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Balances)133658_storage": { + "label": "struct Distributions.Balances", + "members": [ + { + "label": "_balances", + "type": "t_mapping(t_uint256,t_uint256)", + "offset": 0, + "slot": "0" + }, + { + "label": "_totalSupply", + "type": "t_uint256", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_struct(SignedBalances)133772_storage": { + "label": "struct Distributions.SignedBalances", + "members": [ + { + "label": "_balances", + "type": "t_mapping(t_address,t_int256)", + "offset": 0, + "slot": "0" + }, + { + "label": "_totalSupply", + "type": "t_int256", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Timestamp)17859_storage": { + "label": "struct Timers.Timestamp", + "members": [ + { + "label": "_deadline", + "type": "t_uint64", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } } } } diff --git a/releases/1.2.10/mumbai/output/prepared-upgrades.json b/releases/1.2.10/mumbai/output/prepared-upgrades.json new file mode 100644 index 00000000..db8dbdc3 --- /dev/null +++ b/releases/1.2.10/mumbai/output/prepared-upgrades.json @@ -0,0 +1,103 @@ +{ + "access-manager": { + "impl": { + "address": "0x5Da21607E9e2bCA241E0EA46e27cea3bB8404505", + "constructor-args": [ + "0x4E29Cea6D64be860f5eAba110686DcB585f393D6" + ], + "init-args": [], + "name": "AccessManager", + "timeout": 1200000, + "version": "0.1.0" + } + }, + "agent-registry": { + "impl": { + "address": "0xD25Fd5B722606d08A5DdCD00e969513d06d98d89", + "constructor-args": [ + "0x4E29Cea6D64be860f5eAba110686DcB585f393D6" + ], + "init-args": [], + "name": "AgentRegistry", + "timeout": 1200000, + "version": "0.1.6" + } + }, + "scanner-pool-registry": { + "impl": { + "address": "0x72eaaBB3f5908D5Ac4Fce00285B5af120BA3EcAC", + "constructor-args": [ + "0x4E29Cea6D64be860f5eAba110686DcB585f393D6", + "0x698A6400dE3865fC9E8A6dB22302AAb3372Cebd9" + ], + "init-args": [], + "name": "ScannerPoolRegistry", + "timeout": 1200000, + "version": "0.1.0" + } + }, + "dispatch": { + "impl": { + "address": "0x0ed550214869C3c3D5C05b97A8Bb9388125C4919", + "constructor-args": [ + "0x4E29Cea6D64be860f5eAba110686DcB585f393D6" + ], + "init-args": [], + "name": "Dispatch", + "timeout": 1200000, + "version": "0.1.5" + } + }, + "stake-allocator": { + "impl": { + "address": "0x70FBC65e20DFe5ACDA5665f98A6CdA98800cC637", + "constructor-args": [ + "0x4E29Cea6D64be860f5eAba110686DcB585f393D6", + "0x02304eC24ba2996a83F595D7cf80e5571a406EFA", + "0x404afc59Cacd74A28d0D5651460Cc950b42FAf08" + ], + "init-args": [], + "name": "StakeAllocator", + "timeout": 1200000, + "version": "0.1.0" + } + }, + "rewards-distributor": { + "impl": { + "address": "0x09803F257AB3D8a390837640ED9D9F4Eb22c1453", + "constructor-args": [ + "0x4E29Cea6D64be860f5eAba110686DcB585f393D6", + "0x107Ac13567b1b5D84691f890A5bA07EdaE1a11c3", + "0x02304eC24ba2996a83F595D7cf80e5571a406EFA" + ], + "init-args": [], + "name": "RewardsDistributor", + "timeout": 1200000, + "version": "0.1.0" + } + }, + "stake-subject-gateway": { + "impl": { + "address": "0x40998890c1ad5B22CBe2deB9671E9df91b79dd16", + "constructor-args": [ + "0x4E29Cea6D64be860f5eAba110686DcB585f393D6" + ], + "init-args": [], + "name": "StakeSubjectGateway", + "timeout": 1200000, + "version": "0.1.1" + } + }, + "forta-staking": { + "impl": { + "address": "0x8fd9d47e80f1d711aA97C4926e5E7CB3462455E8", + "constructor-args": [ + "0x4E29Cea6D64be860f5eAba110686DcB585f393D6" + ], + "init-args": [], + "name": "FortaStaking", + "timeout": 1200000, + "version": "0.1.2" + } + } +} \ No newline at end of file From 96291fe67acec85cc3c5d59066c79fc52d7d1e7d Mon Sep 17 00:00:00 2001 From: Roberto Cantu Date: Wed, 6 Dec 2023 10:56:29 -0600 Subject: [PATCH 17/44] 1.2.10 deploy --- .github/workflows/release.yml | 178 ++++++++++---------- releases/1.2.10/index.yml | 2 +- releases/1.2.10/polygon/config/upgrade.json | 91 +--------- 3 files changed, 92 insertions(+), 179 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 33e5cff2..8a56ed5d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -214,98 +214,98 @@ jobs: skip_checkout: true # tagging_message: '${{ needs.prepare.outputs.release_version }}' - verify: - name: Verify contracts - if: "startsWith(github.head_ref, 'release/') && needs.prepare.outputs.release_verify_cmd != ''" - runs-on: ubuntu-22.04 - timeout-minutes: 60 - needs: - - build - - prepare - - deploy - steps: - - uses: actions/checkout@v3 - with: - ref: ${{ needs.deploy.outputs.deploy_commit || github.event.pull_request.head.sha }} - - uses: actions/setup-node@v3 - with: - node-version: '14' - cache: 'yarn' - - run: yarn install --frozen-lockfile + # verify: + # name: Verify contracts + # if: "startsWith(github.head_ref, 'release/') && needs.prepare.outputs.release_verify_cmd != ''" + # runs-on: ubuntu-22.04 + # timeout-minutes: 60 + # needs: + # - build + # - prepare + # - deploy + # steps: + # - uses: actions/checkout@v3 + # with: + # ref: ${{ needs.deploy.outputs.deploy_commit || github.event.pull_request.head.sha }} + # - uses: actions/setup-node@v3 + # with: + # node-version: '14' + # cache: 'yarn' + # - run: yarn install --frozen-lockfile - - name: Get build artifacts - uses: actions/download-artifact@v3 - with: - name: contract-artifacts + # - name: Get build artifacts + # uses: actions/download-artifact@v3 + # with: + # name: contract-artifacts - - name: Verify contracts - shell: bash - run: | - yarn hardhat --network ${{ needs.prepare.outputs.release_network }} ${{ needs.prepare.outputs.release_verify_cmd }} ${{ needs.prepare.outputs.release_version }} - env: - INFURA_PROJECT_ID: '${{ secrets.INFURA_PROJECT_ID }}' - MUMBAI_MNEMONIC: '${{ secrets.MUMBAI_MNEMONIC }}' - MUMBAI_NODE: '${{ secrets.MUMBAI_NODE }}' - POLYGON_MNEMONIC: '${{ secrets.POLYGON_MNEMONIC }}' - POLYGON_NODE: '${{ secrets.POLYGON_NODE }}' - # ETHERSCAN "${{ secrets.ETHERSCAN }}" - POLYSCAN: '${{ secrets.POLYSCAN }}' - RELEASE_PATH: '${{ needs.prepare.outputs.release_path }}' - ARTIFACT_REFERENCE_URL: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' + # - name: Verify contracts + # shell: bash + # run: | + # yarn hardhat --network ${{ needs.prepare.outputs.release_network }} ${{ needs.prepare.outputs.release_verify_cmd }} ${{ needs.prepare.outputs.release_version }} + # env: + # INFURA_PROJECT_ID: '${{ secrets.INFURA_PROJECT_ID }}' + # MUMBAI_MNEMONIC: '${{ secrets.MUMBAI_MNEMONIC }}' + # MUMBAI_NODE: '${{ secrets.MUMBAI_NODE }}' + # POLYGON_MNEMONIC: '${{ secrets.POLYGON_MNEMONIC }}' + # POLYGON_NODE: '${{ secrets.POLYGON_NODE }}' + # # ETHERSCAN "${{ secrets.ETHERSCAN }}" + # POLYSCAN: '${{ secrets.POLYSCAN }}' + # RELEASE_PATH: '${{ needs.prepare.outputs.release_path }}' + # ARTIFACT_REFERENCE_URL: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' - finish-release: - name: Finish release - if: "startsWith(github.head_ref, 'release/')" - runs-on: ubuntu-22.04 - timeout-minutes: 20 - environment: production - needs: - - prepare - - deploy - steps: - - uses: actions/checkout@v3 - with: - ref: ${{ needs.deploy.outputs.deploy_commit || github.event.pull_request.head.sha }} - - uses: actions/setup-node@v3 - with: - node-version: '14' - cache: 'yarn' - - run: yarn install --frozen-lockfile + # finish-release: + # name: Finish release + # if: "startsWith(github.head_ref, 'release/')" + # runs-on: ubuntu-22.04 + # timeout-minutes: 20 + # environment: production + # needs: + # - prepare + # - deploy + # steps: + # - uses: actions/checkout@v3 + # with: + # ref: ${{ needs.deploy.outputs.deploy_commit || github.event.pull_request.head.sha }} + # - uses: actions/setup-node@v3 + # with: + # node-version: '14' + # cache: 'yarn' + # - run: yarn install --frozen-lockfile - - name: Get build artifacts - uses: actions/download-artifact@v3 - with: - name: contract-artifacts + # - name: Get build artifacts + # uses: actions/download-artifact@v3 + # with: + # name: contract-artifacts - - name: Complete release - if: "needs.prepare.outputs.release_finish_cmd != ''" - shell: bash - run: | - yarn hardhat --network ${{ needs.prepare.outputs.release_network }} ${{ needs.prepare.outputs.release_finish_cmd }} ${{ needs.prepare.outputs.release_version }} "${{ needs.prepare.outputs.release_title }}" "${{ needs.prepare.outputs.release_description }}" - env: - INFURA_PROJECT_ID: '${{ secrets.INFURA_PROJECT_ID }}' - MUMBAI_MNEMONIC: '${{ secrets.MUMBAI_MNEMONIC }}' - MUMBAI_NODE: '${{ secrets.MUMBAI_NODE }}' - POLYGON_MNEMONIC: "${{ secrets.POLYGON_MNEMONIC }}" - POLYGON_NODE: "${{ secrets.POLYGON_NODE }}" - POLYGON_GAS_PRICE: 1200000000000 - DEBUG: '@openzeppelin:*' - # ETHERSCAN "${{ secrets.ETHERSCAN }}" - POLYSCAN: '${{ secrets.POLYSCAN }}' - DEFENDER_API_KEY: '${{ secrets.DEFENDER_API_KEY }}' - DEFENDER_API_SECRET: '${{ secrets.DEFENDER_API_SECRET }}' - RELEASE_PATH: '${{ needs.prepare.outputs.release_path }}' - MULTISIG_ADDRESS: '${{ needs.prepare.outputs.release_multisig }}' + # - name: Complete release + # if: "needs.prepare.outputs.release_finish_cmd != ''" + # shell: bash + # run: | + # yarn hardhat --network ${{ needs.prepare.outputs.release_network }} ${{ needs.prepare.outputs.release_finish_cmd }} ${{ needs.prepare.outputs.release_version }} "${{ needs.prepare.outputs.release_title }}" "${{ needs.prepare.outputs.release_description }}" + # env: + # INFURA_PROJECT_ID: '${{ secrets.INFURA_PROJECT_ID }}' + # MUMBAI_MNEMONIC: '${{ secrets.MUMBAI_MNEMONIC }}' + # MUMBAI_NODE: '${{ secrets.MUMBAI_NODE }}' + # POLYGON_MNEMONIC: "${{ secrets.POLYGON_MNEMONIC }}" + # POLYGON_NODE: "${{ secrets.POLYGON_NODE }}" + # POLYGON_GAS_PRICE: 1200000000000 + # DEBUG: '@openzeppelin:*' + # # ETHERSCAN "${{ secrets.ETHERSCAN }}" + # POLYSCAN: '${{ secrets.POLYSCAN }}' + # DEFENDER_API_KEY: '${{ secrets.DEFENDER_API_KEY }}' + # DEFENDER_API_SECRET: '${{ secrets.DEFENDER_API_SECRET }}' + # RELEASE_PATH: '${{ needs.prepare.outputs.release_path }}' + # MULTISIG_ADDRESS: '${{ needs.prepare.outputs.release_multisig }}' - - name: Link to run in PR - uses: actions/github-script@v6 - env: - RUN_URL: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' - with: - script: | - github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: `[**Deploy finished**](${process.env.RUN_URL})`, - }); + # - name: Link to run in PR + # uses: actions/github-script@v6 + # env: + # RUN_URL: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' + # with: + # script: | + # github.rest.issues.createComment({ + # issue_number: context.issue.number, + # owner: context.repo.owner, + # repo: context.repo.repo, + # body: `[**Deploy finished**](${process.env.RUN_URL})`, + # }); diff --git a/releases/1.2.10/index.yml b/releases/1.2.10/index.yml index eedb536e..76ddf6a6 100644 --- a/releases/1.2.10/index.yml +++ b/releases/1.2.10/index.yml @@ -1,5 +1,5 @@ title: Release -network: mumbai +network: polygon deploy: prepare-upgrade 1.2.10 verify: verify-deployed finish: propose-admin diff --git a/releases/1.2.10/polygon/config/upgrade.json b/releases/1.2.10/polygon/config/upgrade.json index 1799a7ae..0337cde5 100644 --- a/releases/1.2.10/polygon/config/upgrade.json +++ b/releases/1.2.10/polygon/config/upgrade.json @@ -1,99 +1,12 @@ { - "AccessManager": { + "SlashingController": { "impl": { "opts": { "unsafe-allow": [ "delegatecall" ], "constructor-args": [ - "deployment.forwarder" - ] - } - } - }, - "AgentRegistry": { - "impl": { - "opts": { - "unsafe-allow": [ - "delegatecall" - ], - "constructor-args": [ - "deployment.forwarder" - ] - } - } - }, - "ScannerPoolRegistry": { - "impl": { - "opts": { - "unsafe-allow": [ - "delegatecall" - ], - "constructor-args": [ - "deployment.forwarder", "deployment.stake-allocator" - ] - } - - } - }, - "Dispatch": { - "impl": { - "opts": { - "unsafe-allow": [ - "delegatecall" - ], - "constructor-args": [ - "deployment.forwarder" - ] - } - } - }, - "StakeAllocator": { - "impl": { - "opts": { - "unsafe-allow": [ - "delegatecall" - ], - "constructor-args": [ - "deployment.forwarder", "deployment.stake-subject-gateway", "deployment.rewards-distributor" - ] - } - - } - }, - "RewardsDistributor": { - "impl": { - "opts": { - "unsafe-allow": [ - "delegatecall" - ], - "constructor-args": [ - "deployment.forwarder", "deployment.forta", "deployment.stake-subject-gateway" - ] - } - - } - }, - "StakeSubjectGateway": { - "impl": { - "opts": { - "unsafe-allow": [ - "delegatecall" - ], - "constructor-args": [ - "deployment.forwarder" - ] - } - } - }, - "FortaStaking": { - "impl": { - "opts": { - "unsafe-allow": [ - "delegatecall" - ], - "constructor-args": [ - "deployment.forwarder" + "deployment.forwarder", "deployment.forta" ] } } From 9848878f31f1628a0e1ef7b57b293b9f5af3a63e Mon Sep 17 00:00:00 2001 From: Roberto Cantu Date: Wed, 6 Dec 2023 11:30:18 -0600 Subject: [PATCH 18/44] deploy step - mumbai --- .../staking/slashing/SlashingController.sol | 1 + releases/1.2.10/index.yml | 2 +- releases/1.2.10/mumbai/config/upgrade.json | 91 +--------------- .../mumbai/output/prepared-upgrades.json | 103 ------------------ 4 files changed, 4 insertions(+), 193 deletions(-) diff --git a/contracts/components/staking/slashing/SlashingController.sol b/contracts/components/staking/slashing/SlashingController.sol index 9a3c9579..7285f43f 100644 --- a/contracts/components/staking/slashing/SlashingController.sol +++ b/contracts/components/staking/slashing/SlashingController.sol @@ -50,6 +50,7 @@ contract SlashingController is BaseComponentUpgradeable, StateMachineController, mapping(uint256 => uint256) public deposits; // proposalId --> tokenAmount mapping(bytes32 => SlashPenalty) public penalties; // penaltyId --> SlashPenalty ISlashingExecutor public slashingExecutor; + /// @custom:oz-renamed-from _scanners StakeSubjectGateway public subjectGateway; // Should be immutable, but it's already deployed. uint256 public depositAmount; uint256 public slashPercentToProposer; diff --git a/releases/1.2.10/index.yml b/releases/1.2.10/index.yml index 76ddf6a6..eedb536e 100644 --- a/releases/1.2.10/index.yml +++ b/releases/1.2.10/index.yml @@ -1,5 +1,5 @@ title: Release -network: polygon +network: mumbai deploy: prepare-upgrade 1.2.10 verify: verify-deployed finish: propose-admin diff --git a/releases/1.2.10/mumbai/config/upgrade.json b/releases/1.2.10/mumbai/config/upgrade.json index 1799a7ae..0337cde5 100644 --- a/releases/1.2.10/mumbai/config/upgrade.json +++ b/releases/1.2.10/mumbai/config/upgrade.json @@ -1,99 +1,12 @@ { - "AccessManager": { + "SlashingController": { "impl": { "opts": { "unsafe-allow": [ "delegatecall" ], "constructor-args": [ - "deployment.forwarder" - ] - } - } - }, - "AgentRegistry": { - "impl": { - "opts": { - "unsafe-allow": [ - "delegatecall" - ], - "constructor-args": [ - "deployment.forwarder" - ] - } - } - }, - "ScannerPoolRegistry": { - "impl": { - "opts": { - "unsafe-allow": [ - "delegatecall" - ], - "constructor-args": [ - "deployment.forwarder", "deployment.stake-allocator" - ] - } - - } - }, - "Dispatch": { - "impl": { - "opts": { - "unsafe-allow": [ - "delegatecall" - ], - "constructor-args": [ - "deployment.forwarder" - ] - } - } - }, - "StakeAllocator": { - "impl": { - "opts": { - "unsafe-allow": [ - "delegatecall" - ], - "constructor-args": [ - "deployment.forwarder", "deployment.stake-subject-gateway", "deployment.rewards-distributor" - ] - } - - } - }, - "RewardsDistributor": { - "impl": { - "opts": { - "unsafe-allow": [ - "delegatecall" - ], - "constructor-args": [ - "deployment.forwarder", "deployment.forta", "deployment.stake-subject-gateway" - ] - } - - } - }, - "StakeSubjectGateway": { - "impl": { - "opts": { - "unsafe-allow": [ - "delegatecall" - ], - "constructor-args": [ - "deployment.forwarder" - ] - } - } - }, - "FortaStaking": { - "impl": { - "opts": { - "unsafe-allow": [ - "delegatecall" - ], - "constructor-args": [ - "deployment.forwarder" + "deployment.forwarder", "deployment.forta" ] } } diff --git a/releases/1.2.10/mumbai/output/prepared-upgrades.json b/releases/1.2.10/mumbai/output/prepared-upgrades.json index db8dbdc3..e69de29b 100644 --- a/releases/1.2.10/mumbai/output/prepared-upgrades.json +++ b/releases/1.2.10/mumbai/output/prepared-upgrades.json @@ -1,103 +0,0 @@ -{ - "access-manager": { - "impl": { - "address": "0x5Da21607E9e2bCA241E0EA46e27cea3bB8404505", - "constructor-args": [ - "0x4E29Cea6D64be860f5eAba110686DcB585f393D6" - ], - "init-args": [], - "name": "AccessManager", - "timeout": 1200000, - "version": "0.1.0" - } - }, - "agent-registry": { - "impl": { - "address": "0xD25Fd5B722606d08A5DdCD00e969513d06d98d89", - "constructor-args": [ - "0x4E29Cea6D64be860f5eAba110686DcB585f393D6" - ], - "init-args": [], - "name": "AgentRegistry", - "timeout": 1200000, - "version": "0.1.6" - } - }, - "scanner-pool-registry": { - "impl": { - "address": "0x72eaaBB3f5908D5Ac4Fce00285B5af120BA3EcAC", - "constructor-args": [ - "0x4E29Cea6D64be860f5eAba110686DcB585f393D6", - "0x698A6400dE3865fC9E8A6dB22302AAb3372Cebd9" - ], - "init-args": [], - "name": "ScannerPoolRegistry", - "timeout": 1200000, - "version": "0.1.0" - } - }, - "dispatch": { - "impl": { - "address": "0x0ed550214869C3c3D5C05b97A8Bb9388125C4919", - "constructor-args": [ - "0x4E29Cea6D64be860f5eAba110686DcB585f393D6" - ], - "init-args": [], - "name": "Dispatch", - "timeout": 1200000, - "version": "0.1.5" - } - }, - "stake-allocator": { - "impl": { - "address": "0x70FBC65e20DFe5ACDA5665f98A6CdA98800cC637", - "constructor-args": [ - "0x4E29Cea6D64be860f5eAba110686DcB585f393D6", - "0x02304eC24ba2996a83F595D7cf80e5571a406EFA", - "0x404afc59Cacd74A28d0D5651460Cc950b42FAf08" - ], - "init-args": [], - "name": "StakeAllocator", - "timeout": 1200000, - "version": "0.1.0" - } - }, - "rewards-distributor": { - "impl": { - "address": "0x09803F257AB3D8a390837640ED9D9F4Eb22c1453", - "constructor-args": [ - "0x4E29Cea6D64be860f5eAba110686DcB585f393D6", - "0x107Ac13567b1b5D84691f890A5bA07EdaE1a11c3", - "0x02304eC24ba2996a83F595D7cf80e5571a406EFA" - ], - "init-args": [], - "name": "RewardsDistributor", - "timeout": 1200000, - "version": "0.1.0" - } - }, - "stake-subject-gateway": { - "impl": { - "address": "0x40998890c1ad5B22CBe2deB9671E9df91b79dd16", - "constructor-args": [ - "0x4E29Cea6D64be860f5eAba110686DcB585f393D6" - ], - "init-args": [], - "name": "StakeSubjectGateway", - "timeout": 1200000, - "version": "0.1.1" - } - }, - "forta-staking": { - "impl": { - "address": "0x8fd9d47e80f1d711aA97C4926e5E7CB3462455E8", - "constructor-args": [ - "0x4E29Cea6D64be860f5eAba110686DcB585f393D6" - ], - "init-args": [], - "name": "FortaStaking", - "timeout": 1200000, - "version": "0.1.2" - } - } -} \ No newline at end of file From 49d8e53325c03601946cca0731144b5bc7018b8b Mon Sep 17 00:00:00 2001 From: Roberto Cantu Date: Wed, 6 Dec 2023 11:40:26 -0600 Subject: [PATCH 19/44] Create json object --- releases/1.2.10/mumbai/output/prepared-upgrades.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/releases/1.2.10/mumbai/output/prepared-upgrades.json b/releases/1.2.10/mumbai/output/prepared-upgrades.json index e69de29b..544b7b4d 100644 --- a/releases/1.2.10/mumbai/output/prepared-upgrades.json +++ b/releases/1.2.10/mumbai/output/prepared-upgrades.json @@ -0,0 +1,3 @@ +{ + +} \ No newline at end of file From edec9f7f8cefd132c688b681e18a4aeb1ca0671e Mon Sep 17 00:00:00 2001 From: Roberto Cantu Date: Wed, 6 Dec 2023 11:49:04 -0600 Subject: [PATCH 20/44] Re-run Mumbai deploy --- contracts/components/staking/slashing/SlashingController.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/components/staking/slashing/SlashingController.sol b/contracts/components/staking/slashing/SlashingController.sol index 7285f43f..705ab3fc 100644 --- a/contracts/components/staking/slashing/SlashingController.sol +++ b/contracts/components/staking/slashing/SlashingController.sol @@ -50,7 +50,7 @@ contract SlashingController is BaseComponentUpgradeable, StateMachineController, mapping(uint256 => uint256) public deposits; // proposalId --> tokenAmount mapping(bytes32 => SlashPenalty) public penalties; // penaltyId --> SlashPenalty ISlashingExecutor public slashingExecutor; - /// @custom:oz-renamed-from _scanners + /// @custom:oz-renamed-from stakingParameters StakeSubjectGateway public subjectGateway; // Should be immutable, but it's already deployed. uint256 public depositAmount; uint256 public slashPercentToProposer; From 5c5318fc3c9425aa4d083fa90e587f1b8e9fab2a Mon Sep 17 00:00:00 2001 From: Roberto Cantu Date: Wed, 6 Dec 2023 12:01:09 -0600 Subject: [PATCH 21/44] Deploy - Polygon --- releases/1.2.10/index.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releases/1.2.10/index.yml b/releases/1.2.10/index.yml index eedb536e..76ddf6a6 100644 --- a/releases/1.2.10/index.yml +++ b/releases/1.2.10/index.yml @@ -1,5 +1,5 @@ title: Release -network: mumbai +network: polygon deploy: prepare-upgrade 1.2.10 verify: verify-deployed finish: propose-admin From 4326184a7de90143cfe9c9c2f6e942795a207f6a Mon Sep 17 00:00:00 2001 From: RCantu92 Date: Wed, 6 Dec 2023 19:21:15 +0000 Subject: [PATCH 22/44] Update registries of deployed addresses --- .openzeppelin/polygon.json | 314 ++++++++++++++++++ .../polygon/output/prepared-upgrades.json | 13 + 2 files changed, 327 insertions(+) diff --git a/.openzeppelin/polygon.json b/.openzeppelin/polygon.json index c97e3f64..ce11ab10 100644 --- a/.openzeppelin/polygon.json +++ b/.openzeppelin/polygon.json @@ -17415,6 +17415,320 @@ } } } + }, + "15391f2dc5b0d87e8cd227ec89d408fe689c547414f02e022a505906f2d48e71": { + "address": "0x525a90638330473bE7bB756465ca443a03b53068", + "txHash": "0x13135db8d9cc1557b7ed2b88cf6a5f2ebbc1a3a85e4c046fd0c449c7bff5da29", + "layout": { + "solcVersion": "0.8.9", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_accessControl", + "offset": 0, + "slot": "51", + "type": "t_contract(IAccessControl)15000", + "contract": "AccessManagedUpgradeable", + "src": "contracts/components/utils/AccessManaged.sol:16" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessManagedUpgradeable", + "src": "contracts/components/utils/AccessManaged.sol:68" + }, + { + "label": "_deprecated_router", + "offset": 0, + "slot": "101", + "type": "t_address", + "contract": "RoutedUpgradeable", + "src": "contracts/components/utils/Routed.sol:16", + "retypedFrom": "contract IRouter", + "renamedFrom": "_router" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "RoutedUpgradeable", + "src": "contracts/components/utils/Routed.sol:35" + }, + { + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC1967UpgradeUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:211" + }, + { + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage", + "contract": "UUPSUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:107" + }, + { + "label": "__gap", + "offset": 0, + "slot": "251", + "type": "t_array(t_uint256)50_storage", + "contract": "BaseComponentUpgradeable", + "src": "contracts/components/BaseComponentUpgradeable.sol:62" + }, + { + "label": "_machines", + "offset": 0, + "slot": "301", + "type": "t_mapping(t_uint256,t_enum(State)132714)", + "contract": "StateMachineController", + "src": "contracts/components/utils/StateMachines.sol:51" + }, + { + "label": "_proposalIds", + "offset": 0, + "slot": "302", + "type": "t_struct(Counter)17504_storage", + "contract": "SlashingController", + "src": "contracts/components/staking/slashing/SlashingController.sol:48" + }, + { + "label": "proposals", + "offset": 0, + "slot": "303", + "type": "t_mapping(t_uint256,t_struct(Proposal)130008_storage)", + "contract": "SlashingController", + "src": "contracts/components/staking/slashing/SlashingController.sol:49" + }, + { + "label": "deposits", + "offset": 0, + "slot": "304", + "type": "t_mapping(t_uint256,t_uint256)", + "contract": "SlashingController", + "src": "contracts/components/staking/slashing/SlashingController.sol:50" + }, + { + "label": "penalties", + "offset": 0, + "slot": "305", + "type": "t_mapping(t_bytes32,t_struct(SlashPenalty)129994_storage)", + "contract": "SlashingController", + "src": "contracts/components/staking/slashing/SlashingController.sol:51" + }, + { + "label": "slashingExecutor", + "offset": 0, + "slot": "306", + "type": "t_contract(ISlashingExecutor)129903", + "contract": "SlashingController", + "src": "contracts/components/staking/slashing/SlashingController.sol:52" + }, + { + "label": "subjectGateway", + "offset": 0, + "slot": "307", + "type": "t_contract(StakeSubjectGateway)132386", + "contract": "SlashingController", + "src": "contracts/components/staking/slashing/SlashingController.sol:54", + "renamedFrom": "stakingParameters" + }, + { + "label": "depositAmount", + "offset": 0, + "slot": "308", + "type": "t_uint256", + "contract": "SlashingController", + "src": "contracts/components/staking/slashing/SlashingController.sol:55" + }, + { + "label": "slashPercentToProposer", + "offset": 0, + "slot": "309", + "type": "t_uint256", + "contract": "SlashingController", + "src": "contracts/components/staking/slashing/SlashingController.sol:56" + } + ], + "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_contract(IAccessControl)15000": { + "label": "contract IAccessControl", + "numberOfBytes": "20" + }, + "t_contract(ISlashingExecutor)129903": { + "label": "contract ISlashingExecutor", + "numberOfBytes": "20" + }, + "t_contract(StakeSubjectGateway)132386": { + "label": "contract StakeSubjectGateway", + "numberOfBytes": "20" + }, + "t_enum(PenaltyMode)129988": { + "label": "enum SlashingController.PenaltyMode", + "members": [ + "UNDEFINED", + "MIN_STAKE", + "CURRENT_STAKE" + ], + "numberOfBytes": "1" + }, + "t_enum(State)132714": { + "label": "enum StateMachines.State", + "members": [ + "_00", + "_01", + "_02", + "_03", + "_04", + "_05", + "_06", + "_07", + "_08", + "_09", + "_10", + "_11", + "_12", + "_13", + "_14", + "_15" + ], + "numberOfBytes": "1" + }, + "t_mapping(t_bytes32,t_struct(SlashPenalty)129994_storage)": { + "label": "mapping(bytes32 => struct SlashingController.SlashPenalty)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_enum(State)132714)": { + "label": "mapping(uint256 => enum StateMachines.State)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_struct(Proposal)130008_storage)": { + "label": "mapping(uint256 => struct SlashingController.Proposal)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_uint256)": { + "label": "mapping(uint256 => uint256)", + "numberOfBytes": "32" + }, + "t_struct(Counter)17504_storage": { + "label": "struct Counters.Counter", + "members": [ + { + "label": "_value", + "type": "t_uint256", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Proposal)130008_storage": { + "label": "struct SlashingController.Proposal", + "members": [ + { + "label": "subjectId", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "proposer", + "type": "t_address", + "offset": 0, + "slot": "1" + }, + { + "label": "penaltyId", + "type": "t_bytes32", + "offset": 0, + "slot": "2" + }, + { + "label": "subjectType", + "type": "t_uint8", + "offset": 0, + "slot": "3" + } + ], + "numberOfBytes": "128" + }, + "t_struct(SlashPenalty)129994_storage": { + "label": "struct SlashingController.SlashPenalty", + "members": [ + { + "label": "percentSlashed", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "mode", + "type": "t_enum(PenaltyMode)129988", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } } } } diff --git a/releases/1.2.10/polygon/output/prepared-upgrades.json b/releases/1.2.10/polygon/output/prepared-upgrades.json index e68b637f..52f872d4 100644 --- a/releases/1.2.10/polygon/output/prepared-upgrades.json +++ b/releases/1.2.10/polygon/output/prepared-upgrades.json @@ -99,5 +99,18 @@ "timeout": 1200000, "version": "0.1.2" } + }, + "slashing-controller": { + "impl": { + "address": "0x525a90638330473bE7bB756465ca443a03b53068", + "constructor-args": [ + "0xff771084D7C2e54C0F9cA79dA23656514D2c5dd2", + "0x9ff62d1FC52A907B6DCbA8077c2DDCA6E6a9d3e1" + ], + "init-args": [], + "name": "SlashingController", + "timeout": 1200000, + "version": "0.1.0" + } } } \ No newline at end of file From 6f70a46c1e24a17214547c01b773c201bb0890bf Mon Sep 17 00:00:00 2001 From: Roberto Cantu Date: Wed, 6 Dec 2023 13:44:58 -0600 Subject: [PATCH 23/44] verification step --- .github/workflows/release.yml | 72 +++++++-------- releases/1.2.10/mumbai/config/upgrade.json | 99 +++++++++++++++++++++ releases/1.2.10/polygon/config/upgrade.json | 99 +++++++++++++++++++++ 3 files changed, 234 insertions(+), 36 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8a56ed5d..42bbbfeb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -214,44 +214,44 @@ jobs: skip_checkout: true # tagging_message: '${{ needs.prepare.outputs.release_version }}' - # verify: - # name: Verify contracts - # if: "startsWith(github.head_ref, 'release/') && needs.prepare.outputs.release_verify_cmd != ''" - # runs-on: ubuntu-22.04 - # timeout-minutes: 60 - # needs: - # - build - # - prepare - # - deploy - # steps: - # - uses: actions/checkout@v3 - # with: - # ref: ${{ needs.deploy.outputs.deploy_commit || github.event.pull_request.head.sha }} - # - uses: actions/setup-node@v3 - # with: - # node-version: '14' - # cache: 'yarn' - # - run: yarn install --frozen-lockfile + verify: + name: Verify contracts + if: "startsWith(github.head_ref, 'release/') && needs.prepare.outputs.release_verify_cmd != ''" + runs-on: ubuntu-22.04 + timeout-minutes: 60 + needs: + - build + - prepare + - deploy + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ needs.deploy.outputs.deploy_commit || github.event.pull_request.head.sha }} + - uses: actions/setup-node@v3 + with: + node-version: '14' + cache: 'yarn' + - run: yarn install --frozen-lockfile - # - name: Get build artifacts - # uses: actions/download-artifact@v3 - # with: - # name: contract-artifacts + - name: Get build artifacts + uses: actions/download-artifact@v3 + with: + name: contract-artifacts - # - name: Verify contracts - # shell: bash - # run: | - # yarn hardhat --network ${{ needs.prepare.outputs.release_network }} ${{ needs.prepare.outputs.release_verify_cmd }} ${{ needs.prepare.outputs.release_version }} - # env: - # INFURA_PROJECT_ID: '${{ secrets.INFURA_PROJECT_ID }}' - # MUMBAI_MNEMONIC: '${{ secrets.MUMBAI_MNEMONIC }}' - # MUMBAI_NODE: '${{ secrets.MUMBAI_NODE }}' - # POLYGON_MNEMONIC: '${{ secrets.POLYGON_MNEMONIC }}' - # POLYGON_NODE: '${{ secrets.POLYGON_NODE }}' - # # ETHERSCAN "${{ secrets.ETHERSCAN }}" - # POLYSCAN: '${{ secrets.POLYSCAN }}' - # RELEASE_PATH: '${{ needs.prepare.outputs.release_path }}' - # ARTIFACT_REFERENCE_URL: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' + - name: Verify contracts + shell: bash + run: | + yarn hardhat --network ${{ needs.prepare.outputs.release_network }} ${{ needs.prepare.outputs.release_verify_cmd }} ${{ needs.prepare.outputs.release_version }} + env: + INFURA_PROJECT_ID: '${{ secrets.INFURA_PROJECT_ID }}' + MUMBAI_MNEMONIC: '${{ secrets.MUMBAI_MNEMONIC }}' + MUMBAI_NODE: '${{ secrets.MUMBAI_NODE }}' + POLYGON_MNEMONIC: '${{ secrets.POLYGON_MNEMONIC }}' + POLYGON_NODE: '${{ secrets.POLYGON_NODE }}' + # ETHERSCAN "${{ secrets.ETHERSCAN }}" + POLYSCAN: '${{ secrets.POLYSCAN }}' + RELEASE_PATH: '${{ needs.prepare.outputs.release_path }}' + ARTIFACT_REFERENCE_URL: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' # finish-release: # name: Finish release diff --git a/releases/1.2.10/mumbai/config/upgrade.json b/releases/1.2.10/mumbai/config/upgrade.json index 0337cde5..ef60c224 100644 --- a/releases/1.2.10/mumbai/config/upgrade.json +++ b/releases/1.2.10/mumbai/config/upgrade.json @@ -1,4 +1,103 @@ { + "AccessManager": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder" + ] + } + } + }, + "AgentRegistry": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder" + ] + } + } + }, + "ScannerPoolRegistry": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder", "deployment.stake-allocator" + ] + } + + } + }, + "Dispatch": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder" + ] + } + } + }, + "StakeAllocator": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder", "deployment.stake-subject-gateway", "deployment.rewards-distributor" + ] + } + + } + }, + "RewardsDistributor": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder", "deployment.forta", "deployment.stake-subject-gateway" + ] + } + + } + }, + "StakeSubjectGateway": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder" + ] + } + } + }, + "FortaStaking": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder" + ] + } + } + }, "SlashingController": { "impl": { "opts": { diff --git a/releases/1.2.10/polygon/config/upgrade.json b/releases/1.2.10/polygon/config/upgrade.json index 0337cde5..ef60c224 100644 --- a/releases/1.2.10/polygon/config/upgrade.json +++ b/releases/1.2.10/polygon/config/upgrade.json @@ -1,4 +1,103 @@ { + "AccessManager": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder" + ] + } + } + }, + "AgentRegistry": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder" + ] + } + } + }, + "ScannerPoolRegistry": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder", "deployment.stake-allocator" + ] + } + + } + }, + "Dispatch": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder" + ] + } + } + }, + "StakeAllocator": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder", "deployment.stake-subject-gateway", "deployment.rewards-distributor" + ] + } + + } + }, + "RewardsDistributor": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder", "deployment.forta", "deployment.stake-subject-gateway" + ] + } + + } + }, + "StakeSubjectGateway": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder" + ] + } + } + }, + "FortaStaking": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder" + ] + } + } + }, "SlashingController": { "impl": { "opts": { From 21df4249badc91a703b4e181ea84a02e766ac390 Mon Sep 17 00:00:00 2001 From: Roberto Cantu Date: Wed, 6 Dec 2023 14:26:06 -0600 Subject: [PATCH 24/44] finish-release run --- .github/workflows/release.yml | 144 ++++++++++---------- releases/1.2.10/polygon/config/upgrade.json | 99 -------------- 2 files changed, 72 insertions(+), 171 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 42bbbfeb..d240a0f7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -214,52 +214,13 @@ jobs: skip_checkout: true # tagging_message: '${{ needs.prepare.outputs.release_version }}' - verify: - name: Verify contracts - if: "startsWith(github.head_ref, 'release/') && needs.prepare.outputs.release_verify_cmd != ''" - runs-on: ubuntu-22.04 - timeout-minutes: 60 - needs: - - build - - prepare - - deploy - steps: - - uses: actions/checkout@v3 - with: - ref: ${{ needs.deploy.outputs.deploy_commit || github.event.pull_request.head.sha }} - - uses: actions/setup-node@v3 - with: - node-version: '14' - cache: 'yarn' - - run: yarn install --frozen-lockfile - - - name: Get build artifacts - uses: actions/download-artifact@v3 - with: - name: contract-artifacts - - - name: Verify contracts - shell: bash - run: | - yarn hardhat --network ${{ needs.prepare.outputs.release_network }} ${{ needs.prepare.outputs.release_verify_cmd }} ${{ needs.prepare.outputs.release_version }} - env: - INFURA_PROJECT_ID: '${{ secrets.INFURA_PROJECT_ID }}' - MUMBAI_MNEMONIC: '${{ secrets.MUMBAI_MNEMONIC }}' - MUMBAI_NODE: '${{ secrets.MUMBAI_NODE }}' - POLYGON_MNEMONIC: '${{ secrets.POLYGON_MNEMONIC }}' - POLYGON_NODE: '${{ secrets.POLYGON_NODE }}' - # ETHERSCAN "${{ secrets.ETHERSCAN }}" - POLYSCAN: '${{ secrets.POLYSCAN }}' - RELEASE_PATH: '${{ needs.prepare.outputs.release_path }}' - ARTIFACT_REFERENCE_URL: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' - - # finish-release: - # name: Finish release - # if: "startsWith(github.head_ref, 'release/')" + # verify: + # name: Verify contracts + # if: "startsWith(github.head_ref, 'release/') && needs.prepare.outputs.release_verify_cmd != ''" # runs-on: ubuntu-22.04 - # timeout-minutes: 20 - # environment: production + # timeout-minutes: 60 # needs: + # - build # - prepare # - deploy # steps: @@ -277,35 +238,74 @@ jobs: # with: # name: contract-artifacts - # - name: Complete release - # if: "needs.prepare.outputs.release_finish_cmd != ''" + # - name: Verify contracts # shell: bash # run: | - # yarn hardhat --network ${{ needs.prepare.outputs.release_network }} ${{ needs.prepare.outputs.release_finish_cmd }} ${{ needs.prepare.outputs.release_version }} "${{ needs.prepare.outputs.release_title }}" "${{ needs.prepare.outputs.release_description }}" + # yarn hardhat --network ${{ needs.prepare.outputs.release_network }} ${{ needs.prepare.outputs.release_verify_cmd }} ${{ needs.prepare.outputs.release_version }} # env: - # INFURA_PROJECT_ID: '${{ secrets.INFURA_PROJECT_ID }}' - # MUMBAI_MNEMONIC: '${{ secrets.MUMBAI_MNEMONIC }}' - # MUMBAI_NODE: '${{ secrets.MUMBAI_NODE }}' - # POLYGON_MNEMONIC: "${{ secrets.POLYGON_MNEMONIC }}" - # POLYGON_NODE: "${{ secrets.POLYGON_NODE }}" - # POLYGON_GAS_PRICE: 1200000000000 - # DEBUG: '@openzeppelin:*' - # # ETHERSCAN "${{ secrets.ETHERSCAN }}" - # POLYSCAN: '${{ secrets.POLYSCAN }}' - # DEFENDER_API_KEY: '${{ secrets.DEFENDER_API_KEY }}' - # DEFENDER_API_SECRET: '${{ secrets.DEFENDER_API_SECRET }}' - # RELEASE_PATH: '${{ needs.prepare.outputs.release_path }}' - # MULTISIG_ADDRESS: '${{ needs.prepare.outputs.release_multisig }}' + # INFURA_PROJECT_ID: '${{ secrets.INFURA_PROJECT_ID }}' + # MUMBAI_MNEMONIC: '${{ secrets.MUMBAI_MNEMONIC }}' + # MUMBAI_NODE: '${{ secrets.MUMBAI_NODE }}' + # POLYGON_MNEMONIC: '${{ secrets.POLYGON_MNEMONIC }}' + # POLYGON_NODE: '${{ secrets.POLYGON_NODE }}' + # # ETHERSCAN "${{ secrets.ETHERSCAN }}" + # POLYSCAN: '${{ secrets.POLYSCAN }}' + # RELEASE_PATH: '${{ needs.prepare.outputs.release_path }}' + # ARTIFACT_REFERENCE_URL: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' - # - name: Link to run in PR - # uses: actions/github-script@v6 - # env: - # RUN_URL: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' - # with: - # script: | - # github.rest.issues.createComment({ - # issue_number: context.issue.number, - # owner: context.repo.owner, - # repo: context.repo.repo, - # body: `[**Deploy finished**](${process.env.RUN_URL})`, - # }); + finish-release: + name: Finish release + if: "startsWith(github.head_ref, 'release/')" + runs-on: ubuntu-22.04 + timeout-minutes: 20 + environment: production + needs: + - prepare + - deploy + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ needs.deploy.outputs.deploy_commit || github.event.pull_request.head.sha }} + - uses: actions/setup-node@v3 + with: + node-version: '14' + cache: 'yarn' + - run: yarn install --frozen-lockfile + + - name: Get build artifacts + uses: actions/download-artifact@v3 + with: + name: contract-artifacts + + - name: Complete release + if: "needs.prepare.outputs.release_finish_cmd != ''" + shell: bash + run: | + yarn hardhat --network ${{ needs.prepare.outputs.release_network }} ${{ needs.prepare.outputs.release_finish_cmd }} ${{ needs.prepare.outputs.release_version }} "${{ needs.prepare.outputs.release_title }}" "${{ needs.prepare.outputs.release_description }}" + env: + INFURA_PROJECT_ID: '${{ secrets.INFURA_PROJECT_ID }}' + MUMBAI_MNEMONIC: '${{ secrets.MUMBAI_MNEMONIC }}' + MUMBAI_NODE: '${{ secrets.MUMBAI_NODE }}' + POLYGON_MNEMONIC: "${{ secrets.POLYGON_MNEMONIC }}" + POLYGON_NODE: "${{ secrets.POLYGON_NODE }}" + POLYGON_GAS_PRICE: 1200000000000 + DEBUG: '@openzeppelin:*' + # ETHERSCAN "${{ secrets.ETHERSCAN }}" + POLYSCAN: '${{ secrets.POLYSCAN }}' + DEFENDER_API_KEY: '${{ secrets.DEFENDER_API_KEY }}' + DEFENDER_API_SECRET: '${{ secrets.DEFENDER_API_SECRET }}' + RELEASE_PATH: '${{ needs.prepare.outputs.release_path }}' + MULTISIG_ADDRESS: '${{ needs.prepare.outputs.release_multisig }}' + + - name: Link to run in PR + uses: actions/github-script@v6 + env: + RUN_URL: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' + with: + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: `[**Deploy finished**](${process.env.RUN_URL})`, + }); diff --git a/releases/1.2.10/polygon/config/upgrade.json b/releases/1.2.10/polygon/config/upgrade.json index ef60c224..0337cde5 100644 --- a/releases/1.2.10/polygon/config/upgrade.json +++ b/releases/1.2.10/polygon/config/upgrade.json @@ -1,103 +1,4 @@ { - "AccessManager": { - "impl": { - "opts": { - "unsafe-allow": [ - "delegatecall" - ], - "constructor-args": [ - "deployment.forwarder" - ] - } - } - }, - "AgentRegistry": { - "impl": { - "opts": { - "unsafe-allow": [ - "delegatecall" - ], - "constructor-args": [ - "deployment.forwarder" - ] - } - } - }, - "ScannerPoolRegistry": { - "impl": { - "opts": { - "unsafe-allow": [ - "delegatecall" - ], - "constructor-args": [ - "deployment.forwarder", "deployment.stake-allocator" - ] - } - - } - }, - "Dispatch": { - "impl": { - "opts": { - "unsafe-allow": [ - "delegatecall" - ], - "constructor-args": [ - "deployment.forwarder" - ] - } - } - }, - "StakeAllocator": { - "impl": { - "opts": { - "unsafe-allow": [ - "delegatecall" - ], - "constructor-args": [ - "deployment.forwarder", "deployment.stake-subject-gateway", "deployment.rewards-distributor" - ] - } - - } - }, - "RewardsDistributor": { - "impl": { - "opts": { - "unsafe-allow": [ - "delegatecall" - ], - "constructor-args": [ - "deployment.forwarder", "deployment.forta", "deployment.stake-subject-gateway" - ] - } - - } - }, - "StakeSubjectGateway": { - "impl": { - "opts": { - "unsafe-allow": [ - "delegatecall" - ], - "constructor-args": [ - "deployment.forwarder" - ] - } - } - }, - "FortaStaking": { - "impl": { - "opts": { - "unsafe-allow": [ - "delegatecall" - ], - "constructor-args": [ - "deployment.forwarder" - ] - } - } - }, "SlashingController": { "impl": { "opts": { From 11fb04e7bc36f9463e73f295c2e75998d3dac3d0 Mon Sep 17 00:00:00 2001 From: Roberto Cantu Date: Wed, 6 Dec 2023 14:39:10 -0600 Subject: [PATCH 25/44] Re-run finish-release --- .../polygon/output/prepared-upgrades.json | 101 ------------------ 1 file changed, 101 deletions(-) diff --git a/releases/1.2.10/polygon/output/prepared-upgrades.json b/releases/1.2.10/polygon/output/prepared-upgrades.json index 52f872d4..be18da13 100644 --- a/releases/1.2.10/polygon/output/prepared-upgrades.json +++ b/releases/1.2.10/polygon/output/prepared-upgrades.json @@ -1,105 +1,4 @@ { - "access-manager": { - "impl": { - "address": "0x739707848131F41aCd1d78A56FE0eA02052811Df", - "constructor-args": [ - "0xff771084D7C2e54C0F9cA79dA23656514D2c5dd2" - ], - "init-args": [], - "name": "AccessManager", - "timeout": 1200000, - "version": "0.1.0" - } - }, - "agent-registry": { - "impl": { - "address": "0xE7e6c9A579eF43FfE629F9B99a9e4585ae69ED9c", - "constructor-args": [ - "0xff771084D7C2e54C0F9cA79dA23656514D2c5dd2" - ], - "init-args": [], - "name": "AgentRegistry", - "timeout": 1200000, - "version": "0.1.6" - } - }, - "scanner-pool-registry": { - "impl": { - "address": "0x92FA117c7c071cC11b544931c46c9e3096d6FcB1", - "constructor-args": [ - "0xff771084D7C2e54C0F9cA79dA23656514D2c5dd2", - "0x5B73756e637A77Fa52e5Ce71EC6189A4C775c6FA" - ], - "init-args": [], - "name": "ScannerPoolRegistry", - "timeout": 1200000, - "version": "0.1.0" - } - }, - "dispatch": { - "impl": { - "address": "0xB5F1A9C329924Fe8203A91aa891182d4E331fF0A", - "constructor-args": [ - "0xff771084D7C2e54C0F9cA79dA23656514D2c5dd2" - ], - "init-args": [], - "name": "Dispatch", - "timeout": 1200000, - "version": "0.1.5" - } - }, - "stake-allocator": { - "impl": { - "address": "0x8A9B40aE0cCa4f602CA3E4f68114b69C794571F0", - "constructor-args": [ - "0xff771084D7C2e54C0F9cA79dA23656514D2c5dd2", - "0x587969Add789c13F64Bcc34Ff253BD9BFB78f38a", - "0xf7239f26b79145297737166b0C66F4919af9c507" - ], - "init-args": [], - "name": "StakeAllocator", - "timeout": 1200000, - "version": "0.1.0" - } - }, - "rewards-distributor": { - "impl": { - "address": "0xfc3642038a312Ff983BdBC1F5C900eEC20AaFfB6", - "constructor-args": [ - "0xff771084D7C2e54C0F9cA79dA23656514D2c5dd2", - "0x9ff62d1FC52A907B6DCbA8077c2DDCA6E6a9d3e1", - "0x587969Add789c13F64Bcc34Ff253BD9BFB78f38a" - ], - "init-args": [], - "name": "RewardsDistributor", - "timeout": 1200000, - "version": "0.1.0" - } - }, - "stake-subject-gateway": { - "impl": { - "address": "0x6C85A754F9c79178D9701e91C29C995f227D7551", - "constructor-args": [ - "0xff771084D7C2e54C0F9cA79dA23656514D2c5dd2" - ], - "init-args": [], - "name": "StakeSubjectGateway", - "timeout": 1200000, - "version": "0.1.1" - } - }, - "forta-staking": { - "impl": { - "address": "0xeA359707f17Aeb000c9385b4Bfd1cC7be62d4Bc7", - "constructor-args": [ - "0xff771084D7C2e54C0F9cA79dA23656514D2c5dd2" - ], - "init-args": [], - "name": "FortaStaking", - "timeout": 1200000, - "version": "0.1.2" - } - }, "slashing-controller": { "impl": { "address": "0x525a90638330473bE7bB756465ca443a03b53068", From 7eb9570ef71f6c1a11e7c94a66a0d452868054d7 Mon Sep 17 00:00:00 2001 From: Roberto Cantu Date: Thu, 7 Dec 2023 09:18:07 -0600 Subject: [PATCH 26/44] Mumbai deployment --- releases/1.2.10/index.yml | 2 +- releases/1.2.10/mumbai/config/upgrade.json | 99 ----------------- .../mumbai/output/prepared-upgrades.json | 102 +++++++++++++++++- 3 files changed, 102 insertions(+), 101 deletions(-) diff --git a/releases/1.2.10/index.yml b/releases/1.2.10/index.yml index 76ddf6a6..eedb536e 100644 --- a/releases/1.2.10/index.yml +++ b/releases/1.2.10/index.yml @@ -1,5 +1,5 @@ title: Release -network: polygon +network: mumbai deploy: prepare-upgrade 1.2.10 verify: verify-deployed finish: propose-admin diff --git a/releases/1.2.10/mumbai/config/upgrade.json b/releases/1.2.10/mumbai/config/upgrade.json index ef60c224..0337cde5 100644 --- a/releases/1.2.10/mumbai/config/upgrade.json +++ b/releases/1.2.10/mumbai/config/upgrade.json @@ -1,103 +1,4 @@ { - "AccessManager": { - "impl": { - "opts": { - "unsafe-allow": [ - "delegatecall" - ], - "constructor-args": [ - "deployment.forwarder" - ] - } - } - }, - "AgentRegistry": { - "impl": { - "opts": { - "unsafe-allow": [ - "delegatecall" - ], - "constructor-args": [ - "deployment.forwarder" - ] - } - } - }, - "ScannerPoolRegistry": { - "impl": { - "opts": { - "unsafe-allow": [ - "delegatecall" - ], - "constructor-args": [ - "deployment.forwarder", "deployment.stake-allocator" - ] - } - - } - }, - "Dispatch": { - "impl": { - "opts": { - "unsafe-allow": [ - "delegatecall" - ], - "constructor-args": [ - "deployment.forwarder" - ] - } - } - }, - "StakeAllocator": { - "impl": { - "opts": { - "unsafe-allow": [ - "delegatecall" - ], - "constructor-args": [ - "deployment.forwarder", "deployment.stake-subject-gateway", "deployment.rewards-distributor" - ] - } - - } - }, - "RewardsDistributor": { - "impl": { - "opts": { - "unsafe-allow": [ - "delegatecall" - ], - "constructor-args": [ - "deployment.forwarder", "deployment.forta", "deployment.stake-subject-gateway" - ] - } - - } - }, - "StakeSubjectGateway": { - "impl": { - "opts": { - "unsafe-allow": [ - "delegatecall" - ], - "constructor-args": [ - "deployment.forwarder" - ] - } - } - }, - "FortaStaking": { - "impl": { - "opts": { - "unsafe-allow": [ - "delegatecall" - ], - "constructor-args": [ - "deployment.forwarder" - ] - } - } - }, "SlashingController": { "impl": { "opts": { diff --git a/releases/1.2.10/mumbai/output/prepared-upgrades.json b/releases/1.2.10/mumbai/output/prepared-upgrades.json index 544b7b4d..db8dbdc3 100644 --- a/releases/1.2.10/mumbai/output/prepared-upgrades.json +++ b/releases/1.2.10/mumbai/output/prepared-upgrades.json @@ -1,3 +1,103 @@ { - + "access-manager": { + "impl": { + "address": "0x5Da21607E9e2bCA241E0EA46e27cea3bB8404505", + "constructor-args": [ + "0x4E29Cea6D64be860f5eAba110686DcB585f393D6" + ], + "init-args": [], + "name": "AccessManager", + "timeout": 1200000, + "version": "0.1.0" + } + }, + "agent-registry": { + "impl": { + "address": "0xD25Fd5B722606d08A5DdCD00e969513d06d98d89", + "constructor-args": [ + "0x4E29Cea6D64be860f5eAba110686DcB585f393D6" + ], + "init-args": [], + "name": "AgentRegistry", + "timeout": 1200000, + "version": "0.1.6" + } + }, + "scanner-pool-registry": { + "impl": { + "address": "0x72eaaBB3f5908D5Ac4Fce00285B5af120BA3EcAC", + "constructor-args": [ + "0x4E29Cea6D64be860f5eAba110686DcB585f393D6", + "0x698A6400dE3865fC9E8A6dB22302AAb3372Cebd9" + ], + "init-args": [], + "name": "ScannerPoolRegistry", + "timeout": 1200000, + "version": "0.1.0" + } + }, + "dispatch": { + "impl": { + "address": "0x0ed550214869C3c3D5C05b97A8Bb9388125C4919", + "constructor-args": [ + "0x4E29Cea6D64be860f5eAba110686DcB585f393D6" + ], + "init-args": [], + "name": "Dispatch", + "timeout": 1200000, + "version": "0.1.5" + } + }, + "stake-allocator": { + "impl": { + "address": "0x70FBC65e20DFe5ACDA5665f98A6CdA98800cC637", + "constructor-args": [ + "0x4E29Cea6D64be860f5eAba110686DcB585f393D6", + "0x02304eC24ba2996a83F595D7cf80e5571a406EFA", + "0x404afc59Cacd74A28d0D5651460Cc950b42FAf08" + ], + "init-args": [], + "name": "StakeAllocator", + "timeout": 1200000, + "version": "0.1.0" + } + }, + "rewards-distributor": { + "impl": { + "address": "0x09803F257AB3D8a390837640ED9D9F4Eb22c1453", + "constructor-args": [ + "0x4E29Cea6D64be860f5eAba110686DcB585f393D6", + "0x107Ac13567b1b5D84691f890A5bA07EdaE1a11c3", + "0x02304eC24ba2996a83F595D7cf80e5571a406EFA" + ], + "init-args": [], + "name": "RewardsDistributor", + "timeout": 1200000, + "version": "0.1.0" + } + }, + "stake-subject-gateway": { + "impl": { + "address": "0x40998890c1ad5B22CBe2deB9671E9df91b79dd16", + "constructor-args": [ + "0x4E29Cea6D64be860f5eAba110686DcB585f393D6" + ], + "init-args": [], + "name": "StakeSubjectGateway", + "timeout": 1200000, + "version": "0.1.1" + } + }, + "forta-staking": { + "impl": { + "address": "0x8fd9d47e80f1d711aA97C4926e5E7CB3462455E8", + "constructor-args": [ + "0x4E29Cea6D64be860f5eAba110686DcB585f393D6" + ], + "init-args": [], + "name": "FortaStaking", + "timeout": 1200000, + "version": "0.1.2" + } + } } \ No newline at end of file From 7680895dba22377b13c6df1de55954392f2660ce Mon Sep 17 00:00:00 2001 From: Roberto Cantu Date: Thu, 7 Dec 2023 09:41:57 -0600 Subject: [PATCH 27/44] Slashing for DEV --- contracts/components/staking/slashing/SlashingController.sol | 1 - 1 file changed, 1 deletion(-) diff --git a/contracts/components/staking/slashing/SlashingController.sol b/contracts/components/staking/slashing/SlashingController.sol index 705ab3fc..9a3c9579 100644 --- a/contracts/components/staking/slashing/SlashingController.sol +++ b/contracts/components/staking/slashing/SlashingController.sol @@ -50,7 +50,6 @@ contract SlashingController is BaseComponentUpgradeable, StateMachineController, mapping(uint256 => uint256) public deposits; // proposalId --> tokenAmount mapping(bytes32 => SlashPenalty) public penalties; // penaltyId --> SlashPenalty ISlashingExecutor public slashingExecutor; - /// @custom:oz-renamed-from stakingParameters StakeSubjectGateway public subjectGateway; // Should be immutable, but it's already deployed. uint256 public depositAmount; uint256 public slashPercentToProposer; From 850d9346d17862418342d6b6de381536734681d4 Mon Sep 17 00:00:00 2001 From: Roberto Cantu Date: Thu, 7 Dec 2023 09:44:03 -0600 Subject: [PATCH 28/44] empty prepared-upgrades --- .../mumbai/output/prepared-upgrades.json | 102 +----------------- 1 file changed, 1 insertion(+), 101 deletions(-) diff --git a/releases/1.2.10/mumbai/output/prepared-upgrades.json b/releases/1.2.10/mumbai/output/prepared-upgrades.json index db8dbdc3..0e0dcd23 100644 --- a/releases/1.2.10/mumbai/output/prepared-upgrades.json +++ b/releases/1.2.10/mumbai/output/prepared-upgrades.json @@ -1,103 +1,3 @@ { - "access-manager": { - "impl": { - "address": "0x5Da21607E9e2bCA241E0EA46e27cea3bB8404505", - "constructor-args": [ - "0x4E29Cea6D64be860f5eAba110686DcB585f393D6" - ], - "init-args": [], - "name": "AccessManager", - "timeout": 1200000, - "version": "0.1.0" - } - }, - "agent-registry": { - "impl": { - "address": "0xD25Fd5B722606d08A5DdCD00e969513d06d98d89", - "constructor-args": [ - "0x4E29Cea6D64be860f5eAba110686DcB585f393D6" - ], - "init-args": [], - "name": "AgentRegistry", - "timeout": 1200000, - "version": "0.1.6" - } - }, - "scanner-pool-registry": { - "impl": { - "address": "0x72eaaBB3f5908D5Ac4Fce00285B5af120BA3EcAC", - "constructor-args": [ - "0x4E29Cea6D64be860f5eAba110686DcB585f393D6", - "0x698A6400dE3865fC9E8A6dB22302AAb3372Cebd9" - ], - "init-args": [], - "name": "ScannerPoolRegistry", - "timeout": 1200000, - "version": "0.1.0" - } - }, - "dispatch": { - "impl": { - "address": "0x0ed550214869C3c3D5C05b97A8Bb9388125C4919", - "constructor-args": [ - "0x4E29Cea6D64be860f5eAba110686DcB585f393D6" - ], - "init-args": [], - "name": "Dispatch", - "timeout": 1200000, - "version": "0.1.5" - } - }, - "stake-allocator": { - "impl": { - "address": "0x70FBC65e20DFe5ACDA5665f98A6CdA98800cC637", - "constructor-args": [ - "0x4E29Cea6D64be860f5eAba110686DcB585f393D6", - "0x02304eC24ba2996a83F595D7cf80e5571a406EFA", - "0x404afc59Cacd74A28d0D5651460Cc950b42FAf08" - ], - "init-args": [], - "name": "StakeAllocator", - "timeout": 1200000, - "version": "0.1.0" - } - }, - "rewards-distributor": { - "impl": { - "address": "0x09803F257AB3D8a390837640ED9D9F4Eb22c1453", - "constructor-args": [ - "0x4E29Cea6D64be860f5eAba110686DcB585f393D6", - "0x107Ac13567b1b5D84691f890A5bA07EdaE1a11c3", - "0x02304eC24ba2996a83F595D7cf80e5571a406EFA" - ], - "init-args": [], - "name": "RewardsDistributor", - "timeout": 1200000, - "version": "0.1.0" - } - }, - "stake-subject-gateway": { - "impl": { - "address": "0x40998890c1ad5B22CBe2deB9671E9df91b79dd16", - "constructor-args": [ - "0x4E29Cea6D64be860f5eAba110686DcB585f393D6" - ], - "init-args": [], - "name": "StakeSubjectGateway", - "timeout": 1200000, - "version": "0.1.1" - } - }, - "forta-staking": { - "impl": { - "address": "0x8fd9d47e80f1d711aA97C4926e5E7CB3462455E8", - "constructor-args": [ - "0x4E29Cea6D64be860f5eAba110686DcB585f393D6" - ], - "init-args": [], - "name": "FortaStaking", - "timeout": 1200000, - "version": "0.1.2" - } - } + } \ No newline at end of file From 4bf780a63f1ef36125673ab1edb38c79018884d3 Mon Sep 17 00:00:00 2001 From: RCantu92 Date: Thu, 7 Dec 2023 15:49:12 +0000 Subject: [PATCH 29/44] Update registries of deployed addresses --- .openzeppelin/polygon-mumbai.json | 313 ++++++++++++++++++ .../mumbai/output/prepared-upgrades.json | 14 +- 2 files changed, 326 insertions(+), 1 deletion(-) diff --git a/.openzeppelin/polygon-mumbai.json b/.openzeppelin/polygon-mumbai.json index 101bc49d..7f702700 100644 --- a/.openzeppelin/polygon-mumbai.json +++ b/.openzeppelin/polygon-mumbai.json @@ -28496,6 +28496,319 @@ } } } + }, + "e14530da37d2da627bc06d2281f83293c5e21e6d2da53fc4686d4c6d3d6d15d9": { + "address": "0xC43E5C075e4081209F337f0431D8c488Cd61B522", + "txHash": "0x855f50e75b87b7764a04ec86d4b1f74cc55ae1c07cec07147d95036b42ee7b2d", + "layout": { + "solcVersion": "0.8.9", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_accessControl", + "offset": 0, + "slot": "51", + "type": "t_contract(IAccessControl)15000", + "contract": "AccessManagedUpgradeable", + "src": "contracts/components/utils/AccessManaged.sol:16" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessManagedUpgradeable", + "src": "contracts/components/utils/AccessManaged.sol:68" + }, + { + "label": "_deprecated_router", + "offset": 0, + "slot": "101", + "type": "t_address", + "contract": "RoutedUpgradeable", + "src": "contracts/components/utils/Routed.sol:16", + "retypedFrom": "contract IRouter", + "renamedFrom": "_router" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "RoutedUpgradeable", + "src": "contracts/components/utils/Routed.sol:35" + }, + { + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC1967UpgradeUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:211" + }, + { + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage", + "contract": "UUPSUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:107" + }, + { + "label": "__gap", + "offset": 0, + "slot": "251", + "type": "t_array(t_uint256)50_storage", + "contract": "BaseComponentUpgradeable", + "src": "contracts/components/BaseComponentUpgradeable.sol:62" + }, + { + "label": "_machines", + "offset": 0, + "slot": "301", + "type": "t_mapping(t_uint256,t_enum(State)132713)", + "contract": "StateMachineController", + "src": "contracts/components/utils/StateMachines.sol:51" + }, + { + "label": "_proposalIds", + "offset": 0, + "slot": "302", + "type": "t_struct(Counter)17504_storage", + "contract": "SlashingController", + "src": "contracts/components/staking/slashing/SlashingController.sol:48" + }, + { + "label": "proposals", + "offset": 0, + "slot": "303", + "type": "t_mapping(t_uint256,t_struct(Proposal)130008_storage)", + "contract": "SlashingController", + "src": "contracts/components/staking/slashing/SlashingController.sol:49" + }, + { + "label": "deposits", + "offset": 0, + "slot": "304", + "type": "t_mapping(t_uint256,t_uint256)", + "contract": "SlashingController", + "src": "contracts/components/staking/slashing/SlashingController.sol:50" + }, + { + "label": "penalties", + "offset": 0, + "slot": "305", + "type": "t_mapping(t_bytes32,t_struct(SlashPenalty)129994_storage)", + "contract": "SlashingController", + "src": "contracts/components/staking/slashing/SlashingController.sol:51" + }, + { + "label": "slashingExecutor", + "offset": 0, + "slot": "306", + "type": "t_contract(ISlashingExecutor)129903", + "contract": "SlashingController", + "src": "contracts/components/staking/slashing/SlashingController.sol:52" + }, + { + "label": "subjectGateway", + "offset": 0, + "slot": "307", + "type": "t_contract(StakeSubjectGateway)132385", + "contract": "SlashingController", + "src": "contracts/components/staking/slashing/SlashingController.sol:53" + }, + { + "label": "depositAmount", + "offset": 0, + "slot": "308", + "type": "t_uint256", + "contract": "SlashingController", + "src": "contracts/components/staking/slashing/SlashingController.sol:54" + }, + { + "label": "slashPercentToProposer", + "offset": 0, + "slot": "309", + "type": "t_uint256", + "contract": "SlashingController", + "src": "contracts/components/staking/slashing/SlashingController.sol:55" + } + ], + "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_contract(IAccessControl)15000": { + "label": "contract IAccessControl", + "numberOfBytes": "20" + }, + "t_contract(ISlashingExecutor)129903": { + "label": "contract ISlashingExecutor", + "numberOfBytes": "20" + }, + "t_contract(StakeSubjectGateway)132385": { + "label": "contract StakeSubjectGateway", + "numberOfBytes": "20" + }, + "t_enum(PenaltyMode)129988": { + "label": "enum SlashingController.PenaltyMode", + "members": [ + "UNDEFINED", + "MIN_STAKE", + "CURRENT_STAKE" + ], + "numberOfBytes": "1" + }, + "t_enum(State)132713": { + "label": "enum StateMachines.State", + "members": [ + "_00", + "_01", + "_02", + "_03", + "_04", + "_05", + "_06", + "_07", + "_08", + "_09", + "_10", + "_11", + "_12", + "_13", + "_14", + "_15" + ], + "numberOfBytes": "1" + }, + "t_mapping(t_bytes32,t_struct(SlashPenalty)129994_storage)": { + "label": "mapping(bytes32 => struct SlashingController.SlashPenalty)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_enum(State)132713)": { + "label": "mapping(uint256 => enum StateMachines.State)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_struct(Proposal)130008_storage)": { + "label": "mapping(uint256 => struct SlashingController.Proposal)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_uint256)": { + "label": "mapping(uint256 => uint256)", + "numberOfBytes": "32" + }, + "t_struct(Counter)17504_storage": { + "label": "struct Counters.Counter", + "members": [ + { + "label": "_value", + "type": "t_uint256", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_struct(Proposal)130008_storage": { + "label": "struct SlashingController.Proposal", + "members": [ + { + "label": "subjectId", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "proposer", + "type": "t_address", + "offset": 0, + "slot": "1" + }, + { + "label": "penaltyId", + "type": "t_bytes32", + "offset": 0, + "slot": "2" + }, + { + "label": "subjectType", + "type": "t_uint8", + "offset": 0, + "slot": "3" + } + ], + "numberOfBytes": "128" + }, + "t_struct(SlashPenalty)129994_storage": { + "label": "struct SlashingController.SlashPenalty", + "members": [ + { + "label": "percentSlashed", + "type": "t_uint256", + "offset": 0, + "slot": "0" + }, + { + "label": "mode", + "type": "t_enum(PenaltyMode)129988", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } } } } diff --git a/releases/1.2.10/mumbai/output/prepared-upgrades.json b/releases/1.2.10/mumbai/output/prepared-upgrades.json index 0e0dcd23..9c171520 100644 --- a/releases/1.2.10/mumbai/output/prepared-upgrades.json +++ b/releases/1.2.10/mumbai/output/prepared-upgrades.json @@ -1,3 +1,15 @@ { - + "slashing-controller": { + "impl": { + "address": "0xC43E5C075e4081209F337f0431D8c488Cd61B522", + "constructor-args": [ + "0x4E29Cea6D64be860f5eAba110686DcB585f393D6", + "0x107Ac13567b1b5D84691f890A5bA07EdaE1a11c3" + ], + "init-args": [], + "name": "SlashingController", + "timeout": 1200000, + "version": "0.1.1" + } + } } \ No newline at end of file From e3593773ee25a97e46f4d432e43accbb289c0973 Mon Sep 17 00:00:00 2001 From: Roberto Cantu Date: Thu, 7 Dec 2023 10:39:25 -0600 Subject: [PATCH 30/44] grant Slasher role --- releases/1.2.10/mumbai/config/propose-admin.json | 10 ++++++++++ .../1.2.10/mumbai/output/prepared-upgrades.json | 14 +------------- 2 files changed, 11 insertions(+), 13 deletions(-) create mode 100644 releases/1.2.10/mumbai/config/propose-admin.json diff --git a/releases/1.2.10/mumbai/config/propose-admin.json b/releases/1.2.10/mumbai/config/propose-admin.json new file mode 100644 index 00000000..50513051 --- /dev/null +++ b/releases/1.2.10/mumbai/config/propose-admin.json @@ -0,0 +1,10 @@ +{ + "AccessManager": [ + { + "methodName": "grantRole", + "params": [ + ["roles.SLASHER_ROLE", "0x9bc159c97fA36282F0362C56586BA16BeB9F656a"] + ] + } + ] +} \ No newline at end of file diff --git a/releases/1.2.10/mumbai/output/prepared-upgrades.json b/releases/1.2.10/mumbai/output/prepared-upgrades.json index 9c171520..4eb7c3f9 100644 --- a/releases/1.2.10/mumbai/output/prepared-upgrades.json +++ b/releases/1.2.10/mumbai/output/prepared-upgrades.json @@ -1,15 +1,3 @@ { - "slashing-controller": { - "impl": { - "address": "0xC43E5C075e4081209F337f0431D8c488Cd61B522", - "constructor-args": [ - "0x4E29Cea6D64be860f5eAba110686DcB585f393D6", - "0x107Ac13567b1b5D84691f890A5bA07EdaE1a11c3" - ], - "init-args": [], - "name": "SlashingController", - "timeout": 1200000, - "version": "0.1.1" - } - } + } \ No newline at end of file From 0bcc93f3c926caf6ce374172c4e8dfc55b30e457 Mon Sep 17 00:00:00 2001 From: RCantu92 Date: Thu, 7 Dec 2023 16:44:19 +0000 Subject: [PATCH 31/44] Update registries of deployed addresses --- .../1.2.10/mumbai/output/prepared-upgrades.json | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/releases/1.2.10/mumbai/output/prepared-upgrades.json b/releases/1.2.10/mumbai/output/prepared-upgrades.json index 4eb7c3f9..9c171520 100644 --- a/releases/1.2.10/mumbai/output/prepared-upgrades.json +++ b/releases/1.2.10/mumbai/output/prepared-upgrades.json @@ -1,3 +1,15 @@ { - + "slashing-controller": { + "impl": { + "address": "0xC43E5C075e4081209F337f0431D8c488Cd61B522", + "constructor-args": [ + "0x4E29Cea6D64be860f5eAba110686DcB585f393D6", + "0x107Ac13567b1b5D84691f890A5bA07EdaE1a11c3" + ], + "init-args": [], + "name": "SlashingController", + "timeout": 1200000, + "version": "0.1.1" + } + } } \ No newline at end of file From 2988ad9bd2fd09f48f1d57307d9ce924965b6617 Mon Sep 17 00:00:00 2001 From: Roberto Cantu Date: Thu, 7 Dec 2023 15:09:07 -0600 Subject: [PATCH 32/44] Mumbai release --- releases/1.2.10/mumbai/config/upgrade.json | 4 ++-- releases/1.2.10/polygon/config/upgrade.json | 4 ++-- .../1.2.10/polygon/output/prepared-upgrades.json | 14 +------------- 3 files changed, 5 insertions(+), 17 deletions(-) diff --git a/releases/1.2.10/mumbai/config/upgrade.json b/releases/1.2.10/mumbai/config/upgrade.json index 0337cde5..712b8324 100644 --- a/releases/1.2.10/mumbai/config/upgrade.json +++ b/releases/1.2.10/mumbai/config/upgrade.json @@ -1,12 +1,12 @@ { - "SlashingController": { + "ScannerNodeVersion": { "impl": { "opts": { "unsafe-allow": [ "delegatecall" ], "constructor-args": [ - "deployment.forwarder", "deployment.forta" + "deployment.forwarder" ] } } diff --git a/releases/1.2.10/polygon/config/upgrade.json b/releases/1.2.10/polygon/config/upgrade.json index 0337cde5..712b8324 100644 --- a/releases/1.2.10/polygon/config/upgrade.json +++ b/releases/1.2.10/polygon/config/upgrade.json @@ -1,12 +1,12 @@ { - "SlashingController": { + "ScannerNodeVersion": { "impl": { "opts": { "unsafe-allow": [ "delegatecall" ], "constructor-args": [ - "deployment.forwarder", "deployment.forta" + "deployment.forwarder" ] } } diff --git a/releases/1.2.10/polygon/output/prepared-upgrades.json b/releases/1.2.10/polygon/output/prepared-upgrades.json index be18da13..4eb7c3f9 100644 --- a/releases/1.2.10/polygon/output/prepared-upgrades.json +++ b/releases/1.2.10/polygon/output/prepared-upgrades.json @@ -1,15 +1,3 @@ { - "slashing-controller": { - "impl": { - "address": "0x525a90638330473bE7bB756465ca443a03b53068", - "constructor-args": [ - "0xff771084D7C2e54C0F9cA79dA23656514D2c5dd2", - "0x9ff62d1FC52A907B6DCbA8077c2DDCA6E6a9d3e1" - ], - "init-args": [], - "name": "SlashingController", - "timeout": 1200000, - "version": "0.1.0" - } - } + } \ No newline at end of file From e6728550c1cf741ef97ea6383505981bd58321cd Mon Sep 17 00:00:00 2001 From: RCantu92 Date: Thu, 7 Dec 2023 21:14:08 +0000 Subject: [PATCH 33/44] Update registries of deployed addresses --- .openzeppelin/polygon-mumbai.json | 154 ++++++++++++++++++ .../mumbai/output/prepared-upgrades.json | 12 ++ 2 files changed, 166 insertions(+) diff --git a/.openzeppelin/polygon-mumbai.json b/.openzeppelin/polygon-mumbai.json index 7f702700..c060ff07 100644 --- a/.openzeppelin/polygon-mumbai.json +++ b/.openzeppelin/polygon-mumbai.json @@ -28809,6 +28809,160 @@ } } } + }, + "2e90ce50cfd1c172eb654c5bcc205d17e3fc556b374e25219c1d0c56cc32483b": { + "address": "0xAA42d92242eA0a6195452C6B64B4Dc5D4282e0a5", + "txHash": "0x473ba360cc94162616416f31d7c7b250965f3aa2c86cd95c24343e984bec804c", + "layout": { + "solcVersion": "0.8.9", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_accessControl", + "offset": 0, + "slot": "51", + "type": "t_contract(IAccessControl)15000", + "contract": "AccessManagedUpgradeable", + "src": "contracts/components/utils/AccessManaged.sol:16" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessManagedUpgradeable", + "src": "contracts/components/utils/AccessManaged.sol:68" + }, + { + "label": "_deprecated_router", + "offset": 0, + "slot": "101", + "type": "t_address", + "contract": "RoutedUpgradeable", + "src": "contracts/components/utils/Routed.sol:16", + "retypedFrom": "contract IRouter", + "renamedFrom": "_router" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "RoutedUpgradeable", + "src": "contracts/components/utils/Routed.sol:35" + }, + { + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC1967UpgradeUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:211" + }, + { + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage", + "contract": "UUPSUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:107" + }, + { + "label": "__gap", + "offset": 0, + "slot": "251", + "type": "t_array(t_uint256)50_storage", + "contract": "BaseComponentUpgradeable", + "src": "contracts/components/BaseComponentUpgradeable.sol:62" + }, + { + "label": "scannerNodeVersion", + "offset": 0, + "slot": "301", + "type": "t_string_storage", + "contract": "ScannerNodeVersion", + "src": "contracts/components/scanners/ScannerNodeVersion.sol:19" + }, + { + "label": "scannerNodeBetaVersion", + "offset": 0, + "slot": "302", + "type": "t_string_storage", + "contract": "ScannerNodeVersion", + "src": "contracts/components/scanners/ScannerNodeVersion.sol:24" + }, + { + "label": "__gap", + "offset": 0, + "slot": "303", + "type": "t_array(t_uint256)48_storage", + "contract": "ScannerNodeVersion", + "src": "contracts/components/scanners/ScannerNodeVersion.sol:76" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)48_storage": { + "label": "uint256[48]", + "numberOfBytes": "1536" + }, + "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(IAccessControl)15000": { + "label": "contract IAccessControl", + "numberOfBytes": "20" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } } } } diff --git a/releases/1.2.10/mumbai/output/prepared-upgrades.json b/releases/1.2.10/mumbai/output/prepared-upgrades.json index 9c171520..365ba965 100644 --- a/releases/1.2.10/mumbai/output/prepared-upgrades.json +++ b/releases/1.2.10/mumbai/output/prepared-upgrades.json @@ -11,5 +11,17 @@ "timeout": 1200000, "version": "0.1.1" } + }, + "scanner-node-version": { + "impl": { + "address": "0xAA42d92242eA0a6195452C6B64B4Dc5D4282e0a5", + "constructor-args": [ + "0x4E29Cea6D64be860f5eAba110686DcB585f393D6" + ], + "init-args": [], + "name": "ScannerNodeVersion", + "timeout": 1200000, + "version": "0.1.1" + } } } \ No newline at end of file From cc4298fef6258c6b82bb6cd683ec1aa28f561885 Mon Sep 17 00:00:00 2001 From: Roberto Cantu Date: Thu, 7 Dec 2023 15:34:07 -0600 Subject: [PATCH 34/44] node version & migration --- .../1.2.10/mumbai/config/propose-admin.json | 10 ------- releases/1.2.10/mumbai/config/upgrade.json | 13 ++++++++++ .../mumbai/output/prepared-upgrades.json | 26 +------------------ 3 files changed, 14 insertions(+), 35 deletions(-) delete mode 100644 releases/1.2.10/mumbai/config/propose-admin.json diff --git a/releases/1.2.10/mumbai/config/propose-admin.json b/releases/1.2.10/mumbai/config/propose-admin.json deleted file mode 100644 index 50513051..00000000 --- a/releases/1.2.10/mumbai/config/propose-admin.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "AccessManager": [ - { - "methodName": "grantRole", - "params": [ - ["roles.SLASHER_ROLE", "0x9bc159c97fA36282F0362C56586BA16BeB9F656a"] - ] - } - ] -} \ No newline at end of file diff --git a/releases/1.2.10/mumbai/config/upgrade.json b/releases/1.2.10/mumbai/config/upgrade.json index 712b8324..12dcfa50 100644 --- a/releases/1.2.10/mumbai/config/upgrade.json +++ b/releases/1.2.10/mumbai/config/upgrade.json @@ -10,5 +10,18 @@ ] } } + }, + "ScannerPoolRegistry": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder", "deployment.stake-allocator" + ] + } + + } } } \ No newline at end of file diff --git a/releases/1.2.10/mumbai/output/prepared-upgrades.json b/releases/1.2.10/mumbai/output/prepared-upgrades.json index 365ba965..4eb7c3f9 100644 --- a/releases/1.2.10/mumbai/output/prepared-upgrades.json +++ b/releases/1.2.10/mumbai/output/prepared-upgrades.json @@ -1,27 +1,3 @@ { - "slashing-controller": { - "impl": { - "address": "0xC43E5C075e4081209F337f0431D8c488Cd61B522", - "constructor-args": [ - "0x4E29Cea6D64be860f5eAba110686DcB585f393D6", - "0x107Ac13567b1b5D84691f890A5bA07EdaE1a11c3" - ], - "init-args": [], - "name": "SlashingController", - "timeout": 1200000, - "version": "0.1.1" - } - }, - "scanner-node-version": { - "impl": { - "address": "0xAA42d92242eA0a6195452C6B64B4Dc5D4282e0a5", - "constructor-args": [ - "0x4E29Cea6D64be860f5eAba110686DcB585f393D6" - ], - "init-args": [], - "name": "ScannerNodeVersion", - "timeout": 1200000, - "version": "0.1.1" - } - } + } \ No newline at end of file From 17a3929f690331c0881e50db80466b3cf032321a Mon Sep 17 00:00:00 2001 From: Roberto Cantu Date: Thu, 7 Dec 2023 15:35:23 -0600 Subject: [PATCH 35/44] Polygon - node & migration --- releases/1.2.10/index.yml | 2 +- releases/1.2.10/polygon/config/upgrade.json | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/releases/1.2.10/index.yml b/releases/1.2.10/index.yml index eedb536e..76ddf6a6 100644 --- a/releases/1.2.10/index.yml +++ b/releases/1.2.10/index.yml @@ -1,5 +1,5 @@ title: Release -network: mumbai +network: polygon deploy: prepare-upgrade 1.2.10 verify: verify-deployed finish: propose-admin diff --git a/releases/1.2.10/polygon/config/upgrade.json b/releases/1.2.10/polygon/config/upgrade.json index 712b8324..12dcfa50 100644 --- a/releases/1.2.10/polygon/config/upgrade.json +++ b/releases/1.2.10/polygon/config/upgrade.json @@ -10,5 +10,18 @@ ] } } + }, + "ScannerPoolRegistry": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder", "deployment.stake-allocator" + ] + } + + } } } \ No newline at end of file From d12b54cfb58c92bfdbb3c0496d6963b4f5d63c84 Mon Sep 17 00:00:00 2001 From: RCantu92 Date: Thu, 7 Dec 2023 21:39:24 +0000 Subject: [PATCH 36/44] Update registries of deployed addresses --- .openzeppelin/polygon.json | 154 ++++++++++++++++++ .../polygon/output/prepared-upgrades.json | 26 ++- 2 files changed, 179 insertions(+), 1 deletion(-) diff --git a/.openzeppelin/polygon.json b/.openzeppelin/polygon.json index ce11ab10..56606db6 100644 --- a/.openzeppelin/polygon.json +++ b/.openzeppelin/polygon.json @@ -17729,6 +17729,160 @@ } } } + }, + "4e26e3ab3bbcb0b143deb06e08e949d35f1f2a0e6590f3d35750bd2379315331": { + "address": "0x61dE69E421d50F7290373fc38751f694ff1e1984", + "txHash": "0xfc05e2abafde6e5031f98406631507637f26d3d550cb37dac83510a2e4f2ca79", + "layout": { + "solcVersion": "0.8.9", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_accessControl", + "offset": 0, + "slot": "51", + "type": "t_contract(IAccessControl)15000", + "contract": "AccessManagedUpgradeable", + "src": "contracts/components/utils/AccessManaged.sol:16" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessManagedUpgradeable", + "src": "contracts/components/utils/AccessManaged.sol:68" + }, + { + "label": "_deprecated_router", + "offset": 0, + "slot": "101", + "type": "t_address", + "contract": "RoutedUpgradeable", + "src": "contracts/components/utils/Routed.sol:16", + "retypedFrom": "contract IRouter", + "renamedFrom": "_router" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "RoutedUpgradeable", + "src": "contracts/components/utils/Routed.sol:35" + }, + { + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC1967UpgradeUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:211" + }, + { + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage", + "contract": "UUPSUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:107" + }, + { + "label": "__gap", + "offset": 0, + "slot": "251", + "type": "t_array(t_uint256)50_storage", + "contract": "BaseComponentUpgradeable", + "src": "contracts/components/BaseComponentUpgradeable.sol:62" + }, + { + "label": "scannerNodeVersion", + "offset": 0, + "slot": "301", + "type": "t_string_storage", + "contract": "ScannerNodeVersion", + "src": "contracts/components/scanners/ScannerNodeVersion.sol:19" + }, + { + "label": "scannerNodeBetaVersion", + "offset": 0, + "slot": "302", + "type": "t_string_storage", + "contract": "ScannerNodeVersion", + "src": "contracts/components/scanners/ScannerNodeVersion.sol:24" + }, + { + "label": "__gap", + "offset": 0, + "slot": "303", + "type": "t_array(t_uint256)48_storage", + "contract": "ScannerNodeVersion", + "src": "contracts/components/scanners/ScannerNodeVersion.sol:76" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)48_storage": { + "label": "uint256[48]", + "numberOfBytes": "1536" + }, + "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(IAccessControl)15000": { + "label": "contract IAccessControl", + "numberOfBytes": "20" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } } } } diff --git a/releases/1.2.10/polygon/output/prepared-upgrades.json b/releases/1.2.10/polygon/output/prepared-upgrades.json index 4eb7c3f9..1cc494cf 100644 --- a/releases/1.2.10/polygon/output/prepared-upgrades.json +++ b/releases/1.2.10/polygon/output/prepared-upgrades.json @@ -1,3 +1,27 @@ { - + "scanner-node-version": { + "impl": { + "address": "0x61dE69E421d50F7290373fc38751f694ff1e1984", + "constructor-args": [ + "0xff771084D7C2e54C0F9cA79dA23656514D2c5dd2" + ], + "init-args": [], + "name": "ScannerNodeVersion", + "timeout": 1200000, + "version": "0.1.1" + } + }, + "scanner-pool-registry": { + "impl": { + "address": "0x92FA117c7c071cC11b544931c46c9e3096d6FcB1", + "constructor-args": [ + "0xff771084D7C2e54C0F9cA79dA23656514D2c5dd2", + "0x5B73756e637A77Fa52e5Ce71EC6189A4C775c6FA" + ], + "init-args": [], + "name": "ScannerPoolRegistry", + "timeout": 1200000, + "version": "0.1.0" + } + } } \ No newline at end of file From 537dd60399b350a59a3eae7fa223e71e695860ab Mon Sep 17 00:00:00 2001 From: Roberto Cantu Date: Thu, 7 Dec 2023 15:43:21 -0600 Subject: [PATCH 37/44] Re-run Mumbai --- releases/1.2.10/index.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releases/1.2.10/index.yml b/releases/1.2.10/index.yml index 76ddf6a6..eedb536e 100644 --- a/releases/1.2.10/index.yml +++ b/releases/1.2.10/index.yml @@ -1,5 +1,5 @@ title: Release -network: polygon +network: mumbai deploy: prepare-upgrade 1.2.10 verify: verify-deployed finish: propose-admin From 427ac080a0342dbabdb2c6031b4293c39baffe72 Mon Sep 17 00:00:00 2001 From: RCantu92 Date: Thu, 7 Dec 2023 21:47:14 +0000 Subject: [PATCH 38/44] Update registries of deployed addresses --- .../mumbai/output/prepared-upgrades.json | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/releases/1.2.10/mumbai/output/prepared-upgrades.json b/releases/1.2.10/mumbai/output/prepared-upgrades.json index 4eb7c3f9..3626e1dc 100644 --- a/releases/1.2.10/mumbai/output/prepared-upgrades.json +++ b/releases/1.2.10/mumbai/output/prepared-upgrades.json @@ -1,3 +1,27 @@ { - + "scanner-node-version": { + "impl": { + "address": "0xAA42d92242eA0a6195452C6B64B4Dc5D4282e0a5", + "constructor-args": [ + "0x4E29Cea6D64be860f5eAba110686DcB585f393D6" + ], + "init-args": [], + "name": "ScannerNodeVersion", + "timeout": 1200000, + "version": "0.1.1" + } + }, + "scanner-pool-registry": { + "impl": { + "address": "0x72eaaBB3f5908D5Ac4Fce00285B5af120BA3EcAC", + "constructor-args": [ + "0x4E29Cea6D64be860f5eAba110686DcB585f393D6", + "0x698A6400dE3865fC9E8A6dB22302AAb3372Cebd9" + ], + "init-args": [], + "name": "ScannerPoolRegistry", + "timeout": 1200000, + "version": "0.1.0" + } + } } \ No newline at end of file From 840d68d65bc4863446846e1578192dc52d81ab06 Mon Sep 17 00:00:00 2001 From: Roberto Cantu Date: Thu, 7 Dec 2023 15:54:26 -0600 Subject: [PATCH 39/44] polygon - node version & migration --- releases/1.2.10/index.yml | 2 +- releases/1.2.10/mumbai/config/upgrade.json | 4 ++-- .../1.2.10/mumbai/output/prepared-upgrades.json | 13 ------------- releases/1.2.10/polygon/config/upgrade.json | 4 ++-- .../1.2.10/polygon/output/prepared-upgrades.json | 13 ------------- 5 files changed, 5 insertions(+), 31 deletions(-) diff --git a/releases/1.2.10/index.yml b/releases/1.2.10/index.yml index eedb536e..76ddf6a6 100644 --- a/releases/1.2.10/index.yml +++ b/releases/1.2.10/index.yml @@ -1,5 +1,5 @@ title: Release -network: mumbai +network: polygon deploy: prepare-upgrade 1.2.10 verify: verify-deployed finish: propose-admin diff --git a/releases/1.2.10/mumbai/config/upgrade.json b/releases/1.2.10/mumbai/config/upgrade.json index 12dcfa50..6a313d8c 100644 --- a/releases/1.2.10/mumbai/config/upgrade.json +++ b/releases/1.2.10/mumbai/config/upgrade.json @@ -11,14 +11,14 @@ } } }, - "ScannerPoolRegistry": { + "ScannerToScannerPoolMigration": { "impl": { "opts": { "unsafe-allow": [ "delegatecall" ], "constructor-args": [ - "deployment.forwarder", "deployment.stake-allocator" + "deployment.forwarder", "deployment.scanner-registry", "deployment.scanner-pool-registry", "deployment.forta-staking" ] } diff --git a/releases/1.2.10/mumbai/output/prepared-upgrades.json b/releases/1.2.10/mumbai/output/prepared-upgrades.json index 3626e1dc..783e0a96 100644 --- a/releases/1.2.10/mumbai/output/prepared-upgrades.json +++ b/releases/1.2.10/mumbai/output/prepared-upgrades.json @@ -10,18 +10,5 @@ "timeout": 1200000, "version": "0.1.1" } - }, - "scanner-pool-registry": { - "impl": { - "address": "0x72eaaBB3f5908D5Ac4Fce00285B5af120BA3EcAC", - "constructor-args": [ - "0x4E29Cea6D64be860f5eAba110686DcB585f393D6", - "0x698A6400dE3865fC9E8A6dB22302AAb3372Cebd9" - ], - "init-args": [], - "name": "ScannerPoolRegistry", - "timeout": 1200000, - "version": "0.1.0" - } } } \ No newline at end of file diff --git a/releases/1.2.10/polygon/config/upgrade.json b/releases/1.2.10/polygon/config/upgrade.json index 12dcfa50..6a313d8c 100644 --- a/releases/1.2.10/polygon/config/upgrade.json +++ b/releases/1.2.10/polygon/config/upgrade.json @@ -11,14 +11,14 @@ } } }, - "ScannerPoolRegistry": { + "ScannerToScannerPoolMigration": { "impl": { "opts": { "unsafe-allow": [ "delegatecall" ], "constructor-args": [ - "deployment.forwarder", "deployment.stake-allocator" + "deployment.forwarder", "deployment.scanner-registry", "deployment.scanner-pool-registry", "deployment.forta-staking" ] } diff --git a/releases/1.2.10/polygon/output/prepared-upgrades.json b/releases/1.2.10/polygon/output/prepared-upgrades.json index 1cc494cf..d9052b2e 100644 --- a/releases/1.2.10/polygon/output/prepared-upgrades.json +++ b/releases/1.2.10/polygon/output/prepared-upgrades.json @@ -10,18 +10,5 @@ "timeout": 1200000, "version": "0.1.1" } - }, - "scanner-pool-registry": { - "impl": { - "address": "0x92FA117c7c071cC11b544931c46c9e3096d6FcB1", - "constructor-args": [ - "0xff771084D7C2e54C0F9cA79dA23656514D2c5dd2", - "0x5B73756e637A77Fa52e5Ce71EC6189A4C775c6FA" - ], - "init-args": [], - "name": "ScannerPoolRegistry", - "timeout": 1200000, - "version": "0.1.0" - } } } \ No newline at end of file From 8becab618a1dd66197c122b08676896bc417e30a Mon Sep 17 00:00:00 2001 From: RCantu92 Date: Thu, 7 Dec 2023 21:59:29 +0000 Subject: [PATCH 40/44] Update registries of deployed addresses --- .openzeppelin/polygon.json | 146 ++++++++++++++++++ .../polygon/output/prepared-upgrades.json | 15 ++ 2 files changed, 161 insertions(+) diff --git a/.openzeppelin/polygon.json b/.openzeppelin/polygon.json index 56606db6..aadcdb6f 100644 --- a/.openzeppelin/polygon.json +++ b/.openzeppelin/polygon.json @@ -17883,6 +17883,152 @@ } } } + }, + "a76fb84ca414a553cf91297a1b27362681ec725c728aacc2c981bfac138727e3": { + "address": "0xAb94300F91DA64637C94b6c4159AC805d23C7cF8", + "txHash": "0x2e02c9bf015938b96609952fe54908c17c6db56f7ebd2e47d6d565b743ac803d", + "layout": { + "solcVersion": "0.8.9", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_accessControl", + "offset": 0, + "slot": "51", + "type": "t_contract(IAccessControl)15000", + "contract": "AccessManagedUpgradeable", + "src": "contracts/components/utils/AccessManaged.sol:16" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessManagedUpgradeable", + "src": "contracts/components/utils/AccessManaged.sol:68" + }, + { + "label": "_deprecated_router", + "offset": 0, + "slot": "101", + "type": "t_address", + "contract": "RoutedUpgradeable", + "src": "contracts/components/utils/Routed.sol:16", + "retypedFrom": "contract IRouter", + "renamedFrom": "_router" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "RoutedUpgradeable", + "src": "contracts/components/utils/Routed.sol:35" + }, + { + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC1967UpgradeUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:211" + }, + { + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage", + "contract": "UUPSUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:107" + }, + { + "label": "__gap", + "offset": 0, + "slot": "251", + "type": "t_array(t_uint256)50_storage", + "contract": "BaseComponentUpgradeable", + "src": "contracts/components/BaseComponentUpgradeable.sol:62" + }, + { + "label": "_migratedScannerPools", + "offset": 0, + "slot": "301", + "type": "t_mapping(t_uint256,t_mapping(t_address,t_uint256))", + "contract": "ScannerToScannerPoolMigration", + "src": "contracts/components/scanners/ScannerToNodeRunnerMigration.sol:26" + }, + { + "label": "__gap", + "offset": 0, + "slot": "302", + "type": "t_array(t_uint256)49_storage", + "contract": "ScannerToScannerPoolMigration", + "src": "contracts/components/scanners/ScannerToNodeRunnerMigration.sol:182" + } + ], + "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(IAccessControl)15000": { + "label": "contract IAccessControl", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_mapping(t_address,t_uint256))": { + "label": "mapping(uint256 => mapping(address => uint256))", + "numberOfBytes": "32" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } } } } diff --git a/releases/1.2.10/polygon/output/prepared-upgrades.json b/releases/1.2.10/polygon/output/prepared-upgrades.json index d9052b2e..01e79504 100644 --- a/releases/1.2.10/polygon/output/prepared-upgrades.json +++ b/releases/1.2.10/polygon/output/prepared-upgrades.json @@ -10,5 +10,20 @@ "timeout": 1200000, "version": "0.1.1" } + }, + "scanner-to-scanner-pool-migration": { + "impl": { + "address": "0xAb94300F91DA64637C94b6c4159AC805d23C7cF8", + "constructor-args": [ + "0xff771084D7C2e54C0F9cA79dA23656514D2c5dd2", + "0xbF2920129f83d75DeC95D97A879942cCe3DcD387", + "0x90FF9C193D6714E0e7a923b2Bd481Fb73FEC731d", + "0xd2863157539b1D11F39ce23fC4834B62082F6874" + ], + "init-args": [], + "name": "ScannerToScannerPoolMigration", + "timeout": 1200000, + "version": "0.1.0" + } } } \ No newline at end of file From a8f9dd30dfd1dd0ea8af5b63101b7aa366553fef Mon Sep 17 00:00:00 2001 From: Roberto Cantu Date: Thu, 7 Dec 2023 16:04:00 -0600 Subject: [PATCH 41/44] Mumbai - version & migration --- releases/1.2.10/index.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releases/1.2.10/index.yml b/releases/1.2.10/index.yml index 76ddf6a6..eedb536e 100644 --- a/releases/1.2.10/index.yml +++ b/releases/1.2.10/index.yml @@ -1,5 +1,5 @@ title: Release -network: polygon +network: mumbai deploy: prepare-upgrade 1.2.10 verify: verify-deployed finish: propose-admin From 91c501e6512be9333f615809932acb8d374ce64f Mon Sep 17 00:00:00 2001 From: RCantu92 Date: Thu, 7 Dec 2023 22:13:42 +0000 Subject: [PATCH 42/44] Update registries of deployed addresses --- .openzeppelin/polygon-mumbai.json | 146 ++++++++++++++++++ .../mumbai/output/prepared-upgrades.json | 15 ++ 2 files changed, 161 insertions(+) diff --git a/.openzeppelin/polygon-mumbai.json b/.openzeppelin/polygon-mumbai.json index c060ff07..b24d6de7 100644 --- a/.openzeppelin/polygon-mumbai.json +++ b/.openzeppelin/polygon-mumbai.json @@ -28963,6 +28963,152 @@ } } } + }, + "dd12efc61cebaa58818547fbf34afe6b77e216aead7bfe63595ee08ce112cc6a": { + "address": "0x84D8F29994983768d698C71f6816F61B6a42DE49", + "txHash": "0x185c6752536b6822ec043184aeb6549e8e69be8398974ccd87cbe3d02344bb63", + "layout": { + "solcVersion": "0.8.9", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_accessControl", + "offset": 0, + "slot": "51", + "type": "t_contract(IAccessControl)15000", + "contract": "AccessManagedUpgradeable", + "src": "contracts/components/utils/AccessManaged.sol:16" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessManagedUpgradeable", + "src": "contracts/components/utils/AccessManaged.sol:68" + }, + { + "label": "_deprecated_router", + "offset": 0, + "slot": "101", + "type": "t_address", + "contract": "RoutedUpgradeable", + "src": "contracts/components/utils/Routed.sol:16", + "retypedFrom": "contract IRouter", + "renamedFrom": "_router" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "RoutedUpgradeable", + "src": "contracts/components/utils/Routed.sol:35" + }, + { + "label": "__gap", + "offset": 0, + "slot": "151", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC1967UpgradeUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:211" + }, + { + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage", + "contract": "UUPSUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol:107" + }, + { + "label": "__gap", + "offset": 0, + "slot": "251", + "type": "t_array(t_uint256)50_storage", + "contract": "BaseComponentUpgradeable", + "src": "contracts/components/BaseComponentUpgradeable.sol:62" + }, + { + "label": "_migratedScannerPools", + "offset": 0, + "slot": "301", + "type": "t_mapping(t_uint256,t_mapping(t_address,t_uint256))", + "contract": "ScannerToScannerPoolMigration", + "src": "contracts/components/scanners/ScannerToNodeRunnerMigration.sol:26" + }, + { + "label": "__gap", + "offset": 0, + "slot": "302", + "type": "t_array(t_uint256)49_storage", + "contract": "ScannerToScannerPoolMigration", + "src": "contracts/components/scanners/ScannerToNodeRunnerMigration.sol:182" + } + ], + "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(IAccessControl)15000": { + "label": "contract IAccessControl", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_mapping(t_address,t_uint256))": { + "label": "mapping(uint256 => mapping(address => uint256))", + "numberOfBytes": "32" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + } + } } } } diff --git a/releases/1.2.10/mumbai/output/prepared-upgrades.json b/releases/1.2.10/mumbai/output/prepared-upgrades.json index 783e0a96..eef4692d 100644 --- a/releases/1.2.10/mumbai/output/prepared-upgrades.json +++ b/releases/1.2.10/mumbai/output/prepared-upgrades.json @@ -10,5 +10,20 @@ "timeout": 1200000, "version": "0.1.1" } + }, + "scanner-to-scanner-pool-migration": { + "impl": { + "address": "0x84D8F29994983768d698C71f6816F61B6a42DE49", + "constructor-args": [ + "0x4E29Cea6D64be860f5eAba110686DcB585f393D6", + "0x569c785b4744E582c65A12827726FC03C8D08A4a", + "0x9BBEBf9CB94666464D8a5978363B4943D36A05E4", + "0x64d5192F03bD98dB1De2AA8B4abAC5419eaC32CE" + ], + "init-args": [], + "name": "ScannerToScannerPoolMigration", + "timeout": 1200000, + "version": "0.1.0" + } } } \ No newline at end of file From b19669a84b70ddac7ae8db7418cc7ce6c26dfd5f Mon Sep 17 00:00:00 2001 From: Roberto Cantu Date: Tue, 12 Dec 2023 10:18:04 -0600 Subject: [PATCH 43/44] Release, final clean-up --- .github/workflows/release.yml | 414 +++++++++--------- .../staking/slashing/SlashingController.sol | 1 + releases/1.2.10/index.yml | 13 +- .../1.2.10/mumbai/config/propose-admin.json | 10 + releases/1.2.10/mumbai/config/upgrade.json | 111 +++++ .../mumbai/output/prepared-upgrades.json | 117 ++++- releases/1.2.10/polygon/config/upgrade.json | 111 +++++ .../polygon/output/prepared-upgrades.json | 114 +++++ 8 files changed, 682 insertions(+), 209 deletions(-) create mode 100644 releases/1.2.10/mumbai/config/propose-admin.json diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d240a0f7..89b7f104 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,140 +40,12 @@ jobs: path: | artifacts cache/*.json - # test: - # name: Test release - # if: startsWith(github.head_ref, 'release/') - # runs-on: ubuntu-22.04 - # # timeout-minutes: 20 - # needs: build - # steps: - # - uses: actions/checkout@v3 - # with: - # ref: ${{ github.event.pull_request.head.sha }} - # - uses: actions/setup-node@v3 - # with: - # node-version: '14' - # cache: 'yarn' - # - run: yarn install --frozen-lockfile - - # - name: Get build artifacts - # uses: actions/download-artifact@v3 - # with: - # name: contract-artifacts - - # - name: Run unit tests - # run: yarn test --no-compile - - # coverage: - # name: Code coverage - # if: startsWith(github.head_ref, 'release/') - # runs-on: ubuntu-22.04 - # needs: test - # # needs: build - # steps: - # - uses: actions/checkout@v3 - # with: - # ref: ${{ github.event.pull_request.head.sha }} - # - uses: actions/setup-node@v3 - # with: - # node-version: '14' - # cache: 'yarn' - # - run: yarn install --frozen-lockfile - - # - run: yarn coverage - # - uses: codecov/codecov-action@v3 - # with: - # token: ${{ secrets.CODECOV_TOKEN }} - # - - prepare: - name: Prepare release + test: + name: Test release if: startsWith(github.head_ref, 'release/') runs-on: ubuntu-22.04 - # needs: coverage + # timeout-minutes: 20 needs: build - outputs: - release_version: ${{ steps.parse.outputs.release_version }} - release_path: ${{ steps.parse.outputs.release_path }} - release_network: ${{ steps.parse.outputs.release_network }} - release_title: ${{ steps.parse.outputs.release_title }} - release_description: ${{ steps.parse.outputs.release_description }} - release_multisig: ${{ steps.parse.outputs.release_multisig }} - release_audited: ${{ steps.parse.outputs.release_audited }} - release_deploy_cmd: ${{ steps.parse.outputs.release_deploy_cmd }} - release_verify_cmd: ${{ steps.parse.outputs.release_verify_cmd }} - release_finish_cmd: ${{ steps.parse.outputs.release_finish_cmd }} - steps: - - uses: actions/checkout@v3 - with: - ref: ${{ github.event.pull_request.head.sha }} - fetch-depth: 0 - - - name: Parse release info - id: parse - run: | - version=${BRANCH_NAME#release\/} - release_path=releases/$version - network=$(yq -r .network $release_path/index.yml) - path=$release_path/$network - echo "release_version=$version" >> $GITHUB_OUTPUT - echo "release_path=$path" >> $GITHUB_OUTPUT - echo "release_network=$network" >> $GITHUB_OUTPUT - echo "release_multisig=$(jq -r .$network releases/deployments/multisigs.json)" >> $GITHUB_OUTPUT - echo "release_deploy_cmd=$(yq -r '.deploy // ""' $release_path/index.yml)" >> $GITHUB_OUTPUT - echo "release_verify_cmd=$(yq -r '.verify // ""' $release_path/index.yml)" >> $GITHUB_OUTPUT - echo "release_finish_cmd=$(yq -r '.finish // ""' $release_path/index.yml)" >> $GITHUB_OUTPUT - echo "release_audited=$(yq -r '.audited // ""' $release_path/index.yml)" >> $GITHUB_OUTPUT - echo "release_title=$(yq -r '.title // ""' $release_path/index.yml)" >> $GITHUB_OUTPUT - echo "release_description<> $GITHUB_OUTPUT - echo "$(yq -r '.description // ""' $release_path/index.yml)" >> $GITHUB_OUTPUT - echo "DESCRIPTION_DELIMITER" >> $GITHUB_OUTPUT - env: - BRANCH_NAME: ${{ github.head_ref }} - - - name: Output summary - run: | - echo "## $TITLE" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "**Network:** $NETWORK" >> $GITHUB_STEP_SUMMARY - echo "**Commit:** [\`$COMMIT\`]($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/tree/$COMMIT)" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "$DESCRIPTION" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - env: - TITLE: ${{ steps.parse.outputs.release_title }} - DESCRIPTION: ${{ steps.parse.outputs.release_description }} - NETWORK: ${{ steps.parse.outputs.release_network }} - COMMIT: ${{ github.event.pull_request.head.sha }} - - - name: Output audit info - if: "steps.parse.outputs.release_audited != ''" - run: | - echo "---" >> $GITHUB_STEP_SUMMARY - echo "### Audit" >> $GITHUB_STEP_SUMMARY - echo "Audited contracts at commit [\`$AUDIT_COMMIT\`]($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/tree/$AUDIT_COMMIT) :detective:" >> $GITHUB_STEP_SUMMARY - audit_diff="$(git diff $AUDIT_COMMIT *.sol)" - if [[ -z $audit_diff ]]; then - echo "Contracts have not been modified since audit :heavy_check_mark:" >> $GITHUB_STEP_SUMMARY - else - echo "Contracts have been modified since audit :warning:" >> $GITHUB_STEP_SUMMARY - echo "" >> $GITHUB_STEP_SUMMARY - echo "\`\`\`diff" >> $GITHUB_STEP_SUMMARY - echo "$audit_diff" >> $GITHUB_STEP_SUMMARY - echo "\`\`\`" >> $GITHUB_STEP_SUMMARY - fi - env: - AUDIT_COMMIT: ${{ steps.parse.outputs.release_audited }} - - deploy: - name: Deploy contracts - if: startsWith(github.head_ref, 'release/') - runs-on: ubuntu-22.04 - timeout-minutes: 20 - needs: prepare - environment: production - outputs: - deploy_commit: ${{ steps.commit.outputs.commit_hash }} steps: - uses: actions/checkout@v3 with: @@ -189,30 +61,158 @@ jobs: with: name: contract-artifacts - - name: Deploy contracts - run: eval yarn hardhat --network ${{ needs.prepare.outputs.release_network }} ${{ needs.prepare.outputs.release_deploy_cmd }} - env: - INFURA_PROJECT_ID: '${{ secrets.INFURA_PROJECT_ID }}' - MUMBAI_MNEMONIC: '${{ secrets.MUMBAI_MNEMONIC }}' - MUMBAI_NODE: '${{ secrets.MUMBAI_NODE }}' - POLYGON_MNEMONIC: '${{ secrets.POLYGON_MNEMONIC }}' - POLYGON_NODE: '${{ secrets.POLYGON_NODE }}' - POLYGON_GAS_PRICE: 1200000000000 - DEBUG: '@openzeppelin:*' - # ETHERSCAN "${{ secrets.ETHERSCAN }}" - POLYSCAN: '${{ secrets.POLYSCAN }}' - RELEASE_PATH: '${{ needs.prepare.outputs.release_path }}' - MULTISIG_ADDRESS: '${{ needs.prepare.outputs.release_multisig }}' + - name: Run unit tests + run: yarn test --no-compile - - name: Commit changes - uses: stefanzweifel/git-auto-commit-action@v4 - id: commit - if: always() - with: - commit_message: Update registries of deployed addresses - file_pattern: '.openzeppelin/ releases/' - skip_checkout: true - # tagging_message: '${{ needs.prepare.outputs.release_version }}' + coverage: + name: Code coverage + if: startsWith(github.head_ref, 'release/') + runs-on: ubuntu-22.04 + needs: test + # needs: build + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha }} + - uses: actions/setup-node@v3 + with: + node-version: '14' + cache: 'yarn' + - run: yarn install --frozen-lockfile + + - run: yarn coverage + - uses: codecov/codecov-action@v3 + with: + token: ${{ secrets.CODECOV_TOKEN }} + + + # prepare: + # name: Prepare release + # if: startsWith(github.head_ref, 'release/') + # runs-on: ubuntu-22.04 + # # needs: coverage + # needs: build + # outputs: + # release_version: ${{ steps.parse.outputs.release_version }} + # release_path: ${{ steps.parse.outputs.release_path }} + # release_network: ${{ steps.parse.outputs.release_network }} + # release_title: ${{ steps.parse.outputs.release_title }} + # release_description: ${{ steps.parse.outputs.release_description }} + # release_multisig: ${{ steps.parse.outputs.release_multisig }} + # release_audited: ${{ steps.parse.outputs.release_audited }} + # release_deploy_cmd: ${{ steps.parse.outputs.release_deploy_cmd }} + # release_verify_cmd: ${{ steps.parse.outputs.release_verify_cmd }} + # release_finish_cmd: ${{ steps.parse.outputs.release_finish_cmd }} + # steps: + # - uses: actions/checkout@v3 + # with: + # ref: ${{ github.event.pull_request.head.sha }} + # fetch-depth: 0 + + # - name: Parse release info + # id: parse + # run: | + # version=${BRANCH_NAME#release\/} + # release_path=releases/$version + # network=$(yq -r .network $release_path/index.yml) + # path=$release_path/$network + # echo "release_version=$version" >> $GITHUB_OUTPUT + # echo "release_path=$path" >> $GITHUB_OUTPUT + # echo "release_network=$network" >> $GITHUB_OUTPUT + # echo "release_multisig=$(jq -r .$network releases/deployments/multisigs.json)" >> $GITHUB_OUTPUT + # echo "release_deploy_cmd=$(yq -r '.deploy // ""' $release_path/index.yml)" >> $GITHUB_OUTPUT + # echo "release_verify_cmd=$(yq -r '.verify // ""' $release_path/index.yml)" >> $GITHUB_OUTPUT + # echo "release_finish_cmd=$(yq -r '.finish // ""' $release_path/index.yml)" >> $GITHUB_OUTPUT + # echo "release_audited=$(yq -r '.audited // ""' $release_path/index.yml)" >> $GITHUB_OUTPUT + # echo "release_title=$(yq -r '.title // ""' $release_path/index.yml)" >> $GITHUB_OUTPUT + # echo "release_description<> $GITHUB_OUTPUT + # echo "$(yq -r '.description // ""' $release_path/index.yml)" >> $GITHUB_OUTPUT + # echo "DESCRIPTION_DELIMITER" >> $GITHUB_OUTPUT + # env: + # BRANCH_NAME: ${{ github.head_ref }} + + # - name: Output summary + # run: | + # echo "## $TITLE" >> $GITHUB_STEP_SUMMARY + # echo "" >> $GITHUB_STEP_SUMMARY + # echo "**Network:** $NETWORK" >> $GITHUB_STEP_SUMMARY + # echo "**Commit:** [\`$COMMIT\`]($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/tree/$COMMIT)" >> $GITHUB_STEP_SUMMARY + # echo "" >> $GITHUB_STEP_SUMMARY + # echo "$DESCRIPTION" >> $GITHUB_STEP_SUMMARY + # echo "" >> $GITHUB_STEP_SUMMARY + # env: + # TITLE: ${{ steps.parse.outputs.release_title }} + # DESCRIPTION: ${{ steps.parse.outputs.release_description }} + # NETWORK: ${{ steps.parse.outputs.release_network }} + # COMMIT: ${{ github.event.pull_request.head.sha }} + + # - name: Output audit info + # if: "steps.parse.outputs.release_audited != ''" + # run: | + # echo "---" >> $GITHUB_STEP_SUMMARY + # echo "### Audit" >> $GITHUB_STEP_SUMMARY + # echo "Audited contracts at commit [\`$AUDIT_COMMIT\`]($GITHUB_SERVER_URL/$GITHUB_REPOSITORY/tree/$AUDIT_COMMIT) :detective:" >> $GITHUB_STEP_SUMMARY + # audit_diff="$(git diff $AUDIT_COMMIT *.sol)" + # if [[ -z $audit_diff ]]; then + # echo "Contracts have not been modified since audit :heavy_check_mark:" >> $GITHUB_STEP_SUMMARY + # else + # echo "Contracts have been modified since audit :warning:" >> $GITHUB_STEP_SUMMARY + # echo "" >> $GITHUB_STEP_SUMMARY + # echo "\`\`\`diff" >> $GITHUB_STEP_SUMMARY + # echo "$audit_diff" >> $GITHUB_STEP_SUMMARY + # echo "\`\`\`" >> $GITHUB_STEP_SUMMARY + # fi + # env: + # AUDIT_COMMIT: ${{ steps.parse.outputs.release_audited }} + + # deploy: + # name: Deploy contracts + # if: startsWith(github.head_ref, 'release/') + # runs-on: ubuntu-22.04 + # timeout-minutes: 20 + # needs: prepare + # environment: production + # outputs: + # deploy_commit: ${{ steps.commit.outputs.commit_hash }} + # steps: + # - uses: actions/checkout@v3 + # with: + # ref: ${{ github.event.pull_request.head.sha }} + # - uses: actions/setup-node@v3 + # with: + # node-version: '14' + # cache: 'yarn' + # - run: yarn install --frozen-lockfile + + # - name: Get build artifacts + # uses: actions/download-artifact@v3 + # with: + # name: contract-artifacts + + # - name: Deploy contracts + # run: eval yarn hardhat --network ${{ needs.prepare.outputs.release_network }} ${{ needs.prepare.outputs.release_deploy_cmd }} + # env: + # INFURA_PROJECT_ID: '${{ secrets.INFURA_PROJECT_ID }}' + # MUMBAI_MNEMONIC: '${{ secrets.MUMBAI_MNEMONIC }}' + # MUMBAI_NODE: '${{ secrets.MUMBAI_NODE }}' + # POLYGON_MNEMONIC: '${{ secrets.POLYGON_MNEMONIC }}' + # POLYGON_NODE: '${{ secrets.POLYGON_NODE }}' + # POLYGON_GAS_PRICE: 1200000000000 + # DEBUG: '@openzeppelin:*' + # # ETHERSCAN "${{ secrets.ETHERSCAN }}" + # POLYSCAN: '${{ secrets.POLYSCAN }}' + # RELEASE_PATH: '${{ needs.prepare.outputs.release_path }}' + # MULTISIG_ADDRESS: '${{ needs.prepare.outputs.release_multisig }}' + + # - name: Commit changes + # uses: stefanzweifel/git-auto-commit-action@v4 + # id: commit + # if: always() + # with: + # commit_message: Update registries of deployed addresses + # file_pattern: '.openzeppelin/ releases/' + # skip_checkout: true + # # tagging_message: '${{ needs.prepare.outputs.release_version }}' # verify: # name: Verify contracts @@ -253,59 +253,59 @@ jobs: # RELEASE_PATH: '${{ needs.prepare.outputs.release_path }}' # ARTIFACT_REFERENCE_URL: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' - finish-release: - name: Finish release - if: "startsWith(github.head_ref, 'release/')" - runs-on: ubuntu-22.04 - timeout-minutes: 20 - environment: production - needs: - - prepare - - deploy - steps: - - uses: actions/checkout@v3 - with: - ref: ${{ needs.deploy.outputs.deploy_commit || github.event.pull_request.head.sha }} - - uses: actions/setup-node@v3 - with: - node-version: '14' - cache: 'yarn' - - run: yarn install --frozen-lockfile + # finish-release: + # name: Finish release + # if: "startsWith(github.head_ref, 'release/')" + # runs-on: ubuntu-22.04 + # timeout-minutes: 20 + # environment: production + # needs: + # - prepare + # - deploy + # steps: + # - uses: actions/checkout@v3 + # with: + # ref: ${{ needs.deploy.outputs.deploy_commit || github.event.pull_request.head.sha }} + # - uses: actions/setup-node@v3 + # with: + # node-version: '14' + # cache: 'yarn' + # - run: yarn install --frozen-lockfile - - name: Get build artifacts - uses: actions/download-artifact@v3 - with: - name: contract-artifacts + # - name: Get build artifacts + # uses: actions/download-artifact@v3 + # with: + # name: contract-artifacts - - name: Complete release - if: "needs.prepare.outputs.release_finish_cmd != ''" - shell: bash - run: | - yarn hardhat --network ${{ needs.prepare.outputs.release_network }} ${{ needs.prepare.outputs.release_finish_cmd }} ${{ needs.prepare.outputs.release_version }} "${{ needs.prepare.outputs.release_title }}" "${{ needs.prepare.outputs.release_description }}" - env: - INFURA_PROJECT_ID: '${{ secrets.INFURA_PROJECT_ID }}' - MUMBAI_MNEMONIC: '${{ secrets.MUMBAI_MNEMONIC }}' - MUMBAI_NODE: '${{ secrets.MUMBAI_NODE }}' - POLYGON_MNEMONIC: "${{ secrets.POLYGON_MNEMONIC }}" - POLYGON_NODE: "${{ secrets.POLYGON_NODE }}" - POLYGON_GAS_PRICE: 1200000000000 - DEBUG: '@openzeppelin:*' - # ETHERSCAN "${{ secrets.ETHERSCAN }}" - POLYSCAN: '${{ secrets.POLYSCAN }}' - DEFENDER_API_KEY: '${{ secrets.DEFENDER_API_KEY }}' - DEFENDER_API_SECRET: '${{ secrets.DEFENDER_API_SECRET }}' - RELEASE_PATH: '${{ needs.prepare.outputs.release_path }}' - MULTISIG_ADDRESS: '${{ needs.prepare.outputs.release_multisig }}' + # - name: Complete release + # if: "needs.prepare.outputs.release_finish_cmd != ''" + # shell: bash + # run: | + # yarn hardhat --network ${{ needs.prepare.outputs.release_network }} ${{ needs.prepare.outputs.release_finish_cmd }} ${{ needs.prepare.outputs.release_version }} "${{ needs.prepare.outputs.release_title }}" "${{ needs.prepare.outputs.release_description }}" + # env: + # INFURA_PROJECT_ID: '${{ secrets.INFURA_PROJECT_ID }}' + # MUMBAI_MNEMONIC: '${{ secrets.MUMBAI_MNEMONIC }}' + # MUMBAI_NODE: '${{ secrets.MUMBAI_NODE }}' + # POLYGON_MNEMONIC: "${{ secrets.POLYGON_MNEMONIC }}" + # POLYGON_NODE: "${{ secrets.POLYGON_NODE }}" + # POLYGON_GAS_PRICE: 1200000000000 + # DEBUG: '@openzeppelin:*' + # # ETHERSCAN "${{ secrets.ETHERSCAN }}" + # POLYSCAN: '${{ secrets.POLYSCAN }}' + # DEFENDER_API_KEY: '${{ secrets.DEFENDER_API_KEY }}' + # DEFENDER_API_SECRET: '${{ secrets.DEFENDER_API_SECRET }}' + # RELEASE_PATH: '${{ needs.prepare.outputs.release_path }}' + # MULTISIG_ADDRESS: '${{ needs.prepare.outputs.release_multisig }}' - - name: Link to run in PR - uses: actions/github-script@v6 - env: - RUN_URL: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' - with: - script: | - github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: `[**Deploy finished**](${process.env.RUN_URL})`, - }); + # - name: Link to run in PR + # uses: actions/github-script@v6 + # env: + # RUN_URL: '${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' + # with: + # script: | + # github.rest.issues.createComment({ + # issue_number: context.issue.number, + # owner: context.repo.owner, + # repo: context.repo.repo, + # body: `[**Deploy finished**](${process.env.RUN_URL})`, + # }); diff --git a/contracts/components/staking/slashing/SlashingController.sol b/contracts/components/staking/slashing/SlashingController.sol index 9a3c9579..705ab3fc 100644 --- a/contracts/components/staking/slashing/SlashingController.sol +++ b/contracts/components/staking/slashing/SlashingController.sol @@ -50,6 +50,7 @@ contract SlashingController is BaseComponentUpgradeable, StateMachineController, mapping(uint256 => uint256) public deposits; // proposalId --> tokenAmount mapping(bytes32 => SlashPenalty) public penalties; // penaltyId --> SlashPenalty ISlashingExecutor public slashingExecutor; + /// @custom:oz-renamed-from stakingParameters StakeSubjectGateway public subjectGateway; // Should be immutable, but it's already deployed. uint256 public depositAmount; uint256 public slashPercentToProposer; diff --git a/releases/1.2.10/index.yml b/releases/1.2.10/index.yml index eedb536e..f34a32ce 100644 --- a/releases/1.2.10/index.yml +++ b/releases/1.2.10/index.yml @@ -4,4 +4,15 @@ deploy: prepare-upgrade 1.2.10 verify: verify-deployed finish: propose-admin description: | - release/1.2.10 \ No newline at end of file + ## Deployed new implementations: + - AccessManager + - AgentRegistry + - ScannerPoolRegistry + - Dispatch + - StakeAllocator + - RewardsDistributor + - StakeSubjectGateway + - SlashingController + - FortaStaking + - ScannerNodeVersion + - ScannerToScannerPoolMigration \ No newline at end of file diff --git a/releases/1.2.10/mumbai/config/propose-admin.json b/releases/1.2.10/mumbai/config/propose-admin.json new file mode 100644 index 00000000..c78f49ab --- /dev/null +++ b/releases/1.2.10/mumbai/config/propose-admin.json @@ -0,0 +1,10 @@ +{ + "AccessManager": [ + { + "methodName": "grantRole", + "params": [ + ["roles.SLASHER_ROLE", "deployment.slashing-controller"] + ] + } + ] +} \ No newline at end of file diff --git a/releases/1.2.10/mumbai/config/upgrade.json b/releases/1.2.10/mumbai/config/upgrade.json index 6a313d8c..14171c96 100644 --- a/releases/1.2.10/mumbai/config/upgrade.json +++ b/releases/1.2.10/mumbai/config/upgrade.json @@ -1,4 +1,115 @@ { + "AccessManager": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder" + ] + } + } + }, + "AgentRegistry": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder" + ] + } + } + }, + "ScannerPoolRegistry": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder", "deployment.stake-allocator" + ] + } + + } + }, + "Dispatch": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder" + ] + } + } + }, + "StakeAllocator": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder", "deployment.stake-subject-gateway", "deployment.rewards-distributor" + ] + } + + } + }, + "RewardsDistributor": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder", "deployment.forta", "deployment.stake-subject-gateway" + ] + } + + } + }, + "StakeSubjectGateway": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder" + ] + } + } + }, + "FortaStaking": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder" + ] + } + } + }, + "SlashingController": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder", "deployment.forta" + ] + } + } + }, "ScannerNodeVersion": { "impl": { "opts": { diff --git a/releases/1.2.10/mumbai/output/prepared-upgrades.json b/releases/1.2.10/mumbai/output/prepared-upgrades.json index eef4692d..a0adf5f5 100644 --- a/releases/1.2.10/mumbai/output/prepared-upgrades.json +++ b/releases/1.2.10/mumbai/output/prepared-upgrades.json @@ -1,4 +1,118 @@ { + "access-manager": { + "impl": { + "address": "0x5Da21607E9e2bCA241E0EA46e27cea3bB8404505", + "constructor-args": [ + "0x4E29Cea6D64be860f5eAba110686DcB585f393D6" + ], + "init-args": [], + "name": "AccessManager", + "timeout": 1200000, + "version": "0.1.0" + } + }, + "agent-registry": { + "impl": { + "address": "0xD25Fd5B722606d08A5DdCD00e969513d06d98d89", + "constructor-args": [ + "0x4E29Cea6D64be860f5eAba110686DcB585f393D6" + ], + "init-args": [], + "name": "AgentRegistry", + "timeout": 1200000, + "version": "0.1.6" + } + }, + "scanner-pool-registry": { + "impl": { + "address": "0x72eaaBB3f5908D5Ac4Fce00285B5af120BA3EcAC", + "constructor-args": [ + "0x4E29Cea6D64be860f5eAba110686DcB585f393D6", + "0x698A6400dE3865fC9E8A6dB22302AAb3372Cebd9" + ], + "init-args": [], + "name": "ScannerPoolRegistry", + "timeout": 1200000, + "version": "0.1.0" + } + }, + "dispatch": { + "impl": { + "address": "0x0ed550214869C3c3D5C05b97A8Bb9388125C4919", + "constructor-args": [ + "0x4E29Cea6D64be860f5eAba110686DcB585f393D6" + ], + "init-args": [], + "name": "Dispatch", + "timeout": 1200000, + "version": "0.1.5" + } + }, + "stake-allocator": { + "impl": { + "address": "0x70FBC65e20DFe5ACDA5665f98A6CdA98800cC637", + "constructor-args": [ + "0x4E29Cea6D64be860f5eAba110686DcB585f393D6", + "0x02304eC24ba2996a83F595D7cf80e5571a406EFA", + "0x404afc59Cacd74A28d0D5651460Cc950b42FAf08" + ], + "init-args": [], + "name": "StakeAllocator", + "timeout": 1200000, + "version": "0.1.0" + } + }, + "rewards-distributor": { + "impl": { + "address": "0x09803F257AB3D8a390837640ED9D9F4Eb22c1453", + "constructor-args": [ + "0x4E29Cea6D64be860f5eAba110686DcB585f393D6", + "0x107Ac13567b1b5D84691f890A5bA07EdaE1a11c3", + "0x02304eC24ba2996a83F595D7cf80e5571a406EFA" + ], + "init-args": [], + "name": "RewardsDistributor", + "timeout": 1200000, + "version": "0.1.0" + } + }, + "stake-subject-gateway": { + "impl": { + "address": "0x40998890c1ad5B22CBe2deB9671E9df91b79dd16", + "constructor-args": [ + "0x4E29Cea6D64be860f5eAba110686DcB585f393D6" + ], + "init-args": [], + "name": "StakeSubjectGateway", + "timeout": 1200000, + "version": "0.1.1" + } + }, + "forta-staking": { + "impl": { + "address": "0x8fd9d47e80f1d711aA97C4926e5E7CB3462455E8", + "constructor-args": [ + "0x4E29Cea6D64be860f5eAba110686DcB585f393D6" + ], + "init-args": [], + "name": "FortaStaking", + "timeout": 1200000, + "version": "0.1.2" + } + }, + "slashing-controller": { + "impl": { + "address": "0xC43E5C075e4081209F337f0431D8c488Cd61B522", + "constructor-args": [ + "0x4E29Cea6D64be860f5eAba110686DcB585f393D6", + "0x107Ac13567b1b5D84691f890A5bA07EdaE1a11c3" + ], + "init-args": [], + "name": "SlashingController", + "timeout": 1200000, + "version": "0.1.1" + } + }, "scanner-node-version": { "impl": { "address": "0xAA42d92242eA0a6195452C6B64B4Dc5D4282e0a5", @@ -26,4 +140,5 @@ "version": "0.1.0" } } -} \ No newline at end of file +} + \ No newline at end of file diff --git a/releases/1.2.10/polygon/config/upgrade.json b/releases/1.2.10/polygon/config/upgrade.json index 6a313d8c..14171c96 100644 --- a/releases/1.2.10/polygon/config/upgrade.json +++ b/releases/1.2.10/polygon/config/upgrade.json @@ -1,4 +1,115 @@ { + "AccessManager": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder" + ] + } + } + }, + "AgentRegistry": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder" + ] + } + } + }, + "ScannerPoolRegistry": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder", "deployment.stake-allocator" + ] + } + + } + }, + "Dispatch": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder" + ] + } + } + }, + "StakeAllocator": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder", "deployment.stake-subject-gateway", "deployment.rewards-distributor" + ] + } + + } + }, + "RewardsDistributor": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder", "deployment.forta", "deployment.stake-subject-gateway" + ] + } + + } + }, + "StakeSubjectGateway": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder" + ] + } + } + }, + "FortaStaking": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder" + ] + } + } + }, + "SlashingController": { + "impl": { + "opts": { + "unsafe-allow": [ + "delegatecall" + ], + "constructor-args": [ + "deployment.forwarder", "deployment.forta" + ] + } + } + }, "ScannerNodeVersion": { "impl": { "opts": { diff --git a/releases/1.2.10/polygon/output/prepared-upgrades.json b/releases/1.2.10/polygon/output/prepared-upgrades.json index 01e79504..178888f3 100644 --- a/releases/1.2.10/polygon/output/prepared-upgrades.json +++ b/releases/1.2.10/polygon/output/prepared-upgrades.json @@ -1,4 +1,118 @@ { + "access-manager": { + "impl": { + "address": "0x739707848131F41aCd1d78A56FE0eA02052811Df", + "constructor-args": [ + "0xff771084D7C2e54C0F9cA79dA23656514D2c5dd2" + ], + "init-args": [], + "name": "AccessManager", + "timeout": 1200000, + "version": "0.1.0" + } + }, + "agent-registry": { + "impl": { + "address": "0xE7e6c9A579eF43FfE629F9B99a9e4585ae69ED9c", + "constructor-args": [ + "0xff771084D7C2e54C0F9cA79dA23656514D2c5dd2" + ], + "init-args": [], + "name": "AgentRegistry", + "timeout": 1200000, + "version": "0.1.6" + } + }, + "scanner-pool-registry": { + "impl": { + "address": "0x92FA117c7c071cC11b544931c46c9e3096d6FcB1", + "constructor-args": [ + "0xff771084D7C2e54C0F9cA79dA23656514D2c5dd2", + "0x5B73756e637A77Fa52e5Ce71EC6189A4C775c6FA" + ], + "init-args": [], + "name": "ScannerPoolRegistry", + "timeout": 1200000, + "version": "0.1.0" + } + }, + "dispatch": { + "impl": { + "address": "0xB5F1A9C329924Fe8203A91aa891182d4E331fF0A", + "constructor-args": [ + "0xff771084D7C2e54C0F9cA79dA23656514D2c5dd2" + ], + "init-args": [], + "name": "Dispatch", + "timeout": 1200000, + "version": "0.1.5" + } + }, + "stake-allocator": { + "impl": { + "address": "0x8A9B40aE0cCa4f602CA3E4f68114b69C794571F0", + "constructor-args": [ + "0xff771084D7C2e54C0F9cA79dA23656514D2c5dd2", + "0x587969Add789c13F64Bcc34Ff253BD9BFB78f38a", + "0xf7239f26b79145297737166b0C66F4919af9c507" + ], + "init-args": [], + "name": "StakeAllocator", + "timeout": 1200000, + "version": "0.1.0" + } + }, + "rewards-distributor": { + "impl": { + "address": "0xfc3642038a312Ff983BdBC1F5C900eEC20AaFfB6", + "constructor-args": [ + "0xff771084D7C2e54C0F9cA79dA23656514D2c5dd2", + "0x9ff62d1FC52A907B6DCbA8077c2DDCA6E6a9d3e1", + "0x587969Add789c13F64Bcc34Ff253BD9BFB78f38a" + ], + "init-args": [], + "name": "RewardsDistributor", + "timeout": 1200000, + "version": "0.1.0" + } + }, + "stake-subject-gateway": { + "impl": { + "address": "0x6C85A754F9c79178D9701e91C29C995f227D7551", + "constructor-args": [ + "0xff771084D7C2e54C0F9cA79dA23656514D2c5dd2" + ], + "init-args": [], + "name": "StakeSubjectGateway", + "timeout": 1200000, + "version": "0.1.1" + } + }, + "forta-staking": { + "impl": { + "address": "0xeA359707f17Aeb000c9385b4Bfd1cC7be62d4Bc7", + "constructor-args": [ + "0xff771084D7C2e54C0F9cA79dA23656514D2c5dd2" + ], + "init-args": [], + "name": "FortaStaking", + "timeout": 1200000, + "version": "0.1.2" + } + }, + "slashing-controller": { + "impl": { + "address": "0x525a90638330473bE7bB756465ca443a03b53068", + "constructor-args": [ + "0xff771084D7C2e54C0F9cA79dA23656514D2c5dd2", + "0x9ff62d1FC52A907B6DCbA8077c2DDCA6E6a9d3e1" + ], + "init-args": [], + "name": "SlashingController", + "timeout": 1200000, + "version": "0.1.0" + } + }, "scanner-node-version": { "impl": { "address": "0x61dE69E421d50F7290373fc38751f694ff1e1984", From 19c2b3a674c14c54854c4561a589c0b4b434e33c Mon Sep 17 00:00:00 2001 From: Roberto Cantu Date: Tue, 12 Dec 2023 10:19:50 -0600 Subject: [PATCH 44/44] Update release title --- releases/1.2.10/index.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releases/1.2.10/index.yml b/releases/1.2.10/index.yml index f34a32ce..9713008f 100644 --- a/releases/1.2.10/index.yml +++ b/releases/1.2.10/index.yml @@ -1,4 +1,4 @@ -title: Release +title: Implementation Upgrade network: mumbai deploy: prepare-upgrade 1.2.10 verify: verify-deployed