transactions

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2025 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateCrossTxRequestMsg

func CreateCrossTxRequestMsg(ctx context.Context, ac1 *accounts.Account, ac2 *accounts.Account, signedTx1 []byte, signedTx2 []byte) ([]byte, error)

func CreateTransaction

func CreateTransaction(ctx context.Context, tx TransactionDetails, ac *accounts.Account) (*types.Transaction, []byte, error)

func CreateTransactionWithNonce

func CreateTransactionWithNonce(ctx context.Context, tx TransactionDetails, ac *accounts.Account, nonce uint64) (*types.Transaction, []byte, error)

func DistributeEth

func DistributeEth(ctx context.Context, sponsor *accounts.Account, recipients []*accounts.Account, amount *big.Int) error

DistributeEth distributes ETH to the given recipients. Used for distributing ETH from one account to multiple accounts.

func GenerateRandomSessionID

func GenerateRandomSessionID() *big.Int

generateRandomSessionID returns a random big.Int in the range [0, 2^63-1]

func GetTransactionDetails

func GetTransactionDetails(ctx context.Context, txHash common.Hash, rollup *rollup.Rollup) (*types.Transaction, *types.Receipt, error)

GetTransactionDetails retrieves transaction details from the blockchain using the transaction hash and RPC URL It will wait and retry every 600 milliseconds if the transaction is pending until it's confirmed or fails

func SendCrossTxRequestMsg

func SendCrossTxRequestMsg(ctx context.Context, rpcURL string, encodedPayload []byte) error

func SendTransaction

func SendTransaction(ctx context.Context, tx *types.Transaction, rpcURL string) (common.Hash, error)

Types

type TransactionDetails

type TransactionDetails struct {
	To        common.Address
	Value     *big.Int
	Data      []byte
	GasTipCap *big.Int
	GasFeeCap *big.Int
	Gas       uint64
}

Jump to

Keyboard shortcuts

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