diff --git a/packages/vm/src/runTx.ts b/packages/vm/src/runTx.ts index 8748748b38..05c0c2f5e1 100644 --- a/packages/vm/src/runTx.ts +++ b/packages/vm/src/runTx.ts @@ -12,7 +12,6 @@ import { bytesToHex, bytesToUnprefixedHex, concatBytes, - createAddressFromString, ecrecover, equalsBytes, hexToBytes, @@ -426,7 +425,6 @@ async function _runTx(vm: VM, opts: RunTxOpts): Promise { let gasRefund = BIGINT_0 - const writtenAddresses = new Set() if (tx.supports(Capability.EIP7702EOACode)) { // Add contract code for authority tuples provided by EIP 7702 tx const authorizationList = (tx).authorizationList @@ -489,8 +487,6 @@ async function _runTx(vm: VM, opts: RunTxOpts): Promise { const addressCode = concatBytes(new Uint8Array([0xef, 0x01, 0x00]), address) await vm.stateManager.putCode(authority, addressCode) - - writtenAddresses.add(authority.toString()) } } @@ -673,15 +669,6 @@ async function _runTx(vm: VM, opts: RunTxOpts): Promise { } } - /** - * Cleanup code of accounts written to in a 7702 transaction - */ - - for (const str of writtenAddresses) { - const address = createAddressFromString(str) - await vm.stateManager.putCode(address, new Uint8Array()) - } - if (enableProfiler) { // eslint-disable-next-line no-console console.timeEnd(accountsCleanUpLabel)