-
Notifications
You must be signed in to change notification settings - Fork 36
chore(sponsored-feeds): use JSON format for the sponsored feed data for EVM #746
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
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
dacbf0f
use yaml format for the sponsored feed data for evm
nidhi-singh02 cf9d95f
changes to hyperEVM
nidhi-singh02 bc00d71
individual yaml file for each chain for easy of use
nidhi-singh02 d62f8b2
comments edit
nidhi-singh02 d50cbb7
fix precommit from merged changes
nidhi-singh02 c7cd51a
linter fix
nidhi-singh02 d814ff0
use json with static imports, remove yaml files
nidhi-singh02 66eabcb
use json directly in the mdx file, no need of network key
nidhi-singh02 1c733c4
precommit apply
nidhi-singh02 6dc21ee
remove yaml packages
nidhi-singh02 49728da
make updateParams as react component
nidhi-singh02 00fb7c1
use Intl namespace
nidhi-singh02 9647761
use duration.formatToParts
nidhi-singh02 1e62312
not use Readt.FS, remove type cast and no polyfil
nidhi-singh02 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
121 changes: 121 additions & 0 deletions
121
pages/price-feeds/sponsored-feeds/data/evm/base_mainnet.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
[ | ||
{ | ||
"alias": "USDC/USD", | ||
"id": "eaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a", | ||
"time_difference": 3600, | ||
"price_deviation": 1, | ||
"confidence_ratio": 100 | ||
}, | ||
{ | ||
"alias": "ETH/USD", | ||
"id": "ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace", | ||
"time_difference": 3600, | ||
"price_deviation": 1, | ||
"confidence_ratio": 100 | ||
}, | ||
{ | ||
"alias": "WETH/USD", | ||
"id": "9d4294bbcd1174d6f2003ec365831e64cc31d9f6f15a2b85399db8d5000960f6", | ||
"time_difference": 3600, | ||
"price_deviation": 1, | ||
"confidence_ratio": 100 | ||
}, | ||
{ | ||
"alias": "PUFETH/USD", | ||
"id": "e5801530292c348f322b7b4a48c1c0d59ab629846cce1c816fc27aee2054b560", | ||
"time_difference": 3600, | ||
"price_deviation": 1, | ||
"confidence_ratio": 100 | ||
}, | ||
{ | ||
"alias": "WEETH/USD", | ||
"id": "9ee4e7c60b940440a261eb54b6d8149c23b580ed7da3139f7f08f4ea29dad395", | ||
"time_difference": 3600, | ||
"price_deviation": 1, | ||
"confidence_ratio": 100 | ||
}, | ||
{ | ||
"alias": "EZETH/USD", | ||
"id": "06c217a791f5c4f988b36629af4cb88fad827b2485400a358f3b02886b54de92", | ||
"time_difference": 3600, | ||
"price_deviation": 1, | ||
"confidence_ratio": 100 | ||
}, | ||
{ | ||
"alias": "CBETH/USD", | ||
"id": "15ecddd26d49e1a8f1de9376ebebc03916ede873447c1255d2d5891b92ce5717", | ||
"time_difference": 3600, | ||
"price_deviation": 1, | ||
"confidence_ratio": 100 | ||
}, | ||
{ | ||
"alias": "WSTETH/USD", | ||
"id": "6df640f3b8963d8f8358f791f352b8364513f6ab1cca5ed3f1f7b5448980e784", | ||
"time_difference": 3600, | ||
"price_deviation": 1, | ||
"confidence_ratio": 100 | ||
}, | ||
{ | ||
"alias": "RSETH/USD", | ||
"id": "0caec284d34d836ca325cf7b3256c078c597bc052fbd3c0283d52b581d68d71f", | ||
"time_difference": 3600, | ||
"price_deviation": 1, | ||
"confidence_ratio": 100 | ||
}, | ||
{ | ||
"alias": "PYTH/USD", | ||
"id": "0bbf28e9a841a1cc788f6a361b17ca072d0ea3098a1e5df1c3922d06719579ff", | ||
"time_difference": 3600, | ||
"price_deviation": 1, | ||
"confidence_ratio": 100 | ||
}, | ||
{ | ||
"alias": "SUI/USD", | ||
"id": "23d7315113f5b1d3ba7a83604c44b94d79f4fd69af77f804fc7f920a6dc65744", | ||
"time_difference": 3600, | ||
"price_deviation": 1, | ||
"confidence_ratio": 100 | ||
}, | ||
{ | ||
"alias": "XRP/USD", | ||
"id": "ec5d399846a9209f3fe5881d70aae9268c94339ff9817e8d18ff19fa05eea1c8", | ||
"time_difference": 3600, | ||
"price_deviation": 1, | ||
"confidence_ratio": 100 | ||
}, | ||
{ | ||
"alias": "USR/USD", | ||
"id": "10b013adec14c0fe839ca0fe54cec9e4d0b6c1585ac6d7e70010dac015e57f9c", | ||
"time_difference": 3600, | ||
"price_deviation": 1, | ||
"confidence_ratio": 100 | ||
}, | ||
{ | ||
"alias": "USR/USD.RR", | ||
"id": "512a79cc65f49531f0bbb72956353e79ecdc1e4a6e5241847196c1f9a11d8a52", | ||
"time_difference": 3600, | ||
"price_deviation": 1, | ||
"confidence_ratio": 100 | ||
}, | ||
{ | ||
"alias": "RLP/USD", | ||
"id": "7265d5cf8ee0e7b5266f75ff19c42c5b7697a9756c9304aa78b6be4fbb8d823d", | ||
"time_difference": 3600, | ||
"price_deviation": 1, | ||
"confidence_ratio": 100 | ||
}, | ||
{ | ||
"alias": "RLP/USD.RR", | ||
"id": "796bcb684fdfbba2b071c165251511ab61f08c8949afd9e05665a26f69d9a839", | ||
"time_difference": 3600, | ||
"price_deviation": 1, | ||
"confidence_ratio": 100 | ||
}, | ||
{ | ||
"alias": "WSTUSR/USR.RR", | ||
"id": "b74c2bc175c2dab850ce5a5451608501c293fe8410cb4aba7449dd1c355ab706", | ||
"time_difference": 3600, | ||
"price_deviation": 1, | ||
"confidence_ratio": 100 | ||
} | ||
] |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat for this. It's a bit overkill for our needs as we don't plan to localize pretty much ever, certainly not any time soon, but in general it's probably wise to stick with standards whenever possible.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, using Intl.DurationFormat seems like a overkill, the code earlier was easy to read imo. Though I agree with your point of sticking around with standards. So added Intl.DurationFormat in
formatTimeUnit
in commit 00fb7c1Was using regex with
Intl.DurationFormat
, so instead using https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DurationFormat/formatToParts as this returns an array with unit and value. Check the latest commit 9647761