helper

package
v0.7.10-broken Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2014 License: LGPL-2.1-or-later Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Log = logpkg.NewLogger("TEST")

Functions

func CreateFileTests

func CreateFileTests(t *testing.T, fn string, value interface{})

func CreateHttpTests

func CreateHttpTests(t *testing.T, uri string, value interface{})

func FromHex

func FromHex(h string) []byte

func NewTrie

func NewTrie() *trie.Trie

func RunState

func RunState(statedb *state.StateDB, env, tx map[string]string) ([]byte, state.Logs, *big.Int, error)

func RunVm

func RunVm(state *state.StateDB, env, exec map[string]string) ([]byte, state.Logs, *big.Int, error)

Types

type Env

type Env struct {
	Gas *big.Int
	// contains filtered or unexported fields
}

func NewEnv

func NewEnv(state *state.StateDB) *Env

func NewEnvFromMap

func NewEnvFromMap(state *state.StateDB, envValues map[string]string, exeValues map[string]string) *Env

func (*Env) AddLog

func (self *Env) AddLog(log state.Log)

func (*Env) BlockHash

func (self *Env) BlockHash() []byte

func (*Env) BlockNumber

func (self *Env) BlockNumber() *big.Int

func (*Env) Call

func (self *Env) Call(caller vm.ClosureRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error)

func (*Env) CallCode

func (self *Env) CallCode(caller vm.ClosureRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error)

func (*Env) Coinbase

func (self *Env) Coinbase() []byte

func (*Env) Create

func (self *Env) Create(caller vm.ClosureRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error, vm.ClosureRef)

func (*Env) Depth

func (self *Env) Depth() int

func (*Env) Difficulty

func (self *Env) Difficulty() *big.Int

func (*Env) GasLimit

func (self *Env) GasLimit() *big.Int

func (*Env) Origin

func (self *Env) Origin() []byte

func (*Env) PrevHash

func (self *Env) PrevHash() []byte

func (*Env) SetDepth

func (self *Env) SetDepth(i int)

func (*Env) State

func (self *Env) State() *state.StateDB

func (*Env) Time

func (self *Env) Time() int64

func (*Env) Transfer

func (self *Env) Transfer(from, to vm.Account, amount *big.Int) error

type MemDatabase

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

func NewMemDatabase

func NewMemDatabase() (*MemDatabase, error)

func (*MemDatabase) Close

func (db *MemDatabase) Close()

func (*MemDatabase) Delete

func (db *MemDatabase) Delete(key []byte) error

func (*MemDatabase) Get

func (db *MemDatabase) Get(key []byte) ([]byte, error)

func (*MemDatabase) LastKnownTD

func (db *MemDatabase) LastKnownTD() []byte

func (*MemDatabase) Print

func (db *MemDatabase) Print()

func (*MemDatabase) Put

func (db *MemDatabase) Put(key []byte, value []byte)

type Message

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

func NewMessage

func NewMessage(from, to, data []byte, value, gas, price *big.Int) Message

func (Message) Data

func (self Message) Data() []byte

func (Message) From

func (self Message) From() []byte

func (Message) Gas

func (self Message) Gas() *big.Int

func (Message) GasPrice

func (self Message) GasPrice() *big.Int

func (Message) Hash

func (self Message) Hash() []byte

func (Message) Nonce

func (self Message) Nonce() uint64

func (Message) To

func (self Message) To() []byte

func (Message) Value

func (self Message) Value() *big.Int

Jump to

Keyboard shortcuts

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