diff --git a/runtime/acala/src/lib.rs b/runtime/acala/src/lib.rs index a9feceb355..8e08cb6daa 100644 --- a/runtime/acala/src/lib.rs +++ b/runtime/acala/src/lib.rs @@ -80,7 +80,7 @@ pub use sp_runtime::BuildStorage; pub use authority::AuthorityConfigImpl; pub use constants::{fee::*, time::*}; pub use primitives::{ - convert_decimals_to_evm, define_combined_task, + define_combined_task, evm::{AccessListItem, EstimateResourcesRequest}, task::TaskResult, AccountId, AccountIndex, Address, Amount, AuctionId, AuthoritysOriginId, Balance, BlockNumber, CurrencyId, @@ -1361,7 +1361,8 @@ pub struct StorageDepositPerByte; impl> frame_support::traits::Get for StorageDepositPerByte { fn get() -> I { // NOTE: ACA decimals is 12, convert to 18. - I::from(convert_decimals_to_evm(deposit(0, 1))) + // 30 * millicent(ACA) * 10^6 + I::from(300_000_000_000_000) } } diff --git a/runtime/integration-tests/src/evm.rs b/runtime/integration-tests/src/evm.rs index f159b33e04..eb89f6852e 100644 --- a/runtime/integration-tests/src/evm.rs +++ b/runtime/integration-tests/src/evm.rs @@ -362,9 +362,9 @@ fn test_evm_module() { #[cfg(feature = "with-mandala-runtime")] assert_eq!(Balances::free_balance(alice()), 998_963_300_000_000); #[cfg(feature = "with-karura-runtime")] - assert_eq!(Balances::free_balance(alice()), 996_889_900_000_000); + assert_eq!(Balances::free_balance(alice()), 998_963_300_000_000); #[cfg(feature = "with-acala-runtime")] - assert_eq!(Balances::free_balance(alice()), 993_779_800_000_000); + assert_eq!(Balances::free_balance(alice()), 996_889_900_000_000); assert_eq!(Balances::free_balance(bob()), 1_000 * dollar(NATIVE_CURRENCY)); let to = EvmAccounts::eth_address(&alice_key()); assert_ok!(Currencies::transfer( @@ -376,9 +376,9 @@ fn test_evm_module() { #[cfg(feature = "with-mandala-runtime")] assert_eq!(Balances::free_balance(alice()), 1_008_963_300_000_000); #[cfg(feature = "with-karura-runtime")] - assert_eq!(Balances::free_balance(alice()), 1_006_889_900_000_000); + assert_eq!(Balances::free_balance(alice()), 1_008_963_300_000_000); #[cfg(feature = "with-acala-runtime")] - assert_eq!(Balances::free_balance(alice()), 1_003_779_800_000_000); + assert_eq!(Balances::free_balance(alice()), 1_006_889_900_000_000); assert_eq!( Balances::free_balance(bob()), 1_000 * dollar(NATIVE_CURRENCY) - 10 * dollar(NATIVE_CURRENCY) @@ -577,9 +577,9 @@ fn should_not_kill_contract_on_transfer_all() { #[cfg(all(not(feature = "with-ethereum-compatibility"), feature = "with-mandala-runtime"))] assert_eq!(Balances::free_balance(alice()), 1_996_993_800_000_000); #[cfg(feature = "with-karura-runtime")] - assert_eq!(Balances::free_balance(alice()), 1_994_981_400_000_000); + assert_eq!(Balances::free_balance(alice()), 1_996_993_800_000_000); #[cfg(feature = "with-acala-runtime")] - assert_eq!(Balances::free_balance(alice()), 1_991_962_800_000_000); + assert_eq!(Balances::free_balance(alice()), 1_994_981_400_000_000); assert_ok!(Currencies::transfer( Origin::signed(EvmAddressMapping::::get_account_id(&contract)), @@ -595,9 +595,9 @@ fn should_not_kill_contract_on_transfer_all() { #[cfg(all(not(feature = "with-ethereum-compatibility"), feature = "with-mandala-runtime"))] assert_eq!(Balances::free_balance(alice()), 1_998_993_800_000_000); #[cfg(feature = "with-karura-runtime")] - assert_eq!(Balances::free_balance(alice()), 1_996_981_400_000_000); + assert_eq!(Balances::free_balance(alice()), 1_998_993_800_000_000); #[cfg(feature = "with-acala-runtime")] - assert_eq!(Balances::free_balance(alice()), 1_993_962_800_000_000); + assert_eq!(Balances::free_balance(alice()), 1_996_981_400_000_000); // assert the contract account is not purged assert!(EVM::accounts(contract).is_some()); diff --git a/runtime/karura/src/lib.rs b/runtime/karura/src/lib.rs index e0854c328d..ddc5563c0a 100644 --- a/runtime/karura/src/lib.rs +++ b/runtime/karura/src/lib.rs @@ -82,7 +82,7 @@ pub use sp_runtime::BuildStorage; pub use authority::AuthorityConfigImpl; pub use constants::{fee::*, parachains, time::*}; pub use primitives::{ - convert_decimals_to_evm, define_combined_task, + define_combined_task, evm::{AccessListItem, EstimateResourcesRequest}, task::TaskResult, AccountId, AccountIndex, Address, Amount, AuctionId, AuthoritysOriginId, Balance, BlockNumber, CurrencyId, @@ -1371,7 +1371,8 @@ pub struct StorageDepositPerByte; impl> frame_support::traits::Get for StorageDepositPerByte { fn get() -> I { // NOTE: KAR decimals is 12, convert to 18. - I::from(convert_decimals_to_evm(deposit(0, 1))) + // 10 * millicent(KAR) * 10^6 + I::from(100_000_000_000_000) } } diff --git a/runtime/mandala/src/lib.rs b/runtime/mandala/src/lib.rs index 9582d55ac0..15b463a4e7 100644 --- a/runtime/mandala/src/lib.rs +++ b/runtime/mandala/src/lib.rs @@ -62,7 +62,7 @@ use orml_traits::{ }; use pallet_transaction_payment::{FeeDetails, RuntimeDispatchInfo}; use primitives::{ - convert_decimals_to_evm, define_combined_task, + define_combined_task, evm::{AccessListItem, EthereumTransactionMessage}, task::TaskResult, unchecked_extrinsic::AcalaUncheckedExtrinsic, @@ -1509,7 +1509,8 @@ impl> frame_support::traits::Get for StorageDepositPerByte { fn get() -> I { #[cfg(not(feature = "with-ethereum-compatibility"))] // NOTE: ACA decimals is 12, convert to 18. - return I::from(convert_decimals_to_evm(deposit(0, 1))); + // 10 * millicent(ACA) * 10^6 + return I::from(100_000_000_000_000); #[cfg(feature = "with-ethereum-compatibility")] return I::from(0); }