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 19, 2024
2 parents 3c94331 + 2043d1e commit 01dafa1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions packages/tx/src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,9 @@ export class AuthorizationLists {
}

public static verifyAuthorizationList(authorizationList: AuthorizationListBytes) {
if (authorizationList.length === 0) {
throw new Error('Invalid EIP-7702 transaction: authorization list is empty')

Check failure on line 203 in packages/tx/src/util.ts

View workflow job for this annotation

GitHub Actions / test-tx (18)

test/eip7702.spec.ts > [EOACode7702Transaction] > sign()

Error: Invalid EIP-7702 transaction: authorization list is empty ❯ Function.verifyAuthorizationList src/util.ts:203:13 ❯ new EOACode7702Transaction src/7702/tx.ts:93:24 ❯ Module.createEOACode7702Tx src/7702/constructors.ts:23:10 ❯ test/eip7702.spec.ts:49:17

Check failure on line 203 in packages/tx/src/util.ts

View workflow job for this annotation

GitHub Actions / test-all-browser (20)

test/eip7702.spec.ts > [EOACode7702Transaction] > sign()

Error: Invalid EIP-7702 transaction: authorization list is empty ❯ AuthorizationLists.verifyAuthorizationList src/util.ts:203:12 ❯ new EOACode7702Transaction src/7702/tx.ts:93:23 ❯ createEOACode7702Tx src/7702/constructors.ts:23:9 ❯ test/eip7702.spec.ts:49:16
}
for (let key = 0; key < authorizationList.length; key++) {
const authorizationListItem = authorizationList[key]
const chainId = authorizationListItem[0]
Expand Down
8 changes: 4 additions & 4 deletions packages/vm/src/requests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ const accumulateEIP7002Requests = async (
const code = await vm.stateManager.getCode(withdrawalsAddress)

if (code.length === 0) {
throw new Error(
/*throw new Error(
'Attempt to accumulate EIP-7002 requests failed: the contract does not exist. Ensure the deployment tx has been run, or that the required contract code is stored',
)
)*/
}

const systemAddressBytes = bigIntToAddressBytes(vm.common.param('systemAddress'))
Expand Down Expand Up @@ -119,9 +119,9 @@ const accumulateEIP7251Requests = async (
const code = await vm.stateManager.getCode(consolidationsAddress)

if (code.length === 0) {
throw new Error(
/*throw new Error(
'Attempt to accumulate EIP-7251 requests failed: the contract does not exist. Ensure the deployment tx has been run, or that the required contract code is stored',
)
)*/
}

const systemAddressBytes = bigIntToAddressBytes(vm.common.param('systemAddress'))
Expand Down

0 comments on commit 01dafa1

Please sign in to comment.