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

Add SepoliaTestnet as an environment for network tests #1574

Merged
merged 1 commit into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading