Skip to content

Commit e1145dd

Browse files
committed
feat: ensure migration scripts produce complete address book
Signed-off-by: Tomás Migone <[email protected]>
1 parent 8937313 commit e1145dd

16 files changed

+78
-89
lines changed

packages/horizon/ignition/configs/migrate.default.json5

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@
88
"controllerAddress": "0x9DB3ee191681f092607035d9BDA6e59FbEaCa695",
99
"horizonStakingAddress": "0x865365C425f3A593Ffe698D9c4E6707D14d51e08",
1010
"epochManagerAddress": "0x88b3C7f37253bAA1A9b95feAd69bD5320585826D",
11+
"epochManagerImplementationAddress": "0x646627fa39ec6f6E757Cb4189bC54c92FFBb71da",
1112
"graphTokenAddress": "0xf8c05dCF59E8B28BFD5eed176C562bEbcfc7Ac04",
13+
"graphTokenImplementationAddress": "0x4cf968bA38b43dd10be114daa7959C1b369479e5",
1214
"graphTokenGatewayAddress": "0xB24Ce0f8c18c4DdDa584A7EeC132F49C966813bb",
15+
"graphTokenGatewayImplementationAddress": "0x3C2eB5E561f70c0573E5f6c92358e988E32cb5eC",
1316
"rewardsManagerAddress": "0x1F49caE7669086c8ba53CC35d1E9f80176d67E79",
1417
"curationAddress": "0xDe761f075200E75485F4358978FB4d1dC8644FD5",
1518
"gnsAddress": "0x3133948342F35b8699d8F94aeE064AbB76eDe965",

packages/horizon/ignition/configs/migrate.fork1.json5

Lines changed: 0 additions & 45 deletions
This file was deleted.

packages/horizon/ignition/configs/migrate.integration.json5

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@
88
"controllerAddress": "0x9DB3ee191681f092607035d9BDA6e59FbEaCa695",
99
"horizonStakingAddress": "0x865365C425f3A593Ffe698D9c4E6707D14d51e08",
1010
"epochManagerAddress": "0x88b3C7f37253bAA1A9b95feAd69bD5320585826D",
11+
"epochManagerImplementationAddress": "0x646627fa39ec6f6E757Cb4189bC54c92FFBb71da",
1112
"graphTokenAddress": "0xf8c05dCF59E8B28BFD5eed176C562bEbcfc7Ac04",
13+
"graphTokenImplementationAddress": "0x4cf968bA38b43dd10be114daa7959C1b369479e5",
1214
"graphTokenGatewayAddress": "0xB24Ce0f8c18c4DdDa584A7EeC132F49C966813bb",
15+
"graphTokenGatewayImplementationAddress": "0x3C2eB5E561f70c0573E5f6c92358e988E32cb5eC",
1316
"rewardsManagerAddress": "0x1F49caE7669086c8ba53CC35d1E9f80176d67E79",
1417
"curationAddress": "0xDe761f075200E75485F4358978FB4d1dC8644FD5",
1518
"gnsAddress": "0x3133948342F35b8699d8F94aeE064AbB76eDe965",

packages/horizon/ignition/configs/migrate.localNetwork.json5

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@
88
"controllerAddress": "0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0",
99
"horizonStakingAddress": "0xc5a5C42992dECbae36851359345FE25997F5C42d",
1010
"epochManagerAddress": "0xDc64a140Aa3E981100a9becA4E685f962f0cF6C9",
11+
"epochManagerImplementationAddress": "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9",
1112
"graphTokenAddress": "0x3Aa5ebB10DC797CAC828524e59A333d0A371443c",
13+
"graphTokenImplementationAddress": "0x3Aa5ebB10DC797CAC828524e59A333d0A371443c",
1214
"graphTokenGatewayAddress": "0xc3e53F4d16Ae77Db1c982e75a937B9f60FE63690",
15+
"graphTokenGatewayImplementationAddress": "0xE6E340D132b5f46d1e472DebcD681B2aBc16e57E",
1316
"rewardsManagerAddress": "0x9A676e781A523b5d0C0e43731313A708CB607508",
1417
"curationAddress": "0x59b670e9fA9D0A427751Af201D676719a970857b",
1518
"gnsAddress": "0xa85233C63b9Ee964Add6F2cffe00Fd84eb32338f",

