Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

common: add support for new Sepolia chain #1581

Merged
merged 10 commits into from
Jan 3, 2022
1 change: 1 addition & 0 deletions packages/common/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ Supported chains:
- `rinkeby` (`Chain.Rinkeby`)
- `kovan` (`Chain.Kovan`)
- `goerli` (`Chain.Goerli`)
- `sepolia` (`Chain.Sepolia`)
- Private/custom chain parameters

The following chain-specific parameters are provided:
Expand Down
3 changes: 3 additions & 0 deletions packages/common/src/chains/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import ropsten from './ropsten.json'
import rinkeby from './rinkeby.json'
import kovan from './kovan.json'
import goerli from './goerli.json'
import sepolia from './sepolia.json'

/**
* @hidden
Expand All @@ -15,13 +16,15 @@ export function _getInitializedChains(customChains?: Chain[]) {
'4': 'rinkeby',
'42': 'kovan',
'5': 'goerli',
'11155111': 'sepolia',
}
const chains: any = {
mainnet,
ropsten,
rinkeby,
kovan,
goerli,
sepolia,
}
if (customChains) {
for (const chain of customChains) {
Expand Down
111 changes: 111 additions & 0 deletions packages/common/src/chains/sepolia.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
{
"name": "sepolia",
"chainId": 11155111,
"networkId": 11155111,
"defaultHardfork": "istanbul",
"consensus": {
"type": "pow",
"algorithm": "ethash",
"ethash": {}
},
"comment": "PoW test network",
holgerd77 marked this conversation as resolved.
Show resolved Hide resolved
"url": "https://github.com/ethereum/ropsten",
holgerd77 marked this conversation as resolved.
Show resolved Hide resolved
"genesis": {
"hash": "0x25a5cc106eea7138acab33231d7160d69cb777ee0c2c553fcddf5138993e6dd9",
"timestamp": "0x6159af19",
"gasLimit": 30000000,
"difficulty": 131072,
"nonce": "0x000000000000000",
ryanio marked this conversation as resolved.
Show resolved Hide resolved
"extraData": "0x5365706f6c69612c20417468656e732c204174746963612c2047726565636521",
"stateRoot": "0x5eb6e371a698b8d68f665192350ffcecbbbf322916f4b51bd79bb6887da3f494"
ryanio marked this conversation as resolved.
Show resolved Hide resolved
},
"hardforks": [
{
"name": "chainstart",
"block": 0,
"forkHash": "0x30c7ddbc"
},
{
"name": "homestead",
"block": 0,
"forkHash": "0x30c7ddbc"
},
{
"name": "tangerineWhistle",
"block": 0,
"forkHash": "0x30c7ddbc"
},
{
"name": "spuriousDragon",
"block": 0,
"forkHash": "0x30c7ddbc"
},
ryanio marked this conversation as resolved.
Show resolved Hide resolved
{
"name": "byzantium",
"block": 0,
"forkHash": "0x30c7ddbc"
},
{
"name": "constantinople",
"block": 0,
"forkHash": "0x30c7ddbc"
},
{
"name": "petersburg",
"block": 0,
"forkHash": "0x30c7ddbc"
},
{
"name": "istanbul",
"block": 0,
"forkHash": "0x30c7ddbc"
},
{
"name": "muirGlacier",
"block": 0,
"forkHash": "0x30c7ddbc"
},
{
"name": "berlin",
"block": 0,
"forkHash": "0x30c7ddbc"
},
{
"name": "london",
"block": 0,
"forkHash": "0x30c7ddbc"
},
{
"name": "arrowGlacier",
"block": 0,
"forkHash": "0x30c7ddbc"
ryanio marked this conversation as resolved.
Show resolved Hide resolved
},
{
"name": "merge",
"block": null,
"forkHash": null
},
{
"name": "shanghai",
"block": null,
"forkHash": null
}
],
"bootstrapNodes": [
{
"ip": "18.168.182.86",
"port": 30303,
"id": "9246d00bc8fd1742e5ad2428b80fc4dc45d786283e05ef6edbd9002cbc335d40998444732fbe921cb88e1d2c73d1b1de53bae6a2237996e9bfe14f871baf7066",
"location": "",
"comment": "geth"
},
{
"ip": "52.14.151.177",
"port": 30303,
"id": "ec66ddcf1a974950bd4c782789a7e04f8aa7110a72569b6e65fcd51e937e74eed303b1ea734e4d19cfaec9fbff9b6ee65bf31dcb50ba79acce9dd63a6aca61c7",
"location": "",
"comment": "besu"
}
],
"dnsNetworks": []
}
2 changes: 2 additions & 0 deletions packages/common/src/genesisStates/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ const genesisStates: genesisStatesType = {
'4': 'rinkeby',
'42': 'kovan',
'5': 'goerli',
'11155111': 'sepolia',
},
mainnet: require('./mainnet.json'),
ropsten: require('./ropsten.json'),
rinkeby: require('./rinkeby.json'),
kovan: require('./kovan.json'),
goerli: require('./goerli.json'),
sepolia: require('./sepolia.json'),
}

/**
Expand Down
17 changes: 17 additions & 0 deletions packages/common/src/genesisStates/sepolia.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"0xa2A6d93439144FFE4D27c9E088dCD8b783946263": "0xD3C21BCECCEDA1000000",
"0xBc11295936Aa79d594139de1B2e12629414F3BDB": "0xD3C21BCECCEDA1000000",
"0x7cF5b79bfe291A67AB02b393E456cCc4c266F753": "0xD3C21BCECCEDA1000000",
"0xaaec86394441f915bce3e6ab399977e9906f3b69": "0xD3C21BCECCEDA1000000",
"0xF47CaE1CF79ca6758Bfc787dbD21E6bdBe7112B8": "0xD3C21BCECCEDA1000000",
"0xd7eDDB78ED295B3C9629240E8924fb8D8874ddD8": "0xD3C21BCECCEDA1000000",
"0x8b7F0977Bb4f0fBE7076FA22bC24acA043583F5e": "0xD3C21BCECCEDA1000000",
"0xe2e2659028143784d557bcec6ff3a0721048880a": "0xD3C21BCECCEDA1000000",
"0xd9a5179f091d85051d3c982785efd1455cec8699": "0xD3C21BCECCEDA1000000",
"0xbeef32ca5b9a198d27B4e02F4c70439fE60356Cf": "0xD3C21BCECCEDA1000000",
"0x0000006916a87b82333f4245046623b23794c65c": "0x84595161401484A000000",
"0xb21c33de1fab3fa15499c62b59fe0cc3250020d1": "0x52B7D2DCC80CD2E4000000",
"0x10F5d45854e038071485AC9e402308cF80D2d2fE": "0x52B7D2DCC80CD2E4000000",
"0xd7d76c58b3a519e9fA6Cc4D22dC017259BC49F1E": "0x52B7D2DCC80CD2E4000000",
"0x799D329e5f583419167cD722962485926E338F4a": "0xDE0B6B3A7640000"
}
1 change: 1 addition & 0 deletions packages/common/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export enum Chain {
Rinkeby = 4,
Kovan = 42,
Goerli = 5,
Sepolia = 11155111,
}

export enum Hardfork {
Expand Down