types

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// SettingSwapLastBlock describes the latest checked block of swap contract logs
	SettingSwapLastBlock = "swap_last_block"
)

Functions

This section is empty.

Types

type Sending

type Sending struct {
	ID          uint64
	Status      SendingStatus
	Dst         common.Address
	DstTx       *common.Hash
	Token       mint.Token
	Amount      *amount.Amount
	Src         mint.PublicKey
	SrcTx       mint.Digest
	NextCheckAt time.Time
}

Sending is MNTP transfer (from contract) request

type SendingStatus

type SendingStatus uint8

SendingStatus enum

const (
	// SendingEnqueued means MNTP sending is has been just received
	SendingEnqueued SendingStatus = iota + 1
	// SendingInitiated means MNTP emission has been required from external service
	SendingInitiated
	// SendingConfirmed means MNTP emission completed successfully
	SendingConfirmed
	// SendingFailed means MNTP emission failed
	SendingFailed
)

func (SendingStatus) String

func (ss SendingStatus) String() string

String is Stringer implementation

type Swap

type Swap struct {
	ID          uint64
	Status      SwapStatus
	Src         common.Address
	SrcTx       common.Hash
	Token       mint.Token
	Amount      *amount.Amount
	Dst         mint.PublicKey
	DstTx       *mint.Digest
	NextCheckAt time.Time
}

Swap is ethereum contract event, i.e. MNTP => MNT swap request

type SwapStatus

type SwapStatus uint8

SwapStatus enum

const (
	// SwapEnqueued means MNTP coins have been just received on Ethereum contract
	SwapEnqueued SwapStatus = iota + 1
	// SwapInitiated means MNT emission request has been sent to underlying service
	SwapInitiated
	// SwapConfirmed means MNT emission completed successfully
	SwapConfirmed
	// SwapFailed means MNT emission failed
	SwapFailed
)

func (SwapStatus) String

func (rs SwapStatus) String() string

String is Stringer implementation

Jump to

Keyboard shortcuts

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