@@ -23,9 +23,11 @@ import { L1GraphTokenGateway } from '@graphprotocol/contracts/dist/types/L1Graph
23
23
import { BridgeEscrow } from '@graphprotocol/contracts/dist/types/BridgeEscrow'
24
24
import { L2GraphToken } from '@graphprotocol/contracts/dist/types/L2GraphToken'
25
25
import { L2GraphTokenGateway } from '@graphprotocol/contracts/dist/types/L2GraphTokenGateway'
26
+ import { L2Curation } from '@graphprotocol/contracts/dist/types/L2Curation'
26
27
27
28
// Contract factories
28
29
import { Curation__factory } from '@graphprotocol/contracts/dist/types/factories/Curation__factory'
30
+ import { L2Curation__factory } from '@graphprotocol/contracts/dist/types/factories/L2Curation__factory'
29
31
import { DisputeManager__factory } from '@graphprotocol/contracts/dist/types/factories/DisputeManager__factory'
30
32
import { EpochManager__factory } from '@graphprotocol/contracts/dist/types/factories/EpochManager__factory'
31
33
import { GNS__factory } from '@graphprotocol/contracts/dist/types/factories/GNS__factory'
@@ -47,7 +49,7 @@ import { L2GraphTokenGateway__factory } from '@graphprotocol/contracts/dist/type
47
49
export const GraphChain = graphChain
48
50
49
51
export interface NetworkContracts {
50
- curation : Curation
52
+ curation : Curation | L2Curation
51
53
disputeManager : DisputeManager
52
54
epochManager : EpochManager
53
55
gns : GNS
@@ -110,8 +112,11 @@ export const connectContracts = async (
110
112
? GNS__factory . connect ( getContractAddress ( 'L1GNS' ) , providerOrSigner )
111
113
: GNS__factory . connect ( getContractAddress ( 'L2GNS' ) , providerOrSigner )
112
114
115
+ const curation = GraphChain . isL1 ( chainId )
116
+ ? Curation__factory . connect ( getContractAddress ( 'Curation' ) , providerOrSigner )
117
+ : L2Curation__factory . connect ( getContractAddress ( 'L2Curation' ) , providerOrSigner )
118
+
113
119
const contracts : NetworkContracts = {
114
- curation : Curation__factory . connect ( getContractAddress ( 'Curation' ) , providerOrSigner ) ,
115
120
disputeManager : DisputeManager__factory . connect (
116
121
getContractAddress ( 'DisputeManager' ) ,
117
122
providerOrSigner ,
@@ -121,6 +126,7 @@ export const connectContracts = async (
121
126
providerOrSigner ,
122
127
) ,
123
128
gns,
129
+ curation,
124
130
rewardsManager : RewardsManager__factory . connect (
125
131
getContractAddress ( 'RewardsManager' ) ,
126
132
providerOrSigner ,
0 commit comments