Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/horizon/ignition/configs/migrate.default.json5
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@
"controllerAddress": "0x9DB3ee191681f092607035d9BDA6e59FbEaCa695",
"horizonStakingAddress": "0x865365C425f3A593Ffe698D9c4E6707D14d51e08",
"epochManagerAddress": "0x88b3C7f37253bAA1A9b95feAd69bD5320585826D",
"epochManagerImplementationAddress": "0x646627fa39ec6f6E757Cb4189bC54c92FFBb71da",
"graphTokenAddress": "0xf8c05dCF59E8B28BFD5eed176C562bEbcfc7Ac04",
"graphTokenImplementationAddress": "0x4cf968bA38b43dd10be114daa7959C1b369479e5",
"graphTokenGatewayAddress": "0xB24Ce0f8c18c4DdDa584A7EeC132F49C966813bb",
"graphTokenGatewayImplementationAddress": "0x3C2eB5E561f70c0573E5f6c92358e988E32cb5eC",
"rewardsManagerAddress": "0x1F49caE7669086c8ba53CC35d1E9f80176d67E79",
"curationAddress": "0xDe761f075200E75485F4358978FB4d1dC8644FD5",
"gnsAddress": "0x3133948342F35b8699d8F94aeE064AbB76eDe965",
Expand Down
45 changes: 0 additions & 45 deletions packages/horizon/ignition/configs/migrate.fork1.json5

This file was deleted.

