Skip to content

Commit

Permalink
fix a few compile errors
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahZinsmeister committed May 23, 2022
1 parent 365e80f commit 1d51e3d
Show file tree
Hide file tree
Showing 8 changed files with 81 additions and 46 deletions.
2 changes: 1 addition & 1 deletion contracts/hooks/base/BaseHook.sol
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ abstract contract BaseHook is IHooks {
IPoolManager.PoolKey calldata,
IPoolManager.ModifyPositionParams calldata,
IPoolManager.BalanceDelta calldata
) external override {
) external virtual override {
revert HookNotImplemented();
}

Expand Down
1 change: 0 additions & 1 deletion contracts/test/OracleEchidnaTest.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity =0.8.13;
pragma abicoder v2;

import {OracleTest} from './OracleTest.sol';

Expand Down
1 change: 0 additions & 1 deletion contracts/test/OracleTest.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity =0.8.13;
pragma abicoder v2;

import {Oracle} from '../libraries/Oracle.sol';

Expand Down
3 changes: 1 addition & 2 deletions contracts/test/TickTest.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity =0.8.13;
pragma abicoder v2;

import {Tick} from '../libraries/Tick.sol';

Expand All @@ -15,7 +14,7 @@ contract TickTest {

function getGasCostOfTickSpacingToMaxLiquidityPerTick(int24 tickSpacing) external view returns (uint256) {
uint256 gasBefore = gasleft();
uint128 maxLiquidity = Tick.tickSpacingToMaxLiquidityPerTick(tickSpacing);
Tick.tickSpacingToMaxLiquidityPerTick(tickSpacing);
return gasBefore - gasleft();
}

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
},
"dependencies": {},
"devDependencies": {
"@openzeppelin/contracts": "4.4.2",
"@nomiclabs/hardhat-ethers": "^2.0.2",
"@nomiclabs/hardhat-etherscan": "^2.1.1",
"@nomiclabs/hardhat-waffle": "^2.0.1",
"@openzeppelin/contracts": "4.4.2",
"@typechain/ethers-v5": "^4.0.0",
"@types/chai": "^4.2.6",
"@types/mocha": "^5.2.7",
Expand All @@ -41,7 +41,7 @@
"decimal.js": "^10.2.1",
"ethereum-waffle": "^3.0.2",
"ethers": "^5.0.8",
"hardhat": "^2.2.0",
"hardhat": "^2.9.6",
"hardhat-typechain": "^0.3.5",
"import-toml": "1.0.0",
"mocha": "^6.2.2",
Expand Down
4 changes: 2 additions & 2 deletions test/Oracle.spec.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import snapshotGasCost from '@uniswap/snapshot-gas-cost'
import { BigNumber, BigNumberish, Wallet } from 'ethers'
import { ethers, waffle } from 'hardhat'
import { OracleTest } from '../typechain/OracleTest'
import checkObservationEquals from './shared/checkObservationEquals'
import { expect } from './shared/expect'
import snapshotGasCost from '@uniswap/snapshot-gas-cost'
import { MaxUint128 } from './shared/utilities'

describe('Oracle', () => {
Expand Down Expand Up @@ -276,7 +276,7 @@ describe('Oracle', () => {
}

it('fails before initialize', async () => {
await expect(observeSingle(0)).to.be.revertedWith('OracleCardinalityCannotBeZero')
await expect(observeSingle(0)).to.be.revertedWith('OracleCardinalityCannotBeZero()')
})

it('fails if an older observation does not exist', async () => {
Expand Down
6 changes: 3 additions & 3 deletions test/__snapshots__/Tick.spec.ts.snap
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Tick #tickSpacingToMaxLiquidityPerTick gas cost 60 tick spacing 1`] = `134`;
exports[`Tick #tickSpacingToMaxLiquidityPerTick gas cost 60 tick spacing 1`] = `128`;

exports[`Tick #tickSpacingToMaxLiquidityPerTick gas cost max tick spacing 1`] = `134`;
exports[`Tick #tickSpacingToMaxLiquidityPerTick gas cost max tick spacing 1`] = `128`;

exports[`Tick #tickSpacingToMaxLiquidityPerTick gas cost min tick spacing 1`] = `134`;
exports[`Tick #tickSpacingToMaxLiquidityPerTick gas cost min tick spacing 1`] = `128`;
106 changes: 72 additions & 34 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@
patch-package "^6.2.2"
postinstall-postinstall "^2.1.0"

"@ethereumjs/block@^3.5.0", "@ethereumjs/block@^3.6.0", "@ethereumjs/block@^3.6.1":
"@ethereumjs/block@^3.5.0":
version "3.6.1"
resolved "https://registry.yarnpkg.com/@ethereumjs/block/-/block-3.6.1.tgz#50574d3e993ae247dcfe2abbdb91d2a4a22accb9"
integrity sha512-o5d/zpGl4SdVfdTfrsq9ZgYMXddc0ucKMiFW5OphBCX+ep4xzYnSjboFcZXT2V/tcSBr84VrKWWp21CGVb3DGw==
Expand All @@ -376,28 +376,46 @@
ethereumjs-util "^7.1.4"
merkle-patricia-tree "^4.2.3"

"@ethereumjs/blockchain@^5.5.0", "@ethereumjs/blockchain@^5.5.1":
version "5.5.1"
resolved "https://registry.yarnpkg.com/@ethereumjs/blockchain/-/blockchain-5.5.1.tgz#60f1f50592c06cc47e1704800b88b7d32f609742"
integrity sha512-JS2jeKxl3tlaa5oXrZ8mGoVBCz6YqsGG350XVNtHAtNZXKk7pU3rH4xzF2ru42fksMMqzFLzKh9l4EQzmNWDqA==
"@ethereumjs/block@^3.6.2":
version "3.6.2"
resolved "https://registry.yarnpkg.com/@ethereumjs/block/-/block-3.6.2.tgz#63d1e26d0b7a7a3684fce920de6ebabec1e5b674"
integrity sha512-mOqYWwMlAZpYUEOEqt7EfMFuVL2eyLqWWIzcf4odn6QgXY8jBI2NhVuJncrMCKeMZrsJAe7/auaRRB6YcdH+Qw==
dependencies:
"@ethereumjs/common" "^2.6.3"
"@ethereumjs/tx" "^3.5.1"
ethereumjs-util "^7.1.4"
merkle-patricia-tree "^4.2.4"

"@ethereumjs/blockchain@^5.5.2":
version "5.5.2"
resolved "https://registry.yarnpkg.com/@ethereumjs/blockchain/-/blockchain-5.5.2.tgz#1848abd9dc1ee56acf8cec4c84304d7f4667d027"
integrity sha512-Jz26iJmmsQtngerW6r5BDFaew/f2mObLrRZo3rskLOx1lmtMZ8+TX/vJexmivrnWgmAsTdNWhlKUYY4thPhPig==
dependencies:
"@ethereumjs/block" "^3.6.0"
"@ethereumjs/common" "^2.6.0"
"@ethereumjs/block" "^3.6.2"
"@ethereumjs/common" "^2.6.3"
"@ethereumjs/ethash" "^1.1.0"
debug "^2.2.0"
ethereumjs-util "^7.1.3"
debug "^4.3.3"
ethereumjs-util "^7.1.4"
level-mem "^5.0.1"
lru-cache "^5.1.1"
semaphore-async-await "^1.5.1"

"@ethereumjs/common@^2.6.0", "@ethereumjs/common@^2.6.1", "@ethereumjs/common@^2.6.2":
"@ethereumjs/common@^2.6.1":
version "2.6.2"
resolved "https://registry.yarnpkg.com/@ethereumjs/common/-/common-2.6.2.tgz#eb006c9329c75c80f634f340dc1719a5258244df"
integrity sha512-vDwye5v0SVeuDky4MtKsu+ogkH2oFUV8pBKzH/eNBzT8oI91pKa8WyzDuYuxOQsgNgv5R34LfFDh2aaw3H4HbQ==
dependencies:
crc-32 "^1.2.0"
ethereumjs-util "^7.1.4"

"@ethereumjs/common@^2.6.3", "@ethereumjs/common@^2.6.4":
version "2.6.4"
resolved "https://registry.yarnpkg.com/@ethereumjs/common/-/common-2.6.4.tgz#1b3cdd3aa4ee3b0ca366756fc35e4a03022a01cc"
integrity sha512-RDJh/R/EAr+B7ZRg5LfJ0BIpf/1LydFgYdvZEuTraojCbVypO2sQ+QnpP5u2wJf9DASyooKqu8O4FJEWUV6NXw==
dependencies:
crc-32 "^1.2.0"
ethereumjs-util "^7.1.4"

"@ethereumjs/ethash@^1.1.0":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@ethereumjs/ethash/-/ethash-1.1.0.tgz#7c5918ffcaa9cb9c1dc7d12f77ef038c11fb83fb"
Expand All @@ -409,30 +427,38 @@
ethereumjs-util "^7.1.1"
miller-rabin "^4.0.0"

"@ethereumjs/tx@^3.4.0", "@ethereumjs/tx@^3.5.0":
"@ethereumjs/tx@^3.5.0":
version "3.5.0"
resolved "https://registry.yarnpkg.com/@ethereumjs/tx/-/tx-3.5.0.tgz#783b0aeb08518b9991b23f5155763bbaf930a037"
integrity sha512-/+ZNbnJhQhXC83Xuvy6I9k4jT5sXiV0tMR9C+AzSSpcCV64+NB8dTE1m3x98RYMqb8+TLYWA+HML4F5lfXTlJw==
dependencies:
"@ethereumjs/common" "^2.6.1"
ethereumjs-util "^7.1.4"

"@ethereumjs/vm@^5.6.0":
version "5.7.1"
resolved "https://registry.yarnpkg.com/@ethereumjs/vm/-/vm-5.7.1.tgz#3bf757fbad0081838ccb4f22003cd73319ab3616"
integrity sha512-NiFm5FMaeDGZ9ojBL+Y9Y/xhW6S4Fgez+zPBM402T5kLsfeAR9mrRVckYhvkGVJ6FMwsY820CLjYP5OVwMjLTg==
"@ethereumjs/tx@^3.5.1":
version "3.5.1"
resolved "https://registry.yarnpkg.com/@ethereumjs/tx/-/tx-3.5.1.tgz#8d941b83a602b4a89949c879615f7ea9a90e6671"
integrity sha512-xzDrTiu4sqZXUcaBxJ4n4W5FrppwxLxZB4ZDGVLtxSQR4lVuOnFR6RcUHdg1mpUhAPVrmnzLJpxaeXnPxIyhWA==
dependencies:
"@ethereumjs/block" "^3.6.1"
"@ethereumjs/blockchain" "^5.5.1"
"@ethereumjs/common" "^2.6.2"
"@ethereumjs/tx" "^3.5.0"
"@ethereumjs/common" "^2.6.3"
ethereumjs-util "^7.1.4"

"@ethereumjs/vm@^5.9.0":
version "5.9.0"
resolved "https://registry.yarnpkg.com/@ethereumjs/vm/-/vm-5.9.0.tgz#54e485097c6dbb42554d541ef8d84d06b7ddf12f"
integrity sha512-0IRsj4IuF8lFDWVVLc4mFOImaSX8VWF8CGm3mXHG/LLlQ/Tryy/kKXMw/bU9D+Zw03CdteW+wCGqNFS6+mPjpg==
dependencies:
"@ethereumjs/block" "^3.6.2"
"@ethereumjs/blockchain" "^5.5.2"
"@ethereumjs/common" "^2.6.4"
"@ethereumjs/tx" "^3.5.1"
async-eventemitter "^0.2.4"
core-js-pure "^3.0.1"
debug "^4.3.3"
ethereumjs-util "^7.1.4"
functional-red-black-tree "^1.0.1"
mcl-wasm "^0.7.1"
merkle-patricia-tree "^4.2.3"
merkle-patricia-tree "^4.2.4"
rustbn.js "~0.2.0"

"@ethersproject/[email protected]":
Expand Down Expand Up @@ -4107,7 +4133,7 @@ ethereumjs-util@^7.0.2, ethereumjs-util@^7.1.0:
ethereum-cryptography "^0.1.3"
rlp "^2.2.4"

ethereumjs-util@^7.1.1, ethereumjs-util@^7.1.3, ethereumjs-util@^7.1.4:
ethereumjs-util@^7.1.1, ethereumjs-util@^7.1.4:
version "7.1.4"
resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-7.1.4.tgz#a6885bcdd92045b06f596c7626c3e89ab3312458"
integrity sha512-p6KmuPCX4mZIqsQzXfmSx9Y0l2hqf+VkAiwSisW3UKUFdk8ZkAt+AYaor83z2nSi6CU2zSsXMlD80hAbNEGM0A==
Expand Down Expand Up @@ -4954,16 +4980,16 @@ hardhat-typechain@^0.3.5:
resolved "https://registry.yarnpkg.com/hardhat-typechain/-/hardhat-typechain-0.3.5.tgz#8e50616a9da348b33bd001168c8fda9c66b7b4af"
integrity sha512-w9lm8sxqTJACY+V7vijiH+NkPExnmtiQEjsV9JKD1KgMdVk2q8y+RhvU/c4B7+7b1+HylRUCxpOIvFuB3rE4+w==

hardhat@^2.2.0:
version "2.9.1"
resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.9.1.tgz#f69f82bb4d98e28744584779483caa7c5cfbde8b"
integrity sha512-q0AkYXV7R26RzyAkHGQRhhQjk508pseVvH3wSwZwwPUbvA+tjl0vMIrD4aFQDonRXkrnXX4+5KglozzjSd0//Q==
hardhat@^2.9.6:
version "2.9.6"
resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.9.6.tgz#9b75d8efccdfc20bdea35ffb0fd4e6a3f3ecf3cf"
integrity sha512-Vnm1iDfhbavNjvLxArt47rt6G3vPIV4Q/+pNgFkh6sfQH8JVf8px5VxiEs5cj4rPxmU+DXGKoalY+pK8fAL4oA==
dependencies:
"@ethereumjs/block" "^3.6.0"
"@ethereumjs/blockchain" "^5.5.0"
"@ethereumjs/common" "^2.6.0"
"@ethereumjs/tx" "^3.4.0"
"@ethereumjs/vm" "^5.6.0"
"@ethereumjs/block" "^3.6.2"
"@ethereumjs/blockchain" "^5.5.2"
"@ethereumjs/common" "^2.6.4"
"@ethereumjs/tx" "^3.5.1"
"@ethereumjs/vm" "^5.9.0"
"@ethersproject/abi" "^5.1.2"
"@metamask/eth-sig-util" "^4.0.0"
"@sentry/node" "^5.18.1"
Expand All @@ -4982,15 +5008,15 @@ hardhat@^2.2.0:
env-paths "^2.2.0"
ethereum-cryptography "^0.1.2"
ethereumjs-abi "^0.6.8"
ethereumjs-util "^7.1.3"
ethereumjs-util "^7.1.4"
find-up "^2.1.0"
fp-ts "1.19.3"
fs-extra "^7.0.1"
glob "^7.1.3"
glob "7.2.0"
immutable "^4.0.0-rc.12"
io-ts "1.10.4"
lodash "^4.17.11"
merkle-patricia-tree "^4.2.2"
merkle-patricia-tree "^4.2.4"
mnemonist "^0.38.0"
mocha "^9.2.0"
p-map "^4.0.0"
Expand Down Expand Up @@ -6572,7 +6598,7 @@ merkle-patricia-tree@^2.1.2, merkle-patricia-tree@^2.3.2:
rlp "^2.0.0"
semaphore ">=1.0.1"

merkle-patricia-tree@^4.2.2, merkle-patricia-tree@^4.2.3:
merkle-patricia-tree@^4.2.3:
version "4.2.3"
resolved "https://registry.yarnpkg.com/merkle-patricia-tree/-/merkle-patricia-tree-4.2.3.tgz#b4e5d485d231f02b255ed79a7852f9d12ee0c09f"
integrity sha512-S4xevdXl5KvdBGgUxhQcxoep0onqXiIhzfwZp4M78kIuJH3Pu9o9IUgqhzSFOR2ykLO6t265026Xb6PY0q2UFQ==
Expand All @@ -6584,6 +6610,18 @@ merkle-patricia-tree@^4.2.2, merkle-patricia-tree@^4.2.3:
readable-stream "^3.6.0"
semaphore-async-await "^1.5.1"

merkle-patricia-tree@^4.2.4:
version "4.2.4"
resolved "https://registry.yarnpkg.com/merkle-patricia-tree/-/merkle-patricia-tree-4.2.4.tgz#ff988d045e2bf3dfa2239f7fabe2d59618d57413"
integrity sha512-eHbf/BG6eGNsqqfbLED9rIqbsF4+sykEaBn6OLNs71tjclbMcMOk1tEPmJKcNcNCLkvbpY/lwyOlizWsqPNo8w==
dependencies:
"@types/levelup" "^4.3.0"
ethereumjs-util "^7.1.4"
level-mem "^5.0.1"
level-ws "^2.0.0"
readable-stream "^3.6.0"
semaphore-async-await "^1.5.1"

methods@~1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee"
Expand Down

0 comments on commit 1d51e3d

Please sign in to comment.