types

package
v0.0.0-...-da22cf9 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultCodespace sdk.CodespaceType = 3

	CodeInvalidAddress     sdk.CodeType = 201
	CodeInvalidOIndex      sdk.CodeType = 202
	CodeInvalidAmount      sdk.CodeType = 203
	CodeInvalidTransaction sdk.CodeType = 204
)

Reserve errors 100 ~ 199

View Source
const (
	// Only allowed Denomination on this plasma chain
	Denom = "Ether"
)

Variables

This section is empty.

Functions

func ErrInvalidAddress

func ErrInvalidAddress(codespace sdk.CodespaceType, msg string, args ...interface{}) sdk.Error

func ErrInvalidAmount

func ErrInvalidAmount(codespace sdk.CodespaceType, msg string) sdk.Error

func ErrInvalidOIndex

func ErrInvalidOIndex(codespace sdk.CodespaceType, msg string) sdk.Error

func ErrInvalidTransaction

func ErrInvalidTransaction(codespace sdk.CodespaceType, msg string, args ...interface{}) sdk.Error

---------------------------------------- Error constructors

func ProtoPosition

func ProtoPosition() utxo.Position

func RegisterAmino

func RegisterAmino(cdc *amino.Codec)

------------------------------------------------------- misc

Types

type BaseTx

type BaseTx struct {
	Msg        SpendMsg
	Signatures [2][65]byte
}

func NewBaseTx

func NewBaseTx(msg SpendMsg, sigs [2][65]byte) BaseTx

func (BaseTx) GetMsgs

func (tx BaseTx) GetMsgs() []sdk.Msg

func (BaseTx) GetSignatures

func (tx BaseTx) GetSignatures() [2][65]byte

type Deposit

type Deposit struct {
	Owner    common.Address
	Amount   sdk.Uint
	BlockNum sdk.Uint
}

type PlasmaPosition

type PlasmaPosition struct {
	Blknum     uint64
	TxIndex    uint16
	Oindex     uint8
	DepositNum uint64
}

func NewPlasmaPosition

func NewPlasmaPosition(blknum uint64, txIndex uint16, oIndex uint8, depositNum uint64) PlasmaPosition

func (PlasmaPosition) Get

func (position PlasmaPosition) Get() []sdk.Uint

func (PlasmaPosition) IsDeposit

func (position PlasmaPosition) IsDeposit() bool

func (PlasmaPosition) IsValid

func (position PlasmaPosition) IsValid() bool

check that the position is formatted correctly Implements Position

type SpendMsg

type SpendMsg struct {
	Blknum0     uint64
	Txindex0    uint16
	Oindex0     uint8
	DepositNum0 uint64
	Owner0      common.Address
	Blknum1     uint64
	Txindex1    uint16
	Oindex1     uint8
	DepositNum1 uint64
	Owner1      common.Address
	Newowner0   common.Address
	Amount0     uint64
	Newowner1   common.Address
	Amount1     uint64
}

func (SpendMsg) GetSignBytes

func (msg SpendMsg) GetSignBytes() []byte

Implements Msg.

func (SpendMsg) GetSigners

func (msg SpendMsg) GetSigners() []sdk.AccAddress

Implements Msg.

func (SpendMsg) Inputs

func (msg SpendMsg) Inputs() []utxo.Input

func (SpendMsg) Outputs

func (msg SpendMsg) Outputs() []utxo.Output

func (SpendMsg) Route

func (msg SpendMsg) Route() string

Implements Msg.

func (SpendMsg) Type

func (msg SpendMsg) Type() string

Implements Msg. Improve later

func (SpendMsg) ValidateBasic

func (msg SpendMsg) ValidateBasic() sdk.Error

Implements Msg.

Jump to

Keyboard shortcuts

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