Skip to content

Commit

Permalink
Change logs into assertions so we can always see the gas cost changes…
Browse files Browse the repository at this point in the history
… in commits
  • Loading branch information
moodysalem committed Apr 14, 2020
1 parent 6f10789 commit 843d02b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test/UniswapV2Factory.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ describe('UniswapV2Factory', () => {

it('createPair:gas', async () => {
const gasCost = await factory.estimate.createPair(...TEST_ADDRESSES)
console.log(`Gas required for createPair: ${gasCost}`)
expect(gasCost).to.eq(2513232)
})

it('setFeeTo', async () => {
Expand Down
2 changes: 1 addition & 1 deletion test/UniswapV2Pair.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ describe('UniswapV2Pair', () => {
await token1.transfer(pair.address, swapAmount)
await mineBlock(provider, (await provider.getBlock('latest')).timestamp + 1)
const gasCost = await pair.estimate.swap(expectedOutputAmount, 0, wallet.address, '0x', overrides)
console.log(`Gas required for swap: ${gasCost}`)
expect(gasCost).to.eq(79378)
})

it('burn', async () => {
Expand Down

0 comments on commit 843d02b

Please sign in to comment.