packages/horizon/ignition/modules/migrate/migrate-3.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@ export default buildModule('GraphHorizon_Migrate_3', (m) => {
1212
Controller,
1313
GraphProxyAdmin,
1414
EpochManager,
15+
EpochManagerImplementation,
1516
L2GraphToken,
17+
L2GraphTokenImplementation,
1618
L2GraphTokenGateway,
19+
L2GraphTokenGatewayImplementation,
1720
L2GNS,
1821
L2GNSImplementation,
1922
SubgraphNFT,
@@ -47,7 +50,10 @@ export default buildModule('GraphHorizon_Migrate_3', (m) => {
4750
Controller: Controller,
4851
GraphProxyAdmin,
4952
Graph_Proxy_EpochManager: EpochManager,
53+
Implementation_EpochManager: EpochManagerImplementation,
5054
Graph_Proxy_L2GraphToken: L2GraphToken,
55+
Implementation_L2GraphToken: L2GraphTokenImplementation,
5156
Graph_Proxy_L2GraphTokenGateway: L2GraphTokenGateway,
57+
Implementation_L2GraphTokenGateway: L2GraphTokenGatewayImplementation,
5258
}
5359
})

packages/horizon/ignition/modules/periphery/EpochManager.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,14 @@ export default buildModule('EpochManager', (m) => {
2222

2323
export const MigrateEpochManagerModule = buildModule('EpochManager', (m) => {
2424
const epochManagerAddress = m.getParameter('epochManagerAddress')
25+
const epochManagerImplementationAddress = m.getParameter('epochManagerImplementationAddress')
2526

2627
const EpochManager = m.contractAt('EpochManager', EpochManagerArtifact, epochManagerAddress)
28+
const EpochManagerImplementation = m.contractAt(
29+
'EpochManagerAddressBook',
30+
EpochManagerArtifact,
31+
epochManagerImplementationAddress,
32+
)
2733

28-
return { EpochManager }
34+
return { EpochManager, EpochManagerImplementation }
2935
})

packages/horizon/ignition/modules/periphery/GraphToken.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,14 @@ export default buildModule('L2GraphToken', (m) => {
3939

4040
export const MigrateGraphTokenModule = buildModule('L2GraphToken', (m) => {
4141
const graphTokenAddress = m.getParameter('graphTokenAddress')
42+
const graphTokenImplementationAddress = m.getParameter('graphTokenImplementationAddress')
4243

4344
const L2GraphToken = m.contractAt('L2GraphToken', GraphTokenArtifact, graphTokenAddress)
45+
const L2GraphTokenImplementation = m.contractAt(
46+
'L2GraphTokenAddressBook',
47+
GraphTokenArtifact,
48+
graphTokenImplementationAddress,
49+
)
4450

45-
return { L2GraphToken }
51+
return { L2GraphToken, L2GraphTokenImplementation }
4652
})

packages/horizon/ignition/modules/periphery/GraphTokenGateway.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,14 @@ export default buildModule('L2GraphTokenGateway', (m) => {
2727

2828
export const MigrateGraphTokenGatewayModule = buildModule('L2GraphTokenGateway', (m) => {
2929
const graphTokenGatewayAddress = m.getParameter('graphTokenGatewayAddress')
30+
const graphTokenGatewayImplementationAddress = m.getParameter('graphTokenGatewayImplementationAddress')
3031

3132
const L2GraphTokenGateway = m.contractAt('L2GraphTokenGateway', GraphTokenGatewayArtifact, graphTokenGatewayAddress)
33+
const L2GraphTokenGatewayImplementation = m.contractAt(
34+
'L2GraphTokenGatewayAddressBook',
35+
GraphTokenGatewayArtifact,
36+
graphTokenGatewayImplementationAddress,
37+
)
3238

33-
return { L2GraphTokenGateway }
39+
return { L2GraphTokenGateway, L2GraphTokenGatewayImplementation }
3440
})

packages/horizon/ignition/modules/periphery/periphery.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,22 +73,25 @@ export const MigratePeripheryModule = buildModule('GraphHorizon_Periphery', (m)
7373
)
7474
const { Controller } = m.useModule(MigrateControllerDeployerModule)
7575
const { GraphProxyAdmin } = m.useModule(MigrateGraphProxyAdminModule)
76-
const { EpochManager } = m.useModule(MigrateEpochManagerModule)
77-
const { L2GraphToken } = m.useModule(MigrateGraphTokenModule)
78-
const { L2GraphTokenGateway } = m.useModule(MigrateGraphTokenGatewayModule)
76+
const { EpochManager, EpochManagerImplementation } = m.useModule(MigrateEpochManagerModule)
77+
const { L2GraphToken, L2GraphTokenImplementation } = m.useModule(MigrateGraphTokenModule)
78+
const { L2GraphTokenGateway, L2GraphTokenGatewayImplementation } = m.useModule(MigrateGraphTokenGatewayModule)
7979

8080
// Load these contracts so they are available in the address book
8181
return {
8282
Controller,
8383
EpochManager,
84+
EpochManagerImplementation,
8485
L2Curation,
8586
L2CurationImplementation,
8687
L2GNS,
8788
L2GNSImplementation,
8889
SubgraphNFT,
8990
GraphProxyAdmin,
9091
L2GraphToken,
92+
L2GraphTokenImplementation,
9193
L2GraphTokenGateway,
94+
L2GraphTokenGatewayImplementation,
9295
RewardsManager,
9396
RewardsManagerImplementation,
9497
}

packages/subgraph-service/ignition/configs/migrate.default.json5

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
"gnsProxyAddress": "0x3133948342F35b8699d8F94aeE064AbB76eDe965",
1313
"gnsImplementationAddress": "0x00CBF5024d454255577Bf2b0fB6A43328a6828c9",
1414
"subgraphNFTAddress": "0xF21Df5BbA7EB9b54D8F60C560aFb9bA63e6aED1A",
15+
"legacyDisputeManagerAddress": "0x7C9B82717f9433932507dF6EdA93A9678b258698",
16+
"legacyServiceRegistryAddress": "0x888541878CbDDEd880Cd58c728f1Af5C47343F86",
1517

1618
// Must be set for step 2 of the deployment
1719
"disputeManagerProxyAddress": "",

0 commit comments

Comments
 (0)