relayer

package
v0.0.0-...-8b5660e Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2025 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MAX_RETRIES                = 10
	WAIT_FOR_CONFIRMATION_TIME = 5 * time.Second
	ZERO_ADDRESS               = "0x0000000000000000000000000000000000000000"
	ZERO_HASH                  = "0x0000000000000000000000000000000000000000000000000000000000000000"
)

Variables

This section is empty.

Functions

func GetCurrentBaseFee

func GetCurrentBaseFee(client *ethclient.Client) (*big.Int, error)

func LoadPrivateKey

func LoadPrivateKey(envFilePath string, envVarName string) (string, error)

func LoadPrivateKeyArray

func LoadPrivateKeyArray(envFilePath string, envVarName string) ([]string, error)

Types

type L1Relayer

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

func NewL1Relayer

func NewL1Relayer(ctx context.Context, cfg *evm.GethConfig, l2Client *ethclient.Client, chain *kernel.Kernel, db *gorm.DB) (*L1Relayer, error)

func (*L1Relayer) HandleDownwardMessage

func (b *L1Relayer) HandleDownwardMessage(msg *orm.RawBridgeEvent) error

func (*L1Relayer) HandleDownwardMessageWithSystemCall

func (b *L1Relayer) HandleDownwardMessageWithSystemCall(msg *orm.RawBridgeEvent) error

HandleDownwardMessageWithSystemCall handles the downward message

func (*L1Relayer) HandleL1RelayerMessage

func (b *L1Relayer) HandleL1RelayerMessage(msg *orm.RawBridgeEvent) error

func (*L1Relayer) StartPolling

func (b *L1Relayer) StartPolling()

type L2Relayer

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

func NewL2Relayer

func NewL2Relayer(ctx context.Context, cfg *evm.GethConfig, db *gorm.DB) (*L2Relayer, error)

func (*L2Relayer) HandleL2RelayerMessage

func (b *L2Relayer) HandleL2RelayerMessage(ctx context.Context, bridgeEvent *orm.RawBridgeEvent) error

func (*L2Relayer) HandleUpwardMessage

func (b *L2Relayer) HandleUpwardMessage(ctx context.Context, bridgeEvent *orm.RawBridgeEvent) error

HandleUpwardMessage handle L2 Upward Message

func (*L2Relayer) StartPolling

func (b *L2Relayer) StartPolling()

type TransactionArgs

type TransactionArgs struct {
	From                 *common.Address `json:"from"`
	To                   *common.Address `json:"to"`
	Gas                  *hexutil.Uint64 `json:"gas"`
	GasPrice             *hexutil.Big    `json:"gasPrice"`
	MaxFeePerGas         *hexutil.Big    `json:"maxFeePerGas"`
	MaxPriorityFeePerGas *hexutil.Big    `json:"maxPriorityFeePerGas"`
	Value                *hexutil.Big    `json:"value"`
	Nonce                *hexutil.Uint64 `json:"nonce"`

	// We accept "data" and "input" for backwards-compatibility reasons.
	// "input" is the newer name and should be preferred by clients .
	// Issue detail: https://github.com/ethereum/go-ethereum/issues/15628
	Data  *hexutil.Bytes `json:"data"`
	Input *hexutil.Bytes `json:"input"`

	// Introduced by AccessListTxType transaction.
	AccessList *types.AccessList `json:"accessList,omitempty"`
	ChainID    *hexutil.Big      `json:"chainId,omitempty"`

	// For BlobTxType
	BlobFeeCap *hexutil.Big  `json:"maxFeePerBlobGas"`
	BlobHashes []common.Hash `json:"blobVersionedHashes,omitempty"`

	// For BlobTxType transactions with blob sidecar
	Blobs       []kzg4844.Blob       `json:"blobs"`
	Commitments []kzg4844.Commitment `json:"commitments"`
	Proofs      []kzg4844.Proof      `json:"proofs"`
	// contains filtered or unexported fields
}

TransactionArgs represents the arguments to construct a new transaction or a message call.

Jump to

Keyboard shortcuts

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