github.com/lmittmann/w3@v0.20.0/module/eth/block_number.go (about)

     1  package eth
     2  
     3  import (
     4  	"math/big"
     5  
     6  	"github.com/lmittmann/w3/internal/module"
     7  	"github.com/lmittmann/w3/w3types"
     8  )
     9  
    10  // BlockNumber requests the number of the most recent block.
    11  func BlockNumber() w3types.RPCCallerFactory[*big.Int] {
    12  	return module.NewFactory(
    13  		"eth_blockNumber",
    14  		nil,
    15  		module.WithRetWrapper(module.HexBigRetWrapper),
    16  	)
    17  }