Documentation ¶
Index ¶
- Variables
- type Connection
- func (c *Connection) CallOpts(blocknumber *big.Int) *bind.CallOpts
- func (c *Connection) EnsureHasBytecode(addr ethcommon.Address) error
- func (c *Connection) Eth1Client() *ethclient.Client
- func (c *Connection) Eth1LatestBlock() (uint64, error)
- func (c *Connection) Eth2BeaconHead() (beacon.BeaconHead, error)
- func (c *Connection) Eth2Client() beacon.Client
- func (c *Connection) GetBeaconBlock(blockId string) (beacon.BeaconBlock, bool, error)
- func (c *Connection) GetSyncCommitteesForEpoch(epoch uint64) ([]beacon.SyncCommittee, error)
- func (c *Connection) GetValidatorProposerDuties(epoch uint64) (map[uint64]uint64, error)
- func (c *Connection) GetValidatorStatus(pubkey types.ValidatorPubkey, opts *beacon.ValidatorStatusOptions) (beacon.ValidatorStatus, error)
- func (c *Connection) GetValidatorStatusByIndex(index string, opts *beacon.ValidatorStatusOptions) (beacon.ValidatorStatus, error)
- func (c *Connection) GetValidatorStatuses(pubkeys []types.ValidatorPubkey, opts *beacon.ValidatorStatusOptions) (map[types.ValidatorPubkey]beacon.ValidatorStatus, error)
- func (c *Connection) Keypair() *secp256k1.Keypair
- func (c *Connection) LockAndUpdateTxOpts() error
- func (c *Connection) SafeEstimateFee(ctx context.Context) (*big.Int, *big.Int, error)
- func (c *Connection) TxOpts() *bind.TransactOpts
- func (c *Connection) UnlockTxOpts()
Constants ¶
This section is empty.
Variables ¶
View Source
var Gwei10 = big.NewInt(10e9)
View Source
var Gwei20 = big.NewInt(20e9)
View Source
var Gwei5 = big.NewInt(5e9)
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func NewConnection ¶
func NewConnection(eth1Endpoint, eth2Endpoint string, kp *secp256k1.Keypair, gasLimit, maxGasPrice *big.Int) (*Connection, error)
NewConnection returns an uninitialized connection, must call Connection.Connect() before using.
func (*Connection) EnsureHasBytecode ¶
func (c *Connection) EnsureHasBytecode(addr ethcommon.Address) error
EnsureHasBytecode asserts if contract code exists at the specified address
func (*Connection) Eth1Client ¶
func (c *Connection) Eth1Client() *ethclient.Client
func (*Connection) Eth1LatestBlock ¶
func (c *Connection) Eth1LatestBlock() (uint64, error)
LatestBlock returns the latest block from the current chain
func (*Connection) Eth2BeaconHead ¶
func (c *Connection) Eth2BeaconHead() (beacon.BeaconHead, error)
func (*Connection) Eth2Client ¶
func (c *Connection) Eth2Client() beacon.Client
func (*Connection) GetBeaconBlock ¶
func (c *Connection) GetBeaconBlock(blockId string) (beacon.BeaconBlock, bool, error)
func (*Connection) GetSyncCommitteesForEpoch ¶
func (c *Connection) GetSyncCommitteesForEpoch(epoch uint64) ([]beacon.SyncCommittee, error)
func (*Connection) GetValidatorProposerDuties ¶
func (c *Connection) GetValidatorProposerDuties(epoch uint64) (map[uint64]uint64, error)
func (*Connection) GetValidatorStatus ¶
func (c *Connection) GetValidatorStatus(pubkey types.ValidatorPubkey, opts *beacon.ValidatorStatusOptions) (beacon.ValidatorStatus, error)
func (*Connection) GetValidatorStatusByIndex ¶
func (c *Connection) GetValidatorStatusByIndex(index string, opts *beacon.ValidatorStatusOptions) (beacon.ValidatorStatus, error)
func (*Connection) GetValidatorStatuses ¶
func (c *Connection) GetValidatorStatuses(pubkeys []types.ValidatorPubkey, opts *beacon.ValidatorStatusOptions) (map[types.ValidatorPubkey]beacon.ValidatorStatus, error)
func (*Connection) Keypair ¶
func (c *Connection) Keypair() *secp256k1.Keypair
func (*Connection) LockAndUpdateTxOpts ¶
func (c *Connection) LockAndUpdateTxOpts() error
LockAndUpdateOpts acquires a lock on the opts before updating the nonce and gas price.
func (*Connection) SafeEstimateFee ¶
return suggest gastipcap gasfeecap
func (*Connection) TxOpts ¶
func (c *Connection) TxOpts() *bind.TransactOpts
func (*Connection) UnlockTxOpts ¶
func (c *Connection) UnlockTxOpts()
Click to show internal directories.
Click to hide internal directories.