Documentation ¶
Index ¶
- Variables
- type ScenarioWithBenchmark
- type TestAccount
- func (tAcc *TestAccount) GetAddress() []byte
- func (tAcc *TestAccount) GetBalance() *big.Int
- func (tAcc *TestAccount) GetCode() []byte
- func (tAcc *TestAccount) GetNonce() uint64
- func (tAcc *TestAccount) GetOwner() []byte
- func (tAcc *TestAccount) GetStorage() map[string][]byte
- func (tAcc *TestAccount) WithAddress(address []byte) *TestAccount
- func (tAcc *TestAccount) WithBalance(balance *big.Int) *TestAccount
- func (tAcc *TestAccount) WithCode(code []byte) *TestAccount
- func (tAcc *TestAccount) WithNonce(nonce uint64) *TestAccount
- func (tAcc *TestAccount) WithOwner(owner []byte) *TestAccount
- func (tAcc *TestAccount) WithStorage(storage map[string][]byte) *TestAccount
- type Transaction
- func (tx *Transaction) GetCallArguments() [][]byte
- func (tx *Transaction) GetCallFunction() string
- func (tx *Transaction) GetCallValue() *big.Int
- func (tx *Transaction) GetDeployData() []byte
- func (tx *Transaction) GetESDTTransfers() []*mj.ESDTTxData
- func (tx *Transaction) GetGasLimitAndPrice() (uint64, uint64)
- func (tx *Transaction) GetNonce() uint64
- func (tx *Transaction) GetReceiverAddress() []byte
- func (tx *Transaction) GetSenderAddress() []byte
- func (tx *Transaction) WithCallArguments(arguments [][]byte) *Transaction
- func (tx *Transaction) WithCallFunction(functionName string) *Transaction
- func (tx *Transaction) WithCallValue(value *big.Int) *Transaction
- func (tx *Transaction) WithDeployData(scCodePath string, args [][]byte) *Transaction
- func (tx *Transaction) WithESDTTransfers(esdtTransfers []*mj.ESDTTxData) *Transaction
- func (tx *Transaction) WithGasLimitAndPrice(gasLimit, gasPrice uint64) *Transaction
- func (tx *Transaction) WithNonce(nonce uint64) *Transaction
- func (tx *Transaction) WithReceiverAddress(address []byte) *Transaction
- func (tx *Transaction) WithSenderAddress(address []byte) *Transaction
Constants ¶
This section is empty.
Variables ¶
View Source
var InvalidBenchmarkTxPos = -1
View Source
var ScAddressPrefix = []byte{0, 0, 0, 0, 0, 0, 0, 0, 5, 0}
View Source
var ScAddressPrefixLength = 10
Functions ¶
This section is empty.
Types ¶
type ScenarioWithBenchmark ¶
type ScenarioWithBenchmark struct { Accs []*TestAccount DeployedAccs []*TestAccount Txs []*Transaction DeployTxs []*Transaction BenchmarkTxPos int }
func GetAccountsAndTransactionsFromScenarios ¶
func GetAccountsAndTransactionsFromScenarios(testPath string) (stateAndBenchmarkInfo ScenarioWithBenchmark, err error)
type TestAccount ¶
type TestAccount struct {
// contains filtered or unexported fields
}
func NewTestAccount ¶
func NewTestAccount() *TestAccount
func SetNewAccount ¶
func (*TestAccount) GetAddress ¶
func (tAcc *TestAccount) GetAddress() []byte
func (*TestAccount) GetBalance ¶
func (tAcc *TestAccount) GetBalance() *big.Int
func (*TestAccount) GetCode ¶
func (tAcc *TestAccount) GetCode() []byte
func (*TestAccount) GetNonce ¶
func (tAcc *TestAccount) GetNonce() uint64
func (*TestAccount) GetOwner ¶
func (tAcc *TestAccount) GetOwner() []byte
func (*TestAccount) GetStorage ¶
func (tAcc *TestAccount) GetStorage() map[string][]byte
func (*TestAccount) WithAddress ¶
func (tAcc *TestAccount) WithAddress(address []byte) *TestAccount
func (*TestAccount) WithBalance ¶
func (tAcc *TestAccount) WithBalance(balance *big.Int) *TestAccount
func (*TestAccount) WithCode ¶
func (tAcc *TestAccount) WithCode(code []byte) *TestAccount
func (*TestAccount) WithNonce ¶
func (tAcc *TestAccount) WithNonce(nonce uint64) *TestAccount
func (*TestAccount) WithOwner ¶
func (tAcc *TestAccount) WithOwner(owner []byte) *TestAccount
func (*TestAccount) WithStorage ¶
func (tAcc *TestAccount) WithStorage(storage map[string][]byte) *TestAccount
type Transaction ¶
type Transaction struct {
// contains filtered or unexported fields
}
func CreateDeployTransaction ¶
func CreateTransaction ¶
func NewTransaction ¶
func NewTransaction() *Transaction
func (*Transaction) GetCallArguments ¶
func (tx *Transaction) GetCallArguments() [][]byte
func (*Transaction) GetCallFunction ¶
func (tx *Transaction) GetCallFunction() string
func (*Transaction) GetCallValue ¶
func (tx *Transaction) GetCallValue() *big.Int
func (*Transaction) GetDeployData ¶
func (tx *Transaction) GetDeployData() []byte
func (*Transaction) GetESDTTransfers ¶
func (tx *Transaction) GetESDTTransfers() []*mj.ESDTTxData
func (*Transaction) GetGasLimitAndPrice ¶
func (tx *Transaction) GetGasLimitAndPrice() (uint64, uint64)
func (*Transaction) GetNonce ¶
func (tx *Transaction) GetNonce() uint64
func (*Transaction) GetReceiverAddress ¶
func (tx *Transaction) GetReceiverAddress() []byte
func (*Transaction) GetSenderAddress ¶
func (tx *Transaction) GetSenderAddress() []byte
func (*Transaction) WithCallArguments ¶
func (tx *Transaction) WithCallArguments(arguments [][]byte) *Transaction
func (*Transaction) WithCallFunction ¶
func (tx *Transaction) WithCallFunction(functionName string) *Transaction
func (*Transaction) WithCallValue ¶
func (tx *Transaction) WithCallValue(value *big.Int) *Transaction
func (*Transaction) WithDeployData ¶
func (tx *Transaction) WithDeployData(scCodePath string, args [][]byte) *Transaction
func (*Transaction) WithESDTTransfers ¶
func (tx *Transaction) WithESDTTransfers(esdtTransfers []*mj.ESDTTxData) *Transaction
func (*Transaction) WithGasLimitAndPrice ¶
func (tx *Transaction) WithGasLimitAndPrice(gasLimit, gasPrice uint64) *Transaction
func (*Transaction) WithNonce ¶
func (tx *Transaction) WithNonce(nonce uint64) *Transaction
func (*Transaction) WithReceiverAddress ¶
func (tx *Transaction) WithReceiverAddress(address []byte) *Transaction
func (*Transaction) WithSenderAddress ¶
func (tx *Transaction) WithSenderAddress(address []byte) *Transaction
Click to show internal directories.
Click to hide internal directories.