transactions

package
v0.0.0-...-75aef46 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2019 License: GPL-3.0 Imports: 18 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clause

type Clause struct {
	To    *powerplay.Address   `json:"to"`
	Value math.HexOrDecimal256 `json:"value"`
	Data  string               `json:"data"`
}

Clause for json marshal

func (*Clause) String

func (c *Clause) String() string

type Clauses

type Clauses []Clause

Clauses array of clauses.

type Event

type Event struct {
	Address powerplay.Address   `json:"address"`
	Topics  []powerplay.Bytes32 `json:"topics"`
	Data    string              `json:"data"`
}

Event event.

type LogMeta

type LogMeta struct {
	BlockID        powerplay.Bytes32 `json:"blockID"`
	BlockNumber    uint32            `json:"blockNumber"`
	BlockTimestamp uint64            `json:"blockTimestamp"`
	TxID           powerplay.Bytes32 `json:"txID"`
	TxOrigin       powerplay.Address `json:"txOrigin"`
}

type Output

type Output struct {
	ContractAddress *powerplay.Address `json:"contractAddress"`
	Events          []*Event           `json:"events"`
	Transfers       []*Transfer        `json:"transfers"`
}

Output output of clause execution.

type RawTx

type RawTx struct {
	Raw string `json:"raw"`
}

type Receipt

type Receipt struct {
	GasUsed  uint64                `json:"gasUsed"`
	GasPayer powerplay.Address     `json:"gasPayer"`
	Paid     *math.HexOrDecimal256 `json:"paid"`
	Reward   *math.HexOrDecimal256 `json:"reward"`
	Reverted bool                  `json:"reverted"`
	Meta     LogMeta               `json:"meta"`
	Outputs  []*Output             `json:"outputs"`
}

Receipt for json marshal

type SignedTx

type SignedTx struct {
	UnSignedTx
	Signature string `json:"signature"`
}

type Transaction

type Transaction struct {
	ID           powerplay.Bytes32   `json:"id"`
	ChainTag     byte                `json:"chainTag"`
	BlockRef     string              `json:"blockRef"`
	Expiration   uint32              `json:"expiration"`
	Clauses      Clauses             `json:"clauses"`
	GasPriceCoef uint8               `json:"gasPriceCoef"`
	Gas          uint64              `json:"gas"`
	Origin       powerplay.Address   `json:"origin"`
	Nonce        math.HexOrDecimal64 `json:"nonce"`
	DependsOn    *powerplay.Bytes32  `json:"dependsOn"`
	Size         uint32              `json:"size"`
	Meta         TxMeta              `json:"meta"`
}

Transaction transaction

type Transactions

type Transactions struct {
	// contains filtered or unexported fields
}

func New

func New(chain *chain.Chain, pool *txpool.TxPool) *Transactions

func (*Transactions) Mount

func (t *Transactions) Mount(root *mux.Router, pathPrefix string)

type Transfer

type Transfer struct {
	Sender    powerplay.Address     `json:"sender"`
	Recipient powerplay.Address     `json:"recipient"`
	Amount    *math.HexOrDecimal256 `json:"amount"`
}

Transfer transfer log.

type TxMeta

type TxMeta struct {
	BlockID        powerplay.Bytes32 `json:"blockID"`
	BlockNumber    uint32            `json:"blockNumber"`
	BlockTimestamp uint64            `json:"blockTimestamp"`
}

type UnSignedTx

type UnSignedTx struct {
	ChainTag     uint8               `json:"chainTag"`
	BlockRef     string              `json:"blockRef"`
	Expiration   uint32              `json:"expiration"`
	Clauses      Clauses             `json:"clauses"`
	GasPriceCoef uint8               `json:"gasPriceCoef"`
	Gas          uint64              `json:"gas"`
	DependsOn    *powerplay.Bytes32  `json:"dependsOn"`
	Nonce        math.HexOrDecimal64 `json:"nonce"`
}

Jump to

Keyboard shortcuts

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