Documentation ¶
Index ¶
- Constants
- func Abs(x int64) int64
- func BigFloatToHumanNumberString(f *big.Float, decimals int) string
- func BigIntToHumanNumberString(i *big.Int, decimals int) string
- func ColorPrintf(color string, format string, a ...interface{})
- func DateToTime(dayString string, hour int, min int, sec int) (time.Time, error)
- func EstimateTargetBlocknumber(utcTimestamp int64) int64
- func GetFirstBlockHeaderAtOrAfterTime(client *ethclient.Client, targetTime time.Time) (header *types.Header, err error)
- func GetTxSender(tx *types.Transaction) (from common.Address, err error)
- func IsBigIntZero(n *big.Int) bool
- func NumberToHumanReadableString(value interface{}, decimals int) string
- func Perror(err error)
- func PrintBlock(block *types.Block)
Constants ¶
View Source
const ( InfoColor = "\033[1;34m%s\033[0m" NoticeColor = "\033[1;36m%s\033[0m" WarningColor = "\033[1;33m%s\033[0m" ErrorColor = "\033[1;31m%s\033[0m" DebugColor = "\033[0;36m%s\033[0m" )
Variables ¶
This section is empty.
Functions ¶
func ColorPrintf ¶
func EstimateTargetBlocknumber ¶
Roughly estimate a block number by target timestamp (might be off by a lot)
func GetFirstBlockHeaderAtOrAfterTime ¶
func GetFirstBlockHeaderAtOrAfterTime(client *ethclient.Client, targetTime time.Time) (header *types.Header, err error)
GetBlockHeaderAtTimestamp returns the header of the first block at or after the timestamp. If timestamp is after latest block, then return latest block.
func GetTxSender ¶
func GetTxSender(tx *types.Transaction) (from common.Address, err error)
func IsBigIntZero ¶
func PrintBlock ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.