Documentation ¶
Index ¶
- Constants
- func Dial(gethIpcPath string) (*ethclient.Client, error)
- func ExtractSender(tx *ethTypes.Transaction) (common.Address, error)
- func FetchReceipt(client *ethclient.Client, tx *types.Transaction, cfg TxConfig) (*types.Receipt, error)
- func GenerateTxOpts(ctx context.Context, client *ethclient.Client, auth authy.Auth, cfg TxConfig) (*bind.TransactOpts, error)
- func SignTransferTx(ctx context.Context, client *ethclient.Client, auth authy.Auth, ...) (*types.Transaction, error)
- type TxConfig
Constants ¶
View Source
const MinGasPrice = 500000000000
View Source
const TxReceiptInterval = 1 * time.Second
View Source
const TxReceiptTimeout = 30 * time.Second
Variables ¶
This section is empty.
Functions ¶
func Dial ¶
Dial connects to network and returns directly the official ETH connected Client.
Is recommended to always construct the *ethclient.Client using this Dial method as it only returns the Client when the blockchain is fully synced to avoid performing TXs from a non-synced state.
func ExtractSender ¶ added in v1.3.0
func ExtractSender(tx *ethTypes.Transaction) (common.Address, error)
func FetchReceipt ¶
func FetchReceipt(client *ethclient.Client, tx *types.Transaction, cfg TxConfig) (*types.Receipt, error)
FetchReceipt periodically checks if transaction was already mined.
Returns TX receipt when transaction succeeds. Error otherwise.
func GenerateTxOpts ¶
Types ¶
type TxConfig ¶
type TxConfig struct {
// contains filtered or unexported fields
}
func NewTransferTxConfig ¶
func NewTransferTxConfig() TxConfig
func NewTxConfig ¶
func (TxConfig) TxReceiptInterval ¶
func (TxConfig) TxReceiptTimeout ¶
Click to show internal directories.
Click to hide internal directories.