Skip to content

Commit

Permalink
Merge pull request #867 from graphprotocol/mde/sepolia-testnet
Browse files Browse the repository at this point in the history
feat: sepolia testnet
  • Loading branch information
Maikol authored Nov 3, 2023
2 parents cfff549 + 4a1896b commit af72b59
Show file tree
Hide file tree
Showing 9 changed files with 1,204 additions and 30 deletions.
427 changes: 427 additions & 0 deletions addresses.json

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions arbitrum-addresses.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,18 @@
"L2GatewayRouter": {
"address": "0xE5B9d8d42d656d1DcB8065A6c012FE3780246041"
}
},
"421614": {
"L2GatewayRouter": {
"address": "0x9fDD1C4E4AA24EEc1d913FABea925594a20d43C7"
}
},
"11155111": {
"L1GatewayRouter": {
"address": "0xcE18836b233C83325Cc8848CA4487e94C6288264"
},
"IInbox": {
"address": "0xaAe29B0366299461418F5324a79Afc425BE5ae21"
}
}
}
1 change: 1 addition & 0 deletions cli/cross-chain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export const l1ToL2ChainIdMap = {
'4': '421611',
'5': '421613',
'1337': '412346',
'11155111': '421614',
}

export const l2ChainIds = Object.values(l1ToL2ChainIdMap).map(Number)
Expand Down
154 changes: 154 additions & 0 deletions config/graph.arbitrum-sepolia.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
general:
arbitrator: &arbitrator "0x1726A5d52e279d02ff4732eCeB2D67BFE5Add328" # EOA (TODO: update to a multisig)
governor: &governor "0x72ee30d43Fb5A90B3FE983156C5d2fBE6F6d07B3" # EOA (TODO: update to a multisig)
authority: &authority "0x49D4CFC037430cA9355B422bAeA7E9391e1d3215" # Authority that signs payment vouchers
availabilityOracle: &availabilityOracle "0x5e4e823Ed094c035133eEC5Ec0d08ae1Af04e9Fa" # Subgraph Availability Oracle
pauseGuardian: &pauseGuardian "0xa0444508232dA3FA6C2f96a5f105f3f0cc0d20D7" # Protocol pause guardian
allocationExchangeOwner: &allocationExchangeOwner "0x72ee30d43Fb5A90B3FE983156C5d2fBE6F6d07B3" # Allocation Exchange owner

