Documentation ¶
Index ¶
- Constants
- func Is64BitOverflow(word Word256) bool
- type Code
- type Contract
- type EVM
- type Stack
- func (st *Stack) Dup(n int)
- func (st *Stack) Len() int
- func (st *Stack) Peek() Word256
- func (st *Stack) Pop() Word256
- func (st *Stack) Pop64() uint64
- func (st *Stack) PopAddress() crypto.Address
- func (st *Stack) PopBigInt() *big.Int
- func (st *Stack) PopBigIntSigned() *big.Int
- func (st *Stack) PopBytes() []byte
- func (st *Stack) Print(n int)
- func (st *Stack) Push(d Word256)
- func (st *Stack) Push64(i uint64)
- func (st *Stack) PushAddress(address crypto.Address)
- func (st *Stack) PushBigInt(bigInt *big.Int) Word256
- func (st *Stack) PushBytes(bz []byte)
- func (st *Stack) Swap(n int)
Constants ¶
View Source
const ( DataStackInitialCapacity = 1024 MaximumAllowedBlockLookBack = 256 )
Variables ¶
This section is empty.
Functions ¶
func Is64BitOverflow ¶
func Is64BitOverflow(word Word256) bool
Types ¶
type Code ¶ added in v0.34.4
func NewCode ¶ added in v0.34.4
Build a Code object that includes analysis of which symbols are opcodes versus push data
func (*Code) GetBytecode ¶ added in v0.34.4
func (*Code) IsPushData ¶ added in v0.34.4
type EVM ¶ added in v0.34.4
type EVM struct { // Provide any foreign dispatchers to allow calls between VMs engine.Externals // contains filtered or unexported fields }
func (*EVM) Execute ¶ added in v0.34.4
func (vm *EVM) Execute(st acmstate.ReaderWriter, blockchain engine.Blockchain, eventSink exec.EventSink, params engine.CallParams, code []byte) ([]byte, error)
Initiate an EVM call against the provided state pushing events to eventSink. code should contain the EVM bytecode, input the CallData (readable by CALLDATALOAD), value the amount of native token to transfer with the call an quantity metering the number of computational steps available to the execution according to the gas schedule.
type Stack ¶
type Stack struct {
// contains filtered or unexported fields
}
Not goroutine safe
func (*Stack) PopAddress ¶ added in v0.23.0
func (*Stack) PopBigIntSigned ¶
func (*Stack) PushAddress ¶ added in v0.23.0
func (*Stack) PushBigInt ¶
Pushes the bigInt as a Word256 encoding negative values in 32-byte twos complement and returns the encoded result
Click to show internal directories.
Click to hide internal directories.