Skip to content

Commit

Permalink
test(integration-tests): update gas values
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-chain committed Jun 8, 2021
1 parent 2bd2ce5 commit 2dc806f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions integration-tests/test/native-eth.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { Direction } from './shared/watcher-utils'
import { PROXY_SEQUENCER_ENTRYPOINT_ADDRESS } from './shared/utils'
import { OptimismEnv } from './shared/env'

const DEFAULT_TEST_GAS_L1 = 230_000
const DEFAULT_TEST_GAS_L2 = 825_000
const DEFAULT_TEST_GAS_L1 = 330_000
const DEFAULT_TEST_GAS_L2 = 1_000_000
// TX size enforced by CTC:
const MAX_ROLLUP_TX_SIZE = 50_000

Expand Down Expand Up @@ -50,13 +50,13 @@ describe('Native ETH Integration Tests', async () => {
const amount = utils.parseEther('0.5')
const addr = '0x' + '1234'.repeat(10)
const gas = await env.ovmEth.estimateGas.transfer(addr, amount)
expect(gas).to.be.deep.eq(BigNumber.from(6430020))
expect(gas).to.be.deep.eq(BigNumber.from(6430021))
})

it('Should estimate gas for ETH withdraw', async () => {
const amount = utils.parseEther('0.5')
const gas = await env.ovmEth.estimateGas.withdraw(amount, 0, '0xFFFF')
expect(gas).to.be.deep.eq(BigNumber.from(6580050))
expect(gas).to.be.deep.eq(BigNumber.from(6580054))
})
})

Expand Down
4 changes: 2 additions & 2 deletions integration-tests/test/rpc.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ describe('Basic RPC tests', () => {
it('correctly exposes revert data for contract creations', async () => {
const req: TransactionRequest = {
...revertingDeployTx,
gasLimit: 17700899, // override gas estimation
gasLimit: 27700899, // override gas estimation
}

const tx = await wallet.sendTransaction(req)
Expand Down Expand Up @@ -353,7 +353,7 @@ describe('Basic RPC tests', () => {
to: DEFAULT_TRANSACTION.to,
value: 0,
})
expect(estimate).to.be.eq(5920012)
expect(estimate).to.be.eq(5920013)
})

it('should return a gas estimate that grows with the size of data', async () => {
Expand Down

0 comments on commit 2dc806f

Please sign in to comment.