context

package
v1.9.5 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2024 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 Context

type Context struct {
	Validators  *sync.Map[string, *storage.Validator]
	Addresses   *sync.Map[string, *storage.Address]
	Delegations *sync.Map[string, *storage.Delegation]
	Jails       *sync.Map[string, *storage.Jail]

	Redelegations   []storage.Redelegation
	Undelegations   []storage.Undelegation
	CancelUnbonding []storage.Undelegation
	StakingLogs     []storage.StakingLog

	Block *storage.Block
}

func NewContext

func NewContext() *Context

func (*Context) AddAddress

func (ctx *Context) AddAddress(address *storage.Address) error

func (*Context) AddCancelUndelegation

func (ctx *Context) AddCancelUndelegation(u storage.Undelegation)

func (*Context) AddDelegation

func (ctx *Context) AddDelegation(d storage.Delegation)

func (*Context) AddJail

func (ctx *Context) AddJail(jail storage.Jail)

func (*Context) AddRedelegation

func (ctx *Context) AddRedelegation(r storage.Redelegation)

func (*Context) AddStakingLog

func (ctx *Context) AddStakingLog(l storage.StakingLog)

func (*Context) AddSupply

func (ctx *Context) AddSupply(data map[string]any)

func (*Context) AddUndelegation

func (ctx *Context) AddUndelegation(u storage.Undelegation)

func (*Context) AddValidator

func (ctx *Context) AddValidator(validator storage.Validator)

func (*Context) GetAddresses

func (ctx *Context) GetAddresses() []*storage.Address

func (*Context) GetValidators

func (ctx *Context) GetValidators() []*storage.Validator

func (*Context) SetInflation

func (ctx *Context) SetInflation(data map[string]any)

func (*Context) SubSupply

func (ctx *Context) SubSupply(data map[string]any)

Jump to

Keyboard shortcuts

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