utils

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compress added in v0.20.0

func Compress(txList []byte) ([]byte, error)

Compress compresses the given txList bytes using zlib.

func Decompress added in v0.20.0

func Decompress(compressedTxList []byte) ([]byte, error)

Decompress decompresses the given txList bytes using zlib.

func EtherToWei added in v0.22.0

func EtherToWei(ether float64) (*big.Int, error)

EtherToWei converts ether value to wei value.

func GWeiToWei added in v0.22.0

func GWeiToWei(gwei float64) (*big.Int, error)

GWeiToWei converts gwei value to wei value.

func IsNil

func IsNil(i interface{}) bool

IsNil checks if the interface is empty.

func LoadEnv

func LoadEnv()

LoadEnv loads all the test environment variables.

func Max added in v0.20.0

func Max[T constraints.Integer](a, b T) T

Max return the maximum value of two integers.

func Min added in v0.20.0

func Min[T constraints.Integer](a, b T) T

Min return the minimum value of two integers.

func MineL1Block added in v0.21.0

func MineL1Block(t *testing.T, l1Client *rpc.Client)

MineL1Block mines a block on the L1 chain.

func RandUint32

func RandUint32(max *big.Int) uint32

RandUint32 returns a random uint32 number.

func RandUint64

func RandUint64(max *big.Int) uint64

RandUint64 returns a random uint64 number.

func WeiToEther added in v0.22.0

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

WeiToEther converts wei value to ether value.

func WeiToGWei added in v0.22.0

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

WeiToGWei converts wei value to gwei value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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