Help us shape the future of Go! Take the 2026 Go Developer Survey

utils

package
v1.23.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: GPL-3.0, GPL-3.0 Imports: 21 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCurrentVersion

func GetCurrentVersion(rp *rocketpool.RocketPool, opts *bind.CallOpts) (*version.Version, error)

func GetDeposits

func GetDeposits(rp *rocketpool.RocketPool, pubkeys map[rptypes.ValidatorPubkey]bool, startBlock *big.Int, intervalSize *big.Int, opts *bind.CallOpts) (map[rptypes.ValidatorPubkey][]DepositData, error)

Gets all of the deposit contract's deposit events for the provided pubkeys

func GetNodeSalt

func GetNodeSalt(nodeAddress common.Address, salt *big.Int) common.Hash

Combine a node's address and a salt to retrieve a new salt compatible with depositing

func WaitForTransaction

func WaitForTransaction(client rocketpool.ExecutionClient, hash common.Hash) (*types.Receipt, error)

Wait for a transaction to get mined

func WaitForTransactionWithContext added in v1.20.0

func WaitForTransactionWithContext(ctx context.Context, client rocketpool.ExecutionClient, hash common.Hash) (*types.Receipt, error)

Wait for a transaction to get included, respecting the provided context for cancellation. The transaction lookup retries indefinitely (with 1-second pauses) until found or ctx is done.

Types

type BeaconDepositEvent

type BeaconDepositEvent struct {
	Pubkey                []byte    `abi:"pubkey"`
	WithdrawalCredentials []byte    `abi:"withdrawal_credentials"`
	Amount                []byte    `abi:"amount"`
	Signature             []byte    `abi:"signature"`
	Index                 []byte    `abi:"index"`
	Raw                   types.Log // Blockchain specific contextual infos
}

BeaconDepositEvent represents a DepositEvent event raised by the BeaconDeposit contract.

type DepositData

type DepositData struct {
	Pubkey                rptypes.ValidatorPubkey    `json:"pubkey"`
	WithdrawalCredentials common.Hash                `json:"withdrawalCredentials"`
	Amount                uint64                     `json:"amount"`
	Signature             rptypes.ValidatorSignature `json:"signature"`
	TxHash                common.Hash                `json:"txHash"`
	BlockNumber           uint64                     `json:"blockNumber"`
	TxIndex               uint                       `json:"txIndex"`
}

Formatted Beacon deposit event data

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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