Skip to content

Commit 6de3204

Browse files
fix: Increase hardcoded gas limit (#397)
1 parent 4fe5072 commit 6de3204

4 files changed

Lines changed: 11 additions & 6 deletions

File tree

src/components/ppom/batching.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import globalContext from '../..';
22
import { maliciousAddress } from '../../sample-addresses';
3+
import { MIN_GAS_LIMIT } from '../../shared/constants';
34

45
export function ppomMaliciousBatchingAndQueueing(parentContainer) {
56
parentContainer.insertAdjacentHTML(
@@ -135,7 +136,7 @@ export function ppomMaliciousBatchingAndQueueing(parentContainer) {
135136
from: globalContext.accounts[0],
136137
to: `${maliciousAddress}`,
137138
value: '0x0',
138-
gasLimit: '0x5028',
139+
gasLimit: MIN_GAS_LIMIT,
139140
maxFeePerGas: '0x2540be400',
140141
maxPriorityFeePerGas: '0x3b9aca00',
141142
},
@@ -160,7 +161,7 @@ export function ppomMaliciousBatchingAndQueueing(parentContainer) {
160161
from: globalContext.accounts[0],
161162
to: '0x5FbDB2315678afecb367f032d93F642f64180aa3',
162163
value: '0x0',
163-
gasLimit: '0x5028',
164+
gasLimit: MIN_GAS_LIMIT,
164165
maxFeePerGas: '0x2540be400',
165166
maxPriorityFeePerGas: '0x3b9aca00',
166167
},

src/components/signatures/malformed-transactions.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import globalContext from '../..';
2+
import { MIN_GAS_LIMIT } from '../../shared/constants';
23

34
// Malformed Signatues
45

@@ -219,7 +220,7 @@ export function malformedTransactionsComponent(parentContainer) {
219220
from,
220221
to: '0x0c54FcCd2e384b4BB6f2E405Bf5Cbc15a017AaFb',
221222
value: '0x0',
222-
gasLimit: '0x5028',
223+
gasLimit: MIN_GAS_LIMIT,
223224
maxFeePerGas: 'invalid', // invalid maxFeePerGas - expected int/hex value
224225
maxPriorityFeePerGas: '0x3b9aca00',
225226
},

src/components/transactions/send.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import globalContext from '../..';
22
import Constants from '../../constants.json';
3+
import { MIN_GAS_LIMIT } from '../../shared/constants';
34

45
const { heavyCallData } = Constants;
56

@@ -255,7 +256,7 @@ export function sendComponent(parentContainer) {
255256
from: globalContext.accounts[0],
256257
to: '0x0c54FcCd2e384b4BB6f2E405Bf5Cbc15a017AaFb',
257258
value: '0x0',
258-
gasLimit: '0x5028',
259+
gasLimit: MIN_GAS_LIMIT,
259260
maxFeePerGas: '0x2540be400',
260261
maxPriorityFeePerGas: '0x3b9aca00',
261262
},
@@ -367,7 +368,7 @@ export function sendComponent(parentContainer) {
367368
from: globalContext.accounts[0],
368369
to: contract.address,
369370
value: '0x0',
370-
gasLimit: '0x5028',
371+
gasLimit: MIN_GAS_LIMIT,
371372
maxFeePerGas: '0x2540be400',
372373
maxPriorityFeePerGas: '0x3b9aca00',
373374
},
@@ -418,7 +419,7 @@ export function sendComponent(parentContainer) {
418419
from: globalContext.accounts[0],
419420
to: contract.address,
420421
value: '0x16345785D8A0', // 24414062500000
421-
gasLimit: '0x5028',
422+
gasLimit: MIN_GAS_LIMIT,
422423
maxFeePerGas: '0x2540be400',
423424
maxPriorityFeePerGas: '0x3b9aca00',
424425
},

src/shared/constants.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
// 21000 in hexadecimal
2+
export const MIN_GAS_LIMIT = '0x5208';

0 commit comments

Comments
 (0)