difftreelog
doc: ethereum sponsoring clarification
in: master
1 file changed
pallets/evm-transaction-payment/src/lib.rsdiffbeforeafterboth89) -> Option<T::CrossAccountId> {89) -> Option<T::CrossAccountId> {90 let accept_gas_fee = |gas_fee| {90 let accept_gas_fee = |gas_fee| {91 let (base_fee, _) = T::FeeCalculator::min_gas_price();91 let (base_fee, _) = T::FeeCalculator::min_gas_price();92 // Metamask specifies base fee twice as much as chain reported minGasPrice93 // But we allow further leeway (why?), sponsored base_fee to be 2.1*minGasPrice, thus 21/10.92 base_fee <= gas_fee && gas_fee <= base_fee * 21 / 1094 base_fee <= gas_fee && gas_fee <= base_fee * 21 / 1093 };95 };94 let (max_fee_per_gas, may_sponsor) = match (max_fee_per_gas, is_transactional) {96 let (max_fee_per_gas, may_sponsor) = match (max_fee_per_gas, is_transactional) {