accounts

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2018 License: LGPL-3.0 Imports: 18 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Balance math.HexOrDecimal256 `json:"balance,string"`
	Energy  math.HexOrDecimal256 `json:"energy,string"`
	HasCode bool                 `json:"hasCode"`
}

Account for marshal account

type Accounts

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

func New

func New(chain *chain.Chain, stateCreator *state.Creator) *Accounts

func (*Accounts) Call

func (a *Accounts) Call(ctx context.Context, to *thor.Address, body *ContractCall, header *block.Header) (output *VMOutput, err error)

Call a contract with input

func (*Accounts) Mount

func (a *Accounts) Mount(root *mux.Router, pathPrefix string)

type ContractCall

type ContractCall struct {
	Value    *math.HexOrDecimal256 `json:"value,string"`
	Data     string                `json:"data"`
	Gas      uint64                `json:"gas"`
	GasPrice *math.HexOrDecimal256 `json:"gasPrice,string"`
	Caller   thor.Address          `json:"caller"`
}

ContractCall represents contract-call body

type VMOutput

type VMOutput struct {
	Data      string                   `json:"data"`
	Events    []*transactions.Event    `json:"events"`
	Transfers []*transactions.Transfer `json:"transfers"`
	GasUsed   uint64                   `json:"gasUsed"`
	Reverted  bool                     `json:"reverted"`
	VMError   string                   `json:"vmError"`
}

Jump to

Keyboard shortcuts

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