From c14994fb09011197559484f81b52ca626bb93fab Mon Sep 17 00:00:00 2001 From: Yaroslav Bolyukin Date: Mon, 09 Oct 2023 14:04:55 +0000 Subject: [PATCH] doc: ethereum sponsoring clarification --- --- a/pallets/evm-transaction-payment/src/lib.rs +++ b/pallets/evm-transaction-payment/src/lib.rs @@ -89,6 +89,8 @@ ) -> Option { let accept_gas_fee = |gas_fee| { let (base_fee, _) = T::FeeCalculator::min_gas_price(); + // Metamask specifies base fee twice as much as chain reported minGasPrice + // But we allow further leeway (why?), sponsored base_fee to be 2.1*minGasPrice, thus 21/10. base_fee <= gas_fee && gas_fee <= base_fee * 21 / 10 }; let (max_fee_per_gas, may_sponsor) = match (max_fee_per_gas, is_transactional) { -- gitstuff