Skip to content

Commit 022154a

Browse files
committed
feat: add arbitrum localhost config and split e2e tests into l1/l2/common
Signed-off-by: Tomás Migone <[email protected]>
1 parent 944bb91 commit 022154a

File tree

5 files changed

+139
-1
lines changed

5 files changed

+139
-1
lines changed
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
general:
2+
arbitrator: &arbitrator "0xFFcf8FDEE72ac11b5c542428B35EEF5769C409f0" # Arbitration Council
3+
governor: &governor "0x22d491Bde2303f2f43325b2108D26f1eAbA1e32b" # Graph Council
4+
authority: &authority "0xE11BA2b4D45Eaed5996Cd0823791E0C93114882d" # Authority that signs payment vouchers
5+
availabilityOracle: &availabilityOracle "0xd03ea8624C8C5987235048901fB614fDcA89b117" # Subgraph Availability Oracle
6+
pauseGuardian: &pauseGuardian "0x95cED938F7991cd0dFcb48F0a06a40FA1aF46EBC" # Protocol pause guardian
7+
allocationExchangeOwner: &allocationExchangeOwner "0x3E5e9111Ae8eB78Fe1CC3bb8915d5D461F3Ef9A9" # Allocation Exchange owner
8+
9+
contracts:
10+
Controller:
11+
calls:
12+
- fn: "setContractProxy"
13+
id: "0xe6876326c1291dfcbbd3864a6816d698cd591defc7aa2153d7f9c4c04016c89f" # keccak256('Curation')
14+
contractAddress: "${{Curation.address}}"
15+
- fn: "setContractProxy"
16+
id: "0x39605a6c26a173774ca666c67ef70cf491880e5d3d6d0ca66ec0a31034f15ea3" # keccak256('GNS')
17+
contractAddress: "${{GNS.address}}"
18+
- fn: "setContractProxy"
19+
id: "0xf942813d07d17b56de9a9afc8de0ced6e8c053bbfdcc87b7badea4ddcf27c307" # keccak256('DisputeManager')
20+
contractAddress: "${{DisputeManager.address}}"
21+
- fn: "setContractProxy"
22+
id: "0xc713c3df6d14cdf946460395d09af88993ee2b948b1a808161494e32c5f67063" # keccak256('EpochManager')
23+
contractAddress: "${{EpochManager.address}}"
24+
- fn: "setContractProxy"
25+
id: "0x966f1e8d8d8014e05f6ec4a57138da9be1f7c5a7f802928a18072f7c53180761" # keccak256('RewardsManager')
26+
contractAddress: "${{RewardsManager.address}}"
27+
- fn: "setContractProxy"
28+
id: "0x1df41cd916959d1163dc8f0671a666ea8a3e434c13e40faef527133b5d167034" # keccak256('Staking')
29+
contractAddress: "${{Staking.address}}"
30+
- fn: "setContractProxy"
31+
id: "0x45fc200c7e4544e457d3c5709bfe0d520442c30bbcbdaede89e8d4a4bbc19247" # keccak256('GraphToken')
32+
contractAddress: "${{L2GraphToken.address}}"
33+
- fn: "setContractProxy"
34+
id: "0xd362cac9cb75c10d67bcc0b7eeb0b1ef48bb5420b556c092d4fd7f758816fcf0" # keccak256('GraphTokenGateway')
35+
contractAddress: "${{L2GraphTokenGateway.address}}"
36+
- fn: "setPauseGuardian"
37+
pauseGuardian: *pauseGuardian
38+
- fn: "transferOwnership"
39+
owner: *governor
40+
GraphProxyAdmin:
41+
calls:
42+
- fn: "transferOwnership"
43+
owner: *governor
44+
ServiceRegistry:
45+
proxy: true
46+
init:
47+
controller: "${{Controller.address}}"
48+
EpochManager:
49+
proxy: true
50+
init:
51+
controller: "${{Controller.address}}"
52+
lengthInBlocks: 554 # length in hours = lengthInBlocks*13/60/60 (~13 second blocks)
53+
L2GraphToken:
54+
proxy: true
55+
init:
56+
owner: *governor
57+
calls:
58+
- fn: "addMinter"
59+
minter: "${{RewardsManager.address}}"
60+
Curation:
61+
proxy: true
62+
init:
63+
controller: "${{Controller.address}}"
64+
bondingCurve: "${{BancorFormula.address}}"
65+
curationTokenMaster: "${{GraphCurationToken.address}}"
66+
reserveRatio: 500000 # in parts per million
67+
curationTaxPercentage: 10000 # in parts per million
68+
minimumCurationDeposit: "1000000000000000000" # in wei
69+
DisputeManager:
70+
proxy: true
71+
init:
72+
controller: "${{Controller.address}}"
73+
arbitrator: *arbitrator
74+
minimumDeposit: "10000000000000000000000" # in wei
75+
fishermanRewardPercentage: 500000 # in parts per million
76+
idxSlashingPercentage: 25000 # in parts per million
77+
qrySlashingPercentage: 25000 # in parts per million
78+
GNS:
79+
proxy: true
80+
init:
81+
controller: "${{Controller.address}}"
82+
bondingCurve: "${{BancorFormula.address}}"
83+
subgraphNFT: "${{SubgraphNFT.address}}"
84+
calls:
85+
- fn: "approveAll"
86+
SubgraphNFT:
87+
init:
88+
governor: "${{Env.deployer}}"
89+
calls:
90+
- fn: "setTokenDescriptor"
91+
tokenDescriptor: "${{SubgraphNFTDescriptor.address}}"
92+
- fn: "setMinter"
93+
minter: "${{GNS.address}}"
94+
- fn: "transferOwnership"
95+
owner: *governor
96+
Staking:
97+
proxy: true
98+
init:
99+
controller: "${{Controller.address}}"
100+
minimumIndexerStake: "100000000000000000000000" # in wei
101+
thawingPeriod: 6646 # in blocks
102+
protocolPercentage: 10000 # in parts per million
103+
curationPercentage: 100000 # in parts per million
104+
channelDisputeEpochs: 2 # in epochs
105+
maxAllocationEpochs: 4 # in epochs
106+
delegationUnbondingPeriod: 12 # in epochs
107+
delegationRatio: 16 # delegated stake to indexer stake multiplier
108+
rebateAlphaNumerator: 77 # rebateAlphaNumerator / rebateAlphaDenominator
109+
rebateAlphaDenominator: 100 # rebateAlphaNumerator / rebateAlphaDenominator
110+
calls:
111+
- fn: "setDelegationTaxPercentage"
112+
delegationTaxPercentage: 5000 # parts per million
113+
- fn: "setSlasher"
114+
slasher: "${{DisputeManager.address}}"
115+
allowed: true
116+
- fn: "setAssetHolder"
117+
assetHolder: "${{AllocationExchange.address}}"
118+
allowed: true
119+
RewardsManager:
120+
proxy: true
121+
init:
122+
controller: "${{Controller.address}}"
123+
calls:
124+
- fn: "setSubgraphAvailabilityOracle"
125+
subgraphAvailabilityOracle: *availabilityOracle
126+
AllocationExchange:
127+
init:
128+
graphToken: "${{GraphToken.address}}"
129+
staking: "${{Staking.address}}"
130+
governor: *allocationExchangeOwner
131+
authority: *authority
132+
calls:
133+
- fn: "approveAll"
134+
L2GraphTokenGateway:
135+
proxy: true
136+
init:
137+
controller: "${{Controller.address}}"

e2e/deployment/init/graphToken.test.ts renamed to e2e/deployment/init/l1/graphToken.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { expect } from 'chai'
22
import hre from 'hardhat'
3-
import { getItemValue } from '../../../cli/config'
3+
import { getItemValue } from '../../../../cli/config'
44

55
describe('GraphToken initialization', () => {
66
const {

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@
8989
"deploy-localhost": "yarn deploy --force --network localhost --graph-config config/graph.localhost.yml",
9090
"deploy-rinkeby": "yarn deploy --force --network rinkeby --graph-config config/graph.rinkeby.yml",
9191
"deploy-goerli": "yarn deploy --force --network goerli --graph-config config/graph.goerli.yml",
92+
"deploy-arbitrum-goerli": "yarn deploy --force --network arbitrum-goerli --graph-config config/graph.arbitrum-goerli.yml",
9293
"predeploy": "scripts/predeploy",
9394
"test": "scripts/test",
9495
"test:e2e": "scripts/e2e",

0 commit comments

Comments
 (0)