Documentation ¶
Index ¶
- type MonitoredTransactor
- func (t *MonitoredTransactor) IncreaseGas(oldGp []*big.Int) []*big.Int
- func (t *MonitoredTransactor) Monitor(ctx context.Context, resendInterval time.Duration, txTimeout time.Duration, ...)
- func (t *MonitoredTransactor) Transact(to *common.Address, data []byte, opts transactor.TransactOptions) (*common.Hash, error)
- type RawTx
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MonitoredTransactor ¶
type MonitoredTransactor struct {
// contains filtered or unexported fields
}
func NewMonitoredTransactor ¶
func NewMonitoredTransactor( txFabric calls.TxFabric, gasPriceClient calls.GasPricer, client calls.ClientDispatcher, maxGasPrice *big.Int, increasePercentage *big.Int, ) *MonitoredTransactor
NewMonitoredTransactor creates an instance of a transactor that periodically checks sent transactions and resends them with higher gas if they are stuck.
Gas price is increased by increasePercentage param which is a percentage value with which old gas price should be increased (e.g 15)
func (*MonitoredTransactor) IncreaseGas ¶
func (t *MonitoredTransactor) IncreaseGas(oldGp []*big.Int) []*big.Int
increase gas bumps gas price by preset percentage.
If gas was 10 and the increaseFactor is 15 the new gas price would be 11 (it floors the value). In case the gas price didn't change it increases it by 1.
func (*MonitoredTransactor) Transact ¶
func (t *MonitoredTransactor) Transact(to *common.Address, data []byte, opts transactor.TransactOptions) (*common.Hash, error)
Click to show internal directories.
Click to hide internal directories.