Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions frame/ethereum/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,16 @@ impl<T: Config> Pallet<T> {
.and_then(|v| v.with_balance_for(&who))
.map_err(|e| e.0)?;

// EIP-3607: https://eips.ethereum.org/EIPS/eip-3607
// Do not allow transactions for which `tx.sender` has any code deployed.
//
// This check should be done on the transaction validation (here) **and**
// on trnasaction execution, otherwise a contract tx will be included in
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// on trnasaction execution, otherwise a contract tx will be included in
// on transaction execution, otherwise a contract tx will be included in

// the mempool and pollute the mempool forever.
if !pallet_evm::AccountCodes::<T>::get(origin).is_empty() {
return Err(InvalidTransaction::BadSigner.into());
}

let priority = match (
transaction_data.gas_price,
transaction_data.max_fee_per_gas,
Expand Down