Documentation
¶
Overview ¶
Package faucet provides functionality to find and interact with a faucet account in a blockchain. It offers utilities for locating the faucet account with the highest balance and retrieving its private key. The faucet account is typically used for distributing tokens to users during testing or development phases.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrAccountNotFound = errors.New("faucet account not found")
ErrAccountNotFound is returned when the faucet account is not found.
Functions ¶
func FindAccount ¶
func FindAccount(c *chain.Chain) (*ecdsa.PrivateKey, error)
FindAccount finds the faucet account in the given chain and returns its private key. It selects the wealthiest account with a valid private key present in the chain's genesis allocation. If no valid faucet account is found, it returns ErrAccountNotFound.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.