Documentation ¶
Index ¶
- func CalculateFees(tx *types.Transaction, state StateDB) (*big.Int, *big.Int, *big.Int, error)
- func CalculateL1Fee(data []byte, overhead, l1GasPrice *big.Int, scalar *big.Int) *big.Int
- func CalculateL1GasUsed(data []byte, overhead *big.Int) *big.Int
- func CalculateL1MsgFee(msg Message, state StateDB) (*big.Int, error)
- func VerifyFee(signer types.Signer, tx *types.Transaction, state StateDB) error
- type Message
- type StateDB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateFees ¶
func CalculateL1Fee ¶
CalculateL1Fee computes the L1 fee
func CalculateL1GasUsed ¶
CalculateL1GasUsed computes the L1 gas used based on the calldata and constant sized overhead. The overhead can be decreased as the cost of the batch submission goes down via contract optimizations. This will not overflow under standard network conditions.
func CalculateL1MsgFee ¶
CalculateL1MsgFee computes the L1 portion of the fee given a Message and a StateDB Reference: https://github.com/ethereum-optimism/optimism/blob/develop/l2geth/rollup/fees/rollup_fee.go
Types ¶
Click to show internal directories.
Click to hide internal directories.