forked from ethereum-optimism/optimism
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnetwork.go
More file actions
33 lines (24 loc) · 753 Bytes
/
network.go
File metadata and controls
33 lines (24 loc) · 753 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package stack
import (
"github.com/ethereum/go-ethereum/params"
"github.com/ethereum-optimism/optimism/op-service/eth"
)
// Network is an interface to an ethereum chain and its resources, with common properties between L1 and L2.
// For L1 or L2 specifics, see L1Network and L2Network extensions.
// A network hosts configuration resources and tracks participating nodes.
type Network interface {
Common
ChainID() eth.ChainID
ChainConfig() *params.ChainConfig
Faucet(m FaucetMatcher) Faucet
Faucets() []Faucet
FaucetIDs() []FaucetID
SyncTester(m SyncTesterMatcher) SyncTester
SyncTesters() []SyncTester
SyncTesterIDs() []SyncTesterID
}
type ExtensibleNetwork interface {
Network
AddFaucet(f Faucet)
AddSyncTester(st SyncTester)
}