File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -12,8 +12,24 @@ public struct EthereumTransaction: CustomStringConvertible {
12
12
public var gasPrice : BigUInt = 0
13
13
public var gasLimit : BigUInt = 0
14
14
15
- // EIP-1559
15
+ // MARK: - EIP-1559
16
+ /// Value of the tip to the miner for transaction processing.
17
+ ///
18
+ /// Full amount of this variable goes to a miner.
16
19
public var maxPriorityFeePerGas : BigUInt = 0
20
+
21
+ /// Value of the fee for one gas unit
22
+ ///
23
+ /// This value should be greather than sum of:
24
+ /// - `Block.nextBlockBaseFeePerGas` - baseFee which will burnt during the transaction processing
25
+ /// - `self.maxPriorityFeePerGas` - explicit amount of a tip to the miner of the given block which will include this transaction
26
+ ///
27
+ /// If amount of this will be **greather** than sum of `Block.baseFeePerGas` and `maxPriorityFeePerGas`
28
+ /// all exceed funds will be returned to the sender.
29
+ ///
30
+ /// If amount of this will be **lower** than sum of `Block.baseFeePerGas` and `maxPriorityFeePerGas`
31
+ /// miner will recieve amount of the follow equation: `maxFeePerGas - Block.baseFeePerGas` if any,
32
+ /// where Block is a block to which transaction will be included.
17
33
public var maxFeePerGas : BigUInt = 0
18
34
19
35
// The destination address of the message, left undefined for a contract-creation transaction.
Original file line number Diff line number Diff line change @@ -24,4 +24,4 @@ extension Web3 {
24
24
static let BaseFeeChangeDenominator : BigUInt = 8 // Bounds the amount the base fee can change between blocks.
25
25
static let ElasticityMultiplier : BigUInt = 2 // Bounds the maximum gas limit an EIP-1559 block may have.
26
26
static let InitialBaseFee : BigUInt = 1000000000 // Initial base fee for EIP-1559 blocks.
27
- }
27
+ }
You can’t perform that action at this time.
0 commit comments