Documentation ¶
Index ¶
- func CheckESDTBalance(t *testing.T, testContext *vm.VMTestContext, addr []byte, ...)
- func CheckESDTNFTBalance(tb testing.TB, testContext *vm.VMTestContext, addr []byte, ...)
- func CheckOwnerAddr(t *testing.T, testContext *vm.VMTestContext, scAddr []byte, owner []byte)
- func CleanAccumulatedIntermediateTransactions(tb testing.TB, testContext *vm.VMTestContext)
- func CreateAccountWithESDTBalance(t *testing.T, accnts state.AccountsAdapter, pubKey []byte, egldValue *big.Int, ...)
- func CreateAccountWithESDTBalanceAndRoles(t *testing.T, accnts state.AccountsAdapter, pubKey []byte, egldValue *big.Int, ...)
- func CreateAccountWithNFT(t *testing.T, accnts state.AccountsAdapter, pubKey []byte, egldValue *big.Int, ...)
- func CreateESDTLocalBurnTx(nonce uint64, sndAddr, rcvAddr []byte, tokenIdentifier []byte, ...) *transaction.Transaction
- func CreateESDTLocalMintTx(nonce uint64, sndAddr, rcvAddr []byte, tokenIdentifier []byte, ...) *transaction.Transaction
- func CreateESDTNFTBurnTx(nonce uint64, sndAddr, rcvAddr []byte, tokenIdentifier []byte, ...) *transaction.Transaction
- func CreateESDTNFTTransferTx(nonce uint64, sndAddr []byte, rcvAddr []byte, tokenIdentifier []byte, ...) *transaction.Transaction
- func CreateESDTNFTUpdateAttributesTx(nonce uint64, sndAddr []byte, tokenIdentifier []byte, gasPrice uint64, ...) *transaction.Transaction
- func CreateESDTTransferTx(nonce uint64, sndAddr, rcvAddr []byte, tokenIdentifier []byte, ...) *transaction.Transaction
- func CreateMultiTransferTX(nonce uint64, sender, dest []byte, gasPrice, gasLimit uint64, ...) *transaction.Transaction
- func CreateNFTSingleFreezeAndWipeTxs(nonce uint64, tokenManager, addressToFreeze []byte, tokenIdentifier []byte, ...) (*transaction.Transaction, *transaction.Transaction)
- func CreateSmartContractCall(nonce uint64, sndAddr []byte, rcvAddr []byte, gasPrice uint64, gasLimit uint64, ...) *transaction.Transaction
- func DoColdDeploy(tb testing.TB, testContext *vm.VMTestContext, pathToContract string, ...) (scAddr []byte, owner []byte)
- func DoDeploy(t *testing.T, testContext *vm.VMTestContext, pathToContract string) (scAddr []byte, owner []byte)
- func DoDeployDNS(t *testing.T, testContext *vm.VMTestContext, pathToContract string) (scAddr []byte, owner []byte)
- func DoDeployNoChecks(t *testing.T, testContext *vm.VMTestContext, pathToContract string) (scAddr []byte, owner []byte)
- func DoDeploySecond(t *testing.T, testContext *vm.VMTestContext, pathToContract string, ...) (scAddr []byte)
- func DoDeployWithCustomParams(tb testing.TB, testContext *vm.VMTestContext, pathToContract string, ...) (scAddr []byte, owner []byte)
- func DoDeployWithMetadata(t *testing.T, testContext *vm.VMTestContext, pathToContract string, ...) (scAddr []byte)
- func GenerateUserNameForMyDNSContract() []byte
- func OverwriteAccountStorageWithHexFileContent(tb testing.TB, testContext *vm.VMTestContext, address []byte, ...)
- func PrepareRelayerTxData(innerTx *transaction.Transaction) []byte
- func ProcessSCRResult(tb testing.TB, testContext *vm.VMTestContext, tx data.TransactionHandler, ...)
- func SetESDTRoles(t *testing.T, accnts state.AccountsAdapter, pubKey []byte, ...)
- func SetLastNFTNonce(t *testing.T, accnts state.AccountsAdapter, pubKey []byte, ...)
- func TestAccount(t *testing.T, accnts state.AccountsAdapter, senderAddressBytes []byte, ...) *big.Int
- type TransferESDTData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckESDTBalance ¶
func CheckESDTBalance(t *testing.T, testContext *vm.VMTestContext, addr []byte, tokenIdentifier []byte, expectedBalance *big.Int)
CheckESDTBalance -
func CheckESDTNFTBalance ¶
func CheckESDTNFTBalance(tb testing.TB, testContext *vm.VMTestContext, addr []byte, tokenIdentifier []byte, esdtNonce uint64, expectedBalance *big.Int)
CheckESDTNFTBalance -
func CheckOwnerAddr ¶
CheckOwnerAddr -
func CleanAccumulatedIntermediateTransactions ¶
func CleanAccumulatedIntermediateTransactions(tb testing.TB, testContext *vm.VMTestContext)
CleanAccumulatedIntermediateTransactions -
func CreateAccountWithESDTBalance ¶
func CreateAccountWithESDTBalance( t *testing.T, accnts state.AccountsAdapter, pubKey []byte, egldValue *big.Int, tokenIdentifier []byte, esdtNonce uint64, esdtValue *big.Int, )
CreateAccountWithESDTBalance -
func CreateAccountWithESDTBalanceAndRoles ¶
func CreateAccountWithESDTBalanceAndRoles( t *testing.T, accnts state.AccountsAdapter, pubKey []byte, egldValue *big.Int, tokenIdentifier []byte, esdtNonce uint64, esdtValue *big.Int, roles [][]byte, )
CreateAccountWithESDTBalanceAndRoles -
func CreateAccountWithNFT ¶
func CreateAccountWithNFT( t *testing.T, accnts state.AccountsAdapter, pubKey []byte, egldValue *big.Int, tokenIdentifier []byte, attributes []byte, )
CreateAccountWithNFT -
func CreateESDTLocalBurnTx ¶
func CreateESDTLocalBurnTx(nonce uint64, sndAddr, rcvAddr []byte, tokenIdentifier []byte, esdtValue *big.Int, gasPrice, gasLimit uint64) *transaction.Transaction
CreateESDTLocalBurnTx -
func CreateESDTLocalMintTx ¶
func CreateESDTLocalMintTx(nonce uint64, sndAddr, rcvAddr []byte, tokenIdentifier []byte, esdtValue *big.Int, gasPrice, gasLimit uint64) *transaction.Transaction
CreateESDTLocalMintTx -
func CreateESDTNFTBurnTx ¶
func CreateESDTNFTBurnTx(nonce uint64, sndAddr, rcvAddr []byte, tokenIdentifier []byte, tokenNonce uint64, esdtValue *big.Int, gasPrice, gasLimit uint64) *transaction.Transaction
CreateESDTNFTBurnTx -
func CreateESDTNFTTransferTx ¶
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 CreateESDTNFTUpdateAttributesTx ¶
func CreateESDTNFTUpdateAttributesTx( nonce uint64, sndAddr []byte, tokenIdentifier []byte, gasPrice uint64, gasLimit uint64, newAttributes []byte, ) *transaction.Transaction
CreateESDTNFTUpdateAttributesTx -
func CreateESDTTransferTx ¶
func CreateESDTTransferTx(nonce uint64, sndAddr, rcvAddr []byte, tokenIdentifier []byte, esdtValue *big.Int, gasPrice, gasLimit uint64) *transaction.Transaction
CreateESDTTransferTx -
func CreateMultiTransferTX ¶
func CreateMultiTransferTX(nonce uint64, sender, dest []byte, gasPrice, gasLimit uint64, tds ...*TransferESDTData) *transaction.Transaction
CreateMultiTransferTX -
func CreateNFTSingleFreezeAndWipeTxs ¶
func CreateNFTSingleFreezeAndWipeTxs(nonce uint64, tokenManager, addressToFreeze []byte, tokenIdentifier []byte, tokenNonce uint64, gasPrice, gasLimit uint64) (*transaction.Transaction, *transaction.Transaction)
CreateNFTSingleFreezeAndWipeTxs -
func CreateSmartContractCall ¶
func CreateSmartContractCall( nonce uint64, sndAddr []byte, rcvAddr []byte, gasPrice uint64, gasLimit uint64, endpointName string, arguments ...[]byte) *transaction.Transaction
CreateSmartContractCall -
func DoColdDeploy ¶
func DoColdDeploy( tb testing.TB, testContext *vm.VMTestContext, pathToContract string, senderBalance *big.Int, codeMetadata string, ) (scAddr []byte, owner []byte)
DoColdDeploy will deploy the SC code but won't call the constructor
func DoDeploy ¶
func DoDeploy(t *testing.T, testContext *vm.VMTestContext, pathToContract string) (scAddr []byte, owner []byte)
DoDeploy -
func DoDeployDNS ¶
func DoDeployDNS(t *testing.T, testContext *vm.VMTestContext, pathToContract string) (scAddr []byte, owner []byte)
DoDeployDNS -
func DoDeployNoChecks ¶
func DoDeployNoChecks(t *testing.T, testContext *vm.VMTestContext, pathToContract string) (scAddr []byte, owner []byte)
DoDeployNoChecks -
func DoDeploySecond ¶
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 DoDeployWithCustomParams ¶
func DoDeployWithCustomParams( tb testing.TB, testContext *vm.VMTestContext, pathToContract string, senderBalance *big.Int, gasLimit uint64, contractHexParams []string, ) (scAddr []byte, owner []byte)
DoDeployWithCustomParams -
func DoDeployWithMetadata ¶
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 ¶
func GenerateUserNameForMyDNSContract() []byte
GenerateUserNameForMyDNSContract -
func OverwriteAccountStorageWithHexFileContent ¶
func OverwriteAccountStorageWithHexFileContent(tb testing.TB, testContext *vm.VMTestContext, address []byte, pathToData string)
OverwriteAccountStorageWithHexFileContent applies pairs of <key,value> from provided file to the state of the provided address Before applying the data it does a cleanup on the old state the data from the file must be in the following format:
hex(key1),hex(value1) hex(key2),hex(value2) ...
Example: 61750100,0000 61750101,0001
func PrepareRelayerTxData ¶
func PrepareRelayerTxData(innerTx *transaction.Transaction) []byte
PrepareRelayerTxData -
func ProcessSCRResult ¶
func ProcessSCRResult( tb testing.TB, testContext *vm.VMTestContext, tx data.TransactionHandler, expectedCode vmcommon.ReturnCode, expectedErr error, )
ProcessSCRResult -
func SetESDTRoles ¶
func SetESDTRoles( t *testing.T, accnts state.AccountsAdapter, pubKey []byte, tokenIdentifier []byte, roles [][]byte, )
SetESDTRoles -
func SetLastNFTNonce ¶
func SetLastNFTNonce( t *testing.T, accnts state.AccountsAdapter, pubKey []byte, tokenIdentifier []byte, lastNonce uint64, )
SetLastNFTNonce -