generatetransaction

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TaskName       = "generate_transaction"
	TaskDescriptor = &types.TaskDescriptor{
		Name:        TaskName,
		Description: "Generates normal transaction, sends it to the network and checks the receipt",
		Config:      DefaultConfig(),
		NewTask:     NewTask,
	}
)

Functions

func NewTask

func NewTask(ctx *types.TaskContext, options *types.TaskOptions) (types.Task, error)

Types

type Config

type Config struct {
	PrivateKey string `yaml:"privateKey" json:"privateKey"`

	LegacyTxType       bool     `yaml:"legacyTxType" json:"legacyTxType"`
	BlobTxType         bool     `yaml:"blobTxType" json:"blobTxType"`
	BlobFeeCap         *big.Int `yaml:"blobFeeCap" json:"blobFeeCap"`
	FeeCap             *big.Int `yaml:"feeCap" json:"feeCap"`
	TipCap             *big.Int `yaml:"tipCap" json:"tipCap"`
	GasLimit           uint64   `yaml:"gasLimit" json:"gasLimit"`
	TargetAddress      string   `yaml:"targetAddress" json:"targetAddress"`
	RandomTarget       bool     `yaml:"randomTarget" json:"randomTarget"`
	ContractDeployment bool     `yaml:"contractDeployment" json:"contractDeployment"`
	CallData           string   `yaml:"callData" json:"callData"`
	BlobData           string   `yaml:"blobData" json:"blobData"`
	RandomAmount       bool     `yaml:"randomAmount" json:"randomAmount"`
	Amount             *big.Int `yaml:"amount" json:"amount"`

	ClientPattern string `yaml:"clientPattern" json:"clientPattern"`

	AwaitReceipt  bool `yaml:"awaitReceipt" json:"awaitReceipt"`
	FailOnReject  bool `yaml:"failOnReject" json:"failOnReject"`
	FailOnSuccess bool `yaml:"failOnSuccess" json:"failOnSuccess"`
	ExpectEvents  []struct {
		Topic0 string `yaml:"topic0" json:"topic0"`
		Topic1 string `yaml:"topic1" json:"topic1"`
		Topic2 string `yaml:"topic2" json:"topic2"`
		Data   string `yaml:"data" json:"data"`
	} `yaml:"expectEvents" json:"expectEvents"`

	TransactionHashResultVar string `yaml:"transactionHashResultVar" json:"transactionHashResultVar"`
	ContractAddressResultVar string `yaml:"contractAddressResultVar" json:"contractAddressResultVar"`
}

func DefaultConfig

func DefaultConfig() Config

func (*Config) Validate

func (c *Config) Validate() error

type Task

type Task struct {
	// contains filtered or unexported fields
}

func (*Task) Config

func (t *Task) Config() interface{}

func (*Task) Description

func (t *Task) Description() string

func (*Task) Execute

func (t *Task) Execute(ctx context.Context) error

func (*Task) LoadConfig

func (t *Task) LoadConfig() error

func (*Task) Logger

func (t *Task) Logger() logrus.FieldLogger

func (*Task) Name

func (t *Task) Name() string

func (*Task) Timeout

func (t *Task) Timeout() time.Duration

func (*Task) Title

func (t *Task) Title() string

Jump to

Keyboard shortcuts

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