utils

package
v2.0.0-b1 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: GPL-3.0 Imports: 16 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDeposits

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

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

func GetLogs

func GetLogs(rp *rocketpool.RocketPool, addressFilter []common.Address, topicFilter [][]common.Hash, intervalSize, fromBlock, toBlock *big.Int, blockHash *common.Hash) ([]types.Log, error)

Gets the logs for a particular log request, breaking the calls into batches if necessary

func GetNodeSalt

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

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

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                beacon.ValidatorPubkey    `json:"pubkey"`
	WithdrawalCredentials common.Hash               `json:"withdrawalCredentials"`
	Amount                uint64                    `json:"amount"`
	Signature             beacon.ValidatorSignature `json:"signature"`
	TxHash                common.Hash               `json:"txHash"`
	BlockNumber           uint64                    `json:"blockNumber"`
	TxIndex               uint                      `json:"txIndex"`
}

Formatted Beacon deposit event data

type FilterQuery

type FilterQuery struct {
	BlockHash *common.Hash
	FromBlock *big.Int
	ToBlock   *big.Int
	Topics    [][]common.Hash
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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