Skip to content

Commit

Permalink
Fix permissioned smart contract creation
Browse files Browse the repository at this point in the history
  • Loading branch information
keithtensor authored and camfairchild committed Jan 6, 2025
1 parent bcb814a commit b55e5f2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions frame/ethereum/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,7 @@ impl<T: Config> Pallet<T> {
Ok((Some(target), None, CallOrCreateInfo::Call(res)))
}
ethereum::TransactionAction::Create => {
let whitelist = pallet_evm::WhitelistedCreators::<T>::get();
let res = match T::Runner::create(
from,
input,
Expand All @@ -829,6 +830,7 @@ impl<T: Config> Pallet<T> {
max_priority_fee_per_gas,
nonce,
access_list,
whitelist,
is_transactional,
validate,
weight_limit,
Expand Down
2 changes: 2 additions & 0 deletions template/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,7 @@ impl_runtime_apis! {
_ => (None, None),
};

let whitelist = pallet_evm::WhitelistedCreators::<Runtime>::get();
<Runtime as pallet_evm::Config>::Runner::create(
from,
data,
Expand All @@ -933,6 +934,7 @@ impl_runtime_apis! {
max_priority_fee_per_gas,
nonce,
access_list.unwrap_or_default(),
whitelist,
false,
true,
weight_limit,
Expand Down

0 comments on commit b55e5f2

Please sign in to comment.