tx

package
v0.0.0-...-0c64813 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EthAsset = "0x0000000000000000000000000000000000000000"
)

const asset .

Variables

This section is empty.

Functions

This section is empty.

Types

type Tx

type Tx struct {
	AccountNonce uint64    `json:"nonce"    gencodec:"required"`
	Price        *big.Int  `json:"gasPrice" gencodec:"required"`
	GasLimit     *big.Int  `json:"gas"      gencodec:"required"`
	Recipient    *[20]byte `json:"to"       rlp:"nil"` // nil means contract creation
	Amount       *big.Int  `json:"value"    gencodec:"required"`
	Payload      []byte    `json:"input"    gencodec:"required"`
	V            *big.Int  `json:"v" gencodec:"required"`
	R            *big.Int  `json:"r" gencodec:"required"`
	S            *big.Int  `json:"s" gencodec:"required"`
}

Tx .

func NewTx

func NewTx(nonce uint64, to string, amount, gasPrice *ethgo.Value, gasLimit *big.Int, data []byte) *Tx

NewTx create new eth tx

func (*Tx) Encode

func (tx *Tx) Encode() ([]byte, error)

Encode .

func (*Tx) Sign

func (tx *Tx) Sign(prv *ecdsa.PrivateKey) error

Sign .

Jump to

Keyboard shortcuts

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