Commit 9f1a73b 1 parent e424762 commit 9f1a73b Copy full SHA for 9f1a73b
File tree 1 file changed +10
-0
lines changed
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -506,6 +506,16 @@ impl<T: Config> Pallet<T> {
506
506
. and_then ( |v| v. with_balance_for ( & who) )
507
507
. map_err ( |e| e. 0 ) ?;
508
508
509
+ // EIP-3607: https://eips.ethereum.org/EIPS/eip-3607
510
+ // Do not allow transactions for which `tx.sender` has any code deployed.
511
+ //
512
+ // This check should be done on the transaction validation (here) **and**
513
+ // on trnasaction execution, otherwise a contract tx will be included in
514
+ // the mempool and pollute the mempool forever.
515
+ if !pallet_evm:: AccountCodes :: < T > :: get ( origin) . is_empty ( ) {
516
+ return Err ( InvalidTransaction :: BadSigner . into ( ) ) ;
517
+ }
518
+
509
519
let priority = match (
510
520
transaction_data. gas_price ,
511
521
transaction_data. max_fee_per_gas ,
You can’t perform that action at this time.
0 commit comments