helper

package
v0.9.17 Latest Latest
Warning

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

Go to latest
Published: May 8, 2015 License: LGPL-2.1-or-later Imports: 16 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) BlockNumber

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

func (*Env) Call

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

func (*Env) CallCode

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

func (*Env) Coinbase

func (self *Env) Coinbase() common.Address

func (self *Env) PrevHash() []byte { return self.parent }

func (*Env) Create

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

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) GetHash added in v0.8.4

func (self *Env) GetHash(n uint64) common.Hash

func (*Env) Origin

func (self *Env) Origin() common.Address

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

func (*Env) VmType added in v0.8.4

func (self *Env) VmType() vm.Type

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 common.Address, to *common.Address, data []byte, value, gas, price *big.Int) Message

func (Message) Data

func (self Message) Data() []byte

func (Message) From

func (self Message) From() (common.Address, error)

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() *common.Address

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