contracts:
Controller:
calls:
- fn: "setContractProxy"
id: "0xe6876326c1291dfcbbd3864a6816d698cd591defc7aa2153d7f9c4c04016c89f" # keccak256('Curation')
contractAddress: "${{L2Curation.address}}"
- fn: "setContractProxy"
id: "0x39605a6c26a173774ca666c67ef70cf491880e5d3d6d0ca66ec0a31034f15ea3" # keccak256('GNS')
contractAddress: "${{L2GNS.address}}"
- fn: "setContractProxy"
id: "0xf942813d07d17b56de9a9afc8de0ced6e8c053bbfdcc87b7badea4ddcf27c307" # keccak256('DisputeManager')
contractAddress: "${{DisputeManager.address}}"
- fn: "setContractProxy"
id: "0xc713c3df6d14cdf946460395d09af88993ee2b948b1a808161494e32c5f67063" # keccak256('EpochManager')
contractAddress: "${{EpochManager.address}}"
- fn: "setContractProxy"
id: "0x966f1e8d8d8014e05f6ec4a57138da9be1f7c5a7f802928a18072f7c53180761" # keccak256('RewardsManager')
contractAddress: "${{RewardsManager.address}}"
- fn: "setContractProxy"
id: "0x1df41cd916959d1163dc8f0671a666ea8a3e434c13e40faef527133b5d167034" # keccak256('Staking')
contractAddress: "${{L2Staking.address}}"
- fn: "setContractProxy"
id: "0x45fc200c7e4544e457d3c5709bfe0d520442c30bbcbdaede89e8d4a4bbc19247" # keccak256('GraphToken')
contractAddress: "${{L2GraphToken.address}}"
- fn: "setContractProxy"
id: "0xd362cac9cb75c10d67bcc0b7eeb0b1ef48bb5420b556c092d4fd7f758816fcf0" # keccak256('GraphTokenGateway')
contractAddress: "${{L2GraphTokenGateway.address}}"
- fn: "setPauseGuardian"
pauseGuardian: *pauseGuardian
- fn: "transferOwnership"
owner: *governor
GraphProxyAdmin:
calls:
- fn: "transferOwnership"
owner: *governor
ServiceRegistry:
proxy: true
init:
controller: "${{Controller.address}}"
calls:
- fn: "syncAllContracts"
EpochManager:
proxy: true
init:
controller: "${{Controller.address}}"
lengthInBlocks: 554 # length in hours = lengthInBlocks*13/60/60 (~13 second blocks)
L2GraphToken:
proxy: true
init:
owner: "${{Env.deployer}}"
calls:
- fn: "addMinter"
minter: "${{RewardsManager.address}}"
- fn: "transferOwnership"
owner: *governor
L2Curation:
proxy: true
init:
controller: "${{Controller.address}}"
curationTokenMaster: "${{GraphCurationToken.address}}"
curationTaxPercentage: 10000 # in parts per million
minimumCurationDeposit: "1" # in wei
calls:
- fn: "syncAllContracts"
DisputeManager:
proxy: true
init:
controller: "${{Controller.address}}"
arbitrator: *arbitrator
minimumDeposit: "10000000000000000000000" # in wei
fishermanRewardPercentage: 500000 # in parts per million
idxSlashingPercentage: 25000 # in parts per million
qrySlashingPercentage: 25000 # in parts per million
calls:
- fn: "syncAllContracts"
L2GNS:
proxy: true
init:
controller: "${{Controller.address}}"
subgraphNFT: "${{SubgraphNFT.address}}"
calls:
- fn: "approveAll"
- fn: "syncAllContracts"
SubgraphNFT:
init:
governor: "${{Env.deployer}}"
calls:
- fn: "setTokenDescriptor"
tokenDescriptor: "${{SubgraphNFTDescriptor.address}}"
- fn: "setMinter"
minter: "${{L2GNS.address}}"
- fn: "transferOwnership"
owner: *governor
L2Staking:
proxy: true
init:
controller: "${{Controller.address}}"
minimumIndexerStake: "100000000000000000000000" # in wei
thawingPeriod: 6646 # in blocks
protocolPercentage: 10000 # in parts per million
curationPercentage: 100000 # in parts per million
maxAllocationEpochs: 8 # in epochs
delegationUnbondingPeriod: 12 # in epochs
delegationRatio: 16 # delegated stake to indexer stake multiplier
rebateParameters:
alphaNumerator: 100 # alphaNumerator / alphaDenominator
alphaDenominator: 100 # alphaNumerator / alphaDenominator
lambdaNumerator: 60 # lambdaNumerator / lambdaDenominator
lambdaDenominator: 100 # lambdaNumerator / lambdaDenominator
extensionImpl: "${{StakingExtension.address}}"
calls:
- fn: "setDelegationTaxPercentage"
delegationTaxPercentage: 5000 # parts per million
- fn: "setSlasher"
slasher: "${{DisputeManager.address}}"
allowed: true
- fn: "setAssetHolder"
assetHolder: "${{AllocationExchange.address}}"
allowed: true
- fn: "syncAllContracts"
RewardsManager:
proxy: true
init:
controller: "${{Controller.address}}"
calls:
- fn: "setIssuancePerBlock"
issuancePerBlock: "6036500000000000000" # per block increase of total supply, blocks in a year = 365*60*60*24/12
- fn: "setSubgraphAvailabilityOracle"
subgraphAvailabilityOracle: *availabilityOracle
- fn: "syncAllContracts"
AllocationExchange:
init:
graphToken: "${{L2GraphToken.address}}"
staking: "${{L2Staking.address}}"
governor: *allocationExchangeOwner
authority: *authority
calls:
- fn: "approveAll"
L2GraphTokenGateway:
proxy: true
init:
controller: "${{Controller.address}}"
calls:
- fn: "syncAllContracts"
- fn: "setPauseGuardian"
pauseGuardian: *pauseGuardian
164 changes: 164 additions & 0 deletions config/graph.sepolia.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
general:
arbitrator: &arbitrator "0xd6ff9e98F0Fd99ccB658832F586e23F4D8Cb8Bad" # Arbitration Council
governor: &governor "0x4EBf30832eC2db76aE228D5d239083B59f530d1f" # Graph Council
authority: &authority "0x840daec5dF962D49cf2EFd789c4E40A7b7e0117D" # Authority that signs payment vouchers
availabilityOracle: &availabilityOracle "0x840daec5dF962D49cf2EFd789c4E40A7b7e0117D" # Subgraph Availability Oracle
pauseGuardian: &pauseGuardian "0x382688E15Cc894D04cf3313b26a4F2c93C8fDe06" # Protocol pause guardian
allocationExchangeOwner: &allocationExchangeOwner "0x4EBf30832eC2db76aE228D5d239083B59f530d1f" # Allocation Exchange owner

