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

core: Onchain Price Fetching & Registry observing #2

Merged
merged 8 commits into from
Dec 13, 2023
Merged

Conversation

pajicf
Copy link
Owner

@pajicf pajicf commented Dec 13, 2023

What does this PR resolve? 🚀

  • Refresh prices every 1min from Coingecko
  • Listener to watch for tickers
  • Store tickers to storage
  • Store prices to storage

Details 📝

New libraries

  • We'll be using Redux for in-memory storage management on the project
  • Ethers for web3 interactions

General

This PR implements price fetching from an off-chain centralised actor and has a cron job setup that occurs every 1 minute.
The data on which tickers to query is obtained from the Registry contract.
After obtained, a listener is setup to observe any future changes in the registry and update the application state.

Based on the app state of tickers, the CoinGecko cron job is ran recurrently.

Checklist ✅

  • I've read Contributions section in the README.md document
  • I have merged the main branch into my branch and resolved all conflicts
  • I have documented the new code
  • I have created automated tests for the new code
  • I have smoke tested the new code locally
  • I have assigned the PR to myself
  • I have named the PR correctly

@pajicf pajicf added the enhancement New feature or request label Dec 13, 2023
@pajicf pajicf self-assigned this Dec 13, 2023
@pajicf pajicf merged commit 40d3099 into main Dec 13, 2023
1 check passed
@pajicf pajicf deleted the price-fetching branch December 13, 2023 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant