Skip to content

Commit f6bcb02

Browse files
committed
fix squash merge to maybe_force_create_address
1 parent 852f1a2 commit f6bcb02

File tree

1 file changed

+54
-24
lines changed

1 file changed

+54
-24
lines changed

frame/ethereum/src/lib.rs

Lines changed: 54 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -865,30 +865,60 @@ impl<T: Config> Pallet<T> {
865865
Ok((Some(target), None, CallOrCreateInfo::Call(res)))
866866
}
867867
ethereum::TransactionAction::Create => {
868-
let res = match T::Runner::create(
869-
from,
870-
input,
871-
value,
872-
gas_limit.unique_saturated_into(),
873-
max_fee_per_gas,
874-
max_priority_fee_per_gas,
875-
nonce,
876-
access_list,
877-
is_transactional,
878-
validate,
879-
weight_limit,
880-
proof_size_base_cost,
881-
config.as_ref().unwrap_or_else(|| T::config()),
882-
) {
883-
Ok(res) => res,
884-
Err(e) => {
885-
return Err(DispatchErrorWithPostInfo {
886-
post_info: PostDispatchInfo {
887-
actual_weight: Some(e.weight),
888-
pays_fee: Pays::Yes,
889-
},
890-
error: e.error.into(),
891-
})
868+
let res = if let Some(force_address) = maybe_force_create_address {
869+
match T::Runner::create_force_address(
870+
from,
871+
input,
872+
value,
873+
gas_limit.unique_saturated_into(),
874+
max_fee_per_gas,
875+
max_priority_fee_per_gas,
876+
nonce,
877+
access_list,
878+
is_transactional,
879+
validate,
880+
weight_limit,
881+
proof_size_base_cost,
882+
config.as_ref().unwrap_or_else(|| T::config()),
883+
force_address,
884+
) {
885+
Ok(res) => res,
886+
Err(e) => {
887+
return Err(DispatchErrorWithPostInfo {
888+
post_info: PostDispatchInfo {
889+
actual_weight: Some(e.weight),
890+
pays_fee: Pays::Yes,
891+
},
892+
error: e.error.into(),
893+
})
894+
}
895+
}
896+
} else {
897+
match T::Runner::create(
898+
from,
899+
input,
900+
value,
901+
gas_limit.unique_saturated_into(),
902+
max_fee_per_gas,
903+
max_priority_fee_per_gas,
904+
nonce,
905+
access_list,
906+
is_transactional,
907+
validate,
908+
weight_limit,
909+
proof_size_base_cost,
910+
config.as_ref().unwrap_or_else(|| T::config()),
911+
) {
912+
Ok(res) => res,
913+
Err(e) => {
914+
return Err(DispatchErrorWithPostInfo {
915+
post_info: PostDispatchInfo {
916+
actual_weight: Some(e.weight),
917+
pays_fee: Pays::Yes,
918+
},
919+
error: e.error.into(),
920+
})
921+
}
892922
}
893923
};
894924

0 commit comments

Comments
 (0)