From 8cf16a7a5bc0071c09f5d60a4fd2220906fa84ba Mon Sep 17 00:00:00 2001 From: Michael Heuer Date: Wed, 18 Oct 2023 16:02:25 +0200 Subject: [PATCH] style: apply prettier formatting --- .github/ISSUE_TEMPLATE/bug_report.md | 17 +- .../contracts/register-ens-subdomain.js | 74 +-- .github/labeler.yml | 8 +- .github/pull_request_template.md | 2 + .github/workflows/comment-triggers.yml | 6 +- .github/workflows/contracts-deploy.yml | 4 +- .github/workflows/mythx-changed.yml | 8 +- .github/workflows/mythx-full.yml | 9 +- .github/workflows/npm-release-reusable.yml | 5 +- .github/workflows/npm-release.yml | 2 +- .github/workflows/pull_request_labeler.yml | 12 +- .mythx.yml | 15 +- .prettierignore | 2 - active_contracts.json | 2 +- packages/contracts-ethers/rollup.config.ts | 4 +- packages/contracts/README.md | 8 +- packages/contracts/Releases.md | 604 +++++++++--------- packages/contracts/deploy/helpers.ts | 17 +- .../new/00_managing-dao/00_managing-dao.ts | 4 +- .../01_managing-dao-permissions.ts | 8 +- .../00_managing-dao/20_set-dao-permission.ts | 7 +- .../new/00_managing-dao/99_verify_step.ts | 7 +- .../new/10_framework/00_ens_registry.ts | 6 +- .../new/10_framework/01_ens_subdomains.ts | 6 +- .../02_ens_subdomain_registrars.ts | 7 +- .../new/10_framework/10_dao-registry.ts | 7 +- .../10_framework/20_plugin-repo-registry.ts | 8 +- .../new/10_framework/30_repo-factory.ts | 7 +- .../10_framework/31_repo-factory_conclude.ts | 2 +- .../10_framework/40_plugin_setup_processor.ts | 7 +- .../deploy/new/10_framework/50_dao-factory.ts | 7 +- .../10_framework/51_dao-factory-conclude.ts | 2 +- .../new/10_framework/99_verifiy_step.ts | 7 +- .../new/20_permissions/00_ens-permissions.ts | 7 +- .../10_dao-registry-permissions.ts | 7 +- .../20_plugin-registrty-permissions.ts | 7 +- .../deploy/new/20_permissions/99_verify.ts | 7 +- .../00_addresslist_voting_setup.ts | 5 +- .../01_addresslist_voting_setup_conclude.ts | 2 +- .../00_plugin-setups/10_token_voting_setup.ts | 7 +- .../11_token_voting_setup_conclude.ts | 4 +- .../00_plugin-setups/20_admin_setup.ts | 5 +- .../21_admin_setup_conclude.ts | 4 +- .../00_plugin-setups/30_multisig_setup.ts | 5 +- .../31_multisig_setup_conclude.ts | 4 +- .../00_plugin-setups/40_placeholder_setup.ts | 7 +- .../00_create_address_list_voting_repo.ts | 8 +- ...reate_address_list_voting_repo_conclude.ts | 4 +- .../10_create_token_voting_repo.ts | 8 +- .../11_create_token_voting_repo_conclude.ts | 4 +- .../10_plugin-repos/20_create_admin_repo.ts | 8 +- .../21_create_admin_repo_conclude.ts | 4 +- .../30_create_multisig_repo.ts | 8 +- .../31_create_multisig_repo_conclude.ts | 4 +- .../00_grant-permissions.ts | 7 +- ...0_register-managing-dao-on-dao-registry.ts | 7 +- .../30_install-multisig-on-managing-dao.ts | 14 +- .../40_revoke-permissions.ts | 7 +- .../99_verify_step.ts | 7 +- .../deploy/update/to_v1.3.0/10_DAOFactory.ts | 9 +- .../to_v1.3.0/11_DAOFactory_conclude.ts | 4 +- .../update/to_v1.3.0/20_PluginRepoFactory.ts | 9 +- .../21_PluginRepoFactory_conclude.ts | 4 +- .../to_v1.3.0/30_Multisig_PluginRepo.ts | 4 +- .../update/to_v1.3.0/31_Multisig_Plugin.ts | 12 +- .../to_v1.3.0/32_Multisig_Plugin_conclude.ts | 2 +- .../to_v1.3.0/40_TokenVoting_PluginRepo.ts | 4 +- .../update/to_v1.3.0/41_TokenVoting_Plugin.ts | 13 +- .../42_TokenVoting_Plugin_conclude.ts | 2 +- .../50_AddresslistVoting_PluginRepo.ts | 4 +- .../to_v1.3.0/51_AddresslistVoting_Plugin.ts | 11 +- .../52_AddresslistVoting_Plugin_conclude.ts | 2 +- .../update/to_v1.3.0/60_Admin_PluginRepo.ts | 4 +- .../deploy/update/to_v1.3.0/90_ManagingDAO.ts | 6 +- .../99_conclude/00_save-contract-addresses.ts | 2 +- .../99_conclude/01_managing_dao_proposal.ts | 4 +- .../99_conclude/10_verify-contracts.ts | 5 +- packages/contracts/hardhat.config.ts | 16 +- packages/contracts/npm/artifacts.ts | 17 +- packages/contracts/rollup.config.ts | 2 +- .../generate-typechain-osx-versions.ts | 4 +- .../scripts/generate-typechain-osx.ts | 4 +- .../test/core/dao/callback-handler.ts | 9 +- packages/contracts/test/core/dao/dao.ts | 34 +- .../core/permission/permission-manager.ts | 9 +- .../plugin/parameter-scoping-condition.ts | 7 +- .../test/core/plugin/plugin-clonable.ts | 7 +- .../core/plugin/plugin-uups-upgradeable.ts | 7 +- packages/contracts/test/core/plugin/plugin.ts | 7 +- .../test/core/plugin/shared-plugin.ts | 7 +- .../contracts/test/deploy/managing-dao.ts | 11 +- .../contracts/test/deploy/updateTo1_3_0.ts | 5 +- .../test/framework/dao/dao-factory.ts | 35 +- .../test/framework/dao/dao-registry.ts | 22 +- .../framework/plugin/plugin-repo-factory.ts | 20 +- .../framework/plugin/plugin-repo-registry.ts | 24 +- .../test/framework/plugin/plugin-repo.ts | 32 +- .../plugin/plugin-setup-processor.ts | 71 +- .../test/framework/plugin/plugin-setup.ts | 7 +- .../utils/ens/ens-subdomain-registry.ts | 24 +- .../utils/interface-based-registry.ts | 9 +- .../test/framework/utils/registry-utils.ts | 4 +- .../test/framework/utils/token-factory.ts | 12 +- packages/contracts/test/interfaces.ts | 28 +- .../counter-example/counter-plugin-setup.ts | 9 +- .../plugins/governance/admin/admin-setup.ts | 11 +- .../test/plugins/governance/admin/admin.ts | 30 +- .../addresslist/addresslist-voting-setup.ts | 13 +- .../addresslist/addresslist-voting.ts | 52 +- .../majority-voting/majority-voting.ts | 15 +- .../token/token-voting-setup.ts | 14 +- .../majority-voting/token/token-voting.ts | 50 +- .../governance/multisig/multisig-setup.ts | 27 +- .../plugins/governance/multisig/multisig.ts | 41 +- .../token/distribution/merkle-distributor.ts | 23 +- .../token/distribution/merkle-minter.ts | 23 +- .../token/distribution/src/balance-tree.ts | 3 +- .../test/plugins/utils/addresslist.ts | 5 +- .../contracts/test/plugins/utils/ratio.ts | 5 +- packages/contracts/test/test-utils/bitmap.ts | 2 +- packages/contracts/test/test-utils/dao.ts | 4 +- packages/contracts/test/test-utils/ens.ts | 9 +- packages/contracts/test/test-utils/fixture.ts | 3 +- .../test/test-utils/plugin-setup-processor.ts | 3 +- .../test/test-utils/psp/atomic-helpers.ts | 2 +- .../test/test-utils/psp/create-params.ts | 3 +- .../test/test-utils/psp/hash-helpers.ts | 5 +- .../test/test-utils/psp/mock-helpers.ts | 4 +- .../contracts/test/test-utils/psp/wrappers.ts | 2 +- packages/contracts/test/test-utils/repo.ts | 3 +- .../test/test-utils/uups-upgradeable.ts | 6 +- packages/contracts/test/test-utils/voting.ts | 4 +- .../test/token/erc20/governance-erc20.ts | 7 +- .../token/erc20/governance-wrapped-erc20.ts | 7 +- packages/contracts/test/upgrade/dao.ts | 20 +- .../test/utils/version-comparison-lib.ts | 5 +- packages/contracts/utils/ens.ts | 5 +- packages/contracts/utils/etherscan.ts | 4 +- packages/contracts/utils/storage.ts | 2 +- packages/subgraph/docker/docker-compose.yml | 20 +- .../subgraph/scripts/updateLocalManifest.js | 9 +- packages/subgraph/src/dao/dao_v1_0_0.ts | 35 +- packages/subgraph/src/dao/dao_v1_3_0.ts | 2 +- packages/subgraph/src/dao/utils.ts | 14 +- .../addresslist/addresslist-voting.ts | 19 +- packages/subgraph/src/packages/admin/admin.ts | 15 +- .../src/packages/admin/adminMembers.ts | 4 +- .../src/packages/multisig/multisig.ts | 24 +- .../src/packages/token/governance-erc20.ts | 12 +- .../src/packages/token/token-voting.ts | 26 +- packages/subgraph/src/plugin/pluginRepo.ts | 20 +- .../src/plugin/pluginSetupProcessor.ts | 8 +- packages/subgraph/src/plugin/utils.ts | 42 +- .../subgraph/src/registries/daoRegistry.ts | 4 +- .../src/registries/pluginRepoRegistry.ts | 2 +- packages/subgraph/src/utils/proposals.ts | 2 +- packages/subgraph/src/utils/tokens/common.ts | 8 +- packages/subgraph/src/utils/tokens/erc1155.ts | 8 +- packages/subgraph/src/utils/tokens/erc20.ts | 8 +- packages/subgraph/src/utils/tokens/erc721.ts | 8 +- packages/subgraph/src/utils/tokens/eth.ts | 2 +- .../addresslist-voting.test.ts | 25 +- .../tests/addresslist-voting/utils.ts | 9 +- packages/subgraph/tests/admin/admin.test.ts | 21 +- .../subgraph/tests/admin/adminMembers.test.ts | 29 +- packages/subgraph/tests/admin/utils.ts | 8 +- packages/subgraph/tests/constants.ts | 8 +- .../subgraph/tests/dao/dao_v1_0_0.test.ts | 135 ++-- .../subgraph/tests/dao/dao_v1_3_0.test.ts | 83 +-- packages/subgraph/tests/dao/utils.ts | 11 +- .../subgraph/tests/helpers/method-classes.ts | 50 +- .../subgraph/tests/multisig/multisig.test.ts | 19 +- packages/subgraph/tests/multisig/utils.ts | 13 +- .../permission-manager.test.ts | 36 +- .../subgraph/tests/plugin/pluginRepo.test.ts | 8 +- .../tests/plugin/pluginSetupProcessor.test.ts | 99 ++- packages/subgraph/tests/plugin/utils.ts | 14 +- .../tests/registry/daoRegistry.test.ts | 13 +- .../tests/registry/pluginRepoRegistry.test.ts | 4 +- packages/subgraph/tests/registry/utils.ts | 5 +- packages/subgraph/tests/schema-extender.ts | 25 +- .../tests/token/governance-erc20.test.ts | 43 +- .../subgraph/tests/token/token-voting.test.ts | 17 +- packages/subgraph/tests/token/utils.ts | 21 +- packages/subgraph/tests/utils.ts | 16 +- packages/subgraph/tests/utils/utils.test.ts | 11 +- 186 files changed, 1411 insertions(+), 1612 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index be91a253e..0c5394edf 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -4,19 +4,19 @@ about: Create a bug report to help us title: 'Bug: ' labels: bug assignees: '' - --- **Describe the bug** A short summary of what the bug is. Please be clear and concise. **To Reproduce (please complete the following information)** + - Config and flags: [e.g. variable="xyz"] - Steps to reproduce the behavior: - 1. node '...' - 2. make request with '....' - 3. '...' - 4. See error + 1. node '...' + 2. make request with '....' + 3. '...' + 4. See error **Current behavior** In depth explanation, if required, or a clear and concise description of what actually happens. @@ -25,9 +25,10 @@ In depth explanation, if required, or a clear and concise description of what ac A clear and concise description of what you expected to happen. **System (please complete the following information):** - - OS: [e.g. Fedora 35] - - Software version [e.g. Docker 8, Node 14.19.1] - - Commit hash [e.g. e84617d] + +- OS: [e.g. Fedora 35] +- Software version [e.g. Docker 8, Node 14.19.1] +- Commit hash [e.g. e84617d] **Additional context** Add any other context about the problem here. diff --git a/.github/helpers/contracts/register-ens-subdomain.js b/.github/helpers/contracts/register-ens-subdomain.js index 29aff7be7..257642fae 100644 --- a/.github/helpers/contracts/register-ens-subdomain.js +++ b/.github/helpers/contracts/register-ens-subdomain.js @@ -45,7 +45,7 @@ async function main() { resolver, 0 ); - console.log(`Creation tx hash ${creationTx.hash}`) + console.log(`Creation tx hash ${creationTx.hash}`); await creationTx.wait(); console.log('Created'); } else { @@ -58,7 +58,7 @@ async function main() { labelHash, wallet.address ); - console.log(`Ownership transfer tx hash ${ownerTx.hash}`) + console.log(`Ownership transfer tx hash ${ownerTx.hash}`); await ownerTx.wait(); } else { console.log('Already owner.'); @@ -76,7 +76,7 @@ const RegistryAbi = [ inputs: [{internalType: 'contract ENS', name: '_old', type: 'address'}], payable: false, stateMutability: 'nonpayable', - type: 'constructor' + type: 'constructor', }, { anonymous: false, @@ -86,22 +86,22 @@ const RegistryAbi = [ indexed: true, internalType: 'address', name: 'operator', - type: 'address' + type: 'address', }, - {indexed: false, internalType: 'bool', name: 'approved', type: 'bool'} + {indexed: false, internalType: 'bool', name: 'approved', type: 'bool'}, ], name: 'ApprovalForAll', - type: 'event' + type: 'event', }, { anonymous: false, inputs: [ {indexed: true, internalType: 'bytes32', name: 'node', type: 'bytes32'}, {indexed: true, internalType: 'bytes32', name: 'label', type: 'bytes32'}, - {indexed: false, internalType: 'address', name: 'owner', type: 'address'} + {indexed: false, internalType: 'address', name: 'owner', type: 'address'}, ], name: 'NewOwner', - type: 'event' + type: 'event', }, { anonymous: false, @@ -111,41 +111,41 @@ const RegistryAbi = [ indexed: false, internalType: 'address', name: 'resolver', - type: 'address' - } + type: 'address', + }, ], name: 'NewResolver', - type: 'event' + type: 'event', }, { anonymous: false, inputs: [ {indexed: true, internalType: 'bytes32', name: 'node', type: 'bytes32'}, - {indexed: false, internalType: 'uint64', name: 'ttl', type: 'uint64'} + {indexed: false, internalType: 'uint64', name: 'ttl', type: 'uint64'}, ], name: 'NewTTL', - type: 'event' + type: 'event', }, { anonymous: false, inputs: [ {indexed: true, internalType: 'bytes32', name: 'node', type: 'bytes32'}, - {indexed: false, internalType: 'address', name: 'owner', type: 'address'} + {indexed: false, internalType: 'address', name: 'owner', type: 'address'}, ], name: 'Transfer', - type: 'event' + type: 'event', }, { constant: true, inputs: [ {internalType: 'address', name: 'owner', type: 'address'}, - {internalType: 'address', name: 'operator', type: 'address'} + {internalType: 'address', name: 'operator', type: 'address'}, ], name: 'isApprovedForAll', outputs: [{internalType: 'bool', name: '', type: 'bool'}], payable: false, stateMutability: 'view', - type: 'function' + type: 'function', }, { constant: true, @@ -154,7 +154,7 @@ const RegistryAbi = [ outputs: [{internalType: 'contract ENS', name: '', type: 'address'}], payable: false, stateMutability: 'view', - type: 'function' + type: 'function', }, { constant: true, @@ -163,7 +163,7 @@ const RegistryAbi = [ outputs: [{internalType: 'address', name: '', type: 'address'}], payable: false, stateMutability: 'view', - type: 'function' + type: 'function', }, { constant: true, @@ -172,7 +172,7 @@ const RegistryAbi = [ outputs: [{internalType: 'bool', name: '', type: 'bool'}], payable: false, stateMutability: 'view', - type: 'function' + type: 'function', }, { constant: true, @@ -181,31 +181,31 @@ const RegistryAbi = [ outputs: [{internalType: 'address', name: '', type: 'address'}], payable: false, stateMutability: 'view', - type: 'function' + type: 'function', }, { constant: false, inputs: [ {internalType: 'address', name: 'operator', type: 'address'}, - {internalType: 'bool', name: 'approved', type: 'bool'} + {internalType: 'bool', name: 'approved', type: 'bool'}, ], name: 'setApprovalForAll', outputs: [], payable: false, stateMutability: 'nonpayable', - type: 'function' + type: 'function', }, { constant: false, inputs: [ {internalType: 'bytes32', name: 'node', type: 'bytes32'}, - {internalType: 'address', name: 'owner', type: 'address'} + {internalType: 'address', name: 'owner', type: 'address'}, ], name: 'setOwner', outputs: [], payable: false, stateMutability: 'nonpayable', - type: 'function' + type: 'function', }, { constant: false, @@ -213,38 +213,38 @@ const RegistryAbi = [ {internalType: 'bytes32', name: 'node', type: 'bytes32'}, {internalType: 'address', name: 'owner', type: 'address'}, {internalType: 'address', name: 'resolver', type: 'address'}, - {internalType: 'uint64', name: 'ttl', type: 'uint64'} + {internalType: 'uint64', name: 'ttl', type: 'uint64'}, ], name: 'setRecord', outputs: [], payable: false, stateMutability: 'nonpayable', - type: 'function' + type: 'function', }, { constant: false, inputs: [ {internalType: 'bytes32', name: 'node', type: 'bytes32'}, - {internalType: 'address', name: 'resolver', type: 'address'} + {internalType: 'address', name: 'resolver', type: 'address'}, ], name: 'setResolver', outputs: [], payable: false, stateMutability: 'nonpayable', - type: 'function' + type: 'function', }, { constant: false, inputs: [ {internalType: 'bytes32', name: 'node', type: 'bytes32'}, {internalType: 'bytes32', name: 'label', type: 'bytes32'}, - {internalType: 'address', name: 'owner', type: 'address'} + {internalType: 'address', name: 'owner', type: 'address'}, ], name: 'setSubnodeOwner', outputs: [{internalType: 'bytes32', name: '', type: 'bytes32'}], payable: false, stateMutability: 'nonpayable', - type: 'function' + type: 'function', }, { constant: false, @@ -253,25 +253,25 @@ const RegistryAbi = [ {internalType: 'bytes32', name: 'label', type: 'bytes32'}, {internalType: 'address', name: 'owner', type: 'address'}, {internalType: 'address', name: 'resolver', type: 'address'}, - {internalType: 'uint64', name: 'ttl', type: 'uint64'} + {internalType: 'uint64', name: 'ttl', type: 'uint64'}, ], name: 'setSubnodeRecord', outputs: [], payable: false, stateMutability: 'nonpayable', - type: 'function' + type: 'function', }, { constant: false, inputs: [ {internalType: 'bytes32', name: 'node', type: 'bytes32'}, - {internalType: 'uint64', name: 'ttl', type: 'uint64'} + {internalType: 'uint64', name: 'ttl', type: 'uint64'}, ], name: 'setTTL', outputs: [], payable: false, stateMutability: 'nonpayable', - type: 'function' + type: 'function', }, { constant: true, @@ -280,6 +280,6 @@ const RegistryAbi = [ outputs: [{internalType: 'uint64', name: '', type: 'uint64'}], payable: false, stateMutability: 'view', - type: 'function' - } + type: 'function', + }, ]; diff --git a/.github/labeler.yml b/.github/labeler.yml index 0f471c3f1..eee5677e1 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,7 +1,7 @@ contracts: -- packages/contracts/**/* -- packages/contracts/* + - packages/contracts/**/* + - packages/contracts/* subgraph: -- packages/subgraph/**/* -- packages/subgraph/* \ No newline at end of file + - packages/subgraph/**/* + - packages/subgraph/* diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index a77118bff..354416052 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -5,7 +5,9 @@ Please include a summary of the change and be sure you follow the contributions Task ID: [OS-?](https://aragonassociation.atlassian.net/browse/OS-?) ## Type of change + See the framework lifecylce in `packages/contracts/docs/framework-lifecycle` to decide what kind of change this pull request is. + - [ ] Bug fix (non-breaking change which fixes an issue) diff --git a/.github/workflows/comment-triggers.yml b/.github/workflows/comment-triggers.yml index 1a35d7011..e91fca474 100644 --- a/.github/workflows/comment-triggers.yml +++ b/.github/workflows/comment-triggers.yml @@ -5,7 +5,7 @@ on: issue_comment: types: [created] -jobs: +jobs: check_user_permission: runs-on: ubuntu-latest name: A job to check user's permission level @@ -82,8 +82,6 @@ jobs: mode: ${{ needs.mythx_full.outputs.mode }} secrets: inherit - - release_label: needs: [check_user_permission] runs-on: ubuntu-latest @@ -134,4 +132,4 @@ jobs: if: steps.check.outputs.triggered == 'true' uses: actions-ecosystem/action-add-labels@v1 with: - labels: subgraph:${{ steps.type.outputs.type }} \ No newline at end of file + labels: subgraph:${{ steps.type.outputs.type }} diff --git a/.github/workflows/contracts-deploy.yml b/.github/workflows/contracts-deploy.yml index 8dbc1ef8b..285c8eb6d 100644 --- a/.github/workflows/contracts-deploy.yml +++ b/.github/workflows/contracts-deploy.yml @@ -20,7 +20,7 @@ jobs: - name: Install node uses: actions/setup-node@v3 with: - cache: "yarn" + cache: 'yarn' node-version: 16 - name: Install dependencies run: yarn install --pure-lockfile @@ -53,7 +53,7 @@ jobs: - name: Install node uses: actions/setup-node@v3 with: - cache: "yarn" + cache: 'yarn' node-version: 16 - name: Install dependencies run: yarn install --pure-lockfile diff --git a/.github/workflows/mythx-changed.yml b/.github/workflows/mythx-changed.yml index 3f84583c5..1a6270c34 100644 --- a/.github/workflows/mythx-changed.yml +++ b/.github/workflows/mythx-changed.yml @@ -8,7 +8,7 @@ on: required: true type: string mode: - description: "Mythx scan mode (quick|standard|deep)" + description: 'Mythx scan mode (quick|standard|deep)' required: true type: string secrets: @@ -22,7 +22,7 @@ on: required: true type: string mode: - description: "Mythx scan mode (quick|standard|deep)" + description: 'Mythx scan mode (quick|standard|deep)' required: true default: standard type: choice @@ -45,7 +45,7 @@ jobs: - name: Install node uses: actions/setup-node@v3 with: - cache: "yarn" + cache: 'yarn' node-version: 16 - uses: actions/setup-python@v4 - name: Install mythx-cli @@ -85,4 +85,4 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: SEE HERE FOR DASHBOARD LINK run: | - echo 'Scan started in group https://dashboard.mythx.io/#/console/analyses/groups/${{ needs.mythx.outputs.group_id }}' \ No newline at end of file + echo 'Scan started in group https://dashboard.mythx.io/#/console/analyses/groups/${{ needs.mythx.outputs.group_id }}' diff --git a/.github/workflows/mythx-full.yml b/.github/workflows/mythx-full.yml index ea2dc1340..9cf9e21e8 100644 --- a/.github/workflows/mythx-full.yml +++ b/.github/workflows/mythx-full.yml @@ -8,7 +8,7 @@ on: required: false type: string mode: - description: "Mythx scan mode (quick|standard|deep)" + description: 'Mythx scan mode (quick|standard|deep)' required: true type: string secrets: @@ -18,7 +18,7 @@ on: workflow_dispatch: inputs: mode: - description: "Mythx scan mode (quick|standard|deep)" + description: 'Mythx scan mode (quick|standard|deep)' required: true default: standard type: choice @@ -26,7 +26,6 @@ on: - quick - standard - deep - jobs: mythx: @@ -47,7 +46,7 @@ jobs: - name: Install node uses: actions/setup-node@v3 with: - cache: "yarn" + cache: 'yarn' node-version: 16 - uses: actions/setup-python@v4 - name: Install mythx-cli @@ -80,4 +79,4 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: SEE HERE FOR DASHBOARD LINK run: | - echo 'Scan started in group https://dashboard.mythx.io/#/console/analyses/groups/${{ needs.mythx.outputs.group_id }}' \ No newline at end of file + echo 'Scan started in group https://dashboard.mythx.io/#/console/analyses/groups/${{ needs.mythx.outputs.group_id }}' diff --git a/.github/workflows/npm-release-reusable.yml b/.github/workflows/npm-release-reusable.yml index a26719fb3..2208004ee 100644 --- a/.github/workflows/npm-release-reusable.yml +++ b/.github/workflows/npm-release-reusable.yml @@ -52,7 +52,7 @@ jobs: - name: Install node uses: actions/setup-node@v3 with: - cache: "yarn" + cache: 'yarn' node-version: 16 registry-url: 'https://registry.npmjs.org' - name: Install dependencies @@ -79,8 +79,7 @@ jobs: env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - name: updates changelog.md - run: - VERSION=$(cat package.json | jq -r .version) + run: VERSION=$(cat package.json | jq -r .version) sed -i "s/^\#\# \[UPCOMING\]/## [UPCOMING]\n\n\## $VERSION\nOn $(date +'%Y-%m-%d %H:%M:%S')/" "./packages/${{ matrix.package }}/CHANGELOG.md" - uses: actions/upload-artifact@v2 with: diff --git a/.github/workflows/npm-release.yml b/.github/workflows/npm-release.yml index 222a60afc..83435e399 100644 --- a/.github/workflows/npm-release.yml +++ b/.github/workflows/npm-release.yml @@ -34,4 +34,4 @@ jobs: uses: './.github/workflows/npm-release-reusable.yml' secrets: NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - ARABOT_PAT: ${{ secrets.ARABOT_PAT }} \ No newline at end of file + ARABOT_PAT: ${{ secrets.ARABOT_PAT }} diff --git a/.github/workflows/pull_request_labeler.yml b/.github/workflows/pull_request_labeler.yml index 0d40ed334..dc7127ab0 100644 --- a/.github/workflows/pull_request_labeler.yml +++ b/.github/workflows/pull_request_labeler.yml @@ -1,12 +1,12 @@ -name: "Pull Request Labeler" +name: 'Pull Request Labeler' on: -- pull_request_target + - pull_request_target jobs: triage: runs-on: ubuntu-latest steps: - - uses: actions/labeler@v3 - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" - sync-labels: true \ No newline at end of file + - uses: actions/labeler@v3 + with: + repo-token: '${{ secrets.GITHUB_TOKEN }}' + sync-labels: true diff --git a/.mythx.yml b/.mythx.yml index 1996f0e53..af8c17ed1 100644 --- a/.mythx.yml +++ b/.mythx.yml @@ -1,9 +1,8 @@ - analyze: - create-group: true - group-name: Core - solc: 0.8.17 - remappings: - - "@openzeppelin/=./node_modules/@openzeppelin/" - - "@opengsn/=./node_modules/@opengsn/" - - "@ensdomains/=./node_modules/@ensdomains/" + create-group: true + group-name: Core + solc: 0.8.17 + remappings: + - '@openzeppelin/=./node_modules/@openzeppelin/' + - '@opengsn/=./node_modules/@opengsn/' + - '@ensdomains/=./node_modules/@ensdomains/' diff --git a/.prettierignore b/.prettierignore index 66b2c635f..f77502d00 100644 --- a/.prettierignore +++ b/.prettierignore @@ -13,7 +13,6 @@ typechain types imported generated -*/js-client/test/integration/*.test.ts # files *.env @@ -22,6 +21,5 @@ generated .pnp.* coverage.json package-lock.json -pnpm-lock.yaml yarn.lock extended-schema.ts \ No newline at end of file diff --git a/active_contracts.json b/active_contracts.json index 20fa8228e..e4e9802ba 100644 --- a/active_contracts.json +++ b/active_contracts.json @@ -25,7 +25,7 @@ "token-voting-repo": "0x424F4cA6FA9c24C03f2396DF0E96057eD11CF7dF", "admin-repo": "0x152c9E28995E418870b85cbbc0AEE4e53020edb2", "multisig-repo": "0x9e7956C8758470dE159481e5DD0d08F8B59217A2" - }, + }, "goerli": { "managingDAO": "0xB76F8d3512497040a96E77141c951a5374F24Eb9", "DAO_ENSSubdomainRegistrar_Implementation": "0x394B49Cc32Dc81B8EaCdeb62A6Fa66F31D1D022c", diff --git a/packages/contracts-ethers/rollup.config.ts b/packages/contracts-ethers/rollup.config.ts index e9697bc6b..491c8997e 100644 --- a/packages/contracts-ethers/rollup.config.ts +++ b/packages/contracts-ethers/rollup.config.ts @@ -1,11 +1,11 @@ +import json from '@rollup/plugin-json'; import typescript from '@rollup/plugin-typescript'; import dts from 'rollup-plugin-dts'; -import json from '@rollup/plugin-json'; export default [ { input: 'npm/index.ts', - plugins: [typescript({project: './tsconfig.json', }), json()], + plugins: [typescript({project: './tsconfig.json'}), json()], output: [ { file: 'dist/bundle-cjs.js', diff --git a/packages/contracts/README.md b/packages/contracts/README.md index 91b96730c..53ec643d7 100644 --- a/packages/contracts/README.md +++ b/packages/contracts/README.md @@ -125,8 +125,8 @@ After successful contract compilation, TypeChain typings will be automatically g Here is a generic example of usage in a test: ```ts -import {MyContract} from '@aragon/osx-ethers-v1.2.0/{path_to_MyContract}'; import {MyContract____factory} from '@aragon/osx-ethers-v1.2.0/{path_to_MyContract__factory}'; +import {MyContract} from '@aragon/osx-ethers-v1.2.0/{path_to_MyContract}'; describe('MyContract Test', function () { let myContract: MyContract; @@ -149,13 +149,13 @@ Please replace 'MyContract' with the actual name of your contract, and follow th Example of usage in a test: ```ts -import {expect} from 'chai'; -import {ethers} from 'hardhat'; -import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; import { DAO as DAO_V1_3_0, DAO__factory as DAO_V1_3_0_factory, } from '@aragon/osx-ethers-v1.3.0/contracts/core/dao/DAO.sol'; +import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; +import {expect} from 'chai'; +import {ethers} from 'hardhat'; describe('Legacy Test Example', function () { let signers: SignerWithAddress[]; diff --git a/packages/contracts/Releases.md b/packages/contracts/Releases.md index 0a2d5e0af..14995034f 100644 --- a/packages/contracts/Releases.md +++ b/packages/contracts/Releases.md @@ -25,7 +25,7 @@ PlaceholderSetup: 0xB2A2b32b9d885C85d5b229C0509341c37CaE7483 address-list-voting-repo: 0xdfA1fBeC1Cad92597101A4f4A18e1340c5eA55C1 token-voting-repo: 0x424F4cA6FA9c24C03f2396DF0E96057eD11CF7dF admin-repo: 0x152c9E28995E418870b85cbbc0AEE4e53020edb2 -multisig-repo: 0x9e7956C8758470dE159481e5DD0d08F8B59217A2 +multisig-repo: 0x9e7956C8758470dE159481e5DD0d08F8B59217A2 Commit: [d429e77c68fcc972126bef6dd58d5d8b32118a09](https://github.com/aragon/osx/commit/d429e77c68fcc972126bef6dd58d5d8b32118a09) Network: baseMainnet @@ -54,8 +54,8 @@ PlaceholderSetup: 0xFcaBf5b75473447E4fde4043F8255B2DAdbF0782 address-list-voting-repo: 0x0A5387021B2722E983842fA701D0BaD8B9279fE2 token-voting-repo: 0x2532570DcFb749A7F976136CC05648ef2a0f60b0 admin-repo: 0x212eF339C77B3390599caB4D46222D79fAabcb5c -multisig-repo: 0xcDC4b0BC63AEfFf3a7826A19D101406C6322A585 - +multisig-repo: 0xcDC4b0BC63AEfFf3a7826A19D101406C6322A585 + Commit: [d429e77c68fcc972126bef6dd58d5d8b32118a09](https://github.com/aragon/osx/commit/d429e77c68fcc972126bef6dd58d5d8b32118a09) Network: baseGoerli ManagingDAOImplementation: 0x82aBAfBf46759358c705c7E323543A7Be47AbAf0 @@ -83,10 +83,10 @@ PlaceholderSetup: 0xb163e7606847E86A6ecd8c40432A3c75d27dBD80 address-list-voting-repo: 0x38177F525C4BC8427Fe5496fcEA567E7396f9Bba token-voting-repo: 0x0bdd1C7dD81000777Efcba4BBCeAdBF75560e0b8 admin-repo: 0x64Ee23C65bFBfEC35d337Ae93fcf22137c2E9c13 -multisig-repo: 0x3308fd88Db88e11c4d99EC805836d7E9F181CdE0 - ---- - +multisig-repo: 0x3308fd88Db88e11c4d99EC805836d7E9F181CdE0 + +--- + Commit: [d429e77c68fcc972126bef6dd58d5d8b32118a09](https://github.com/aragon/osx/commit/d429e77c68fcc972126bef6dd58d5d8b32118a09) Network: baseMainnet managingDAO: 0xB93f5Be5900C2d5fBaE8e4F99B46FfB2Db52ee21 @@ -114,7 +114,7 @@ PlaceholderSetup: 0xadAdd899F1096B77B6fE601748be1A7a9ADB714B address-list-voting-repo: 0x83a977d564349586936f17D9536b2c5702B4Fe20 token-voting-repo: 0xFBFbE98845B4E2751a8A004B5A1759e3A278FC68 admin-repo: 0x86C87Aa7C09a447048adf4197fec7C12eF62A07F -multisig-repo: 0x2784e9500f8f60C1267e819f216682a88A37d56D +multisig-repo: 0x2784e9500f8f60C1267e819f216682a88A37d56D --- @@ -170,8 +170,8 @@ AddresslistVotingSetup: 0x0B295EDeDF122E5A57d0661E1993f617dE1bEDF4 Commit: [39ffa73f91454f75bab6920c4bec2dc8a0da56eb](https://github.com/aragon/osx/commit/39ffa73f91454f75bab6920c4bec2dc8a0da56eb) Network: mumbai DAOFactory: 0x3ff1681f31f68Ff2723d25Cf839bA7500FE5d218 -MultisigSetup: 0x2C233F09CaB08BC66b750CB80da401Bd700B74a0 - +MultisigSetup: 0x2C233F09CaB08BC66b750CB80da401Bd700B74a0 + Commit: [cb0621dc5185a73240a6ca33fccc7698f059fdf5](https://github.com/aragon/osx/commit/cb0621dc5185a73240a6ca33fccc7698f059fdf5) Network: polygon AddresslistVotingSetup: 0x622DB36633643E4A4075ecc3A309a4f0B942922a @@ -196,8 +196,8 @@ MultisigSetup: 0xD63A8Cfb0eec960C3e70F96a9e3F3091f3FD70b6 address-list-voting-repo: 0x641DdEdc2139d9948e8dcC936C1Ab2314D9181E6 token-voting-repo: 0xae67aea0B830ed4504B36670B5Fa70c5C386Bb58 admin-repo: 0x7fF570473d0876db16A59e8F04EE7F17Ab117309 -multisig-repo: 0x5A5035E7E8aeff220540F383a9cf8c35929bcF31 - +multisig-repo: 0x5A5035E7E8aeff220540F383a9cf8c35929bcF31 + Commit: [cb0621dc5185a73240a6ca33fccc7698f059fdf5](https://github.com/aragon/osx/commit/cb0621dc5185a73240a6ca33fccc7698f059fdf5) Network: mumbai managingDAOImplementation: 0x5E993db91Fd2c713Df1110358396EAc60d54fE66 @@ -222,8 +222,8 @@ MultisigSetup: 0x8b2361C65E898F40372a0DD5E1BfEE9895A676B3 address-list-voting-repo: 0x71570268A86A80B5cCa3F5e430c2BAa3F4b26278 token-voting-repo: 0xaCa70D8c462940B839DE386BcDD4CACf745632cA admin-repo: 0x0DF9b15550fF39149e491dDD154b28f587e0cD16 -multisig-repo: 0x2c4690b8be39adAd4F15A69340d5035aC6E53eEF - +multisig-repo: 0x2c4690b8be39adAd4F15A69340d5035aC6E53eEF + Commit: [054f89908fa881dba230b7f3815f081463138fed](https://github.com/aragon/osx/commit/054f89908fa881dba230b7f3815f081463138fed) Network: mumbai managingDAOImplementation: 0x38e85D5A0A7F49EcfD24FF191E543a7c7001068d @@ -249,8 +249,8 @@ PlaceholderSetup: 0x4F6f58b1683cc8f11743dDB96078a5937Fe932a9 address-list-voting-repo: 0x9531c5c5C1207a319cBDe3A944f6dC54FA088243 token-voting-repo: 0x296c00A28B6e532e37b8D4665ad3Dc40CE588cB8 admin-repo: 0x746E5F3fCBFc797EF98f38483c6B955349D1542D -multisig-repo: 0x6E8dA9b20078657c18397407d2a2671AC907F83B - +multisig-repo: 0x6E8dA9b20078657c18397407d2a2671AC907F83B + Commit: [cb0621dc5185a73240a6ca33fccc7698f059fdf5](https://github.com/aragon/osx/commit/cb0621dc5185a73240a6ca33fccc7698f059fdf5) Network: mainnet managingDAOImplementation: 0x005098056a837c2c4F99C7eCeE976F8D90bdFFF8 @@ -273,8 +273,8 @@ MultisigSetup: 0x8d6726Fe85Caa585d88FD8342ebEEE88d703E754 address-list-voting-repo: 0xC207767d8A7a28019AFFAEAe6698F84B5526EbD7 token-voting-repo: 0xb7401cD221ceAFC54093168B814Cc3d42579287f admin-repo: 0xA4371a239D08bfBA6E8894eccf8466C6323A52C3 -multisig-repo: 0x8c278e37D0817210E18A7958524b7D0a1fAA6F7b - +multisig-repo: 0x8c278e37D0817210E18A7958524b7D0a1fAA6F7b + Commit: [cb0621dc5185a73240a6ca33fccc7698f059fdf5](https://github.com/aragon/osx/commit/cb0621dc5185a73240a6ca33fccc7698f059fdf5) Network: goerli managingDAOImplementation: 0x99C83C89C59166f7f766A221D5D0Ee00D37170c3 @@ -297,8 +297,8 @@ MultisigSetup: 0xBFd84852C8007Bf148721d2c20F69456F193b201 address-list-voting-repo: 0xbD293e27226EF2b85E84FADCF2d5135AbC52e50A token-voting-repo: 0xFCc843C48BD44e5dA5976a2f2d85772D59C5959E admin-repo: 0xF66348E9865bb0f29B889E7c0FE1BCf4acAb5f54 -multisig-repo: 0x92C090cffC592B1bC321aCfAF735057B876375F8 - +multisig-repo: 0x92C090cffC592B1bC321aCfAF735057B876375F8 + Commit: [f8aee0a0fa7ae5825130b9726a18ef6e36ddc121](https://github.com/aragon/osx/commit/f8aee0a0fa7ae5825130b9726a18ef6e36ddc121) Network: goerli managingDAOImplementation: 0xF37d853fF9a8B4396fE4CcCc8C9DE744Ea3E7278 @@ -321,8 +321,8 @@ MultisigSetup: 0x5E993db91Fd2c713Df1110358396EAc60d54fE66 address-list-voting-repo: 0xAbcf728903C84Abad57320fd78A7bb21ae07A261 token-voting-repo: 0xb60Fd6C478541eE150DE7aE7bd379612b2626234 admin-repo: 0xe6eEca8428b36ab2e5a96D3F8A903f3c3F8c6938 -multisig-repo: 0x160b35934f24B1b7eE238d37Ca2F495AB1a5a803 - +multisig-repo: 0x160b35934f24B1b7eE238d37Ca2F495AB1a5a803 + Commit: [da1278afd8263f7cc13973853bd3b58a352a1ec8](https://github.com/aragon/osx/commit/da1278afd8263f7cc13973853bd3b58a352a1ec8) Network: goerli managingDAOImplementation: 0x59f3159E8d0F445F711D4f5a1DeA6899cB048B9b @@ -345,11 +345,11 @@ MultisigSetup: 0x9D89405D1187d619Da33415856F978474E15C41a address-list-voting-repo: 0x583E48C1d7dBd9a65b7866A5fF6956339458d001 token-voting-repo: 0x2b5D9CCb5c9676680aac70a19f22c4F46af5b1F5 admin-repo: 0xf33F81C42D571EF439cb55d26dF9f0C8c20C822c -multisig-repo: 0x39e04b9728db34650110f99161AE6d2521D7Cf67 - -Time: 2023-01-10T21:54:05.494Z -Commit: [b72fe768be0709d87d7feba1ddce25cc5fb8703c](https://github.com/aragon/osx/commit/b72fe768be0709d87d7feba1ddce25cc5fb8703c) -Network: goerli +multisig-repo: 0x39e04b9728db34650110f99161AE6d2521D7Cf67 + +Time: 2023-01-10T21:54:05.494Z +Commit: [b72fe768be0709d87d7feba1ddce25cc5fb8703c](https://github.com/aragon/osx/commit/b72fe768be0709d87d7feba1ddce25cc5fb8703c) +Network: goerli AddresslistVotingSetup: 0x6c6E258b07B31BedD44dCedA07779Beb37015857 AdminSetup: 0xfB7C644a0771CC8D1Db6590889d413A616930989 DAO: 0x115268e5D541a2c13789683dF7E53AFfEC6169f5 @@ -371,13 +371,13 @@ PluginSetupProcessor: 0x1a4393236D112Ac1Cf6cC6b984165cC0A36D7cEc Plugin_ENSSubdomainRegistrar: 0xB189491f8394a5C898dDBd88cD6a65372e02F9f2 Plugin_ENSSubdomainRegistrar_Implementation: 0xAd5c3089b8A07A07fAB8658bE9B8b240d66e1608 Plugin_ENSSubdomainRegistrar_Proxy: 0xB189491f8394a5C898dDBd88cD6a65372e02F9f2 -TokenVotingSetup: 0xBD5429e38C6db78b0D959Aae471dbF007D18367E - ---- - -Time: 2022-12-20T17:32:37.842Z -Commit: [3c35fece6d9114cfa509cd0a92ad271bc9a39080](https://github.com/aragon/osx/commit/3c35fece6d9114cfa509cd0a92ad271bc9a39080) -Network: goerli +TokenVotingSetup: 0xBD5429e38C6db78b0D959Aae471dbF007D18367E + +--- + +Time: 2022-12-20T17:32:37.842Z +Commit: [3c35fece6d9114cfa509cd0a92ad271bc9a39080](https://github.com/aragon/osx/commit/3c35fece6d9114cfa509cd0a92ad271bc9a39080) +Network: goerli AddresslistVotingSetup: 0x3a43B0994c6105E81c949bcB333A56dC4A354E9A AdminSetup: 0xa3a33C600ea0bF965ecbaf874cDC1EE7c0B2D7ee DAO: 0xf01D2c896cE96a5832bcB001b94eFd663eDcaaE1 @@ -398,13 +398,13 @@ PluginSetupProcessor: 0xA57f171A2fe4B71F993d3518A86965Ee849a860A Plugin_ENSSubdomainRegistrar: 0xFdB98b110f8c8a5a79F903304014fC726b3f2A75 Plugin_ENSSubdomainRegistrar_Implementation: 0x636416cd599da0890B7013e8bc1aA1F53cF37B9e Plugin_ENSSubdomainRegistrar_Proxy: 0xFdB98b110f8c8a5a79F903304014fC726b3f2A75 -TokenVotingSetup: 0xDD17348A1C689336024CC79003c2EB54CbD908f2 - ---- - -Time: 2022-11-02T16:59:33.582Z -Commit: [88d3bff1edb2e66ba7d8e31cd6e0ceffc4939053](https://github.com/aragon/osx/commit/88d3bff1edb2e66ba7d8e31cd6e0ceffc4939053) -Network: goerli +TokenVotingSetup: 0xDD17348A1C689336024CC79003c2EB54CbD908f2 + +--- + +Time: 2022-11-02T16:59:33.582Z +Commit: [88d3bff1edb2e66ba7d8e31cd6e0ceffc4939053](https://github.com/aragon/osx/commit/88d3bff1edb2e66ba7d8e31cd6e0ceffc4939053) +Network: goerli AllowlistVotingSetup: 0xD39cE95D1e29d4EA9F4E8813d73E68F2F720377a DAO: 0xe0C6B6f2078bbC38Bf71af47C286766689D3BaaF DAOFactory: 0xd52CA6BbfC11627aF9aC3496CAb975ae20E70A81 @@ -424,341 +424,341 @@ PluginRepoRegistry_Proxy: 0x22C8AEA0Ad1c1872E60bD43b3FaF20471F7CC43f PluginSetupProcessor: 0xf7777b97EBEec7EaFCFD28aabE31EDd8F9b46A08 Plugin_ENSSubdomainRegistrar: 0x03d529D600eb5bf30FFa4A644F88F4bC3Bc0fD7c Plugin_ENSSubdomainRegistrar_Implementation: 0xC234cb557F7a45207FFCC3575FD4eE1C165055B1 -Plugin_ENSSubdomainRegistrar_Proxy: 0x03d529D600eb5bf30FFa4A644F88F4bC3Bc0fD7c - ---- - -Time: 2022-07-07T09:05:05.960Z -Commit: [edbd0653cfcdb01f5f939af7af4b333a055f8a1e](https://github.com/aragon/osx/commit/edbd0653cfcdb01f5f939af7af4b333a055f8a1e) -Network: arbitrum-rinkeby +Plugin_ENSSubdomainRegistrar_Proxy: 0x03d529D600eb5bf30FFa4A644F88F4bC3Bc0fD7c + +--- + +Time: 2022-07-07T09:05:05.960Z +Commit: [edbd0653cfcdb01f5f939af7af4b333a055f8a1e](https://github.com/aragon/osx/commit/edbd0653cfcdb01f5f939af7af4b333a055f8a1e) +Network: arbitrum-rinkeby DAOFactory: 0x014e2862A05C82aac74c7Ce0cDFeAfc9EA9815cc Registry: 0xcDbC588740854c24EF8edd50d91d3E511f984501 -TokenFactory: 0xDbb359eA1d5734eDba168b070309347FfA9Eab3e - ---- - -Time: 2022-07-07T09:05:05.965Z -Commit: [edbd0653cfcdb01f5f939af7af4b333a055f8a1e](https://github.com/aragon/osx/commit/edbd0653cfcdb01f5f939af7af4b333a055f8a1e) -Network: mumbai +TokenFactory: 0xDbb359eA1d5734eDba168b070309347FfA9Eab3e + +--- + +Time: 2022-07-07T09:05:05.965Z +Commit: [edbd0653cfcdb01f5f939af7af4b333a055f8a1e](https://github.com/aragon/osx/commit/edbd0653cfcdb01f5f939af7af4b333a055f8a1e) +Network: mumbai DAOFactory: 0xCED6b706B8A0Db179C3056Bb03dF48744e25652B Registry: 0xaB7807aA4755F2D93dE59f6eaA9764c14B71cAf7 -TokenFactory: 0x9DE8341f7369DcEC25Fd085dC55F5BbD8e279891 - ---- - -Time: 2022-07-07T09:05:05.970Z -Commit: [edbd0653cfcdb01f5f939af7af4b333a055f8a1e](https://github.com/aragon/osx/commit/edbd0653cfcdb01f5f939af7af4b333a055f8a1e) -Network: rinkeby +TokenFactory: 0x9DE8341f7369DcEC25Fd085dC55F5BbD8e279891 + +--- + +Time: 2022-07-07T09:05:05.970Z +Commit: [edbd0653cfcdb01f5f939af7af4b333a055f8a1e](https://github.com/aragon/osx/commit/edbd0653cfcdb01f5f939af7af4b333a055f8a1e) +Network: rinkeby DAOFactory: 0xeC9d97d6143fCd8A5a3dd83F4C3Ac5e738069E9a Registry: 0xCC5FD930dcbA825e9686F987A9243036Db4A317D -TokenFactory: 0x749Ea9650F043edDE2F243E2e43cdf5d7D22C76D - ---- - -Time: 2022-06-22T15:41:08.074Z -Commit: [132e9fd914f30ed750f9730631283589ddb361cd](https://github.com/aragon/osx/commit/132e9fd914f30ed750f9730631283589ddb361cd) -Network: arbitrum-rinkeby +TokenFactory: 0x749Ea9650F043edDE2F243E2e43cdf5d7D22C76D + +--- + +Time: 2022-06-22T15:41:08.074Z +Commit: [132e9fd914f30ed750f9730631283589ddb361cd](https://github.com/aragon/osx/commit/132e9fd914f30ed750f9730631283589ddb361cd) +Network: arbitrum-rinkeby DAOFactory: 0x705aC33fBC258081CA03beBbc4049b6f4Ff2d5a4 Registry: 0xabF0792869D4dEEaEeCD14238c41578eB112183c -TokenFactory: 0x9f0452337D4b39b81610B29ddcEa68F42Cc4e142 - ---- - -Time: 2022-06-22T15:41:08.079Z -Commit: [132e9fd914f30ed750f9730631283589ddb361cd](https://github.com/aragon/osx/commit/132e9fd914f30ed750f9730631283589ddb361cd) -Network: mumbai +TokenFactory: 0x9f0452337D4b39b81610B29ddcEa68F42Cc4e142 + +--- + +Time: 2022-06-22T15:41:08.079Z +Commit: [132e9fd914f30ed750f9730631283589ddb361cd](https://github.com/aragon/osx/commit/132e9fd914f30ed750f9730631283589ddb361cd) +Network: mumbai DAOFactory: 0x5dA356d7945B1A81F61a748ed85448c7cFB9d712 Registry: 0x744c5d61354aD6bC7c40C84766e9f4e56f4017bC -TokenFactory: 0x9d492648900c2E785C00cA90f3945025d99D6EB0 - ---- - -Time: 2022-06-22T15:41:08.083Z -Commit: [132e9fd914f30ed750f9730631283589ddb361cd](https://github.com/aragon/osx/commit/132e9fd914f30ed750f9730631283589ddb361cd) -Network: rinkeby +TokenFactory: 0x9d492648900c2E785C00cA90f3945025d99D6EB0 + +--- + +Time: 2022-06-22T15:41:08.083Z +Commit: [132e9fd914f30ed750f9730631283589ddb361cd](https://github.com/aragon/osx/commit/132e9fd914f30ed750f9730631283589ddb361cd) +Network: rinkeby DAOFactory: 0xF4433059cb12E224EF33510a3bE3329c8c750fD8 Registry: 0xFdB98b110f8c8a5a79F903304014fC726b3f2A75 -TokenFactory: 0x841d1Cd625135d0EC53cFF2A3D9F943ace9CF9bA - ---- - -Time: 2022-05-18T12:54:06.081Z -Commit: [9030920927c7367265c6b9aa1082368bcf17301a](https://github.com/aragon/osx/commit/9030920927c7367265c6b9aa1082368bcf17301a) -Network: arbitrum-rinkeby +TokenFactory: 0x841d1Cd625135d0EC53cFF2A3D9F943ace9CF9bA + +--- + +Time: 2022-05-18T12:54:06.081Z +Commit: [9030920927c7367265c6b9aa1082368bcf17301a](https://github.com/aragon/osx/commit/9030920927c7367265c6b9aa1082368bcf17301a) +Network: arbitrum-rinkeby DAOFactory: 0x04787AB72C98f7bE20fCfC132ff5dfd452C67081 Registry: 0x1BcA3c46A88b5Ba1B80B2948037Fa47dbD92E53e -TokenFactory: 0x2a8f09684a8bCbA13E3d186F10ef08db15F0f47C - ---- - -Time: 2022-05-18T12:54:06.086Z -Commit: [9030920927c7367265c6b9aa1082368bcf17301a](https://github.com/aragon/osx/commit/9030920927c7367265c6b9aa1082368bcf17301a) -Network: mumbai +TokenFactory: 0x2a8f09684a8bCbA13E3d186F10ef08db15F0f47C + +--- + +Time: 2022-05-18T12:54:06.086Z +Commit: [9030920927c7367265c6b9aa1082368bcf17301a](https://github.com/aragon/osx/commit/9030920927c7367265c6b9aa1082368bcf17301a) +Network: mumbai DAOFactory: 0xCb7631ab66110fD2799f07de8a9cA0677670554b Registry: 0x02cFdae148b0FED1902eC241988D917419163f63 -TokenFactory: 0x00ae6faCc6Fa8851725D34024F621D2a17530Fb4 - ---- - -Time: 2022-05-18T12:54:06.089Z -Commit: [9030920927c7367265c6b9aa1082368bcf17301a](https://github.com/aragon/osx/commit/9030920927c7367265c6b9aa1082368bcf17301a) -Network: rinkeby +TokenFactory: 0x00ae6faCc6Fa8851725D34024F621D2a17530Fb4 + +--- + +Time: 2022-05-18T12:54:06.089Z +Commit: [9030920927c7367265c6b9aa1082368bcf17301a](https://github.com/aragon/osx/commit/9030920927c7367265c6b9aa1082368bcf17301a) +Network: rinkeby DAOFactory: 0x2290E6dF695C5272cE942015c90aAe24bFB94960 Registry: 0x5895B0B32d438f85872b164AE967B3E802d33750 -TokenFactory: 0x84641573c077F12C73bd2612fe1d96AE58bE7D1a - ---- - -Time: 2022-05-18T12:29:44.709Z -Commit: [b1d7fee68c65adfc3c564df2ec4474bfcf90d38c](https://github.com/aragon/osx/commit/b1d7fee68c65adfc3c564df2ec4474bfcf90d38c) -Network: arbitrum-rinkeby +TokenFactory: 0x84641573c077F12C73bd2612fe1d96AE58bE7D1a + +--- + +Time: 2022-05-18T12:29:44.709Z +Commit: [b1d7fee68c65adfc3c564df2ec4474bfcf90d38c](https://github.com/aragon/osx/commit/b1d7fee68c65adfc3c564df2ec4474bfcf90d38c) +Network: arbitrum-rinkeby DAOFactory: 0xce1EB68b54d026781f92957bAB583EEa62f27344 Registry: 0x00ae6faCc6Fa8851725D34024F621D2a17530Fb4 -TokenFactory: 0xCb7631ab66110fD2799f07de8a9cA0677670554b - ---- - -Time: 2022-05-18T12:29:44.713Z -Commit: [b1d7fee68c65adfc3c564df2ec4474bfcf90d38c](https://github.com/aragon/osx/commit/b1d7fee68c65adfc3c564df2ec4474bfcf90d38c) -Network: mumbai +TokenFactory: 0xCb7631ab66110fD2799f07de8a9cA0677670554b + +--- + +Time: 2022-05-18T12:29:44.713Z +Commit: [b1d7fee68c65adfc3c564df2ec4474bfcf90d38c](https://github.com/aragon/osx/commit/b1d7fee68c65adfc3c564df2ec4474bfcf90d38c) +Network: mumbai DAOFactory: 0x325F8c55A1A8C223aA7C8e3903Cf7079524706Aa Registry: 0xB88fE875623E33BFDa76A517e9d5DC2023995f73 -TokenFactory: 0x9d4669361461443eB25A29b79C68C8AC906D8cC1 - ---- - -Time: 2022-05-18T12:29:44.717Z -Commit: [b1d7fee68c65adfc3c564df2ec4474bfcf90d38c](https://github.com/aragon/osx/commit/b1d7fee68c65adfc3c564df2ec4474bfcf90d38c) -Network: rinkeby +TokenFactory: 0x9d4669361461443eB25A29b79C68C8AC906D8cC1 + +--- + +Time: 2022-05-18T12:29:44.717Z +Commit: [b1d7fee68c65adfc3c564df2ec4474bfcf90d38c](https://github.com/aragon/osx/commit/b1d7fee68c65adfc3c564df2ec4474bfcf90d38c) +Network: rinkeby DAOFactory: 0xC234cb557F7a45207FFCC3575FD4eE1C165055B1 Registry: 0x99C7D164fcd6a6F11E0C11fC7e932D285b7F08aB -TokenFactory: 0xDBEf66fA86d8E7173d28C310c5b2C96D603C6F48 - ---- - -Time: 2022-05-16T21:35:49.676Z -Commit: [deae304e1b87d0b60f4d69c32d762296ff0c71ff](https://github.com/aragon/osx/commit/deae304e1b87d0b60f4d69c32d762296ff0c71ff) -Network: arbitrum-rinkeby +TokenFactory: 0xDBEf66fA86d8E7173d28C310c5b2C96D603C6F48 + +--- + +Time: 2022-05-16T21:35:49.676Z +Commit: [deae304e1b87d0b60f4d69c32d762296ff0c71ff](https://github.com/aragon/osx/commit/deae304e1b87d0b60f4d69c32d762296ff0c71ff) +Network: arbitrum-rinkeby DAOFactory: 0x9d4669361461443eB25A29b79C68C8AC906D8cC1 Registry: 0xAAAb8c6b83a5C7b1462af4427d97b33197388C38 -TokenFactory: 0xB88fE875623E33BFDa76A517e9d5DC2023995f73 - ---- - -Time: 2022-05-16T21:35:49.680Z -Commit: [deae304e1b87d0b60f4d69c32d762296ff0c71ff](https://github.com/aragon/osx/commit/deae304e1b87d0b60f4d69c32d762296ff0c71ff) -Network: mumbai +TokenFactory: 0xB88fE875623E33BFDa76A517e9d5DC2023995f73 + +--- + +Time: 2022-05-16T21:35:49.680Z +Commit: [deae304e1b87d0b60f4d69c32d762296ff0c71ff](https://github.com/aragon/osx/commit/deae304e1b87d0b60f4d69c32d762296ff0c71ff) +Network: mumbai DAOFactory: 0x246503df057A9a85E0144b6867a828c99676128B Registry: 0xBa48CE7E1a29c3E43ad2C46D2defd4Ef6BB8CD88 -TokenFactory: 0x56ce4D8006292Abf418291FaE813C1E3769240A4 - ---- - -Time: 2022-05-16T21:35:49.684Z -Commit: [deae304e1b87d0b60f4d69c32d762296ff0c71ff](https://github.com/aragon/osx/commit/deae304e1b87d0b60f4d69c32d762296ff0c71ff) -Network: rinkeby +TokenFactory: 0x56ce4D8006292Abf418291FaE813C1E3769240A4 + +--- + +Time: 2022-05-16T21:35:49.684Z +Commit: [deae304e1b87d0b60f4d69c32d762296ff0c71ff](https://github.com/aragon/osx/commit/deae304e1b87d0b60f4d69c32d762296ff0c71ff) +Network: rinkeby DAOFactory: 0x971571f70638B09E7488C33c8ed6cC9eE90c946c Registry: 0xB22F1918E444c95F3C98595725884c28183714fB -TokenFactory: 0x4d35922def435b32b3c9f262754410EB30c1D296 - ---- - -Time: 2022-05-16T07:47:45.181Z -Commit: [66bfe6fcc71bd4f8209db0b8bfe0e3a1aa0183b1](https://github.com/aragon/osx/commit/66bfe6fcc71bd4f8209db0b8bfe0e3a1aa0183b1) -Network: arbitrum-rinkeby +TokenFactory: 0x4d35922def435b32b3c9f262754410EB30c1D296 + +--- + +Time: 2022-05-16T07:47:45.181Z +Commit: [66bfe6fcc71bd4f8209db0b8bfe0e3a1aa0183b1](https://github.com/aragon/osx/commit/66bfe6fcc71bd4f8209db0b8bfe0e3a1aa0183b1) +Network: arbitrum-rinkeby DAOFactory: 0xA2c6c82e327954979792d696Bf2cFbC2Ba16Ba80 Registry: 0x740eA36d08A3a2A583234c7416899D40051c698f -TokenFactory: 0x2a4B34fB0C2064C4784d98b48AD5f594Dd8191F3 - ---- - -Time: 2022-05-16T07:47:45.186Z -Commit: [66bfe6fcc71bd4f8209db0b8bfe0e3a1aa0183b1](https://github.com/aragon/osx/commit/66bfe6fcc71bd4f8209db0b8bfe0e3a1aa0183b1) -Network: mumbai +TokenFactory: 0x2a4B34fB0C2064C4784d98b48AD5f594Dd8191F3 + +--- + +Time: 2022-05-16T07:47:45.186Z +Commit: [66bfe6fcc71bd4f8209db0b8bfe0e3a1aa0183b1](https://github.com/aragon/osx/commit/66bfe6fcc71bd4f8209db0b8bfe0e3a1aa0183b1) +Network: mumbai DAOFactory: 0xE6eAAa5Fde32f5827175FEc20d04551a9C67563B Registry: 0x089Bf74E902A0DA68c756585cf277720bF31CbB1 -TokenFactory: 0xbda31B34f09069DF702cC9eC7F27AEAFAA3a2ce7 - ---- - -Time: 2022-05-16T07:47:45.191Z -Commit: [66bfe6fcc71bd4f8209db0b8bfe0e3a1aa0183b1](https://github.com/aragon/osx/commit/66bfe6fcc71bd4f8209db0b8bfe0e3a1aa0183b1) -Network: rinkeby +TokenFactory: 0xbda31B34f09069DF702cC9eC7F27AEAFAA3a2ce7 + +--- + +Time: 2022-05-16T07:47:45.191Z +Commit: [66bfe6fcc71bd4f8209db0b8bfe0e3a1aa0183b1](https://github.com/aragon/osx/commit/66bfe6fcc71bd4f8209db0b8bfe0e3a1aa0183b1) +Network: rinkeby DAOFactory: 0xDbb359eA1d5734eDba168b070309347FfA9Eab3e Registry: 0x324322A9d61AA0585Db8721d6Ee9b2dC3CB9FF53 -TokenFactory: 0xcDbC588740854c24EF8edd50d91d3E511f984501 - ---- - -Time: 2022-05-10T12:19:29.503Z -Commit: [0d91a20e1fc6119814d860e5bf18451a9ffc9e58](https://github.com/aragon/osx/commit/0d91a20e1fc6119814d860e5bf18451a9ffc9e58) -Network: arbitrum-rinkeby +TokenFactory: 0xcDbC588740854c24EF8edd50d91d3E511f984501 + +--- + +Time: 2022-05-10T12:19:29.503Z +Commit: [0d91a20e1fc6119814d860e5bf18451a9ffc9e58](https://github.com/aragon/osx/commit/0d91a20e1fc6119814d860e5bf18451a9ffc9e58) +Network: arbitrum-rinkeby DAOFactory: 0xCC925a32fA4fa41c42a7d5585D69C980b6Fa9342 Registry: 0x392f0FdfF3283b9f026CfFeC7f9c2De443af3E7C -TokenFactory: 0x868581Ee5991C6C08D2467132698fa4AB6C9c272 - ---- - -Time: 2022-05-10T12:19:29.509Z -Commit: [0d91a20e1fc6119814d860e5bf18451a9ffc9e58](https://github.com/aragon/osx/commit/0d91a20e1fc6119814d860e5bf18451a9ffc9e58) -Network: mumbai +TokenFactory: 0x868581Ee5991C6C08D2467132698fa4AB6C9c272 + +--- + +Time: 2022-05-10T12:19:29.509Z +Commit: [0d91a20e1fc6119814d860e5bf18451a9ffc9e58](https://github.com/aragon/osx/commit/0d91a20e1fc6119814d860e5bf18451a9ffc9e58) +Network: mumbai DAOFactory: 0x70080B0775C0898327F9557b03a9Ff7B10238429 Registry: 0x009e285A017f5cd0382dcD58a70Fe5F255Cc785c -TokenFactory: 0x54Db969d1423CF089025bc21308c921Ad9B842F1 - ---- - -Time: 2022-05-10T12:19:29.514Z -Commit: [0d91a20e1fc6119814d860e5bf18451a9ffc9e58](https://github.com/aragon/osx/commit/0d91a20e1fc6119814d860e5bf18451a9ffc9e58) -Network: rinkeby +TokenFactory: 0x54Db969d1423CF089025bc21308c921Ad9B842F1 + +--- + +Time: 2022-05-10T12:19:29.514Z +Commit: [0d91a20e1fc6119814d860e5bf18451a9ffc9e58](https://github.com/aragon/osx/commit/0d91a20e1fc6119814d860e5bf18451a9ffc9e58) +Network: rinkeby DAOFactory: 0x705aC33fBC258081CA03beBbc4049b6f4Ff2d5a4 Registry: 0xabF0792869D4dEEaEeCD14238c41578eB112183c -TokenFactory: 0x9f0452337D4b39b81610B29ddcEa68F42Cc4e142 - ---- - -Time: 2022-04-27T15:38:32.596Z -Commit: [dfb15306c22145fd0fdcedf1704f5df2e14a9502](https://github.com/aragon/osx/commit/dfb15306c22145fd0fdcedf1704f5df2e14a9502) -Network: arbitrum-rinkeby +TokenFactory: 0x9f0452337D4b39b81610B29ddcEa68F42Cc4e142 + +--- + +Time: 2022-04-27T15:38:32.596Z +Commit: [dfb15306c22145fd0fdcedf1704f5df2e14a9502](https://github.com/aragon/osx/commit/dfb15306c22145fd0fdcedf1704f5df2e14a9502) +Network: arbitrum-rinkeby DAOFactory: 0x76d72457990e07dd889Bd8F19a02feB89d11A946 Registry: 0xBB1F7ACf2068Ec3F669FDCB4d0Ad9a70E3E418d6 -TokenFactory: 0x78E839210aa3072ce638A2d6b08DA611ca361A0E - ---- - -Time: 2022-04-27T15:38:32.600Z -Commit: [dfb15306c22145fd0fdcedf1704f5df2e14a9502](https://github.com/aragon/osx/commit/dfb15306c22145fd0fdcedf1704f5df2e14a9502) -Network: mumbai +TokenFactory: 0x78E839210aa3072ce638A2d6b08DA611ca361A0E + +--- + +Time: 2022-04-27T15:38:32.600Z +Commit: [dfb15306c22145fd0fdcedf1704f5df2e14a9502](https://github.com/aragon/osx/commit/dfb15306c22145fd0fdcedf1704f5df2e14a9502) +Network: mumbai DAOFactory: 0xB815791c233807D39b7430127975244B36C19C8e Registry: 0x7870837ffe670E62d4e601393D454f1b8649F7f9 -TokenFactory: 0x58cd7d773389F68250338C13A1BB5662CFBd0C9A - ---- - -Time: 2022-04-27T15:38:32.603Z -Commit: [dfb15306c22145fd0fdcedf1704f5df2e14a9502](https://github.com/aragon/osx/commit/dfb15306c22145fd0fdcedf1704f5df2e14a9502) -Network: rinkeby +TokenFactory: 0x58cd7d773389F68250338C13A1BB5662CFBd0C9A + +--- + +Time: 2022-04-27T15:38:32.603Z +Commit: [dfb15306c22145fd0fdcedf1704f5df2e14a9502](https://github.com/aragon/osx/commit/dfb15306c22145fd0fdcedf1704f5df2e14a9502) +Network: rinkeby DAOFactory: 0x806555bEa94Dd7FF47f250AC8913F3942eDCf2B6 Registry: 0xc08Ab8CebC502d35f7Fe5806CaE6cF0431eC1d36 -TokenFactory: 0xF52346Ea8F60c351B96377Dd7d51358dE1A0C9eB - ---- - -Time: 2022-04-27T15:14:24.792Z -Commit: [a0d726d8523022abc4caf006ef29233de14ffac3](https://github.com/aragon/osx/commit/a0d726d8523022abc4caf006ef29233de14ffac3) -Network: arbitrum-rinkeby +TokenFactory: 0xF52346Ea8F60c351B96377Dd7d51358dE1A0C9eB + +--- + +Time: 2022-04-27T15:14:24.792Z +Commit: [a0d726d8523022abc4caf006ef29233de14ffac3](https://github.com/aragon/osx/commit/a0d726d8523022abc4caf006ef29233de14ffac3) +Network: arbitrum-rinkeby DAOFactory: 0xD47f4ea555FFe3A16Bb997e90C2c4A51CC6d823A Registry: 0x7DC8d6d35070A13192C754CF96CB046615f2a3E0 -TokenFactory: 0x91f190a6f6E38042e3398B3f78Eb7e0AF58Ac8c3 - ---- - -Time: 2022-04-27T15:14:24.797Z -Commit: [a0d726d8523022abc4caf006ef29233de14ffac3](https://github.com/aragon/osx/commit/a0d726d8523022abc4caf006ef29233de14ffac3) -Network: mumbai +TokenFactory: 0x91f190a6f6E38042e3398B3f78Eb7e0AF58Ac8c3 + +--- + +Time: 2022-04-27T15:14:24.797Z +Commit: [a0d726d8523022abc4caf006ef29233de14ffac3](https://github.com/aragon/osx/commit/a0d726d8523022abc4caf006ef29233de14ffac3) +Network: mumbai DAOFactory: 0xd8C229F3644576b200319cB3919B0E87716f47d8 Registry: 0xda2bAb5554a6f5e655cD0A1B46dcAFBb39742334 -TokenFactory: 0xC8109e7B790346F662C6e4ef2bA863a9700cA8Eb - ---- - -Time: 2022-04-27T15:14:24.800Z -Commit: [a0d726d8523022abc4caf006ef29233de14ffac3](https://github.com/aragon/osx/commit/a0d726d8523022abc4caf006ef29233de14ffac3) -Network: rinkeby +TokenFactory: 0xC8109e7B790346F662C6e4ef2bA863a9700cA8Eb + +--- + +Time: 2022-04-27T15:14:24.800Z +Commit: [a0d726d8523022abc4caf006ef29233de14ffac3](https://github.com/aragon/osx/commit/a0d726d8523022abc4caf006ef29233de14ffac3) +Network: rinkeby DAOFactory: 0x9d492648900c2E785C00cA90f3945025d99D6EB0 Registry: 0x246780ba3A9b4166da770e310442Dee830E4E409 -TokenFactory: 0x744c5d61354aD6bC7c40C84766e9f4e56f4017bC - ---- - -Time: 2022-04-26T12:31:07.037Z -Commit: [662cb58bb14a743fc93ed2e8fbd249e3ee5168b3](https://github.com/aragon/osx/commit/662cb58bb14a743fc93ed2e8fbd249e3ee5168b3) -Network: arbitrum-rinkeby +TokenFactory: 0x744c5d61354aD6bC7c40C84766e9f4e56f4017bC + +--- + +Time: 2022-04-26T12:31:07.037Z +Commit: [662cb58bb14a743fc93ed2e8fbd249e3ee5168b3](https://github.com/aragon/osx/commit/662cb58bb14a743fc93ed2e8fbd249e3ee5168b3) +Network: arbitrum-rinkeby DAOFactory: 0x7F5F2BB64efD9c542F26ABa34D59e1895FcDF69D Registry: 0x198b64a53b39f454e56626d9262cBf67E7C13138 -TokenFactory: 0x49e04AB7af7A263b8ac802c1cAe22f5b4E4577Cd - ---- - -Time: 2022-04-26T12:31:07.042Z -Commit: [662cb58bb14a743fc93ed2e8fbd249e3ee5168b3](https://github.com/aragon/osx/commit/662cb58bb14a743fc93ed2e8fbd249e3ee5168b3) -Network: mumbai +TokenFactory: 0x49e04AB7af7A263b8ac802c1cAe22f5b4E4577Cd + +--- + +Time: 2022-04-26T12:31:07.042Z +Commit: [662cb58bb14a743fc93ed2e8fbd249e3ee5168b3](https://github.com/aragon/osx/commit/662cb58bb14a743fc93ed2e8fbd249e3ee5168b3) +Network: mumbai DAOFactory: 0x3E773BCb6a8C5ED2f23BF167284DF45D9A550fF6 Registry: 0x1B6632D1357D26055D6452E3b3BEBd1c1d982e86 -TokenFactory: 0x6095b5004c59301f8Bb98768Bd395d0bc637C893 - ---- - -Time: 2022-04-26T12:31:07.047Z -Commit: [662cb58bb14a743fc93ed2e8fbd249e3ee5168b3](https://github.com/aragon/osx/commit/662cb58bb14a743fc93ed2e8fbd249e3ee5168b3) -Network: rinkeby +TokenFactory: 0x6095b5004c59301f8Bb98768Bd395d0bc637C893 + +--- + +Time: 2022-04-26T12:31:07.047Z +Commit: [662cb58bb14a743fc93ed2e8fbd249e3ee5168b3](https://github.com/aragon/osx/commit/662cb58bb14a743fc93ed2e8fbd249e3ee5168b3) +Network: rinkeby DAOFactory: 0x04787AB72C98f7bE20fCfC132ff5dfd452C67081 Registry: 0x1BcA3c46A88b5Ba1B80B2948037Fa47dbD92E53e -TokenFactory: 0x2a8f09684a8bCbA13E3d186F10ef08db15F0f47C - ---- - -Time: 2022-04-19T12:08:03.515Z -Commit: [e6f6463d8ffde7330fd2ab6365f4299968dcbf13](https://github.com/aragon/osx/commit/e6f6463d8ffde7330fd2ab6365f4299968dcbf13) -Network: arbitrum-rinkeby +TokenFactory: 0x2a8f09684a8bCbA13E3d186F10ef08db15F0f47C + +--- + +Time: 2022-04-19T12:08:03.515Z +Commit: [e6f6463d8ffde7330fd2ab6365f4299968dcbf13](https://github.com/aragon/osx/commit/e6f6463d8ffde7330fd2ab6365f4299968dcbf13) +Network: arbitrum-rinkeby DAOFactory: 0x139c6995B2a74A43a8eDcE0B541C23f2Dfb5D921 Registry: 0x818428f875943eE7c0366de1AAa174a1225dC4eA -TokenFactory: 0xDf433DA72bE56aCFF3eB1205A0f9eBFf602A547B - ---- - -Time: 2022-04-19T12:08:03.519Z -Commit: [e6f6463d8ffde7330fd2ab6365f4299968dcbf13](https://github.com/aragon/osx/commit/e6f6463d8ffde7330fd2ab6365f4299968dcbf13) -Network: mumbai +TokenFactory: 0xDf433DA72bE56aCFF3eB1205A0f9eBFf602A547B + +--- + +Time: 2022-04-19T12:08:03.519Z +Commit: [e6f6463d8ffde7330fd2ab6365f4299968dcbf13](https://github.com/aragon/osx/commit/e6f6463d8ffde7330fd2ab6365f4299968dcbf13) +Network: mumbai DAOFactory: 0x91a851E9Ed7F2c6d41b15F76e4a88f5A37067cC9 Registry: 0xB5eB5C011827C9F5787ceE3Abc72d247E36a5a0D -TokenFactory: 0xE47C0B1Ea698F2914b6CC218cdC3A5Ca4FAcff18 - ---- - -Time: 2022-04-19T12:08:03.523Z -Commit: [e6f6463d8ffde7330fd2ab6365f4299968dcbf13](https://github.com/aragon/osx/commit/e6f6463d8ffde7330fd2ab6365f4299968dcbf13) -Network: rinkeby +TokenFactory: 0xE47C0B1Ea698F2914b6CC218cdC3A5Ca4FAcff18 + +--- + +Time: 2022-04-19T12:08:03.523Z +Commit: [e6f6463d8ffde7330fd2ab6365f4299968dcbf13](https://github.com/aragon/osx/commit/e6f6463d8ffde7330fd2ab6365f4299968dcbf13) +Network: rinkeby DAOFactory: 0x4148503aDd81CFCA3768fA28F12bb4DC6E5Ac053 Registry: 0x6DA8932099aa64aE0083E7648cE4010467822472 -TokenFactory: 0x9e51Fa051c4aB868a7dAAfa6F417e8AF80afA3C7 - ---- - -Time: 2022-04-14T08:34:55.985Z -Commit: [ce24d725e29a02ea709b8c9471dd8cb87765a2ed](https://github.com/aragon/osx/commit/ce24d725e29a02ea709b8c9471dd8cb87765a2ed) -Network: arbitrum-rinkeby +TokenFactory: 0x9e51Fa051c4aB868a7dAAfa6F417e8AF80afA3C7 + +--- + +Time: 2022-04-14T08:34:55.985Z +Commit: [ce24d725e29a02ea709b8c9471dd8cb87765a2ed](https://github.com/aragon/osx/commit/ce24d725e29a02ea709b8c9471dd8cb87765a2ed) +Network: arbitrum-rinkeby DAOFactory: 0x9bD1EF0C495F6b078d9A82586A35F4d623384E97 Registry: 0xE3625B9Ed80306f590Dcf8a0d50b193F28DB969E -TokenFactory: 0x09AF4b83A9a7EA682A2Eb61d1d0B9e89103b1A06 - ---- - -Time: 2022-04-14T08:34:55.989Z -Commit: [ce24d725e29a02ea709b8c9471dd8cb87765a2ed](https://github.com/aragon/osx/commit/ce24d725e29a02ea709b8c9471dd8cb87765a2ed) -Network: mumbai +TokenFactory: 0x09AF4b83A9a7EA682A2Eb61d1d0B9e89103b1A06 + +--- + +Time: 2022-04-14T08:34:55.989Z +Commit: [ce24d725e29a02ea709b8c9471dd8cb87765a2ed](https://github.com/aragon/osx/commit/ce24d725e29a02ea709b8c9471dd8cb87765a2ed) +Network: mumbai DAOFactory: 0x21D9B7b3D7280e9DA46769f79FffEC4cdf64D1cc Registry: 0x76d72457990e07dd889Bd8F19a02feB89d11A946 -TokenFactory: 0xeB98a71d69a1e12B62c10368D9dA5364CE0f7178 - ---- - -Time: 2022-04-14T08:34:55.993Z -Commit: [ce24d725e29a02ea709b8c9471dd8cb87765a2ed](https://github.com/aragon/osx/commit/ce24d725e29a02ea709b8c9471dd8cb87765a2ed) -Network: rinkeby +TokenFactory: 0xeB98a71d69a1e12B62c10368D9dA5364CE0f7178 + +--- + +Time: 2022-04-14T08:34:55.993Z +Commit: [ce24d725e29a02ea709b8c9471dd8cb87765a2ed](https://github.com/aragon/osx/commit/ce24d725e29a02ea709b8c9471dd8cb87765a2ed) +Network: rinkeby DAOFactory: 0x20c5D7c7E4417346f3649c5d54f9F8e8cC8b9de3 Registry: 0xCb7631ab66110fD2799f07de8a9cA0677670554b -TokenFactory: 0xce1EB68b54d026781f92957bAB583EEa62f27344 - ---- - -Time: 2022-04-13T11:30:33.325Z -Commit: [57587091968f1abb5c34661ac3f18297c3be2e65](https://github.com/aragon/osx/commit/57587091968f1abb5c34661ac3f18297c3be2e65) -Network: arbitrum-rinkeby +TokenFactory: 0xce1EB68b54d026781f92957bAB583EEa62f27344 + +--- + +Time: 2022-04-13T11:30:33.325Z +Commit: [57587091968f1abb5c34661ac3f18297c3be2e65](https://github.com/aragon/osx/commit/57587091968f1abb5c34661ac3f18297c3be2e65) +Network: arbitrum-rinkeby DAOFactory: 0xD63A8Cfb0eec960C3e70F96a9e3F3091f3FD70b6 Registry: 0x264308C03feAfA071C97b73b09E911530CCCd216 -TokenFactory: 0x82aBAfBf46759358c705c7E323543A7Be47AbAf0 - +TokenFactory: 0x82aBAfBf46759358c705c7E323543A7Be47AbAf0 + --- Time: 2022-04-13T11:30:33.330Z diff --git a/packages/contracts/deploy/helpers.ts b/packages/contracts/deploy/helpers.ts index 1da2a19b0..1a810986e 100644 --- a/packages/contracts/deploy/helpers.ts +++ b/packages/contracts/deploy/helpers.ts @@ -1,12 +1,3 @@ -import {promises as fs} from 'fs'; -import {ethers} from 'hardhat'; -import {Contract} from 'ethers'; -import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; -import {HardhatRuntimeEnvironment} from 'hardhat/types'; -import IPFS from 'ipfs-http-client'; - -import {findEvent, findEventTopicLog} from '../utils/event'; -import {Operation} from '../utils/types'; import {VersionTag} from '../test/test-utils/psp/types'; import { ENSRegistry__factory, @@ -16,6 +7,14 @@ import { } from '../typechain'; import {VersionCreatedEvent} from '../typechain/PluginRepo'; import {PluginRepoRegisteredEvent} from '../typechain/PluginRepoRegistry'; +import {findEvent, findEventTopicLog} from '../utils/event'; +import {Operation} from '../utils/types'; +import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; +import {Contract} from 'ethers'; +import {promises as fs} from 'fs'; +import {ethers} from 'hardhat'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; +import IPFS from 'ipfs-http-client'; // TODO: Add support for L2 such as Arbitrum. (https://discuss.ens.domains/t/register-using-layer-2/688) // Make sure you own the ENS set in the {{NETWORK}}_ENS_DOMAIN variable in .env diff --git a/packages/contracts/deploy/new/00_managing-dao/00_managing-dao.ts b/packages/contracts/deploy/new/00_managing-dao/00_managing-dao.ts index 20e450a81..eecc22fbc 100644 --- a/packages/contracts/deploy/new/00_managing-dao/00_managing-dao.ts +++ b/packages/contracts/deploy/new/00_managing-dao/00_managing-dao.ts @@ -1,7 +1,7 @@ -import {HardhatRuntimeEnvironment} from 'hardhat/types'; +import daoArtifactJson from '../../../artifacts/src/core/dao/DAO.sol/DAO.json'; import {ArtifactData, DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; -import daoArtifactJson from '../../../artifacts/src/core/dao/DAO.sol/DAO.json'; /** NOTE: * Create a (Managing DAO) with no Plugin, to be the owner DAO for the framework, temporarily. */ diff --git a/packages/contracts/deploy/new/00_managing-dao/01_managing-dao-permissions.ts b/packages/contracts/deploy/new/00_managing-dao/01_managing-dao-permissions.ts index a762b609d..4526d6b35 100644 --- a/packages/contracts/deploy/new/00_managing-dao/01_managing-dao-permissions.ts +++ b/packages/contracts/deploy/new/00_managing-dao/01_managing-dao-permissions.ts @@ -1,10 +1,8 @@ -import {DeployFunction} from 'hardhat-deploy/types'; -import {HardhatRuntimeEnvironment} from 'hardhat/types'; - +import {DAO__factory} from '../../../typechain'; import {Operation} from '../../../utils/types'; - import {getContractAddress, managePermissions} from '../../helpers'; -import {DAO__factory} from '../../../typechain'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const {ethers} = hre; diff --git a/packages/contracts/deploy/new/00_managing-dao/20_set-dao-permission.ts b/packages/contracts/deploy/new/00_managing-dao/20_set-dao-permission.ts index 3e812f2e3..9b3adf3df 100644 --- a/packages/contracts/deploy/new/00_managing-dao/20_set-dao-permission.ts +++ b/packages/contracts/deploy/new/00_managing-dao/20_set-dao-permission.ts @@ -1,13 +1,12 @@ -import {HardhatRuntimeEnvironment} from 'hardhat/types'; -import {DeployFunction} from 'hardhat-deploy/types'; - +import {DAO__factory} from '../../../typechain'; import {Operation} from '../../../utils/types'; import { DAO_PERMISSIONS, getContractAddress, managePermissions, } from '../../helpers'; -import {DAO__factory} from '../../../typechain'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { console.log('\nSetting ManagingDao permissions.'); diff --git a/packages/contracts/deploy/new/00_managing-dao/99_verify_step.ts b/packages/contracts/deploy/new/00_managing-dao/99_verify_step.ts index 30b4dc7ec..e403bcea0 100644 --- a/packages/contracts/deploy/new/00_managing-dao/99_verify_step.ts +++ b/packages/contracts/deploy/new/00_managing-dao/99_verify_step.ts @@ -1,13 +1,12 @@ -import {DeployFunction} from 'hardhat-deploy/types'; -import {HardhatRuntimeEnvironment} from 'hardhat/types'; - +import {DAO__factory} from '../../../typechain'; import {Operation} from '../../../utils/types'; import { checkPermission, DAO_PERMISSIONS, getContractAddress, } from '../../helpers'; -import {DAO__factory} from '../../../typechain'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { console.log('\nVerifying managing DAO deployment.'); diff --git a/packages/contracts/deploy/new/10_framework/00_ens_registry.ts b/packages/contracts/deploy/new/10_framework/00_ens_registry.ts index e0be1211c..fb1a4867a 100644 --- a/packages/contracts/deploy/new/10_framework/00_ens_registry.ts +++ b/packages/contracts/deploy/new/10_framework/00_ens_registry.ts @@ -1,9 +1,7 @@ -import {HardhatRuntimeEnvironment} from 'hardhat/types'; -import {DeployFunction} from 'hardhat-deploy/types'; - import {setupENS} from '../../../utils/ens'; - import {ENS_ADDRESSES} from '../../helpers'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; // Make sure you own the ENS set in the {{NETWORK}}_ENS_DOMAIN variable in .env const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { diff --git a/packages/contracts/deploy/new/10_framework/01_ens_subdomains.ts b/packages/contracts/deploy/new/10_framework/01_ens_subdomains.ts index 7099a40ff..9b8ddf4b5 100644 --- a/packages/contracts/deploy/new/10_framework/01_ens_subdomains.ts +++ b/packages/contracts/deploy/new/10_framework/01_ens_subdomains.ts @@ -1,5 +1,4 @@ -import {DeployFunction} from 'hardhat-deploy/types'; -import {HardhatRuntimeEnvironment} from 'hardhat/types'; +import {ENSRegistry__factory} from '../../../typechain'; import { getContractAddress, getENSAddress, @@ -7,7 +6,8 @@ import { registerSubnodeRecord, transferSubnodeChain, } from '../../helpers'; -import {ENSRegistry__factory} from '../../../typechain'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const {ethers, network} = hre; diff --git a/packages/contracts/deploy/new/10_framework/02_ens_subdomain_registrars.ts b/packages/contracts/deploy/new/10_framework/02_ens_subdomain_registrars.ts index 878a21c47..767c72333 100644 --- a/packages/contracts/deploy/new/10_framework/02_ens_subdomain_registrars.ts +++ b/packages/contracts/deploy/new/10_framework/02_ens_subdomain_registrars.ts @@ -1,9 +1,8 @@ -import {DeployFunction} from 'hardhat-deploy/types'; -import {HardhatRuntimeEnvironment} from 'hardhat/types'; +import ensSubdomainRegistrarArtifact from '../../../artifacts/src/framework/utils/ens/ENSSubdomainRegistrar.sol/ENSSubdomainRegistrar.json'; import {DAO__factory, ENSRegistry__factory} from '../../../typechain'; import {getContractAddress, getENSAddress} from '../../helpers'; - -import ensSubdomainRegistrarArtifact from '../../../artifacts/src/framework/utils/ens/ENSSubdomainRegistrar.sol/ENSSubdomainRegistrar.json'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const {deployments, ethers, network} = hre; diff --git a/packages/contracts/deploy/new/10_framework/10_dao-registry.ts b/packages/contracts/deploy/new/10_framework/10_dao-registry.ts index 41503b5a3..f6ffc89e6 100644 --- a/packages/contracts/deploy/new/10_framework/10_dao-registry.ts +++ b/packages/contracts/deploy/new/10_framework/10_dao-registry.ts @@ -1,8 +1,7 @@ -import {HardhatRuntimeEnvironment} from 'hardhat/types'; -import {DeployFunction} from 'hardhat-deploy/types'; -import {getContractAddress} from '../../helpers'; - import daoRegistryArtifact from '../../../artifacts/src/framework/dao/DAORegistry.sol/DAORegistry.json'; +import {getContractAddress} from '../../helpers'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const {deployments, ethers} = hre; diff --git a/packages/contracts/deploy/new/10_framework/20_plugin-repo-registry.ts b/packages/contracts/deploy/new/10_framework/20_plugin-repo-registry.ts index 0d582ec17..d9def73b2 100644 --- a/packages/contracts/deploy/new/10_framework/20_plugin-repo-registry.ts +++ b/packages/contracts/deploy/new/10_framework/20_plugin-repo-registry.ts @@ -1,9 +1,7 @@ -import {HardhatRuntimeEnvironment} from 'hardhat/types'; -import {DeployFunction} from 'hardhat-deploy/types'; - -import {getContractAddress} from '../../helpers'; - import pluginRepoRegistryArtifact from '../../../artifacts/src/framework/plugin/repo/PluginRepoRegistry.sol/PluginRepoRegistry.json'; +import {getContractAddress} from '../../helpers'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const {deployments, ethers} = hre; diff --git a/packages/contracts/deploy/new/10_framework/30_repo-factory.ts b/packages/contracts/deploy/new/10_framework/30_repo-factory.ts index 5f83998f6..0e6dd1f93 100644 --- a/packages/contracts/deploy/new/10_framework/30_repo-factory.ts +++ b/packages/contracts/deploy/new/10_framework/30_repo-factory.ts @@ -1,8 +1,7 @@ -import {HardhatRuntimeEnvironment} from 'hardhat/types'; -import {DeployFunction} from 'hardhat-deploy/types'; -import {getContractAddress} from '../../helpers'; - import pluginRepoFactoryArtifact from '../../../artifacts/src/framework/plugin/repo/PluginRepoFactory.sol/PluginRepoFactory.json'; +import {getContractAddress} from '../../helpers'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const {deployments, ethers} = hre; diff --git a/packages/contracts/deploy/new/10_framework/31_repo-factory_conclude.ts b/packages/contracts/deploy/new/10_framework/31_repo-factory_conclude.ts index 01bea1a80..998d32bcf 100644 --- a/packages/contracts/deploy/new/10_framework/31_repo-factory_conclude.ts +++ b/packages/contracts/deploy/new/10_framework/31_repo-factory_conclude.ts @@ -1,6 +1,6 @@ +import {PluginRepoFactory__factory} from '../../../typechain'; import {DeployFunction} from 'hardhat-deploy/types'; import {HardhatRuntimeEnvironment} from 'hardhat/types'; -import {PluginRepoFactory__factory} from '../../../typechain'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { console.log(`Concluding Plugin Repo Registry deployment.\n`); diff --git a/packages/contracts/deploy/new/10_framework/40_plugin_setup_processor.ts b/packages/contracts/deploy/new/10_framework/40_plugin_setup_processor.ts index 3fda88935..0d3b22236 100644 --- a/packages/contracts/deploy/new/10_framework/40_plugin_setup_processor.ts +++ b/packages/contracts/deploy/new/10_framework/40_plugin_setup_processor.ts @@ -1,8 +1,7 @@ -import {HardhatRuntimeEnvironment} from 'hardhat/types'; -import {DeployFunction} from 'hardhat-deploy/types'; -import {getContractAddress} from '../../helpers'; - import pluginSetupProcessorFactoryArtifact from '../../../artifacts/src/framework/plugin/setup/PluginSetupProcessor.sol/PluginSetupProcessor.json'; +import {getContractAddress} from '../../helpers'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const {deployments, ethers} = hre; diff --git a/packages/contracts/deploy/new/10_framework/50_dao-factory.ts b/packages/contracts/deploy/new/10_framework/50_dao-factory.ts index 43bbec0be..8bd54ee89 100644 --- a/packages/contracts/deploy/new/10_framework/50_dao-factory.ts +++ b/packages/contracts/deploy/new/10_framework/50_dao-factory.ts @@ -1,8 +1,7 @@ -import {HardhatRuntimeEnvironment} from 'hardhat/types'; -import {DeployFunction} from 'hardhat-deploy/types'; -import {getContractAddress} from '../../helpers'; - import daoFactoryArtifact from '../../../artifacts/src/framework/dao/DAOFactory.sol/DAOFactory.json'; +import {getContractAddress} from '../../helpers'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const {deployments, ethers} = hre; diff --git a/packages/contracts/deploy/new/10_framework/51_dao-factory-conclude.ts b/packages/contracts/deploy/new/10_framework/51_dao-factory-conclude.ts index 72d4f8542..29dea1a22 100644 --- a/packages/contracts/deploy/new/10_framework/51_dao-factory-conclude.ts +++ b/packages/contracts/deploy/new/10_framework/51_dao-factory-conclude.ts @@ -1,6 +1,6 @@ +import {DAOFactory__factory} from '../../../typechain'; import {DeployFunction} from 'hardhat-deploy/types'; import {HardhatRuntimeEnvironment} from 'hardhat/types'; -import {DAOFactory__factory} from '../../../typechain'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { console.log(`Concluding DAOFactory deployment.\n`); diff --git a/packages/contracts/deploy/new/10_framework/99_verifiy_step.ts b/packages/contracts/deploy/new/10_framework/99_verifiy_step.ts index 73faa823a..28ed06f72 100644 --- a/packages/contracts/deploy/new/10_framework/99_verifiy_step.ts +++ b/packages/contracts/deploy/new/10_framework/99_verifiy_step.ts @@ -1,7 +1,3 @@ -import {DeployFunction} from 'hardhat-deploy/types'; -import {HardhatRuntimeEnvironment} from 'hardhat/types'; - -import {checkSetManagingDao, getContractAddress} from '../../helpers'; import { DAOFactory__factory, DAORegistry__factory, @@ -11,6 +7,9 @@ import { PluginRepoRegistry__factory, PluginSetupProcessor__factory, } from '../../../typechain'; +import {checkSetManagingDao, getContractAddress} from '../../helpers'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { console.log('\nVerifying framework deployment.'); diff --git a/packages/contracts/deploy/new/20_permissions/00_ens-permissions.ts b/packages/contracts/deploy/new/20_permissions/00_ens-permissions.ts index be9740ac5..6f3a66aa5 100644 --- a/packages/contracts/deploy/new/20_permissions/00_ens-permissions.ts +++ b/packages/contracts/deploy/new/20_permissions/00_ens-permissions.ts @@ -1,9 +1,8 @@ -import {HardhatRuntimeEnvironment} from 'hardhat/types'; -import {DeployFunction} from 'hardhat-deploy/types'; - +import {DAO__factory} from '../../../typechain'; import {Operation} from '../../../utils/types'; import {getContractAddress, managePermissions} from '../../helpers'; -import {DAO__factory} from '../../../typechain'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { console.log(`\nSetting framework permission.`); diff --git a/packages/contracts/deploy/new/20_permissions/10_dao-registry-permissions.ts b/packages/contracts/deploy/new/20_permissions/10_dao-registry-permissions.ts index 78043d679..d7879da75 100644 --- a/packages/contracts/deploy/new/20_permissions/10_dao-registry-permissions.ts +++ b/packages/contracts/deploy/new/20_permissions/10_dao-registry-permissions.ts @@ -1,9 +1,8 @@ -import {HardhatRuntimeEnvironment} from 'hardhat/types'; -import {DeployFunction} from 'hardhat-deploy/types'; - +import {DAO__factory} from '../../../typechain'; import {Operation} from '../../../utils/types'; import {getContractAddress, managePermissions} from '../../helpers'; -import {DAO__factory} from '../../../typechain'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const {ethers} = hre; diff --git a/packages/contracts/deploy/new/20_permissions/20_plugin-registrty-permissions.ts b/packages/contracts/deploy/new/20_permissions/20_plugin-registrty-permissions.ts index 4b951ede4..9ce7d3bdb 100644 --- a/packages/contracts/deploy/new/20_permissions/20_plugin-registrty-permissions.ts +++ b/packages/contracts/deploy/new/20_permissions/20_plugin-registrty-permissions.ts @@ -1,9 +1,8 @@ -import {HardhatRuntimeEnvironment} from 'hardhat/types'; -import {DeployFunction} from 'hardhat-deploy/types'; - +import {DAO__factory} from '../../../typechain'; import {Operation} from '../../../utils/types'; import {getContractAddress, managePermissions} from '../../helpers'; -import {DAO__factory} from '../../../typechain'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const {ethers} = hre; diff --git a/packages/contracts/deploy/new/20_permissions/99_verify.ts b/packages/contracts/deploy/new/20_permissions/99_verify.ts index d7e236265..6a9f09a34 100644 --- a/packages/contracts/deploy/new/20_permissions/99_verify.ts +++ b/packages/contracts/deploy/new/20_permissions/99_verify.ts @@ -1,9 +1,8 @@ -import {DeployFunction} from 'hardhat-deploy/types'; -import {HardhatRuntimeEnvironment} from 'hardhat/types'; - +import {DAO__factory} from '../../../typechain'; import {Operation} from '../../../utils/types'; import {checkPermission, getContractAddress} from '../../helpers'; -import {DAO__factory} from '../../../typechain'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { console.log('\nVerifying permissions'); diff --git a/packages/contracts/deploy/new/30_plugins/00_plugin-setups/00_addresslist_voting_setup.ts b/packages/contracts/deploy/new/30_plugins/00_plugin-setups/00_addresslist_voting_setup.ts index 50e373994..288961d15 100644 --- a/packages/contracts/deploy/new/30_plugins/00_plugin-setups/00_addresslist_voting_setup.ts +++ b/packages/contracts/deploy/new/30_plugins/00_plugin-setups/00_addresslist_voting_setup.ts @@ -1,7 +1,6 @@ -import {HardhatRuntimeEnvironment} from 'hardhat/types'; -import {DeployFunction} from 'hardhat-deploy/types'; - import addresslistVotingSetupArtifact from '../../../../artifacts/src/plugins/governance/majority-voting/addresslist/AddresslistVotingSetup.sol/AddresslistVotingSetup.json'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { console.log(`\nDeploying plugins.`); diff --git a/packages/contracts/deploy/new/30_plugins/00_plugin-setups/01_addresslist_voting_setup_conclude.ts b/packages/contracts/deploy/new/30_plugins/00_plugin-setups/01_addresslist_voting_setup_conclude.ts index 7b078c9e2..182f9fbc9 100644 --- a/packages/contracts/deploy/new/30_plugins/00_plugin-setups/01_addresslist_voting_setup_conclude.ts +++ b/packages/contracts/deploy/new/30_plugins/00_plugin-setups/01_addresslist_voting_setup_conclude.ts @@ -1,7 +1,7 @@ +import {AddresslistVotingSetup__factory} from '../../../../typechain'; import {DeployFunction} from 'hardhat-deploy/types'; import {HardhatRuntimeEnvironment} from 'hardhat/types'; import {setTimeout} from 'timers/promises'; -import {AddresslistVotingSetup__factory} from '../../../../typechain'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { console.log(`Concluding addresslist voting setup deployment.\n`); diff --git a/packages/contracts/deploy/new/30_plugins/00_plugin-setups/10_token_voting_setup.ts b/packages/contracts/deploy/new/30_plugins/00_plugin-setups/10_token_voting_setup.ts index 400f53fde..d8983dbfa 100644 --- a/packages/contracts/deploy/new/30_plugins/00_plugin-setups/10_token_voting_setup.ts +++ b/packages/contracts/deploy/new/30_plugins/00_plugin-setups/10_token_voting_setup.ts @@ -1,10 +1,9 @@ -import {HardhatRuntimeEnvironment} from 'hardhat/types'; -import {DeployFunction} from 'hardhat-deploy/types'; - +import tokenVotingSetupArtifact from '../../../../artifacts/src/plugins/governance/majority-voting/token/TokenVotingSetup.sol/TokenVotingSetup.json'; import governanceERC20Artifact from '../../../../artifacts/src/token/ERC20/governance/GovernanceERC20.sol/GovernanceERC20.json'; import governanceWrappedERC20Artifact from '../../../../artifacts/src/token/ERC20/governance/GovernanceWrappedERC20.sol/GovernanceWrappedERC20.json'; -import tokenVotingSetupArtifact from '../../../../artifacts/src/plugins/governance/majority-voting/token/TokenVotingSetup.sol/TokenVotingSetup.json'; import {MintSettings} from '../../../../test/token/erc20/governance-erc20'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const {deployments, ethers} = hre; diff --git a/packages/contracts/deploy/new/30_plugins/00_plugin-setups/11_token_voting_setup_conclude.ts b/packages/contracts/deploy/new/30_plugins/00_plugin-setups/11_token_voting_setup_conclude.ts index 06bc45a78..fee214720 100644 --- a/packages/contracts/deploy/new/30_plugins/00_plugin-setups/11_token_voting_setup_conclude.ts +++ b/packages/contracts/deploy/new/30_plugins/00_plugin-setups/11_token_voting_setup_conclude.ts @@ -1,7 +1,7 @@ -import {DeployFunction} from 'hardhat-deploy/types'; import {TokenVotingSetup__factory} from '../../../../typechain'; -import {setTimeout} from 'timers/promises'; +import {DeployFunction} from 'hardhat-deploy/types'; import {HardhatRuntimeEnvironment} from 'hardhat/types'; +import {setTimeout} from 'timers/promises'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { console.log(`Concluding token voting setup deployment.\n`); diff --git a/packages/contracts/deploy/new/30_plugins/00_plugin-setups/20_admin_setup.ts b/packages/contracts/deploy/new/30_plugins/00_plugin-setups/20_admin_setup.ts index 2ea04c3f4..743a970bb 100644 --- a/packages/contracts/deploy/new/30_plugins/00_plugin-setups/20_admin_setup.ts +++ b/packages/contracts/deploy/new/30_plugins/00_plugin-setups/20_admin_setup.ts @@ -1,7 +1,6 @@ -import {HardhatRuntimeEnvironment} from 'hardhat/types'; -import {DeployFunction} from 'hardhat-deploy/types'; - import adminSetupArtifact from '../../../../artifacts/src/plugins/governance/admin/AdminSetup.sol/AdminSetup.json'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const {deployments, ethers} = hre; diff --git a/packages/contracts/deploy/new/30_plugins/00_plugin-setups/21_admin_setup_conclude.ts b/packages/contracts/deploy/new/30_plugins/00_plugin-setups/21_admin_setup_conclude.ts index 93dd5ca5a..ba43d90a8 100644 --- a/packages/contracts/deploy/new/30_plugins/00_plugin-setups/21_admin_setup_conclude.ts +++ b/packages/contracts/deploy/new/30_plugins/00_plugin-setups/21_admin_setup_conclude.ts @@ -1,7 +1,7 @@ -import {DeployFunction} from 'hardhat-deploy/types'; import {AdminSetup__factory} from '../../../../typechain'; -import {setTimeout} from 'timers/promises'; +import {DeployFunction} from 'hardhat-deploy/types'; import {HardhatRuntimeEnvironment} from 'hardhat/types'; +import {setTimeout} from 'timers/promises'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { console.log(`Concluding admin setup deployment.\n`); diff --git a/packages/contracts/deploy/new/30_plugins/00_plugin-setups/30_multisig_setup.ts b/packages/contracts/deploy/new/30_plugins/00_plugin-setups/30_multisig_setup.ts index d3d8e31e4..5c673c705 100644 --- a/packages/contracts/deploy/new/30_plugins/00_plugin-setups/30_multisig_setup.ts +++ b/packages/contracts/deploy/new/30_plugins/00_plugin-setups/30_multisig_setup.ts @@ -1,7 +1,6 @@ -import {HardhatRuntimeEnvironment} from 'hardhat/types'; -import {DeployFunction} from 'hardhat-deploy/types'; - import multisigSetupArtifact from '../../../../artifacts/src/plugins/governance/multisig/MultisigSetup.sol/MultisigSetup.json'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const {deployments, ethers} = hre; diff --git a/packages/contracts/deploy/new/30_plugins/00_plugin-setups/31_multisig_setup_conclude.ts b/packages/contracts/deploy/new/30_plugins/00_plugin-setups/31_multisig_setup_conclude.ts index 0dbc2a658..141d76455 100644 --- a/packages/contracts/deploy/new/30_plugins/00_plugin-setups/31_multisig_setup_conclude.ts +++ b/packages/contracts/deploy/new/30_plugins/00_plugin-setups/31_multisig_setup_conclude.ts @@ -1,7 +1,7 @@ -import {DeployFunction} from 'hardhat-deploy/types'; import {MultisigSetup__factory} from '../../../../typechain'; -import {setTimeout} from 'timers/promises'; +import {DeployFunction} from 'hardhat-deploy/types'; import {HardhatRuntimeEnvironment} from 'hardhat/types'; +import {setTimeout} from 'timers/promises'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { console.log(`Concluding multisig setup deployment.\n`); diff --git a/packages/contracts/deploy/new/30_plugins/00_plugin-setups/40_placeholder_setup.ts b/packages/contracts/deploy/new/30_plugins/00_plugin-setups/40_placeholder_setup.ts index a91cd8197..d5bf3cadd 100644 --- a/packages/contracts/deploy/new/30_plugins/00_plugin-setups/40_placeholder_setup.ts +++ b/packages/contracts/deploy/new/30_plugins/00_plugin-setups/40_placeholder_setup.ts @@ -1,9 +1,8 @@ -import {HardhatRuntimeEnvironment} from 'hardhat/types'; -import {DeployFunction} from 'hardhat-deploy/types'; -import {uploadToIPFS} from '../../../helpers'; - import placeholderSetupArtifact from '../../../../artifacts/src/plugins/placeholder-version/PlaceholderSetup.sol/PlaceholderSetup.json'; import placeholderBuildMetadata from '../../../../src/plugins/placeholder-version/build-metadata.json'; +import {uploadToIPFS} from '../../../helpers'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const {deployments, ethers} = hre; diff --git a/packages/contracts/deploy/new/30_plugins/10_plugin-repos/00_create_address_list_voting_repo.ts b/packages/contracts/deploy/new/30_plugins/10_plugin-repos/00_create_address_list_voting_repo.ts index 982a79a1f..493efa47a 100644 --- a/packages/contracts/deploy/new/30_plugins/10_plugin-repos/00_create_address_list_voting_repo.ts +++ b/packages/contracts/deploy/new/30_plugins/10_plugin-repos/00_create_address_list_voting_repo.ts @@ -1,9 +1,5 @@ -import {HardhatRuntimeEnvironment} from 'hardhat/types'; -import {DeployFunction} from 'hardhat-deploy/types'; - -import addresslistReleaseMetadata from '../../../../src/plugins/governance/majority-voting/addresslist/release-metadata.json'; import addresslistBuildMetadata from '../../../../src/plugins/governance/majority-voting/addresslist/build-metadata.json'; - +import addresslistReleaseMetadata from '../../../../src/plugins/governance/majority-voting/addresslist/release-metadata.json'; import { createPluginRepo, populatePluginRepo, @@ -11,6 +7,8 @@ import { uploadToIPFS, } from '../../../helpers'; import {ethers} from 'ethers'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { console.log(`\nCreating address-list-voting repo.`); diff --git a/packages/contracts/deploy/new/30_plugins/10_plugin-repos/01_create_address_list_voting_repo_conclude.ts b/packages/contracts/deploy/new/30_plugins/10_plugin-repos/01_create_address_list_voting_repo_conclude.ts index ba6f0d2ff..df2064add 100644 --- a/packages/contracts/deploy/new/30_plugins/10_plugin-repos/01_create_address_list_voting_repo_conclude.ts +++ b/packages/contracts/deploy/new/30_plugins/10_plugin-repos/01_create_address_list_voting_repo_conclude.ts @@ -1,9 +1,9 @@ -import {DeployFunction} from 'hardhat-deploy/types'; -import {HardhatRuntimeEnvironment} from 'hardhat/types'; import { PluginRepoFactory__factory, PluginRepo__factory, } from '../../../../typechain'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { console.log(`Concluding AddresslistVotingSetup deployment.\n`); diff --git a/packages/contracts/deploy/new/30_plugins/10_plugin-repos/10_create_token_voting_repo.ts b/packages/contracts/deploy/new/30_plugins/10_plugin-repos/10_create_token_voting_repo.ts index 9b7dd2c59..e03fd335f 100644 --- a/packages/contracts/deploy/new/30_plugins/10_plugin-repos/10_create_token_voting_repo.ts +++ b/packages/contracts/deploy/new/30_plugins/10_plugin-repos/10_create_token_voting_repo.ts @@ -1,9 +1,5 @@ -import {HardhatRuntimeEnvironment} from 'hardhat/types'; -import {DeployFunction} from 'hardhat-deploy/types'; - -import tokenVotingReleaseMetadata from '../../../../src/plugins/governance/majority-voting/token/release-metadata.json'; import tokenVotingBuildMetadata from '../../../../src/plugins/governance/majority-voting/token/build-metadata.json'; - +import tokenVotingReleaseMetadata from '../../../../src/plugins/governance/majority-voting/token/release-metadata.json'; import { createPluginRepo, populatePluginRepo, @@ -11,6 +7,8 @@ import { uploadToIPFS, } from '../../../helpers'; import {ethers} from 'ethers'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { console.log(`\nCreating token-voting repo.`); diff --git a/packages/contracts/deploy/new/30_plugins/10_plugin-repos/11_create_token_voting_repo_conclude.ts b/packages/contracts/deploy/new/30_plugins/10_plugin-repos/11_create_token_voting_repo_conclude.ts index 5b3c3dfe1..3305674c0 100644 --- a/packages/contracts/deploy/new/30_plugins/10_plugin-repos/11_create_token_voting_repo_conclude.ts +++ b/packages/contracts/deploy/new/30_plugins/10_plugin-repos/11_create_token_voting_repo_conclude.ts @@ -1,9 +1,9 @@ -import {DeployFunction} from 'hardhat-deploy/types'; -import {HardhatRuntimeEnvironment} from 'hardhat/types'; import { PluginRepoFactory__factory, PluginRepo__factory, } from '../../../../typechain'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { console.log(`Concluding TokenVotingSetup deployment.\n`); diff --git a/packages/contracts/deploy/new/30_plugins/10_plugin-repos/20_create_admin_repo.ts b/packages/contracts/deploy/new/30_plugins/10_plugin-repos/20_create_admin_repo.ts index ea78d0419..cbd6bb1ef 100644 --- a/packages/contracts/deploy/new/30_plugins/10_plugin-repos/20_create_admin_repo.ts +++ b/packages/contracts/deploy/new/30_plugins/10_plugin-repos/20_create_admin_repo.ts @@ -1,9 +1,5 @@ -import {HardhatRuntimeEnvironment} from 'hardhat/types'; -import {DeployFunction} from 'hardhat-deploy/types'; - -import adminReleaseMetadata from '../../../../src/plugins/governance/admin/release-metadata.json'; import adminBuildMetadata from '../../../../src/plugins/governance/admin/build-metadata.json'; - +import adminReleaseMetadata from '../../../../src/plugins/governance/admin/release-metadata.json'; import { createPluginRepo, populatePluginRepo, @@ -11,6 +7,8 @@ import { uploadToIPFS, } from '../../../helpers'; import {ethers} from 'ethers'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { console.log(`\nCreating admin repo.`); diff --git a/packages/contracts/deploy/new/30_plugins/10_plugin-repos/21_create_admin_repo_conclude.ts b/packages/contracts/deploy/new/30_plugins/10_plugin-repos/21_create_admin_repo_conclude.ts index ad40b6c66..9926ada4f 100644 --- a/packages/contracts/deploy/new/30_plugins/10_plugin-repos/21_create_admin_repo_conclude.ts +++ b/packages/contracts/deploy/new/30_plugins/10_plugin-repos/21_create_admin_repo_conclude.ts @@ -1,9 +1,9 @@ -import {DeployFunction} from 'hardhat-deploy/types'; -import {HardhatRuntimeEnvironment} from 'hardhat/types'; import { PluginRepoFactory__factory, PluginRepo__factory, } from '../../../../typechain'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { console.log(`Concluding TokenVotingSetup deployment.\n`); diff --git a/packages/contracts/deploy/new/30_plugins/10_plugin-repos/30_create_multisig_repo.ts b/packages/contracts/deploy/new/30_plugins/10_plugin-repos/30_create_multisig_repo.ts index 2e0d6bb43..6cf82377b 100644 --- a/packages/contracts/deploy/new/30_plugins/10_plugin-repos/30_create_multisig_repo.ts +++ b/packages/contracts/deploy/new/30_plugins/10_plugin-repos/30_create_multisig_repo.ts @@ -1,9 +1,5 @@ -import {HardhatRuntimeEnvironment} from 'hardhat/types'; -import {DeployFunction} from 'hardhat-deploy/types'; - -import multisigReleaseMetadata from '../../../../src/plugins/governance/multisig/release-metadata.json'; import multisigBuildMetadata from '../../../../src/plugins/governance/multisig/build-metadata.json'; - +import multisigReleaseMetadata from '../../../../src/plugins/governance/multisig/release-metadata.json'; import { createPluginRepo, populatePluginRepo, @@ -11,6 +7,8 @@ import { uploadToIPFS, } from '../../../helpers'; import {ethers} from 'ethers'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { console.log(`\nCreating multisig repo.`); diff --git a/packages/contracts/deploy/new/30_plugins/10_plugin-repos/31_create_multisig_repo_conclude.ts b/packages/contracts/deploy/new/30_plugins/10_plugin-repos/31_create_multisig_repo_conclude.ts index 3d3355ee8..6be0fa3e7 100644 --- a/packages/contracts/deploy/new/30_plugins/10_plugin-repos/31_create_multisig_repo_conclude.ts +++ b/packages/contracts/deploy/new/30_plugins/10_plugin-repos/31_create_multisig_repo_conclude.ts @@ -1,9 +1,9 @@ -import {DeployFunction} from 'hardhat-deploy/types'; -import {HardhatRuntimeEnvironment} from 'hardhat/types'; import { PluginRepoFactory__factory, PluginRepo__factory, } from '../../../../typechain'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { console.log(`Concluding AddresslistVotingSetup deployment.\n`); diff --git a/packages/contracts/deploy/new/40_finalize-managing-dao/00_grant-permissions.ts b/packages/contracts/deploy/new/40_finalize-managing-dao/00_grant-permissions.ts index 020ba3c8d..9f5041745 100644 --- a/packages/contracts/deploy/new/40_finalize-managing-dao/00_grant-permissions.ts +++ b/packages/contracts/deploy/new/40_finalize-managing-dao/00_grant-permissions.ts @@ -1,9 +1,8 @@ -import {HardhatRuntimeEnvironment} from 'hardhat/types'; -import {DeployFunction} from 'hardhat-deploy/types'; - +import {DAO__factory, PluginRepo__factory} from '../../../typechain'; import {Operation} from '../../../utils/types'; import {getContractAddress, managePermissions, Permission} from '../../helpers'; -import {DAO__factory, PluginRepo__factory} from '../../../typechain'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { console.log(`\nFinalizing ManagingDao.`); diff --git a/packages/contracts/deploy/new/40_finalize-managing-dao/20_register-managing-dao-on-dao-registry.ts b/packages/contracts/deploy/new/40_finalize-managing-dao/20_register-managing-dao-on-dao-registry.ts index 61ec487e3..228712380 100644 --- a/packages/contracts/deploy/new/40_finalize-managing-dao/20_register-managing-dao-on-dao-registry.ts +++ b/packages/contracts/deploy/new/40_finalize-managing-dao/20_register-managing-dao-on-dao-registry.ts @@ -1,6 +1,4 @@ -import {HardhatRuntimeEnvironment} from 'hardhat/types'; -import {DeployFunction} from 'hardhat-deploy/types'; - +import {DAO__factory, DAORegistry__factory} from '../../../typechain'; import { getContractAddress, getENSAddress, @@ -8,7 +6,8 @@ import { MANAGING_DAO_METADATA, uploadToIPFS, } from '../../helpers'; -import {DAO__factory, DAORegistry__factory} from '../../../typechain'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const {ethers, network} = hre; diff --git a/packages/contracts/deploy/new/40_finalize-managing-dao/30_install-multisig-on-managing-dao.ts b/packages/contracts/deploy/new/40_finalize-managing-dao/30_install-multisig-on-managing-dao.ts index a54a7e4cb..15f8aa610 100644 --- a/packages/contracts/deploy/new/40_finalize-managing-dao/30_install-multisig-on-managing-dao.ts +++ b/packages/contracts/deploy/new/40_finalize-managing-dao/30_install-multisig-on-managing-dao.ts @@ -1,20 +1,18 @@ -import {DeployFunction} from 'hardhat-deploy/types'; - import buildMetadataJson from '../../../src/plugins/governance/multisig/build-metadata.json'; -import {findEvent} from '../../../utils/event'; - -import {checkPermission, getContractAddress} from '../../helpers'; -import {Operation} from '../../../utils/types'; -import {hashHelpers} from '../../../utils/psp'; import { DAO__factory, MultisigSetup__factory, Multisig__factory, PluginSetupProcessor__factory, } from '../../../typechain'; -import {HardhatRuntimeEnvironment} from 'hardhat/types'; import {InstallationPreparedEvent} from '../../../typechain/PluginSetupProcessor'; +import {findEvent} from '../../../utils/event'; import {getNamedTypesFromMetadata} from '../../../utils/metadata'; +import {hashHelpers} from '../../../utils/psp'; +import {Operation} from '../../../utils/types'; +import {checkPermission, getContractAddress} from '../../helpers'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const {ethers, network} = hre; diff --git a/packages/contracts/deploy/new/40_finalize-managing-dao/40_revoke-permissions.ts b/packages/contracts/deploy/new/40_finalize-managing-dao/40_revoke-permissions.ts index f82d99a59..214a37b57 100644 --- a/packages/contracts/deploy/new/40_finalize-managing-dao/40_revoke-permissions.ts +++ b/packages/contracts/deploy/new/40_finalize-managing-dao/40_revoke-permissions.ts @@ -1,8 +1,7 @@ -import {DeployFunction} from 'hardhat-deploy/types'; - -import {getContractAddress, managePermissions, Permission} from '../../helpers'; -import {Operation} from '../../../utils/types'; import {DAO__factory, PluginRepo__factory} from '../../../typechain'; +import {Operation} from '../../../utils/types'; +import {getContractAddress, managePermissions, Permission} from '../../helpers'; +import {DeployFunction} from 'hardhat-deploy/types'; import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { diff --git a/packages/contracts/deploy/new/40_finalize-managing-dao/99_verify_step.ts b/packages/contracts/deploy/new/40_finalize-managing-dao/99_verify_step.ts index 2ae045947..f753da270 100644 --- a/packages/contracts/deploy/new/40_finalize-managing-dao/99_verify_step.ts +++ b/packages/contracts/deploy/new/40_finalize-managing-dao/99_verify_step.ts @@ -1,9 +1,8 @@ -import {DeployFunction} from 'hardhat-deploy/types'; -import {HardhatRuntimeEnvironment} from 'hardhat/types'; - +import {DAO__factory} from '../../../typechain'; import {Operation} from '../../../utils/types'; import {checkPermission, getContractAddress} from '../../helpers'; -import {DAO__factory} from '../../../typechain'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { console.log('\nVerifying managing DAO deployment.'); diff --git a/packages/contracts/deploy/update/to_v1.3.0/10_DAOFactory.ts b/packages/contracts/deploy/update/to_v1.3.0/10_DAOFactory.ts index 9f02320d1..a53bf4efd 100644 --- a/packages/contracts/deploy/update/to_v1.3.0/10_DAOFactory.ts +++ b/packages/contracts/deploy/update/to_v1.3.0/10_DAOFactory.ts @@ -1,10 +1,9 @@ -import {DeployFunction} from 'hardhat-deploy/types'; -import {HardhatRuntimeEnvironment} from 'hardhat/types'; +import daoFactoryArtifact from '../../../artifacts/src/framework/dao/DAOFactory.sol/DAOFactory.json'; +import {DAO__factory} from '../../../typechain'; import {Operation} from '../../../utils/types'; import {getActiveContractAddress} from '../../helpers'; -import {DAO__factory} from '../../../typechain'; - -import daoFactoryArtifact from '../../../artifacts/src/framework/dao/DAOFactory.sol/DAOFactory.json'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { console.log('\nUpdating DAOFactory'); diff --git a/packages/contracts/deploy/update/to_v1.3.0/11_DAOFactory_conclude.ts b/packages/contracts/deploy/update/to_v1.3.0/11_DAOFactory_conclude.ts index 8b5a5fe15..9ea5bbd0c 100644 --- a/packages/contracts/deploy/update/to_v1.3.0/11_DAOFactory_conclude.ts +++ b/packages/contracts/deploy/update/to_v1.3.0/11_DAOFactory_conclude.ts @@ -1,7 +1,7 @@ -import {DeployFunction} from 'hardhat-deploy/types'; -import {HardhatRuntimeEnvironment} from 'hardhat/types'; import {DAOFactory__factory} from '../../../typechain'; import {getContractAddress} from '../../helpers'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { console.log('\nConcluding DAOFactory update'); diff --git a/packages/contracts/deploy/update/to_v1.3.0/20_PluginRepoFactory.ts b/packages/contracts/deploy/update/to_v1.3.0/20_PluginRepoFactory.ts index b80445d19..cb26a726f 100644 --- a/packages/contracts/deploy/update/to_v1.3.0/20_PluginRepoFactory.ts +++ b/packages/contracts/deploy/update/to_v1.3.0/20_PluginRepoFactory.ts @@ -1,10 +1,9 @@ -import {HardhatRuntimeEnvironment} from 'hardhat/types'; -import {DeployFunction} from 'hardhat-deploy/types'; -import {getActiveContractAddress} from '../../helpers'; +import pluginRepoFactoryArtifact from '../../../artifacts/src/framework/plugin/repo/PluginRepoFactory.sol/PluginRepoFactory.json'; import {PluginRepo__factory} from '../../../typechain'; import {Operation} from '../../../utils/types'; - -import pluginRepoFactoryArtifact from '../../../artifacts/src/framework/plugin/repo/PluginRepoFactory.sol/PluginRepoFactory.json'; +import {getActiveContractAddress} from '../../helpers'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { console.log('\nUpdating PluginRepoFactory'); diff --git a/packages/contracts/deploy/update/to_v1.3.0/21_PluginRepoFactory_conclude.ts b/packages/contracts/deploy/update/to_v1.3.0/21_PluginRepoFactory_conclude.ts index a0a2f6b9b..f05e0aec6 100644 --- a/packages/contracts/deploy/update/to_v1.3.0/21_PluginRepoFactory_conclude.ts +++ b/packages/contracts/deploy/update/to_v1.3.0/21_PluginRepoFactory_conclude.ts @@ -1,7 +1,7 @@ -import {DeployFunction} from 'hardhat-deploy/types'; -import {HardhatRuntimeEnvironment} from 'hardhat/types'; import {PluginRepoFactory__factory} from '../../../typechain'; import {getContractAddress} from '../../helpers'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { console.log('\nConcluding PluginRepoFactory update'); diff --git a/packages/contracts/deploy/update/to_v1.3.0/30_Multisig_PluginRepo.ts b/packages/contracts/deploy/update/to_v1.3.0/30_Multisig_PluginRepo.ts index 5b2e87dce..e59b361af 100644 --- a/packages/contracts/deploy/update/to_v1.3.0/30_Multisig_PluginRepo.ts +++ b/packages/contracts/deploy/update/to_v1.3.0/30_Multisig_PluginRepo.ts @@ -1,10 +1,10 @@ -import {DeployFunction} from 'hardhat-deploy/types'; -import {HardhatRuntimeEnvironment} from 'hardhat/types'; import { PluginRepo__factory, PluginRepoFactory__factory, } from '../../../typechain'; import {getContractAddress} from '../../helpers'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { console.log( diff --git a/packages/contracts/deploy/update/to_v1.3.0/31_Multisig_Plugin.ts b/packages/contracts/deploy/update/to_v1.3.0/31_Multisig_Plugin.ts index 7caf21e2f..77182ccb7 100644 --- a/packages/contracts/deploy/update/to_v1.3.0/31_Multisig_Plugin.ts +++ b/packages/contracts/deploy/update/to_v1.3.0/31_Multisig_Plugin.ts @@ -1,12 +1,10 @@ -import {DeployFunction} from 'hardhat-deploy/types'; -import {HardhatRuntimeEnvironment} from 'hardhat/types'; -import {PluginRepo__factory} from '../../../typechain'; -import {getContractAddress, uploadToIPFS} from '../../helpers'; - import multisigSetupArtifact from '../../../artifacts/src/plugins/governance/multisig/MultisigSetup.sol/MultisigSetup.json'; - -import multisigReleaseMetadata from '../../../src/plugins/governance/multisig/release-metadata.json'; import multisigBuildMetadata from '../../../src/plugins/governance/multisig/build-metadata.json'; +import multisigReleaseMetadata from '../../../src/plugins/governance/multisig/release-metadata.json'; +import {PluginRepo__factory} from '../../../typechain'; +import {getContractAddress, uploadToIPFS} from '../../helpers'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; const TARGET_RELEASE = 1; diff --git a/packages/contracts/deploy/update/to_v1.3.0/32_Multisig_Plugin_conclude.ts b/packages/contracts/deploy/update/to_v1.3.0/32_Multisig_Plugin_conclude.ts index c928557f5..e21dfcfee 100644 --- a/packages/contracts/deploy/update/to_v1.3.0/32_Multisig_Plugin_conclude.ts +++ b/packages/contracts/deploy/update/to_v1.3.0/32_Multisig_Plugin_conclude.ts @@ -1,6 +1,6 @@ +import {MultisigSetup__factory} from '../../../typechain'; import {DeployFunction} from 'hardhat-deploy/types'; import {HardhatRuntimeEnvironment} from 'hardhat/types'; -import {MultisigSetup__factory} from '../../../typechain'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { console.log('\nConcluding Multisig Plugin Update'); diff --git a/packages/contracts/deploy/update/to_v1.3.0/40_TokenVoting_PluginRepo.ts b/packages/contracts/deploy/update/to_v1.3.0/40_TokenVoting_PluginRepo.ts index 73cf0eba7..0453ae619 100644 --- a/packages/contracts/deploy/update/to_v1.3.0/40_TokenVoting_PluginRepo.ts +++ b/packages/contracts/deploy/update/to_v1.3.0/40_TokenVoting_PluginRepo.ts @@ -1,10 +1,10 @@ -import {DeployFunction} from 'hardhat-deploy/types'; -import {HardhatRuntimeEnvironment} from 'hardhat/types'; import { PluginRepo__factory, PluginRepoFactory__factory, } from '../../../typechain'; import {getContractAddress} from '../../helpers'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { console.log( diff --git a/packages/contracts/deploy/update/to_v1.3.0/41_TokenVoting_Plugin.ts b/packages/contracts/deploy/update/to_v1.3.0/41_TokenVoting_Plugin.ts index d735866a6..6bb48eb29 100644 --- a/packages/contracts/deploy/update/to_v1.3.0/41_TokenVoting_Plugin.ts +++ b/packages/contracts/deploy/update/to_v1.3.0/41_TokenVoting_Plugin.ts @@ -1,14 +1,13 @@ -import {DeployFunction} from 'hardhat-deploy/types'; -import {HardhatRuntimeEnvironment} from 'hardhat/types'; -import {PluginRepo__factory} from '../../../typechain'; -import {getContractAddress, uploadToIPFS} from '../../helpers'; - +import tokenVotingSetupArtifact from '../../../artifacts/src/plugins/governance/majority-voting/token/TokenVotingSetup.sol/TokenVotingSetup.json'; import governanceERC20Artifact from '../../../artifacts/src/token/ERC20/governance/GovernanceERC20.sol/GovernanceERC20.json'; import governanceWrappedERC20Artifact from '../../../artifacts/src/token/ERC20/governance/GovernanceWrappedERC20.sol/GovernanceWrappedERC20.json'; -import tokenVotingSetupArtifact from '../../../artifacts/src/plugins/governance/majority-voting/token/TokenVotingSetup.sol/TokenVotingSetup.json'; -import tokenVotingReleaseMetadata from '../../../src/plugins/governance/majority-voting/token/release-metadata.json'; import tokenVotingBuildMetadata from '../../../src/plugins/governance/majority-voting/token/build-metadata.json'; +import tokenVotingReleaseMetadata from '../../../src/plugins/governance/majority-voting/token/release-metadata.json'; import {MintSettings} from '../../../test/token/erc20/governance-erc20'; +import {PluginRepo__factory} from '../../../typechain'; +import {getContractAddress, uploadToIPFS} from '../../helpers'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; const TARGET_RELEASE = 1; diff --git a/packages/contracts/deploy/update/to_v1.3.0/42_TokenVoting_Plugin_conclude.ts b/packages/contracts/deploy/update/to_v1.3.0/42_TokenVoting_Plugin_conclude.ts index dd129bb7e..2f1a8a705 100644 --- a/packages/contracts/deploy/update/to_v1.3.0/42_TokenVoting_Plugin_conclude.ts +++ b/packages/contracts/deploy/update/to_v1.3.0/42_TokenVoting_Plugin_conclude.ts @@ -1,6 +1,6 @@ +import {TokenVotingSetup__factory} from '../../../typechain'; import {DeployFunction} from 'hardhat-deploy/types'; import {HardhatRuntimeEnvironment} from 'hardhat/types'; -import {TokenVotingSetup__factory} from '../../../typechain'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { console.log('\nConcluding TokenVoting Plugin Update'); diff --git a/packages/contracts/deploy/update/to_v1.3.0/50_AddresslistVoting_PluginRepo.ts b/packages/contracts/deploy/update/to_v1.3.0/50_AddresslistVoting_PluginRepo.ts index 0318c1b5a..7c400f1c5 100644 --- a/packages/contracts/deploy/update/to_v1.3.0/50_AddresslistVoting_PluginRepo.ts +++ b/packages/contracts/deploy/update/to_v1.3.0/50_AddresslistVoting_PluginRepo.ts @@ -1,10 +1,10 @@ -import {DeployFunction} from 'hardhat-deploy/types'; -import {HardhatRuntimeEnvironment} from 'hardhat/types'; import { PluginRepo__factory, PluginRepoFactory__factory, } from '../../../typechain'; import {getContractAddress} from '../../helpers'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { console.log( diff --git a/packages/contracts/deploy/update/to_v1.3.0/51_AddresslistVoting_Plugin.ts b/packages/contracts/deploy/update/to_v1.3.0/51_AddresslistVoting_Plugin.ts index 7e2770db1..90e7f58c9 100644 --- a/packages/contracts/deploy/update/to_v1.3.0/51_AddresslistVoting_Plugin.ts +++ b/packages/contracts/deploy/update/to_v1.3.0/51_AddresslistVoting_Plugin.ts @@ -1,11 +1,10 @@ -import {DeployFunction} from 'hardhat-deploy/types'; -import {HardhatRuntimeEnvironment} from 'hardhat/types'; -import {PluginRepo__factory} from '../../../typechain'; -import {getContractAddress, uploadToIPFS} from '../../helpers'; - import addresslistVotingSetupArtifact from '../../../artifacts/src/plugins/governance/majority-voting/addresslist/AddresslistVotingSetup.sol/AddresslistVotingSetup.json'; -import addresslistVotingReleaseMetadata from '../../../src/plugins/governance/majority-voting/addresslist/release-metadata.json'; import addresslistVotingBuildMetadata from '../../../src/plugins/governance/majority-voting/addresslist/build-metadata.json'; +import addresslistVotingReleaseMetadata from '../../../src/plugins/governance/majority-voting/addresslist/release-metadata.json'; +import {PluginRepo__factory} from '../../../typechain'; +import {getContractAddress, uploadToIPFS} from '../../helpers'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; const TARGET_RELEASE = 1; diff --git a/packages/contracts/deploy/update/to_v1.3.0/52_AddresslistVoting_Plugin_conclude.ts b/packages/contracts/deploy/update/to_v1.3.0/52_AddresslistVoting_Plugin_conclude.ts index ec5b6e4d1..bd06b72c0 100644 --- a/packages/contracts/deploy/update/to_v1.3.0/52_AddresslistVoting_Plugin_conclude.ts +++ b/packages/contracts/deploy/update/to_v1.3.0/52_AddresslistVoting_Plugin_conclude.ts @@ -1,6 +1,6 @@ +import {AddresslistVotingSetup__factory} from '../../../typechain'; import {DeployFunction} from 'hardhat-deploy/types'; import {HardhatRuntimeEnvironment} from 'hardhat/types'; -import {AddresslistVotingSetup__factory} from '../../../typechain'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { console.log('\nConcluding AddresslistVoting Plugin Update'); diff --git a/packages/contracts/deploy/update/to_v1.3.0/60_Admin_PluginRepo.ts b/packages/contracts/deploy/update/to_v1.3.0/60_Admin_PluginRepo.ts index b3ea92ee4..f0688147c 100644 --- a/packages/contracts/deploy/update/to_v1.3.0/60_Admin_PluginRepo.ts +++ b/packages/contracts/deploy/update/to_v1.3.0/60_Admin_PluginRepo.ts @@ -1,10 +1,10 @@ -import {DeployFunction} from 'hardhat-deploy/types'; -import {HardhatRuntimeEnvironment} from 'hardhat/types'; import { PluginRepo__factory, PluginRepoFactory__factory, } from '../../../typechain'; import {getContractAddress} from '../../helpers'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { console.log( diff --git a/packages/contracts/deploy/update/to_v1.3.0/90_ManagingDAO.ts b/packages/contracts/deploy/update/to_v1.3.0/90_ManagingDAO.ts index 369291720..b2b65a8e3 100644 --- a/packages/contracts/deploy/update/to_v1.3.0/90_ManagingDAO.ts +++ b/packages/contracts/deploy/update/to_v1.3.0/90_ManagingDAO.ts @@ -1,8 +1,8 @@ -import {DeployFunction} from 'hardhat-deploy/types'; -import {HardhatRuntimeEnvironment} from 'hardhat/types'; +import {IMPLICIT_INITIAL_PROTOCOL_VERSION} from '../../../test/test-utils/protocol-version'; import {DAOFactory__factory, DAO__factory} from '../../../typechain'; import {getContractAddress} from '../../helpers'; -import {IMPLICIT_INITIAL_PROTOCOL_VERSION} from '../../../test/test-utils/protocol-version'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { console.log('\nUpgrade the managing DAO to new Implementation'); diff --git a/packages/contracts/deploy/verification/99_conclude/00_save-contract-addresses.ts b/packages/contracts/deploy/verification/99_conclude/00_save-contract-addresses.ts index d0e8a72e0..f21adaaff 100644 --- a/packages/contracts/deploy/verification/99_conclude/00_save-contract-addresses.ts +++ b/packages/contracts/deploy/verification/99_conclude/00_save-contract-addresses.ts @@ -1,6 +1,6 @@ +import {promises as fs} from 'fs'; import {DeployFunction} from 'hardhat-deploy/types'; import {HardhatRuntimeEnvironment} from 'hardhat/types'; -import {promises as fs} from 'fs'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { console.log('\nPrinting deployed contracts.'); diff --git a/packages/contracts/deploy/verification/99_conclude/01_managing_dao_proposal.ts b/packages/contracts/deploy/verification/99_conclude/01_managing_dao_proposal.ts index bc61f5b81..55e09602a 100644 --- a/packages/contracts/deploy/verification/99_conclude/01_managing_dao_proposal.ts +++ b/packages/contracts/deploy/verification/99_conclude/01_managing_dao_proposal.ts @@ -1,8 +1,8 @@ +import {Multisig__factory} from '../../../typechain'; +import {getManagingDAOMultisigAddress, uploadToIPFS} from '../../helpers'; import {writeFile} from 'fs/promises'; import {DeployFunction} from 'hardhat-deploy/types'; import {HardhatRuntimeEnvironment} from 'hardhat/types'; -import {Multisig__factory} from '../../../typechain'; -import {getManagingDAOMultisigAddress, uploadToIPFS} from '../../helpers'; const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { console.log('\nCreating managing DAO Proposal'); diff --git a/packages/contracts/deploy/verification/99_conclude/10_verify-contracts.ts b/packages/contracts/deploy/verification/99_conclude/10_verify-contracts.ts index aa90b9b87..523919747 100644 --- a/packages/contracts/deploy/verification/99_conclude/10_verify-contracts.ts +++ b/packages/contracts/deploy/verification/99_conclude/10_verify-contracts.ts @@ -1,7 +1,6 @@ -import {HardhatRuntimeEnvironment} from 'hardhat/types'; -import {DeployFunction} from 'hardhat-deploy/types'; - import {verifyContract} from '../../../utils/etherscan'; +import {DeployFunction} from 'hardhat-deploy/types'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; function delay(ms: number) { return new Promise(resolve => setTimeout(resolve, ms)); diff --git a/packages/contracts/hardhat.config.ts b/packages/contracts/hardhat.config.ts index 2fe209e05..7f986a856 100644 --- a/packages/contracts/hardhat.config.ts +++ b/packages/contracts/hardhat.config.ts @@ -1,19 +1,17 @@ -import * as dotenv from 'dotenv'; -import fs from 'fs'; -import path from 'path'; - -import {HardhatRuntimeEnvironment} from 'hardhat/types'; -import {extendEnvironment, HardhatUserConfig} from 'hardhat/config'; +import {AragonPluginRepos, TestingFork} from './utils/types'; import '@nomicfoundation/hardhat-chai-matchers'; import '@nomicfoundation/hardhat-verify'; +import '@openzeppelin/hardhat-upgrades'; +import * as dotenv from 'dotenv'; +import fs from 'fs'; import 'hardhat-deploy'; import 'hardhat-gas-reporter'; -import '@openzeppelin/hardhat-upgrades'; +import {extendEnvironment, HardhatUserConfig} from 'hardhat/config'; +import {HardhatRuntimeEnvironment} from 'hardhat/types'; +import path from 'path'; import 'solidity-coverage'; import 'solidity-docgen'; -import {AragonPluginRepos, TestingFork} from './utils/types'; - dotenv.config(); const ETH_KEY = process.env.ETH_KEY; diff --git a/packages/contracts/npm/artifacts.ts b/packages/contracts/npm/artifacts.ts index b6ce61b62..45e026d6f 100644 --- a/packages/contracts/npm/artifacts.ts +++ b/packages/contracts/npm/artifacts.ts @@ -1,51 +1,40 @@ // JSON artifacts of the contracts - // core //// dao import * as DAO from '../artifacts/src/core/dao/DAO.sol/DAO.json'; - +import * as PermissionLib from '../artifacts/src/core/permission/PermissionLib.sol/PermissionLib.json'; //// Permission import * as PermissionManager from '../artifacts/src/core/permission/PermissionManager.sol/PermissionManager.json'; -import * as PermissionLib from '../artifacts/src/core/permission/PermissionLib.sol/PermissionLib.json'; - // framework //// dao import * as DAOFactory from '../artifacts/src/framework/dao/DAOFactory.sol/DAOFactory.json'; import * as DAORegistry from '../artifacts/src/framework/dao/DAORegistry.sol/DAORegistry.json'; -import * as TokenFactory from '../artifacts/src/framework/utils/TokenFactory.sol/TokenFactory.json'; - //// Plugin ///// Repo import * as PluginRepo from '../artifacts/src/framework/plugin/repo/PluginRepo.sol/PluginRepo.json'; import * as PluginRepoFactory from '../artifacts/src/framework/plugin/repo/PluginRepoFactory.sol/PluginRepoFactory.json'; import * as PluginRepoRegistry from '../artifacts/src/framework/plugin/repo/PluginRepoRegistry.sol/PluginRepoRegistry.json'; - ///// Setup import * as PluginSetupProcessor from '../artifacts/src/framework/plugin/setup/PluginSetupProcessor.sol/PluginSetupProcessor.json'; - +import * as TokenFactory from '../artifacts/src/framework/utils/TokenFactory.sol/TokenFactory.json'; // Plugins //// Governance ////// Admin import * as Admin from '../artifacts/src/plugins/governance/admin/Admin.sol/Admin.json'; import * as AdminSetup from '../artifacts/src/plugins/governance/admin/AdminSetup.sol/AdminSetup.json'; - ////// MajorityVoting //////// AddresslistVoting import * as AddresslistVoting from '../artifacts/src/plugins/governance/majority-voting/addresslist/AddresslistVoting.sol/AddresslistVoting.json'; import * as AddresslistVotingSetup from '../artifacts/src/plugins/governance/majority-voting/addresslist/AddresslistVotingSetup.sol/AddresslistVotingSetup.json'; - //////// TokenVoting import * as TokenVoting from '../artifacts/src/plugins/governance/majority-voting/token/TokenVoting.sol/TokenVoting.json'; import * as TokenVotingSetup from '../artifacts/src/plugins/governance/majority-voting/token/TokenVotingSetup.sol/TokenVotingSetup.json'; - ////// Multisig import * as Multisig from '../artifacts/src/plugins/governance/multisig/Multisig.sol/Multisig.json'; import * as MultisigSetup from '../artifacts/src/plugins/governance/multisig/MultisigSetup.sol/MultisigSetup.json'; - +import * as MerkleDistributor from '../artifacts/src/plugins/token/MerkleDistributor.sol/MerkleDistributor.json'; //// Token Creation import * as MerkleMinter from '../artifacts/src/plugins/token/MerkleMinter.sol/MerkleMinter.json'; -import * as MerkleDistributor from '../artifacts/src/plugins/token/MerkleDistributor.sol/MerkleDistributor.json'; - // Token //// ERC20 ////// Governance diff --git a/packages/contracts/rollup.config.ts b/packages/contracts/rollup.config.ts index 48677bd21..1dfad222a 100644 --- a/packages/contracts/rollup.config.ts +++ b/packages/contracts/rollup.config.ts @@ -1,6 +1,6 @@ +import json from '@rollup/plugin-json'; import typescript from '@rollup/plugin-typescript'; import dts from 'rollup-plugin-dts'; -import json from '@rollup/plugin-json'; export default [ { diff --git a/packages/contracts/scripts/generate-typechain-osx-versions.ts b/packages/contracts/scripts/generate-typechain-osx-versions.ts index 30fc0560b..34fc86fd3 100644 --- a/packages/contracts/scripts/generate-typechain-osx-versions.ts +++ b/packages/contracts/scripts/generate-typechain-osx-versions.ts @@ -1,8 +1,8 @@ +import {OSX_VERSION_ALIASES} from './osx-versions-aliases'; import {exec} from 'child_process'; -import path from 'path'; import fs from 'fs'; +import path from 'path'; import util from 'util'; -import {OSX_VERSION_ALIASES} from './osx-versions-aliases'; const execPromise = util.promisify(exec); diff --git a/packages/contracts/scripts/generate-typechain-osx.ts b/packages/contracts/scripts/generate-typechain-osx.ts index 85e27ff31..40bb38b2b 100644 --- a/packages/contracts/scripts/generate-typechain-osx.ts +++ b/packages/contracts/scripts/generate-typechain-osx.ts @@ -1,8 +1,8 @@ +import {OSX_VERSION_ALIASES} from './osx-versions-aliases'; import {exec} from 'child_process'; -import path from 'path'; import fs from 'fs'; +import path from 'path'; import util from 'util'; -import {OSX_VERSION_ALIASES} from './osx-versions-aliases'; const execPromise = util.promisify(exec); diff --git a/packages/contracts/test/core/dao/callback-handler.ts b/packages/contracts/test/core/dao/callback-handler.ts index 1b78126f4..8829225d7 100644 --- a/packages/contracts/test/core/dao/callback-handler.ts +++ b/packages/contracts/test/core/dao/callback-handler.ts @@ -1,12 +1,11 @@ -import {expect} from 'chai'; -import {ethers} from 'hardhat'; -import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; -import {defaultAbiCoder, hexDataSlice, id} from 'ethers/lib/utils'; - import { CallbackHandlerMockHelper, CallbackHandlerMockHelper__factory, } from '../../../typechain'; +import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; +import {expect} from 'chai'; +import {defaultAbiCoder, hexDataSlice, id} from 'ethers/lib/utils'; +import {ethers} from 'hardhat'; const EVENTS = { STANDARD_CALLBACK_REGISTERED: 'StandardCallbackRegistered', diff --git a/packages/contracts/test/core/dao/dao.ts b/packages/contracts/test/core/dao/dao.ts index 0bd8907ec..3515dfc3a 100644 --- a/packages/contracts/test/core/dao/dao.ts +++ b/packages/contracts/test/core/dao/dao.ts @@ -1,8 +1,3 @@ -import chai, {expect} from 'chai'; -import {ethers} from 'hardhat'; -import {ContractFactory} from 'ethers'; -import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; - import { DAO, TestERC20, @@ -25,15 +20,9 @@ import { } from '../../../typechain'; import {DAO__factory as DAO_V1_0_0__factory} from '../../../typechain/@aragon/osx-v1.0.1/core/dao/DAO.sol'; import {DAO__factory as DAO_V1_3_0__factory} from '../../../typechain/@aragon/osx-v1.3.0-rc0.2/core/dao/DAO.sol'; - -import { - getProtocolVersion, - deployAndUpgradeFromToCheck, - deployAndUpgradeSelfCheck, -} from '../../test-utils/uups-upgradeable'; +import {ExecutedEvent} from '../../../typechain/DAO'; import {findEvent, DAO_EVENTS} from '../../../utils/event'; import {flipBit} from '../../test-utils/bitmap'; - import { getActions, getERC1155TransferAction, @@ -41,20 +30,27 @@ import { getERC721TransferAction, TOKEN_INTERFACE_IDS, } from '../../test-utils/dao'; - -import {getInterfaceID} from '../../test-utils/interfaces'; +import {ZERO_BYTES32, daoExampleURI} from '../../test-utils/dao'; import {OZ_ERRORS} from '../../test-utils/error'; -import {smock} from '@defi-wonderland/smock'; -import {deployWithProxy} from '../../test-utils/proxy'; -import {UNREGISTERED_INTERFACE_RETURN} from './callback-handler'; +import {getInterfaceID} from '../../test-utils/interfaces'; import {UPGRADE_PERMISSIONS} from '../../test-utils/permissions'; -import {ZERO_BYTES32, daoExampleURI} from '../../test-utils/dao'; -import {ExecutedEvent} from '../../../typechain/DAO'; import { CURRENT_PROTOCOL_VERSION, IMPLICIT_INITIAL_PROTOCOL_VERSION, } from '../../test-utils/protocol-version'; +import {deployWithProxy} from '../../test-utils/proxy'; +import { + getProtocolVersion, + deployAndUpgradeFromToCheck, + deployAndUpgradeSelfCheck, +} from '../../test-utils/uups-upgradeable'; import {ANY_ADDR} from '../permission/permission-manager'; +import {UNREGISTERED_INTERFACE_RETURN} from './callback-handler'; +import {smock} from '@defi-wonderland/smock'; +import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; +import chai, {expect} from 'chai'; +import {ContractFactory} from 'ethers'; +import {ethers} from 'hardhat'; chai.use(smock.matchers); diff --git a/packages/contracts/test/core/permission/permission-manager.ts b/packages/contracts/test/core/permission/permission-manager.ts index 7a5df98c3..b69cc98fa 100644 --- a/packages/contracts/test/core/permission/permission-manager.ts +++ b/packages/contracts/test/core/permission/permission-manager.ts @@ -1,7 +1,3 @@ -import {expect} from 'chai'; -import {ethers} from 'hardhat'; -import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; - import { PermissionManagerTest, PermissionConditionMock, @@ -9,8 +5,11 @@ import { PermissionConditionMock__factory, TestPlugin__factory, } from '../../../typechain'; -import {OZ_ERRORS} from '../../test-utils/error'; import {Operation} from '../../../utils/types'; +import {OZ_ERRORS} from '../../test-utils/error'; +import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; +import {expect} from 'chai'; +import {ethers} from 'hardhat'; const ROOT_PERMISSION_ID = ethers.utils.id('ROOT_PERMISSION'); const ADMIN_PERMISSION_ID = ethers.utils.id('ADMIN_PERMISSION'); diff --git a/packages/contracts/test/core/plugin/parameter-scoping-condition.ts b/packages/contracts/test/core/plugin/parameter-scoping-condition.ts index 4fc114004..f48b657ac 100644 --- a/packages/contracts/test/core/plugin/parameter-scoping-condition.ts +++ b/packages/contracts/test/core/plugin/parameter-scoping-condition.ts @@ -1,7 +1,3 @@ -import {expect} from 'chai'; -import {ethers} from 'hardhat'; -import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; - import { TestParameterScopingPermissionCondition, TestPlugin, @@ -11,6 +7,9 @@ import { } from '../../../typechain'; import {deployNewDAO} from '../../test-utils/dao'; import {deployWithProxy} from '../../test-utils/proxy'; +import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; +import {expect} from 'chai'; +import {ethers} from 'hardhat'; const DO_SOMETHING_PERMISSION_ID = ethers.utils.id('DO_SOMETHING_PERMISSION'); diff --git a/packages/contracts/test/core/plugin/plugin-clonable.ts b/packages/contracts/test/core/plugin/plugin-clonable.ts index dba49c3fe..5f79545d6 100644 --- a/packages/contracts/test/core/plugin/plugin-clonable.ts +++ b/packages/contracts/test/core/plugin/plugin-clonable.ts @@ -1,6 +1,3 @@ -import {expect} from 'chai'; -import {ethers} from 'hardhat'; - import { IERC165__factory, IPlugin__factory, @@ -8,9 +5,11 @@ import { PluginCloneableV1Mock, PluginCloneableV1Mock__factory, } from '../../../typechain'; -import {CURRENT_PROTOCOL_VERSION} from '../../test-utils/protocol-version'; import {getInterfaceID} from '../../test-utils/interfaces'; +import {CURRENT_PROTOCOL_VERSION} from '../../test-utils/protocol-version'; import {PluginType} from '../../test-utils/psp/types'; +import {expect} from 'chai'; +import {ethers} from 'hardhat'; describe('PluginCloneable', function () { let plugin: PluginCloneableV1Mock; diff --git a/packages/contracts/test/core/plugin/plugin-uups-upgradeable.ts b/packages/contracts/test/core/plugin/plugin-uups-upgradeable.ts index 86038415a..ca36be720 100644 --- a/packages/contracts/test/core/plugin/plugin-uups-upgradeable.ts +++ b/packages/contracts/test/core/plugin/plugin-uups-upgradeable.ts @@ -1,6 +1,3 @@ -import {expect} from 'chai'; -import {ethers} from 'hardhat'; - import { IERC165__factory, IPlugin__factory, @@ -8,9 +5,11 @@ import { PluginUUPSUpgradeableV1Mock, PluginUUPSUpgradeableV1Mock__factory, } from '../../../typechain'; -import {CURRENT_PROTOCOL_VERSION} from '../../test-utils/protocol-version'; import {getInterfaceID} from '../../test-utils/interfaces'; +import {CURRENT_PROTOCOL_VERSION} from '../../test-utils/protocol-version'; import {PluginType} from '../../test-utils/psp/types'; +import {expect} from 'chai'; +import {ethers} from 'hardhat'; describe('PluginUUPSUpgradeable', function () { let plugin: PluginUUPSUpgradeableV1Mock; diff --git a/packages/contracts/test/core/plugin/plugin.ts b/packages/contracts/test/core/plugin/plugin.ts index 8ee2ddc97..f0f31e9b5 100644 --- a/packages/contracts/test/core/plugin/plugin.ts +++ b/packages/contracts/test/core/plugin/plugin.ts @@ -1,6 +1,3 @@ -import {expect} from 'chai'; -import {ethers} from 'hardhat'; - import { IERC165__factory, IPlugin__factory, @@ -8,9 +5,11 @@ import { PluginV1Mock, PluginV1Mock__factory, } from '../../../typechain'; -import {CURRENT_PROTOCOL_VERSION} from '../../test-utils/protocol-version'; import {getInterfaceID} from '../../test-utils/interfaces'; +import {CURRENT_PROTOCOL_VERSION} from '../../test-utils/protocol-version'; import {PluginType} from '../../test-utils/psp/types'; +import {expect} from 'chai'; +import {ethers} from 'hardhat'; describe('Plugin', function () { let plugin: PluginV1Mock; diff --git a/packages/contracts/test/core/plugin/shared-plugin.ts b/packages/contracts/test/core/plugin/shared-plugin.ts index 03f6ac2f9..6efa05c25 100644 --- a/packages/contracts/test/core/plugin/shared-plugin.ts +++ b/packages/contracts/test/core/plugin/shared-plugin.ts @@ -1,7 +1,3 @@ -import {expect} from 'chai'; -import {ethers} from 'hardhat'; -import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; - import { TestSharedPlugin, TestIdGatingCondition, @@ -11,6 +7,9 @@ import { } from '../../../typechain'; import {deployNewDAO} from '../../test-utils/dao'; import {deployWithProxy} from '../../test-utils/proxy'; +import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; +import {expect} from 'chai'; +import {ethers} from 'hardhat'; const ID_GATED_ACTION_PERMISSION_ID = ethers.utils.id( 'ID_GATED_ACTION_PERMISSION' diff --git a/packages/contracts/test/deploy/managing-dao.ts b/packages/contracts/test/deploy/managing-dao.ts index d44463007..f988620f4 100644 --- a/packages/contracts/test/deploy/managing-dao.ts +++ b/packages/contracts/test/deploy/managing-dao.ts @@ -1,7 +1,3 @@ -import {expect} from 'chai'; - -import hre, {ethers, deployments} from 'hardhat'; -import {Deployment} from 'hardhat-deploy/dist/types'; import { DAO, DAORegistry, @@ -16,16 +12,17 @@ import { PluginRepoRegistry__factory, PluginRepo__factory, } from '../../typechain'; - -import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; import {initializeDeploymentFixture} from '../test-utils/fixture'; - import { EXECUTE_PERMISSION_ID, MAINTAINER_PERMISSION_ID, ROOT_PERMISSION_ID, UPGRADE_PERMISSIONS, } from '../test-utils/permissions'; +import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; +import {expect} from 'chai'; +import hre, {ethers, deployments} from 'hardhat'; +import {Deployment} from 'hardhat-deploy/dist/types'; async function deployAll() { await initializeDeploymentFixture('New'); diff --git a/packages/contracts/test/deploy/updateTo1_3_0.ts b/packages/contracts/test/deploy/updateTo1_3_0.ts index a2ebadcf0..c37051379 100644 --- a/packages/contracts/test/deploy/updateTo1_3_0.ts +++ b/packages/contracts/test/deploy/updateTo1_3_0.ts @@ -1,12 +1,11 @@ -import {expect} from 'chai'; - -import {deployments} from 'hardhat'; import { ForkOsxVersion, initForkForOsxVersion, initializeDeploymentFixture, } from '../test-utils/fixture'; import {activeContractsList as v1_2_0_activeContracts} from '@aragon/osx-ethers-v1.2.0'; +import {expect} from 'chai'; +import {deployments} from 'hardhat'; const enableTest = process.env.TEST_UPDATE_DEPLOY_SCRIPT !== undefined; const network = 'mainnet'; diff --git a/packages/contracts/test/framework/dao/dao-factory.ts b/packages/contracts/test/framework/dao/dao-factory.ts index e11af5d77..cdd1e8a45 100644 --- a/packages/contracts/test/framework/dao/dao-factory.ts +++ b/packages/contracts/test/framework/dao/dao-factory.ts @@ -1,8 +1,4 @@ -import {expect} from 'chai'; -import {ethers} from 'hardhat'; -import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; -import {anyValue} from '@nomicfoundation/hardhat-chai-matchers/withArgs'; - +import adminMetadata from '../../../src/plugins/governance/admin/build-metadata.json'; import { DAORegistry, PluginSetupProcessor, @@ -29,35 +25,36 @@ import { PluginRepoRegistry__factory, } from '../../../typechain'; import {DAORegisteredEvent} from '../../../typechain/DAORegistry'; -import {InstallationPreparedEvent} from '../../../typechain/PluginSetupProcessor'; import {PluginRepoRegisteredEvent} from '../../../typechain/PluginRepoRegistry'; - -import {deployENSSubdomainRegistrar} from '../../test-utils/ens'; -import {deployPluginSetupProcessor} from '../../test-utils/plugin-setup-processor'; -import { - deployPluginRepoFactory, - deployPluginRepoRegistry, -} from '../../test-utils/repo'; -import adminMetadata from '../../../src/plugins/governance/admin/build-metadata.json'; - +import {InstallationPreparedEvent} from '../../../typechain/PluginSetupProcessor'; import {findEventTopicLog} from '../../../utils/event'; import {daoExampleURI, deployNewDAO} from '../../test-utils/dao'; +import {deployENSSubdomainRegistrar} from '../../test-utils/ens'; +import {getInterfaceID} from '../../test-utils/interfaces'; +import {deployPluginSetupProcessor} from '../../test-utils/plugin-setup-processor'; +import {CURRENT_PROTOCOL_VERSION} from '../../test-utils/protocol-version'; import {deployWithProxy} from '../../test-utils/proxy'; -import {getAppliedSetupId} from '../../test-utils/psp/hash-helpers'; -import {PluginRepoPointer} from '../../test-utils/psp/types'; import { createApplyInstallationParams, createApplyUninstallationParams, createApplyUpdateParams, createPrepareInstallationParams, } from '../../test-utils/psp/create-params'; +import {getAppliedSetupId} from '../../test-utils/psp/hash-helpers'; +import {PluginRepoPointer} from '../../test-utils/psp/types'; import { prepareInstallation, prepareUninstallation, prepareUpdate, } from '../../test-utils/psp/wrappers'; -import {getInterfaceID} from '../../test-utils/interfaces'; -import {CURRENT_PROTOCOL_VERSION} from '../../test-utils/protocol-version'; +import { + deployPluginRepoFactory, + deployPluginRepoRegistry, +} from '../../test-utils/repo'; +import {anyValue} from '@nomicfoundation/hardhat-chai-matchers/withArgs'; +import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; +import {expect} from 'chai'; +import {ethers} from 'hardhat'; const EVENTS = { PluginRepoRegistered: 'PluginRepoRegistered', diff --git a/packages/contracts/test/framework/dao/dao-registry.ts b/packages/contracts/test/framework/dao/dao-registry.ts index d0010b40b..8cf496f72 100644 --- a/packages/contracts/test/framework/dao/dao-registry.ts +++ b/packages/contracts/test/framework/dao/dao-registry.ts @@ -1,8 +1,3 @@ -import {expect} from 'chai'; -import {ethers} from 'hardhat'; -import {ContractFactory} from 'ethers'; - -import {ensDomainHash, ensLabelHash} from '../../../utils/ens'; import { DAO, DAORegistry, @@ -11,21 +6,24 @@ import { } from '../../../typechain'; import {DAORegistry__factory as DAORegistry_V1_0_0__factory} from '../../../typechain/@aragon/osx-v1.0.1/framework/dao/DAORegistry.sol'; import {DAORegistry__factory as DAORegistry_V1_3_0__factory} from '../../../typechain/@aragon/osx-v1.3.0-rc0.2/framework/dao/DAORegistry.sol'; - +import {ensDomainHash, ensLabelHash} from '../../../utils/ens'; import {deployNewDAO} from '../../test-utils/dao'; import {deployENSSubdomainRegistrar} from '../../test-utils/ens'; -import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; -import {deployWithProxy} from '../../test-utils/proxy'; import {UPGRADE_PERMISSIONS} from '../../test-utils/permissions'; +import { + CURRENT_PROTOCOL_VERSION, + IMPLICIT_INITIAL_PROTOCOL_VERSION, +} from '../../test-utils/protocol-version'; +import {deployWithProxy} from '../../test-utils/proxy'; import { getProtocolVersion, deployAndUpgradeFromToCheck, deployAndUpgradeSelfCheck, } from '../../test-utils/uups-upgradeable'; -import { - CURRENT_PROTOCOL_VERSION, - IMPLICIT_INITIAL_PROTOCOL_VERSION, -} from '../../test-utils/protocol-version'; +import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; +import {expect} from 'chai'; +import {ContractFactory} from 'ethers'; +import {ethers} from 'hardhat'; const EVENTS = { DAORegistered: 'DAORegistered', diff --git a/packages/contracts/test/framework/plugin/plugin-repo-factory.ts b/packages/contracts/test/framework/plugin/plugin-repo-factory.ts index 27afbaefa..2e297cdcc 100644 --- a/packages/contracts/test/framework/plugin/plugin-repo-factory.ts +++ b/packages/contracts/test/framework/plugin/plugin-repo-factory.ts @@ -1,14 +1,3 @@ -import {expect} from 'chai'; -import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; -import {ethers} from 'hardhat'; - -import { - deployMockPluginSetup, - deployPluginRepoRegistry, -} from '../../test-utils/repo'; -import {deployENSSubdomainRegistrar} from '../../test-utils/ens'; -import {deployNewDAO} from '../../test-utils/dao'; - import { PluginRepoRegistry, DAO, @@ -18,8 +7,17 @@ import { IProtocolVersion__factory, IERC165__factory, } from '../../../typechain'; +import {deployNewDAO} from '../../test-utils/dao'; +import {deployENSSubdomainRegistrar} from '../../test-utils/ens'; import {getInterfaceID} from '../../test-utils/interfaces'; import {CURRENT_PROTOCOL_VERSION} from '../../test-utils/protocol-version'; +import { + deployMockPluginSetup, + deployPluginRepoRegistry, +} from '../../test-utils/repo'; +import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; +import {expect} from 'chai'; +import {ethers} from 'hardhat'; const EVENTS = { PluginRepoRegistered: 'PluginRepoRegistered', diff --git a/packages/contracts/test/framework/plugin/plugin-repo-registry.ts b/packages/contracts/test/framework/plugin/plugin-repo-registry.ts index 727d39189..4552474bd 100644 --- a/packages/contracts/test/framework/plugin/plugin-repo-registry.ts +++ b/packages/contracts/test/framework/plugin/plugin-repo-registry.ts @@ -1,8 +1,3 @@ -import {expect} from 'chai'; -import {ethers} from 'hardhat'; -import {ContractFactory} from 'ethers'; - -import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; import { DAO, PluginRepo, @@ -12,22 +7,25 @@ import { } from '../../../typechain'; import {PluginRepoRegistry__factory as PluginRepoRegistry_V1_0_0__factory} from '../../../typechain/@aragon/osx-v1.0.1/framework/plugin/repo/PluginRepoRegistry.sol'; import {PluginRepoRegistry__factory as PluginRepoRegistry_V1_3_0__factory} from '../../../typechain/@aragon/osx-v1.3.0-rc0.2/framework/plugin/repo/PluginRepoRegistry.sol'; - +import {ensDomainHash} from '../../../utils/ens'; import {deployNewDAO} from '../../test-utils/dao'; -import {deployNewPluginRepo} from '../../test-utils/repo'; import {deployENSSubdomainRegistrar} from '../../test-utils/ens'; -import {ensDomainHash} from '../../../utils/ens'; -import {deployWithProxy} from '../../test-utils/proxy'; import {UPGRADE_PERMISSIONS} from '../../test-utils/permissions'; +import { + CURRENT_PROTOCOL_VERSION, + IMPLICIT_INITIAL_PROTOCOL_VERSION, +} from '../../test-utils/protocol-version'; +import {deployWithProxy} from '../../test-utils/proxy'; +import {deployNewPluginRepo} from '../../test-utils/repo'; import { getProtocolVersion, deployAndUpgradeFromToCheck, deployAndUpgradeSelfCheck, } from '../../test-utils/uups-upgradeable'; -import { - CURRENT_PROTOCOL_VERSION, - IMPLICIT_INITIAL_PROTOCOL_VERSION, -} from '../../test-utils/protocol-version'; +import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; +import {expect} from 'chai'; +import {ContractFactory} from 'ethers'; +import {ethers} from 'hardhat'; const EVENTS = { PluginRepoRegistered: 'PluginRepoRegistered', diff --git a/packages/contracts/test/framework/plugin/plugin-repo.ts b/packages/contracts/test/framework/plugin/plugin-repo.ts index 601cce3f4..787ebe14d 100644 --- a/packages/contracts/test/framework/plugin/plugin-repo.ts +++ b/packages/contracts/test/framework/plugin/plugin-repo.ts @@ -1,11 +1,5 @@ // This is an extension (adaptation) of the work at: // https://github.com/aragon/apm/blob/next/test/contracts/apm/apm_repo.js - -import {expect} from 'chai'; -import {ethers} from 'hardhat'; -import {ContractFactory} from 'ethers'; -import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; - import { PluginRepo, PluginRepo__factory, @@ -18,25 +12,27 @@ import { } from '../../../typechain'; import {PluginRepo__factory as PluginRepo_V1_0_0__factory} from '../../../typechain/@aragon/osx-v1.0.1/framework/plugin/repo/PluginRepo.sol'; import {PluginRepo__factory as PluginRepo_V1_3_0__factory} from '../../../typechain/@aragon/osx-v1.3.0-rc0.2/framework/plugin/repo/PluginRepo.sol'; - -import { - getProtocolVersion, - deployAndUpgradeFromToCheck, - deployAndUpgradeSelfCheck, -} from '../../test-utils/uups-upgradeable'; - -import { - deployMockPluginSetup, - deployNewPluginRepo, -} from '../../test-utils/repo'; -import {UPGRADE_PERMISSIONS} from '../../test-utils/permissions'; import {ZERO_BYTES32} from '../../test-utils/dao'; import {getInterfaceID} from '../../test-utils/interfaces'; +import {UPGRADE_PERMISSIONS} from '../../test-utils/permissions'; import { CURRENT_PROTOCOL_VERSION, IMPLICIT_INITIAL_PROTOCOL_VERSION, } from '../../test-utils/protocol-version'; import {tagHash} from '../../test-utils/psp/hash-helpers'; +import { + deployMockPluginSetup, + deployNewPluginRepo, +} from '../../test-utils/repo'; +import { + getProtocolVersion, + deployAndUpgradeFromToCheck, + deployAndUpgradeSelfCheck, +} from '../../test-utils/uups-upgradeable'; +import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; +import {expect} from 'chai'; +import {ContractFactory} from 'ethers'; +import {ethers} from 'hardhat'; const emptyBytes = '0x00'; const BUILD_METADATA = '0x11'; diff --git a/packages/contracts/test/framework/plugin/plugin-setup-processor.ts b/packages/contracts/test/framework/plugin/plugin-setup-processor.ts index 1350cc0a2..880dc9dac 100644 --- a/packages/contracts/test/framework/plugin/plugin-setup-processor.ts +++ b/packages/contracts/test/framework/plugin/plugin-setup-processor.ts @@ -1,9 +1,4 @@ -import {expect} from 'chai'; -import {ethers} from 'hardhat'; -import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; -import {anyValue} from '@nomicfoundation/hardhat-chai-matchers/withArgs'; import pluginUUPSUpgradeableArtifact from '../../../artifacts/src/core/plugin/PluginUUPSUpgradeable.sol/PluginUUPSUpgradeable.json'; - import { PluginSetupProcessor, PluginUUPSUpgradeableSetupV1Mock, @@ -33,26 +28,18 @@ import { PluginCloneableSetupV1MockBad__factory, } from '../../../typechain'; import {PluginRepoRegisteredEvent} from '../../../typechain/PluginRepoRegistry'; - -import {deployENSSubdomainRegistrar} from '../../test-utils/ens'; -import {deployNewDAO, ZERO_BYTES32} from '../../test-utils/dao'; -import {deployPluginSetupProcessor} from '../../test-utils/plugin-setup-processor'; import {findEventTopicLog} from '../../../utils/event'; import {Operation} from '../../../utils/types'; - -import { - mockPermissionsOperations, - mockHelpers, -} from '../../test-utils/psp/mock-helpers'; - +import {deployNewDAO, ZERO_BYTES32} from '../../test-utils/dao'; +import {deployENSSubdomainRegistrar} from '../../test-utils/ens'; +import {UPGRADE_PERMISSIONS} from '../../test-utils/permissions'; +import {deployPluginSetupProcessor} from '../../test-utils/plugin-setup-processor'; +import {CURRENT_PROTOCOL_VERSION} from '../../test-utils/protocol-version'; import { - prepareInstallation, - prepareUpdate, - prepareUninstallation, - applyInstallation, - applyUpdate, - applyUninstallation, -} from '../../test-utils/psp/wrappers'; + installPlugin, + updatePlugin, + uninstallPlugin, +} from '../../test-utils/psp/atomic-helpers'; import { createPrepareInstallationParams, createApplyInstallationParams, @@ -61,12 +48,15 @@ import { createPrepareUpdateParams, createApplyUpdateParams, } from '../../test-utils/psp/create-params'; - import { - deployPluginRepoFactory, - deployPluginRepoRegistry, -} from '../../test-utils/repo'; -import {BytesLike} from 'ethers'; + getAppliedSetupId, + getPluginInstallationId, + getPreparedSetupId, +} from '../../test-utils/psp/hash-helpers'; +import { + mockPermissionsOperations, + mockHelpers, +} from '../../test-utils/psp/mock-helpers'; import { PluginRepoPointer, PreparationType, @@ -74,18 +64,23 @@ import { } from '../../test-utils/psp/types'; import {PermissionOperation} from '../../test-utils/psp/types'; import { - getAppliedSetupId, - getPluginInstallationId, - getPreparedSetupId, -} from '../../test-utils/psp/hash-helpers'; -import {MockContract, smock} from '@defi-wonderland/smock'; + prepareInstallation, + prepareUpdate, + prepareUninstallation, + applyInstallation, + applyUpdate, + applyUninstallation, +} from '../../test-utils/psp/wrappers'; import { - installPlugin, - updatePlugin, - uninstallPlugin, -} from '../../test-utils/psp/atomic-helpers'; -import {UPGRADE_PERMISSIONS} from '../../test-utils/permissions'; -import {CURRENT_PROTOCOL_VERSION} from '../../test-utils/protocol-version'; + deployPluginRepoFactory, + deployPluginRepoRegistry, +} from '../../test-utils/repo'; +import {MockContract, smock} from '@defi-wonderland/smock'; +import {anyValue} from '@nomicfoundation/hardhat-chai-matchers/withArgs'; +import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; +import {expect} from 'chai'; +import {BytesLike} from 'ethers'; +import {ethers} from 'hardhat'; const EVENTS = { InstallationPrepared: 'InstallationPrepared', diff --git a/packages/contracts/test/framework/plugin/plugin-setup.ts b/packages/contracts/test/framework/plugin/plugin-setup.ts index d4527f77c..c5ce37451 100644 --- a/packages/contracts/test/framework/plugin/plugin-setup.ts +++ b/packages/contracts/test/framework/plugin/plugin-setup.ts @@ -1,6 +1,3 @@ -import {expect} from 'chai'; -import {ethers} from 'hardhat'; - import { IERC165__factory, IPluginSetup__factory, @@ -8,8 +5,10 @@ import { PluginCloneableSetupV1Mock, PluginCloneableSetupV1Mock__factory, } from '../../../typechain'; -import {CURRENT_PROTOCOL_VERSION} from '../../test-utils/protocol-version'; import {getInterfaceID} from '../../test-utils/interfaces'; +import {CURRENT_PROTOCOL_VERSION} from '../../test-utils/protocol-version'; +import {expect} from 'chai'; +import {ethers} from 'hardhat'; describe('PluginSetup', function () { let setupMock: PluginCloneableSetupV1Mock; diff --git a/packages/contracts/test/framework/utils/ens/ens-subdomain-registry.ts b/packages/contracts/test/framework/utils/ens/ens-subdomain-registry.ts index 47cbaf7fe..44e0638f7 100644 --- a/packages/contracts/test/framework/utils/ens/ens-subdomain-registry.ts +++ b/packages/contracts/test/framework/utils/ens/ens-subdomain-registry.ts @@ -1,8 +1,3 @@ -import {expect} from 'chai'; -import {ethers} from 'hardhat'; -import {ContractFactory} from 'ethers'; -import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; - import { ENSSubdomainRegistrar, DAO, @@ -14,22 +9,25 @@ import { } from '../../../../typechain'; import {ENSSubdomainRegistrar__factory as ENSSubdomainRegistrar_V1_0_0__factory} from '../../../../typechain/@aragon/osx-v1.0.1/framework/utils/ens/ENSSubdomainRegistrar.sol'; import {ENSSubdomainRegistrar__factory as ENSSubdomainRegistrar_V1_3_0__factory} from '../../../../typechain/@aragon/osx-v1.3.0-rc0.2/framework/utils/ens/ENSSubdomainRegistrar.sol'; - -import {deployWithProxy} from '../../../test-utils/proxy'; -import {deployNewDAO} from '../../../test-utils/dao'; import {ensDomainHash, ensLabelHash} from '../../../../utils/ens'; -import {OZ_ERRORS} from '../../../test-utils/error'; +import {deployNewDAO} from '../../../test-utils/dao'; import {setupResolver} from '../../../test-utils/ens'; +import {OZ_ERRORS} from '../../../test-utils/error'; import {UPGRADE_PERMISSIONS} from '../../../test-utils/permissions'; +import { + CURRENT_PROTOCOL_VERSION, + IMPLICIT_INITIAL_PROTOCOL_VERSION, +} from '../../../test-utils/protocol-version'; +import {deployWithProxy} from '../../../test-utils/proxy'; import { getProtocolVersion, deployAndUpgradeFromToCheck, deployAndUpgradeSelfCheck, } from '../../../test-utils/uups-upgradeable'; -import { - CURRENT_PROTOCOL_VERSION, - IMPLICIT_INITIAL_PROTOCOL_VERSION, -} from '../../../test-utils/protocol-version'; +import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; +import {expect} from 'chai'; +import {ContractFactory} from 'ethers'; +import {ethers} from 'hardhat'; const REGISTER_ENS_SUBDOMAIN_PERMISSION_ID = ethers.utils.id( 'REGISTER_ENS_SUBDOMAIN_PERMISSION' diff --git a/packages/contracts/test/framework/utils/interface-based-registry.ts b/packages/contracts/test/framework/utils/interface-based-registry.ts index f8f6459b3..7d839e578 100644 --- a/packages/contracts/test/framework/utils/interface-based-registry.ts +++ b/packages/contracts/test/framework/utils/interface-based-registry.ts @@ -1,8 +1,3 @@ -import {expect} from 'chai'; -import {ethers} from 'hardhat'; -import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; -import {deployWithProxy} from '../../test-utils/proxy'; - import { DAO, IDAO__factory, @@ -12,6 +7,10 @@ import { } from '../../../typechain'; import {deployNewDAO} from '../../test-utils/dao'; import {getInterfaceID} from '../../test-utils/interfaces'; +import {deployWithProxy} from '../../test-utils/proxy'; +import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; +import {expect} from 'chai'; +import {ethers} from 'hardhat'; const REGISTER_PERMISSION_ID = ethers.utils.id('REGISTER_PERMISSION'); diff --git a/packages/contracts/test/framework/utils/registry-utils.ts b/packages/contracts/test/framework/utils/registry-utils.ts index 56a907c4a..5408fec69 100644 --- a/packages/contracts/test/framework/utils/registry-utils.ts +++ b/packages/contracts/test/framework/utils/registry-utils.ts @@ -1,7 +1,7 @@ -import {expect} from 'chai'; -import {ethers} from 'hardhat'; import {RegistryUtils, RegistryUtils__factory} from '../../../typechain'; import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; +import {expect} from 'chai'; +import {ethers} from 'hardhat'; describe('RegistryUtils', () => { let registryUtilsContract: RegistryUtils; diff --git a/packages/contracts/test/framework/utils/token-factory.ts b/packages/contracts/test/framework/utils/token-factory.ts index 0781b388d..0bb69ea3c 100644 --- a/packages/contracts/test/framework/utils/token-factory.ts +++ b/packages/contracts/test/framework/utils/token-factory.ts @@ -1,8 +1,3 @@ -import chai, {expect} from 'chai'; -import {ethers} from 'hardhat'; -import {FakeContract, MockContract, smock} from '@defi-wonderland/smock'; -import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; - import { ActionExecute__factory, DAO, @@ -16,12 +11,15 @@ import { TokenFactory, TokenFactory__factory, } from '../../../typechain'; - -import {findEvent} from '../../../utils/event'; import { TokenCreatedEvent, WrappedTokenEvent, } from '../../../typechain/TokenFactory'; +import {findEvent} from '../../../utils/event'; +import {FakeContract, MockContract, smock} from '@defi-wonderland/smock'; +import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; +import chai, {expect} from 'chai'; +import {ethers} from 'hardhat'; const daoArtifactPath = 'src/core/dao/DAO.sol:DAO'; const governanceErc20ArtifactPath = diff --git a/packages/contracts/test/interfaces.ts b/packages/contracts/test/interfaces.ts index 5c327d6f7..12a8242bb 100644 --- a/packages/contracts/test/interfaces.ts +++ b/packages/contracts/test/interfaces.ts @@ -1,7 +1,3 @@ -import {expect} from 'chai'; - -import {getInterfaceID} from './test-utils/interfaces'; - import { // core IDAO__factory, @@ -9,41 +5,35 @@ import { IPermissionCondition__factory, IPlugin__factory, IMembership__factory, - IProposal__factory, - // framework + IProposal__factory, // framework IPluginRepo__factory, - IPluginSetup__factory, - // plugins + IPluginSetup__factory, // plugins IMajorityVoting__factory, IMultisig__factory, IMerkleMinter__factory, - IMerkleDistributor__factory, - // token + IMerkleDistributor__factory, // token IERC20MintableUpgradeable__factory, - IGovernanceWrappedERC20__factory, - // utils + IGovernanceWrappedERC20__factory, // utils IProtocolVersion__factory, } from '../typechain'; - import {IDAO__factory as IDAO_V1_0_0__factory} from '../typechain/@aragon/osx-v1.0.1/core/dao/IDAO.sol'; import {IEIP4824__factory as IEIP4824_V1_0_0__factory} from '../typechain/@aragon/osx-v1.0.1/core/dao/IEIP4824.sol'; import {IPermissionCondition__factory as IPermissionCondition_V1_0_0__factory} from '../typechain/@aragon/osx-v1.0.1/core/permission/IPermissionCondition.sol'; import {IPlugin__factory as IPlugin_V1_0_0__factory} from '../typechain/@aragon/osx-v1.0.1/core/plugin/IPlugin.sol'; import {IMembership__factory as IMembership_V1_0_0__factory} from '../typechain/@aragon/osx-v1.0.1/core/plugin/membership/IMembership.sol'; import {IProposal__factory as IProposal_V1_0_0__factory} from '../typechain/@aragon/osx-v1.0.1/core/plugin/proposal/IProposal.sol'; - import {IPluginRepo__factory as IPluginRepo_V1_0_0__factory} from '../typechain/@aragon/osx-v1.0.1/framework/plugin/repo/IPluginRepo.sol'; import {IPluginSetup__factory as IPluginSetup_V1_0_0__factory} from '../typechain/@aragon/osx-v1.0.1/framework/plugin/setup/IPluginSetup.sol'; - import {IMajorityVoting__factory as IMajorityVoting_V1_0_0__factory} from '../typechain/@aragon/osx-v1.0.1/plugins/governance/majority-voting/IMajorityVoting.sol'; import {IMultisig__factory as IMultisig_V1_0_0__factory} from '../typechain/@aragon/osx-v1.0.1/plugins/governance/multisig/IMultisig.sol'; -import {IMerkleMinter__factory as IMerkleMinter_V1_0_0__factory} from '../typechain/@aragon/osx-v1.0.1/plugins/token/IMerkleMinter.sol'; import {IMerkleDistributor__factory as IMerkleDistributor_V1_0_0__factory} from '../typechain/@aragon/osx-v1.0.1/plugins/token/IMerkleDistributor.sol'; - +import {IMerkleMinter__factory as IMerkleMinter_V1_0_0__factory} from '../typechain/@aragon/osx-v1.0.1/plugins/token/IMerkleMinter.sol'; import {IERC20MintableUpgradeable__factory as IERC20MintableUpgradeable_V1_0_0__factory} from '../typechain/@aragon/osx-v1.0.1/token/ERC20/IERC20MintableUpgradeable.sol'; -import {IGovernanceWrappedERC20__factory as IGovernanceWrappedERC20_V1_0_0__factory} from '../typechain/@aragon/osx-v1.0.1/token/ERC20/governance/IGovernanceWrappedERC20.sol'; // TODO: For some reason this file is missing. - +import {IGovernanceWrappedERC20__factory as IGovernanceWrappedERC20_V1_0_0__factory} from '../typechain/@aragon/osx-v1.0.1/token/ERC20/governance/IGovernanceWrappedERC20.sol'; +// TODO: For some reason this file is missing. import {IProtocolVersion__factory as IProtocolVersion_V1_3_0__factory} from '../typechain/@aragon/osx-v1.3.0-rc0.2/utils/protocol/IProtocolVersion.sol'; +import {getInterfaceID} from './test-utils/interfaces'; +import {expect} from 'chai'; describe('Interfaces', function () { context('introduced in v1.0.0', function () { diff --git a/packages/contracts/test/plugins/counter-example/counter-plugin-setup.ts b/packages/contracts/test/plugins/counter-example/counter-plugin-setup.ts index 0aaf2f90a..c9eb869f3 100644 --- a/packages/contracts/test/plugins/counter-example/counter-plugin-setup.ts +++ b/packages/contracts/test/plugins/counter-example/counter-plugin-setup.ts @@ -1,8 +1,3 @@ -import {expect} from 'chai'; -import {BigNumberish} from 'ethers'; -import {ethers} from 'hardhat'; -import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; - import { DAOMock, CounterV1PluginSetup, @@ -15,6 +10,10 @@ import { DAOMock__factory, } from '../../../typechain'; import {Operation} from '../../../utils/types'; +import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; +import {expect} from 'chai'; +import {BigNumberish} from 'ethers'; +import {ethers} from 'hardhat'; const abiCoder = ethers.utils.defaultAbiCoder; const AddressZero = ethers.constants.AddressZero; diff --git a/packages/contracts/test/plugins/governance/admin/admin-setup.ts b/packages/contracts/test/plugins/governance/admin/admin-setup.ts index a01b5b21d..aceeded9f 100644 --- a/packages/contracts/test/plugins/governance/admin/admin-setup.ts +++ b/packages/contracts/test/plugins/governance/admin/admin-setup.ts @@ -1,16 +1,15 @@ -import {expect} from 'chai'; -import {ethers} from 'hardhat'; - -import {Operation} from '../../../../utils/types'; +import metadata from '../../../../src/plugins/governance/admin/build-metadata.json'; import { AdminSetup, AdminSetup__factory, Admin__factory, } from '../../../../typechain'; +import {getNamedTypesFromMetadata} from '../../../../utils/metadata'; +import {Operation} from '../../../../utils/types'; import {deployNewDAO} from '../../../test-utils/dao'; import {ADMIN_INTERFACE, getInterfaceID} from '../../../test-utils/interfaces'; -import metadata from '../../../../src/plugins/governance/admin/build-metadata.json'; -import {getNamedTypesFromMetadata} from '../../../../utils/metadata'; +import {expect} from 'chai'; +import {ethers} from 'hardhat'; const abiCoder = ethers.utils.defaultAbiCoder; const AddressZero = ethers.constants.AddressZero; diff --git a/packages/contracts/test/plugins/governance/admin/admin.ts b/packages/contracts/test/plugins/governance/admin/admin.ts index 44096a9d9..83e641240 100644 --- a/packages/contracts/test/plugins/governance/admin/admin.ts +++ b/packages/contracts/test/plugins/governance/admin/admin.ts @@ -1,20 +1,4 @@ -import {expect} from 'chai'; -import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; -import {ethers} from 'hardhat'; - -import { - findEvent, - DAO_EVENTS, - PROPOSAL_EVENTS, - MEMBERSHIP_EVENTS, - findEventTopicLog, -} from '../../../../utils/event'; -import {deployNewDAO} from '../../../test-utils/dao'; -import {ADMIN_INTERFACE, getInterfaceID} from '../../../test-utils/interfaces'; import {ADMIN_INTERFACE_ID} from '../../../../../subgraph/src/utils/constants'; - -import {OZ_ERRORS} from '../../../test-utils/error'; -import {toBytes32} from '../../../test-utils/voting'; import { CloneFactory, CloneFactory__factory, @@ -28,6 +12,20 @@ import { } from '../../../../typechain'; import {ProposalCreatedEvent} from '../../../../typechain/Admin'; import {ExecutedEvent} from '../../../../typechain/IDAO'; +import { + findEvent, + DAO_EVENTS, + PROPOSAL_EVENTS, + MEMBERSHIP_EVENTS, + findEventTopicLog, +} from '../../../../utils/event'; +import {deployNewDAO} from '../../../test-utils/dao'; +import {OZ_ERRORS} from '../../../test-utils/error'; +import {ADMIN_INTERFACE, getInterfaceID} from '../../../test-utils/interfaces'; +import {toBytes32} from '../../../test-utils/voting'; +import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; +import {expect} from 'chai'; +import {ethers} from 'hardhat'; // Permissions const EXECUTE_PROPOSAL_PERMISSION_ID = ethers.utils.id( diff --git a/packages/contracts/test/plugins/governance/majority-voting/addresslist/addresslist-voting-setup.ts b/packages/contracts/test/plugins/governance/majority-voting/addresslist/addresslist-voting-setup.ts index c97549325..103d147f0 100644 --- a/packages/contracts/test/plugins/governance/majority-voting/addresslist/addresslist-voting-setup.ts +++ b/packages/contracts/test/plugins/governance/majority-voting/addresslist/addresslist-voting-setup.ts @@ -1,26 +1,25 @@ -import {expect} from 'chai'; -import {ethers} from 'hardhat'; -import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; - +import metadata from '../../../../../src/plugins/governance/majority-voting/addresslist/build-metadata.json'; import { AddresslistVotingSetup, AddresslistVotingSetup__factory, AddresslistVoting__factory, } from '../../../../../typechain'; +import {getNamedTypesFromMetadata} from '../../../../../utils/metadata'; +import {Operation} from '../../../../../utils/types'; import {deployNewDAO} from '../../../../test-utils/dao'; import { ADDRESSLIST_VOTING_INTERFACE, getInterfaceID, } from '../../../../test-utils/interfaces'; -import {Operation} from '../../../../../utils/types'; import { VotingSettings, VotingMode, pctToRatio, ONE_HOUR, } from '../../../../test-utils/voting'; -import metadata from '../../../../../src/plugins/governance/majority-voting/addresslist/build-metadata.json'; -import {getNamedTypesFromMetadata} from '../../../../../utils/metadata'; +import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; +import {expect} from 'chai'; +import {ethers} from 'hardhat'; let defaultData: any; let defaultVotingSettings: VotingSettings; diff --git a/packages/contracts/test/plugins/governance/majority-voting/addresslist/addresslist-voting.ts b/packages/contracts/test/plugins/governance/majority-voting/addresslist/addresslist-voting.ts index ce0055b69..56729152b 100644 --- a/packages/contracts/test/plugins/governance/majority-voting/addresslist/addresslist-voting.ts +++ b/packages/contracts/test/plugins/governance/majority-voting/addresslist/addresslist-voting.ts @@ -1,8 +1,4 @@ -import {expect} from 'chai'; -import {ethers} from 'hardhat'; -import {ContractFactory} from 'ethers'; -import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; - +import {ADDRESSLIST_VOTING_INTERFACE_ID} from '../../../../../../subgraph/src/utils/constants'; import { AddresslistVoting, AddresslistVoting__factory, @@ -18,13 +14,11 @@ import { } from '../../../../../typechain'; import {AddresslistVoting__factory as AddresslistVoting_V1_0_0__factory} from '../../../../../typechain/@aragon/osx-v1.0.1/plugins/governance/majority-voting/addresslist/AddresslistVoting.sol'; import {AddresslistVoting__factory as AddresslistVoting_V1_3_0__factory} from '../../../../../typechain/@aragon/osx-v1.3.0-rc0.2/plugins/governance/majority-voting/addresslist/AddresslistVoting.sol'; - import { ProposalCreatedEvent, ProposalExecutedEvent, } from '../../../../../typechain/AddresslistVoting'; -import {majorityVotingBaseInterface} from '../majority-voting'; - +import {ExecutedEvent} from '../../../../../typechain/DAO'; import { findEvent, findEventTopicLog, @@ -33,6 +27,23 @@ import { PROPOSAL_EVENTS, MEMBERSHIP_EVENTS, } from '../../../../../utils/event'; +import {deployNewDAO} from '../../../../test-utils/dao'; +import {OZ_ERRORS} from '../../../../test-utils/error'; +import { + ADDRESSLIST_VOTING_INTERFACE, + getInterfaceID, +} from '../../../../test-utils/interfaces'; +import {UPGRADE_PERMISSIONS} from '../../../../test-utils/permissions'; +import { + CURRENT_PROTOCOL_VERSION, + IMPLICIT_INITIAL_PROTOCOL_VERSION, +} from '../../../../test-utils/protocol-version'; +import {deployWithProxy} from '../../../../test-utils/proxy'; +import { + getProtocolVersion, + deployAndUpgradeFromToCheck, + deployAndUpgradeSelfCheck, +} from '../../../../test-utils/uups-upgradeable'; import { VoteOption, pctToRatio, @@ -46,26 +57,11 @@ import { voteWithSigners, toBytes32, } from '../../../../test-utils/voting'; -import {deployNewDAO} from '../../../../test-utils/dao'; -import {OZ_ERRORS} from '../../../../test-utils/error'; -import {UPGRADE_PERMISSIONS} from '../../../../test-utils/permissions'; -import {deployWithProxy} from '../../../../test-utils/proxy'; -import { - ADDRESSLIST_VOTING_INTERFACE, - getInterfaceID, -} from '../../../../test-utils/interfaces'; -import {ADDRESSLIST_VOTING_INTERFACE_ID} from '../../../../../../subgraph/src/utils/constants'; - -import { - getProtocolVersion, - deployAndUpgradeFromToCheck, - deployAndUpgradeSelfCheck, -} from '../../../../test-utils/uups-upgradeable'; -import { - CURRENT_PROTOCOL_VERSION, - IMPLICIT_INITIAL_PROTOCOL_VERSION, -} from '../../../../test-utils/protocol-version'; -import {ExecutedEvent} from '../../../../../typechain/DAO'; +import {majorityVotingBaseInterface} from '../majority-voting'; +import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; +import {expect} from 'chai'; +import {ContractFactory} from 'ethers'; +import {ethers} from 'hardhat'; describe('AddresslistVoting', function () { let signers: SignerWithAddress[]; diff --git a/packages/contracts/test/plugins/governance/majority-voting/majority-voting.ts b/packages/contracts/test/plugins/governance/majority-voting/majority-voting.ts index 7c4379170..0bdd77928 100644 --- a/packages/contracts/test/plugins/governance/majority-voting/majority-voting.ts +++ b/packages/contracts/test/plugins/governance/majority-voting/majority-voting.ts @@ -1,7 +1,3 @@ -import {expect} from 'chai'; -import {ethers} from 'hardhat'; -import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; - import { MajorityVotingMock, DAO, @@ -14,6 +10,10 @@ import { IProtocolVersion__factory, } from '../../../../typechain'; import {VOTING_EVENTS} from '../../../../utils/event'; +import {daoExampleURI} from '../../../test-utils/dao'; +import {OZ_ERRORS} from '../../../test-utils/error'; +import {getInterfaceID} from '../../../test-utils/interfaces'; +import {deployWithProxy} from '../../../test-utils/proxy'; import { VotingSettings, VotingMode, @@ -21,10 +21,9 @@ import { ONE_HOUR, ONE_YEAR, } from '../../../test-utils/voting'; -import {deployWithProxy} from '../../../test-utils/proxy'; -import {OZ_ERRORS} from '../../../test-utils/error'; -import {daoExampleURI} from '../../../test-utils/dao'; -import {getInterfaceID} from '../../../test-utils/interfaces'; +import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; +import {expect} from 'chai'; +import {ethers} from 'hardhat'; export const majorityVotingBaseInterface = new ethers.utils.Interface([ 'function minDuration()', diff --git a/packages/contracts/test/plugins/governance/majority-voting/token/token-voting-setup.ts b/packages/contracts/test/plugins/governance/majority-voting/token/token-voting-setup.ts index 39275b024..575120fb9 100644 --- a/packages/contracts/test/plugins/governance/majority-voting/token/token-voting-setup.ts +++ b/packages/contracts/test/plugins/governance/majority-voting/token/token-voting-setup.ts @@ -1,7 +1,4 @@ -import {expect} from 'chai'; -import {ethers} from 'hardhat'; -import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; - +import metadata from '../../../../../src/plugins/governance/majority-voting/token/build-metadata.json'; import { ERC20, ERC20__factory, @@ -13,21 +10,22 @@ import { TokenVotingSetup__factory, TokenVoting__factory, } from '../../../../../typechain'; +import {getNamedTypesFromMetadata} from '../../../../../utils/metadata'; +import {Operation} from '../../../../../utils/types'; import {deployNewDAO} from '../../../../test-utils/dao'; import { TOKEN_VOTING_INTERFACE, getInterfaceID, } from '../../../../test-utils/interfaces'; -import {Operation} from '../../../../../utils/types'; -import metadata from '../../../../../src/plugins/governance/majority-voting/token/build-metadata.json'; - import { VotingSettings, VotingMode, pctToRatio, ONE_HOUR, } from '../../../../test-utils/voting'; -import {getNamedTypesFromMetadata} from '../../../../../utils/metadata'; +import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; +import {expect} from 'chai'; +import {ethers} from 'hardhat'; let defaultData: any; let defaultVotingSettings: VotingSettings; diff --git a/packages/contracts/test/plugins/governance/majority-voting/token/token-voting.ts b/packages/contracts/test/plugins/governance/majority-voting/token/token-voting.ts index 91aa105d1..f980c2510 100644 --- a/packages/contracts/test/plugins/governance/majority-voting/token/token-voting.ts +++ b/packages/contracts/test/plugins/governance/majority-voting/token/token-voting.ts @@ -1,8 +1,4 @@ -import {expect} from 'chai'; -import {ethers} from 'hardhat'; -import {BigNumber, ContractFactory} from 'ethers'; -import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; - +import {TOKEN_VOTING_INTERFACE_ID} from '../../../../../../subgraph/src/utils/constants'; import { DAO, DAO__factory, @@ -19,12 +15,11 @@ import { } from '../../../../../typechain'; import {TokenVoting__factory as TokenVoting_V1_0_0__factory} from '../../../../../typechain/@aragon/osx-v1.0.1/plugins/governance/majority-voting/token/TokenVoting.sol'; import {TokenVoting__factory as TokenVoting_V1_3_0__factory} from '../../../../../typechain/@aragon/osx-v1.3.0-rc0.2/plugins/governance/majority-voting/token/TokenVoting.sol'; - +import {ExecutedEvent} from '../../../../../typechain/DAO'; import { ProposalCreatedEvent, ProposalExecutedEvent, } from '../../../../../typechain/TokenVoting'; - import { findEvent, findEventTopicLog, @@ -33,6 +28,23 @@ import { PROPOSAL_EVENTS, MEMBERSHIP_EVENTS, } from '../../../../../utils/event'; +import {deployNewDAO} from '../../../../test-utils/dao'; +import {OZ_ERRORS} from '../../../../test-utils/error'; +import { + TOKEN_VOTING_INTERFACE, + getInterfaceID, +} from '../../../../test-utils/interfaces'; +import {UPGRADE_PERMISSIONS} from '../../../../test-utils/permissions'; +import { + CURRENT_PROTOCOL_VERSION, + IMPLICIT_INITIAL_PROTOCOL_VERSION, +} from '../../../../test-utils/protocol-version'; +import {deployWithProxy} from '../../../../test-utils/proxy'; +import { + getProtocolVersion, + deployAndUpgradeFromToCheck, + deployAndUpgradeSelfCheck, +} from '../../../../test-utils/uups-upgradeable'; import { VoteOption, pctToRatio, @@ -47,27 +59,11 @@ import { voteWithSigners, toBytes32, } from '../../../../test-utils/voting'; -import {deployNewDAO} from '../../../../test-utils/dao'; -import {OZ_ERRORS} from '../../../../test-utils/error'; -import {deployWithProxy} from '../../../../test-utils/proxy'; -import { - TOKEN_VOTING_INTERFACE, - getInterfaceID, -} from '../../../../test-utils/interfaces'; -import {TOKEN_VOTING_INTERFACE_ID} from '../../../../../../subgraph/src/utils/constants'; - -import {UPGRADE_PERMISSIONS} from '../../../../test-utils/permissions'; -import { - getProtocolVersion, - deployAndUpgradeFromToCheck, - deployAndUpgradeSelfCheck, -} from '../../../../test-utils/uups-upgradeable'; import {majorityVotingBaseInterface} from '../majority-voting'; -import { - CURRENT_PROTOCOL_VERSION, - IMPLICIT_INITIAL_PROTOCOL_VERSION, -} from '../../../../test-utils/protocol-version'; -import {ExecutedEvent} from '../../../../../typechain/DAO'; +import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; +import {expect} from 'chai'; +import {BigNumber, ContractFactory} from 'ethers'; +import {ethers} from 'hardhat'; describe('TokenVoting', function () { let signers: SignerWithAddress[]; diff --git a/packages/contracts/test/plugins/governance/multisig/multisig-setup.ts b/packages/contracts/test/plugins/governance/multisig/multisig-setup.ts index 79fa52e78..c855cd28d 100644 --- a/packages/contracts/test/plugins/governance/multisig/multisig-setup.ts +++ b/packages/contracts/test/plugins/governance/multisig/multisig-setup.ts @@ -1,6 +1,4 @@ -import {expect} from 'chai'; -import {ethers} from 'hardhat'; - +import metadata from '../../../../src/plugins/governance/multisig/build-metadata.json'; import { DAO, InterfaceBasedRegistryMock, @@ -15,23 +13,24 @@ import { PluginSetupProcessor, PluginSetupProcessor__factory, } from '../../../../typechain'; +import { + InstallationPreparedEvent, + UpdatePreparedEvent, +} from '../../../../typechain/PluginSetupProcessor'; +import {findEvent} from '../../../../utils/event'; +import {getNamedTypesFromMetadata} from '../../../../utils/metadata'; +import {hashHelpers} from '../../../../utils/psp'; +import {Operation} from '../../../../utils/types'; import {deployNewDAO} from '../../../test-utils/dao'; import { MULTISIG_INTERFACE, getInterfaceID, } from '../../../test-utils/interfaces'; -import {Operation} from '../../../../utils/types'; -import metadata from '../../../../src/plugins/governance/multisig/build-metadata.json'; -import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; -import {MultisigSettings} from './multisig'; import {deployWithProxy} from '../../../test-utils/proxy'; -import {findEvent} from '../../../../utils/event'; -import { - InstallationPreparedEvent, - UpdatePreparedEvent, -} from '../../../../typechain/PluginSetupProcessor'; -import {hashHelpers} from '../../../../utils/psp'; -import {getNamedTypesFromMetadata} from '../../../../utils/metadata'; +import {MultisigSettings} from './multisig'; +import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; +import {expect} from 'chai'; +import {ethers} from 'hardhat'; const abiCoder = ethers.utils.defaultAbiCoder; const AddressZero = ethers.constants.AddressZero; diff --git a/packages/contracts/test/plugins/governance/multisig/multisig.ts b/packages/contracts/test/plugins/governance/multisig/multisig.ts index 06303f533..fd2e57c1f 100644 --- a/packages/contracts/test/plugins/governance/multisig/multisig.ts +++ b/packages/contracts/test/plugins/governance/multisig/multisig.ts @@ -1,8 +1,4 @@ -import {expect} from 'chai'; -import {ethers} from 'hardhat'; -import {Contract, ContractFactory} from 'ethers'; -import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; - +import {MULTISIG_INTERFACE_ID} from '../../../../../subgraph/src/utils/constants'; import { Addresslist__factory, DAO, @@ -18,13 +14,12 @@ import { } from '../../../../typechain'; import {Multisig__factory as Multisig_V1_0_0__factory} from '../../../../typechain/@aragon/osx-v1.0.1/plugins/governance/multisig/Multisig.sol'; import {Multisig__factory as Multisig_V1_3_0__factory} from '../../../../typechain/@aragon/osx-v1.3.0-rc0.2/plugins/governance/multisig/Multisig.sol'; - +import {ExecutedEvent} from '../../../../typechain/DAO'; +import {ProposalCreatedEvent} from '../../../../typechain/IProposal'; import { ApprovedEvent, ProposalExecutedEvent, } from '../../../../typechain/Multisig'; -import {ProposalCreatedEvent} from '../../../../typechain/IProposal'; - import { findEvent, findEventTopicLog, @@ -35,30 +30,32 @@ import { } from '../../../../utils/event'; import {deployNewDAO} from '../../../test-utils/dao'; import {OZ_ERRORS} from '../../../test-utils/error'; -import { - advanceTime, - getTime, - setTimeForNextBlock, - timestampIn, - toBytes32, -} from '../../../test-utils/voting'; -import {UPGRADE_PERMISSIONS} from '../../../test-utils/permissions'; -import {deployWithProxy} from '../../../test-utils/proxy'; import { MULTISIG_INTERFACE, getInterfaceID, } from '../../../test-utils/interfaces'; -import {MULTISIG_INTERFACE_ID} from '../../../../../subgraph/src/utils/constants'; +import {UPGRADE_PERMISSIONS} from '../../../test-utils/permissions'; +import { + CURRENT_PROTOCOL_VERSION, + IMPLICIT_INITIAL_PROTOCOL_VERSION, +} from '../../../test-utils/protocol-version'; +import {deployWithProxy} from '../../../test-utils/proxy'; import { getProtocolVersion, deployAndUpgradeFromToCheck, deployAndUpgradeSelfCheck, } from '../../../test-utils/uups-upgradeable'; import { - CURRENT_PROTOCOL_VERSION, - IMPLICIT_INITIAL_PROTOCOL_VERSION, -} from '../../../test-utils/protocol-version'; -import {ExecutedEvent} from '../../../../typechain/DAO'; + advanceTime, + getTime, + setTimeForNextBlock, + timestampIn, + toBytes32, +} from '../../../test-utils/voting'; +import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; +import {expect} from 'chai'; +import {Contract, ContractFactory} from 'ethers'; +import {ethers} from 'hardhat'; export type MultisigSettings = { minApprovals: number; diff --git a/packages/contracts/test/plugins/token/distribution/merkle-distributor.ts b/packages/contracts/test/plugins/token/distribution/merkle-distributor.ts index cc2f09ae7..7b94a4128 100644 --- a/packages/contracts/test/plugins/token/distribution/merkle-distributor.ts +++ b/packages/contracts/test/plugins/token/distribution/merkle-distributor.ts @@ -1,10 +1,4 @@ // Copied and modified from: https://github.com/Uniswap/merkle-distributor/blob/master/test/MerkleDistributor.spec.ts - -import {expect} from 'chai'; -import {ethers} from 'hardhat'; -import {BigNumber, ContractFactory} from 'ethers'; -import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; - import { MerkleDistributor, DAO, @@ -18,21 +12,24 @@ import { } from '../../../../typechain'; import {MerkleDistributor__factory as MerkleDistributor_V1_0_0__factory} from '../../../../typechain/@aragon/osx-v1.0.1/plugins/token/MerkleDistributor.sol'; import {MerkleDistributor__factory as MerkleDistributor_V1_3_0__factory} from '../../../../typechain/@aragon/osx-v1.3.0-rc0.2/plugins/token/MerkleDistributor.sol'; - -import {deployWithProxy} from '../../../test-utils/proxy'; -import BalanceTree from './src/balance-tree'; import {deployNewDAO} from '../../../test-utils/dao'; import {getInterfaceID} from '../../../test-utils/interfaces'; import {UPGRADE_PERMISSIONS} from '../../../test-utils/permissions'; +import { + CURRENT_PROTOCOL_VERSION, + IMPLICIT_INITIAL_PROTOCOL_VERSION, +} from '../../../test-utils/protocol-version'; +import {deployWithProxy} from '../../../test-utils/proxy'; import { getProtocolVersion, deployAndUpgradeFromToCheck, deployAndUpgradeSelfCheck, } from '../../../test-utils/uups-upgradeable'; -import { - CURRENT_PROTOCOL_VERSION, - IMPLICIT_INITIAL_PROTOCOL_VERSION, -} from '../../../test-utils/protocol-version'; +import BalanceTree from './src/balance-tree'; +import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; +import {expect} from 'chai'; +import {BigNumber, ContractFactory} from 'ethers'; +import {ethers} from 'hardhat'; const ZERO_BYTES32 = `0x${`0`.repeat(64)}`; diff --git a/packages/contracts/test/plugins/token/distribution/merkle-minter.ts b/packages/contracts/test/plugins/token/distribution/merkle-minter.ts index a6892140d..93d321dcb 100644 --- a/packages/contracts/test/plugins/token/distribution/merkle-minter.ts +++ b/packages/contracts/test/plugins/token/distribution/merkle-minter.ts @@ -1,10 +1,4 @@ // Copied and modified from: https://github.com/Uniswap/merkle-distributor/blob/master/test/MerkleDistributor.spec.ts - -import {expect} from 'chai'; -import {ethers} from 'hardhat'; -import {BigNumber, ContractFactory} from 'ethers'; -import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; - import { MerkleMinter, MerkleDistributor, @@ -20,21 +14,24 @@ import { } from '../../../../typechain'; import {MerkleMinter__factory as MerkleMinter_V1_0_0__factory} from '../../../../typechain/@aragon/osx-v1.0.1/plugins/token/MerkleMinter.sol'; import {MerkleMinter__factory as MerkleMinter_V1_3_0__factory} from '../../../../typechain/@aragon/osx-v1.3.0-rc0.2/plugins/token/MerkleMinter.sol'; - -import BalanceTree from './src/balance-tree'; import {deployNewDAO} from '../../../test-utils/dao'; -import {deployWithProxy} from '../../../test-utils/proxy'; import {getInterfaceID} from '../../../test-utils/interfaces'; import {UPGRADE_PERMISSIONS} from '../../../test-utils/permissions'; +import { + CURRENT_PROTOCOL_VERSION, + IMPLICIT_INITIAL_PROTOCOL_VERSION, +} from '../../../test-utils/protocol-version'; +import {deployWithProxy} from '../../../test-utils/proxy'; import { getProtocolVersion, deployAndUpgradeFromToCheck, deployAndUpgradeSelfCheck, } from '../../../test-utils/uups-upgradeable'; -import { - CURRENT_PROTOCOL_VERSION, - IMPLICIT_INITIAL_PROTOCOL_VERSION, -} from '../../../test-utils/protocol-version'; +import BalanceTree from './src/balance-tree'; +import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; +import {expect} from 'chai'; +import {BigNumber, ContractFactory} from 'ethers'; +import {ethers} from 'hardhat'; const MERKLE_MINT_PERMISSION_ID = ethers.utils.id('MERKLE_MINT_PERMISSION'); const MINT_PERMISSION_ID = ethers.utils.id('MINT_PERMISSION'); diff --git a/packages/contracts/test/plugins/token/distribution/src/balance-tree.ts b/packages/contracts/test/plugins/token/distribution/src/balance-tree.ts index d8f98a707..a3d675961 100644 --- a/packages/contracts/test/plugins/token/distribution/src/balance-tree.ts +++ b/packages/contracts/test/plugins/token/distribution/src/balance-tree.ts @@ -1,5 +1,6 @@ -import {BigNumber, utils} from 'ethers'; import MerkleTree from './merkle-tree'; +import {BigNumber, utils} from 'ethers'; + export default class BalanceTree { private readonly tree: MerkleTree; constructor(balances: {account: string; amount: BigNumber}[]) { diff --git a/packages/contracts/test/plugins/utils/addresslist.ts b/packages/contracts/test/plugins/utils/addresslist.ts index e834bcec0..dbbe15b1a 100644 --- a/packages/contracts/test/plugins/utils/addresslist.ts +++ b/packages/contracts/test/plugins/utils/addresslist.ts @@ -1,8 +1,7 @@ +import {AddresslistMock, AddresslistMock__factory} from '../../../typechain'; +import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; import {expect} from 'chai'; import {ethers} from 'hardhat'; -import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; - -import {AddresslistMock, AddresslistMock__factory} from '../../../typechain'; describe('AddresslistMock', function () { let signers: SignerWithAddress[]; diff --git a/packages/contracts/test/plugins/utils/ratio.ts b/packages/contracts/test/plugins/utils/ratio.ts index 0405d1e52..262b345bd 100644 --- a/packages/contracts/test/plugins/utils/ratio.ts +++ b/packages/contracts/test/plugins/utils/ratio.ts @@ -1,8 +1,7 @@ -import {expect} from 'chai'; -import {ethers} from 'hardhat'; - import {RatioTest, RatioTest__factory} from '../../../typechain'; import {pctToRatio, RATIO_BASE} from '../../test-utils/voting'; +import {expect} from 'chai'; +import {ethers} from 'hardhat'; describe('Ratio', function () { let ratio: RatioTest; diff --git a/packages/contracts/test/test-utils/bitmap.ts b/packages/contracts/test/test-utils/bitmap.ts index 04f00f277..e9de19469 100644 --- a/packages/contracts/test/test-utils/bitmap.ts +++ b/packages/contracts/test/test-utils/bitmap.ts @@ -1,5 +1,5 @@ -import {ethers} from 'hardhat'; import {BigNumber} from 'ethers'; +import {ethers} from 'hardhat'; // @ts-ignore export function flipBit(index: number, num: BigNumber) { diff --git a/packages/contracts/test/test-utils/dao.ts b/packages/contracts/test/test-utils/dao.ts index 202f5b7dc..e8ddcbb3b 100644 --- a/packages/contracts/test/test-utils/dao.ts +++ b/packages/contracts/test/test-utils/dao.ts @@ -1,5 +1,3 @@ -import {BigNumber} from 'ethers'; -import {ethers} from 'hardhat'; import { DAO, ActionExecute__factory, @@ -10,6 +8,8 @@ import { } from '../../typechain'; import {deployWithProxy} from './proxy'; import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; +import {BigNumber} from 'ethers'; +import {ethers} from 'hardhat'; export const ZERO_BYTES32 = '0x0000000000000000000000000000000000000000000000000000000000000000'; diff --git a/packages/contracts/test/test-utils/ens.ts b/packages/contracts/test/test-utils/ens.ts index f1093a2a5..69ce3dba4 100644 --- a/packages/contracts/test/test-utils/ens.ts +++ b/packages/contracts/test/test-utils/ens.ts @@ -1,8 +1,3 @@ -import {ethers} from 'hardhat'; -import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; -import {deployWithProxy} from './proxy'; - -import {ensDomainHash, ensLabelHash, setupENS} from '../../utils/ens'; import { DAO, ENSSubdomainRegistrar, @@ -14,6 +9,10 @@ import { ENSSubdomainRegistrar__factory, PublicResolver__factory, } from '../../typechain'; +import {ensDomainHash, ensLabelHash, setupENS} from '../../utils/ens'; +import {deployWithProxy} from './proxy'; +import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; +import {ethers} from 'hardhat'; export async function deployENSSubdomainRegistrar( owner: SignerWithAddress, diff --git a/packages/contracts/test/test-utils/fixture.ts b/packages/contracts/test/test-utils/fixture.ts index 153bf1442..d90055593 100644 --- a/packages/contracts/test/test-utils/fixture.ts +++ b/packages/contracts/test/test-utils/fixture.ts @@ -1,6 +1,5 @@ -import hre, {network, deployments} from 'hardhat'; - import networks from '../../networks.json'; +import hre, {network, deployments} from 'hardhat'; export interface ForkOsxVersion { version: string; diff --git a/packages/contracts/test/test-utils/plugin-setup-processor.ts b/packages/contracts/test/test-utils/plugin-setup-processor.ts index bf139ac17..e15abf8d5 100644 --- a/packages/contracts/test/test-utils/plugin-setup-processor.ts +++ b/packages/contracts/test/test-utils/plugin-setup-processor.ts @@ -1,10 +1,9 @@ -import {ethers} from 'hardhat'; - import { PluginSetupProcessor__factory, PluginRepoRegistry, PluginSetupProcessor, } from '../../typechain'; +import {ethers} from 'hardhat'; export async function deployPluginSetupProcessor( pluginRepoRegistry: PluginRepoRegistry diff --git a/packages/contracts/test/test-utils/psp/atomic-helpers.ts b/packages/contracts/test/test-utils/psp/atomic-helpers.ts index d1ae8e2c7..0b04efe6d 100644 --- a/packages/contracts/test/test-utils/psp/atomic-helpers.ts +++ b/packages/contracts/test/test-utils/psp/atomic-helpers.ts @@ -1,4 +1,3 @@ -import {BytesLike} from 'ethers'; import {DAO, PluginSetupProcessor} from '../../../typechain'; import {PermissionOperation, PluginRepoPointer, VersionTag} from './types'; import { @@ -9,6 +8,7 @@ import { prepareUninstallation, prepareUpdate, } from './wrappers'; +import {BytesLike} from 'ethers'; const EMPTY_DATA = '0x'; diff --git a/packages/contracts/test/test-utils/psp/create-params.ts b/packages/contracts/test/test-utils/psp/create-params.ts index 21c1318a4..b0b61dc89 100644 --- a/packages/contracts/test/test-utils/psp/create-params.ts +++ b/packages/contracts/test/test-utils/psp/create-params.ts @@ -1,7 +1,6 @@ -import {BytesLike} from 'ethers'; - import {hashHelpers} from '../../../utils/psp'; import {PermissionOperation, PluginRepoPointer, VersionTag} from './types'; +import {BytesLike} from 'ethers'; export function createPrepareInstallationParams( pluginRepoPointer: PluginRepoPointer, diff --git a/packages/contracts/test/test-utils/psp/hash-helpers.ts b/packages/contracts/test/test-utils/psp/hash-helpers.ts index 02c02eb01..778443a4f 100644 --- a/packages/contracts/test/test-utils/psp/hash-helpers.ts +++ b/packages/contracts/test/test-utils/psp/hash-helpers.ts @@ -1,8 +1,7 @@ -import {BytesLike} from 'ethers'; -import {defaultAbiCoder, keccak256, solidityPack} from 'ethers/lib/utils'; - import {hashHelpers} from '../../../utils/psp'; import {PermissionOperation, PluginRepoPointer, PreparationType} from './types'; +import {BytesLike} from 'ethers'; +import {defaultAbiCoder, keccak256, solidityPack} from 'ethers/lib/utils'; const ZERO_BYTES_HASH = keccak256( defaultAbiCoder.encode( diff --git a/packages/contracts/test/test-utils/psp/mock-helpers.ts b/packages/contracts/test/test-utils/psp/mock-helpers.ts index 68f370da4..1c3a32ecc 100644 --- a/packages/contracts/test/test-utils/psp/mock-helpers.ts +++ b/packages/contracts/test/test-utils/psp/mock-helpers.ts @@ -1,6 +1,6 @@ -import {ethers} from 'hardhat'; -import {utils, constants} from 'ethers'; import {Operation} from '../../../utils/types'; +import {utils, constants} from 'ethers'; +import {ethers} from 'hardhat'; export function mockPermissionsOperations( start: number, diff --git a/packages/contracts/test/test-utils/psp/wrappers.ts b/packages/contracts/test/test-utils/psp/wrappers.ts index c1cfe4afa..561042e2d 100644 --- a/packages/contracts/test/test-utils/psp/wrappers.ts +++ b/packages/contracts/test/test-utils/psp/wrappers.ts @@ -1,4 +1,3 @@ -import {BytesLike} from 'ethers'; import {PluginSetupProcessor} from '../../../typechain'; import { InstallationAppliedEvent, @@ -18,6 +17,7 @@ import { createPrepareUpdateParams, } from './create-params'; import {PermissionOperation, PluginRepoPointer} from './types'; +import {BytesLike} from 'ethers'; export async function prepareInstallation( psp: PluginSetupProcessor, diff --git a/packages/contracts/test/test-utils/repo.ts b/packages/contracts/test/test-utils/repo.ts index e024e2872..f023b59b3 100644 --- a/packages/contracts/test/test-utils/repo.ts +++ b/packages/contracts/test/test-utils/repo.ts @@ -1,5 +1,3 @@ -import {ethers} from 'hardhat'; - import { PluginRepoRegistry, PluginRepoFactory, @@ -12,6 +10,7 @@ import { } from '../../typechain'; import {deployWithProxy} from './proxy'; import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; +import {ethers} from 'hardhat'; export async function deployMockPluginSetup( signer: SignerWithAddress diff --git a/packages/contracts/test/test-utils/uups-upgradeable.ts b/packages/contracts/test/test-utils/uups-upgradeable.ts index 8debafebc..726e0fc53 100644 --- a/packages/contracts/test/test-utils/uups-upgradeable.ts +++ b/packages/contracts/test/test-utils/uups-upgradeable.ts @@ -1,10 +1,10 @@ +import {DAO, PluginRepo} from '../../typechain'; +import {readImplementationValueFromSlot} from '../../utils/storage'; +import {IMPLICIT_INITIAL_PROTOCOL_VERSION} from './protocol-version'; import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; import {expect} from 'chai'; import {Contract, ContractFactory, errors} from 'ethers'; import {upgrades} from 'hardhat'; -import {DAO, PluginRepo} from '../../typechain'; -import {readImplementationValueFromSlot} from '../../utils/storage'; -import {IMPLICIT_INITIAL_PROTOCOL_VERSION} from './protocol-version'; // Deploys a proxy and a new implementation from the same factory and checks that the upgrade works. export async function deployAndUpgradeSelfCheck( diff --git a/packages/contracts/test/test-utils/voting.ts b/packages/contracts/test/test-utils/voting.ts index 44c2a5b83..3a7ba062c 100644 --- a/packages/contracts/test/test-utils/voting.ts +++ b/packages/contracts/test/test-utils/voting.ts @@ -1,7 +1,7 @@ -import {ethers} from 'hardhat'; +import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; import {expect} from 'chai'; import {BigNumber, Contract} from 'ethers'; -import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; +import {ethers} from 'hardhat'; export enum VoteOption { None, diff --git a/packages/contracts/test/token/erc20/governance-erc20.ts b/packages/contracts/test/token/erc20/governance-erc20.ts index 9faf2ecc6..ed42c0ea1 100644 --- a/packages/contracts/test/token/erc20/governance-erc20.ts +++ b/packages/contracts/test/token/erc20/governance-erc20.ts @@ -1,7 +1,3 @@ -import {expect} from 'chai'; -import {ethers} from 'hardhat'; -import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; - import { DAO, GovernanceERC20, @@ -15,6 +11,9 @@ import { import {deployNewDAO} from '../../test-utils/dao'; import {OZ_ERRORS} from '../../test-utils/error'; import {getInterfaceID} from '../../test-utils/interfaces'; +import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; +import {expect} from 'chai'; +import {ethers} from 'hardhat'; export type MintSettings = { receivers: string[]; diff --git a/packages/contracts/test/token/erc20/governance-wrapped-erc20.ts b/packages/contracts/test/token/erc20/governance-wrapped-erc20.ts index ebd3af014..b51cb6ed8 100644 --- a/packages/contracts/test/token/erc20/governance-wrapped-erc20.ts +++ b/packages/contracts/test/token/erc20/governance-wrapped-erc20.ts @@ -1,7 +1,3 @@ -import {expect} from 'chai'; -import {ethers} from 'hardhat'; -import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; - import { TestERC20, TestERC20__factory, @@ -16,6 +12,9 @@ import { } from '../../../typechain'; import {OZ_ERRORS} from '../../test-utils/error'; import {getInterfaceID} from '../../test-utils/interfaces'; +import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; +import {expect} from 'chai'; +import {ethers} from 'hardhat'; export type AccountBalance = {account: string; amount: number}; diff --git a/packages/contracts/test/upgrade/dao.ts b/packages/contracts/test/upgrade/dao.ts index b0d40269c..906f4db1b 100644 --- a/packages/contracts/test/upgrade/dao.ts +++ b/packages/contracts/test/upgrade/dao.ts @@ -1,27 +1,23 @@ -import {expect} from 'chai'; -import {ethers} from 'hardhat'; -import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; - +import {DAO, ProtocolVersion__factory} from '../../typechain'; import { DAO as DAO_V1_0_0, DAO__factory as DAO_V1_0_0__factory, } from '../../typechain/@aragon/osx-v1.0.1/core/dao/DAO.sol'; - import { DAO as DAO_V1_3_0, DAO__factory as DAO_V1_3_0__factory, } from '../../typechain/@aragon/osx-v1.3.0-rc0.2/core/dao/DAO.sol'; - -import {DAO, ProtocolVersion__factory} from '../../typechain'; - -import {daoExampleURI, ZERO_BYTES32} from '../test-utils/dao'; -import {deployWithProxy} from '../test-utils/proxy'; -import {UPGRADE_PERMISSIONS} from '../test-utils/permissions'; +import {UpgradedEvent} from '../../typechain/DAO'; import {findEventTopicLog} from '../../utils/event'; import {readImplementationValueFromSlot} from '../../utils/storage'; +import {daoExampleURI, ZERO_BYTES32} from '../test-utils/dao'; import {getInterfaceID} from '../test-utils/interfaces'; -import {UpgradedEvent} from '../../typechain/DAO'; +import {UPGRADE_PERMISSIONS} from '../test-utils/permissions'; import {IMPLICIT_INITIAL_PROTOCOL_VERSION} from '../test-utils/protocol-version'; +import {deployWithProxy} from '../test-utils/proxy'; +import {SignerWithAddress} from '@nomiclabs/hardhat-ethers/signers'; +import {expect} from 'chai'; +import {ethers} from 'hardhat'; let signers: SignerWithAddress[]; diff --git a/packages/contracts/test/utils/version-comparison-lib.ts b/packages/contracts/test/utils/version-comparison-lib.ts index 4416a9210..b551721f2 100644 --- a/packages/contracts/test/utils/version-comparison-lib.ts +++ b/packages/contracts/test/utils/version-comparison-lib.ts @@ -1,10 +1,9 @@ -import {expect} from 'chai'; -import {ethers} from 'hardhat'; - import { VersionComparisonLibTest, VersionComparisonLibTest__factory, } from '../../typechain'; +import {expect} from 'chai'; +import {ethers} from 'hardhat'; type SemVer = [number, number, number]; diff --git a/packages/contracts/utils/ens.ts b/packages/contracts/utils/ens.ts index 4a195b849..c0a7c8561 100644 --- a/packages/contracts/utils/ens.ts +++ b/packages/contracts/utils/ens.ts @@ -1,8 +1,7 @@ -import {ethers} from 'hardhat'; -import {ENSRegistry__factory} from '../typechain'; - import ensRegistryArtifact from '../artifacts/@ensdomains/ens-contracts/contracts/registry/ENSRegistry.sol/ENSRegistry.json'; import publicResolverArtifact from '../artifacts/@ensdomains/ens-contracts/contracts/resolvers/PublicResolver.sol/PublicResolver.json'; +import {ENSRegistry__factory} from '../typechain'; +import {ethers} from 'hardhat'; import {HardhatRuntimeEnvironment} from 'hardhat/types'; export function ensLabelHash(label: string): string { diff --git a/packages/contracts/utils/etherscan.ts b/packages/contracts/utils/etherscan.ts index 08218ab3a..5d41b1f96 100644 --- a/packages/contracts/utils/etherscan.ts +++ b/packages/contracts/utils/etherscan.ts @@ -1,7 +1,7 @@ -import HRE from 'hardhat'; import fs from 'fs'; -import {file} from 'tmp-promise'; +import HRE from 'hardhat'; import path from 'path'; +import {file} from 'tmp-promise'; function delay(ms: number) { return new Promise(resolve => setTimeout(resolve, ms)); diff --git a/packages/contracts/utils/storage.ts b/packages/contracts/utils/storage.ts index cf2cd3087..695460bb4 100644 --- a/packages/contracts/utils/storage.ts +++ b/packages/contracts/utils/storage.ts @@ -1,5 +1,5 @@ -import {ethers} from 'hardhat'; import {defaultAbiCoder} from 'ethers/lib/utils'; +import {ethers} from 'hardhat'; // See https://eips.ethereum.org/EIPS/eip-1967 export const IMPLEMENTATION_SLOT = diff --git a/packages/subgraph/docker/docker-compose.yml b/packages/subgraph/docker/docker-compose.yml index 06c9162d2..465ad23c0 100644 --- a/packages/subgraph/docker/docker-compose.yml +++ b/packages/subgraph/docker/docker-compose.yml @@ -1,11 +1,11 @@ version: '3' services: hardhat: - build: - context: ../../../ - dockerfile: packages/subgraph/docker/hardhat.Dockerfile - ports: - - 8545:8545 + build: + context: ../../../ + dockerfile: packages/subgraph/docker/hardhat.Dockerfile + ports: + - 8545:8545 graph-node: image: graphprotocol/graph-node ports: @@ -38,11 +38,7 @@ services: image: postgres ports: - '5432:5432' - command: - [ - "postgres", - "-cshared_preload_libraries=pg_stat_statements" - ] + command: ['postgres', '-cshared_preload_libraries=pg_stat_statements'] environment: POSTGRES_USER: graph-node POSTGRES_PASSWORD: let-me-in @@ -50,7 +46,7 @@ services: # FIXME: remove this env. var. which we shouldn't need. Introduced by # , maybe as a # workaround for https://github.com/docker/for-mac/issues/6270? - PGDATA: "/var/lib/postgresql/data" - POSTGRES_INITDB_ARGS: "-E UTF8 --locale=C" + PGDATA: '/var/lib/postgresql/data' + POSTGRES_INITDB_ARGS: '-E UTF8 --locale=C' volumes: - ./data/postgres:/var/lib/postgresql/data diff --git a/packages/subgraph/scripts/updateLocalManifest.js b/packages/subgraph/scripts/updateLocalManifest.js index 85943fe2c..40e721283 100755 --- a/packages/subgraph/scripts/updateLocalManifest.js +++ b/packages/subgraph/scripts/updateLocalManifest.js @@ -5,7 +5,7 @@ const path = require('path'); async function main() { const networks = await fs.readdir('../contracts/deployments', { - withFileTypes: true + withFileTypes: true, }); for (const network of networks) { if (network.isDirectory()) { @@ -14,10 +14,9 @@ async function main() { const contracts = await fs.readdir(networkPath, {withFileTypes: true}); const manifest = { - info: - '# Do not edit subgraph.yaml,this is a generated file. \n# Instead, edit subgraph.placeholder.yaml and run: yarn manifest', + info: '# Do not edit subgraph.yaml,this is a generated file. \n# Instead, edit subgraph.placeholder.yaml and run: yarn manifest', network: networkName, - dataSources: {} + dataSources: {}, }; for (const contract of contracts) { @@ -47,7 +46,7 @@ async function main() { manifest.dataSources[dataSourceName] = { name, address: contractJson.address, - startBlock: contractJson.receipt.blockNumber + startBlock: contractJson.receipt.blockNumber, }; } } diff --git a/packages/subgraph/src/dao/dao_v1_0_0.ts b/packages/subgraph/src/dao/dao_v1_0_0.ts index 1acfb95e3..b84456aa0 100644 --- a/packages/subgraph/src/dao/dao_v1_0_0.ts +++ b/packages/subgraph/src/dao/dao_v1_0_0.ts @@ -1,5 +1,9 @@ -import {BigInt, Bytes, store} from '@graphprotocol/graph-ts'; - +import { + Dao, + Permission, + StandardCallback, + TransactionActionsProposal, +} from '../../generated/schema'; import { MetadataSet, Executed, @@ -11,30 +15,23 @@ import { SignatureValidatorSet, StandardCallbackRegistered, CallbackReceived, - NewURI + NewURI, } from '../../generated/templates/DaoTemplateV1_0_0/DAO'; -import { - Dao, - Permission, - StandardCallback, - TransactionActionsProposal -} from '../../generated/schema'; - import {ADDRESS_ZERO} from '../utils/constants'; - -import {handleERC721Received} from '../utils/tokens/erc721'; -import {handleERC20Deposit} from '../utils/tokens/erc20'; -import {handleNativeDeposit} from '../utils/tokens/eth'; import { onERC1155BatchReceived, onERC1155Received, - onERC721Received + onERC721Received, } from '../utils/tokens/common'; -import {handleAction, updateProposalWithFailureMap} from './utils'; +import {handleERC20Deposit} from '../utils/tokens/erc20'; +import {handleERC721Received} from '../utils/tokens/erc721'; import { handleERC1155BatchReceived, - handleERC1155Received + handleERC1155Received, } from '../utils/tokens/erc1155'; +import {handleNativeDeposit} from '../utils/tokens/eth'; +import {handleAction, updateProposalWithFailureMap} from './utils'; +import {BigInt, Bytes, store} from '@graphprotocol/graph-ts'; export function handleMetadataSet(event: MetadataSet): void { let daoId = event.address.toHexString(); @@ -172,7 +169,7 @@ export function handleGranted(event: Granted): void { contractAddress, permissionId.toHexString(), where.toHexString(), - who.toHexString() + who.toHexString(), ].join('_'); const daoAddress = contractAddress; @@ -203,7 +200,7 @@ export function handleRevoked(event: Revoked): void { contractAddress, permissionId.toHexString(), where.toHexString(), - who.toHexString() + who.toHexString(), ].join('_'); let permissionEntity = Permission.load(permissionEntityId); diff --git a/packages/subgraph/src/dao/dao_v1_3_0.ts b/packages/subgraph/src/dao/dao_v1_3_0.ts index e362a40dc..b05775ed1 100644 --- a/packages/subgraph/src/dao/dao_v1_3_0.ts +++ b/packages/subgraph/src/dao/dao_v1_3_0.ts @@ -1,7 +1,7 @@ import {TransactionActionsProposal} from '../../generated/schema'; import { Executed, - ExecutedActionsStruct + ExecutedActionsStruct, } from '../../generated/templates/DaoTemplateV1_3_0/DAO'; import {handleAction} from './utils'; diff --git a/packages/subgraph/src/dao/utils.ts b/packages/subgraph/src/dao/utils.ts index 6c27ca847..d69257c15 100644 --- a/packages/subgraph/src/dao/utils.ts +++ b/packages/subgraph/src/dao/utils.ts @@ -1,15 +1,15 @@ -import {BigInt} from '@graphprotocol/graph-ts'; import { Action, AddresslistVotingProposal, AdminProposal, MultisigProposal, - TokenVotingProposal + TokenVotingProposal, } from '../../generated/schema'; import { Executed, - ExecutedActionsStruct + ExecutedActionsStruct, } from '../../generated/templates/DaoTemplateV1_0_0/DAO'; +import {getMethodSignature} from '../utils/bytes'; import { ERC721_transferFrom, ERC721_safeTransferFromNoData, @@ -17,13 +17,13 @@ import { ERC20_transfer, ERC20_transferFrom, ERC1155_safeBatchTransferFrom, - ERC1155_safeTransferFrom + ERC1155_safeTransferFrom, } from '../utils/tokens/common'; import {handleERC20Action} from '../utils/tokens/erc20'; import {handleERC721Action} from '../utils/tokens/erc721'; -import {handleNativeAction} from '../utils/tokens/eth'; import {handleERC1155Action} from '../utils/tokens/erc1155'; -import {getMethodSignature} from '../utils/bytes'; +import {handleNativeAction} from '../utils/tokens/eth'; +import {BigInt} from '@graphprotocol/graph-ts'; // AssemblyScript struggles having multiple return types. Due to this, // The below seems most effective way. @@ -157,7 +157,7 @@ function isERC721Transfer(methodSig: string): bool { return [ ERC721_transferFrom, ERC721_safeTransferFromNoData, - ERC721_safeTransferFromWithData + ERC721_safeTransferFromWithData, ].includes(methodSig); } diff --git a/packages/subgraph/src/packages/addresslist/addresslist-voting.ts b/packages/subgraph/src/packages/addresslist/addresslist-voting.ts index 0fd543684..9ca8c2c4c 100644 --- a/packages/subgraph/src/packages/addresslist/addresslist-voting.ts +++ b/packages/subgraph/src/packages/addresslist/addresslist-voting.ts @@ -1,5 +1,10 @@ -import {BigInt, dataSource, store} from '@graphprotocol/graph-ts'; - +import { + Action, + AddresslistVotingPlugin, + AddresslistVotingProposal, + AddresslistVotingVoter, + AddresslistVotingVote, +} from '../../../generated/schema'; import { VoteCast, ProposalCreated, @@ -7,17 +12,11 @@ import { VotingSettingsUpdated, MembersAdded, MembersRemoved, - AddresslistVoting + AddresslistVoting, } from '../../../generated/templates/AddresslistVoting/AddresslistVoting'; -import { - Action, - AddresslistVotingPlugin, - AddresslistVotingProposal, - AddresslistVotingVoter, - AddresslistVotingVote -} from '../../../generated/schema'; import {RATIO_BASE, VOTER_OPTIONS, VOTING_MODES} from '../../utils/constants'; import {getProposalId} from '../../utils/proposals'; +import {BigInt, dataSource, store} from '@graphprotocol/graph-ts'; export function handleProposalCreated(event: ProposalCreated): void { let context = dataSource.context(); diff --git a/packages/subgraph/src/packages/admin/admin.ts b/packages/subgraph/src/packages/admin/admin.ts index 13225955f..a68d0b2f6 100644 --- a/packages/subgraph/src/packages/admin/admin.ts +++ b/packages/subgraph/src/packages/admin/admin.ts @@ -1,18 +1,17 @@ -import {dataSource, DataSourceContext} from '@graphprotocol/graph-ts'; - -import { - MembershipContractAnnounced, - ProposalCreated, - ProposalExecuted -} from '../../../generated/templates/Admin/Admin'; import { Action, AdministratorAdminPlugin, AdminProposal, - Administrator + Administrator, } from '../../../generated/schema'; import {AdminMembers} from '../../../generated/templates'; +import { + MembershipContractAnnounced, + ProposalCreated, + ProposalExecuted, +} from '../../../generated/templates/Admin/Admin'; import {getProposalId} from '../../utils/proposals'; +import {dataSource, DataSourceContext} from '@graphprotocol/graph-ts'; export function handleProposalCreated(event: ProposalCreated): void { let context = dataSource.context(); diff --git a/packages/subgraph/src/packages/admin/adminMembers.ts b/packages/subgraph/src/packages/admin/adminMembers.ts index 4f6f2019a..aaa16a529 100644 --- a/packages/subgraph/src/packages/admin/adminMembers.ts +++ b/packages/subgraph/src/packages/admin/adminMembers.ts @@ -1,9 +1,9 @@ -import {dataSource, store} from '@graphprotocol/graph-ts'; import { Administrator, - AdministratorAdminPlugin + AdministratorAdminPlugin, } from '../../../generated/schema'; import {Granted, Revoked} from '../../../generated/templates/Admin/DAO'; +import {dataSource, store} from '@graphprotocol/graph-ts'; export function handleGranted(event: Granted): void { if ( diff --git a/packages/subgraph/src/packages/multisig/multisig.ts b/packages/subgraph/src/packages/multisig/multisig.ts index 412719d8e..9ff12b72a 100644 --- a/packages/subgraph/src/packages/multisig/multisig.ts +++ b/packages/subgraph/src/packages/multisig/multisig.ts @@ -1,5 +1,10 @@ -import {dataSource, store} from '@graphprotocol/graph-ts'; - +import { + Action, + MultisigPlugin, + MultisigProposal, + MultisigApprover, + MultisigProposalApprover, +} from '../../../generated/schema'; import { ProposalCreated, ProposalExecuted, @@ -7,16 +12,10 @@ import { MembersRemoved, Multisig, Approved, - MultisigSettingsUpdated + MultisigSettingsUpdated, } from '../../../generated/templates/Multisig/Multisig'; -import { - Action, - MultisigPlugin, - MultisigProposal, - MultisigApprover, - MultisigProposalApprover -} from '../../../generated/schema'; import {getProposalId} from '../../utils/proposals'; +import {dataSource, store} from '@graphprotocol/graph-ts'; export function handleProposalCreated(event: ProposalCreated): void { let context = dataSource.context(); @@ -105,9 +104,8 @@ export function handleApproved(event: Approved): void { let proposalId = getProposalId(event.address, pluginProposalId); let approverProposalId = member.concat('_').concat(proposalId); - let approverProposalEntity = MultisigProposalApprover.load( - approverProposalId - ); + let approverProposalEntity = + MultisigProposalApprover.load(approverProposalId); if (!approverProposalEntity) { approverProposalEntity = new MultisigProposalApprover(approverProposalId); approverProposalEntity.approver = memberId; diff --git a/packages/subgraph/src/packages/token/governance-erc20.ts b/packages/subgraph/src/packages/token/governance-erc20.ts index 3e7f61e05..448cb6088 100644 --- a/packages/subgraph/src/packages/token/governance-erc20.ts +++ b/packages/subgraph/src/packages/token/governance-erc20.ts @@ -1,17 +1,13 @@ -import {Address, BigInt, dataSource, store} from '@graphprotocol/graph-ts'; - import {TokenVotingMember} from '../../../generated/schema'; -import {Transfer} from '../../../generated/templates/TokenVoting/ERC20'; import { DelegateChanged, - DelegateVotesChanged + DelegateVotesChanged, } from '../../../generated/templates/GovernanceERC20/GovernanceERC20'; +import {Transfer} from '../../../generated/templates/TokenVoting/ERC20'; +import {Address, BigInt, dataSource, store} from '@graphprotocol/graph-ts'; function getOrCreateMember(user: Address, pluginId: string): TokenVotingMember { - let id = user - .toHexString() - .concat('_') - .concat(pluginId); + let id = user.toHexString().concat('_').concat(pluginId); let member = TokenVotingMember.load(id); if (!member) { member = new TokenVotingMember(id); diff --git a/packages/subgraph/src/packages/token/token-voting.ts b/packages/subgraph/src/packages/token/token-voting.ts index c562cdfc7..31d3446a1 100644 --- a/packages/subgraph/src/packages/token/token-voting.ts +++ b/packages/subgraph/src/packages/token/token-voting.ts @@ -1,27 +1,23 @@ -import {BigInt, dataSource, DataSourceContext} from '@graphprotocol/graph-ts'; - +import { + Action, + TokenVotingPlugin, + TokenVotingProposal, + TokenVotingVoter, + TokenVotingVote, +} from '../../../generated/schema'; +import {GovernanceERC20} from '../../../generated/templates'; import { VoteCast, ProposalCreated, ProposalExecuted, VotingSettingsUpdated, MembershipContractAnnounced, - TokenVoting + TokenVoting, } from '../../../generated/templates/TokenVoting/TokenVoting'; - -import {GovernanceERC20} from '../../../generated/templates'; - -import { - Action, - TokenVotingPlugin, - TokenVotingProposal, - TokenVotingVoter, - TokenVotingVote -} from '../../../generated/schema'; - import {RATIO_BASE, VOTER_OPTIONS, VOTING_MODES} from '../../utils/constants'; -import {identifyAndFetchOrCreateERC20TokenEntity} from '../../utils/tokens/erc20'; import {getProposalId} from '../../utils/proposals'; +import {identifyAndFetchOrCreateERC20TokenEntity} from '../../utils/tokens/erc20'; +import {BigInt, dataSource, DataSourceContext} from '@graphprotocol/graph-ts'; export function handleProposalCreated(event: ProposalCreated): void { let context = dataSource.context(); diff --git a/packages/subgraph/src/plugin/pluginRepo.ts b/packages/subgraph/src/plugin/pluginRepo.ts index 7b444c7d0..5591c8636 100644 --- a/packages/subgraph/src/plugin/pluginRepo.ts +++ b/packages/subgraph/src/plugin/pluginRepo.ts @@ -1,17 +1,17 @@ -import {store} from '@graphprotocol/graph-ts'; -import { - ReleaseMetadataUpdated, - VersionCreated, - Granted, - Revoked -} from '../../generated/templates/PluginRepoTemplate/PluginRepo'; import { PluginVersion, PluginSetup, PluginRelease, - Permission + Permission, } from '../../generated/schema'; +import { + ReleaseMetadataUpdated, + VersionCreated, + Granted, + Revoked, +} from '../../generated/templates/PluginRepoTemplate/PluginRepo'; import {getPluginVersionId} from './utils'; +import {store} from '@graphprotocol/graph-ts'; export function handleVersionCreated(event: VersionCreated): void { // PluginSetup @@ -78,7 +78,7 @@ export function handleGranted(event: Granted): void { contractAddress, permissionId.toHexString(), where.toHexString(), - who.toHexString() + who.toHexString(), ].join('_'); const pluginRepo = contractAddress; @@ -110,7 +110,7 @@ export function handleRevoked(event: Revoked): void { contractAddress, permissionId.toHexString(), where.toHexString(), - who.toHexString() + who.toHexString(), ].join('_'); const permissionEntity = Permission.load(permissionEntityId); diff --git a/packages/subgraph/src/plugin/pluginSetupProcessor.ts b/packages/subgraph/src/plugin/pluginSetupProcessor.ts index 45cb19035..ae58e873b 100644 --- a/packages/subgraph/src/plugin/pluginSetupProcessor.ts +++ b/packages/subgraph/src/plugin/pluginSetupProcessor.ts @@ -1,23 +1,23 @@ -import {Bytes, log} from '@graphprotocol/graph-ts'; import { InstallationApplied, InstallationPrepared, UninstallationApplied, UninstallationPrepared, UpdateApplied, - UpdatePrepared + UpdatePrepared, } from '../../generated/PluginSetupProcessor/PluginSetupProcessor'; import { PluginInstallation, PluginPermission, - PluginPreparation + PluginPreparation, } from '../../generated/schema'; import { addPlugin, getPluginInstallationId, getPluginVersionId, - PERMISSION_OPERATIONS + PERMISSION_OPERATIONS, } from './utils'; +import {Bytes, log} from '@graphprotocol/graph-ts'; export function handleInstallationPrepared(event: InstallationPrepared): void { let dao = event.params.dao.toHexString(); diff --git a/packages/subgraph/src/plugin/utils.ts b/packages/subgraph/src/plugin/utils.ts index fe8754843..441006949 100644 --- a/packages/subgraph/src/plugin/utils.ts +++ b/packages/subgraph/src/plugin/utils.ts @@ -1,42 +1,40 @@ -import { - Address, - Bytes, - DataSourceContext, - ethereum, - crypto, - ByteArray, - BigInt -} from '@graphprotocol/graph-ts'; - -import {TokenVoting as TokenVotingContract} from '../../generated/templates/TokenVoting/TokenVoting'; -import {AddresslistVoting as AddresslistVotingContract} from '../../generated/templates/AddresslistVoting/AddresslistVoting'; import {ERC165 as ERC165Contract} from '../../generated/PluginSetupProcessor/ERC165'; -import { - TokenVoting, - AddresslistVoting, - Admin, - Multisig -} from '../../generated/templates'; import { TokenVotingPlugin, AddresslistVotingPlugin, AdminPlugin, - MultisigPlugin + MultisigPlugin, } from '../../generated/schema'; +import { + TokenVoting, + AddresslistVoting, + Admin, + Multisig, +} from '../../generated/templates'; +import {AddresslistVoting as AddresslistVotingContract} from '../../generated/templates/AddresslistVoting/AddresslistVoting'; +import {TokenVoting as TokenVotingContract} from '../../generated/templates/TokenVoting/TokenVoting'; import { VOTING_MODES, ADMIN_INTERFACE_ID, TOKEN_VOTING_INTERFACE_ID, ADDRESSLIST_VOTING_INTERFACE_ID, - MULTISIG_INTERFACE_ID + MULTISIG_INTERFACE_ID, } from '../utils/constants'; - import {supportsInterface} from '../utils/erc165'; import { fetchOrCreateERC20Entity, fetchOrCreateWrappedERC20Entity, - supportsERC20Wrapped + supportsERC20Wrapped, } from '../utils/tokens/erc20'; +import { + Address, + Bytes, + DataSourceContext, + ethereum, + crypto, + ByteArray, + BigInt, +} from '@graphprotocol/graph-ts'; export const PERMISSION_OPERATIONS = new Map() .set(0, 'Grant') diff --git a/packages/subgraph/src/registries/daoRegistry.ts b/packages/subgraph/src/registries/daoRegistry.ts index d5c993c80..ebe40c74e 100644 --- a/packages/subgraph/src/registries/daoRegistry.ts +++ b/packages/subgraph/src/registries/daoRegistry.ts @@ -1,12 +1,12 @@ import {DAORegistered} from '../../generated/DAORegistry/DAORegistry'; -import {DaoTemplateV1_0_0, DaoTemplateV1_3_0} from '../../generated/templates'; import {Dao} from '../../generated/schema'; +import {DaoTemplateV1_0_0, DaoTemplateV1_3_0} from '../../generated/templates'; import {dataSource} from '@graphprotocol/graph-ts'; // blocklists of addresses for which we don't index the subdomain. // Put the reason next to the address as a comment const subdomain_blocklist_mainnet = [ - '0x16070493aa513f91fc8957f14b7b7c6c0c41fbac' // domain squatting lido.dao.eth + '0x16070493aa513f91fc8957f14b7b7c6c0c41fbac', // domain squatting lido.dao.eth ]; export function handleDAORegistered(event: DAORegistered): void { diff --git a/packages/subgraph/src/registries/pluginRepoRegistry.ts b/packages/subgraph/src/registries/pluginRepoRegistry.ts index 0c2e21be8..e316c32f8 100644 --- a/packages/subgraph/src/registries/pluginRepoRegistry.ts +++ b/packages/subgraph/src/registries/pluginRepoRegistry.ts @@ -1,6 +1,6 @@ import {PluginRepoRegistered} from '../../generated/PluginRepoRegistry/PluginRepoRegistry'; -import {PluginRepoTemplate} from '../../generated/templates'; import {PluginRepo} from '../../generated/schema'; +import {PluginRepoTemplate} from '../../generated/templates'; export function handlePluginRepoRegistered(event: PluginRepoRegistered): void { let id = event.params.pluginRepo.toHexString(); diff --git a/packages/subgraph/src/utils/proposals.ts b/packages/subgraph/src/utils/proposals.ts index 9565c3efc..fbc8fe439 100644 --- a/packages/subgraph/src/utils/proposals.ts +++ b/packages/subgraph/src/utils/proposals.ts @@ -1,5 +1,5 @@ -import {Address, BigInt} from '@graphprotocol/graph-ts'; import {bigIntToBytes32} from './bytes'; +import {Address, BigInt} from '@graphprotocol/graph-ts'; export function getProposalId( plugin: Address, diff --git a/packages/subgraph/src/utils/tokens/common.ts b/packages/subgraph/src/utils/tokens/common.ts index 3e89dd0cc..4b61009aa 100644 --- a/packages/subgraph/src/utils/tokens/common.ts +++ b/packages/subgraph/src/utils/tokens/common.ts @@ -15,7 +15,7 @@ export const ERC1155_safeBatchTransferFrom = '0x2eb2c2d6'; // `bytes4(keccak256( export enum TransferType { Withdraw, - Deposit + Deposit, } export const DECODE_OFFSET = @@ -49,11 +49,7 @@ export function getTokenIdBalanceId( token: string, tokenId: BigInt ): string { - return daoId - .concat('_') - .concat(token) - .concat('_') - .concat(tokenId.toString()); + return daoId.concat('_').concat(token).concat('_').concat(tokenId.toString()); } // Unique ID generation for ERC1155 transfers diff --git a/packages/subgraph/src/utils/tokens/erc1155.ts b/packages/subgraph/src/utils/tokens/erc1155.ts index 4eb592ee9..76e4ca8a5 100644 --- a/packages/subgraph/src/utils/tokens/erc1155.ts +++ b/packages/subgraph/src/utils/tokens/erc1155.ts @@ -1,11 +1,11 @@ -import {Address, BigInt, Bytes, ethereum} from '@graphprotocol/graph-ts'; import { ERC1155Balance, ERC1155Contract, ERC1155TokenIdBalance, - ERC1155Transfer + ERC1155Transfer, } from '../../../generated/schema'; import {ERC1155} from '../../../generated/templates/DaoTemplateV1_0_0/ERC1155'; +import {getMethodSignature} from '../bytes'; import {supportsInterface} from '../erc165'; import { DECODE_OFFSET, @@ -16,9 +16,9 @@ import { TransferType, getBalanceId, getERC1155TransferId, - getTokenIdBalanceId + getTokenIdBalanceId, } from './common'; -import {getMethodSignature} from '../bytes'; +import {Address, BigInt, Bytes, ethereum} from '@graphprotocol/graph-ts'; export function supportsERC1155(token: Address): bool { // Double check that it's ERC1155 by calling supportsInterface checks. diff --git a/packages/subgraph/src/utils/tokens/erc20.ts b/packages/subgraph/src/utils/tokens/erc20.ts index be51f324a..e7475b7e3 100644 --- a/packages/subgraph/src/utils/tokens/erc20.ts +++ b/packages/subgraph/src/utils/tokens/erc20.ts @@ -1,15 +1,15 @@ -import {Address, BigInt, Bytes, ethereum} from '@graphprotocol/graph-ts'; import { ERC20Balance, ERC20Contract, ERC20Transfer, - ERC20WrapperContract + ERC20WrapperContract, } from '../../../generated/schema'; import {ERC20} from '../../../generated/templates/DaoTemplateV1_0_0/ERC20'; import {GovernanceWrappedERC20} from '../../../generated/templates/TokenVoting/GovernanceWrappedERC20'; -import {ERC20_transfer, ERC20_transferFrom, getTransferId} from './common'; -import {supportsInterface} from '../erc165'; import {GOVERNANCE_WRAPPED_ERC20_INTERFACE_ID} from '../../utils/constants'; +import {supportsInterface} from '../erc165'; +import {ERC20_transfer, ERC20_transferFrom, getTransferId} from './common'; +import {Address, BigInt, Bytes, ethereum} from '@graphprotocol/graph-ts'; export function supportsERC20Wrapped(token: Address): bool { // Double check that it's ERC20Wrapped by calling supportsInterface checks. diff --git a/packages/subgraph/src/utils/tokens/erc721.ts b/packages/subgraph/src/utils/tokens/erc721.ts index ab8cbec5e..eb81bc4f3 100644 --- a/packages/subgraph/src/utils/tokens/erc721.ts +++ b/packages/subgraph/src/utils/tokens/erc721.ts @@ -1,18 +1,18 @@ -import {Address, BigInt, Bytes, ethereum} from '@graphprotocol/graph-ts'; import { ERC721Balance, ERC721Contract, - ERC721Transfer + ERC721Transfer, } from '../../../generated/schema'; import {ERC721} from '../../../generated/templates/DaoTemplateV1_0_0/ERC721'; +import {getMethodSignature} from '../bytes'; import {supportsInterface} from '../erc165'; import {DECODE_OFFSET, getTransferId, TransferType} from './common'; import { ERC721_safeTransferFromNoData, ERC721_safeTransferFromWithData, - ERC721_transferFrom + ERC721_transferFrom, } from './common'; -import {getMethodSignature} from '../bytes'; +import {Address, BigInt, Bytes, ethereum} from '@graphprotocol/graph-ts'; function supportsERC721(token: Address): bool { // Double check that it's ERC721 by calling supportsInterface checks. diff --git a/packages/subgraph/src/utils/tokens/eth.ts b/packages/subgraph/src/utils/tokens/eth.ts index 792c477ff..a95677601 100644 --- a/packages/subgraph/src/utils/tokens/eth.ts +++ b/packages/subgraph/src/utils/tokens/eth.ts @@ -1,7 +1,7 @@ -import {Address, BigInt, ethereum} from '@graphprotocol/graph-ts'; import {NativeBalance, NativeTransfer} from '../../../generated/schema'; import {ADDRESS_ZERO} from '../constants'; import {getTransferId, TransferType} from './common'; +import {Address, BigInt, ethereum} from '@graphprotocol/graph-ts'; export function updateNativeBalance( daoId: string, diff --git a/packages/subgraph/tests/addresslist-voting/addresslist-voting.test.ts b/packages/subgraph/tests/addresslist-voting/addresslist-voting.test.ts index 9303339ca..750f6a6b0 100644 --- a/packages/subgraph/tests/addresslist-voting/addresslist-voting.test.ts +++ b/packages/subgraph/tests/addresslist-voting/addresslist-voting.test.ts @@ -1,18 +1,15 @@ -import {assert, clearStore, test} from 'matchstick-as/assembly/index'; -import {Address, BigInt, Bytes} from '@graphprotocol/graph-ts'; - +import { + AddresslistVotingPlugin, + AddresslistVotingVoter, +} from '../../generated/schema'; import { handleMembersAdded, handleVoteCast, handleProposalExecuted, handleMembersRemoved, handleVotingSettingsUpdated, - _handleProposalCreated + _handleProposalCreated, } from '../../src/packages/addresslist/addresslist-voting'; -import { - AddresslistVotingPlugin, - AddresslistVotingVoter -} from '../../generated/schema'; import {VOTING_MODES} from '../../src/utils/constants'; import { ADDRESS_ONE, @@ -33,12 +30,12 @@ import { SNAPSHOT_BLOCK, TOTAL_VOTING_POWER, ALLOW_FAILURE_MAP, - PROPOSAL_ENTITY_ID + PROPOSAL_ENTITY_ID, } from '../constants'; import { createDummyActions, createGetProposalCall, - createTotalVotingPowerCall + createTotalVotingPowerCall, } from '../utils'; import { createNewMembersAddedEvent, @@ -48,8 +45,10 @@ import { createNewProposalCreatedEvent, createNewVotingSettingsUpdatedEvent, getProposalCountCall, - createAddresslistVotingProposalEntityState + createAddresslistVotingProposalEntityState, } from './utils'; +import {Address, BigInt, Bytes} from '@graphprotocol/graph-ts'; +import {assert, clearStore, test} from 'matchstick-as/assembly/index'; let actions = createDummyActions(DAO_TOKEN_ADDRESS, '0', '0x00000000'); @@ -564,7 +563,7 @@ test('Run AddresslistVoting (handleVotingSettingsUpdated) mappings with mock eve test('Run AddresslistVoting (handleMembersAdded) mappings with mock event', () => { let userArray = [ Address.fromString(ADDRESS_ONE), - Address.fromString(ADDRESS_TWO) + Address.fromString(ADDRESS_TWO), ]; // create event @@ -601,7 +600,7 @@ test('Run AddresslistVoting (MembersRemoved) mappings with mock event', () => { // create state let memberAddresses = [ Address.fromString(ADDRESS_ONE), - Address.fromString(ADDRESS_TWO) + Address.fromString(ADDRESS_TWO), ]; for (let index = 0; index < memberAddresses.length; index++) { diff --git a/packages/subgraph/tests/addresslist-voting/utils.ts b/packages/subgraph/tests/addresslist-voting/utils.ts index 74f4e34f5..7ed783e8a 100644 --- a/packages/subgraph/tests/addresslist-voting/utils.ts +++ b/packages/subgraph/tests/addresslist-voting/utils.ts @@ -1,6 +1,3 @@ -import {Address, BigInt, Bytes, ethereum} from '@graphprotocol/graph-ts'; -import {createMockedFunction, newMockEvent} from 'matchstick-as'; - import {AddresslistVotingProposal} from '../../generated/schema'; import { ProposalCreated, @@ -8,7 +5,7 @@ import { ProposalExecuted, VotingSettingsUpdated, MembersAdded, - MembersRemoved + MembersRemoved, } from '../../generated/templates/AddresslistVoting/AddresslistVoting'; import { ADDRESS_ONE, @@ -24,8 +21,10 @@ import { SNAPSHOT_BLOCK, TOTAL_VOTING_POWER, CREATED_AT, - ALLOW_FAILURE_MAP + ALLOW_FAILURE_MAP, } from '../constants'; +import {Address, BigInt, Bytes, ethereum} from '@graphprotocol/graph-ts'; +import {createMockedFunction, newMockEvent} from 'matchstick-as'; // events diff --git a/packages/subgraph/tests/admin/admin.test.ts b/packages/subgraph/tests/admin/admin.test.ts index 024e90323..c9be5b101 100644 --- a/packages/subgraph/tests/admin/admin.test.ts +++ b/packages/subgraph/tests/admin/admin.test.ts @@ -1,8 +1,9 @@ -import {assert, clearStore, test} from 'matchstick-as/assembly/index'; -import {Address, BigInt, Bytes} from '@graphprotocol/graph-ts'; - import {AdminPlugin, Action, AdminProposal} from '../../generated/schema'; - +import { + handleProposalExecuted, + _handleProposalCreated, +} from '../../src/packages/admin/admin'; +import {getProposalId} from '../../src/utils/proposals'; import { ADDRESS_ONE, ADDRESS_TWO, @@ -13,19 +14,15 @@ import { START_DATE, ALLOW_FAILURE_MAP, PROPOSAL_ENTITY_ID, - ZERO + ZERO, } from '../constants'; import {createDummyActions} from '../utils'; import { createNewProposalCreatedEvent, - createProposalExecutedEvent + createProposalExecutedEvent, } from './utils'; - -import { - handleProposalExecuted, - _handleProposalCreated -} from '../../src/packages/admin/admin'; -import {getProposalId} from '../../src/utils/proposals'; +import {Address, BigInt, Bytes} from '@graphprotocol/graph-ts'; +import {assert, clearStore, test} from 'matchstick-as/assembly/index'; const actionValue = '0'; const actionData = '0x00000000'; diff --git a/packages/subgraph/tests/admin/adminMembers.test.ts b/packages/subgraph/tests/admin/adminMembers.test.ts index aeed83fb9..179215088 100644 --- a/packages/subgraph/tests/admin/adminMembers.test.ts +++ b/packages/subgraph/tests/admin/adminMembers.test.ts @@ -1,3 +1,11 @@ +import {Administrator, AdministratorAdminPlugin} from '../../generated/schema'; +import { + handleGranted, + handleRevoked, +} from '../../src/packages/admin/adminMembers'; +import {ADDRESS_ONE, ADDRESS_TWO, DAO_ADDRESS} from '../constants'; +import {createGrantedEvent, createRevokedEvent} from './utils'; +import {DataSourceContext} from '@graphprotocol/graph-ts'; import { assert, clearStore, @@ -5,35 +13,26 @@ import { test, describe, beforeEach, - afterEach + afterEach, } from 'matchstick-as/assembly/index'; -import {ADDRESS_ONE, ADDRESS_TWO, DAO_ADDRESS} from '../constants'; -import {createGrantedEvent, createRevokedEvent} from './utils'; -import { - handleGranted, - handleRevoked -} from '../../src/packages/admin/adminMembers'; -import {DataSourceContext} from '@graphprotocol/graph-ts'; -import {Administrator, AdministratorAdminPlugin} from '../../generated/schema'; - -describe('AdminMembers', function() { +describe('AdminMembers', function () { // keccack256 of EXECUTE_PROPOSAL_PERMISSION const AdminPermission = '0xf281525e53675515a6ba7cc7bea8a81e649b3608423ee2d73be1752cea887889'; - beforeEach(function() { + beforeEach(function () { let context = new DataSourceContext(); context.setString('permissionId', AdminPermission); context.setString('pluginAddress', ADDRESS_ONE); dataSourceMock.setContext(context); }); - afterEach(function() { + afterEach(function () { clearStore(); }); - test('handleGranted', function() { + test('handleGranted', function () { let event = createGrantedEvent( DAO_ADDRESS, ADDRESS_ONE, @@ -69,7 +68,7 @@ describe('AdminMembers', function() { ); }); - test('handleRevoked', function() { + test('handleRevoked', function () { let administrator = new Administrator(ADDRESS_TWO); administrator.address = ADDRESS_TWO; administrator.save(); diff --git a/packages/subgraph/tests/admin/utils.ts b/packages/subgraph/tests/admin/utils.ts index 4274e9354..22e1af03a 100644 --- a/packages/subgraph/tests/admin/utils.ts +++ b/packages/subgraph/tests/admin/utils.ts @@ -1,12 +1,12 @@ -import {Address, BigInt, Bytes, ethereum} from '@graphprotocol/graph-ts'; -import {newMockEvent} from 'matchstick-as'; - import { ProposalCreated, - ProposalExecuted + ProposalExecuted, } from '../../generated/templates/Admin/Admin'; import {Granted, Revoked} from '../../generated/templates/Admin/DAO'; import {ADDRESS_ZERO} from '../constants'; +import {Address, BigInt, Bytes, ethereum} from '@graphprotocol/graph-ts'; +import {newMockEvent} from 'matchstick-as'; + // events export function createNewProposalCreatedEvent( diff --git a/packages/subgraph/tests/constants.ts b/packages/subgraph/tests/constants.ts index 99c22da87..50b3da733 100644 --- a/packages/subgraph/tests/constants.ts +++ b/packages/subgraph/tests/constants.ts @@ -1,6 +1,5 @@ -import {Address, BigInt} from '@graphprotocol/graph-ts'; - import {getProposalId} from '../src/utils/proposals'; +import {Address, BigInt} from '@graphprotocol/graph-ts'; export const ADDRESS_ZERO = '0x0000000000000000000000000000000000000000'; export const ADDRESS_ONE = '0x0000000000000000000000000000000000000001'; @@ -70,6 +69,5 @@ export const PROPOSAL_ENTITY_ID = getProposalId( BigInt.fromString(PLUGIN_PROPOSAL_ID) ); -export const PLUGIN_ENTITY_ID = Address.fromString( - CONTRACT_ADDRESS -).toHexString(); +export const PLUGIN_ENTITY_ID = + Address.fromString(CONTRACT_ADDRESS).toHexString(); diff --git a/packages/subgraph/tests/dao/dao_v1_0_0.test.ts b/packages/subgraph/tests/dao/dao_v1_0_0.test.ts index 0541f2fbf..a6a93291a 100644 --- a/packages/subgraph/tests/dao/dao_v1_0_0.test.ts +++ b/packages/subgraph/tests/dao/dao_v1_0_0.test.ts @@ -1,14 +1,9 @@ import { - afterEach, - assert, - beforeAll, - beforeEach, - clearStore, - describe, - test -} from 'matchstick-as/assembly/index'; -import {Address, Bytes, BigInt, ethereum} from '@graphprotocol/graph-ts'; - + Action, + ERC721Balance, + TransactionActionsProposal, +} from '../../generated/schema'; +import {Executed} from '../../generated/templates/DaoTemplateV1_0_0/DAO'; import { handleNativeTokenDeposited, handleDeposited, @@ -18,37 +13,9 @@ import { handleSignatureValidatorSet, handleStandardCallbackRegistered, handleCallbackReceived, - handleNewURI + handleNewURI, } from '../../src/dao/dao_v1_0_0'; -import { - DAO_ADDRESS, - ADDRESS_ONE, - DAO_TOKEN_ADDRESS, - ONE_ETH, - STRING_DATA, - ADDRESS_ZERO, - CONTRACT_ADDRESS, - ZERO_BYTES32, - ADDRESS_THREE, - ADDRESS_FOUR, - ERC20_AMOUNT_HALF, - ERC20_AMOUNT_FULL -} from '../constants'; -import { - createDummyActions, - createERC1155TokenCalls, - createTokenCalls -} from '../utils'; -import { - getBalanceOf, - createNewExecutedEvent, - createDaoEntityState, - createTrustedForwarderSetEvent, - createSignatureValidatorSetEvent, - createStandardCallbackRegisteredEvent, - getSupportsInterface, - encodeWithFunctionSelector -} from './utils'; +import {GOVERNANCE_WRAPPED_ERC20_INTERFACE_ID} from '../../src/utils/constants'; import { ERC1155_INTERFACE_ID, ERC165_INTERFACE_ID, @@ -61,14 +28,22 @@ import { getTransferId, onERC1155BatchReceived, onERC1155Received, - onERC721Received + onERC721Received, } from '../../src/utils/tokens/common'; import { - Action, - ERC721Balance, - TransactionActionsProposal -} from '../../generated/schema'; -import {Executed} from '../../generated/templates/DaoTemplateV1_0_0/DAO'; + DAO_ADDRESS, + ADDRESS_ONE, + DAO_TOKEN_ADDRESS, + ONE_ETH, + STRING_DATA, + ADDRESS_ZERO, + CONTRACT_ADDRESS, + ZERO_BYTES32, + ADDRESS_THREE, + ADDRESS_FOUR, + ERC20_AMOUNT_HALF, + ERC20_AMOUNT_FULL, +} from '../constants'; import { ExtendedDao, ExtendedERC1155Balance, @@ -82,9 +57,33 @@ import { ExtendedERC721Contract, ExtendedERC721Transfer, ExtendedNativeBalance, - ExtendedNativeTransfer + ExtendedNativeTransfer, } from '../helpers/extended-schema'; -import {GOVERNANCE_WRAPPED_ERC20_INTERFACE_ID} from '../../src/utils/constants'; +import { + createDummyActions, + createERC1155TokenCalls, + createTokenCalls, +} from '../utils'; +import { + getBalanceOf, + createNewExecutedEvent, + createDaoEntityState, + createTrustedForwarderSetEvent, + createSignatureValidatorSetEvent, + createStandardCallbackRegisteredEvent, + getSupportsInterface, + encodeWithFunctionSelector, +} from './utils'; +import {Address, Bytes, BigInt, ethereum} from '@graphprotocol/graph-ts'; +import { + afterEach, + assert, + beforeAll, + beforeEach, + clearStore, + describe, + test, +} from 'matchstick-as/assembly/index'; const eq = assert.fieldEquals; @@ -429,7 +428,7 @@ describe('handleCallbackReceived: ', () => { ethereum.Value.fromAddress(Address.fromString(ADDRESS_THREE)), ethereum.Value.fromAddress(Address.fromString(ADDRESS_FOUR)), ethereum.Value.fromUnsignedBigInt(tokenId), - ethereum.Value.fromBytes(Bytes.fromHexString('0x')) + ethereum.Value.fromBytes(Bytes.fromHexString('0x')), ]; let functionData = encodeWithFunctionSelector( @@ -485,7 +484,7 @@ describe('handleCallbackReceived: ', () => { ethereum.Value.fromAddress(Address.fromString(ADDRESS_THREE)), ethereum.Value.fromAddress(Address.fromString(ADDRESS_FOUR)), ethereum.Value.fromUnsignedBigInt(BigInt.fromU32(1)), - ethereum.Value.fromBytes(Bytes.fromHexString('0x')) + ethereum.Value.fromBytes(Bytes.fromHexString('0x')), ]; let functionData = encodeWithFunctionSelector( @@ -573,7 +572,7 @@ describe('handleCallbackReceived: ', () => { ethereum.Value.fromAddress(Address.fromString(ADDRESS_THREE)), // from ethereum.Value.fromUnsignedBigInt(transferToken), // tokenId ethereum.Value.fromUnsignedBigInt(amount), // amount - ethereum.Value.fromBytes(Bytes.fromHexString('0x')) // data + ethereum.Value.fromBytes(Bytes.fromHexString('0x')), // data ]; let functionData = encodeWithFunctionSelector( @@ -615,7 +614,8 @@ describe('handleCallbackReceived: ', () => { erc1155Balance.assertEntity(); // check ERC1155TokenIdBalance entity assert.entityCount('ERC1155TokenIdBalance', 1); - let erc1155TokenIdBalance = new ExtendedERC1155TokenIdBalance().withDefaultValues(); + let erc1155TokenIdBalance = + new ExtendedERC1155TokenIdBalance().withDefaultValues(); erc1155TokenIdBalance.amount = amount; erc1155TokenIdBalance.lastUpdated = timestamp; erc1155TokenIdBalance.balance = balanceId; @@ -630,7 +630,7 @@ describe('handleCallbackReceived: ', () => { ethereum.Value.fromAddress(Address.fromString(ADDRESS_THREE)), // from ethereum.Value.fromUnsignedBigInt(transferToken), // tokenId ethereum.Value.fromUnsignedBigInt(amount), // amount - ethereum.Value.fromBytes(Bytes.fromHexString('0x')) // data + ethereum.Value.fromBytes(Bytes.fromHexString('0x')), // data ]; let functionData = encodeWithFunctionSelector( @@ -660,7 +660,8 @@ describe('handleCallbackReceived: ', () => { assert.entityCount('ERC1155Transfer', 2); assert.entityCount('ERC1155Balance', 1); assert.entityCount('ERC1155TokenIdBalance', 1); - let erc1155TokenIdBalance = new ExtendedERC1155TokenIdBalance().withDefaultValues(); + let erc1155TokenIdBalance = + new ExtendedERC1155TokenIdBalance().withDefaultValues(); erc1155TokenIdBalance.amount = amount.times(BigInt.fromU32(2)); erc1155TokenIdBalance.lastUpdated = newEvent.block.timestamp; erc1155TokenIdBalance.assertEntity(); @@ -698,7 +699,7 @@ describe('handleCallbackReceived: ', () => { ethereum.Value.fromAddress(Address.fromString(ADDRESS_THREE)), // from ethereum.Value.fromUnsignedBigIntArray(transferToken), // tokenId ethereum.Value.fromUnsignedBigIntArray(amount), // amount - ethereum.Value.fromBytes(Bytes.fromHexString('0x')) // data + ethereum.Value.fromBytes(Bytes.fromHexString('0x')), // data ]; let functionData = encodeWithFunctionSelector( @@ -750,7 +751,8 @@ describe('handleCallbackReceived: ', () => { // check ERC1155TokenIdBalance entity assert.entityCount('ERC1155TokenIdBalance', 2); for (let i = 0; i < transferToken.length; i++) { - let erc1155TokenIdBalance = new ExtendedERC1155TokenIdBalance().withDefaultValues(); + let erc1155TokenIdBalance = + new ExtendedERC1155TokenIdBalance().withDefaultValues(); erc1155TokenIdBalance.balance = balanceId; erc1155TokenIdBalance.id = erc1155TokenIdBalances[i]; erc1155TokenIdBalance.amount = amount[i]; @@ -768,7 +770,7 @@ describe('handleCallbackReceived: ', () => { ethereum.Value.fromAddress(Address.fromString(ADDRESS_THREE)), // from ethereum.Value.fromUnsignedBigIntArray(transferToken), // tokenId ethereum.Value.fromUnsignedBigIntArray(amount), // amount - ethereum.Value.fromBytes(Bytes.fromHexString('0x')) // data + ethereum.Value.fromBytes(Bytes.fromHexString('0x')), // data ]; let functionData = encodeWithFunctionSelector( @@ -796,7 +798,8 @@ describe('handleCallbackReceived: ', () => { assert.entityCount('ERC1155Balance', 1); assert.entityCount('ERC1155TokenIdBalance', 2); for (let i = 0; i < transferToken.length; i++) { - let erc1155TokenIdBalance = new ExtendedERC1155TokenIdBalance().withDefaultValues(); + let erc1155TokenIdBalance = + new ExtendedERC1155TokenIdBalance().withDefaultValues(); erc1155TokenIdBalance.id = getTokenIdBalanceId( daoId, tokenId, @@ -823,7 +826,7 @@ describe('handleExecuted', () => { let execResults = [ Bytes.fromHexString('0x11'), - Bytes.fromHexString('0x22') + Bytes.fromHexString('0x22'), ]; let failureMap = '2'; @@ -956,7 +959,7 @@ describe('handleExecuted', () => { let transferToken = BigInt.fromU32(10); let tupleArray: Array = [ ethereum.Value.fromAddress(Address.fromString(ADDRESS_THREE)), - ethereum.Value.fromUnsignedBigInt(transferToken) + ethereum.Value.fromUnsignedBigInt(transferToken), ]; let event = createExecutedEvent( @@ -1014,7 +1017,7 @@ describe('handleExecuted', () => { test('correctly handles multiple events and updates balance', () => { let tupleArray: Array = [ ethereum.Value.fromAddress(Address.fromString(ADDRESS_THREE)), - ethereum.Value.fromUnsignedBigInt(BigInt.fromU32(10)) + ethereum.Value.fromUnsignedBigInt(BigInt.fromU32(10)), ]; let event = createExecutedEvent( @@ -1058,7 +1061,7 @@ describe('handleExecuted', () => { let tupleArray: Array = [ ethereum.Value.fromAddress(Address.fromString(DAO_ADDRESS)), ethereum.Value.fromAddress(Address.fromString(ADDRESS_THREE)), - ethereum.Value.fromUnsignedBigInt(transferToken) + ethereum.Value.fromUnsignedBigInt(transferToken), ]; let event = createExecutedEvent( @@ -1117,7 +1120,7 @@ describe('handleExecuted', () => { let tupleArray: Array = [ ethereum.Value.fromAddress(Address.fromString(DAO_ADDRESS)), ethereum.Value.fromAddress(Address.fromString(ADDRESS_THREE)), - ethereum.Value.fromUnsignedBigInt(BigInt.fromU32(10)) + ethereum.Value.fromUnsignedBigInt(BigInt.fromU32(10)), ]; let event = createExecutedEvent( @@ -1169,7 +1172,7 @@ describe('handleExecuted', () => { entity.tokenIds = [ BigInt.fromI32(4), BigInt.fromI32(8), - BigInt.fromI32(12) + BigInt.fromI32(12), ]; entity.lastUpdated = BigInt.fromI32(2); entity.token = tokenId; @@ -1183,7 +1186,7 @@ describe('handleExecuted', () => { let tupleArray: Array = [ ethereum.Value.fromAddress(Address.fromString(DAO_ADDRESS)), ethereum.Value.fromAddress(Address.fromString(ADDRESS_THREE)), - ethereum.Value.fromUnsignedBigInt(transferToKen) + ethereum.Value.fromUnsignedBigInt(transferToKen), ]; let event = createExecutedEvent( @@ -1276,7 +1279,7 @@ describe('handleExecuted', () => { ethereum.Value.fromAddress(Address.fromString(DAO_ADDRESS)), ethereum.Value.fromAddress(Address.fromString(ADDRESS_THREE)), ethereum.Value.fromUnsignedBigInt(transferToKen), - ethereum.Value.fromBytes(Bytes.fromHexString('0x')) + ethereum.Value.fromBytes(Bytes.fromHexString('0x')), ]; let event = createExecutedEvent( diff --git a/packages/subgraph/tests/dao/dao_v1_3_0.test.ts b/packages/subgraph/tests/dao/dao_v1_3_0.test.ts index 478421715..59b1fc996 100644 --- a/packages/subgraph/tests/dao/dao_v1_3_0.test.ts +++ b/packages/subgraph/tests/dao/dao_v1_3_0.test.ts @@ -1,20 +1,11 @@ -import {ethereum, Bytes, Address, BigInt} from '@graphprotocol/graph-ts'; -import { - describe, - test, - beforeEach, - afterEach, - clearStore, - assert, - beforeAll -} from 'matchstick-as'; import { TransactionActionsProposal, Action, - ERC721Balance + ERC721Balance, } from '../../generated/schema'; import {Executed} from '../../generated/templates/DaoTemplateV1_3_0/DAO'; import {handleExecuted} from '../../src/dao/dao_v1_3_0'; +import {GOVERNANCE_WRAPPED_ERC20_INTERFACE_ID} from '../../src/utils/constants'; import { ERC20_transfer, getTransferId, @@ -26,7 +17,7 @@ import { ERC1155_INTERFACE_ID, getTokenIdBalanceId, getERC1155TransferId, - ERC165_INTERFACE_ID + ERC165_INTERFACE_ID, } from '../../src/utils/tokens/common'; import { DAO_ADDRESS, @@ -35,26 +26,35 @@ import { ADDRESS_THREE, ERC20_AMOUNT_FULL, CONTRACT_ADDRESS, - ZERO_BYTES32 + ZERO_BYTES32, } from '../constants'; +import { + ExtendedERC1155Balance, + ExtendedERC1155Contract, + ExtendedERC1155TokenIdBalance, + ExtendedERC1155Transfer, +} from '../helpers/extended-schema'; import { createDummyActions, createERC1155TokenCalls, - createTokenCalls + createTokenCalls, } from '../utils'; import { createNewExecutedEvent, encodeWithFunctionSelector, getBalanceOf, - getSupportsInterface + getSupportsInterface, } from './utils'; +import {ethereum, Bytes, Address, BigInt} from '@graphprotocol/graph-ts'; import { - ExtendedERC1155Balance, - ExtendedERC1155Contract, - ExtendedERC1155TokenIdBalance, - ExtendedERC1155Transfer -} from '../helpers/extended-schema'; -import {GOVERNANCE_WRAPPED_ERC20_INTERFACE_ID} from '../../src/utils/constants'; + describe, + test, + beforeEach, + afterEach, + clearStore, + assert, + beforeAll, +} from 'matchstick-as'; const eq = assert.fieldEquals; let daoId = Address.fromString(DAO_ADDRESS).toHexString(); @@ -72,7 +72,7 @@ describe('handleExecuted', () => { let execResults = [ Bytes.fromHexString('0x11'), - Bytes.fromHexString('0x22') + Bytes.fromHexString('0x22'), ]; let allowFailureMap = '2'; @@ -233,7 +233,7 @@ describe('handleExecuted', () => { let transferToken = BigInt.fromU32(10); let tupleArray: Array = [ ethereum.Value.fromAddress(Address.fromString(ADDRESS_THREE)), - ethereum.Value.fromUnsignedBigInt(transferToken) + ethereum.Value.fromUnsignedBigInt(transferToken), ]; let event = createExecutedEvent( @@ -292,7 +292,7 @@ describe('handleExecuted', () => { test('correctly handles multiple events and updates balance', () => { let tupleArray: Array = [ ethereum.Value.fromAddress(Address.fromString(ADDRESS_THREE)), - ethereum.Value.fromUnsignedBigInt(BigInt.fromU32(10)) + ethereum.Value.fromUnsignedBigInt(BigInt.fromU32(10)), ]; let event = createExecutedEvent( @@ -337,7 +337,7 @@ describe('handleExecuted', () => { let tupleArray: Array = [ ethereum.Value.fromAddress(Address.fromString(DAO_ADDRESS)), ethereum.Value.fromAddress(Address.fromString(ADDRESS_THREE)), - ethereum.Value.fromUnsignedBigInt(transferToken) + ethereum.Value.fromUnsignedBigInt(transferToken), ]; let event = createExecutedEvent( @@ -397,7 +397,7 @@ describe('handleExecuted', () => { let tupleArray: Array = [ ethereum.Value.fromAddress(Address.fromString(DAO_ADDRESS)), ethereum.Value.fromAddress(Address.fromString(ADDRESS_THREE)), - ethereum.Value.fromUnsignedBigInt(BigInt.fromU32(10)) + ethereum.Value.fromUnsignedBigInt(BigInt.fromU32(10)), ]; let event = createExecutedEvent( @@ -450,7 +450,7 @@ describe('handleExecuted', () => { entity.tokenIds = [ BigInt.fromI32(4), BigInt.fromI32(8), - BigInt.fromI32(12) + BigInt.fromI32(12), ]; entity.lastUpdated = BigInt.fromI32(2); entity.token = tokenId; @@ -464,7 +464,7 @@ describe('handleExecuted', () => { let tupleArray: Array = [ ethereum.Value.fromAddress(Address.fromString(DAO_ADDRESS)), ethereum.Value.fromAddress(Address.fromString(ADDRESS_THREE)), - ethereum.Value.fromUnsignedBigInt(transferToKen) + ethereum.Value.fromUnsignedBigInt(transferToKen), ]; let event = createExecutedEvent( @@ -559,7 +559,7 @@ describe('handleExecuted', () => { ethereum.Value.fromAddress(Address.fromString(DAO_ADDRESS)), ethereum.Value.fromAddress(Address.fromString(ADDRESS_THREE)), ethereum.Value.fromUnsignedBigInt(transferToKen), - ethereum.Value.fromBytes(Bytes.fromHexString('0x')) + ethereum.Value.fromBytes(Bytes.fromHexString('0x')), ]; let event = createExecutedEvent( @@ -682,7 +682,7 @@ describe('handleExecuted', () => { ethereum.Value.fromAddress(Address.fromString(ADDRESS_THREE)), // to ethereum.Value.fromUnsignedBigInt(transferToken), // tokenId ethereum.Value.fromUnsignedBigInt(amount), // amount - ethereum.Value.fromBytes(Bytes.fromHexString('0x')) // data + ethereum.Value.fromBytes(Bytes.fromHexString('0x')), // data ]; let event = createExecutedEvent( [tupleArray], @@ -709,7 +709,8 @@ describe('handleExecuted', () => { // check ERC1155TokenIdBalance entity assert.entityCount('ERC1155TokenIdBalance', 1); - let erc1155TokenIdBalance = new ExtendedERC1155TokenIdBalance().withDefaultValues(); + let erc1155TokenIdBalance = + new ExtendedERC1155TokenIdBalance().withDefaultValues(); erc1155TokenIdBalance.amount = amount; erc1155TokenIdBalance.lastUpdated = timestamp; erc1155TokenIdBalance.assertEntity(); @@ -748,7 +749,7 @@ describe('handleExecuted', () => { ethereum.Value.fromAddress(Address.fromString(ADDRESS_THREE)), ethereum.Value.fromUnsignedBigInt(transferTokens[i]), ethereum.Value.fromUnsignedBigInt(amount), - ethereum.Value.fromBytes(Bytes.fromHexString('0x')) + ethereum.Value.fromBytes(Bytes.fromHexString('0x')), ]); } @@ -780,19 +781,19 @@ describe('handleExecuted', () => { let tokenIds = [ BigInt.fromI32(0), BigInt.fromI32(1), - BigInt.fromI32(2) + BigInt.fromI32(2), ]; let amounts = [ BigInt.fromI32(10), BigInt.fromI32(10), - BigInt.fromI32(10) + BigInt.fromI32(10), ]; let tupleArray: Array = [ ethereum.Value.fromAddress(Address.fromString(DAO_ADDRESS)), // from ethereum.Value.fromAddress(Address.fromString(ADDRESS_THREE)), // to ethereum.Value.fromUnsignedBigIntArray(tokenIds), // tokenIds ethereum.Value.fromUnsignedBigIntArray(amounts), // amounts - ethereum.Value.fromBytes(Bytes.fromHexString('0x')) // data + ethereum.Value.fromBytes(Bytes.fromHexString('0x')), // data ]; let event = createExecutedEvent( [tupleArray], @@ -824,7 +825,8 @@ describe('handleExecuted', () => { // check ERC1155TokenIdBalance entity assert.entityCount('ERC1155TokenIdBalance', 3); for (let i = 0; i < tokenIds.length; i++) { - let erc1155TokenIdBalance = new ExtendedERC1155TokenIdBalance().withDefaultValues(); + let erc1155TokenIdBalance = + new ExtendedERC1155TokenIdBalance().withDefaultValues(); erc1155TokenIdBalance.id = tokenIdBalanceIdArray[i]; erc1155TokenIdBalance.tokenId = tokenIds[i]; erc1155TokenIdBalance.amount = amounts[i]; @@ -844,7 +846,8 @@ describe('handleExecuted', () => { .concat('_') .concat(logIndex.toHexString()); for (let i = 0; i < tokenIds.length; i++) { - let erc1155Transfer = new ExtendedERC1155Transfer().withDefaultValues(); + let erc1155Transfer = + new ExtendedERC1155Transfer().withDefaultValues(); erc1155Transfer.id = getERC1155TransferId(txHash, logIndex, 0, i); // appeend index to transferId to make sure it is unique erc1155Transfer.amount = amounts[i]; @@ -861,11 +864,11 @@ describe('handleExecuted', () => { test('correctly handles multiple events and updates balance', () => { let tokenIds = [ [BigInt.fromI32(0), BigInt.fromI32(1), BigInt.fromI32(2)], - [BigInt.fromI32(0), BigInt.fromI32(1), BigInt.fromI32(2)] + [BigInt.fromI32(0), BigInt.fromI32(1), BigInt.fromI32(2)], ]; let amounts = [ [BigInt.fromI32(10), BigInt.fromI32(10), BigInt.fromI32(10)], - [BigInt.fromI32(30), BigInt.fromI32(30), BigInt.fromI32(30)] + [BigInt.fromI32(30), BigInt.fromI32(30), BigInt.fromI32(30)], ]; let tuples: ethereum.Value[][] = []; for (let i = 0; i < tokenIds.length; i++) { @@ -874,7 +877,7 @@ describe('handleExecuted', () => { ethereum.Value.fromAddress(Address.fromString(ADDRESS_THREE)), // to ethereum.Value.fromUnsignedBigIntArray(tokenIds[i]), // tokenIds ethereum.Value.fromUnsignedBigIntArray(amounts[i]), // amounts - ethereum.Value.fromBytes(Bytes.fromHexString('0x')) // data + ethereum.Value.fromBytes(Bytes.fromHexString('0x')), // data ]); } let event = createExecutedEvent( diff --git a/packages/subgraph/tests/dao/utils.ts b/packages/subgraph/tests/dao/utils.ts index d2908075b..893adc6e0 100644 --- a/packages/subgraph/tests/dao/utils.ts +++ b/packages/subgraph/tests/dao/utils.ts @@ -1,7 +1,4 @@ -import {ethereum, Bytes, Address, BigInt} from '@graphprotocol/graph-ts'; -import {createMockedFunction, newMockEvent} from 'matchstick-as/assembly/index'; import {Dao} from '../../generated/schema'; - import { MetadataSet, NativeTokenDeposited, @@ -11,8 +8,10 @@ import { SignatureValidatorSet, StandardCallbackRegistered, CallbackReceived, - NewURI + NewURI, } from '../../generated/templates/DaoTemplateV1_0_0/DAO'; +import {ethereum, Bytes, Address, BigInt} from '@graphprotocol/graph-ts'; +import {createMockedFunction, newMockEvent} from 'matchstick-as/assembly/index'; // events @@ -398,7 +397,7 @@ export function getIsUserAllowed( ) .withArgs([ ethereum.Value.fromAddress(Address.fromString(address)), - ethereum.Value.fromUnsignedBigInt(BigInt.zero()) + ethereum.Value.fromUnsignedBigInt(BigInt.zero()), ]) .returns([ethereum.Value.fromBoolean(returns)]); } @@ -427,7 +426,7 @@ export function getSupportsInterface( 'supportsInterface(bytes4):(bool)' ) .withArgs([ - ethereum.Value.fromFixedBytes(Bytes.fromHexString(interfaceId) as Bytes) + ethereum.Value.fromFixedBytes(Bytes.fromHexString(interfaceId) as Bytes), ]) .returns([ethereum.Value.fromBoolean(returns)]); } diff --git a/packages/subgraph/tests/helpers/method-classes.ts b/packages/subgraph/tests/helpers/method-classes.ts index dac7a2569..cf22d18d9 100644 --- a/packages/subgraph/tests/helpers/method-classes.ts +++ b/packages/subgraph/tests/helpers/method-classes.ts @@ -2,15 +2,6 @@ * IMPORTANT: Do not export classes from this file. * The classes of this file are meant to be incorporated into the classes of ./extended-schema.ts */ - -import { - Address, - BigInt, - ByteArray, - Bytes, - crypto, - ethereum -} from '@graphprotocol/graph-ts'; import { Dao, ERC20Balance, @@ -31,36 +22,36 @@ import { TokenVotingProposal, TokenVotingVote, TokenVotingVoter, - Permission + Permission, } from '../../generated/schema'; import { CallbackReceived, Deposited, NativeTokenDeposited, - NewURI + NewURI, } from '../../generated/templates/DaoTemplateV1_0_0/DAO'; import { DelegateChanged, - DelegateVotesChanged + DelegateVotesChanged, } from '../../generated/templates/GovernanceERC20/GovernanceERC20'; import { MembershipContractAnnounced, ProposalCreated, ProposalExecuted, VoteCast, - VotingSettingsUpdated + VotingSettingsUpdated, } from '../../generated/templates/TokenVoting/TokenVoting'; import { VOTER_OPTIONS, VOTE_OPTIONS, VOTING_MODES, - VOTING_MODE_INDEXES + VOTING_MODE_INDEXES, } from '../../src/utils/constants'; import { getBalanceId, getERC1155TransferId, getTokenIdBalanceId, - getTransferId + getTransferId, } from '../../src/utils/tokens/common'; import { ADDRESS_ONE, @@ -86,7 +77,7 @@ import { ADDRESS_TWO, ADDRESS_THREE, ADDRESS_ZERO, - ADDRESS_FOUR + ADDRESS_FOUR, } from '../constants'; import { createCallbackReceivedEvent, @@ -94,8 +85,12 @@ import { createNewNativeTokenDepositedEvent, createNewURIEvent, getBalanceOf, - getSupportsInterface + getSupportsInterface, } from '../dao/utils'; +import { + createNewGrantedEvent, + createNewRevokedEvent, +} from '../permission-mamager/utils'; import { createNewDelegateChangedEvent, createNewDelegateVotesChangedEvent, @@ -104,19 +99,23 @@ import { createNewProposalExecutedEvent, createNewVoteCastEvent, createNewVotingSettingsUpdatedEvent, - getProposalCountCall + getProposalCountCall, } from '../token/utils'; import { createGetProposalCall, createTotalVotingPowerCall, createTokenCalls, createWrappedTokenCalls, - createERC1155TokenCalls + createERC1155TokenCalls, } from '../utils'; import { - createNewGrantedEvent, - createNewRevokedEvent -} from '../permission-mamager/utils'; + Address, + BigInt, + ByteArray, + Bytes, + crypto, + ethereum, +} from '@graphprotocol/graph-ts'; /* eslint-disable @typescript-eslint/no-unused-vars */ // PermissionManager @@ -139,7 +138,7 @@ class PermissionMethods extends Permission { emittingContract, permissionId.toHexString(), where.toHexString(), - who.toHexString() + who.toHexString(), ].join('_'); this.where = where; this.permissionId = permissionId; @@ -321,9 +320,8 @@ class ERC20WrapperContractMethods extends ERC20WrapperContract { this.name = 'Wrapped Test Token'; this.symbol = 'WTT'; this.decimals = 18; - this.underlyingToken = Address.fromHexString( - DAO_TOKEN_ADDRESS - ).toHexString(); + this.underlyingToken = + Address.fromHexString(DAO_TOKEN_ADDRESS).toHexString(); return this; } // calls diff --git a/packages/subgraph/tests/multisig/multisig.test.ts b/packages/subgraph/tests/multisig/multisig.test.ts index 7f012ceb5..9c2519788 100644 --- a/packages/subgraph/tests/multisig/multisig.test.ts +++ b/packages/subgraph/tests/multisig/multisig.test.ts @@ -1,15 +1,13 @@ -import {assert, clearStore, test} from 'matchstick-as/assembly/index'; -import {Address, BigInt} from '@graphprotocol/graph-ts'; - +import {MultisigApprover} from '../../generated/schema'; import { handleMembersAdded, handleApproved, handleProposalExecuted, handleMembersRemoved, _handleProposalCreated, - handleMultisigSettingsUpdated + handleMultisigSettingsUpdated, } from '../../src/packages/multisig/multisig'; -import {MultisigApprover} from '../../generated/schema'; +import {getProposalId} from '../../src/utils/proposals'; import { ADDRESS_ONE, ADDRESS_TWO, @@ -24,7 +22,7 @@ import { PROPOSAL_ENTITY_ID, START_DATE, END_DATE, - ALLOW_FAILURE_MAP + ALLOW_FAILURE_MAP, } from '../constants'; import {createDummyActions} from '../utils'; import { @@ -37,9 +35,10 @@ import { createMultisigProposalEntityState, createGetProposalCall, createNewMultisigSettingsUpdatedEvent, - createMultisigPluginState + createMultisigPluginState, } from './utils'; -import {getProposalId} from '../../src/utils/proposals'; +import {Address, BigInt} from '@graphprotocol/graph-ts'; +import {assert, clearStore, test} from 'matchstick-as/assembly/index'; let actions = createDummyActions(DAO_TOKEN_ADDRESS, '0', '0x00000000'); @@ -315,7 +314,7 @@ test('Run Multisig (handleProposalExecuted) mappings with mock event', () => { test('Run Multisig (handleMembersAdded) mappings with mock event', () => { let userArray = [ Address.fromString(ADDRESS_ONE), - Address.fromString(ADDRESS_TWO) + Address.fromString(ADDRESS_TWO), ]; // create event @@ -351,7 +350,7 @@ test('Run Multisig (handleMembersRemoved) mappings with mock event', () => { // create state let memberAddresses = [ Address.fromString(ADDRESS_ONE), - Address.fromString(ADDRESS_TWO) + Address.fromString(ADDRESS_TWO), ]; for (let index = 0; index < memberAddresses.length; index++) { diff --git a/packages/subgraph/tests/multisig/utils.ts b/packages/subgraph/tests/multisig/utils.ts index 2edd440e6..7e183ea24 100644 --- a/packages/subgraph/tests/multisig/utils.ts +++ b/packages/subgraph/tests/multisig/utils.ts @@ -1,14 +1,11 @@ -import {Address, BigInt, Bytes, ethereum} from '@graphprotocol/graph-ts'; -import {createMockedFunction, newMockEvent} from 'matchstick-as'; import {MultisigPlugin, MultisigProposal} from '../../generated/schema'; - import { ProposalCreated, Approved, ProposalExecuted, MembersAdded, MembersRemoved, - MultisigSettingsUpdated + MultisigSettingsUpdated, } from '../../generated/templates/Multisig/Multisig'; import { ADDRESS_ONE, @@ -24,8 +21,10 @@ import { ALLOW_FAILURE_MAP, ZERO, THREE, - PLUGIN_ENTITY_ID + PLUGIN_ENTITY_ID, } from '../constants'; +import {Address, BigInt, Bytes, ethereum} from '@graphprotocol/graph-ts'; +import {createMockedFunction, newMockEvent} from 'matchstick-as'; // events @@ -247,7 +246,7 @@ export function createGetProposalCall( 'getProposal(uint256):(bool,uint16,(uint16,uint64,uint64,uint64),(address,uint256,bytes)[],uint256)' ) .withArgs([ - ethereum.Value.fromUnsignedBigInt(BigInt.fromString(proposalId)) + ethereum.Value.fromUnsignedBigInt(BigInt.fromString(proposalId)), ]) .returns([ ethereum.Value.fromBoolean(executed), @@ -259,7 +258,7 @@ export function createGetProposalCall( ethereum.Value.fromTupleArray(actions), - ethereum.Value.fromUnsignedBigInt(BigInt.fromString(allowFailureMap)) + ethereum.Value.fromUnsignedBigInt(BigInt.fromString(allowFailureMap)), ]); } diff --git a/packages/subgraph/tests/permission-mamager/permission-manager.test.ts b/packages/subgraph/tests/permission-mamager/permission-manager.test.ts index d9d461b9c..985716837 100644 --- a/packages/subgraph/tests/permission-mamager/permission-manager.test.ts +++ b/packages/subgraph/tests/permission-mamager/permission-manager.test.ts @@ -1,25 +1,23 @@ -import {assert, clearStore, test} from 'matchstick-as/assembly/index'; -import {Address} from '@graphprotocol/graph-ts'; - +import { + Granted as DaoGrantedEvent, + Revoked as DaoRevokedEvent, +} from '../../generated/templates/DaoTemplateV1_0_0/DAO'; +import { + Granted as RepoGrantedEvent, + Revoked as RepoRevokedEvent, +} from '../../generated/templates/PluginRepoTemplate/PluginRepo'; import { handleGranted as daoHandleGranted, - handleRevoked as daoHandleRevoked + handleRevoked as daoHandleRevoked, } from '../../src/dao/dao_v1_0_0'; import { handleGranted as repoHandleGranted, - handleRevoked as repoHandleRevoked + handleRevoked as repoHandleRevoked, } from '../../src/plugin/pluginRepo'; - import {CONTRACT_ADDRESS, DAO_ADDRESS} from '../constants'; import {ExtendedPermission} from '../helpers/extended-schema'; -import { - Granted as RepoGrantedEvent, - Revoked as RepoRevokedEvent -} from '../../generated/templates/PluginRepoTemplate/PluginRepo'; -import { - Granted as DaoGrantedEvent, - Revoked as DaoRevokedEvent -} from '../../generated/templates/DaoTemplateV1_0_0/DAO'; +import {Address} from '@graphprotocol/graph-ts'; +import {assert, clearStore, test} from 'matchstick-as/assembly/index'; const daoId = Address.fromString(DAO_ADDRESS).toHexString(); const pluginRepoId = Address.fromString(CONTRACT_ADDRESS).toHexString(); @@ -66,9 +64,8 @@ test('Run PluginRepo (handleGranted) mappings with mock event', () => { let permission = new ExtendedPermission().withDefaultValues(pluginRepoId); permission.pluginRepo = pluginRepoId; - let grantedEvent = permission.createEvent_Granted( - pluginRepoId - ); + let grantedEvent = + permission.createEvent_Granted(pluginRepoId); // handle event repoHandleGranted(grantedEvent); @@ -89,9 +86,8 @@ test('Run PluginRepo (handleRevoked) mappings with mock event', () => { permission.assertEntity(); // create event and run it's handler - let revokedEvent = permission.createEvent_Revoked( - pluginRepoId - ); + let revokedEvent = + permission.createEvent_Revoked(pluginRepoId); // handle event repoHandleRevoked(revokedEvent); diff --git a/packages/subgraph/tests/plugin/pluginRepo.test.ts b/packages/subgraph/tests/plugin/pluginRepo.test.ts index 31f0e31b7..fb9331634 100644 --- a/packages/subgraph/tests/plugin/pluginRepo.test.ts +++ b/packages/subgraph/tests/plugin/pluginRepo.test.ts @@ -1,11 +1,11 @@ -import {assert, clearStore, test} from 'matchstick-as/assembly/index'; -import {ADDRESS_ONE, ONE} from '../constants'; -import {createReleaseMetadataUpdatedEvent, createVersionCreated} from './utils'; import { handleReleaseMetadataUpdated, - handleVersionCreated + handleVersionCreated, } from '../../src/plugin/pluginRepo'; +import {ADDRESS_ONE, ONE} from '../constants'; +import {createReleaseMetadataUpdatedEvent, createVersionCreated} from './utils'; import {Bytes} from '@graphprotocol/graph-ts'; +import {assert, clearStore, test} from 'matchstick-as/assembly/index'; test('PluginRepo (handleVersionCreated) mappings with mock event', () => { let release = ONE; diff --git a/packages/subgraph/tests/plugin/pluginSetupProcessor.test.ts b/packages/subgraph/tests/plugin/pluginSetupProcessor.test.ts index 27c58f3f5..5e4d8803d 100644 --- a/packages/subgraph/tests/plugin/pluginSetupProcessor.test.ts +++ b/packages/subgraph/tests/plugin/pluginSetupProcessor.test.ts @@ -1,3 +1,23 @@ +import {PluginPreparation} from '../../generated/schema'; +import { + handleInstallationApplied, + handleInstallationPrepared, + handleUninstallationApplied, + handleUninstallationPrepared, + handleUpdateApplied, + handleUpdatePrepared, +} from '../../src/plugin/pluginSetupProcessor'; +import { + getPluginInstallationId, + PERMISSION_OPERATIONS, +} from '../../src/plugin/utils'; +import { + ADMIN_INTERFACE_ID, + TOKEN_VOTING_INTERFACE_ID, + ADDRESSLIST_VOTING_INTERFACE_ID, + MULTISIG_INTERFACE_ID, +} from '../../src/utils/constants'; +import {getSupportsInterface} from '../../tests/dao/utils'; import { ADDRESS_ONE, ADDRESS_TWO, @@ -9,7 +29,7 @@ import { PLUGIN_SETUP_ID, ADDRESS_SIX, APPLIED_PLUGIN_SETUP_ID, - CONTRACT_ADDRESS + CONTRACT_ADDRESS, } from '../constants'; import { createInstallationAppliedEvent, @@ -17,33 +37,12 @@ import { createUninstallationAppliedEvent, createUninstallationPreparedEvent, createUpdateAppliedEvent, - createUpdatePreparedEvent + createUpdatePreparedEvent, } from './utils'; -import { - handleInstallationApplied, - handleInstallationPrepared, - handleUninstallationApplied, - handleUninstallationPrepared, - handleUpdateApplied, - handleUpdatePrepared -} from '../../src/plugin/pluginSetupProcessor'; -import {assert, clearStore, test} from 'matchstick-as'; -import {PluginPreparation} from '../../generated/schema'; import {Address, BigInt, Bytes, ethereum} from '@graphprotocol/graph-ts'; -import {getSupportsInterface} from '../../tests/dao/utils'; -import { - ADMIN_INTERFACE_ID, - TOKEN_VOTING_INTERFACE_ID, - ADDRESSLIST_VOTING_INTERFACE_ID, - MULTISIG_INTERFACE_ID -} from '../../src/utils/constants'; - -import { - getPluginInstallationId, - PERMISSION_OPERATIONS -} from '../../src/plugin/utils'; +import {assert, clearStore, test} from 'matchstick-as'; -test('InstallationPrepared event', function() { +test('InstallationPrepared event', function () { let dao = DAO_ADDRESS; let plugin = CONTRACT_ADDRESS; let setupId = PLUGIN_SETUP_ID; @@ -67,7 +66,7 @@ test('InstallationPrepared event', function() { ethereum.Value.fromAddress(Address.fromString(dao)), ethereum.Value.fromAddress(Address.fromString(plugin)), ethereum.Value.fromAddress(Address.fromString(ADDRESS_ZERO)), - ethereum.Value.fromBytes(Bytes.fromHexString('0x1234')) + ethereum.Value.fromBytes(Bytes.fromHexString('0x1234')), ], [ @@ -75,8 +74,8 @@ test('InstallationPrepared event', function() { ethereum.Value.fromAddress(Address.fromString(dao)), ethereum.Value.fromAddress(Address.fromString(plugin)), ethereum.Value.fromAddress(Address.fromString(ADDRESS_SIX)), - ethereum.Value.fromBytes(Bytes.fromHexString('0x5678')) - ] + ethereum.Value.fromBytes(Bytes.fromHexString('0x5678')), + ], ]; getSupportsInterface(plugin, TOKEN_VOTING_INTERFACE_ID, false); @@ -152,7 +151,7 @@ test('InstallationPrepared event', function() { let helpers = [ Address.fromString(ADDRESS_FOUR), - Address.fromString(ADDRESS_FIVE) + Address.fromString(ADDRESS_FIVE), ]; let pluginPreparation = PluginPreparation.load(preparationId); if (!pluginPreparation) { @@ -170,9 +169,9 @@ test('InstallationPrepared event', function() { let operation = PERMISSION_OPERATIONS.get(permission[0].toI32()); let permissionEntityId = `${preparationId}_${operation}_${permission[1] .toAddress() - .toHexString()}_${permission[2] - .toAddress() - .toHexString()}_${permission[4].toBytes().toHexString()}`; + .toHexString()}_${permission[2].toAddress().toHexString()}_${permission[4] + .toBytes() + .toHexString()}`; assert.fieldEquals( 'PluginPermission', permissionEntityId, @@ -233,7 +232,7 @@ test('InstallationPrepared event', function() { clearStore(); }); -test('InstallationApplied event', function() { +test('InstallationApplied event', function () { let dao = DAO_ADDRESS; let plugin = ADDRESS_ONE; let setupId = PLUGIN_SETUP_ID; @@ -293,7 +292,7 @@ test('InstallationApplied event', function() { clearStore(); }); -test('UpdatePrepared event', function() { +test('UpdatePrepared event', function () { let dao = DAO_ADDRESS; let plugin = ADDRESS_ONE; let setupId = PLUGIN_SETUP_ID; @@ -316,7 +315,7 @@ test('UpdatePrepared event', function() { ethereum.Value.fromAddress(Address.fromString(dao)), ethereum.Value.fromAddress(Address.fromString(plugin)), ethereum.Value.fromAddress(Address.fromString(ADDRESS_ZERO)), - ethereum.Value.fromBytes(Bytes.fromHexString('0x1234')) + ethereum.Value.fromBytes(Bytes.fromHexString('0x1234')), ], [ @@ -324,8 +323,8 @@ test('UpdatePrepared event', function() { ethereum.Value.fromAddress(Address.fromString(dao)), ethereum.Value.fromAddress(Address.fromString(plugin)), ethereum.Value.fromAddress(Address.fromString(ADDRESS_SIX)), - ethereum.Value.fromBytes(Bytes.fromHexString('0x5678')) - ] + ethereum.Value.fromBytes(Bytes.fromHexString('0x5678')), + ], ]; let event = createUpdatePreparedEvent( @@ -386,7 +385,7 @@ test('UpdatePrepared event', function() { let helpers = [ Address.fromString(ADDRESS_FOUR), - Address.fromString(ADDRESS_FIVE) + Address.fromString(ADDRESS_FIVE), ]; let pluginPreparation = PluginPreparation.load(preparationId); if (!pluginPreparation) { @@ -405,9 +404,9 @@ test('UpdatePrepared event', function() { let operation = PERMISSION_OPERATIONS.get(permission[0].toI32()); let permissionEntityId = `${preparationId}_${operation}_${permission[1] .toAddress() - .toHexString()}_${permission[2] - .toAddress() - .toHexString()}_${permission[4].toBytes().toHexString()}`; + .toHexString()}_${permission[2].toAddress().toHexString()}_${permission[4] + .toBytes() + .toHexString()}`; assert.fieldEquals( 'PluginPermission', permissionEntityId, @@ -463,7 +462,7 @@ test('UpdatePrepared event', function() { clearStore(); }); -test('UpdateApplied event', function() { +test('UpdateApplied event', function () { let dao = DAO_ADDRESS; let plugin = ADDRESS_ONE; let setupId = PLUGIN_SETUP_ID; @@ -528,7 +527,7 @@ test('UpdateApplied event', function() { clearStore(); }); -test('UninstallationPrepared event', function() { +test('UninstallationPrepared event', function () { let dao = DAO_ADDRESS; let plugin = ADDRESS_ONE; let setupId = PLUGIN_SETUP_ID; @@ -551,7 +550,7 @@ test('UninstallationPrepared event', function() { ethereum.Value.fromAddress(Address.fromString(dao)), ethereum.Value.fromAddress(Address.fromString(plugin)), ethereum.Value.fromAddress(Address.fromString(ADDRESS_ZERO)), - ethereum.Value.fromBytes(Bytes.fromHexString('0x1234')) + ethereum.Value.fromBytes(Bytes.fromHexString('0x1234')), ], [ @@ -559,8 +558,8 @@ test('UninstallationPrepared event', function() { ethereum.Value.fromAddress(Address.fromString(dao)), ethereum.Value.fromAddress(Address.fromString(plugin)), ethereum.Value.fromAddress(Address.fromString(ADDRESS_SIX)), - ethereum.Value.fromBytes(Bytes.fromHexString('0x5678')) - ] + ethereum.Value.fromBytes(Bytes.fromHexString('0x5678')), + ], ]; let event = createUninstallationPreparedEvent( @@ -637,9 +636,9 @@ test('UninstallationPrepared event', function() { let operation = PERMISSION_OPERATIONS.get(permission[0].toI32()); let permissionEntityId = `${preparationId}_${operation}_${permission[1] .toAddress() - .toHexString()}_${permission[2] - .toAddress() - .toHexString()}_${permission[4].toBytes().toHexString()}`; + .toHexString()}_${permission[2].toAddress().toHexString()}_${permission[4] + .toBytes() + .toHexString()}`; assert.fieldEquals( 'PluginPermission', permissionEntityId, @@ -695,7 +694,7 @@ test('UninstallationPrepared event', function() { clearStore(); }); -test('UninstallationApplied event', function() { +test('UninstallationApplied event', function () { let dao = DAO_ADDRESS; let plugin = ADDRESS_ONE; let setupId = PLUGIN_SETUP_ID; diff --git a/packages/subgraph/tests/plugin/utils.ts b/packages/subgraph/tests/plugin/utils.ts index d190e021a..7a82acd0f 100644 --- a/packages/subgraph/tests/plugin/utils.ts +++ b/packages/subgraph/tests/plugin/utils.ts @@ -1,9 +1,3 @@ -import {Address, BigInt, Bytes, ethereum} from '@graphprotocol/graph-ts'; -import {newMockEvent} from 'matchstick-as'; -import { - ReleaseMetadataUpdated, - VersionCreated -} from '../../generated/templates/PluginRepoTemplate/PluginRepo'; import { InstallationApplied, InstallationPrepared, @@ -13,8 +7,14 @@ import { UpdateApplied, UpdatePrepared, UpdatePreparedPreparedSetupDataStruct, - UpdatePreparedSetupPayloadStruct + UpdatePreparedSetupPayloadStruct, } from '../../generated/PluginSetupProcessor/PluginSetupProcessor'; +import { + ReleaseMetadataUpdated, + VersionCreated, +} from '../../generated/templates/PluginRepoTemplate/PluginRepo'; +import {Address, BigInt, Bytes, ethereum} from '@graphprotocol/graph-ts'; +import {newMockEvent} from 'matchstick-as'; export function createReleaseMetadataUpdatedEvent( release: string, diff --git a/packages/subgraph/tests/registry/daoRegistry.test.ts b/packages/subgraph/tests/registry/daoRegistry.test.ts index b72f569dd..e7c76a0a1 100644 --- a/packages/subgraph/tests/registry/daoRegistry.test.ts +++ b/packages/subgraph/tests/registry/daoRegistry.test.ts @@ -1,17 +1,16 @@ +import {Dao} from '../../generated/schema'; +import {handleDAORegistered} from '../../src/registries/daoRegistry'; +import {DAO_ADDRESS, ADDRESS_ONE} from '../constants'; +import {createNewDaoEvent} from './utils'; +import {Address} from '@graphprotocol/graph-ts'; import { assert, clearStore, test, dataSourceMock, describe, - afterEach + afterEach, } from 'matchstick-as/assembly/index'; -import {Address} from '@graphprotocol/graph-ts'; - -import {handleDAORegistered} from '../../src/registries/daoRegistry'; -import {DAO_ADDRESS, ADDRESS_ONE} from '../constants'; -import {createNewDaoEvent} from './utils'; -import {Dao} from '../../generated/schema'; describe('DAORegistry', () => { afterEach(() => { diff --git a/packages/subgraph/tests/registry/pluginRepoRegistry.test.ts b/packages/subgraph/tests/registry/pluginRepoRegistry.test.ts index add7c3f89..3e156147a 100644 --- a/packages/subgraph/tests/registry/pluginRepoRegistry.test.ts +++ b/packages/subgraph/tests/registry/pluginRepoRegistry.test.ts @@ -1,8 +1,8 @@ -import {assert, clearStore, test} from 'matchstick-as/assembly/index'; +import {handlePluginRepoRegistered} from '../../src/registries/pluginRepoRegistry'; import {ADDRESS_ONE} from '../constants'; import {createPluginRepoRegisteredEvent} from './utils'; -import {handlePluginRepoRegistered} from '../../src/registries/pluginRepoRegistry'; import {Address} from '@graphprotocol/graph-ts'; +import {assert, clearStore, test} from 'matchstick-as/assembly/index'; test('Run plugin repo registry mappings with mock event', () => { let id = Address.fromString(ADDRESS_ONE).toHexString(); diff --git a/packages/subgraph/tests/registry/utils.ts b/packages/subgraph/tests/registry/utils.ts index 26baeed91..e9c5837cb 100644 --- a/packages/subgraph/tests/registry/utils.ts +++ b/packages/subgraph/tests/registry/utils.ts @@ -1,8 +1,7 @@ -import {Address, ethereum} from '@graphprotocol/graph-ts'; -import {newMockEvent} from 'matchstick-as/assembly/index'; - import {DAORegistered} from '../../generated/DAORegistry/DAORegistry'; import {PluginRepoRegistered} from '../../generated/PluginRepoRegistry/PluginRepoRegistry'; +import {Address, ethereum} from '@graphprotocol/graph-ts'; +import {newMockEvent} from 'matchstick-as/assembly/index'; // events diff --git a/packages/subgraph/tests/schema-extender.ts b/packages/subgraph/tests/schema-extender.ts index d9114db86..149915fba 100644 --- a/packages/subgraph/tests/schema-extender.ts +++ b/packages/subgraph/tests/schema-extender.ts @@ -11,7 +11,7 @@ function main() { './tests/helpers/extended-schema.ts', '', { - overwrite: true + overwrite: true, } ); @@ -34,16 +34,17 @@ function main() { // Import assert into generated file outputFile.addImportDeclaration({ namedImports: ['assert', 'log'], - moduleSpecifier: `matchstick-as` + moduleSpecifier: `matchstick-as`, }); // Add import statements for the original classes - const sourceFileNameWithoutExtension = sourceFile.getBaseNameWithoutExtension(); + const sourceFileNameWithoutExtension = + sourceFile.getBaseNameWithoutExtension(); outputFile.addImportDeclaration({ namedImports: sourceClasses.map( classDeclaration => classDeclaration.getName() as string ), - moduleSpecifier: `../../generated/${sourceFileNameWithoutExtension}` + moduleSpecifier: `../../generated/${sourceFileNameWithoutExtension}`, }); // Iterate through the classes in the source file @@ -54,7 +55,7 @@ function main() { const newClass = outputFile.addClass({ name: newClassName, isExported: true, - extends: originalClassName + extends: originalClassName, }); // Create a new constructor that calls super() with a default id. @@ -63,7 +64,7 @@ function main() { statements: (writer: CodeBlockWriter) => { const defaultEntityId = '0x1'; writer.writeLine(`super('${defaultEntityId}');`); - } + }, }); // add methods to generated classes @@ -85,7 +86,7 @@ function main() { const newMethod = newClass.addMethod({ name: method.getName(), returnType: returnType, - typeParameters: typeParameters // Add the type parameters to the new method + typeParameters: typeParameters, // Add the type parameters to the new method }); const parameters = method.getParameters().map(parameter => { @@ -96,7 +97,7 @@ function main() { initializer: parameter.getInitializer()?.getText(), decorators: parameter .getDecorators() - .map(decorator => decorator.getStructure()) + .map(decorator => decorator.getStructure()), }; }); @@ -115,7 +116,7 @@ function main() { returnType: 'void', statements: (writer: CodeBlockWriter) => { writer.writeLine('this.save();'); - } + }, }); newClass.addMethod({ @@ -125,8 +126,8 @@ function main() { { name: 'debug', type: 'boolean', - initializer: 'false' - } + initializer: 'false', + }, ], statements: (writer: CodeBlockWriter) => { writer.writeLine(`let entity = ${originalClassName}.load(this.id);`); @@ -163,7 +164,7 @@ function main() { ); }); }); - } + }, }); }); diff --git a/packages/subgraph/tests/token/governance-erc20.test.ts b/packages/subgraph/tests/token/governance-erc20.test.ts index 38e8aabed..eb0535dbf 100644 --- a/packages/subgraph/tests/token/governance-erc20.test.ts +++ b/packages/subgraph/tests/token/governance-erc20.test.ts @@ -1,27 +1,27 @@ import { - assert, - afterEach, - beforeAll, - clearStore, - dataSourceMock, - test, - describe -} from 'matchstick-as'; + handleDelegateChanged, + handleDelegateVotesChanged, + handleTransfer, +} from '../../src/packages/token/governance-erc20'; import { ADDRESS_ONE, ADDRESS_SIX, ADDRESS_TWO, ONE_ETH, - ADDRESS_THREE + ADDRESS_THREE, } from '../constants'; +import {ExtendedTokenVotingMember} from '../helpers/extended-schema'; import {createNewERC20TransferEvent, createTokenVotingMember} from './utils'; -import { - handleDelegateChanged, - handleDelegateVotesChanged, - handleTransfer -} from '../../src/packages/token/governance-erc20'; import {BigInt, DataSourceContext} from '@graphprotocol/graph-ts'; -import {ExtendedTokenVotingMember} from '../helpers/extended-schema'; +import { + assert, + afterEach, + beforeAll, + clearStore, + dataSourceMock, + test, + describe, +} from 'matchstick-as'; describe('Governance ERC20', () => { beforeAll(() => { @@ -113,9 +113,7 @@ describe('Governance ERC20', () => { 'TokenVotingMember', fromUserId, 'balance', - BigInt.fromString(ONE_ETH) - .times(BigInt.fromString('9')) - .toString() + BigInt.fromString(ONE_ETH).times(BigInt.fromString('9')).toString() ); }); @@ -140,9 +138,7 @@ describe('Governance ERC20', () => { 'TokenVotingMember', toUserId, 'balance', - BigInt.fromString(ONE_ETH) - .times(BigInt.fromString('11')) - .toString() + BigInt.fromString(ONE_ETH).times(BigInt.fromString('11')).toString() ); }); }); @@ -316,10 +312,7 @@ describe('Governance ERC20', () => { memberOne.votingPower = BigInt.fromString('100'); memberOne.assertEntity(); // member two should be deleted because it has no balance or voting power - assert.notInStore( - 'TokenVotingMember', - memberTwo.id - ); + assert.notInStore('TokenVotingMember', memberTwo.id); assert.entityCount('TokenVotingMember', 1); }); }); diff --git a/packages/subgraph/tests/token/token-voting.test.ts b/packages/subgraph/tests/token/token-voting.test.ts index d729d3df4..0815ef81d 100644 --- a/packages/subgraph/tests/token/token-voting.test.ts +++ b/packages/subgraph/tests/token/token-voting.test.ts @@ -1,12 +1,9 @@ -import {assert, clearStore, describe, test} from 'matchstick-as/assembly/index'; -import {bigInt, BigInt} from '@graphprotocol/graph-ts'; - import { handleVoteCast, handleProposalExecuted, handleVotingSettingsUpdated, _handleProposalCreated, - handleMembershipContractAnnounced + handleMembershipContractAnnounced, } from '../../src/packages/token/token-voting'; import {VOTING_MODES} from '../../src/utils/constants'; import {GOVERNANCE_WRAPPED_ERC20_INTERFACE_ID} from '../../src/utils/constants'; @@ -17,18 +14,19 @@ import { ONE, ZERO, TWO, - ERC20_AMOUNT_FULL + ERC20_AMOUNT_FULL, } from '../constants'; - -import {createDummyActions} from '../utils'; import { ExtendedERC20Contract, ExtendedERC20WrapperContract, ExtendedTokenVotingPlugin, ExtendedTokenVotingProposal, ExtendedTokenVotingVote, - ExtendedTokenVotingVoter + ExtendedTokenVotingVoter, } from '../helpers/extended-schema'; +import {createDummyActions} from '../utils'; +import {bigInt, BigInt} from '@graphprotocol/graph-ts'; +import {assert, clearStore, describe, test} from 'matchstick-as/assembly/index'; let actions = createDummyActions(DAO_TOKEN_ADDRESS, '0', '0x00000000'); @@ -253,7 +251,8 @@ describe('handleMembershipContractAnnounced', () => { // create entities let tokenVotingPlugin = new ExtendedTokenVotingPlugin().withDefaultValues(); let erc20Contract = new ExtendedERC20Contract().withDefaultValues(); - let erc20WrappedContract = new ExtendedERC20WrapperContract().withDefaultValues(); + let erc20WrappedContract = + new ExtendedERC20WrapperContract().withDefaultValues(); erc20Contract.mockCall_createTokenCalls(ERC20_AMOUNT_FULL); erc20Contract.mockCall_balanceOf(erc20Contract.id, ERC20_AMOUNT_FULL); erc20Contract.mockCall_supportsInterface( diff --git a/packages/subgraph/tests/token/utils.ts b/packages/subgraph/tests/token/utils.ts index 4b69c4125..32cd69ead 100644 --- a/packages/subgraph/tests/token/utils.ts +++ b/packages/subgraph/tests/token/utils.ts @@ -1,14 +1,16 @@ -import {Address, BigInt, Bytes, ethereum} from '@graphprotocol/graph-ts'; -import {createMockedFunction, newMockEvent} from 'matchstick-as'; - +import {TokenVotingMember, TokenVotingProposal} from '../../generated/schema'; +import { + DelegateChanged, + DelegateVotesChanged, +} from '../../generated/templates/GovernanceERC20/GovernanceERC20'; +import {Transfer as ERC20TransferEvent} from '../../generated/templates/TokenVoting/ERC20'; import { VotingSettingsUpdated, VoteCast, ProposalCreated, ProposalExecuted, - MembershipContractAnnounced + MembershipContractAnnounced, } from '../../generated/templates/TokenVoting/TokenVoting'; -import {TokenVotingMember, TokenVotingProposal} from '../../generated/schema'; import { ADDRESS_ONE, DAO_ADDRESS, @@ -23,13 +25,10 @@ import { SNAPSHOT_BLOCK, TOTAL_VOTING_POWER, CREATED_AT, - ALLOW_FAILURE_MAP + ALLOW_FAILURE_MAP, } from '../constants'; -import {Transfer as ERC20TransferEvent} from '../../generated/templates/TokenVoting/ERC20'; -import { - DelegateChanged, - DelegateVotesChanged -} from '../../generated/templates/GovernanceERC20/GovernanceERC20'; +import {Address, BigInt, Bytes, ethereum} from '@graphprotocol/graph-ts'; +import {createMockedFunction, newMockEvent} from 'matchstick-as'; // events diff --git a/packages/subgraph/tests/utils.ts b/packages/subgraph/tests/utils.ts index af284824c..55709c3be 100644 --- a/packages/subgraph/tests/utils.ts +++ b/packages/subgraph/tests/utils.ts @@ -38,16 +38,16 @@ export function createTokenCalls( totalSupply: string | null ): void { createMockGetter(contractAddress, 'name', 'name():(string)', [ - ethereum.Value.fromString(name) + ethereum.Value.fromString(name), ]); createMockGetter(contractAddress, 'symbol', 'symbol():(string)', [ - ethereum.Value.fromString(symbol) + ethereum.Value.fromString(symbol), ]); if (decimals) { createMockGetter(contractAddress, 'decimals', 'decimals():(uint8)', [ - ethereum.Value.fromUnsignedBigInt(BigInt.fromString(decimals)) + ethereum.Value.fromUnsignedBigInt(BigInt.fromString(decimals)), ]); } @@ -70,7 +70,7 @@ export function createWrappedTokenCalls( ): void { createTokenCalls(contractAddress, name, symbol, '18', totalSupply); createMockGetter(contractAddress, 'underlying', 'underlying():(address)', [ - ethereum.Value.fromAddress(Address.fromString(underlyingTokenAddress)) + ethereum.Value.fromAddress(Address.fromString(underlyingTokenAddress)), ]); } @@ -141,7 +141,7 @@ export function createGetProposalCall( 'getProposal(uint256):(bool,bool,(uint8,uint32,uint64,uint64,uint64,uint256),(uint256,uint256,uint256),(address,uint256,bytes)[],uint256)' ) .withArgs([ - ethereum.Value.fromUnsignedBigInt(BigInt.fromString(proposalId)) + ethereum.Value.fromUnsignedBigInt(BigInt.fromString(proposalId)), ]) .returns([ ethereum.Value.fromBoolean(open), @@ -155,7 +155,7 @@ export function createGetProposalCall( ethereum.Value.fromTupleArray(actions), - ethereum.Value.fromUnsignedBigInt(BigInt.fromString(allowFailureMap)) + ethereum.Value.fromUnsignedBigInt(BigInt.fromString(allowFailureMap)), ]); } @@ -171,9 +171,9 @@ export function createTotalVotingPowerCall( 'totalVotingPower(uint256):(uint256)' ) .withArgs([ - ethereum.Value.fromUnsignedBigInt(BigInt.fromString(blockNumber)) + ethereum.Value.fromUnsignedBigInt(BigInt.fromString(blockNumber)), ]) .returns([ - ethereum.Value.fromUnsignedBigInt(BigInt.fromString(totalVotingPower)) + ethereum.Value.fromUnsignedBigInt(BigInt.fromString(totalVotingPower)), ]); } diff --git a/packages/subgraph/tests/utils/utils.test.ts b/packages/subgraph/tests/utils/utils.test.ts index be0f4c27f..7bd018a67 100644 --- a/packages/subgraph/tests/utils/utils.test.ts +++ b/packages/subgraph/tests/utils/utils.test.ts @@ -1,6 +1,3 @@ -import {BigInt} from '@graphprotocol/graph-ts'; - -import {assert, describe, test} from 'matchstick-as/assembly/index'; import {bigIntToBytes32} from '../../src/utils/bytes'; import { ZERO, @@ -10,11 +7,13 @@ import { ZERO_BYTES32, ONE_BYTES32, HALF_UINT256_BYTES32, - MAX_UINT256_BYTES32 + MAX_UINT256_BYTES32, } from '../constants'; +import {BigInt} from '@graphprotocol/graph-ts'; +import {assert, describe, test} from 'matchstick-as/assembly/index'; -describe('Test bytes', function() { - test('`bigIntToBytes32` with a range of `bigInt`s', function() { +describe('Test bytes', function () { + test('`bigIntToBytes32` with a range of `bigInt`s', function () { const MAX_UINT256 = BigInt.fromString(MAX_UINT256_NUMBER_STRING); assert.stringEquals(bigIntToBytes32(BigInt.fromString(ZERO)), ZERO_BYTES32);