求关注,关注我,一起进入Web3的世界
前文回顾
交易Gas解析
钱包Gas解读

费用清单
| Item | Value | Desc |
|---|---|---|
| 基础费用(BaseFee) | 0.102349622 Gwei | 基础费用是动态的,我们发送交易时是不确定的,只有交易完成之后才确定 |
| 优先费用(PriorityFee) | 1.5 Gwei | 给节点的小费,发送交易的时候指定 |
| 燃料限制(gasLimit) | 2,057,056 | 本次交易最多使用多少单位的Gas,发送交易的时候指定 |
| 使用的燃料 | 2,039,701 | 本次交易实际使用了多少单位的Gas |
| 每单位燃料的最大费用(MaxFeePerGas) | 1.617781424 Gwei | 由于BaseFee是动态的,所以发送交易的时候需要指MaxFee |
链上数据解读

费用计算
Transaction Fee计算
T r a n s a c t i o n F e e = ( B a s e + M a x P r i o r i t y ) ∗ U s a g e Transaction Fee = (Base + Max Priority) * Usage TransactionFee=(Base+MaxPriority)∗Usage
其中 TransactionFee 是
0.003268314126343022 ETH = 3268314.126343022 Gwei,然后将Base = 0.102349622 Gwei,Max Priority = 1.5 Gwei,Usage = 2,039,701代入等式,等式成立,说明我们的分析没有问题
Gas Price计算
G a s P r i c e = B a s e + M a x P r i o r i t y Gas Price = Base + Max Priority GasPrice=Base+MaxPriority
Base = 0.102349622 Gwei,Max Priority = 1.5 Gwei,代入等式,等式成立
Burnt:EIP-1559改进中规定,BaseFee会燃烧掉
B u r n t = B a s e ∗ U s a g e Burnt = Base * Usage Burnt=Base∗Usage
Burnt = 0.000208762626343022 ETH = 208762.626343022 Gwei,然后将Base = 0.102349622 Gwei,Usage = 2,039,701,代入等式,等式成立

本文详细解释了在Web3环境中,尤其是部署NFT交易时的费用构成,包括GasBaseFee、PriorityFee的计算,以及EIP-1559中BaseFee的燃烧机制。通过实例展示了TransactionFee和GasPrice的计算过程。
237

被折叠的 条评论
为什么被折叠?



