endpoint

package
v0.0.22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2019 License: GPL-3.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

View Source
const AddressLength = 32

AddressLength is the account address length expected by the VM.

Variables

View Source
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) SetSignedArguments added in v0.0.22

func (vm *ElrondIeleVM) SetSignedArguments()

SetSignedArguments causes the VM to interpret call arguments as signed instead of unsigned (default) big ints.

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

func ParseSchedule(scheduleName string) (Schedule, error)

ParseSchedule yields the schedule with the given name. It is used in tests.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL