types

package
v1.13.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address = common.Address

type Balance

type Balance struct {
	*big.Int
}

func NewBalance

func NewBalance(i *big.Int) Balance

NewBalance creates a new Balance from a big.Int

func (Balance) Add

func (b Balance) Add(other Balance) Balance

Add returns a new Balance with other added to it

func (Balance) Equal

func (b Balance) Equal(other Balance) bool

Equal returns true if this balance equals other

func (Balance) GreaterThan

func (b Balance) GreaterThan(other Balance) bool

GreaterThan returns true if this balance is greater than other

func (Balance) LessThan

func (b Balance) LessThan(other Balance) bool

LessThan returns true if this balance is less than other

func (Balance) Mul

func (b Balance) Mul(f float64) Balance

Mul returns a new Balance multiplied by a float64

func (Balance) String added in v1.12.0

func (b Balance) String() string

String implements fmt.Stringer to format Balance in the most readable unit

func (Balance) Sub

func (b Balance) Sub(other Balance) Balance

Sub returns a new Balance with other subtracted from it

type ChainID

type ChainID = *big.Int

type InvocationResult

type InvocationResult interface {
	Error() error
	Wait() error
	Info() any
}

type Key

type Key = *ecdsa.PrivateKey

type ReadInvocation

type ReadInvocation[T any] interface {
	Call(ctx context.Context) (T, error)
}

type WriteInvocation

type WriteInvocation[T any] interface {
	ReadInvocation[T]
	Send(ctx context.Context) InvocationResult
}

Jump to

Keyboard shortcuts

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