Skip to content

Commit

Permalink
Merge branch '7702-update' into t8ntool
Browse files Browse the repository at this point in the history
  • Loading branch information
jochem-brouwer committed Aug 20, 2024
2 parents 0da8108 + d4f9c60 commit 8612a29
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions packages/vm/src/runTx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
bytesToHex,
bytesToUnprefixedHex,
concatBytes,
createAddressFromString,
ecrecover,
equalsBytes,
hexToBytes,
Expand Down Expand Up @@ -426,7 +425,6 @@ async function _runTx(vm: VM, opts: RunTxOpts): Promise<RunTxResult> {

let gasRefund = BIGINT_0

const writtenAddresses = new Set<string>()
if (tx.supports(Capability.EIP7702EOACode)) {
// Add contract code for authority tuples provided by EIP 7702 tx
const authorizationList = (<EIP7702CompatibleTx>tx).authorizationList
Expand Down Expand Up @@ -489,8 +487,6 @@ async function _runTx(vm: VM, opts: RunTxOpts): Promise<RunTxResult> {

const addressCode = concatBytes(new Uint8Array([0xef, 0x01, 0x00]), address)
await vm.stateManager.putCode(authority, addressCode)

writtenAddresses.add(authority.toString())
}
}

Expand Down Expand Up @@ -673,15 +669,6 @@ async function _runTx(vm: VM, opts: RunTxOpts): Promise<RunTxResult> {
}
}

/**
* 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)
Expand Down

0 comments on commit 8612a29

Please sign in to comment.