diff --git a/.github/workflows/documentation-update.yml b/.github/workflows/documentation-update.yml index 588ca5ec2..4e57eb4dc 100644 --- a/.github/workflows/documentation-update.yml +++ b/.github/workflows/documentation-update.yml @@ -25,6 +25,9 @@ jobs: - name: Generate Docs run: yarn run docgen working-directory: packages/contracts/ + - name: Remove Framework Lifecycle docs + run: rm -rf 04-framework-lifecycle + working-directory: packages/contracts/docs/developer-portal/ - name: Format with prettier run: yarn run prettier 'packages/contracts/docs/developer-portal/03-reference-guide/**/*.md' --write - name: Checkout developer-portal diff --git a/.github/workflows/subgraph-deploy.yaml b/.github/workflows/subgraph-deploy.yaml index dce5c640d..bc1206b7b 100644 --- a/.github/workflows/subgraph-deploy.yaml +++ b/.github/workflows/subgraph-deploy.yaml @@ -69,9 +69,10 @@ jobs: runs-on: ubuntu-latest needs: [prepare, changelog] if: > + always() && ( (github.event_name == 'workflow_dispatch') || ( needs.changelog.result == 'success' && - contains(toJson(github.event.pull_request.labels.*.name), 'subgraph:deploy')) + contains(toJson(github.event.pull_request.labels.*.name), 'subgraph:deploy'))) environment: ${{ needs.prepare.outputs.environment }} strategy: fail-fast: false diff --git a/DEPLOYMENT_CHECKLIST.md b/DEPLOYMENT_CHECKLIST.md index e19815958..df34fde98 100644 --- a/DEPLOYMENT_CHECKLIST.md +++ b/DEPLOYMENT_CHECKLIST.md @@ -4,6 +4,8 @@ This checklist is seen as a guide to deploy the stack to a new chain. ## Pre-Deployment +- [ ] Verify that the deployers wallet has enough funds. +- [ ] Check that the subgraph hoster supports the network OSx is deployed to. - [ ] Make sure you are using Node v16 - [ ] Bump the OSx protocol version in the `ProtocolVersion.sol` file. - [ ] Check that version tags are set correctly in the plugin repo deploy scripts `packages/contracts/deploy/new/30_plugins/10_plugin-repos` to ensure synchronized version numbers across all supported networks. @@ -50,26 +52,28 @@ To deploy run `yarn deploy --network NETWORK` in `packages/contracts` and replac - [ ] If the proxies are not verified with the `Similar Match Source Code` feature - [ ] Verify one of the proxies - [ ] Check if the other proxies are now verified with `Similar Match Source Code` + - [ ] If it is a `PluginSetup`, check that the implementation is verified. ### Configurations -- [ ] Check if the managing DAO set in the `DAO_ENSSubdomainRegistrar` -- [ ] Check if the managing DAO set in the `Plugin_ENSSubdomainRegistrar` -- [ ] Check if the managing DAO set in the `DAORegistry` -- [ ] Check if the `DAO_ENSSubdomainRegistrar` set in the `DAORegistry` +- [ ] Check that all managing DAO signers are members of the managing DAO multisig and no one else. +- [ ] Check if the managing DAO is set in the `DAO_ENSSubdomainRegistrar` +- [ ] Check if the managing DAO is set in the `Plugin_ENSSubdomainRegistrar` +- [ ] Check if the managing DAO is set in the `DAORegistry` +- [ ] Check if the `DAO_ENSSubdomainRegistrar` is set in the `DAORegistry` - [ ] Check if the managing DAO set in the `PluginRepoRegistry` -- [ ] Check if the `Plugin_ENSSubdomainRegistrar` set in the `PluginRepoRegistry` +- [ ] Check if the `Plugin_ENSSubdomainRegistrar` is set in the `PluginRepoRegistry` - [ ] Check if the `PluginRepoRegistry` is set in the `PluginRepoFactory` -- [ ] Check if the `PluginRepoRegistry` set in the `PluginSetupProcessor` -- [ ] Check if the `DAORegistry` set in the `DAOFactory` -- [ ] Check if the `PluginSetupProcessor` set in the `DAOFactory` +- [ ] Check if the `PluginRepoRegistry` is set in the `PluginSetupProcessor` +- [ ] Check if the `DAORegistry` is set in the `DAOFactory` +- [ ] Check if the `PluginSetupProcessor` is set in the `DAOFactory` - [ ] Check that the versions (and eventual `PlaceholderSetup` builds) are published correctly in the `token-voting-repo`, `address-list-voting-repo`, `multisig-repo`, and `admin-repo` and are synchronized across all supported networks. ### Permissions - [ ] Check that the deployer has not the ROOT permission on the managing DAO -- [ ] Check if `DAO_ENSSubdomainRegistrar` is approved for all for the DAO' ENS domain. Call `isApprovedForAll` on the ENS registry -- [ ] Check if `Plugin_ENSSubdomainRegistrar` is approved for all for the plugin' ENS domain. Call `isApprovedForAll` on the ENS registry +- [ ] Check if `DAO_ENSSubdomainRegistrar` is approved for all for the DAO' ENS domain. Call `isApprovedForAll` on the ENS registry with the managing DAO as the owner and the `DAO_ENSSubdomainRegistrar` as the operator. +- [ ] Check if `Plugin_ENSSubdomainRegistrar` is approved for all for the plugin' ENS domain. Call `isApprovedForAll` on the ENS registry with the managing DAO as the owner and the `Plugin_ENSSubdomainRegistrar` as the operator. - [ ] Check if the `DAORegistry` has `REGISTER_ENS_SUBDOMAIN_PERMISSION` on `DAO_ENSSubdomainRegistrar` - [ ] Check if the `PluginRepoRegistry` has `REGISTER_ENS_SUBDOMAIN_PERMISSION` on `Plugin_ENSSubdomainRegistrar` - [ ] Check if the `DAOFactory` has `REGISTER_DAO_PERMISSION` on `DAORegistry` diff --git a/active_contracts.json b/active_contracts.json index e4e9802ba..4ec7241ff 100644 --- a/active_contracts.json +++ b/active_contracts.json @@ -1,4 +1,60 @@ { + "arbitrum": { + "managingDAOImplementation": "0x741061B01d3A95a7734B594f1884b6c30E0fDA96", + "managingDAO": "0xF3AaA3372EbBf01b923a4Cc98Cd847126b3D73cA", + "ENSRegistry": "0x9277acd65B5dc0F85867Dfd40f5488Be8d47AD18", + "PublicResolver": "0xc4ddBd0472C2688F5d278dAFC02E66EE176C8DE3", + "DAO_ENSSubdomainRegistrar_Implementation": "0xBe6eAC1bA0b2d20AEA9e7924EFEE8E72D6193246", + "DAO_ENSSubdomainRegistrar": "0x57bf333951967a0cC0afcD58FC7959Ca0Eae6905", + "Plugin_ENSSubdomainRegistrar_Implementation": "0x74b3B3504B5d6D1c6247009c9b1e3D8cFF7bd445", + "Plugin_ENSSubdomainRegistrar": "0x6115b7F05cCeF2D883AB64c88ba7e4BD1b877215", + "DAORegistry_Implementation": "0xf2d594F3C93C19D7B1a6F15B5489FFcE4B01f7dA", + "DAORegistry": "0xB5146Fd572C669ABC353902e43F47fda4609E38A", + "PluginRepoRegistry_Implementation": "0x95D563382BeD5AcB458759EE05b27DF2CB019Cc7", + "PluginRepoRegistry": "0xCe0B4124dea6105bfB85fB4461c4D39f360E9ef3", + "PluginRepoFactory": "0xE640Da5AD169630555A86D9b6b9C145B4961b1EB", + "PluginSetupProcessor": "0x308a1DC5020c4B5d992F5543a7236c465997fecB", + "DAOFactory": "0x08633901DdF9cD8e2DC3a073594d0A7DaD6f3f57", + "AddresslistVotingSetup": "0x7a62da7B56fB3bfCdF70E900787010Bc4c9Ca42e", + "GovernanceERC20": "0xddCc39a2a0047Eb47EdF94180452cbaB14d426EF", + "GovernanceWrappedERC20": "0x5B3B36BdC9470963A2734D6a0d2F6a64C21C159f", + "TokenVotingSetup": "0x96E54098317631641703404C06A5afAD89da7373", + "AdminSetup": "0xE978942c691e43f65c1B7c7F8f1dc8cDF061B13f", + "MultisigSetup": "0xA03C2182af8eC460D498108C92E8638a580b94d4", + "PlaceholderSetup": "0x6E924eA5864044D8642385683fFA5AD42FB687f2", + "address-list-voting-repo": "0xf415FF95166EF5D365fFB3bc6d1701f9e9ed7Df7", + "token-voting-repo": "0x1AeD2BEb470aeFD65B43f905Bd5371b1E4749d18", + "admin-repo": "0x326A2aee6A8eE78D79E7E956DE60C6E452f76a8e", + "multisig-repo": "0x7553E6Fb020c5740768cF289e603770AA09b7aE2" + }, + "arbitrumGoerli": { + "managingDAOImplementation": "0x741061B01d3A95a7734B594f1884b6c30E0fDA96", + "managingDAO": "0xF3AaA3372EbBf01b923a4Cc98Cd847126b3D73cA", + "ENSRegistry": "0x9277acd65B5dc0F85867Dfd40f5488Be8d47AD18", + "PublicResolver": "0xc4ddBd0472C2688F5d278dAFC02E66EE176C8DE3", + "DAO_ENSSubdomainRegistrar_Implementation": "0xBe6eAC1bA0b2d20AEA9e7924EFEE8E72D6193246", + "DAO_ENSSubdomainRegistrar": "0x57bf333951967a0cC0afcD58FC7959Ca0Eae6905", + "Plugin_ENSSubdomainRegistrar_Implementation": "0x74b3B3504B5d6D1c6247009c9b1e3D8cFF7bd445", + "Plugin_ENSSubdomainRegistrar": "0x6115b7F05cCeF2D883AB64c88ba7e4BD1b877215", + "DAORegistry_Implementation": "0xf2d594F3C93C19D7B1a6F15B5489FFcE4B01f7dA", + "DAORegistry": "0xB5146Fd572C669ABC353902e43F47fda4609E38A", + "PluginRepoRegistry_Implementation": "0x95D563382BeD5AcB458759EE05b27DF2CB019Cc7", + "PluginRepoRegistry": "0xCe0B4124dea6105bfB85fB4461c4D39f360E9ef3", + "PluginRepoFactory": "0xE640Da5AD169630555A86D9b6b9C145B4961b1EB", + "PluginSetupProcessor": "0x308a1DC5020c4B5d992F5543a7236c465997fecB", + "DAOFactory": "0x08633901DdF9cD8e2DC3a073594d0A7DaD6f3f57", + "AddresslistVotingSetup": "0x7a62da7B56fB3bfCdF70E900787010Bc4c9Ca42e", + "GovernanceERC20": "0xddCc39a2a0047Eb47EdF94180452cbaB14d426EF", + "GovernanceWrappedERC20": "0x5B3B36BdC9470963A2734D6a0d2F6a64C21C159f", + "TokenVotingSetup": "0x96E54098317631641703404C06A5afAD89da7373", + "AdminSetup": "0xE978942c691e43f65c1B7c7F8f1dc8cDF061B13f", + "MultisigSetup": "0xA03C2182af8eC460D498108C92E8638a580b94d4", + "PlaceholderSetup": "0x6E924eA5864044D8642385683fFA5AD42FB687f2", + "address-list-voting-repo": "0xf415FF95166EF5D365fFB3bc6d1701f9e9ed7Df7", + "token-voting-repo": "0x1AeD2BEb470aeFD65B43f905Bd5371b1E4749d18", + "admin-repo": "0x326A2aee6A8eE78D79E7E956DE60C6E452f76a8e", + "multisig-repo": "0x7553E6Fb020c5740768cF289e603770AA09b7aE2" + }, "sepolia": { "managingDAOImplementation": "0x57e24f85ceAcDa3Ef4F0fd04005589B88dc01A19", "managingDAO": "0xCa834B3F404c97273f34e108029eEd776144d324", diff --git a/packages/contracts/.env.example b/packages/contracts/.env.example index fd3bd9c18..fcd3df2b7 100644 --- a/packages/contracts/.env.example +++ b/packages/contracts/.env.example @@ -8,26 +8,40 @@ COINMARKETCAP_API_KEY= MAINNET_DAO_ENS_DOMAIN= GOERLI_DAO_ENS_DOMAIN= +SEPOLIOA_DAO_ENS_DOMAIN= +BASEMAINNET_DAO_ENS_DOMAIN= +BASEGOERLI_DAO_ENS_DOMAIN= +ARBITRUM_DAO_ENS_DOMAIN= +ARBITRUMGOERLI_DAO_ENS_DOMAIN= +# LOCALHOST_DAO_ENS_DOMAIN= HARDHAT_DAO_ENS_DOMAIN= -MAINNET_PLUGIN_ENS_DOMAIN= -GOERLI_PLUGIN_ENS_DOMAIN= -LOCALHOST_PLUGIN_ENS_DOMAIN= -HARDHAT_PLUGIN_ENS_DOMAIN= +MAINNET_PLUGIN_ENS_DOMAIN= +GOERLI_PLUGIN_ENS_DOMAIN= +SEPOLIOA_PLUGIN_ENS_DOMAIN= +BASEMAINNET_PLUGIN_ENS_DOMAIN= +BASEGOERLI_PLUGIN_ENS_DOMAIN= +ARBITRUM_PLUGIN_ENS_DOMAIN= +ARBITRUMGOERLI_PLUGIN_ENS_DOMAIN= +# +LOCALHOST_PLUGIN_ENS_DOMAIN= +HARDHAT_PLUGIN_ENS_DOMAIN= MANAGINGDAO_SUBDOMAIN= MANAGINGDAO_MULTISIG_APPROVERS= MANAGINGDAO_MULTISIG_MINAPPROVALS= MANAGINGDAO_MULTISIG_LISTEDONLY= -SEPOLIA_MANAGINGDAO_MULTISIG=0xfcEAd61339e3e73090B587968FcE8b090e0600EF -GOERLI_MANAGINGDAO_MULTISIG=0x3263de63e70157c4b607982721026ffaa20e596c -MUMBAI_MANAGINGDAO_MULTISIG=0x944b067ccdbded94e64826747a5d72d4adcdf50a MAINNET_MANAGINGDAO_MULTISIG=0x0673c13d48023efa609c20e5e351763b99dd67de +GOERLI_MANAGINGDAO_MULTISIG=0x3263de63e70157c4b607982721026ffaa20e596c +SEPOLIA_MANAGINGDAO_MULTISIG=0xfcEAd61339e3e73090B587968FcE8b090e0600EF POLYGON_MANAGINGDAO_MULTISIG=0x5db93850d843af581d8b87c350aa849a13a88e40 +MUMBAI_MANAGINGDAO_MULTISIG=0x944b067ccdbded94e64826747a5d72d4adcdf50a BASEGOERLI_MANAGINGDAO_MULTISIG=0x0deE00170c57161e629f5975F3B51b73B3770C06 BASEMAINNET_MANAGINGDAO_MULTISIG=0x549B739731dFDfe256f9A3014b30035C05b6D1a6 +ARBITRUM_MANAGINGDAO_MULTISIG=0x02bBc496BEBC9a06C239670Cea663C43ceAd899F +ARBITRUMGOERLI_MANAGINGDAO_MULTISIG=0x02bBc496BEBC9a06C239670Cea663C43ceAd899F HARDHAT_MANAGINGDAO_MULTISIG=0xe3ADd897e69010709498738e5116C06B4D81e672 # Changes with each new version diff --git a/packages/contracts/Releases.md b/packages/contracts/Releases.md index 14995034f..1b71e54a8 100644 --- a/packages/contracts/Releases.md +++ b/packages/contracts/Releases.md @@ -1,6 +1,67 @@ # Contract Releases +Commit: [2a02e0b32492ea1267139f6608310cec16551f05](https://github.com/aragon/osx/commit/2a02e0b32492ea1267139f6608310cec16551f05) +Network: arbitrum +Managing DAO Implementation: 0x741061B01d3A95a7734B594f1884b6c30E0fDA96 +Managing DAO: 0xF3AaA3372EbBf01b923a4Cc98Cd847126b3D73cA +ENSRegistry: 0x9277acd65B5dc0F85867Dfd40f5488Be8d47AD18 +PublicResolver: 0xc4ddBd0472C2688F5d278dAFC02E66EE176C8DE3 +DAO_ENSSubdomainRegistrar_Implementation: 0xBe6eAC1bA0b2d20AEA9e7924EFEE8E72D6193246 +DAO_ENSSubdomainRegistrar: 0x57bf333951967a0cC0afcD58FC7959Ca0Eae6905 +Plugin_ENSSubdomainRegistrar_Implementation: 0x74b3B3504B5d6D1c6247009c9b1e3D8cFF7bd445 +Plugin_ENSSubdomainRegistrar: 0x6115b7F05cCeF2D883AB64c88ba7e4BD1b877215 +DAORegistry_Implementation: 0xf2d594F3C93C19D7B1a6F15B5489FFcE4B01f7dA +DAORegistry: 0xB5146Fd572C669ABC353902e43F47fda4609E38A +PluginRepoRegistry_Implementation: 0x95D563382BeD5AcB458759EE05b27DF2CB019Cc7 +PluginRepoRegistry: 0xCe0B4124dea6105bfB85fB4461c4D39f360E9ef3 +PluginRepoFactory: 0xE640Da5AD169630555A86D9b6b9C145B4961b1EB +PluginSetupProcessor: 0x308a1DC5020c4B5d992F5543a7236c465997fecB +DAOFactory: 0x08633901DdF9cD8e2DC3a073594d0A7DaD6f3f57 +AddresslistVotingSetup: 0x7a62da7B56fB3bfCdF70E900787010Bc4c9Ca42e +GovernanceERC20: 0xddCc39a2a0047Eb47EdF94180452cbaB14d426EF +GovernanceWrappedERC20: 0x5B3B36BdC9470963A2734D6a0d2F6a64C21C159f +TokenVotingSetup: 0x96E54098317631641703404C06A5afAD89da7373 +AdminSetup: 0xE978942c691e43f65c1B7c7F8f1dc8cDF061B13f +MultisigSetup: 0xA03C2182af8eC460D498108C92E8638a580b94d4 +PlaceholderSetup: 0x6E924eA5864044D8642385683fFA5AD42FB687f2 +address-list-voting-repo: 0xf415FF95166EF5D365fFB3bc6d1701f9e9ed7Df7 +token-voting-repo: 0x1AeD2BEb470aeFD65B43f905Bd5371b1E4749d18 +admin-repo: 0x326A2aee6A8eE78D79E7E956DE60C6E452f76a8e +multisig-repo: 0x7553E6Fb020c5740768cF289e603770AA09b7aE2 + +Commit: [2a02e0b32492ea1267139f6608310cec16551f05](https://github.com/aragon/osx/commit/2a02e0b32492ea1267139f6608310cec16551f05) +Network: arbitrumGoerli +Managing DAO Implementation: 0x741061B01d3A95a7734B594f1884b6c30E0fDA96 +Managing DAO: 0xF3AaA3372EbBf01b923a4Cc98Cd847126b3D73cA +ENSRegistry: 0x9277acd65B5dc0F85867Dfd40f5488Be8d47AD18 +PublicResolver: 0xc4ddBd0472C2688F5d278dAFC02E66EE176C8DE3 +DAO_ENSSubdomainRegistrar_Implementation: 0xBe6eAC1bA0b2d20AEA9e7924EFEE8E72D6193246 +DAO_ENSSubdomainRegistrar: 0x57bf333951967a0cC0afcD58FC7959Ca0Eae6905 +Plugin_ENSSubdomainRegistrar_Implementation: 0x74b3B3504B5d6D1c6247009c9b1e3D8cFF7bd445 +Plugin_ENSSubdomainRegistrar: 0x6115b7F05cCeF2D883AB64c88ba7e4BD1b877215 +DAORegistry_Implementation: 0xf2d594F3C93C19D7B1a6F15B5489FFcE4B01f7dA +DAORegistry: 0xB5146Fd572C669ABC353902e43F47fda4609E38A +PluginRepoRegistry_Implementation: 0x95D563382BeD5AcB458759EE05b27DF2CB019Cc7 +PluginRepoRegistry: 0xCe0B4124dea6105bfB85fB4461c4D39f360E9ef3 +PluginRepoFactory: 0xE640Da5AD169630555A86D9b6b9C145B4961b1EB +PluginSetupProcessor: 0x308a1DC5020c4B5d992F5543a7236c465997fecB +DAOFactory: 0x08633901DdF9cD8e2DC3a073594d0A7DaD6f3f57 +AddresslistVotingSetup: 0x7a62da7B56fB3bfCdF70E900787010Bc4c9Ca42e +GovernanceERC20: 0xddCc39a2a0047Eb47EdF94180452cbaB14d426EF +GovernanceWrappedERC20: 0x5B3B36BdC9470963A2734D6a0d2F6a64C21C159f +TokenVotingSetup: 0x96E54098317631641703404C06A5afAD89da7373 +AdminSetup: 0xE978942c691e43f65c1B7c7F8f1dc8cDF061B13f +MultisigSetup: 0xA03C2182af8eC460D498108C92E8638a580b94d4 +PlaceholderSetup: 0x6E924eA5864044D8642385683fFA5AD42FB687f2 +address-list-voting-repo: 0xf415FF95166EF5D365fFB3bc6d1701f9e9ed7Df7 +token-voting-repo: 0x1AeD2BEb470aeFD65B43f905Bd5371b1E4749d18 +admin-repo: 0x326A2aee6A8eE78D79E7E956DE60C6E452f76a8e +multisig-repo: 0x7553E6Fb020c5740768cF289e603770AA09b7aE2 + +--- + Commit: [39dcba1d10b335445724ae006322f584fc1fc9c5](https://github.aragon/osx/commit/39dcba1d10b335445724ae006322f584fc1fc9c5) +Network: sepolia managingDAOImplementation: 0xCa834B3F404c97273f34e108029eEd776144d324 managingDAO: 0x57e24f85ceAcDa3Ef4F0fd04005589B88dc01A19 ENSRegistry: 0x005098056a837c2c4F99C7eCeE976F8D90bdFFF8 diff --git a/packages/contracts/docs/developer-portal/04-framework-lifecycle/01-systems.md b/packages/contracts/docs/developer-portal/04-framework-lifecycle/01-systems.md index b90e7ea7a..c2ff9ed42 100644 --- a/packages/contracts/docs/developer-portal/04-framework-lifecycle/01-systems.md +++ b/packages/contracts/docs/developer-portal/04-framework-lifecycle/01-systems.md @@ -37,7 +37,7 @@ with construction / initialization constituting a special. -
Interfaces +#### Interfaces - `IDAO` - `IPlugin` @@ -47,9 +47,7 @@ with construction / initialization constituting a special. - `IProposal` - `IMembership` -
- -
Abstract Contracts +#### Abstract Contracts - Non-Upgradable @@ -67,9 +65,7 @@ with construction / initialization constituting a special. - `ProposalUpgradeable` - `InterfaceBasedRegistry` -
- -
Deployed Contracts +#### Deployed Contracts - Non-Upgradable @@ -86,8 +82,6 @@ with construction / initialization constituting a special. - `PluginUUPSUpgradeable` - `ENSSubdomainRegistrar` -
- ## Subgraph The subgraph is composed of diff --git a/packages/contracts/docs/developer-portal/04-framework-lifecycle/02-semver.md b/packages/contracts/docs/developer-portal/04-framework-lifecycle/02-semver.md index daf25618e..7f549bca7 100644 --- a/packages/contracts/docs/developer-portal/04-framework-lifecycle/02-semver.md +++ b/packages/contracts/docs/developer-portal/04-framework-lifecycle/02-semver.md @@ -12,7 +12,7 @@ We use the semver notation to version the OSx Protocol smart contract and to cla ## Change Classifications -We now classify [smart contract changes](systems.md#smart-contracts) according to SemVer and how they affect the [the subgraph](01-systems.md#the-subgraph), consumers of the contracts and the subgraph such as the [the SDK or 3rd party projects](systems.md#sdk-3rd-party-projects-contract--subgraph-consumers), and [the App](01-systems.md#app). +We now classify [smart contract changes](01-systems.md#smart-contracts) according to SemVer and how they affect the [the subgraph](01-systems.md#the-subgraph), consumers of the contracts and the subgraph such as the [the SDK or 3rd party projects](01-systems.md#sdk-3rd-party-projects-contract--subgraph-consumers), and [the App](01-systems.md#app). | SemVer Classification | Change in | Affected contracts | Action | Contract Implication (OSx or 3rd party) | Subgraph | SDK | App | | --------------------- | -------------------------------------------- | --------------------- | ------------------------- | ---------------------------------------------------------------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | diff --git a/packages/contracts/docs/developer-portal/04-framework-lifecycle/03-osx-components/01-factory-contract.md b/packages/contracts/docs/developer-portal/04-framework-lifecycle/03-osx-components/01-factory-contract.md index 4ad8f92d0..eb2df740d 100644 --- a/packages/contracts/docs/developer-portal/04-framework-lifecycle/03-osx-components/01-factory-contract.md +++ b/packages/contracts/docs/developer-portal/04-framework-lifecycle/03-osx-components/01-factory-contract.md @@ -67,4 +67,4 @@ Applies to - `DAOFactory` - `PluginRepoFactory` -For changes in the underlying implementations (i.e., `DAO` and `PluginRepo`), see the process of [replacing upgradeable contracts](../03-sub-processes/upgradeable-contract.md). +For changes in the underlying implementations (i.e., `DAO` and `PluginRepo`), see the process of [replacing upgradeable contracts](./02-upgradeable-contract.md). diff --git a/packages/contracts/hardhat.config.ts b/packages/contracts/hardhat.config.ts index 7f986a856..eec3e346e 100644 --- a/packages/contracts/hardhat.config.ts +++ b/packages/contracts/hardhat.config.ts @@ -93,10 +93,10 @@ const config: HardhatUserConfig = { sepolia: process.env.ETHERSCAN_KEY || '', polygon: process.env.POLYGONSCAN_KEY || '', polygonMumbai: process.env.POLYGONSCAN_KEY || '', - arbitrumOne: process.env.ARBISCAN_KEY || '', - arbitrumTestnet: process.env.ARBISCAN_KEY || '', baseMainnet: process.env.BASESCAN_KEY || '', baseGoerli: process.env.BASESCAN_KEY || '', + arbitrumOne: process.env.ARBISCAN_KEY || '', + arbitrumGoerli: process.env.ARBISCAN_KEY || '', }, customChains: [ { diff --git a/packages/contracts/networks.json b/packages/contracts/networks.json index f7848b929..40c51f665 100644 --- a/packages/contracts/networks.json +++ b/packages/contracts/networks.json @@ -1,4 +1,10 @@ { + "mainnet": { + "url": "https://mainnet.infura.io/v3/481a4cdc7c774286b8627f21c6827f48", + "isTestnet": false, + "chainId": 1, + "deploy": ["./deploy/update/to_v1.3.0", "./deploy/verification"] + }, "goerli": { "url": "https://goerli.infura.io/v3/481a4cdc7c774286b8627f21c6827f48", "isTestnet": true, @@ -11,17 +17,6 @@ "chainId": 11155111, "deploy": ["./deploy/new", "./deploy/verification"] }, - "mainnet": { - "url": "https://mainnet.infura.io/v3/481a4cdc7c774286b8627f21c6827f48", - "isTestnet": false, - "chainId": 1, - "deploy": ["./deploy/update/to_v1.3.0", "./deploy/verification"] - }, - "arbitrum": { - "url": "https://arbitrum-mainnet.infura.io/v3/481a4cdc7c774286b8627f21c6827f48", - "isTestnet": false, - "chainId": 42161 - }, "polygon": { "url": "https://polygon-mainnet.infura.io/v3/481a4cdc7c774286b8627f21c6827f48", "isTestnet": false, @@ -49,5 +44,17 @@ "chainId": 84531, "deploy": ["./deploy/new", "./deploy/verification"], "gasPrice": 1000000 + }, + "arbitrum": { + "url": "https://arbitrum-mainnet.infura.io/v3/481a4cdc7c774286b8627f21c6827f48", + "isTestnet": false, + "chainId": 42161, + "deploy": ["./deploy/new", "./deploy/verification"] + }, + "arbitrumGoerli": { + "url": "https://arbitrum-goerli.infura.io/v3/481a4cdc7c774286b8627f21c6827f48", + "isTestnet": true, + "chainId": 421613, + "deploy": ["./deploy/new", "./deploy/verification"] } } diff --git a/packages/subgraph/CHANGELOG.md b/packages/subgraph/CHANGELOG.md index e5c97905b..f30326273 100644 --- a/packages/subgraph/CHANGELOG.md +++ b/packages/subgraph/CHANGELOG.md @@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [UPCOMING] +## 1.4.0 + +### Added + +- Added `isSignaling` attribute to `TokenVotingProposal`, `AddresslistVotingProposal`, and `MultisigProposal` that is set to true for proposals having an empty action array. + +### Changed + +- Renamed `potentiallyExecutable` attribute to `approvalReached` and stopped setting it to `true` during multisig proposal creation if `minApprovals = 1` when zero approvals were given yet. + ## 1.3.1 ### Added @@ -82,7 +92,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Changed `IPluginInstallation` to `IPlugin`. - Changed `release: Int!` to `release: PluginRelease!` in `PluginVersion` - Changed `versions` to `releases` in `PluginRepo`. -- Changes `Permission` entity to be muteable. +- Changes `Permission` entity to be mutable. ### Removed diff --git a/packages/subgraph/manifest/data/arbitrum.json b/packages/subgraph/manifest/data/arbitrum.json new file mode 100644 index 000000000..ad5007df3 --- /dev/null +++ b/packages/subgraph/manifest/data/arbitrum.json @@ -0,0 +1,23 @@ +{ + "info": "# Do not edit subgraph.yaml,this is a generated file. \n# Instead, edit subgraph.placeholder.yaml and run: yarn manifest", + "network": "arbitrum-one", + "dataSources": { + "DAORegistry": { + "name": "DAORegistry", + "address": "0xB5146Fd572C669ABC353902e43F47fda4609E38A", + "startBlock": 145462155 + }, + "PluginRepoRegistry": { + "name": "PluginRepoRegistry", + "address": "0xCe0B4124dea6105bfB85fB4461c4D39f360E9ef3", + "startBlock": 145462169 + }, + "PluginSetupProcessors": [ + { + "name": "PluginSetupProcessor", + "address": "0x308a1DC5020c4B5d992F5543a7236c465997fecB", + "startBlock": 145462184 + } + ] + } +} diff --git a/packages/subgraph/manifest/data/arbitrumGoerli.json b/packages/subgraph/manifest/data/arbitrumGoerli.json new file mode 100644 index 000000000..8eed3a8d5 --- /dev/null +++ b/packages/subgraph/manifest/data/arbitrumGoerli.json @@ -0,0 +1,23 @@ +{ + "info": "# Do not edit subgraph.yaml,this is a generated file. \n# Instead, edit subgraph.placeholder.yaml and run: yarn manifest", + "network": "arbitrum-goerli", + "dataSources": { + "DAORegistry": { + "name": "DAORegistry", + "address": "0xB5146Fd572C669ABC353902e43F47fda4609E38A", + "startBlock": 51930440 + }, + "PluginRepoRegistry": { + "name": "PluginRepoRegistry", + "address": "0xCe0B4124dea6105bfB85fB4461c4D39f360E9ef3", + "startBlock": 51930451 + }, + "PluginSetupProcessors": [ + { + "name": "PluginSetupProcessor", + "address": "0x308a1DC5020c4B5d992F5543a7236c465997fecB", + "startBlock": 51930460 + } + ] + } +} diff --git a/packages/subgraph/package.json b/packages/subgraph/package.json index 7f71d2ec0..a9cb0d5ef 100644 --- a/packages/subgraph/package.json +++ b/packages/subgraph/package.json @@ -1,6 +1,6 @@ { "name": "@aragon/osx-subgraph", - "version": "1.3.1", + "version": "1.4.0", "description": "The Aragon OSx Subgraph", "homepage": "https://github.com/aragon/osx", "license": "AGPL-3.0-or-later", diff --git a/packages/subgraph/schema.graphql b/packages/subgraph/schema.graphql index 75b5cb271..24ce7158b 100644 --- a/packages/subgraph/schema.graphql +++ b/packages/subgraph/schema.graphql @@ -461,7 +461,8 @@ type TokenVotingProposal implements IProposal @entity { startDate: BigInt! endDate: BigInt! creationBlockNumber: BigInt! - potentiallyExecutable: Boolean! + approvalReached: Boolean! + isSignaling: Boolean! earlyExecutable: Boolean executionDate: BigInt executionBlockNumber: BigInt @@ -536,7 +537,8 @@ type AddresslistVotingProposal implements IProposal @entity { startDate: BigInt! endDate: BigInt! creationBlockNumber: BigInt! - potentiallyExecutable: Boolean! + approvalReached: Boolean! + isSignaling: Boolean! earlyExecutable: Boolean executionDate: BigInt executionBlockNumber: BigInt @@ -640,7 +642,8 @@ type MultisigProposal implements IProposal @entity { snapshotBlock: BigInt! minApprovals: Int! approvals: Int - potentiallyExecutable: Boolean! + approvalReached: Boolean! + isSignaling: Boolean! executed: Boolean! executionDate: BigInt executionBlockNumber: BigInt diff --git a/packages/subgraph/scripts/deploy-subgraph.sh b/packages/subgraph/scripts/deploy-subgraph.sh index 4b8fa5d86..704bf0991 100755 --- a/packages/subgraph/scripts/deploy-subgraph.sh +++ b/packages/subgraph/scripts/deploy-subgraph.sh @@ -49,7 +49,7 @@ else graph deploy $FULLNAME \ --version-label $SUBGRAPH_VERSION \ --ipfs https://ipfs.satsuma.xyz \ - --node https://app.satsuma.xyz/api/subgraphs/deploy \ + --node https://subgraphs.alchemy.com/api/subgraphs/deploy \ --deploy-key $GRAPH_KEY > deploy-output.txt SUBGRAPH_ID=$(grep "Build completed:" deploy-output.txt | grep -oE "Qm[a-zA-Z0-9]{44}") diff --git a/packages/subgraph/src/packages/addresslist/addresslist-voting.ts b/packages/subgraph/src/packages/addresslist/addresslist-voting.ts index 9ca8c2c4c..d7a806298 100644 --- a/packages/subgraph/src/packages/addresslist/addresslist-voting.ts +++ b/packages/subgraph/src/packages/addresslist/addresslist-voting.ts @@ -2,17 +2,17 @@ import { Action, AddresslistVotingPlugin, AddresslistVotingProposal, - AddresslistVotingVoter, AddresslistVotingVote, + AddresslistVotingVoter, } from '../../../generated/schema'; import { - VoteCast, + AddresslistVoting, + MembersAdded, + MembersRemoved, ProposalCreated, ProposalExecuted, + VoteCast, VotingSettingsUpdated, - MembersAdded, - MembersRemoved, - AddresslistVoting, } from '../../../generated/templates/AddresslistVoting/AddresslistVoting'; import {RATIO_BASE, VOTER_OPTIONS, VOTING_MODES} from '../../utils/constants'; import {getProposalId} from '../../utils/proposals'; @@ -44,7 +44,7 @@ export function _handleProposalCreated( proposalEntity.createdAt = event.block.timestamp; proposalEntity.creationBlockNumber = event.block.number; proposalEntity.allowFailureMap = event.params.allowFailureMap; - proposalEntity.potentiallyExecutable = false; + proposalEntity.approvalReached = false; let contract = AddresslistVoting.bind(pluginAddress); let proposal = contract.try_getProposal(pluginProposalId); @@ -88,7 +88,7 @@ export function _handleProposalCreated( actionEntity.proposal = proposalId; actionEntity.save(); } - + proposalEntity.isSignaling = actions.length == 0; // totalVotingPower proposalEntity.totalVotingPower = contract.try_totalVotingPower( parameters.snapshotBlock @@ -185,7 +185,7 @@ export function handleVoteCast(event: VoteCast): void { let minParticipationReached = castedVotingPower.ge(minVotingPower); // Used when proposal has ended. - proposalEntity.potentiallyExecutable = + proposalEntity.approvalReached = supportThresholdReached && minParticipationReached; // Used when proposal has not ended. @@ -206,7 +206,7 @@ export function handleProposalExecuted(event: ProposalExecuted): void { let proposalEntity = AddresslistVotingProposal.load(proposalId); if (proposalEntity) { proposalEntity.executed = true; - proposalEntity.potentiallyExecutable = false; + proposalEntity.approvalReached = true; proposalEntity.executionDate = event.block.timestamp; proposalEntity.executionBlockNumber = event.block.number; proposalEntity.executionTxHash = event.transaction.hash; diff --git a/packages/subgraph/src/packages/multisig/multisig.ts b/packages/subgraph/src/packages/multisig/multisig.ts index 9ff12b72a..b8017af4d 100644 --- a/packages/subgraph/src/packages/multisig/multisig.ts +++ b/packages/subgraph/src/packages/multisig/multisig.ts @@ -46,26 +46,20 @@ export function _handleProposalCreated( proposalEntity.allowFailureMap = event.params.allowFailureMap; let contract = Multisig.bind(event.address); - let vote = contract.try_getProposal(pluginProposalId); + let proposal = contract.try_getProposal(pluginProposalId); - if (!vote.reverted) { - proposalEntity.executed = vote.value.value0; - proposalEntity.approvals = vote.value.value1; + if (!proposal.reverted) { + proposalEntity.executed = proposal.value.value0; + proposalEntity.approvals = proposal.value.value1; // ProposalParameters - let parameters = vote.value.value2; + let parameters = proposal.value.value2; proposalEntity.minApprovals = parameters.minApprovals; proposalEntity.snapshotBlock = parameters.snapshotBlock; - - // if minApproval is 1, the proposal is always executable - if (parameters.minApprovals == 1) { - proposalEntity.potentiallyExecutable = true; - } else { - proposalEntity.potentiallyExecutable = false; - } + proposalEntity.approvalReached = false; // Actions - let actions = vote.value.value3; + let actions = proposal.value.value3; for (let index = 0; index < actions.length; index++) { const action = actions[index]; @@ -81,6 +75,7 @@ export function _handleProposalCreated( actionEntity.proposal = proposalId; actionEntity.save(); } + proposalEntity.isSignaling = actions.length == 0; } proposalEntity.save(); @@ -129,9 +124,9 @@ export function handleApproved(event: Approved): void { if ( approvals >= minApprovalsStruct.minApprovals && - !proposalEntity.potentiallyExecutable + !proposalEntity.approvalReached ) { - proposalEntity.potentiallyExecutable = true; + proposalEntity.approvalReached = true; } proposalEntity.save(); @@ -145,7 +140,7 @@ export function handleProposalExecuted(event: ProposalExecuted): void { let proposalEntity = MultisigProposal.load(proposalId); if (proposalEntity) { - proposalEntity.potentiallyExecutable = false; + proposalEntity.approvalReached = false; proposalEntity.executed = true; proposalEntity.executionDate = event.block.timestamp; proposalEntity.executionBlockNumber = event.block.number; diff --git a/packages/subgraph/src/packages/token/token-voting.ts b/packages/subgraph/src/packages/token/token-voting.ts index 31d3446a1..cc5aeb650 100644 --- a/packages/subgraph/src/packages/token/token-voting.ts +++ b/packages/subgraph/src/packages/token/token-voting.ts @@ -45,7 +45,7 @@ export function _handleProposalCreated( proposalEntity.createdAt = event.block.timestamp; proposalEntity.creationBlockNumber = event.block.number; proposalEntity.allowFailureMap = event.params.allowFailureMap; - proposalEntity.potentiallyExecutable = false; + proposalEntity.approvalReached = false; let contract = TokenVoting.bind(event.address); let proposal = contract.try_getProposal(pluginProposalId); @@ -89,6 +89,7 @@ export function _handleProposalCreated( actionEntity.proposal = proposalId; actionEntity.save(); } + proposalEntity.isSignaling = actions.length == 0; // totalVotingPower proposalEntity.totalVotingPower = contract.try_totalVotingPower( @@ -198,7 +199,7 @@ export function handleVoteCast(event: VoteCast): void { let minParticipationReached = castedVotingPower.ge(minVotingPower); // Used when proposal has ended. - proposalEntity.potentiallyExecutable = + proposalEntity.approvalReached = supportThresholdReached && minParticipationReached; // Used when proposal has not ended. @@ -219,7 +220,7 @@ export function handleProposalExecuted(event: ProposalExecuted): void { let proposalEntity = TokenVotingProposal.load(proposalId); if (proposalEntity) { proposalEntity.executed = true; - proposalEntity.potentiallyExecutable = false; + proposalEntity.approvalReached = false; proposalEntity.executionDate = event.block.timestamp; proposalEntity.executionBlockNumber = event.block.number; proposalEntity.executionTxHash = event.transaction.hash; diff --git a/packages/subgraph/tests/addresslist-voting/addresslist-voting.test.ts b/packages/subgraph/tests/addresslist-voting/addresslist-voting.test.ts index 750f6a6b0..df21ab3a6 100644 --- a/packages/subgraph/tests/addresslist-voting/addresslist-voting.test.ts +++ b/packages/subgraph/tests/addresslist-voting/addresslist-voting.test.ts @@ -289,7 +289,7 @@ test('Run AddresslistVoting (handleVoteCast) mappings with mock event', () => { // check proposal assert.fieldEquals('AddresslistVotingProposal', proposal.id, 'yes', '1'); - // Check potentiallyExecutable + // Check approvalReached // abstain: 0, yes: 1, no: 0 // support : 100% // worstCaseSupport : 33% @@ -297,7 +297,7 @@ test('Run AddresslistVoting (handleVoteCast) mappings with mock event', () => { assert.fieldEquals( 'AddresslistVotingProposal', proposal.id, - 'potentiallyExecutable', + 'approvalReached', 'false' ); // check vote count @@ -389,7 +389,7 @@ test('Run AddresslistVoting (handleVoteCast) mappings with mock event', () => { handleVoteCast(event3); - // Check potentiallyExecutable + // Check approvalReached // abstain: 0, yes: 2, no: 0 // support : 100% // worstCaseSupport : 67% @@ -397,7 +397,7 @@ test('Run AddresslistVoting (handleVoteCast) mappings with mock event', () => { assert.fieldEquals( 'AddresslistVotingProposal', proposal.id, - 'potentiallyExecutable', + 'approvalReached', 'true' ); diff --git a/packages/subgraph/tests/addresslist-voting/utils.ts b/packages/subgraph/tests/addresslist-voting/utils.ts index 7ed783e8a..2899204b4 100644 --- a/packages/subgraph/tests/addresslist-voting/utils.ts +++ b/packages/subgraph/tests/addresslist-voting/utils.ts @@ -281,13 +281,14 @@ export function createAddresslistVotingProposalEntityState( addresslistProposal.startDate = BigInt.fromString(startDate); addresslistProposal.endDate = BigInt.fromString(endDate); addresslistProposal.snapshotBlock = BigInt.fromString(snapshotBlock); + addresslistProposal.isSignaling = false; addresslistProposal.totalVotingPower = BigInt.fromString(totalVotingPower); addresslistProposal.allowFailureMap = BigInt.fromString(allowFailureMap); addresslistProposal.createdAt = BigInt.fromString(createdAt); addresslistProposal.creationBlockNumber = creationBlockNumber; - addresslistProposal.potentiallyExecutable = executable; + addresslistProposal.approvalReached = executable; addresslistProposal.earlyExecutable = earlyExecutable; addresslistProposal.save(); diff --git a/packages/subgraph/tests/helpers/method-classes.ts b/packages/subgraph/tests/helpers/method-classes.ts index cfff39a31..b8fa71ffd 100644 --- a/packages/subgraph/tests/helpers/method-classes.ts +++ b/packages/subgraph/tests/helpers/method-classes.ts @@ -576,7 +576,8 @@ class TokenVotingProposalMethods extends TokenVotingProposal { this.allowFailureMap = BigInt.fromString(ALLOW_FAILURE_MAP); this.createdAt = BigInt.fromString(CREATED_AT); this.creationBlockNumber = BigInt.fromString(ZERO); - this.potentiallyExecutable = false; + this.approvalReached = false; + this.isSignaling = false; return this; } diff --git a/packages/subgraph/tests/multisig/multisig.test.ts b/packages/subgraph/tests/multisig/multisig.test.ts index 9c2519788..a94c3247c 100644 --- a/packages/subgraph/tests/multisig/multisig.test.ts +++ b/packages/subgraph/tests/multisig/multisig.test.ts @@ -216,7 +216,7 @@ test('Run Multisig (handleApproved) mappings with mock event', () => { assert.fieldEquals( 'MultisigProposal', proposal.id, - 'potentiallyExecutable', + 'approvalReached', 'false' ); @@ -254,7 +254,7 @@ test('Run Multisig (handleApproved) mappings with mock event', () => { assert.fieldEquals( 'MultisigProposal', proposal.id, - 'potentiallyExecutable', + 'approvalReached', 'true' ); diff --git a/packages/subgraph/tests/multisig/utils.ts b/packages/subgraph/tests/multisig/utils.ts index 7e183ea24..2f7883477 100644 --- a/packages/subgraph/tests/multisig/utils.ts +++ b/packages/subgraph/tests/multisig/utils.ts @@ -308,7 +308,8 @@ export function createMultisigProposalEntityState( multisigProposal.creator = Address.fromString(creator); multisigProposal.startDate = BigInt.fromString(startDate); multisigProposal.endDate = BigInt.fromString(endDate); - multisigProposal.potentiallyExecutable = executable; + multisigProposal.approvalReached = executable; + multisigProposal.isSignaling = false; multisigProposal.executed = executed; multisigProposal.snapshotBlock = BigInt.fromString(snapshotBlock); multisigProposal.minApprovals = BigInt.fromString(minApprovals).toI32(); diff --git a/packages/subgraph/tests/token/token-voting.test.ts b/packages/subgraph/tests/token/token-voting.test.ts index 0815ef81d..dd5e14dc6 100644 --- a/packages/subgraph/tests/token/token-voting.test.ts +++ b/packages/subgraph/tests/token/token-voting.test.ts @@ -74,7 +74,7 @@ test('Run TokenVoting (handleVoteCast) mappings with mock event', () => { // check proposal entity proposal.assertEntity(); - // // create calls + // create calls proposal.yes = bigInt.fromString(ONE); proposal.mockCall_getProposal(actions); proposal.mockCall_totalVotingPower(); @@ -102,7 +102,7 @@ test('Run TokenVoting (handleVoteCast) mappings with mock event', () => { // check proposal // expected changes to the proposal entity proposal.castedVotingPower = BigInt.fromString(ONE); - proposal.potentiallyExecutable = false; + proposal.approvalReached = false; // assert proposal entity proposal.assertEntity(); @@ -146,7 +146,7 @@ test('Run TokenVoting (handleVoteCast) mappings with mock event', () => { handleVoteCast(event3); // expected changes to the proposal entity - proposal.potentiallyExecutable = true; + proposal.approvalReached = true; proposal.castedVotingPower = BigInt.fromString(TWO); proposal.assertEntity(); diff --git a/packages/subgraph/tests/token/utils.ts b/packages/subgraph/tests/token/utils.ts index eec075fa6..c8838bda5 100644 --- a/packages/subgraph/tests/token/utils.ts +++ b/packages/subgraph/tests/token/utils.ts @@ -344,12 +344,13 @@ export function createTokenVotingProposalEntityState( tokenVotingProposal.startDate = BigInt.fromString(startDate); tokenVotingProposal.endDate = BigInt.fromString(endDate); tokenVotingProposal.snapshotBlock = BigInt.fromString(snapshotBlock); + tokenVotingProposal.isSignaling = false; tokenVotingProposal.totalVotingPower = BigInt.fromString(totalVotingPower); tokenVotingProposal.allowFailureMap = BigInt.fromString(allowFailureMap); tokenVotingProposal.createdAt = BigInt.fromString(createdAt); tokenVotingProposal.creationBlockNumber = creationBlockNumber; - tokenVotingProposal.potentiallyExecutable = executable; + tokenVotingProposal.approvalReached = executable; tokenVotingProposal.earlyExecutable = earlyExecutable; tokenVotingProposal.save();