From ba40a741832f591fba21c16ccd8f7fbe183a9abe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Migone?= Date: Thu, 14 Nov 2024 15:10:15 -0300 Subject: [PATCH 1/5] chore: bump ignition version to 0.15.7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomás Migone --- packages/horizon/README.md | 8 ++-- ...zon.hardhat.json => horizon.hardhat.json5} | 24 +++------- packages/horizon/package.json | 2 +- packages/horizon/scripts/deploy.ts | 16 ------- packages/subgraph-service/README.md | 22 ++++++---- ...at.json => subgraph-service.hardhat.json5} | 4 +- packages/subgraph-service/scripts/deploy.ts | 4 +- yarn.lock | 44 ++++++++++++++++++- 8 files changed, 74 insertions(+), 50 deletions(-) rename packages/horizon/ignition/configs/{horizon.hardhat.json => horizon.hardhat.json5} (59%) delete mode 100644 packages/horizon/scripts/deploy.ts rename packages/subgraph-service/ignition/configs/{subgraph-service.hardhat.json => subgraph-service.hardhat.json5} (79%) diff --git a/packages/horizon/README.md b/packages/horizon/README.md index 4b0954953..76ddbf9b9 100644 --- a/packages/horizon/README.md +++ b/packages/horizon/README.md @@ -4,14 +4,16 @@ Graph Horizon is the next evolution of the Graph Protocol. ## Deployment -We use Hardhat Ignition to deploy the contracts. To build and deploy the contracts run the following commands: +We use Hardhat Ignition to deploy the contracts. To build and deploy Graph Horizon run the following commands: ```bash yarn install yarn build npx hardhat ignition deploy ./ignition/modules/horizon.ts \ - --parameters ./ignition/configs/horizon.hardhat.json \ + --parameters ./ignition/configs/horizon.hardhat.json5 \ --network hardhat ``` -You can use any network defined in `hardhat.config.ts` by replacing `hardhat` with the network name. \ No newline at end of file +You can use any network defined in `hardhat.config.ts` by replacing `hardhat` with the network name. + +Note that this will deploy a standalone version of Graph Horizon contracts, meaning the Subgraph Service will not be deployed. If you want to deploy both please refer to the [Subgraph Service README](../subgraph-service/README.md) for deploy instructions. \ No newline at end of file diff --git a/packages/horizon/ignition/configs/horizon.hardhat.json b/packages/horizon/ignition/configs/horizon.hardhat.json5 similarity index 59% rename from packages/horizon/ignition/configs/horizon.hardhat.json rename to packages/horizon/ignition/configs/horizon.hardhat.json5 index ef16c8136..a0dcc4aee 100644 --- a/packages/horizon/ignition/configs/horizon.hardhat.json +++ b/packages/horizon/ignition/configs/horizon.hardhat.json5 @@ -1,37 +1,27 @@ { - "GraphProxyAdmin": { - "governor": "0xFFcf8FDEE72ac11b5c542428B35EEF5769C409f0" - }, - "Controller": { + "$global": { "governor": "0xFFcf8FDEE72ac11b5c542428B35EEF5769C409f0", - "pauseGuardian": "0x95cED938F7991cd0dFcb48F0a06a40FA1aF46EBC" - }, - "RewardsManager": { + "pauseGuardian": "0x95cED938F7991cd0dFcb48F0a06a40FA1aF46EBC", "subgraphAvailabilityOracle": "0xd03ea8624C8C5987235048901fB614fDcA89b117", - "issuancePerBlock": "114155251141552511415n", + // Placeholder address for a standalone Horizon deployment, see README.md for more detals "subgraphServiceAddress": "0x0000000000000000000000000000000000000000" }, + "RewardsManager": { + "issuancePerBlock": "114155251141552511415n" + }, "EpochManager": { "epochLength": 60 }, - "GraphTokenGateway": { - "pauseGuardian": "0x95cED938F7991cd0dFcb48F0a06a40FA1aF46EBC" - }, "Curation": { "curationTaxPercentage": 10000, "minimumCurationDeposit": 1 }, "GraphToken": { - "initialSupply": "10000000000000000000000000000n", - "governor": "0xFFcf8FDEE72ac11b5c542428B35EEF5769C409f0" + "initialSupply": "10000000000000000000000000000n" }, "HorizonStaking": { - "subgraphServiceAddress": "0x0000000000000000000000000000000000000000", "maxThawingPeriod": 2419200 }, - "HorizonStakingExtension": { - "subgraphServiceAddress": "0x0000000000000000000000000000000000000000" - }, "GraphPayments": { "protocolPaymentCut": 10000 }, diff --git a/packages/horizon/package.json b/packages/horizon/package.json index 4c6624051..a43bf3f72 100644 --- a/packages/horizon/package.json +++ b/packages/horizon/package.json @@ -17,7 +17,7 @@ "@nomicfoundation/hardhat-chai-matchers": "^2.0.0", "@nomicfoundation/hardhat-ethers": "^3.0.8", "@nomicfoundation/hardhat-foundry": "^1.1.1", - "@nomicfoundation/hardhat-ignition": "^0.15.5", + "@nomicfoundation/hardhat-ignition": "^0.15.7", "@nomicfoundation/hardhat-ignition-ethers": "^0.15.5", "@nomicfoundation/hardhat-network-helpers": "^1.0.0", "@nomicfoundation/hardhat-toolbox": "^4.0.0", diff --git a/packages/horizon/scripts/deploy.ts b/packages/horizon/scripts/deploy.ts deleted file mode 100644 index 5a94398d2..000000000 --- a/packages/horizon/scripts/deploy.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { ignition } from 'hardhat' - -import Parameters from '../ignition/configs/horizon.hardhat.json' -import PeripheryModule from '../ignition/modules/periphery' - -async function main() { - await ignition.deploy(PeripheryModule, { - parameters: Parameters, - }) -} - -main() - .catch((error) => { - console.error(error) - process.exit(1) - }) diff --git a/packages/subgraph-service/README.md b/packages/subgraph-service/README.md index 7be82e5d6..dbd580740 100644 --- a/packages/subgraph-service/README.md +++ b/packages/subgraph-service/README.md @@ -1,13 +1,17 @@ -# Sample Hardhat Project +# 🌅 Subgraph Service 🌅 -This project demonstrates a basic Hardhat use case. It comes with a sample contract, a test for that contract, and a script that deploys that contract. +The Subgraph Service is a data service designed to work with Graph Horizon that supports indexing subgraphs and serving queries to consumers. -Try running some of the following tasks: +## Deployment -```shell -npx hardhat help -npx hardhat test -REPORT_GAS=true npx hardhat test -npx hardhat node -npx hardhat run scripts/deploy.ts +We use Hardhat Ignition to deploy the contracts. To build and deploy the Subgraph Service run the following commands: + +```bash +yarn install +yarn build +npx hardhat run scripts/deploy.ts --network hardhat ``` + +You can use any network defined in `hardhat.config.ts` by replacing `hardhat` with the network name. + +Note that this will deploy and configure Graph Horizon contracts as well as the Subgraph Service. \ No newline at end of file diff --git a/packages/subgraph-service/ignition/configs/subgraph-service.hardhat.json b/packages/subgraph-service/ignition/configs/subgraph-service.hardhat.json5 similarity index 79% rename from packages/subgraph-service/ignition/configs/subgraph-service.hardhat.json rename to packages/subgraph-service/ignition/configs/subgraph-service.hardhat.json5 index c1a248448..12db4cf12 100644 --- a/packages/subgraph-service/ignition/configs/subgraph-service.hardhat.json +++ b/packages/subgraph-service/ignition/configs/subgraph-service.hardhat.json5 @@ -1,6 +1,8 @@ { + "$global": { + "arbitrator": "0xFFcf8FDEE72ac11b5c542428B35EEF5769C409f0" + }, "DisputeManager": { - "arbitrator": "0xFFcf8FDEE72ac11b5c542428B35EEF5769C409f0", "disputePeriod": 2419200, "disputeDeposit": "10000000000000000000000n", "fishermanRewardCut": 500000, diff --git a/packages/subgraph-service/scripts/deploy.ts b/packages/subgraph-service/scripts/deploy.ts index 17ff2feb2..32f798d6e 100644 --- a/packages/subgraph-service/scripts/deploy.ts +++ b/packages/subgraph-service/scripts/deploy.ts @@ -17,8 +17,8 @@ import SubgraphServiceProxiesModule from '../ignition/modules/Proxies' // - Deploy SubgraphService and DisputeManager implementations async function main() { // TODO: Dynamically load config file based on the hardhat --network value - const HorizonConfig = removeNFromBigInts(require('@graphprotocol/horizon/ignition/configs/horizon.hardhat.json')) - const SubgraphServiceConfig = removeNFromBigInts(require('../ignition/configs/subgraph-service.hardhat.json')) + const HorizonConfig = removeNFromBigInts(require('@graphprotocol/horizon/ignition/configs/horizon.hardhat.json5')) + const SubgraphServiceConfig = removeNFromBigInts(require('../ignition/configs/subgraph-service.hardhat.json5')) // Deploy proxies const { DisputeManagerProxy, DisputeManagerProxyAdmin, SubgraphServiceProxy, SubgraphServiceProxyAdmin } = await ignition.deploy(SubgraphServiceProxiesModule) diff --git a/yarn.lock b/yarn.lock index 4cfd396f1..b92bb282d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2933,7 +2933,7 @@ __metadata: "@nomicfoundation/hardhat-chai-matchers": "npm:^2.0.0" "@nomicfoundation/hardhat-ethers": "npm:^3.0.8" "@nomicfoundation/hardhat-foundry": "npm:^1.1.1" - "@nomicfoundation/hardhat-ignition": "npm:^0.15.5" + "@nomicfoundation/hardhat-ignition": "npm:^0.15.7" "@nomicfoundation/hardhat-ignition-ethers": "npm:^0.15.5" "@nomicfoundation/hardhat-network-helpers": "npm:^1.0.0" "@nomicfoundation/hardhat-toolbox": "npm:^4.0.0" @@ -4707,6 +4707,24 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/hardhat-ignition@npm:^0.15.7": + version: 0.15.7 + resolution: "@nomicfoundation/hardhat-ignition@npm:0.15.7" + dependencies: + "@nomicfoundation/ignition-core": "npm:^0.15.7" + "@nomicfoundation/ignition-ui": "npm:^0.15.7" + chalk: "npm:^4.0.0" + debug: "npm:^4.3.2" + fs-extra: "npm:^10.0.0" + json5: "npm:^2.2.3" + prompts: "npm:^2.4.2" + peerDependencies: + "@nomicfoundation/hardhat-verify": ^2.0.1 + hardhat: ^2.18.0 + checksum: a5ed2b4fb862185d25c7b718faacafb23b818bc22c4c80c9bab6baaa228cf430196058a9374649de99dd831b98b9088b7b337ef44e4cadbf370d75a8a325ced9 + languageName: node + linkType: hard + "@nomicfoundation/hardhat-network-helpers@npm:^1.0.0, @nomicfoundation/hardhat-network-helpers@npm:^1.0.9": version: 1.0.10 resolution: "@nomicfoundation/hardhat-network-helpers@npm:1.0.10" @@ -4779,6 +4797,23 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/ignition-core@npm:^0.15.7": + version: 0.15.7 + resolution: "@nomicfoundation/ignition-core@npm:0.15.7" + dependencies: + "@ethersproject/address": "npm:5.6.1" + "@nomicfoundation/solidity-analyzer": "npm:^0.1.1" + cbor: "npm:^9.0.0" + debug: "npm:^4.3.2" + ethers: "npm:^6.7.0" + fs-extra: "npm:^10.0.0" + immer: "npm:10.0.2" + lodash: "npm:4.17.21" + ndjson: "npm:2.0.0" + checksum: b0d5717e7835da76595886e2729a0ee34536699091ad509b63fe2ec96b186495886c313c1c748dcc658524a5f409840031186f3af76975250be424248369c495 + languageName: node + linkType: hard + "@nomicfoundation/ignition-ui@npm:^0.15.5": version: 0.15.5 resolution: "@nomicfoundation/ignition-ui@npm:0.15.5" @@ -4786,6 +4821,13 @@ __metadata: languageName: node linkType: hard +"@nomicfoundation/ignition-ui@npm:^0.15.7": + version: 0.15.7 + resolution: "@nomicfoundation/ignition-ui@npm:0.15.7" + checksum: 4e53ff1e5267e9882ee3f7bae3d39c0e0552e9600fd2ff12ccc49f22436e1b97e9cec215999fda0ebcfbdf6db054a1ad8c0d940641d97de5998dbb4c864ce649 + languageName: node + linkType: hard + "@nomicfoundation/solidity-analyzer-darwin-arm64@npm:0.1.1": version: 0.1.1 resolution: "@nomicfoundation/solidity-analyzer-darwin-arm64@npm:0.1.1" From 4f0a4792c654740e389ee55da94a0bbd39742094 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Migone?= Date: Thu, 14 Nov 2024 16:00:17 -0300 Subject: [PATCH 2/5] chore: bump ignition in subgraph service package MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomás Migone --- packages/subgraph-service/package.json | 2 +- yarn.lock | 26 +------------------------- 2 files changed, 2 insertions(+), 26 deletions(-) diff --git a/packages/subgraph-service/package.json b/packages/subgraph-service/package.json index 419d5f160..0c325a17f 100644 --- a/packages/subgraph-service/package.json +++ b/packages/subgraph-service/package.json @@ -18,7 +18,7 @@ "@nomicfoundation/hardhat-chai-matchers": "^2.0.0", "@nomicfoundation/hardhat-ethers": "^3.0.8", "@nomicfoundation/hardhat-foundry": "^1.1.1", - "@nomicfoundation/hardhat-ignition": "^0.15.5", + "@nomicfoundation/hardhat-ignition": "^0.15.7", "@nomicfoundation/hardhat-ignition-ethers": "^0.15.5", "@nomicfoundation/hardhat-network-helpers": "^1.0.0", "@nomicfoundation/hardhat-toolbox": "^4.0.0", diff --git a/yarn.lock b/yarn.lock index b92bb282d..6fc660114 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3026,7 +3026,7 @@ __metadata: "@nomicfoundation/hardhat-chai-matchers": "npm:^2.0.0" "@nomicfoundation/hardhat-ethers": "npm:^3.0.8" "@nomicfoundation/hardhat-foundry": "npm:^1.1.1" - "@nomicfoundation/hardhat-ignition": "npm:^0.15.5" + "@nomicfoundation/hardhat-ignition": "npm:^0.15.7" "@nomicfoundation/hardhat-ignition-ethers": "npm:^0.15.5" "@nomicfoundation/hardhat-network-helpers": "npm:^1.0.0" "@nomicfoundation/hardhat-toolbox": "npm:^4.0.0" @@ -4690,23 +4690,6 @@ __metadata: languageName: node linkType: hard -"@nomicfoundation/hardhat-ignition@npm:^0.15.5": - version: 0.15.5 - resolution: "@nomicfoundation/hardhat-ignition@npm:0.15.5" - dependencies: - "@nomicfoundation/ignition-core": "npm:^0.15.5" - "@nomicfoundation/ignition-ui": "npm:^0.15.5" - chalk: "npm:^4.0.0" - debug: "npm:^4.3.2" - fs-extra: "npm:^10.0.0" - prompts: "npm:^2.4.2" - peerDependencies: - "@nomicfoundation/hardhat-verify": ^2.0.1 - hardhat: ^2.18.0 - checksum: b3d9755f2bf89157b6ae0cb6cebea264f76f556ae0b3fc5a62afb5e0f6ed70b3d82d8f692b1c49b2ef2d60cdb45ee28fb148cfca1aa5a53bfe37772c71e75a08 - languageName: node - linkType: hard - "@nomicfoundation/hardhat-ignition@npm:^0.15.7": version: 0.15.7 resolution: "@nomicfoundation/hardhat-ignition@npm:0.15.7" @@ -4814,13 +4797,6 @@ __metadata: languageName: node linkType: hard -"@nomicfoundation/ignition-ui@npm:^0.15.5": - version: 0.15.5 - resolution: "@nomicfoundation/ignition-ui@npm:0.15.5" - checksum: 7d10e30c3078731e4feb91bd7959dfb5a0eeac6f34f6261fada2bf330ff8057ecd576ce0fb3fe856867af2d7c67f31bd75a896110b58d93ff3f27f04f6771278 - languageName: node - linkType: hard - "@nomicfoundation/ignition-ui@npm:^0.15.7": version: 0.15.7 resolution: "@nomicfoundation/ignition-ui@npm:0.15.7" From 6f67600c0fecc9242cf538d2aaeeaaa39863f7b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Migone?= Date: Fri, 22 Nov 2024 15:54:27 -0300 Subject: [PATCH 3/5] chore: bump hardhat ignition to 0.15.8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomás Migone --- packages/horizon/README.md | 2 +- .../ignition/configs/horizon.hardhat.json5 | 2 +- packages/horizon/package.json | 2 +- packages/horizon/scripts/deploy.ts | 32 ++++++++++++++++++ packages/subgraph-service/package.json | 3 +- packages/subgraph-service/scripts/deploy.ts | 2 ++ yarn.lock | 33 ++++++++++--------- 7 files changed, 56 insertions(+), 20 deletions(-) create mode 100644 packages/horizon/scripts/deploy.ts diff --git a/packages/horizon/README.md b/packages/horizon/README.md index 76ddbf9b9..fa1a0410e 100644 --- a/packages/horizon/README.md +++ b/packages/horizon/README.md @@ -16,4 +16,4 @@ npx hardhat ignition deploy ./ignition/modules/horizon.ts \ You can use any network defined in `hardhat.config.ts` by replacing `hardhat` with the network name. -Note that this will deploy a standalone version of Graph Horizon contracts, meaning the Subgraph Service will not be deployed. If you want to deploy both please refer to the [Subgraph Service README](../subgraph-service/README.md) for deploy instructions. \ No newline at end of file +Note that this will deploy a standalone version of Graph Horizon contracts, meaning the Subgraph Service or any other data service will not be deployed. If you want to deploy the Subgraph Service please refer to the [Subgraph Service README](../subgraph-service/README.md) for deploy instructions. diff --git a/packages/horizon/ignition/configs/horizon.hardhat.json5 b/packages/horizon/ignition/configs/horizon.hardhat.json5 index a0dcc4aee..d4a3277cb 100644 --- a/packages/horizon/ignition/configs/horizon.hardhat.json5 +++ b/packages/horizon/ignition/configs/horizon.hardhat.json5 @@ -3,7 +3,7 @@ "governor": "0xFFcf8FDEE72ac11b5c542428B35EEF5769C409f0", "pauseGuardian": "0x95cED938F7991cd0dFcb48F0a06a40FA1aF46EBC", "subgraphAvailabilityOracle": "0xd03ea8624C8C5987235048901fB614fDcA89b117", - // Placeholder address for a standalone Horizon deployment, see README.md for more detals + // Placeholder address for a standalone Horizon deployment, see README.md for more details "subgraphServiceAddress": "0x0000000000000000000000000000000000000000" }, "RewardsManager": { diff --git a/packages/horizon/package.json b/packages/horizon/package.json index a43bf3f72..f338314ac 100644 --- a/packages/horizon/package.json +++ b/packages/horizon/package.json @@ -17,7 +17,7 @@ "@nomicfoundation/hardhat-chai-matchers": "^2.0.0", "@nomicfoundation/hardhat-ethers": "^3.0.8", "@nomicfoundation/hardhat-foundry": "^1.1.1", - "@nomicfoundation/hardhat-ignition": "^0.15.7", + "@nomicfoundation/hardhat-ignition": "^0.15.8", "@nomicfoundation/hardhat-ignition-ethers": "^0.15.5", "@nomicfoundation/hardhat-network-helpers": "^1.0.0", "@nomicfoundation/hardhat-toolbox": "^4.0.0", diff --git a/packages/horizon/scripts/deploy.ts b/packages/horizon/scripts/deploy.ts new file mode 100644 index 000000000..386b93803 --- /dev/null +++ b/packages/horizon/scripts/deploy.ts @@ -0,0 +1,32 @@ +require('json5/lib/register') + +import { ignition } from 'hardhat' + +import HorizonModule from '../ignition/modules/horizon' + +async function main() { + const HorizonConfig = removeNFromBigInts(require('../ignition/configs/horizon.hardhat.json5')) + // Deploy Horizon + await ignition.deploy(HorizonModule, { + parameters: HorizonConfig, + }) +} +main().catch((error) => { + console.error(error) + process.exit(1) +}) + +// eslint-disable-next-line @typescript-eslint/no-explicit-any +function removeNFromBigInts(obj: any): any { + // Ignition requires "n" suffix for bigints, but not here + if (typeof obj === 'string') { + return obj.replace(/(\d+)n/g, '$1') + } else if (Array.isArray(obj)) { + return obj.map(removeNFromBigInts) + } else if (typeof obj === 'object' && obj !== null) { + for (const key in obj) { + obj[key] = removeNFromBigInts(obj[key]) + } + } + return obj +} diff --git a/packages/subgraph-service/package.json b/packages/subgraph-service/package.json index 0c325a17f..4af0ff39a 100644 --- a/packages/subgraph-service/package.json +++ b/packages/subgraph-service/package.json @@ -18,7 +18,7 @@ "@nomicfoundation/hardhat-chai-matchers": "^2.0.0", "@nomicfoundation/hardhat-ethers": "^3.0.8", "@nomicfoundation/hardhat-foundry": "^1.1.1", - "@nomicfoundation/hardhat-ignition": "^0.15.7", + "@nomicfoundation/hardhat-ignition": "^0.15.8", "@nomicfoundation/hardhat-ignition-ethers": "^0.15.5", "@nomicfoundation/hardhat-network-helpers": "^1.0.0", "@nomicfoundation/hardhat-toolbox": "^4.0.0", @@ -39,6 +39,7 @@ "hardhat-contract-sizer": "^2.10.0", "hardhat-gas-reporter": "^1.0.8", "hardhat-storage-layout": "^0.1.7", + "json5": "^2.2.3", "lint-staged": "^15.2.2", "prettier": "^3.2.5", "prettier-plugin-solidity": "^1.3.1", diff --git a/packages/subgraph-service/scripts/deploy.ts b/packages/subgraph-service/scripts/deploy.ts index 32f798d6e..ee774861c 100644 --- a/packages/subgraph-service/scripts/deploy.ts +++ b/packages/subgraph-service/scripts/deploy.ts @@ -2,6 +2,8 @@ /* eslint-disable @typescript-eslint/no-unsafe-return */ /* eslint-disable @typescript-eslint/no-unused-vars */ /* eslint-disable @typescript-eslint/no-explicit-any */ +require('json5/lib/register') + import { ignition } from 'hardhat' import DisputeManagerModule from '../ignition/modules/DisputeManager' diff --git a/yarn.lock b/yarn.lock index 6fc660114..18e4f4528 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2933,7 +2933,7 @@ __metadata: "@nomicfoundation/hardhat-chai-matchers": "npm:^2.0.0" "@nomicfoundation/hardhat-ethers": "npm:^3.0.8" "@nomicfoundation/hardhat-foundry": "npm:^1.1.1" - "@nomicfoundation/hardhat-ignition": "npm:^0.15.7" + "@nomicfoundation/hardhat-ignition": "npm:^0.15.8" "@nomicfoundation/hardhat-ignition-ethers": "npm:^0.15.5" "@nomicfoundation/hardhat-network-helpers": "npm:^1.0.0" "@nomicfoundation/hardhat-toolbox": "npm:^4.0.0" @@ -3026,7 +3026,7 @@ __metadata: "@nomicfoundation/hardhat-chai-matchers": "npm:^2.0.0" "@nomicfoundation/hardhat-ethers": "npm:^3.0.8" "@nomicfoundation/hardhat-foundry": "npm:^1.1.1" - "@nomicfoundation/hardhat-ignition": "npm:^0.15.7" + "@nomicfoundation/hardhat-ignition": "npm:^0.15.8" "@nomicfoundation/hardhat-ignition-ethers": "npm:^0.15.5" "@nomicfoundation/hardhat-network-helpers": "npm:^1.0.0" "@nomicfoundation/hardhat-toolbox": "npm:^4.0.0" @@ -3047,6 +3047,7 @@ __metadata: hardhat-contract-sizer: "npm:^2.10.0" hardhat-gas-reporter: "npm:^1.0.8" hardhat-storage-layout: "npm:^0.1.7" + json5: "npm:^2.2.3" lint-staged: "npm:^15.2.2" prettier: "npm:^3.2.5" prettier-plugin-solidity: "npm:^1.3.1" @@ -4690,12 +4691,12 @@ __metadata: languageName: node linkType: hard -"@nomicfoundation/hardhat-ignition@npm:^0.15.7": - version: 0.15.7 - resolution: "@nomicfoundation/hardhat-ignition@npm:0.15.7" +"@nomicfoundation/hardhat-ignition@npm:^0.15.8": + version: 0.15.8 + resolution: "@nomicfoundation/hardhat-ignition@npm:0.15.8" dependencies: - "@nomicfoundation/ignition-core": "npm:^0.15.7" - "@nomicfoundation/ignition-ui": "npm:^0.15.7" + "@nomicfoundation/ignition-core": "npm:^0.15.8" + "@nomicfoundation/ignition-ui": "npm:^0.15.8" chalk: "npm:^4.0.0" debug: "npm:^4.3.2" fs-extra: "npm:^10.0.0" @@ -4704,7 +4705,7 @@ __metadata: peerDependencies: "@nomicfoundation/hardhat-verify": ^2.0.1 hardhat: ^2.18.0 - checksum: a5ed2b4fb862185d25c7b718faacafb23b818bc22c4c80c9bab6baaa228cf430196058a9374649de99dd831b98b9088b7b337ef44e4cadbf370d75a8a325ced9 + checksum: 59b82470ff5b38451c0bd7b19015eeee2f3db801addd8d67e0b28d6cb5ae3f578dfc998d184cb9c71895f6106bbb53c9cdf28df1cb14917df76cf3db82e87c32 languageName: node linkType: hard @@ -4780,9 +4781,9 @@ __metadata: languageName: node linkType: hard -"@nomicfoundation/ignition-core@npm:^0.15.7": - version: 0.15.7 - resolution: "@nomicfoundation/ignition-core@npm:0.15.7" +"@nomicfoundation/ignition-core@npm:^0.15.8": + version: 0.15.8 + resolution: "@nomicfoundation/ignition-core@npm:0.15.8" dependencies: "@ethersproject/address": "npm:5.6.1" "@nomicfoundation/solidity-analyzer": "npm:^0.1.1" @@ -4793,14 +4794,14 @@ __metadata: immer: "npm:10.0.2" lodash: "npm:4.17.21" ndjson: "npm:2.0.0" - checksum: b0d5717e7835da76595886e2729a0ee34536699091ad509b63fe2ec96b186495886c313c1c748dcc658524a5f409840031186f3af76975250be424248369c495 + checksum: ebb16e092bd9a39e48cc269d3627430656f558c814cea435eaf06f2e7d9a059a4470d1186c2a7d108efed755ef34d88d2aa74f9d6de5bb73e570996a53a7d2ef languageName: node linkType: hard -"@nomicfoundation/ignition-ui@npm:^0.15.7": - version: 0.15.7 - resolution: "@nomicfoundation/ignition-ui@npm:0.15.7" - checksum: 4e53ff1e5267e9882ee3f7bae3d39c0e0552e9600fd2ff12ccc49f22436e1b97e9cec215999fda0ebcfbdf6db054a1ad8c0d940641d97de5998dbb4c864ce649 +"@nomicfoundation/ignition-ui@npm:^0.15.8": + version: 0.15.8 + resolution: "@nomicfoundation/ignition-ui@npm:0.15.8" + checksum: c5e7b41631824a048160b8d5400f5fb0cb05412a9d2f3896044f7cfedea4298d31a8d5b4b8be38296b5592db4fa9255355843dcb3d781bc7fa1200fb03ea8476 languageName: node linkType: hard From 4fa4f571be0687f9ee3e06111cadf3d9a8d4bcb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Migone?= Date: Mon, 25 Nov 2024 13:58:40 -0300 Subject: [PATCH 4/5] chore: hardcode ignition config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomás Migone --- packages/horizon/scripts/deploy.ts | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/packages/horizon/scripts/deploy.ts b/packages/horizon/scripts/deploy.ts index 386b93803..ee86723c1 100644 --- a/packages/horizon/scripts/deploy.ts +++ b/packages/horizon/scripts/deploy.ts @@ -5,10 +5,32 @@ import { ignition } from 'hardhat' import HorizonModule from '../ignition/modules/horizon' async function main() { - const HorizonConfig = removeNFromBigInts(require('../ignition/configs/horizon.hardhat.json5')) + // const HorizonConfig = removeNFromBigInts(require('../ignition/configs/horizon.hardhat.json5')) // Deploy Horizon await ignition.deploy(HorizonModule, { - parameters: HorizonConfig, + parameters: { + $global: { + governor: '0xFFcf8FDEE72ac11b5c542428B35EEF5769C409f0', + pauseGuardian: '0x95cED938F7991cd0dFcb48F0a06a40FA1aF46EBC', + subgraphAvailabilityOracle: '0xd03ea8624C8C5987235048901fB614fDcA89b117', + subgraphServiceAddress: '0x0000000000000000000000000000000000000000', + }, + RewardsManager: { issuancePerBlock: '114155251141552511415' }, + EpochManager: { epochLength: 60 }, + Curation: { curationTaxPercentage: 10000, minimumCurationDeposit: 1 }, + GraphToken: { initialSupply: '10000000000000000000000000000' }, + HorizonStaking: { maxThawingPeriod: 2419200 }, + GraphPayments: { protocolPaymentCut: 10000 }, + PaymentsEscrow: { + revokeCollectorThawingPeriod: 10000, + withdrawEscrowThawingPeriod: 10000, + }, + TAPCollector: { + eip712Name: 'TAPCollector', + eip712Version: '1', + revokeSignerThawingPeriod: 10000, + }, + }, }) } main().catch((error) => { From e5dc7975f533c3994762054160d35220b1a8e32a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Migone?= Date: Tue, 26 Nov 2024 10:15:55 -0300 Subject: [PATCH 5/5] fix: update all ignition packages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tomás Migone --- packages/horizon/package.json | 4 +-- packages/horizon/scripts/deploy.ts | 27 +++---------------- packages/subgraph-service/package.json | 4 +-- yarn.lock | 37 +++++++------------------- 4 files changed, 17 insertions(+), 55 deletions(-) diff --git a/packages/horizon/package.json b/packages/horizon/package.json index f338314ac..4b594485f 100644 --- a/packages/horizon/package.json +++ b/packages/horizon/package.json @@ -18,11 +18,11 @@ "@nomicfoundation/hardhat-ethers": "^3.0.8", "@nomicfoundation/hardhat-foundry": "^1.1.1", "@nomicfoundation/hardhat-ignition": "^0.15.8", - "@nomicfoundation/hardhat-ignition-ethers": "^0.15.5", + "@nomicfoundation/hardhat-ignition-ethers": "^0.15.8", "@nomicfoundation/hardhat-network-helpers": "^1.0.0", "@nomicfoundation/hardhat-toolbox": "^4.0.0", "@nomicfoundation/hardhat-verify": "^2.0.10", - "@nomicfoundation/ignition-core": "^0.15.5", + "@nomicfoundation/ignition-core": "^0.15.8", "@openzeppelin/contracts": "^5.0.2", "@openzeppelin/contracts-upgradeable": "^5.0.2", "@typechain/ethers-v6": "^0.5.0", diff --git a/packages/horizon/scripts/deploy.ts b/packages/horizon/scripts/deploy.ts index ee86723c1..4af1f769e 100644 --- a/packages/horizon/scripts/deploy.ts +++ b/packages/horizon/scripts/deploy.ts @@ -5,32 +5,11 @@ import { ignition } from 'hardhat' import HorizonModule from '../ignition/modules/horizon' async function main() { - // const HorizonConfig = removeNFromBigInts(require('../ignition/configs/horizon.hardhat.json5')) + const HorizonConfig = removeNFromBigInts(require('../ignition/configs/horizon.hardhat.json5')) + // Deploy Horizon await ignition.deploy(HorizonModule, { - parameters: { - $global: { - governor: '0xFFcf8FDEE72ac11b5c542428B35EEF5769C409f0', - pauseGuardian: '0x95cED938F7991cd0dFcb48F0a06a40FA1aF46EBC', - subgraphAvailabilityOracle: '0xd03ea8624C8C5987235048901fB614fDcA89b117', - subgraphServiceAddress: '0x0000000000000000000000000000000000000000', - }, - RewardsManager: { issuancePerBlock: '114155251141552511415' }, - EpochManager: { epochLength: 60 }, - Curation: { curationTaxPercentage: 10000, minimumCurationDeposit: 1 }, - GraphToken: { initialSupply: '10000000000000000000000000000' }, - HorizonStaking: { maxThawingPeriod: 2419200 }, - GraphPayments: { protocolPaymentCut: 10000 }, - PaymentsEscrow: { - revokeCollectorThawingPeriod: 10000, - withdrawEscrowThawingPeriod: 10000, - }, - TAPCollector: { - eip712Name: 'TAPCollector', - eip712Version: '1', - revokeSignerThawingPeriod: 10000, - }, - }, + parameters: HorizonConfig, }) } main().catch((error) => { diff --git a/packages/subgraph-service/package.json b/packages/subgraph-service/package.json index 4af0ff39a..66650c097 100644 --- a/packages/subgraph-service/package.json +++ b/packages/subgraph-service/package.json @@ -19,11 +19,11 @@ "@nomicfoundation/hardhat-ethers": "^3.0.8", "@nomicfoundation/hardhat-foundry": "^1.1.1", "@nomicfoundation/hardhat-ignition": "^0.15.8", - "@nomicfoundation/hardhat-ignition-ethers": "^0.15.5", + "@nomicfoundation/hardhat-ignition-ethers": "^0.15.8", "@nomicfoundation/hardhat-network-helpers": "^1.0.0", "@nomicfoundation/hardhat-toolbox": "^4.0.0", "@nomicfoundation/hardhat-verify": "^2.0.10", - "@nomicfoundation/ignition-core": "^0.15.5", + "@nomicfoundation/ignition-core": "^0.15.8", "@openzeppelin/contracts": "^5.0.2", "@openzeppelin/contracts-upgradeable": "^5.0.2", "@typechain/ethers-v6": "^0.5.0", diff --git a/yarn.lock b/yarn.lock index 18e4f4528..24b71d711 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2934,11 +2934,11 @@ __metadata: "@nomicfoundation/hardhat-ethers": "npm:^3.0.8" "@nomicfoundation/hardhat-foundry": "npm:^1.1.1" "@nomicfoundation/hardhat-ignition": "npm:^0.15.8" - "@nomicfoundation/hardhat-ignition-ethers": "npm:^0.15.5" + "@nomicfoundation/hardhat-ignition-ethers": "npm:^0.15.8" "@nomicfoundation/hardhat-network-helpers": "npm:^1.0.0" "@nomicfoundation/hardhat-toolbox": "npm:^4.0.0" "@nomicfoundation/hardhat-verify": "npm:^2.0.10" - "@nomicfoundation/ignition-core": "npm:^0.15.5" + "@nomicfoundation/ignition-core": "npm:^0.15.8" "@openzeppelin/contracts": "npm:^5.0.2" "@openzeppelin/contracts-upgradeable": "npm:^5.0.2" "@typechain/ethers-v6": "npm:^0.5.0" @@ -3027,11 +3027,11 @@ __metadata: "@nomicfoundation/hardhat-ethers": "npm:^3.0.8" "@nomicfoundation/hardhat-foundry": "npm:^1.1.1" "@nomicfoundation/hardhat-ignition": "npm:^0.15.8" - "@nomicfoundation/hardhat-ignition-ethers": "npm:^0.15.5" + "@nomicfoundation/hardhat-ignition-ethers": "npm:^0.15.8" "@nomicfoundation/hardhat-network-helpers": "npm:^1.0.0" "@nomicfoundation/hardhat-toolbox": "npm:^4.0.0" "@nomicfoundation/hardhat-verify": "npm:^2.0.10" - "@nomicfoundation/ignition-core": "npm:^0.15.5" + "@nomicfoundation/ignition-core": "npm:^0.15.8" "@openzeppelin/contracts": "npm:^5.0.2" "@openzeppelin/contracts-upgradeable": "npm:^5.0.2" "@typechain/ethers-v6": "npm:^0.5.0" @@ -4678,16 +4678,16 @@ __metadata: languageName: node linkType: hard -"@nomicfoundation/hardhat-ignition-ethers@npm:^0.15.5": - version: 0.15.5 - resolution: "@nomicfoundation/hardhat-ignition-ethers@npm:0.15.5" +"@nomicfoundation/hardhat-ignition-ethers@npm:^0.15.8": + version: 0.15.8 + resolution: "@nomicfoundation/hardhat-ignition-ethers@npm:0.15.8" peerDependencies: "@nomicfoundation/hardhat-ethers": ^3.0.4 - "@nomicfoundation/hardhat-ignition": ^0.15.5 - "@nomicfoundation/ignition-core": ^0.15.5 + "@nomicfoundation/hardhat-ignition": ^0.15.8 + "@nomicfoundation/ignition-core": ^0.15.8 ethers: ^6.7.0 hardhat: ^2.18.0 - checksum: 19f0e029a580dd4d27048f1e87f8111532684cf7f0a2b5c8d6ae8d811ff489629305e3a616cb89702421142c7c628f1efa389781414de1279689018c463cce60 + checksum: 480825fa20d24031b330f96ff667137b8fdb67db0efea8cb3ccd5919c3f93e2c567de6956278e36c399311fd61beef20fae6e7700f52beaa813002cbee482efa languageName: node linkType: hard @@ -4764,23 +4764,6 @@ __metadata: languageName: node linkType: hard -"@nomicfoundation/ignition-core@npm:^0.15.5": - version: 0.15.5 - resolution: "@nomicfoundation/ignition-core@npm:0.15.5" - dependencies: - "@ethersproject/address": "npm:5.6.1" - "@nomicfoundation/solidity-analyzer": "npm:^0.1.1" - cbor: "npm:^9.0.0" - debug: "npm:^4.3.2" - ethers: "npm:^6.7.0" - fs-extra: "npm:^10.0.0" - immer: "npm:10.0.2" - lodash: "npm:4.17.21" - ndjson: "npm:2.0.0" - checksum: ff14724d8e992dc54291da6e6a864f6b3db268b6725d0af6ecbf3f81ed65f6824441421b23129d118cd772efc8ab0275d1decf203019cb3049a48b37f9c15432 - languageName: node - linkType: hard - "@nomicfoundation/ignition-core@npm:^0.15.8": version: 0.15.8 resolution: "@nomicfoundation/ignition-core@npm:0.15.8"