Skip to content

Commit

Permalink
Add SepoliaTestnet as an environment for network tests
Browse files Browse the repository at this point in the history
  • Loading branch information
BedrockSquirrel committed Oct 3, 2023
1 parent 8ed7e45 commit a32ccab
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
18 changes: 14 additions & 4 deletions integration/networktest/env/network_setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,20 @@ import (
"github.com/obscuronet/go-obscuro/integration/networktest"
)

func SepoliaTestnet() networktest.Environment {
connector := NewTestnetConnector(
"http://erpc.sepolia-testnet.obscu.ro:80", // this is actually a validator...
[]string{"http://erpc.sepolia-testnet.obscu.ro:80"},
"http://sepolia-testnet-faucet.uksouth.azurecontainer.io/fund/eth",
"https://rpc.sepolia.org/",
)
return &testnetEnv{connector}
}

func Testnet() networktest.Environment {
connector := NewTestnetConnector(
"http://erpc.testnet.obscu.ro:80",
[]string{"http://erpc.testnet.obscu.ro:80"}, // for now we'll just use sequencer as validator node... todo (@matt)
"http://erpc.testnet.obscu.ro:80", // this is actually a validator...
[]string{"http://erpc.testnet.obscu.ro:80"},
"http://testnet-faucet.uksouth.azurecontainer.io/fund/eth",
"ws://testnet-eth2network.uksouth.cloudapp.azure.com:9000",
)
Expand All @@ -17,8 +27,8 @@ func Testnet() networktest.Environment {

func DevTestnet() networktest.Environment {
connector := NewTestnetConnector(
"http://erpc.dev-testnet.obscu.ro:80",
[]string{"http://erpc.dev-testnet.obscu.ro:80"}, // for now we'll just use sequencer as validator node... todo (@matt)
"http://erpc.dev-testnet.obscu.ro:80", // this is actually a validator...
[]string{"http://erpc.dev-testnet.obscu.ro:80"},
"http://dev-testnet-faucet.uksouth.azurecontainer.io/fund/eth",
"ws://dev-testnet-eth2network.uksouth.cloudapp.azure.com:9000",
)
Expand Down
8 changes: 4 additions & 4 deletions integration/networktest/env/testnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type testnetConnector struct {
seqRPCAddress string
validatorRPCAddresses []string
faucetHTTPAddress string
l1WSURL string
l1RPCURL string
faucetWallet *userwallet.UserWallet
}

Expand All @@ -37,7 +37,7 @@ func NewTestnetConnector(seqRPCAddr string, validatorRPCAddressses []string, fau
seqRPCAddress: seqRPCAddr,
validatorRPCAddresses: validatorRPCAddressses,
faucetHTTPAddress: faucetHTTPAddress,
l1WSURL: l1WSURL,
l1RPCURL: l1WSURL,
}
}

Expand All @@ -50,7 +50,7 @@ func NewTestnetConnectorWithFaucetAccount(seqRPCAddr string, validatorRPCAddress
seqRPCAddress: seqRPCAddr,
validatorRPCAddresses: validatorRPCAddressses,
faucetWallet: userwallet.NewUserWallet(ecdsaKey, validatorRPCAddressses[0], testlog.Logger(), userwallet.WithChainID(big.NewInt(integration.ObscuroChainID))),
l1WSURL: l1RPCAddress,
l1RPCURL: l1RPCAddress,
}
}

Expand Down Expand Up @@ -94,7 +94,7 @@ func (t *testnetConnector) NumValidators() int {
}

func (t *testnetConnector) GetL1Client() (ethadapter.EthClient, error) {
client, err := ethadapter.NewEthClientFromURL(t.l1WSURL, time.Minute, gethcommon.Address{}, testlog.Logger())
client, err := ethadapter.NewEthClientFromURL(t.l1RPCURL, time.Minute, gethcommon.Address{}, testlog.Logger())
if err != nil {
return nil, err
}
Expand Down

0 comments on commit a32ccab

Please sign in to comment.