npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

witnet-feeds

v2.0.4

Published

Public data feeds sustained by the Witnet Foundation

Downloads

11

Readme

witnet-feeds

Repository of the data feeds sustained by the Witnet Foundation as public goods on multiple EVM chains, and leveraged on the Witnet Oracle blockchain.

A whole list of built-up price feeds and actual public data providers for each one of them can be found in the witnet/assets/requests folder.

The implementation of this repository is leveraged on the witnet-solidity NPM package distributed by the Witnet Foundation.

Package maintenance scripts

Two main concepts to understand first:

  • Feeds denomination in this repository follow the ERC-2362 proposal so every data feed is uniquely named by its base, quote and the base-10 exponent by which actual price values get multiplied before being reported to the EVM context. For instance, "eth/usd-6" would stand for the ETH/USD price feed, whose value would match the integer part of multiplying the actual decimal quotation of ETH in US dollars (e.g. $3,867.521143) by 1,000,000 (e.g 3867521143).

  • Routed feeds are those that involve no specific data requests resolved by the Witnet blockchain, but rather get resolved by combining the last updated onchain values of other feeds, or even other routed feeds. Despite the difference, denomination of routed feeds follows the same rules as abovementioned.

Routed feeds are declared within the witnet/routes folder.

Check price feeds current status

$ yarn pfs:status <ecosystem:network> [...captions]

If no feed captions are specified, status of all feeds supported on specified chain will be listed.

To get a list of supported ecosystems and networks, please use npx witnet avail --chains.

Force the update of price feeds

$ yarn pfs:status <ecosystem:network> --update [--from <STRING>] [...captions]

Deploy a new price feed

$ yarn pfs:deploy <ecosystem:network> ...captions

Captions must have a matching request artifact name declared within witnet/assets/requests, or a matching entry within the witnet/routes/price/index.js file.

Corresponding Witnet data request artifact names follow the pattern WitnetRequestPrice<Base><Quote><Exponent> (e.g. "eth/usd-6" => "WitnetRequestPriceEthUsd6").

Contribute

Feel free to create Pull Requests in Github, if willing to ask the Witnet Foundation to support either new price feeds or improving the existing ones with additional public data sources.

Leverage

If you are willing to interact with the price feeds on any of the EVM chains currently bridged to the Witnet Oracle blockcahin, please follow the instruction on how to import and start using the witnet-solidity NPM package within your project.

Instead, if you are willing to build (and sustain) your own set of price feeds, while leveraging the data sources and Witnet Data Requests already declared within this package, please follow these steps:

  • Install the package: $ npm install --save-dev witnet-feeds

  • Initialize the package: $ npx witnet init

  • Use the bundled Solidity Wizard tool: npx witnet wizard

Either if you opt to import the witnet-solidty or the witnet-feeds package, the Witnet Solidity Wizard will help you to create Solidity mockup contracts showing how to interact with the global WitnetPriceFeeds contract as to:

  • List currently supported price feeds.
  • Introspect actual data sources being used for each price feed.
  • Read the last price updates, and metadata, including the timestamp and the hash of the transaction in the Witnet blockchain that actually solved every price update.
  • Force price updates from your smart contracts.

[witnet-feeds] https://npmjs.com/witnet-feeds [witnet-solidity] https://npmjs.com/witnet-solidity