package
1.7.0
Repository: https://github.com/keep-network/keep-common.git
Documentation: pkg.go.dev

# Functions

AddressFromHex converts the passed string to a common.Address and returns it, unless it is not a valid address, in which case it returns an error.
CallAtBlock allows the invocation of a particular contract method at a particular block.
ConnectClients takes HTTP and RPC URLs and returns initialized versions of standard, WebSocket, and RPC clients for the Ethereum node at that address.
DecryptKeyFile reads in a key file and uses the password to decrypt it.
EstimateGas tries to estimate the gas needed to execute a specific transaction based on the current pending state of the backend blockchain.
NewBalanceMonitor creates a new instance of the balance monitor.
NewBlockCounter creates a new BlockCounter instance for the provided Ethereum client.
NewErrorResolver returns an ErroResolver for the given Ethereum client, contract ABI, and contract address combination.
NewKeyedTransactorWithChainID is a utility method to easily create a transaction signer from a single private key.
NewMiningWaiter creates a new MiningWaiter instance for the provided Ethereum client.
NewNonceManager creates NonceManager instance for the provided account using the provided Ethereum client.
NewSigner creates a new EthereumSigner instance for the provided ECDSA private key.
WithResubscription wraps the subscribe function to call it repeatedly to keep a subscription alive.
WrapCallLogging wraps certain call-related methods on the given `client` with debug logging sent to the given `logger`.
WrapRateLimiting wraps the given contract backend with rate limiting capabilities with respect to the provided configuration.

# Constants

DefaultSubscribeOptsPastBlocks is the default number of past blocks pulled from the chain by the subscription monitoring mechanism if no other value is provided in SubscribeOpts when creating the subscription.
DefaultSubscribeOptsTick is the default duration with which past events are pulled from the chain by the subscription monitoring mechanism if no other value is provided in SubscribeOpts when creating the subscription.
SignatureSize is a byte size of a signature calculated by Ethereum with recovery-id, V, included.
SubscriptionAlertThreshold is time threshold below which event resubscription emits an error to the logs.
SubscriptionBackoffMax is the maximum backoff time between event resubscription attempts.

# Structs

BalanceMonitor provides the possibility to monitor balances for given accounts.
ErrorResolver bundles up the bits needed to turn errors like "failed to estimate gas needed" that are triggered by contract reverts but don't include revert causes into proper revert error messages from a contract by calling the contract method without trying to commit it.
EthereumSigner provides functions to sign a message and verify a signature using the Ethereum-specific signature format.
TransactionOptions represents custom transaction options which can be used while invoking contracts methods.

# Interfaces

EthereumClient wraps the core `bind.ContractBackend` interface with some other interfaces allowing to expose additional methods provided by client implementations.

# Type aliases

BalanceSource provides a balance info for the given address.