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

feat: Local UniswapV3 Markets #340

Merged
merged 5 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion cmd/slinky-config/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
coinbaseapi "github.com/skip-mev/slinky/providers/apis/coinbase"
"github.com/skip-mev/slinky/providers/apis/coingecko"
raydium "github.com/skip-mev/slinky/providers/apis/defi/raydium"
"github.com/skip-mev/slinky/providers/apis/defi/uniswapv3"
"github.com/skip-mev/slinky/providers/apis/dydx"
"github.com/skip-mev/slinky/providers/apis/geckoterminal"
krakenapi "github.com/skip-mev/slinky/providers/apis/kraken"
Expand Down Expand Up @@ -115,6 +116,10 @@
kucoin.Name: kucoin.DefaultMarketConfig,
mexc.Name: mexc.DefaultMarketConfig,
okx.Name: okx.DefaultMarketConfig,
// // ----------------------------------------------------------- //
// // ---------------------Start Defi Providers------------------- //
// // ----------------------------------------------------------- //
uniswapv3.Name: uniswapv3.DefaultETHMarketConfig,
}

// LocalConfig defines a readable config for local development. Any changes to this
Expand Down Expand Up @@ -230,6 +235,14 @@
WebSocket: okx.DefaultWebSocketConfig,
Type: types.ConfigType,
},
// ----------------------------------------------------------- //
// ---------------------Start Defi Providers------------------- //
// ----------------------------------------------------------- //
{
Name: uniswapv3.Name,
API: uniswapv3.DefaultETHAPIConfig,
Type: types.ConfigType,
},
},
}
)
Expand Down Expand Up @@ -302,7 +315,7 @@
&updateInterval,
"update-interval",
"",
500*time.Millisecond,
250*time.Millisecond,

Check warning on line 318 in cmd/slinky-config/main.go

View check run for this annotation

Codecov / codecov/patch

cmd/slinky-config/main.go#L318

Added line #L318 was not covered by tests
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a relatively small change, but in general I think we should avoid combining unrelated changes into PRs. It makes it more likely for people to miss them.
Updating the default price aggregation interval has nothing to do with adding uniswap markets.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea agreed, this was meant to be a fix in previous PRs but got excluded.

"Interval at which the oracle will update the prices. This should be set to the interval desired by the chain.",
)
rootCmd.Flags().DurationVarP(
Expand Down
Loading
Loading