message

package
v1.0.27 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2024 License: LGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProposalStatusInactive uint8 = iota
	ProposalStatusActive
	ProposalStatusPassed // Ready to be executed
	ProposalStatusExecuted
	ProposalStatusCanceled
)

Variables

View Source
var (
	StatusMap = map[uint8]string{ProposalStatusInactive: "inactive", ProposalStatusActive: "active", ProposalStatusPassed: "passed", ProposalStatusExecuted: "executed", ProposalStatusCanceled: "canceled"}
)

Functions

This section is empty.

Types

type Message

type Message struct {
	Source       uint8  // Source where message was initiated
	Destination  uint8  // Destination chain of message
	DepositNonce uint64 // Nonce for the deposit
	ResourceId   types.ResourceID
	Data         []byte

	Payload []interface{} // data associated with event sequence
	Type    TransferType

	BlockNumber uint64
	BlockHash   common.Hash
}

func (*Message) GetHash

func (m *Message) GetHash() common.Hash

func (*Message) ID

func (m *Message) ID() string

func (*Message) String

func (m *Message) String() string

type MessageProcessor

type MessageProcessor func(message *Message) error

func AdjustDecimalsForERC20AmountMessageProcessor

func AdjustDecimalsForERC20AmountMessageProcessor(args ...interface{}) MessageProcessor

AdjustDecimalsForERC20AmountMessageProcessor is a function, that accepts message and map[domainID uint8]{decimal uint} using this params processor converts amount for one chain to another for provided decimals with floor rounding

type ProposalStatus

type ProposalStatus struct {
	Status        uint8
	YesVotes      *big.Int
	YesVotesTotal uint8
	ProposedBlock *big.Int
}

func (*ProposalStatus) String

func (p *ProposalStatus) String() string

type TransferType

type TransferType string
const (
	FungibleTransfer    TransferType = "FungibleTransfer"
	NonFungibleTransfer TransferType = "NonFungibleTransfer"
	GenericTransfer     TransferType = "GenericTransfer"

	SignaturePass  TransferType = "SignaturePass"
	ArtificialPass TransferType = "ArtificialPass"
)

Jump to

Keyboard shortcuts

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