Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(api): add support for witnetPriceFeeds contract
Add support for networks using [WitnetFeeds contract](https://github.com/witnet/witnet-solidity-bridge/blob/2.0.x/contracts/apps/WitnetFeeds.sol): - Implement the NetworkRouter class that handles all the communication with each network. - Listen to the networks using the `WitnetPriceRouter` with `listenLegacyPriceRouter` and the new network using `WitnetFeeds` with `listenWitnetPriceFeeds`. - Update the configuration file. The networks still using the old witnet price router are marked using `legacy: true` in the network configuration. Also, the file configuration has been updated to include the feed key. This new key consists of a map with the default values of the existing price feeds. According to that, the price feeds deployed using the default configuration have been deleted from the network feeds section. If a feed configuration appears in the network feeds, it will overwrite the default configuration. Now, we get all the available price feeds in a network called the [supportedFeeds](https://github.com/witnet/witnet-solidity-bridge/blob/2.0.x/contracts/interfaces/IFeeds.sol#L8) method.
- Loading branch information