3 changes: 3 additions & 0 deletions packages/horizon/ignition/configs/migrate.integration.json5
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@
"controllerAddress": "0x9DB3ee191681f092607035d9BDA6e59FbEaCa695",
"horizonStakingAddress": "0x865365C425f3A593Ffe698D9c4E6707D14d51e08",
"epochManagerAddress": "0x88b3C7f37253bAA1A9b95feAd69bD5320585826D",
"epochManagerImplementationAddress": "0x646627fa39ec6f6E757Cb4189bC54c92FFBb71da",
"graphTokenAddress": "0xf8c05dCF59E8B28BFD5eed176C562bEbcfc7Ac04",
"graphTokenImplementationAddress": "0x4cf968bA38b43dd10be114daa7959C1b369479e5",
"graphTokenGatewayAddress": "0xB24Ce0f8c18c4DdDa584A7EeC132F49C966813bb",
"graphTokenGatewayImplementationAddress": "0x3C2eB5E561f70c0573E5f6c92358e988E32cb5eC",
"rewardsManagerAddress": "0x1F49caE7669086c8ba53CC35d1E9f80176d67E79",
"curationAddress": "0xDe761f075200E75485F4358978FB4d1dC8644FD5",
"gnsAddress": "0x3133948342F35b8699d8F94aeE064AbB76eDe965",
Expand Down
3 changes: 3 additions & 0 deletions packages/horizon/ignition/configs/migrate.localNetwork.json5
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@
"controllerAddress": "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0",
"horizonStakingAddress": "0xc5a5C42992dECbae36851359345FE25997F5C42d",
"epochManagerAddress": "0xDc64a140Aa3E981100a9becA4E685f962f0cF6C9",
"epochManagerImplementationAddress": "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9",
"graphTokenAddress": "0x3Aa5ebB10DC797CAC828524e59A333d0A371443c",
"graphTokenImplementationAddress": "0x3Aa5ebB10DC797CAC828524e59A333d0A371443c",
"graphTokenGatewayAddress": "0xc3e53F4d16Ae77Db1c982e75a937B9f60FE63690",
"graphTokenGatewayImplementationAddress": "0xE6E340D132b5f46d1e472DebcD681B2aBc16e57E",
"rewardsManagerAddress": "0x9A676e781A523b5d0C0e43731313A708CB607508",
"curationAddress": "0x59b670e9fA9D0A427751Af201D676719a970857b",
"gnsAddress": "0xa85233C63b9Ee964Add6F2cffe00Fd84eb32338f",
Expand Down
6 changes: 6 additions & 0 deletions packages/horizon/ignition/modules/migrate/migrate-3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ export default buildModule('GraphHorizon_Migrate_3', (m) => {
Controller,
GraphProxyAdmin,
EpochManager,
EpochManagerImplementation,
L2GraphToken,
L2GraphTokenImplementation,
L2GraphTokenGateway,
L2GraphTokenGatewayImplementation,
L2GNS,
L2GNSImplementation,
SubgraphNFT,
Expand Down Expand Up @@ -47,7 +50,10 @@ export default buildModule('GraphHorizon_Migrate_3', (m) => {
Controller: Controller,
GraphProxyAdmin,
Graph_Proxy_EpochManager: EpochManager,
Implementation_EpochManager: EpochManagerImplementation,
Graph_Proxy_L2GraphToken: L2GraphToken,
Implementation_L2GraphToken: L2GraphTokenImplementation,
Graph_Proxy_L2GraphTokenGateway: L2GraphTokenGateway,
Implementation_L2GraphTokenGateway: L2GraphTokenGatewayImplementation,
}
})
8 changes: 7 additions & 1 deletion packages/horizon/ignition/modules/periphery/EpochManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,14 @@ export default buildModule('EpochManager', (m) => {

export const MigrateEpochManagerModule = buildModule('EpochManager', (m) => {
const epochManagerAddress = m.getParameter('epochManagerAddress')
const epochManagerImplementationAddress = m.getParameter('epochManagerImplementationAddress')

const EpochManager = m.contractAt('EpochManager', EpochManagerArtifact, epochManagerAddress)
const EpochManagerImplementation = m.contractAt(
'EpochManagerAddressBook',
EpochManagerArtifact,
epochManagerImplementationAddress,
)

return { EpochManager }
return { EpochManager, EpochManagerImplementation }
})
8 changes: 7 additions & 1 deletion packages/horizon/ignition/modules/periphery/GraphToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,14 @@ export default buildModule('L2GraphToken', (m) => {

export const MigrateGraphTokenModule = buildModule('L2GraphToken', (m) => {
const graphTokenAddress = m.getParameter('graphTokenAddress')
const graphTokenImplementationAddress = m.getParameter('graphTokenImplementationAddress')

const L2GraphToken = m.contractAt('L2GraphToken', GraphTokenArtifact, graphTokenAddress)
const L2GraphTokenImplementation = m.contractAt(
'L2GraphTokenAddressBook',
GraphTokenArtifact,
graphTokenImplementationAddress,
)

return { L2GraphToken }
return { L2GraphToken, L2GraphTokenImplementation }
})
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,14 @@ export default buildModule('L2GraphTokenGateway', (m) => {

export const MigrateGraphTokenGatewayModule = buildModule('L2GraphTokenGateway', (m) => {
const graphTokenGatewayAddress = m.getParameter('graphTokenGatewayAddress')
const graphTokenGatewayImplementationAddress = m.getParameter('graphTokenGatewayImplementationAddress')

const L2GraphTokenGateway = m.contractAt('L2GraphTokenGateway', GraphTokenGatewayArtifact, graphTokenGatewayAddress)
const L2GraphTokenGatewayImplementation = m.contractAt(
'L2GraphTokenGatewayAddressBook',
GraphTokenGatewayArtifact,
graphTokenGatewayImplementationAddress,
)

return { L2GraphTokenGateway }
return { L2GraphTokenGateway, L2GraphTokenGatewayImplementation }
})
9 changes: 6 additions & 3 deletions packages/horizon/ignition/modules/periphery/periphery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,22 +73,25 @@ export const MigratePeripheryModule = buildModule('GraphHorizon_Periphery', (m)
)
const { Controller } = m.useModule(MigrateControllerDeployerModule)
const { GraphProxyAdmin } = m.useModule(MigrateGraphProxyAdminModule)
const { EpochManager } = m.useModule(MigrateEpochManagerModule)
const { L2GraphToken } = m.useModule(MigrateGraphTokenModule)
const { L2GraphTokenGateway } = m.useModule(MigrateGraphTokenGatewayModule)
const { EpochManager, EpochManagerImplementation } = m.useModule(MigrateEpochManagerModule)
const { L2GraphToken, L2GraphTokenImplementation } = m.useModule(MigrateGraphTokenModule)
const { L2GraphTokenGateway, L2GraphTokenGatewayImplementation } = m.useModule(MigrateGraphTokenGatewayModule)

// Load these contracts so they are available in the address book
return {
Controller,
EpochManager,
EpochManagerImplementation,
L2Curation,
L2CurationImplementation,
L2GNS,
L2GNSImplementation,
SubgraphNFT,
GraphProxyAdmin,
L2GraphToken,
L2GraphTokenImplementation,
L2GraphTokenGateway,
L2GraphTokenGatewayImplementation,
RewardsManager,
RewardsManagerImplementation,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"gnsProxyAddress": "0x3133948342F35b8699d8F94aeE064AbB76eDe965",
"gnsImplementationAddress": "0x00CBF5024d454255577Bf2b0fB6A43328a6828c9",
"subgraphNFTAddress": "0xF21Df5BbA7EB9b54D8F60C560aFb9bA63e6aED1A",
"legacyDisputeManagerAddress": "0x7C9B82717f9433932507dF6EdA93A9678b258698",
"legacyServiceRegistryAddress": "0x888541878CbDDEd880Cd58c728f1Af5C47343F86",

// Must be set for step 2 of the deployment
"disputeManagerProxyAddress": "",
Expand Down
36 changes: 0 additions & 36 deletions packages/subgraph-service/ignition/configs/migrate.fork1.json5

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"gnsProxyAddress": "0x3133948342F35b8699d8F94aeE064AbB76eDe965",
"gnsImplementationAddress": "0x00CBF5024d454255577Bf2b0fB6A43328a6828c9",
"subgraphNFTAddress": "0xF21Df5BbA7EB9b54D8F60C560aFb9bA63e6aED1A",

"legacyDisputeManagerAddress": "0x7C9B82717f9433932507dF6EdA93A9678b258698",
"legacyServiceRegistryAddress": "0x888541878CbDDEd880Cd58c728f1Af5C47343F86",

// Must be set for step 2 of the deployment
"disputeManagerProxyAddress": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
"gnsProxyAddress": "0xa85233C63b9Ee964Add6F2cffe00Fd84eb32338f",
"gnsImplementationAddress": "0x322813Fd9A801c5507c9de605d63CEA4f2CE6c44",
"subgraphNFTAddress": "0xB7f8BC63BbcaD18155201308C8f3540b07f84F5e",
"legacyDisputeManagerAddress": "0x9A9f2CCfdE556A7E9Ff0848998Aa4a0CFD8863AE",
"legacyServiceRegistryAddress": "0x2279B7A0a67DB372996a5FaB50D91eAA73d2eBe6",

// Must be set for step 2 of the deployment
"disputeManagerProxyAddress": "",
Expand Down
9 changes: 9 additions & 0 deletions packages/subgraph-service/ignition/modules/DisputeManager.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import LegacyDisputeManagerArtifact from '@graphprotocol/contracts/artifacts/contracts/disputes/DisputeManager.sol/DisputeManager.json'
import { deployImplementation, upgradeTransparentUpgradeableProxy } from '@graphprotocol/horizon/ignition'
import { buildModule } from '@nomicfoundation/hardhat-ignition/modules'
import ProxyAdminArtifact from '@openzeppelin/contracts/build/contracts/ProxyAdmin.json'
Expand All @@ -12,6 +13,7 @@ export default buildModule('DisputeManager', (m) => {
const subgraphServiceProxyAddress = m.getParameter('subgraphServiceProxyAddress')
const disputeManagerProxyAddress = m.getParameter('disputeManagerProxyAddress')
const disputeManagerProxyAdminAddress = m.getParameter('disputeManagerProxyAdminAddress')
const legacyDisputeManagerAddress = m.getParameter('legacyDisputeManagerAddress')
const arbitrator = m.getParameter('arbitrator')
const disputePeriod = m.getParameter('disputePeriod')
const disputeDeposit = m.getParameter('disputeDeposit')
Expand Down Expand Up @@ -50,8 +52,15 @@ export default buildModule('DisputeManager', (m) => {
m.call(DisputeManager, 'transferOwnership', [governor], { after: [callSetSubgraphService] })
m.call(DisputeManagerProxyAdmin, 'transferOwnership', [governor], { after: [callSetSubgraphService] })

const LegacyDisputeManager = m.contractAt(
'LegacyDisputeManager',
LegacyDisputeManagerArtifact,
legacyDisputeManagerAddress,
)

return {
DisputeManager,
DisputeManagerImplementation,
LegacyDisputeManager,
}
})
16 changes: 16 additions & 0 deletions packages/subgraph-service/ignition/modules/ServiceRegistry.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import ServiceRegistryArtifact from '@graphprotocol/contracts/artifacts/contracts/discovery/ServiceRegistry.sol/ServiceRegistry.json'
import { buildModule } from '@nomicfoundation/hardhat-ignition/modules'

export default buildModule('ServiceRegistry', (m) => {
const legacyServiceRegistryAddress = m.getParameter('legacyServiceRegistryAddress')

const LegacyServiceRegistry = m.contractAt(
'LegacyServiceRegistry',
ServiceRegistryArtifact,
legacyServiceRegistryAddress,
)

return {
LegacyServiceRegistry,
}
})
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ import { buildModule } from '@nomicfoundation/hardhat-ignition/modules'
import CurationModule from '../Curation'
import DisputeManagerModule from '../DisputeManager'
import GNSModule from '../GNS'
import ServiceRegistryModule from '../ServiceRegistry'
import SubgraphServiceModule from '../SubgraphService'

export default buildModule('SubgraphService_Migrate_2', (m) => {
const { DisputeManager, DisputeManagerImplementation } = m.useModule(DisputeManagerModule)
const { DisputeManager, DisputeManagerImplementation, LegacyDisputeManager } = m.useModule(DisputeManagerModule)
const { SubgraphService, SubgraphServiceImplementation } = m.useModule(SubgraphServiceModule)
const { L2Curation, L2CurationImplementation } = m.useModule(CurationModule)
const { L2GNS, L2GNSImplementation, SubgraphNFT } = m.useModule(GNSModule)
const { LegacyServiceRegistry } = m.useModule(ServiceRegistryModule)

return {
Transparent_Proxy_DisputeManager: DisputeManager,
Expand All @@ -21,5 +23,7 @@ export default buildModule('SubgraphService_Migrate_2', (m) => {
Graph_Proxy_L2GNS: L2GNS,
Implementation_L2GNS: L2GNSImplementation,
SubgraphNFT,
LegacyDisputeManager,
LegacyServiceRegistry,
}
})