scenario_exporter

package
v1.4.84 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

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 SetNewAccount(nonce uint64, address []byte, balance *big.Int, storage map[string][]byte, code []byte, ownerAddress []byte) *TestAccount

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 CreateDeployTransaction(args [][]byte, scCodePath string, sndAddr []byte, gasLimit uint64, gasPrice uint64) *Transaction

func CreateTransaction

func CreateTransaction(function string, args [][]byte, nonce uint64, value *big.Int, esdtTransfers []*mj.ESDTTxData, sndAddr []byte, rcvAddr []byte, gasLimit uint64, gasPrice uint64) *Transaction

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

Jump to

Keyboard shortcuts

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