evm

package
v0.0.0-...-fb4f826 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CodeDriver

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

func NewCodeDriver

func NewCodeDriver(codeDir string, nativeDriver common.CodeDriver, storage storage.PersistStore) *CodeDriver

func (*CodeDriver) GetInstance

func (drv *CodeDriver) GetInstance(codeID []byte) (common.Chaincode, error)

func (*CodeDriver) Install

func (drv *CodeDriver) Install(codeID, data []byte) error

type InitInput

type InitInput struct {
	Class  string   `json:"class"`
	Params []string `json:"params"`
	Types  []string `json:"types"`
}

type Input

type Input struct {
	Method string   `json:"method"`
	Params []string `json:"params"`
	Types  []string `json:"types"`
}

type NativeProxy

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

func NewNativeProxy

func NewNativeProxy(driver common.CodeDriver) *NativeProxy

func (*NativeProxy) AddBalance

func (p *NativeProxy) AddBalance(addr ethcomm.Address, val *big.Int) error

func (*NativeProxy) GetBalance

func (p *NativeProxy) GetBalance(addr ethcomm.Address) (*big.Int, error)

func (*NativeProxy) QueryBalanceByAddr20

func (p *NativeProxy) QueryBalanceByAddr20(addr20 []byte) ([]byte, error)

func (*NativeProxy) QueryBalanceByAddr32

func (p *NativeProxy) QueryBalanceByAddr32(addr32 []byte) ([]byte, error)

func (*NativeProxy) QueryContractAddr20

func (p *NativeProxy) QueryContractAddr20(hash []byte) ([]byte, error)

func (*NativeProxy) QueryContractAddr32

func (p *NativeProxy) QueryContractAddr32(hash []byte) ([]byte, error)

func (*NativeProxy) SetBalance

func (p *NativeProxy) SetBalance(addr ethcomm.Address, val *big.Int) error

func (*NativeProxy) SetBalanceByAddr20

func (p *NativeProxy) SetBalanceByAddr20(addr20 []byte, value uint64) error

func (*NativeProxy) SetBalanceByAddr32

func (p *NativeProxy) SetBalanceByAddr32(addr32 []byte, value uint64) error

func (*NativeProxy) SubBalance

func (p *NativeProxy) SubBalance(addr ethcomm.Address, val *big.Int) error

type Runner

type Runner struct {
	Proxy    *NativeProxy
	CodePath string
	Storage  storage.PersistStore
	StateDB  *statedb.StateDB
	// contains filtered or unexported fields
}

func (*Runner) Init

func (r *Runner) Init(ctx common.CallContext) error

Init deploys the solidity contract and binds the eth address.

func (*Runner) Invoke

func (r *Runner) Invoke(ctx common.CallContext) error

func (*Runner) Query

func (r *Runner) Query(ctx common.CallContext) ([]byte, error)

func (*Runner) SetTxTrk

func (r *Runner) SetTxTrk(txTrk *common.StateTracker)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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