types

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2025 License: LGPL-3.0, MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attempt

type Attempt struct {
	ID                uint64
	TxID              uint64
	Hash              common.Hash
	Fee               gas.EvmFee
	GasLimit          uint64
	Type              byte
	SignedTransaction *types.Transaction

	CreatedAt   time.Time
	BroadcastAt *time.Time
}

func (*Attempt) DeepCopy

func (a *Attempt) DeepCopy() *Attempt

func (*Attempt) String

func (a *Attempt) String() string

type QueueingTxStrategy

type QueueingTxStrategy struct {
	QueueSize uint32
	Subject   uuid.NullUUID
}

type Transaction

type Transaction struct {
	ID                uint64
	IdempotencyKey    *string
	ChainID           *big.Int
	Nonce             *uint64
	FromAddress       common.Address
	ToAddress         common.Address
	Value             *big.Int
	Data              []byte
	SpecifiedGasLimit uint64

	CreatedAt          time.Time
	InitialBroadcastAt *time.Time
	LastBroadcastAt    *time.Time

	State        commontypes.TxState
	IsPurgeable  bool
	Attempts     []*Attempt
	AttemptCount uint16 // AttempCount is strictly kept in memory and prevents indefinite retrying
	Meta         *sqlutil.JSON
	Subject      uuid.NullUUID

	// Pipeline variables - if you aren't calling this from chain tx task within
	// the pipeline, you don't need these variables
	PipelineTaskRunID uuid.NullUUID
	MinConfirmations  clnull.Uint32
	SignalCallback    bool
	CallbackCompleted bool
}

func (*Transaction) DeepCopy

func (t *Transaction) DeepCopy() *Transaction

func (*Transaction) FindAttemptByHash

func (t *Transaction) FindAttemptByHash(attemptHash common.Hash) (*Attempt, error)

func (*Transaction) GetMeta

func (t *Transaction) GetMeta() (*TxMeta, error)

func (*Transaction) PrintWithAttempts

func (t *Transaction) PrintWithAttempts() string

func (*Transaction) String

func (t *Transaction) String() string

type TxMeta

type TxMeta struct {
	// Pipeline
	JobID        *int32    `json:"JobID,omitempty"`
	FailOnRevert null.Bool `json:"FailOnRevert,omitempty"`

	// VRF
	RequestID               *common.Hash  `json:"RequestID,omitempty"`
	RequestTxHash           *common.Hash  `json:"RequestTxHash,omitempty"`
	RequestIDs              []common.Hash `json:"RequestIDs,omitempty"`
	RequestTxHashes         []common.Hash `json:"RequestTxHashes,omitempty"`
	MaxLink                 *string       `json:"MaxLink,omitempty"`
	SubID                   *uint64       `json:"SubId,omitempty"`
	GlobalSubID             *string       `json:"GlobalSubId,omitempty"`
	MaxEth                  *string       `json:"MaxEth,omitempty"`
	ForceFulfilled          *bool         `json:"ForceFulfilled,omitempty"`
	ForceFulfillmentAttempt *uint64       `json:"ForceFulfillmentAttempt,omitempty"`

	// Used for keepers
	UpkeepID *string `json:"UpkeepID,omitempty"`

	// Used for Keystone Workflows
	WorkflowExecutionID *string `json:"WorkflowExecutionID,omitempty"`

	// Forwarders
	FwdrDestAddress *common.Address `json:"ForwarderDestAddress,omitempty"`

	// CCIP
	MessageIDs []string `json:"MessageIDs,omitempty"`
	SeqNumbers []uint64 `json:"SeqNumbers,omitempty"`

	// Dual Broadcast
	DualBroadcast       *bool   `json:"DualBroadcast,omitempty"`
	DualBroadcastParams *string `json:"DualBroadcastParams,omitempty"`
}

type TxRequest

type TxRequest struct {
	IdempotencyKey    *string
	ChainID           *big.Int
	FromAddress       common.Address
	ToAddress         common.Address
	Value             *big.Int
	Data              []byte
	SpecifiedGasLimit uint64

	Meta             *sqlutil.JSON // TODO: *TxMeta after migration
	ForwarderAddress common.Address

	// Pipeline variables - if you aren't calling this from chain tx task within
	// the pipeline, you don't need these variables
	PipelineTaskRunID uuid.NullUUID
	MinConfirmations  clnull.Uint32
	SignalCallback    bool
}

Jump to

Keyboard shortcuts

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