Versions in this module Expand all Collapse all v0 v0.8.5 Feb 22, 2015 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 GasMemCpy = big.NewInt(1) + 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 = PrecompiledContracts() + 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 PrecompiledContracts() map[string]*PrecompiledAccount + 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 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 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) + BlockNumber func() *big.Int + Call func(me ContextRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error) + CallCode func(me ContextRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error) + Coinbase func() []byte + Create func(me ContextRef, addr, data []byte, gas, price, value *big.Int) ([]byte, error, ContextRef) + Depth func() int + Difficulty func() *big.Int + GasLimit func() *big.Int + GetHash func(n uint64) []byte + Origin func() []byte + SetDepth func(i int) + State func() *state.StateDB + Time func() int64 + Transfer func(from, to Account, amount *big.Int) error + VmType func() Type + type Log struct + func (self *Log) Address() []byte + func (self *Log) Data() []byte + func (self *Log) Number() uint64 + 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) Len() int + func (m *Memory) Print() + func (m *Memory) Resize(size uint64) + func (m *Memory) Set(offset, size uint64, value []byte) + func (self *Memory) Get(offset, size int64) (cpy []byte) + type OpCode byte + const ADD + const ADDMOD + const ADDRESS + const AND + const BALANCE + const BLOCKHASH + 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 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 byte + const JitVmTy + const MaxVmTy + const StdVmTy + type VirtualMachine interface + Endl func() VirtualMachine + Env func() Environment + Printf func(string, ...interface{}) VirtualMachine + Run func(me, caller ContextRef, code []byte, value, gas, price *big.Int, data []byte) ([]byte, error) + func NewJitVm(env Environment) VirtualMachine + func NewVm(env Environment) VirtualMachine + type Vm struct + BreakPoints []int64 + Dbg Debugger + Fn string + Recoverable bool + Stepping bool + func New(env Environment) *Vm + 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 ContextRef, code []byte, value, gas, price *big.Int, ...) (ret []byte, err error) + func (self *Vm) RunPrecompiled(p *PrecompiledAccount, callData []byte, context *Context) (ret []byte, err error) v0.8.4-1 Feb 20, 2015