contracts:
Controller:
calls:
- fn: "setContractProxy"
id: "0xe6876326c1291dfcbbd3864a6816d698cd591defc7aa2153d7f9c4c04016c89f" # keccak256('Curation')
contractAddress: "${{Curation.address}}"
- fn: "setContractProxy"
id: "0x39605a6c26a173774ca666c67ef70cf491880e5d3d6d0ca66ec0a31034f15ea3" # keccak256('GNS')
contractAddress: "${{L1GNS.address}}"
- fn: "setContractProxy"
id: "0xf942813d07d17b56de9a9afc8de0ced6e8c053bbfdcc87b7badea4ddcf27c307" # keccak256('DisputeManager')
contractAddress: "${{DisputeManager.address}}"
- fn: "setContractProxy"
id: "0xc713c3df6d14cdf946460395d09af88993ee2b948b1a808161494e32c5f67063" # keccak256('EpochManager')
contractAddress: "${{EpochManager.address}}"
- fn: "setContractProxy"
id: "0x966f1e8d8d8014e05f6ec4a57138da9be1f7c5a7f802928a18072f7c53180761" # keccak256('RewardsManager')
contractAddress: "${{RewardsManager.address}}"
- fn: "setContractProxy"
id: "0x1df41cd916959d1163dc8f0671a666ea8a3e434c13e40faef527133b5d167034" # keccak256('Staking')
contractAddress: "${{L1Staking.address}}"
- fn: "setContractProxy"
id: "0x45fc200c7e4544e457d3c5709bfe0d520442c30bbcbdaede89e8d4a4bbc19247" # keccak256('GraphToken')
contractAddress: "${{GraphToken.address}}"
- fn: "setContractProxy"
id: "0xd362cac9cb75c10d67bcc0b7eeb0b1ef48bb5420b556c092d4fd7f758816fcf0" # keccak256('GraphTokenGateway')
contractAddress: "${{L1GraphTokenGateway.address}}"
- fn: "setPauseGuardian"
pauseGuardian: *pauseGuardian
- fn: "transferOwnership"
owner: *governor
GraphProxyAdmin:
calls:
- fn: "transferOwnership"
owner: *governor
ServiceRegistry:
proxy: true
init:
controller: "${{Controller.address}}"
calls:
- fn: "syncAllContracts"
EpochManager:
proxy: true
init:
controller: "${{Controller.address}}"
lengthInBlocks: 554 # length in hours = lengthInBlocks*13/60/60 (~13 second blocks)
GraphToken:
init:
initialSupply: "10000000000000000000000000000" # in wei
calls:
- fn: "addMinter"
minter: "${{RewardsManager.address}}"
- fn: "addMinter"
minter: "${{L1GraphTokenGateway.address}}"
- fn: "renounceMinter"
- fn: "transferOwnership"
owner: *governor
Curation:
proxy: true
init:
controller: "${{Controller.address}}"
bondingCurve: "${{BancorFormula.address}}"
curationTokenMaster: "${{GraphCurationToken.address}}"
reserveRatio: 500000 # in parts per million
curationTaxPercentage: 10000 # in parts per million
minimumCurationDeposit: "1000000000000000000" # in wei
calls:
- fn: "syncAllContracts"
DisputeManager:
proxy: true
init:
controller: "${{Controller.address}}"
arbitrator: *arbitrator
minimumDeposit: "10000000000000000000000" # in wei
fishermanRewardPercentage: 500000 # in parts per million
idxSlashingPercentage: 25000 # in parts per million
qrySlashingPercentage: 25000 # in parts per million
calls:
- fn: "syncAllContracts"
L1GNS:
proxy: true
init:
controller: "${{Controller.address}}"
subgraphNFT: "${{SubgraphNFT.address}}"
calls:
- fn: "approveAll"
- fn: "syncAllContracts"
SubgraphNFT:
init:
governor: "${{Env.deployer}}"
calls:
- fn: "setTokenDescriptor"
tokenDescriptor: "${{SubgraphNFTDescriptor.address}}"
- fn: "setMinter"
minter: "${{L1GNS.address}}"
- fn: "transferOwnership"
owner: *governor
L1Staking:
proxy: true
init:
controller: "${{Controller.address}}"
minimumIndexerStake: "100000000000000000000000" # in wei
thawingPeriod: 6646 # in blocks
protocolPercentage: 10000 # in parts per million
curationPercentage: 100000 # in parts per million
maxAllocationEpochs: 4 # in epochs
delegationUnbondingPeriod: 12 # in epochs
delegationRatio: 16 # delegated stake to indexer stake multiplier
rebateParameters:
alphaNumerator: 100 # alphaNumerator / alphaDenominator
alphaDenominator: 100 # alphaNumerator / alphaDenominator
lambdaNumerator: 60 # lambdaNumerator / lambdaDenominator
lambdaDenominator: 100 # lambdaNumerator / lambdaDenominator
extensionImpl: "${{StakingExtension.address}}"
calls:
- fn: "setDelegationTaxPercentage"
delegationTaxPercentage: 5000 # parts per million
- fn: "setSlasher"
slasher: "${{DisputeManager.address}}"
allowed: true
- fn: "setAssetHolder"
assetHolder: "${{AllocationExchange.address}}"
allowed: true
- fn: "syncAllContracts"
RewardsManager:
proxy: true
init:
controller: "${{Controller.address}}"
calls:
- fn: "setIssuancePerBlock"
issuancePerBlock: "114693500000000000000" # per block increase of total supply, blocks in a year = 365*60*60*24/12
- fn: "setSubgraphAvailabilityOracle"
subgraphAvailabilityOracle: *availabilityOracle
- fn: "syncAllContracts"
AllocationExchange:
init:
graphToken: "${{GraphToken.address}}"
staking: "${{L1Staking.address}}"
governor: *allocationExchangeOwner
authority: *authority
calls:
- fn: "approveAll"
L1GraphTokenGateway:
proxy: true
init:
controller: "${{Controller.address}}"
calls:
- fn: "syncAllContracts"
- fn: "setPauseGuardian"
pauseGuardian: *pauseGuardian
BridgeEscrow:
proxy: true
init:
controller: "${{Controller.address}}"
calls:
- fn: "syncAllContracts"
2 changes: 2 additions & 0 deletions gre/helpers/chain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const chainMap = new MapWithGetKey<number>([
[1, 42161], // Ethereum Mainnet - Arbitrum One
[4, 421611], // Ethereum Rinkeby - Arbitrum Rinkeby
[5, 421613], // Ethereum Goerli - Arbitrum Goerli
[11155111, 421614], // Ethereum Sepolia - Arbitrum Sepolia
[1337, 412346], // Localhost - Arbitrum Localhost
])

Expand All @@ -21,6 +22,7 @@ const nameMap = new MapWithGetKey<string>([
['mainnet', 'arbitrum-one'], // Ethereum Mainnet - Arbitrum One
['rinkeby', 'arbitrum-rinkeby'], // Ethereum Rinkeby - Arbitrum Rinkeby
['goerli', 'arbitrum-goerli'], // Ethereum Goerli - Arbitrum Goerli
['sepolia', 'arbitrum-sepolia'], // Ethereum Sepolia - Arbitrum Sepolia
['localnitrol1', 'localnitrol2'], // Arbitrum testnode L1 - Arbitrum testnode L2
])

Expand Down
Loading

0 comments on commit af72b59

Please sign in to comment.