Documentation ¶
Index ¶
- Constants
- Variables
- type ElrondIeleVM
- func (vm *ElrondIeleVM) G0Call(input *vmi.ContractCallInput) (*big.Int, error)
- func (vm *ElrondIeleVM) G0Create(input *vmi.ContractCreateInput) (*big.Int, error)
- func (vm *ElrondIeleVM) RunSmartContractCall(input *vmi.ContractCallInput) (*vmi.VMOutput, error)
- func (vm *ElrondIeleVM) RunSmartContractCreate(input *vmi.ContractCreateInput) (*vmi.VMOutput, error)
- func (vm *ElrondIeleVM) SetLogIO()
- func (vm *ElrondIeleVM) SetTracePretty()
- type Schedule
Constants ¶
const AddressLength = 32
AddressLength is the account address length expected by the VM.
Variables ¶
var TestVMType = []byte{0, 0}
TestVMType is the VM type argument we use in tests.
Functions ¶
This section is empty.
Types ¶
type ElrondIeleVM ¶
type ElrondIeleVM struct {
// contains filtered or unexported fields
}
ElrondIeleVM defines an object containing the state of the Iele VM. This is the Elrond version.
func NewElrondIeleVM ¶
func NewElrondIeleVM( vmType []byte, schedule Schedule, blockchainHook vmi.BlockchainHook, cryptoHook vmi.CryptoHook) *ElrondIeleVM
NewElrondIeleVM creates new Elrond Iele VM instance
func (*ElrondIeleVM) G0Call ¶
func (vm *ElrondIeleVM) G0Call(input *vmi.ContractCallInput) (*big.Int, error)
G0Call yields the initial gas cost of calling an existing smart contract
func (*ElrondIeleVM) G0Create ¶
func (vm *ElrondIeleVM) G0Create(input *vmi.ContractCreateInput) (*big.Int, error)
G0Create yields the initial gas cost of creating a new smart contract
func (*ElrondIeleVM) RunSmartContractCall ¶
func (vm *ElrondIeleVM) RunSmartContractCall(input *vmi.ContractCallInput) (*vmi.VMOutput, error)
RunSmartContractCall computes the result of a smart contract call and how the system must change after the execution
func (*ElrondIeleVM) RunSmartContractCreate ¶
func (vm *ElrondIeleVM) RunSmartContractCreate(input *vmi.ContractCreateInput) (*vmi.VMOutput, error)
RunSmartContractCreate computes how a smart contract creation should be performed
func (*ElrondIeleVM) SetLogIO ¶ added in v0.0.11
func (vm *ElrondIeleVM) SetLogIO()
SetLogIO causes the VM to print to console all inputs, data from hooks and output
func (*ElrondIeleVM) SetTracePretty ¶
func (vm *ElrondIeleVM) SetTracePretty()
SetTracePretty turns on pretty trace creation, use for debugging only
type Schedule ¶ added in v0.0.8
type Schedule int
Schedule defines a IELE gas model type
const ( // VMTests is the IELE default gas model, currently only used in certain VM tests. VMTests Schedule = iota // Albe is the IELE "ALBE" gas model, this was the first version. Albe // Danse is the IELE "DANSE" gas model, this is the latest version. Danse // ElrondDefault is the default gas model for Elrond, it is currently identical to Danse. ElrondDefault // ElrondTestnet is a gas model with minimal gas costs, used for the Elrond testnet. ElrondTestnet )
func ParseSchedule ¶ added in v0.0.8
ParseSchedule yields the schedule with the given name. It is used in tests.