vm_dummy

package
v2.5.2 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLuaTxAccount

func NewLuaTxAccount(name string, balance uint64, unit types.TokenUnit) *luaTxAccount

func NewLuaTxAccountBig

func NewLuaTxAccountBig(name string, balance *big.Int) *luaTxAccount

func NewLuaTxCall

func NewLuaTxCall(sender, recipient string, amount uint64, payload string) *luaTxCall

func NewLuaTxCallBig

func NewLuaTxCallBig(sender, recipient string, amount *big.Int, payload string) *luaTxCall

func NewLuaTxCallFeeDelegate

func NewLuaTxCallFeeDelegate(sender, recipient string, amount uint64, payload string) *luaTxCall

func NewLuaTxDeploy

func NewLuaTxDeploy(sender, recipient string, amount uint64, code string) *luaTxDeploy

func NewLuaTxDeployBig

func NewLuaTxDeployBig(sender, recipient string, amount *big.Int, code string) *luaTxDeploy

func NewLuaTxSendBig

func NewLuaTxSendBig(sender, receiver string, amount *big.Int) *luaTxSend

func StrToAddress

func StrToAddress(name string) string

Types

type DummyChain

type DummyChain struct {
	HardforkVersion int32
	// contains filtered or unexported fields
}

func LoadDummyChain

func LoadDummyChain(opts ...DummyChainOptions) (*DummyChain, error)

func (*DummyChain) BeginReceiptTx

func (bc *DummyChain) BeginReceiptTx() db.Transaction

func (*DummyChain) BestBlockNo

func (bc *DummyChain) BestBlockNo() uint64

func (*DummyChain) ConnectBlock

func (bc *DummyChain) ConnectBlock(txs ...LuaTxTester) error

func (*DummyChain) DisConnectBlock

func (bc *DummyChain) DisConnectBlock() error

func (*DummyChain) GetABI

func (bc *DummyChain) GetABI(code string) (*types.ABI, error)

func (*DummyChain) GetAccountState

func (bc *DummyChain) GetAccountState(name string) (*types.State, error)

func (*DummyChain) GetBestBlock

func (bc *DummyChain) GetBestBlock() (*types.Block, error)

func (*DummyChain) GetBlockByNo

func (bc *DummyChain) GetBlockByNo(blockNo types.BlockNo) (*types.Block, error)

func (*DummyChain) GetEvents

func (bc *DummyChain) GetEvents(txhash []byte) []*types.Event

func (*DummyChain) GetReceipt

func (bc *DummyChain) GetReceipt(txHash []byte) *types.Receipt

func (*DummyChain) GetStaking

func (bc *DummyChain) GetStaking(name string) (*types.Staking, error)

func (*DummyChain) Query

func (bc *DummyChain) Query(contract_name, queryInfo, expectedErr string, expectedRvs ...string) error

func (*DummyChain) QueryOnly

func (bc *DummyChain) QueryOnly(contract_name, queryInfo string, expectedErr string) (bool, string, error)

func (*DummyChain) Release

func (bc *DummyChain) Release()

func (*DummyChain) SetTimestamp

func (bc *DummyChain) SetTimestamp(is_increment bool, value int64)

type DummyChainOptions

type DummyChainOptions func(d *DummyChain)

overwrite config for dummychain

func SetHardForkVersion

func SetHardForkVersion(forkVersion int32) DummyChainOptions

func SetPubNet

func SetPubNet() DummyChainOptions

func SetTimeout

func SetTimeout(timeout int) DummyChainOptions

type LuaTxTester

type LuaTxTester interface {
	Hash() []byte
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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