Versions in this module Expand all Collapse all v0 v0.8.5 Feb 22, 2015 Changes in this version type Log + func (self *Log) Number() uint64 v0.8.5-2 Feb 26, 2015 v0.8.4 Feb 20, 2015 Changes in this version + var GasMemCpy = big.NewInt(1) + func PrecompiledContracts() map[string]*PrecompiledAccount + type Context struct + Args []byte + Code []byte + Gas *big.Int + Price *big.Int + UsedGas *big.Int + func NewContext(caller ContextRef, object ContextRef, code []byte, gas, price *big.Int) *Context + func (c *Context) Address() []byte + func (c *Context) GetByte(n uint64) byte + func (c *Context) GetBytes(x, y int) []byte + func (c *Context) GetCode(x, size uint64) []byte + func (c *Context) GetOp(n uint64) OpCode + func (c *Context) GetRangeValue(x, size uint64) []byte + func (c *Context) Return(ret []byte) []byte + func (c *Context) ReturnGas(gas, price *big.Int) + func (c *Context) UseGas(gas *big.Int) bool + func (self *Context) SetCode(code []byte) + type ContextRef interface + Address func() []byte + ReturnGas func(*big.Int, *big.Int) + SetCode func([]byte) type Environment + GetHash func(n uint64) []byte + VmType func() Type type OpCode + const BLOCKHASH type Type + const JitVmTy + const StdVmTy type VirtualMachine + func NewJitVm(env Environment) VirtualMachine + func NewVm(env Environment) VirtualMachine type Vm + BreakPoints []int64 + Dbg Debugger + Fn string + Recoverable bool + Stepping bool + func (self *Vm) RunPrecompiled(p *PrecompiledAccount, callData []byte, context *Context) (ret []byte, err error) v0.8.4-1 Feb 20, 2015 v0.7.11 Dec 24, 2014 v0.7.10 Dec 21, 2014 Changes in this version + const MaxCallDepth + var GasBalance = big.NewInt(20) + var GasCall = big.NewInt(20) + var GasCreate = big.NewInt(100) + var GasCreateByte = big.NewInt(5) + var GasData = big.NewInt(5) + var GasEcrecover = big.NewInt(500) + var GasLog = big.NewInt(32) + var GasMemory = big.NewInt(1) + var GasRipemd = big.NewInt(50) + var GasRipemdByte = big.NewInt(50) + var GasSLoad = big.NewInt(20) + var GasSStore = big.NewInt(100) + var GasSStoreRefund = big.NewInt(100) + var GasSha = big.NewInt(10) + var GasSha256 = big.NewInt(50) + var GasSha256Byte = big.NewInt(50) + var GasSha3Byte = big.NewInt(10) + var GasStep = big.NewInt(1) + var GasTx = big.NewInt(500) + var LogTyDiff byte = 0x2 + var LogTyPretty byte = 0x1 + var Pow256 = ethutil.BigPow(2, 256) + var Precompiled = map[string]*PrecompiledAccount + var S256 = ethutil.S256 + var U256 = ethutil.U256 + func Disassemble(script []byte) (asm []string) + func IsDepthErr(err error) bool + func IsOOGErr(err error) bool + func IsStack(err error) bool + func Transfer(from, to Account, amount *big.Int) error + type Account interface + AddBalance func(amount *big.Int) + Balance func() *big.Int + SubBalance func(amount *big.Int) + type Address interface + Call func(in []byte) []byte + type Closure struct + Args []byte + Code []byte + Gas *big.Int + Price *big.Int + UsedGas *big.Int + func NewClosure(msg *state.Message, caller ClosureRef, object ClosureRef, code []byte, ...) *Closure + func (c *Closure) Address() []byte + func (c *Closure) GetByte(x uint64) byte + func (c *Closure) GetBytes(x, y int) []byte + func (c *Closure) GetOp(x uint64) OpCode + func (c *Closure) GetRangeValue(x, y uint64) []byte + func (c *Closure) Return(ret []byte) []byte + func (c *Closure) ReturnGas(gas, price *big.Int) + func (c *Closure) UseGas(gas *big.Int) bool + func (self *Closure) SetCode(code []byte) + type ClosureRef interface + Address func() []byte + ReturnGas func(*big.Int, *big.Int) + SetCode func([]byte) + type DebugVm struct + BreakPoints []int64 + Dbg Debugger + Fn string + Recoverable bool + Stepping bool + func NewDebugVm(env Environment) *DebugVm + func (self *DebugVm) Endl() VirtualMachine + func (self *DebugVm) Env() Environment + func (self *DebugVm) Printf(format string, v ...interface{}) VirtualMachine + func (self *DebugVm) Run(me, caller ClosureRef, code []byte, value, gas, price *big.Int, ...) (ret []byte, err error) + func (self *DebugVm) RunPrecompiled(p *PrecompiledAccount, callData []byte, closure *Closure) (ret []byte, err error) + type Debugger interface + BreakHook func(step int, op OpCode, mem *Memory, stack *Stack, object *state.StateObject) bool + BreakPoints func() []int64 + SetCode func(byteCode []byte) + StepHook func(step int, op OpCode, mem *Memory, stack *Stack, object *state.StateObject) bool + type DepthError struct + func (self DepthError) Error() string + type Environment interface + AddLog func(state.Log) + BlockHash func() []byte + BlockNumber func() *big.Int + Call func(me ClosureRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error) + CallCode func(me ClosureRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error) + Coinbase func() []byte + Create func(me ClosureRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error, ClosureRef) + Depth func() int + Difficulty func() *big.Int + GasLimit func() *big.Int + Origin func() []byte + PrevHash func() []byte + SetDepth func(i int) + State func() *state.StateDB + Time func() int64 + Transfer func(from, to Account, amount *big.Int) error + type Log struct + func (self *Log) Address() []byte + func (self *Log) Data() []byte + func (self *Log) RlpData() interface{} + func (self *Log) String() string + func (self *Log) Topics() [][]byte + type Memory struct + func NewMemory() *Memory + func (m *Memory) Data() []byte + func (m *Memory) Get(offset, size int64) []byte + func (m *Memory) Len() int + func (m *Memory) Print() + func (m *Memory) Resize(size uint64) + func (m *Memory) Set(offset, size uint64, value []byte) + func (self *Memory) Geti(offset, size int64) (cpy []byte) + type Object interface + GetStorage func(key *big.Int) *ethutil.Value + SetStorage func(key *big.Int, value *ethutil.Value) + type OpCode byte + const ADD + const ADDMOD + const ADDRESS + const AND + const BALANCE + const BYTE + const CALL + const CALLCODE + const CALLDATACOPY + const CALLDATALOAD + const CALLDATASIZE + const CALLER + const CALLVALUE + const CODECOPY + const CODESIZE + const COINBASE + const CREATE + const DIFFICULTY + const DIV + const DUP1 + const DUP10 + const DUP11 + const DUP12 + const DUP13 + const DUP14 + const DUP15 + const DUP16 + const DUP2 + const DUP3 + const DUP4 + const DUP5 + const DUP6 + const DUP7 + const DUP8 + const DUP9 + const EQ + const EXP + const EXTCODECOPY + const EXTCODESIZE + const GAS + const GASLIMIT + const GASPRICE + const GT + const ISZERO + const JUMP + const JUMPDEST + const JUMPI + const LOG0 + const LOG1 + const LOG2 + const LOG3 + const LOG4 + const LT + const MLOAD + const MOD + const MSIZE + const MSTORE + const MSTORE8 + const MUL + const MULMOD + const NOT + const NUMBER + const OR + const ORIGIN + const PC + const POP + const PREVHASH + const PUSH1 + const PUSH10 + const PUSH11 + const PUSH12 + const PUSH13 + const PUSH14 + const PUSH15 + const PUSH16 + const PUSH17 + const PUSH18 + const PUSH19 + const PUSH2 + const PUSH20 + const PUSH21 + const PUSH22 + const PUSH23 + const PUSH24 + const PUSH25 + const PUSH26 + const PUSH27 + const PUSH28 + const PUSH29 + const PUSH3 + const PUSH30 + const PUSH31 + const PUSH32 + const PUSH4 + const PUSH5 + const PUSH6 + const PUSH7 + const PUSH8 + const PUSH9 + const RETURN + const SDIV + const SGT + const SHA3 + const SIGNEXTEND + const SLOAD + const SLT + const SMOD + const SSTORE + const STOP + const SUB + const SUICIDE + const SWAP1 + const SWAP10 + const SWAP11 + const SWAP12 + const SWAP13 + const SWAP14 + const SWAP15 + const SWAP16 + const SWAP2 + const SWAP3 + const SWAP4 + const SWAP5 + const SWAP6 + const SWAP7 + const SWAP8 + const SWAP9 + const TIMESTAMP + const XOR + func (o OpCode) String() string + type OpType int + type OutOfGasError struct + func OOG(req, has *big.Int) OutOfGasError + func (self OutOfGasError) Error() string + type PrecompiledAccount struct + Gas func(l int) *big.Int + func (self PrecompiledAccount) Call(in []byte) []byte + type Stack struct + func NewStack() *Stack + func (st *Stack) Data() []*big.Int + func (st *Stack) Dupn(n int) *big.Int + func (st *Stack) Get(amount *big.Int) []*big.Int + func (st *Stack) Len() int + func (st *Stack) Peek() *big.Int + func (st *Stack) Peekn() (*big.Int, *big.Int) + func (st *Stack) Pop() *big.Int + func (st *Stack) Popn() (*big.Int, *big.Int) + func (st *Stack) Print() + func (st *Stack) Push(d *big.Int) + func (st *Stack) Swapn(n int) (*big.Int, *big.Int) + type StackError struct + func StackErr(req, has int) StackError + func (self StackError) Error() string + type TxCallback func(opType OpType) bool + type Type int + const DebugVmTy + const MaxVmTy + const StandardVmTy + type VirtualMachine interface + Endl func() VirtualMachine + Env func() Environment + Printf func(string, ...interface{}) VirtualMachine + Run func(me, caller ClosureRef, code []byte, value, gas, price *big.Int, data []byte) ([]byte, error) + func New(env Environment, typ Type) VirtualMachine + type Vm struct + func (self *Vm) Depth() int + func (self *Vm) Endl() VirtualMachine + func (self *Vm) Env() Environment + func (self *Vm) Printf(format string, v ...interface{}) VirtualMachine + func (self *Vm) Run(me, caller ClosureRef, code []byte, value, gas, price *big.Int, data []byte) (ret []byte, err error) v0.7.10-broken Dec 20, 2014