bigint

package
v0.0.0-...-48d27f4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 1, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Zero = big.NewInt(0)
	One  = big.NewInt(1)
)

Functions

func Clamp

func Clamp(start, end *big.Int, size uint64) *big.Int

Clamp 对一个区间 [start, end] 内的值进行“约束”,它根据指定的size,计算从 start 开始的一个范围,如果范围小于或等于 size,返回 end;否则,返回 start + size - 1。

func Matcher

func Matcher(num int64) func(*big.Int) bool

func StringToBigInt

func StringToBigInt(input string) (num *big.Int)

StringToBigInt 将字符串转换为 *big.Int

func WeiToETH

func WeiToETH(wei *big.Int) *big.Float

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL