Documentation ¶
Overview ¶
Package eth provides Ethereum related helper functions
Index ¶
- func GetTransactionInfo(ctx context.Context, client ethereum.TransactionReader, hash common.Hash) (pipelinedb.TxState, *types.Transaction, *types.Receipt, error)
- func TxStateFromReceipt(receipt *types.Receipt) pipelinedb.TxState
- type EthAuditor
- type EthClient
- type EthPayer
- func (e *EthPayer) CheckNonceGroup(ctx context.Context, log *zap.Logger, nonceGroup *pipelinedb.NonceGroup, ...) (pipelinedb.TxState, []*pipelinedb.TxStatus, error)
- func (e *EthPayer) CheckPreconditions(ctx context.Context) (unmet []string, err error)
- func (e *EthPayer) CreateRawTransaction(ctx context.Context, log *zap.Logger, payouts []*pipelinedb.Payout, ...) (tx payer.Transaction, from common.Address, err error)
- func (e *EthPayer) EstimatedGasFee(ctx context.Context) (*big.Int, error)
- func (e *EthPayer) GetTokenBalance(ctx context.Context) (*big.Int, error)
- func (e *EthPayer) GetTokenDecimals(ctx context.Context) (int32, error)
- func (e *EthPayer) NextNonce(ctx context.Context) (uint64, error)
- func (e *EthPayer) PrintEstimate(ctx context.Context, remaining int64) error
- func (e *EthPayer) SendTransaction(ctx context.Context, log *zap.Logger, t payer.Transaction) error
- func (e *EthPayer) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTransactionInfo ¶
func TxStateFromReceipt ¶
func TxStateFromReceipt(receipt *types.Receipt) pipelinedb.TxState
Types ¶
type EthAuditor ¶
type EthAuditor struct {
// contains filtered or unexported fields
}
EthAuditor audits eth transactions.
func NewEthAuditor ¶
func NewEthAuditor(nodeAddress string) (*EthAuditor, error)
func (*EthAuditor) CheckConfirmedTransactionState ¶
func (e *EthAuditor) CheckConfirmedTransactionState(ctx context.Context, hash string) (pipelinedb.TxState, error)
func (*EthAuditor) CheckTransactionState ¶
func (e *EthAuditor) CheckTransactionState(ctx context.Context, hash string) (pipelinedb.TxState, error)
func (*EthAuditor) Close ¶
func (e *EthAuditor) Close()
type EthClient ¶
type EthClient interface { bind.ContractBackend ethereum.ChainReader ethereum.ChainStateReader ethereum.PendingStateReader ethereum.TransactionReader }
type EthPayer ¶
type EthPayer struct {
// contains filtered or unexported fields
}
func NewEthPayer ¶
func (*EthPayer) CheckNonceGroup ¶
func (e *EthPayer) CheckNonceGroup(ctx context.Context, log *zap.Logger, nonceGroup *pipelinedb.NonceGroup, checkOnly bool) (pipelinedb.TxState, []*pipelinedb.TxStatus, error)
func (*EthPayer) CheckPreconditions ¶
func (*EthPayer) CreateRawTransaction ¶
func (*EthPayer) EstimatedGasFee ¶
func (*EthPayer) GetTokenBalance ¶
func (*EthPayer) GetTokenDecimals ¶
func (*EthPayer) PrintEstimate ¶
func (*EthPayer) SendTransaction ¶
Click to show internal directories.
Click to hide internal directories.