You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* feat(eth-price): add initial implementation for eth-price package with client and price retrieval functions
* fix(test): use contractAddress variable in getPriceByTimestamp test
* feat(eth-price): update package name and structure, add index file for exports
* refactor(eth-price): rename timestamp parameter to targetTimestamp for clarity
* refactor(eth-price): clarify parameter description for targetTimestamp in getPriceByTimestamp function
* refactor(eth-price): rename Data type to PriceData for clarity in getPriceByTimestamp function
* feat(db): add ETHPrice model and migration for eth_price table
* feat(env): add ETH_PRICE_SYNCER_CRON_PATTERN to environment configuration
* feat(syncers): add ETHPriceSyncer for fetching and storing ETH price data
* docs(env): clarify description for ETH_PRICE_SYNCER_CRON_PATTERN in documentation
* docs(env): update comment for ETH_PRICE_SYNCER_CRON_PATTERN to include default frequency
* fix(get-price): improve error message for missing ETH price data
* feat(env): add RPC_URL for Ethereum RPC endpoint configuration
* feat(db): add EthUsdPrice table and update syncer to use new model
* fix(get-price): rename variable for clarity in getPriceByTimestamp function
* feat(docs): add detailed JSDoc comments for binary search and phase aggregator functions
* feat(docs): enhance JSDoc comments for getPhaseAggregators and getPriceByTimestamp functions
* refactor: rename timestamp variables for clarity and consistency across functions
* fix(get-price): rename targetTimestamp variable to targetTimestampSeconds for consistency in getPriceByTimestamp tests
* chore: rename test file
* feat: implement getPriceInRange function and corresponding tests
* feat(db): set eth usd price model timestamp field to unique
* refactor(eth-price): centralized and unified all ETH price getter logic into a new class called PriceFeedFinder
* test(eth-price): spin up a local forked anvil instance to run price feed tests against
* ci: set up foundry before running tests
* test: add anvil to test package
* chore(eth-price): remove pnpm lock package
* feat: add the following:
- Add support for parametrizing eth price syncer chain id
- Fix price feed finder issue where binary search stops at first valid price value, it should continue until it finds the closest one
- Improve price feed finder by loading aggregators only once when creating an instance
* refactor(eth-price): polish returning types, improve private functions and improve comments
* chore(eth-price): remove unused functions from abis
* style(eth-price): simplify `PriceFeedFinder` name
* chore: rename `eth-price` package
* chore(price-feed): add version, lint and ci missing commands
* chore(price-feed): include missing ts files to `tsconfig` file
* chore: apply lint fixes
* chore: update pnpm lock file
* feat(db): add price feed state model
* fix(price-feed): return formatted prices
* feat(syncers): update ETH price syncer to record prices based on configurable granularity
* feat(docs): add eth price syncer missing env vars
* chore: add missing env vars to turbo.json
* test(syncers): add eth price syncer tests
* chore: add `VITEST_MAINNET_FORK_URL` to `turbo.json`
* test: try to get `VITEST_MAINNET_FORK_URL` from nodejs envs
* test(syncer): coerce chain id
* style(api): remove `console.log`
* chore: resolve lint issues
Sort deps and standarize viem version across all packages
* test(test): add and expose test viem client
* fix(syncers): inject price feed instance into eth price syncer instead of creating internally
* style(price-feed): fix abi file name
* fix(docs): remove eth price syncer time tolerance default value
* fix(price-feed): fix abi import route
* chore(price-feed): remove redundant `@blobscan/test` dep
* chore: add changesets
---------
Co-authored-by: PJColombo <[email protected]>
- You are about to alter the column `price` on the `eth_usd_price` table. The data in that column could be lost. The data in that column will be cast from `Decimal(65,30)` to `Decimal(100,0)`.
5
+
- A unique constraint covering the columns `[timestamp]` on the table `eth_usd_price` will be added. If there are existing duplicate values, this will fail.
6
+
7
+
*/
8
+
-- AlterTable
9
+
ALTERTABLE"eth_usd_price" ALTER COLUMN "price"SET DATA TYPE DECIMAL(100,0);
10
+
11
+
-- CreateIndex
12
+
CREATEUNIQUE INDEX "eth_usd_price_timestamp_key" ON"eth_usd_price"("timestamp");
- You are about to alter the column `price` on the `eth_usd_price` table. The data in that column could be lost. The data in that column will be cast from `Decimal(100,0)` to `Decimal(18,8)`.
5
+
6
+
*/
7
+
-- AlterTable
8
+
ALTERTABLE"eth_usd_price" ALTER COLUMN "price"SET DATA TYPE DECIMAL(18,8);
9
+
10
+
-- CreateTable
11
+
CREATETABLE "eth_usd_price_feed_state" (
12
+
"id"SERIALNOT NULL,
13
+
"latest_round_id"DECIMAL(100,0) NOT NULL,
14
+
"updated_at"TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
0 commit comments