File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -1088,6 +1088,9 @@ parameter_types! {
10881088 pub SuicideQuickClearLimit : u32 = 0 ;
10891089}
10901090
1091+ /// The difference between EVM decimals and Substrate decimals.
1092+ /// Substrate balances has 9 decimals, while EVM has 18, so the
1093+ /// difference factor is 9 decimals, or 10^9
10911094const EVM_DECIMALS_FACTOR : u64 = 1_000_000_000_u64 ;
10921095
10931096pub struct SubtensorEvmBalanceConverter < F > ( PhantomData < F > ) ;
@@ -1556,7 +1559,9 @@ impl_runtime_apis! {
15561559
15571560 fn gas_price( ) -> U256 {
15581561 let ( gas_price, _) = <Runtime as pallet_evm:: Config >:: FeeCalculator :: min_gas_price( ) ;
1559- gas_price
1562+
1563+ // Recalculate decimals
1564+ gas_price * U256 :: from( EVM_DECIMALS_FACTOR )
15601565 }
15611566
15621567 fn account_code_at( address: H160 ) -> Vec <u8 > {
You can’t perform that action at this time.
0 commit comments