Documentation ¶
Index ¶
- func CheckDCDTBalance(t *testing.T, testContext *vm.VMTestContext, addr []byte, ...)
- func CheckDCDTNFTBalance(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 CreateAccountWithDCDTBalance(t *testing.T, accnts state.AccountsAdapter, pubKey []byte, rewaValue *big.Int, ...)
- func CreateAccountWithDCDTBalanceAndRoles(t *testing.T, accnts state.AccountsAdapter, pubKey []byte, rewaValue *big.Int, ...)
- func CreateAccountWithNFT(t *testing.T, accnts state.AccountsAdapter, pubKey []byte, rewaValue *big.Int, ...)
- func CreateDCDTLocalBurnTx(nonce uint64, sndAddr, rcvAddr []byte, tokenIdentifier []byte, ...) *transaction.Transaction
- func CreateDCDTLocalMintTx(nonce uint64, sndAddr, rcvAddr []byte, tokenIdentifier []byte, ...) *transaction.Transaction
- func CreateDCDTNFTBurnTx(nonce uint64, sndAddr, rcvAddr []byte, tokenIdentifier []byte, ...) *transaction.Transaction
- func CreateDCDTNFTTransferTx(nonce uint64, sndAddr []byte, rcvAddr []byte, tokenIdentifier []byte, ...) *transaction.Transaction
- func CreateDCDTNFTUpdateAttributesTx(nonce uint64, sndAddr []byte, tokenIdentifier []byte, gasPrice uint64, ...) *transaction.Transaction
- func CreateDCDTTransferTx(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 DoDeployOldCounter(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 GenerateUserNameForDNSContract(contractAddress []byte) []byte
- func GenerateUserNameForDefaultDNSContract() []byte
- func OverwriteAccountStorageWithHexFileContent(tb testing.TB, testContext *vm.VMTestContext, address []byte, ...)
- func ProcessSCRResult(tb testing.TB, testContext *vm.VMTestContext, tx data.TransactionHandler, ...)
- func SetDCDTRoles(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 TransferDCDTData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckDCDTBalance ¶
func CheckDCDTBalance(t *testing.T, testContext *vm.VMTestContext, addr []byte, tokenIdentifier []byte, expectedBalance *big.Int)
CheckDCDTBalance -
func CheckDCDTNFTBalance ¶
func CheckDCDTNFTBalance(tb testing.TB, testContext *vm.VMTestContext, addr []byte, tokenIdentifier []byte, dcdtNonce uint64, expectedBalance *big.Int)
CheckDCDTNFTBalance -
func CheckOwnerAddr ¶
CheckOwnerAddr -
func CleanAccumulatedIntermediateTransactions ¶
func CleanAccumulatedIntermediateTransactions(tb testing.TB, testContext *vm.VMTestContext)
CleanAccumulatedIntermediateTransactions -
func CreateAccountWithDCDTBalance ¶
func CreateAccountWithDCDTBalance( t *testing.T, accnts state.AccountsAdapter, pubKey []byte, rewaValue *big.Int, tokenIdentifier []byte, dcdtNonce uint64, dcdtValue *big.Int, )
CreateAccountWithDCDTBalance -
func CreateAccountWithDCDTBalanceAndRoles ¶
func CreateAccountWithDCDTBalanceAndRoles( t *testing.T, accnts state.AccountsAdapter, pubKey []byte, rewaValue *big.Int, tokenIdentifier []byte, dcdtNonce uint64, dcdtValue *big.Int, roles [][]byte, )
CreateAccountWithDCDTBalanceAndRoles -
func CreateAccountWithNFT ¶
func CreateAccountWithNFT( t *testing.T, accnts state.AccountsAdapter, pubKey []byte, rewaValue *big.Int, tokenIdentifier []byte, attributes []byte, )
CreateAccountWithNFT -
func CreateDCDTLocalBurnTx ¶
func CreateDCDTLocalBurnTx(nonce uint64, sndAddr, rcvAddr []byte, tokenIdentifier []byte, dcdtValue *big.Int, gasPrice, gasLimit uint64) *transaction.Transaction
CreateDCDTLocalBurnTx -
func CreateDCDTLocalMintTx ¶
func CreateDCDTLocalMintTx(nonce uint64, sndAddr, rcvAddr []byte, tokenIdentifier []byte, dcdtValue *big.Int, gasPrice, gasLimit uint64) *transaction.Transaction
CreateDCDTLocalMintTx -
func CreateDCDTNFTBurnTx ¶
func CreateDCDTNFTBurnTx(nonce uint64, sndAddr, rcvAddr []byte, tokenIdentifier []byte, tokenNonce uint64, dcdtValue *big.Int, gasPrice, gasLimit uint64) *transaction.Transaction
CreateDCDTNFTBurnTx -
func CreateDCDTNFTTransferTx ¶
func CreateDCDTNFTTransferTx( nonce uint64, sndAddr []byte, rcvAddr []byte, tokenIdentifier []byte, dcdtNonce uint64, dcdtValue *big.Int, gasPrice uint64, gasLimit uint64, endpointName string, arguments ...[]byte) *transaction.Transaction
CreateDCDTNFTTransferTx -
func CreateDCDTNFTUpdateAttributesTx ¶
func CreateDCDTNFTUpdateAttributesTx( nonce uint64, sndAddr []byte, tokenIdentifier []byte, gasPrice uint64, gasLimit uint64, newAttributes []byte, ) *transaction.Transaction
CreateDCDTNFTUpdateAttributesTx -
func CreateDCDTTransferTx ¶
func CreateDCDTTransferTx(nonce uint64, sndAddr, rcvAddr []byte, tokenIdentifier []byte, dcdtValue *big.Int, gasPrice, gasLimit uint64) *transaction.Transaction
CreateDCDTTransferTx -
func CreateMultiTransferTX ¶
func CreateMultiTransferTX(nonce uint64, sender, dest []byte, gasPrice, gasLimit uint64, tds ...*TransferDCDTData) *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 DoDeployOldCounter ¶
func DoDeployOldCounter( t *testing.T, testContext *vm.VMTestContext, pathToContract string, ) (scAddr []byte, owner []byte)
DoDeployOldCounter -
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 GenerateUserNameForDNSContract ¶
GenerateUserNameForDNSContract -
func GenerateUserNameForDefaultDNSContract ¶
func GenerateUserNameForDefaultDNSContract() []byte
GenerateUserNameForDefaultDNSContract -
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 ProcessSCRResult ¶
func ProcessSCRResult( tb testing.TB, testContext *vm.VMTestContext, tx data.TransactionHandler, expectedCode vmcommon.ReturnCode, expectedErr error, )
ProcessSCRResult -
func SetDCDTRoles ¶
func SetDCDTRoles( t *testing.T, accnts state.AccountsAdapter, pubKey []byte, tokenIdentifier []byte, roles [][]byte, )
SetDCDTRoles -
func SetLastNFTNonce ¶
func SetLastNFTNonce( t *testing.T, accnts state.AccountsAdapter, pubKey []byte, tokenIdentifier []byte, lastNonce uint64, )
SetLastNFTNonce -