decode

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddressFromPubKey

func AddressFromPubKey(pk []byte) (string, error)

Types

type Addresses

type Addresses map[string]*storage.Address

func NewAddress

func NewAddress() Addresses

func (Addresses) AddIbcRelayer added in v1.2.0

func (a Addresses) AddIbcRelayer(address string)

func (Addresses) Get

func (a Addresses) Get(address string) (*storage.Address, bool)

func (Addresses) RemoveIbcRelayer added in v1.2.0

func (a Addresses) RemoveIbcRelayer(address string)

func (Addresses) Set

func (a Addresses) Set(address string, height types.Level, change decimal.Decimal, asset string, actionCount int, signedTxCount int) *storage.Address

func (Addresses) UpdateNonce

func (a Addresses) UpdateNonce(address string, nonce uint32)

type Context

type Context struct {
	Addresses        Addresses
	Rollups          Rollups
	Validators       Validators
	RollupAddress    map[string]*storage.RollupAddress
	AddressActions   map[string]*storage.AddressAction
	SupplyChange     decimal.Decimal
	BytesInBlock     int64
	GasUsed          int64
	GasWanted        int64
	DataSize         int64
	ActionTypes      storageTypes.Bits
	Constants        map[string]*storage.Constant
	Bridges          map[string]*storage.Bridge
	Fees             map[int64]*storage.Fee
	Transfers        []*storage.Transfer
	Deposits         map[int64]*storage.Deposit
	HasWriteAckError bool
	Proposer         string
	// contains filtered or unexported fields
}

func NewContext

func NewContext(bridgeAssets map[string]string) Context

func (*Context) AddBridge

func (ctx *Context) AddBridge(b *storage.Bridge)

func (*Context) AddBridgeAsset added in v1.1.0

func (ctx *Context) AddBridgeAsset(bridge, asset string)

func (*Context) AddDeposit added in v1.1.0

func (ctx *Context) AddDeposit(idx int64, deposit *storage.Deposit)

func (*Context) AddFee

func (ctx *Context) AddFee(idx int64, fee *storage.Fee)

func (*Context) AddGenericConstant

func (ctx *Context) AddGenericConstant(key, value string)

func (*Context) AddTransfer added in v1.1.0

func (ctx *Context) AddTransfer(transfer *storage.Transfer)

func (*Context) BridgesArray

func (ctx *Context) BridgesArray() []*storage.Bridge

func (*Context) ClearTx added in v1.3.0

func (ctx *Context) ClearTx()

func (*Context) ConstantsArray

func (ctx *Context) ConstantsArray() []*storage.Constant

type DecodedTx

type DecodedTx struct {
	Tx          *astria.Transaction
	UnsignedTx  *astria.TransactionBody
	Actions     []storage.Action
	Signer      *storage.Address
	ActionTypes storageTypes.Bits
}

func Tx

func Tx(b types.BlockData, index int, ctx *Context) (d DecodedTx, err error)

type IbcTransfer added in v1.1.0

type IbcTransfer struct {
	Amount   decimal.Decimal `json:"amount"`
	Denom    string          `json:"denom"`
	Receiver string          `json:"receiver"`
	Sender   string          `json:"sender"`
}

type Rollups

type Rollups map[string]*storage.Rollup

func NewRollups

func NewRollups() Rollups

func (Rollups) Set

func (r Rollups) Set(rollupId []byte, height types.Level, size int) *storage.Rollup

type Validators

type Validators map[string]*storage.Validator

func NewValidators

func NewValidators() Validators

func (Validators) Set

func (v Validators) Set(pubKey []byte, power int64, address string, height types.Level) *storage.Validator

Jump to

Keyboard shortcuts

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