endpoint

package
v0.0.25 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const AddressLength = 20

AddressLength is the account address length expected by the VM.

Variables

This section is empty.

Functions

This section is empty.

Types

type OriginalIeleVM

type OriginalIeleVM struct {
	// contains filtered or unexported fields
}

OriginalIeleVM defines an object containing the state of the Iele VM. This is the original version.

func NewOriginalIeleVM

func NewOriginalIeleVM(blockchainHook vmi.BlockchainHook, cryptoHook vmi.CryptoHook, schedule Schedule) *OriginalIeleVM

NewOriginalIeleVM creates new original Iele VM instance

func (*OriginalIeleVM) G0Call

func (vm *OriginalIeleVM) G0Call(input *vmi.ContractCallInput) (*big.Int, error)

G0Call yields the initial gas cost of calling an existing smart contract

func (*OriginalIeleVM) G0Create

func (vm *OriginalIeleVM) G0Create(input *vmi.ContractCreateInput) (*big.Int, error)

G0Create yields the initial gas cost of creating a new smart contract

func (*OriginalIeleVM) RunSmartContractCall

func (vm *OriginalIeleVM) 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 (*OriginalIeleVM) RunSmartContractCreate

func (vm *OriginalIeleVM) RunSmartContractCreate(input *vmi.ContractCreateInput) (*vmi.VMOutput, error)

RunSmartContractCreate computes how a smart contract creation should be performed

func (*OriginalIeleVM) SetTracePretty

func (vm *OriginalIeleVM) 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 (
	// Default is the IELE default gas model
	Default 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
)

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