RedStone: Custom URLs

Intro

Vladimir Luschik
3 min readOct 1, 2023

As you know, RedStone allows you to add your custom data sources. This provides significant opportunities for testing your product. It also allows you to create your own data sources and make them available to other products. The primary objective of this concept is to ensure that oracles can work with various types of data and offer a wide range of data options to the blockchain. Of course, we need to establish some minor limitations to maintain the reliability of the solution.

How it works

The RedStone software is comprised of two primary components. The initial component is a network of nodes responsible for retrieving data from external sources and disseminating it to the decentralized cache layer. The second component is the EVM-connector, which retrieves data from the decentralized cache layer, adds signed and serialized information to a transaction, and subsequently sends it to any EVM blockchain chosen by the user, whether it’s Ethereum, Avalanche, Polygon, Arbitrum, or Fantom. What sets our infrastructure apart is its adaptability — our nodes can retrieve data from any source and supply it to the EVM-connector. This is precisely the role of Custom URL Oracles, where users specify which data is acquired and can be utilized in smart contracts.

How to add a custom URL

Please open https://custom-urls-manifest-updater.redstone.finance/

Then, please click on ‘Create new’ button

Then you will see a windown where you can put the following parameters:

  • URL — non secured url to fetch data
  • JSON path — it describes how you can extract asset value from response.
  • Comment — you can describe your custom url. It makes sense to do it not lose your url.

Let me provide an example.

Let’s say you want to add EUR price. Here is an example of API request (GET) which will return EUR price in USD:

In this case, your XPath will be data.reates.EUR

You can click on Evaluate button to see that everything is fine (url and xpath). Here is an example of evaluation result:

Simply click the “Subscribe” button, and after a short wait, you will find your newly created Custom URL prominently displayed on the main page. The last step is to seamlessly incorporate it into your dApp!

That’s it!

Conclusion

As you can see, RedStone provides very simple and convenient way to add new custom URLs.

You can find more details on RedStone’s official documentation — https://docs.redstone.finance/docs/smart-contract-devs/custom-urls. Also, you can watch this video if it’s better for you.

Join RedStone

Twitter | Discord | Website | Github | Linkedin

--

--