utils

package
v1.3.42 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2022 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckESDTBalance added in v1.1.22

func CheckESDTBalance(t *testing.T, testContext *vm.VMTestContext, addr []byte, tokenIdentifier []byte, expectedBalance *big.Int)

CheckESDTBalance -

func CheckESDTNFTBalance added in v1.2.23

func CheckESDTNFTBalance(t *testing.T, testContext *vm.VMTestContext, addr []byte, tokenIdentifier []byte, esdtNonce uint64, expectedBalance *big.Int)

CheckESDTNFTBalance -

func CheckOwnerAddr

func CheckOwnerAddr(t *testing.T, testContext *vm.VMTestContext, scAddr []byte, owner []byte)

CheckOwnerAddr -

func CleanAccumulatedIntermediateTransactions

func CleanAccumulatedIntermediateTransactions(t *testing.T, testContext *vm.VMTestContext)

CleanAccumulatedIntermediateTransactions -

func CreateAccountWithESDTBalance added in v1.1.22

func CreateAccountWithESDTBalance(
	t *testing.T,
	accnts state.AccountsAdapter,
	pubKey []byte,
	egldValue *big.Int,
	tokenIdentifier []byte,
	esdtNonce uint64,
	esdtValue *big.Int,
)

CreateAccountWithESDTBalance -

func CreateAccountWithESDTBalanceAndRoles added in v1.1.39

func CreateAccountWithESDTBalanceAndRoles(
	t *testing.T,
	accnts state.AccountsAdapter,
	pubKey []byte,
	egldValue *big.Int,
	tokenIdentifier []byte,
	esdtNonce uint64,
	esdtValue *big.Int,
	roles [][]byte,
)

CreateAccountWithESDTBalanceAndRoles -

func CreateESDTLocalBurnTx added in v1.1.39

func CreateESDTLocalBurnTx(nonce uint64, sndAddr, rcvAddr []byte, tokenIdentifier []byte, esdtValue *big.Int, gasPrice, gasLimit uint64) *transaction.Transaction

CreateESDTLocalBurnTx -

func CreateESDTLocalMintTx added in v1.1.39

func CreateESDTLocalMintTx(nonce uint64, sndAddr, rcvAddr []byte, tokenIdentifier []byte, esdtValue *big.Int, gasPrice, gasLimit uint64) *transaction.Transaction

CreateESDTLocalMintTx -

func CreateESDTNFTTransferTx added in v1.2.23

func CreateESDTNFTTransferTx(
	nonce uint64,
	sndAddr []byte,
	rcvAddr []byte,
	tokenIdentifier []byte,
	esdtNonce uint64,
	esdtValue *big.Int,
	gasPrice uint64,
	gasLimit uint64,
	endpointName string,
	arguments ...[]byte) *transaction.Transaction

CreateESDTNFTTransferTx -

func CreateESDTTransferTx added in v1.1.22

func CreateESDTTransferTx(nonce uint64, sndAddr, rcvAddr []byte, tokenIdentifier []byte, esdtValue *big.Int, gasPrice, gasLimit uint64) *transaction.Transaction

CreateESDTTransferTx -

func CreateMultiTransferTX added in v1.3.0

func CreateMultiTransferTX(nonce uint64, sender, dest []byte, gasPrice, gasLimit uint64, tds ...*TransferESDTData) *transaction.Transaction

CreateMultiTransferTX -

func CreateSmartContractCall added in v1.2.23

func CreateSmartContractCall(
	nonce uint64,
	sndAddr []byte,
	rcvAddr []byte,
	gasPrice uint64,
	gasLimit uint64,
	endpointName string,
	arguments ...[]byte) *transaction.Transaction

CreateSmartContractCall -

func DoDeploy

func DoDeploy(t *testing.T, testContext *vm.VMTestContext, pathToContract string) (scAddr []byte, owner []byte)

DoDeploy -

func DoDeployDNS added in v1.1.22

func DoDeployDNS(t *testing.T, testContext *vm.VMTestContext, pathToContract string) (scAddr []byte, owner []byte)

DoDeployDNS -

func DoDeployNoChecks added in v1.2.4

func DoDeployNoChecks(t *testing.T, testContext *vm.VMTestContext, pathToContract string) (scAddr []byte, owner []byte)

DoDeployNoChecks -

func DoDeploySecond added in v1.1.22

func DoDeploySecond(
	t *testing.T,
	testContext *vm.VMTestContext,
	pathToContract string,
	senderAccount vmcommon.AccountHandler,
	gasPrice uint64,
	gasLimit uint64,
	args [][]byte,
	value *big.Int,
) (scAddr []byte)

DoDeploySecond -

func DoDeployWithMetadata added in v1.3.35

func DoDeployWithMetadata(
	t *testing.T,
	testContext *vm.VMTestContext,
	pathToContract string,
	senderAccount vmcommon.AccountHandler,
	gasPrice uint64,
	gasLimit uint64,
	metadata []byte,
	args [][]byte,
	value *big.Int,
) (scAddr []byte)

DoDeployWithMetadata -

func GenerateUserNameForMyDNSContract added in v1.1.22

func GenerateUserNameForMyDNSContract() []byte

GenerateUserNameForMyDNSContract -

func PrepareRelayerTxData

func PrepareRelayerTxData(innerTx *transaction.Transaction) []byte

PrepareRelayerTxData -

func ProcessSCRResult

func ProcessSCRResult(
	t *testing.T,
	testContext *vm.VMTestContext,
	tx data.TransactionHandler,
	expectedCode vmcommon.ReturnCode,
	expectedErr error,
)

ProcessSCRResult -

func SetESDTRoles added in v1.2.23

func SetESDTRoles(
	t *testing.T,
	accnts state.AccountsAdapter,
	pubKey []byte,
	tokenIdentifier []byte,
	roles [][]byte,
)

SetESDTRoles -

func SetLastNFTNonce added in v1.2.23

func SetLastNFTNonce(
	t *testing.T,
	accnts state.AccountsAdapter,
	pubKey []byte,
	tokenIdentifier []byte,
	lastNonce uint64,
)

SetLastNFTNonce -

func TestAccount

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

TestAccount -

Types

type TransferESDTData added in v1.3.0

type TransferESDTData struct {
	Token []byte
	Nonce uint64
	Value *big.Int
}

TransferESDTData -

Jump to

Keyboard shortcuts

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