github.com/Cleverse/go-ethereum@v0.0.0-20220927095127-45113064e7f2/arbitrum/net.go (about) 1 package arbitrum 2 3 import ( 4 "fmt" 5 ) 6 7 // PublicNetAPI offers network related RPC methods 8 type PublicNetAPI struct { 9 networkVersion uint64 10 } 11 12 // NewPublicNetAPI creates a new net API instance. 13 func NewPublicNetAPI(networkVersion uint64) *PublicNetAPI { 14 return &PublicNetAPI{networkVersion} 15 } 16 17 // Version returns the current ethereum protocol version. 18 func (s *PublicNetAPI) Version() string { 19 return fmt.Sprintf("%d", s.networkVersion) 20 }