Documentation ¶
Index ¶
- type FeeHistory
- type FeeManager
- func (f *FeeManager) GetL1Fee(ctx context.Context, chainID uint64, input []byte) (uint64, error)
- func (f *FeeManager) SuggestedFees(ctx context.Context, chainID uint64) (*SuggestedFees, error)
- func (f *FeeManager) SuggestedFeesGwei(ctx context.Context, chainID uint64) (*SuggestedFeesGwei, error)
- func (f *FeeManager) TransactionEstimatedTime(ctx context.Context, chainID uint64, maxFeePerGas *big.Int) TransactionEstimation
- type GasFeeMode
- type MaxFeesLevels
- type SuggestedFees
- type SuggestedFeesGwei
- type TransactionEstimation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FeeHistory ¶
type FeeHistory struct {
BaseFeePerGas []string `json:"baseFeePerGas"`
}
type FeeManager ¶
func (*FeeManager) GetL1Fee ¶
Returns L1 fee for placing a transaction to L1 chain, appicable only for txs made from L2.
func (*FeeManager) SuggestedFees ¶
func (f *FeeManager) SuggestedFees(ctx context.Context, chainID uint64) (*SuggestedFees, error)
func (*FeeManager) SuggestedFeesGwei ¶
func (f *FeeManager) SuggestedFeesGwei(ctx context.Context, chainID uint64) (*SuggestedFeesGwei, error)
func (*FeeManager) TransactionEstimatedTime ¶
func (f *FeeManager) TransactionEstimatedTime(ctx context.Context, chainID uint64, maxFeePerGas *big.Int) TransactionEstimation
type MaxFeesLevels ¶
type MaxFeesLevels struct { Low *hexutil.Big `json:"low"` Medium *hexutil.Big `json:"medium"` High *hexutil.Big `json:"high"` }
func (*MaxFeesLevels) FeeFor ¶
func (m *MaxFeesLevels) FeeFor(mode GasFeeMode) *big.Int
type SuggestedFees ¶
type SuggestedFees struct { GasPrice *big.Int `json:"gasPrice"` BaseFee *big.Int `json:"baseFee"` MaxFeesLevels *MaxFeesLevels `json:"maxFeesLevels"` MaxPriorityFeePerGas *big.Int `json:"maxPriorityFeePerGas"` L1GasFee *big.Float `json:"l1GasFee,omitempty"` EIP1559Enabled bool `json:"eip1559Enabled"` }
func (*SuggestedFees) FeeFor ¶
func (s *SuggestedFees) FeeFor(mode GasFeeMode) *big.Int
type SuggestedFeesGwei ¶
type SuggestedFeesGwei struct { GasPrice *big.Float `json:"gasPrice"` BaseFee *big.Float `json:"baseFee"` MaxPriorityFeePerGas *big.Float `json:"maxPriorityFeePerGas"` MaxFeePerGasLow *big.Float `json:"maxFeePerGasLow"` MaxFeePerGasMedium *big.Float `json:"maxFeePerGasMedium"` MaxFeePerGasHigh *big.Float `json:"maxFeePerGasHigh"` L1GasFee *big.Float `json:"l1GasFee,omitempty"` EIP1559Enabled bool `json:"eip1559Enabled"` }
////////////////////////////////////////////////////////////////////////////// TODO: remove `SuggestedFeesGwei` struct once new router is in place //////////////////////////////////////////////////////////////////////////////
type TransactionEstimation ¶
type TransactionEstimation int
const ( Unknown TransactionEstimation = iota LessThanOneMinute LessThanThreeMinutes LessThanFiveMinutes MoreThanFiveMinutes )
Click to show internal directories.
Click to hide internal directories.