Skip to content

Commit 8535e2c

Browse files
tx: add missing forks
1 parent 5abc991 commit 8535e2c

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

packages/tx/test/transactionRunner.spec.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ const file: string | undefined = argv.file
1515

1616
const forkNames: ForkName[] = [
1717
'Prague',
18+
'Cancun',
19+
'Shanghai',
20+
'Paris',
1821
'London+3860',
1922
'London',
2023
'Berlin',
@@ -31,6 +34,9 @@ const forkNames: ForkName[] = [
3134
const forkNameMap: ForkNamesMap = {
3235
Prague: 'prague',
3336
'London+3860': 'london',
37+
Cancun: 'cancun',
38+
Shanghai: 'shanghai',
39+
Paris: 'paris',
3440
London: 'london',
3541
Berlin: 'berlin',
3642
Istanbul: 'istanbul',

packages/tx/test/types.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
export type ForkName =
22
| 'Prague'
3+
| 'Cancun'
4+
| 'Shanghai'
5+
| 'Paris'
36
| 'London+3860'
47
| 'London'
58
| 'Berlin'

packages/vm/src/runTx.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -652,11 +652,13 @@ async function _runTx(vm: VM, opts: RunTxOpts): Promise<RunTxResult> {
652652

653653
if (vm.common.isActivatedEIP(7623)) {
654654
if (results.totalGasSpent < floorCost) {
655-
// TODO: likely set `results.gasRefund = BIGINT_0`
656-
results.totalGasSpent = floorCost
657655
if (vm.DEBUG) {
658-
debugGas(`tx apply floorCost ${floorCost} to totalGasSpent (-> ${results.totalGasSpent})`)
656+
debugGas(
657+
`tx floorCost ${floorCost} is higher than to total execution gas spent (-> ${results.totalGasSpent}), setting floor as gas paid`,
658+
)
659659
}
660+
results.gasRefund = BIGINT_0
661+
results.totalGasSpent = floorCost
660662
}
661663
}
662664

0 commit comments

Comments
 (0)