Skip to content

Commit

Permalink
fix: create_and_manipulate_foreign_asset test
Browse files Browse the repository at this point in the history
  • Loading branch information
TarekkMA committed Nov 8, 2024
1 parent 095af22 commit dce7594
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions pallets/moonbeam-foreign-assets/src/evm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ use precompile_utils::solidity::Codec;
use precompile_utils_macro::keccak256;
use sp_runtime::traits::ConstU32;
use sp_runtime::DispatchError;
use sp_std::if_std;
use sp_std::vec::Vec;
use xcm::latest::Error as XcmError;

Expand All @@ -36,9 +37,9 @@ const ERC20_CREATE_MAX_CALLDATA_SIZE: usize = 16 * 1024; // 16Ko
const ERC20_CREATE_GAS_LIMIT: u64 = 3_367_000; // highest failure: 3_366_000
pub(crate) const ERC20_BURN_FROM_GAS_LIMIT: u64 = 155_000; // highest failure: 154_000
pub(crate) const ERC20_MINT_INTO_GAS_LIMIT: u64 = 155_000; // highest failure: 154_000
const ERC20_PAUSE_GAS_LIMIT: u64 = 150_000; // highest failure: 149_500
const ERC20_PAUSE_GAS_LIMIT: u64 = 150_500; // highest failure: 150_500
pub(crate) const ERC20_TRANSFER_GAS_LIMIT: u64 = 155_000; // highest failure: 154_000
const ERC20_UNPAUSE_GAS_LIMIT: u64 = 150_000; // highest failure: 149_500
const ERC20_UNPAUSE_GAS_LIMIT: u64 = 151_000; // highest failure: 150_200

pub enum EvmError {
BurnFromFail,
Expand Down Expand Up @@ -318,6 +319,11 @@ impl<T: crate::Config> EvmCaller<T> {
)
.map_err(|_| Error::<T>::EvmInternalError)?;

if_std! {
println!("EVM call result: {:?}", exec_info.exit_reason);
println!("EVM exec_info: {:?}", exec_info);
}

ensure!(
matches!(
exec_info.exit_reason,
Expand Down

0 comments on commit dce7594

Please sign in to comment.