Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Uniswap V3 Price Feed #101

Merged
merged 35 commits into from
Oct 25, 2023
Merged

Add Uniswap V3 Price Feed #101

merged 35 commits into from
Oct 25, 2023

Conversation

scorpion9979
Copy link
Contributor

The PR adds support for Chainlink-compatible Uniswap V3 price feeds.

scorpion9979 and others added 18 commits March 10, 2023 17:26
…structor

perf(protocol): add minor gas optimizations to UniswapV3Pool
feat(protocol): add "IUniswapV3PriceFeed__RefAssetNotInPool" error in UniswapV3PriceFeed.sol
refactor(protocol): add UniswapV3PriceFeed interface
docs(protocol): add missing "@inheritdoc" tags in UniswapV3PriceFeed.sol
refactor(protocol): rename "getNormalizedPriceInternal" function into "getPriceInternal"
perf(protocol): remove "basePrice" memory var from "getPriceInternal" function
perf(protocol): use "1 << 192" instead of "2**192" for gas savings
refactor(protocol): rename "normalizedPrice" to "price" in "getPriceInternal" function
test(protocol): add UniswapV3PriceFeed deployer
test(protocol): add UniswapV3PriceFeed fixture
test(protocol): add UniswapV3Pool mock
test(protocol): test "description" function in UniswapV3PriceFeed
test(protocol): test "pool" function in UniswapV3PriceFeed
test(protocol): test "refAsset" function in UniswapV3PriceFeed
test(protocol): test "twapInterval" function in UniswapV3PriceFeed
chore(protocol): re-generate types
test(protocol): test "latestRoundData" function in UniswapV3PriceFeed
test(protocol): test "version" function in UniswapV3PriceFeed
test(protocol): add more unit tests for "getRoundData" and "latestRoundData" functions
chore(protocol): re-generate types
… immutable vars

test(protocol): update unit tests to integrate GodModeUniswapV3PriceFeed
chore(protocol): re-generate types
…s.ts

build(protocol): add "@uniswap/v3-sdk" dev dep
feat(constants): add Uniswap V3 constants
test(protocol): update unit tests for "getRoundData" function to reflect added mirrors
test(protocol): update unit tests for "latestRoundData" function to reflect added mirrors
chore(protocol): re-generate types
perf(protocol): add token{0,1} as immutable variables
refactor(protocol): switch token{0,1}Decimals to uint8
test(protocol): test both branches of "description" function in UniswapV3PriceFeed
test(protocol): make UniswapV3PriceFeed unit tests more descriptive
refactor(constants): rename "uniswap-v3.ts" to "oracles.ts"
chore(protocol): re-generate types
…ol and related interfaces

chore(protocol): disable solhint linter rules for "external" contract files
feat(protocol): check provided pool address is not zero in UniswapV3PriceFeed constructor
refactor(protocol): clean up IUniswapV3Pool
feat(errors): add oracle errors
feat(constants): add "CARDINALITY" constant
test(protocol): add unit test for "baseAsset"
chore(protocol): re-generate types
… constructor

test(protocol): fix UniswapV3PriceFeed tests
chore(protocol): re-generate types
… error

test(protocol): update UniswapV3PriceFeed tests
chore(protocol): re-generate types
test(protocol): remove unused import
…value

docs(protocol): add comments to UniswapV3PriceFeed constructor
feat(constants): change default oracle params to 30-minute TWAP
refactor(constants): rename "CARDINALITY" to "DEFAULT_CARDINALITY"
feat(errors): add MAX_PRICE_LESS_THAN_OR_EQUAL_TO_ZERO
test(protocol): add "setMaxPrice" unit test
chore(protocol): re-generate types
… of "cardinality"

chore(protocol): re-generate types
@scorpion9979 scorpion9979 merged commit 706984f into main Oct 25, 2023
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant