Skip to content

Commit

Permalink
Merge pull request #617 from tablelandnetwork/bcalza/optsepolia
Browse files Browse the repository at this point in the history
adds support to optimism sepolia
  • Loading branch information
brunocalza authored Mar 6, 2024
2 parents debf551 + cf48873 commit b9f2099
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docker/deployed/staging/api/.env_validator.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
VALIDATOR_ALCHEMY_OPTIMISM_GOERLI_API_KEY=
VALIDATOR_OPTIMISM_GOERLI_SIGNER_PRIVATE_KEY=
VALIDATOR_ALCHEMY_OPTIMISM_SEPOLIA_API_KEY=
METRICS_HUB_API_KEY=
19 changes: 19 additions & 0 deletions docker/deployed/staging/api/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,25 @@
"ChainStackCollectFrequency": "15m"
},
"Chains": [
{
"Name": "Optimism Sepolia",
"ChainID": 11155420,
"Registry": {
"EthEndpoint": "wss://eth-sepolia.g.alchemy.com/v2/${VALIDATOR_ALCHEMY_OPTIMISM_SEPOLIA_API_KEY}",
"ContractAddress": "0xd39a346e8299F4e3685f3D44215e0c9328e73439"
},
"EventFeed": {
"ChainAPIBackoff": "15s",
"NewBlockPollFreq": "10s",
"MinBlockDepth": 0,
"PersistEvents": false
},
"EventProcessor": {
"BlockFailedExecutionBackoff": "10s",
"DedupExecutedTxns": true
},
"HashCalculationStep": 100
},
{
"Name": "Optimism Goerli",
"ChainID": 420,
Expand Down
1 change: 1 addition & 0 deletions docker/deployed/testnet/api/.env_validator.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ VALIDATOR_GLIF_FILECOIN_CALIBRATION_API_KEY=
VALIDATOR_ALCHEMY_POLYGON_MUMBAI_API_KEY=
VALIDATOR_ALCHEMY_ARBITRUM_SEPOLIA_API_KEY=
VALIDATOR_ALCHEMY_OPTIMISM_GOERLI_API_KEY=
VALIDATOR_ALCHEMY_OPTIMISM_SEPOLIA_API_KEY=
METRICS_HUB_API_KEY=
19 changes: 19 additions & 0 deletions docker/deployed/testnet/api/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,25 @@
},
"HashCalculationStep": 1800
},
{
"Name": "Optimism Sepolia",
"ChainID": 11155420,
"Registry": {
"EthEndpoint": "wss://opt-sepolia.g.alchemy.com/v2/${VALIDATOR_ALCHEMY_OPTIMISM_SEPOLIA_API_KEY}",
"ContractAddress": "0x68A2f4423ad3bf5139Db563CF3bC80aA09ed7079"
},
"EventFeed": {
"ChainAPIBackoff": "15s",
"NewBlockPollFreq": "5s",
"MinBlockDepth": 0,
"PersistEvents": true
},
"EventProcessor": {
"BlockFailedExecutionBackoff": "10s",
"DedupExecutedTxns": true
},
"HashCalculationStep": 1800
},
{
"Name": "Filecoin Calibration",
"ChainID": 314159,
Expand Down
9 changes: 9 additions & 0 deletions pkg/client/chains.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ var ChainIDs = struct {
EthereumGoerli ChainID
EthereumSepolia ChainID
OptimismGoerli ChainID
OptimismSepolia ChainID
ArbitrumGoerli ChainID
ArbitrumSepolia ChainID
FilecoinCalibration ChainID
Expand All @@ -38,6 +39,7 @@ var ChainIDs = struct {
Filecoin: 314,
EthereumSepolia: 11155111,
OptimismGoerli: 420,
OptimismSepolia: 11155420,
ArbitrumSepolia: 421614,
FilecoinCalibration: 314159,
PolygonMumbai: 80001,
Expand Down Expand Up @@ -102,6 +104,12 @@ var Chains = map[ChainID]Chain{
Name: "Optimism Goerli",
ContractAddr: common.HexToAddress("0xC72E8a7Be04f2469f8C2dB3F1BdF69A7D516aBbA"),
},
ChainIDs.OptimismSepolia: {
Endpoint: testnetURL,
ID: ChainIDs.OptimismSepolia,
Name: "Optimism Sepolia",
ContractAddr: common.HexToAddress("0x68A2f4423ad3bf5139Db563CF3bC80aA09ed7079"),
},
ChainIDs.ArbitrumSepolia: {
Endpoint: testnetURL,
ID: ChainIDs.ArbitrumSepolia,
Expand Down Expand Up @@ -143,6 +151,7 @@ var AlchemyURLs = map[ChainID]string{
ChainIDs.EthereumSepolia: "https://eth-sepolia.g.alchemy.com/v2/%s",
ChainIDs.Ethereum: "https://eth-mainnet.g.alchemy.com/v2/%s",
ChainIDs.OptimismGoerli: "https://opt-goerli.g.alchemy.com/v2/%s",
ChainIDs.OptimismSepolia: "https://opt-sepolia.g.alchemy.com/v2/%s",
ChainIDs.Optimism: "https://opt-mainnet.g.alchemy.com/v2/%s",
ChainIDs.ArbitrumSepolia: "https://arb-sepolia.g.alchemy.com/v2/%s",
ChainIDs.Arbitrum: "https://arb-mainnet.g.alchemy.com/v2/%s",
Expand Down

0 comments on commit b9f2099

Please sign in to comment.