Skip to content

Commit

Permalink
fixes gas values for hardhat optimism tests
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-de-leon-cll committed Jan 13, 2024
1 parent dcda74d commit f40ddbb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions contracts/test/v0.8/dev/OptimismSequencerUptimeFeed.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@ describe('OptimismSequencerUptimeFeed', () => {

describe('#updateStatus', () => {
it('should revert if called by an address that is not the L2 Cross Domain Messenger', async () => {
let timestamp = await optimismUptimeFeed.latestTimestamp()
const timestamp = await optimismUptimeFeed.latestTimestamp()
expect(
optimismUptimeFeed.connect(dummy).updateStatus(true, timestamp),
).to.be.revertedWith('InvalidSender')
})

it('should revert if called by an address that is not the L2 Cross Domain Messenger and is not the L1 sender', async () => {
let timestamp = await optimismUptimeFeed.latestTimestamp()
const timestamp = await optimismUptimeFeed.latestTimestamp()
await l2CrossDomainMessenger.setSender(dummy.address)
expect(
optimismUptimeFeed.connect(dummy).updateStatus(true, timestamp),
Expand Down Expand Up @@ -319,7 +319,7 @@ describe('OptimismSequencerUptimeFeed', () => {
// Assert update
expect(await optimismUptimeFeed.latestAnswer()).to.equal(1)
expect(updateTx.cumulativeGasUsed.toNumber()).to.be.closeTo(
60170,
58436,
gasUsedDeviation,
)
})
Expand Down Expand Up @@ -367,7 +367,7 @@ describe('OptimismSequencerUptimeFeed', () => {
)
const tx = await _tx.wait(1)
expect(tx.cumulativeGasUsed.toNumber()).to.be.closeTo(
28329,
28153,
gasUsedDeviation,
)
})
Expand All @@ -380,7 +380,7 @@ describe('OptimismSequencerUptimeFeed', () => {
)
const tx = await _tx.wait(1)
expect(tx.cumulativeGasUsed.toNumber()).to.be.closeTo(
28229,
28046,
gasUsedDeviation,
)
})
Expand All @@ -393,7 +393,7 @@ describe('OptimismSequencerUptimeFeed', () => {
)
const tx = await _tx.wait(1)
expect(tx.cumulativeGasUsed.toNumber()).to.be.closeTo(
28245,
28057,
gasUsedDeviation,
)
})
Expand Down

0 comments on commit f40ddbb

Please sign in to comment.