github.com/lmittmann/w3@v0.20.0/module/eth/chain_id.go (about) 1 package eth 2 3 import ( 4 "github.com/lmittmann/w3/internal/module" 5 "github.com/lmittmann/w3/w3types" 6 ) 7 8 // ChainID requests the chains ID. 9 func ChainID() w3types.RPCCallerFactory[uint64] { 10 return module.NewFactory( 11 "eth_chainId", 12 nil, 13 module.WithRetWrapper(module.HexUint64RetWrapper), 14 ) 15 }