Documentation ¶
Index ¶
- Constants
- Variables
- type Contract
- type ExecutionEngine
- func (e *ExecutionEngine) Call(caller common.Uint160, codeHash common.Uint160, input []byte) (ret []byte, err error)
- func (e *ExecutionEngine) CallCode(codeHash common.Uint160, input []byte) (ret []byte, err error)
- func (e *ExecutionEngine) Create(caller common.Uint160, code []byte) (ret []byte, err error)
- func (e *ExecutionEngine) DelegateCall(codeHash common.Uint160, toAddr common.Uint160, input []byte) (ret []byte, err error)
- type Memory
- type OpCode
- type OpExec
- type PrecompiledContract
- type Stack
- type StateDB
Constants ¶
View Source
const (
StackLimit uint64 = 1024 // Maximum size of VM stack allowed.
)
Variables ¶
View Source
var PrecompiledContracts = map[common.Uint160]PrecompiledContract{ common.BytesToUint160([]byte{1}): &ecrecover{}, common.BytesToUint160([]byte{2}): &sha256hash{}, common.BytesToUint160([]byte{3}): &ripemd160hash{}, common.BytesToUint160([]byte{4}): &dataCopy{}, }
Functions ¶
This section is empty.
Types ¶
type Contract ¶
type Contract struct { Caller common.Uint160 Code []byte CodeHash common.Uint160 Input []byte // contains filtered or unexported fields }
func NewContract ¶
func (*Contract) SetCallCode ¶
type ExecutionEngine ¶
type ExecutionEngine struct { DBCache storage.DBCache JumpTable [256]OpExec // contains filtered or unexported fields }
func NewExecutionEngine ¶
func (*ExecutionEngine) DelegateCall ¶
type OpCode ¶
type OpCode byte
const ( // 0x60 range PUSH1 OpCode = 0x60 + iota PUSH2 PUSH3 PUSH4 PUSH5 PUSH6 PUSH7 PUSH8 PUSH9 PUSH10 PUSH11 PUSH12 PUSH13 PUSH14 PUSH15 PUSH16 PUSH17 PUSH18 PUSH19 PUSH20 PUSH21 PUSH22 PUSH23 PUSH24 PUSH25 PUSH26 PUSH27 PUSH28 PUSH29 PUSH30 PUSH31 PUSH32 DUP1 DUP2 DUP3 DUP4 DUP5 DUP6 DUP7 DUP8 DUP9 DUP10 DUP11 DUP12 DUP13 DUP14 DUP15 DUP16 SWAP1 SWAP2 SWAP3 SWAP4 SWAP5 SWAP6 SWAP7 SWAP8 SWAP9 SWAP10 SWAP11 SWAP12 SWAP13 SWAP14 SWAP15 SWAP16 )
type OpExec ¶
type OpExec struct { Name string Exec executionFunc // contains filtered or unexported fields }
func NewOpExecList ¶
func NewOpExecList() [256]OpExec
type PrecompiledContract ¶
type StateDB ¶
type StateDB interface { GetState(common.Uint160, common.Hash) common.Hash SetState(common.Uint160, common.Hash, common.Hash) GetCode(common.Uint160) []byte SetCode(common.Uint160, []byte) GetCodeSize(common.Uint160) int GetBalance(common.Uint160) *big.Int AddBalance(common.Uint160, *big.Int) Suicide(common.Uint160) bool }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.