vm

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2019 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccountExists

func AccountExists(accnts state.AccountsAdapter, addressBytes []byte) bool

func ComputeExpectedBalance

func ComputeExpectedBalance(
	existing *big.Int,
	transferred *big.Int,
	gasLimit uint64,
	gasPrice uint64,
) *big.Int

func CreateAccount

func CreateAccount(accnts state.AccountsAdapter, pubKey []byte, nonce uint64, balance *big.Int) []byte

func CreateEmptyAddress

func CreateEmptyAddress() state.AddressContainer

func CreateInMemoryShardAccountsDB

func CreateInMemoryShardAccountsDB() *state.AccountsDB

func CreateMemUnit

func CreateMemUnit() storage.Storer

func CreatePreparedTxProcessorAndAccountsWithIeleVM added in v1.0.3

func CreatePreparedTxProcessorAndAccountsWithIeleVM(
	t *testing.T,
	senderNonce uint64,
	senderAddressBytes []byte,
	senderBalance *big.Int,
) (process.TransactionProcessor, state.AccountsAdapter)

func CreatePreparedTxProcessorAndAccountsWithMockedVM

func CreatePreparedTxProcessorAndAccountsWithMockedVM(
	t *testing.T,
	vmOpGas uint64,
	senderNonce uint64,
	senderAddressBytes []byte,
	senderBalance *big.Int,
) (process.TransactionProcessor, state.AccountsAdapter)

func CreateTx

func CreateTx(
	t *testing.T,
	senderAddressBytes []byte,
	receiverAddressBytes []byte,
	senderNonce uint64,
	value *big.Int,
	gasPrice uint64,
	gasLimit uint64,
	scCodeOrFunc string,
	scValue uint64,
) *dataTransaction.Transaction

func CreateTxProcessorWithOneSCExecutorIeleVM added in v1.0.3

func CreateTxProcessorWithOneSCExecutorIeleVM(accnts state.AccountsAdapter) process.TransactionProcessor

func CreateTxProcessorWithOneSCExecutorMockVM

func CreateTxProcessorWithOneSCExecutorMockVM(accnts state.AccountsAdapter, opGas uint64) process.TransactionProcessor

func TestAccount

func TestAccount(
	t *testing.T,
	accnts state.AccountsAdapter,
	senderAddressBytes []byte,
	expectedNonce uint64,
	expectedBalance *big.Int,
)

func TestDeployedContractContents

func TestDeployedContractContents(
	t *testing.T,
	destinationAddressBytes []byte,
	accnts state.AccountsAdapter,
	requiredBalance *big.Int,
	scCode string,
	dataValues map[string]*big.Int,
)

Types

This section is empty.

Jump to

Keyboard shortcuts

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