<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>Busayo </title>
        <link>https://paragraph.com/@busayo</link>
        <description>Software Dev and Technical Writer</description>
        <lastBuildDate>Wed, 22 Jul 2026 01:40:06 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>en</language>
        <copyright>All rights reserved</copyright>
        <item>
            <title><![CDATA[Top 5 Web3 Infrastructure providers you should know]]></title>
            <link>https://paragraph.com/@busayo/top-5-web3-infrastructure-providers-you-should-know</link>
            <guid>srRBqBwfIXyHkjGXUg2d</guid>
            <pubDate>Mon, 09 May 2022 11:45:23 GMT</pubDate>
            <description><![CDATA[Infrastructure is essentialInfrastructure is simply the building blocks or foundation of any system. Complex systems need a suitable infrastructure to function efficiently. Infrastructure is a very important topic in Web3. Building on blockchains such as Ethereum, Polygon, Avalanche, and Fantom requires a lot of resources if one intends to set up their own infrastructure from scratch. For example, you would need to set up a node which can be expensive and time-consuming. Today, we now have in...]]></description>
            <content:encoded><![CDATA[<figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/e4aef666c480f5e758bc9d88f23ce2b9a878f506e568a46efefcf25d9d6ecb65.jpg" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><h2 id="h-infrastructure-is-essential" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Infrastructure is essential</h2><p>Infrastructure is simply the building blocks or foundation of any system. Complex systems need a suitable infrastructure to function efficiently. Infrastructure is a very important topic in Web3.</p><p>Building on blockchains such as Ethereum, Polygon, Avalanche, and Fantom requires a lot of resources if one intends to set up their own infrastructure from scratch. For example, you would need to set up a node which can be expensive and time-consuming.</p><p>Today, we now have infrastructure providers that provide developer tools, APIs, node functionalities, and data access so that developers/builders are able to concentrate more on their products and are able to ship their dApps faster. On your preferred blockchain, you get to easily build and operate full nodes and validator nodes usually in pretty simple steps.</p><p>This topic was inspired by my personal usage and interaction with some infrastructure providers. In no particular order, here is a review of some of the best Web3 infrastructure providers alongside their features, products, and pricing.</p><h2 id="h-infura" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Infura</h2><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/ded564c91877a1cde15104c4181fb0936223b0188d424db5cfd7d538339d7aa8.jpg" alt="Infura" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Infura</figcaption></figure><p>Infura simplifies blockchain development by bringing all of your tools together in one place: Ethereum Nodes, Eth2 Nodes, Transaction Relaying, Layer 2 Networks, IPFS, Filecoin, and more.</p><p><strong>Infura Products</strong></p><ul><li><p><strong><em>Ethereum API</em></strong>: The Infura API suite gives rapid access to the Ethereum network through HTTPS and WebSockets.</p></li><li><p><strong><em>IPFS API and Dedicated Gateway</em></strong>: Infura&apos;s IPFS API and dedicated gateway, designed for speed and simplicity, links apps of all sizes to distributed secure storage, paving the path for more resilience online.</p></li><li><p><strong><em>Infura Transactions (ITX)</em></strong>: ITX is the simplest method to submit an Ethereum transaction; simply choose your budget, fill your tank, and let them discover the cheapest gas pricing for you.</p></li></ul><p><strong>Infura Pricing</strong></p><p>Infura&apos;s pricing fits per app and app usage. There are also custom plans with bulk savings, service level agreements, and limitless projects.</p><p>For the Ethereum API, there is a free plan that supports up to 3 projects and 100,000 Requests per Day as well as the developer plan which supports 10 Projects and 200,000 Requests per Day for $50/month. Other plans are also available such as the team and growth plan.</p><p>For the IPFS API &amp; Dedicated Gateway, there is a free plan with up to 5GB of storage and 5GB data transfer up as well as the Plus plan which is billed per usage with unlimited storage at $0.08/GB and unlimited data transfer at $0.12/GB.</p><h2 id="h-ankr" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Ankr</h2><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/39ec79c156cbed1b5b9e06d89d6eaed0ec41539434bf7c4057e658695f0880df.png" alt="Ankr" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Ankr</figcaption></figure><p>Ankr offers a genuinely distributed and decentralized Web3 architecture for running node services. Ankr Build is a completely distributed, multi-chain infrastructure network and toolset that simplifies application development. Ankr currently supports the following chains: Arbitrum, Avalanche, Binance Smart Chain, Celo, Ethereum, Fantom, Gnosis, Harmony, IoTex, Moonbeam, Near, Nervos, Polygon and Solana</p><p><strong>Ankr Products</strong></p><ul><li><p><strong><em>Public Community RPC APIs</em></strong>: The Ankr Protocol network is topped by the Public RPC Layer.</p></li><li><p><strong><em>Ankr Scan</em></strong>: Ankr Scan is a Multi-Chain Explorer that allows you to see assets from several chains as well as those tied to a single wallet address. Think EtherScan but for multiple chains.</p></li><li><p><strong><em>Node Services</em></strong>: For 50+ chains, full, archive, and validator/staking nodes are accessible on Ankr.</p></li></ul><p><strong>Ankr Pricing</strong></p><p>Ankr offers adjustable options and price plans to fit all budgets and needs.</p><p>The Public RPCs are free to use with an offer of access to Full and Archive Data, a soft limit of 1M requests per day, and HTTPS connection. The Premium RPCs cost about 10000 ANKR(approximately $717.44) with unlimited rate limit, unlimited requests, HTTPS and WebSockets connection, and Global node coverage.</p><p>There are several API pricing plans such as the free plan with a 20 rate-limit per second and 170,000 Requests per day. There is also the basic plan which costs about $49/month for access to 200 rate-limit per second, 1M Requests per day and the builder plan which costs about $224/month for access to 600 rate-limit per second and 5M requests per day.</p><h2 id="h-quicknode" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">QuickNode</h2><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/f1744e21e29800d2aefa666897c4ab6d0734f752b8238776940ad3b0151ea029.jpg" alt="QuickNode" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">QuickNode</figcaption></figure><p>QuickNode makes it simple to power blockchain apps and scale-up business by providing elastic APIs, sophisticated tools and analytical tools. QuickNode currently supports the following chains: Binance Smart Chain, Ethereum, Arbitrum, Optimism, Avalanche, Fantom, Luna, Solana, Algorand, Terra, Gnosis, Polygon and Celo.</p><p><strong>QuickNode Products</strong></p><ul><li><p><strong><em>QuickNode APIs</em></strong>: QuickNode provides either a dedicated endpoint that always serves traffic from the same location as specified when the endpoint was launched or access to their global network, which always routes traffic to the nearest available endpoint.</p></li><li><p><strong><em>NFT API</em></strong>: Without having to filter through individual smart contracts, QuickNode&apos;s NFT API allows you to discover any NFT, verify ownership, and retrieve transaction history and key collection information.</p></li></ul><p><strong>QuickNode Pricing</strong></p><p>QuickNode provides a 7-day free trial plan known as the Launch plan after which a fee of $9/month is required and it gives access to Domain Masking, Analytics, HTTP Endpoint, and Rate Limits of 150k responses per day. There is also the Build plan which costs $49/month for rate limits of unlimited responses per day, support response within 12 hours together with Domain Masking, Analytics, HTTP Endpoint, and URL Whitelisting.</p><p>The Scale plan and Enterprise/Custom plans are also available. The Scale plan costs $299/month. If you also need a private blockchain cloud, QuickNode can provide it.</p><h2 id="h-moralis" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Moralis</h2><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/351e190bbb6426719058a184689d76fda8a87bda6c9fcb3a594dffdf55796b23.png" alt="Moralis" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Moralis</figcaption></figure><p>Moralis offers a unified approach for developing high-performance dApps and compatibility with favorite web3 tools and services. Consider Moralis as Firebase but for Web3. Moralis offers managed backend services for blockchain applications. Moralis currently supports the following chains: Ethereum, Binance Smart Chain, Polygon, Arbitrum, and Avalanche.</p><p><strong>Moralis Products</strong></p><ul><li><p><strong><em>Moralis Web3 SDK</em></strong>: The Moralis JavaScript SDK is the means via which the builder&apos;s dApp will communicate with the Moralis Server. The SDK may be used to access and set user data in order to get balances, NFTs, events, or transactions. It supports crypto login and user management, IPFS integration and dApp hosting.</p></li><li><p><strong><em>Moralis Web3 API</em></strong>: Moralis Web3 API is a sophisticated blockchain API that allows you to query data from any chain. The Web3 API can be called using the Moralis SDK with just a few lines of code.</p></li><li><p><strong><em>Speedy Node API</em></strong>: Speedy Nodes have the same functionality as regular Ethereum, Polygon, or BSC nodes, but they are faster, more reliable, and completely integrated with all Moralis services.</p></li></ul><p><strong>Moralis Pricing</strong></p><p>The free plan is called the Starter Plan and is very suitable for people that are just starting off with blockchain development. It offers free access to unlimited plugins, IPFS Gateway, and community support with 10M requests per month using Speedy Nodes + Moralis API.</p><p>For blockchain professionals, there is the Pro plan that costs $49 per month with access to everything in the free plan with more requests, a higher Rate Limit, and email support with 25M requests per month using Speedy Nodes + Moralis API.</p><p>For larger teams, there is the Enterprise plan with custom requests per month, SLAs, and premium chat support (Phone, Chat, Email).</p><h2 id="h-alchemy" class="text-3xl font-header !mt-8 !mb-4 first:!mt-0 first:!mb-0">Alchemy</h2><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/96893b2e451e810812c6a5df730ce68ed55098ca205ec657bf8a9c3a4da9e9e0.jpg" alt="Alchemy" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="">Alchemy</figcaption></figure><p>Alchemy powers some of the top Web3 applications that are existing today. Alchemy gives the capabilities of a node and a no-configuration in-house set of developer tools for quicker prototyping, debugging, and shipping of dApps. Alchemy currently supports the following chains: Ethereum, Polygon, Arbitrum, Optimism, Flow, StarkNet and Crypto.org.</p><p><strong>Alchemy Products</strong></p><ul><li><p><strong><em>Alchemy Supernode</em></strong>: Alchemy Supernode&apos;s revolutionary web3 design amplifies every piece of node capability with separate distributed systems and ensures real-time data accuracy using a proprietary coordinator service.</p></li><li><p><strong><em>Alchemy Notify</em></strong>: Alchemy Notify provides the UX builders expect and need. Alchemy Notify allows users to deliver appropriate, timely alerts on the most significant Web3 events such as notifications for mined transactions, dropped transactions, and smart contract events which are integrated.</p></li><li><p><strong><em>Alchemy Build</em></strong>: Alchemy Build is a no-configuration in-house developer tool package that allows you to prototype, debug, and release products more quickly. Alchemy Build allows you to quickly prototype and fix unsuccessful requests with instant UI feedback.</p></li><li><p><strong><em>Alchemy Monitor</em></strong>: Alchemy Monitor is an all-in-one dashboard and alarm system for app health, performance, and user behavior.</p></li><li><p><strong><em>Enhanced and Chain APIS</em></strong>: Alchemy provides access to improved API methods for returning block and transaction requests, smart contract event logs, and pending transactions in a virtual mempool. Furthermore, access to updated WebSockets that are continually listening for changes and manage reconnection and backfilling missing events automatically.</p></li></ul><p><strong>Alchemy Pricing</strong></p><p>Alchemy provides the free tier plan which gives free access to Supernode, Build, Monitor, Notify, Enhanced APIs, No Daily Request Limits, Full Archive Data and supports up to 5 apps.</p><p>The Growth plan costs about $49/month with access to everything in the free plan together with Auto-Scaling Compute Units, Parity Trace and Geth Debug, 2x Higher Throughput and supports up to 15 apps.</p><p>The Enterprise plan includes access to everything in the Growth plan plus Committed Use Discounts, Custom SLAs, Custom Throughput and supports an unlimited number of apps.</p><p>With that, we have come to end of my review! I recommend that you try out any of them that suits your needs! Happy hacking and building😁! LFG🚀🚀🚀! WAGMI🚀🚀!</p>]]></content:encoded>
            <author>busayo@newsletter.paragraph.com (Busayo )</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/74cb65a14c76e2de92d2ff8dc35c8c7c4bb94f0b4f0dd9d83ac267076077c2d9.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[A simple web app to display ETH to USD price feed using DIA Oracle]]></title>
            <link>https://paragraph.com/@busayo/a-simple-web-app-to-display-eth-to-usd-price-feed-using-dia-oracle</link>
            <guid>rmoxqw6q9VpIAppsd3AP</guid>
            <pubDate>Tue, 05 Apr 2022 12:31:04 GMT</pubDate>
            <description><![CDATA[What are oracles? Oracles are data feeds that connect blockchains to off-chain, real-world information so that you can query data in your smart contracts. Your smart contracts will be able to execute based upon inputs and outputs from the real world. They typically provide a way for web3 ecosystems to access existing data sources and advanced computations. They are very useful for data analysts, data providers and data users. DIA Oracle One of such existing oracle is the DIA oracle. DIA provi...]]></description>
            <content:encoded><![CDATA[<p><strong>What are oracles?</strong></p><p>Oracles are data feeds that connect blockchains to off-chain, real-world information so that you can query data in your smart contracts. Your smart contracts will be able to execute based upon inputs and outputs from the real world. They typically provide a way for web3 ecosystems to access existing data sources and advanced computations. They are very useful for data analysts, data providers and data users.</p><p><strong>DIA Oracle</strong></p><p>One of such existing oracle is the DIA oracle. DIA provides a reliable and verifiable bridge between off-chain data from various sources and on-chain smart contracts that can be used to build a variety of financial dApps. There are quite a number of things you can do with DIA. You can develop applications and sources on top of DIA. In this article, I would be creating a simple app that displays ETH/USD price. Presently, DIA allows you do several other pairs such as BTC, DIA, USDC, FTM, SDN, KSM, MOVR which are all USD based.</p><p><strong>Time to code</strong> Let&apos;s get to code, shall we! I will be using javascript and html for this.</p><p>Create/Navigate to your project folder:</p><pre data-type="codeBlock" text="mkdir pricefeed
cd pricefeed
"><code><span class="hljs-built_in">mkdir</span> pricefeed
<span class="hljs-built_in">cd</span> pricefeed
</code></pre><p>Now create <code>index.html</code> and <code>index.js</code> files:</p><pre data-type="codeBlock" text="touch index.html
touch index.js
"><code>touch index.html
touch index.js
</code></pre><p>I will be using one of DIA&apos;s <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://docs.diadata.org/documentation/oracle-documentation/deployed-contracts">deployed contracts</a>. For this writeup, I would be using the smart contract address deployed on <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://bscscan.com/address/0xbafee71d40babc12a3d0b2b8937ee62d3a070835">Binance mainnet</a>.</p><p>Nagivate to the contract tab on bscscan</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/a2ea0245554b3c53e0ad7132a6731e9e06d1c08c6207fbba5b5ef9253d72b9b1.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>Here is the contract&apos;s source code</p><pre data-type="codeBlock" text="pragma solidity 0.7.4;                                                                                                                                                                                                                      

contract DIACoinmarketcapOracle {                                                  
    mapping (string =&gt; uint256) public values;                                     
    address oracleUpdater;                                                         

    event OracleUpdate(string key, uint128 value, uint128 timestamp);              
    event UpdaterAddressChange(address newUpdater);                                

    constructor() {                                                                
        oracleUpdater = msg.sender;                                                
    }                                                                              

    function setValue(string memory key, uint128 value, uint128 timestamp) public {
        require(msg.sender == oracleUpdater);                                      
        uint256 cValue = (((uint256)(value)) &lt;&lt; 128) + timestamp;                  
        values[key] = cValue;                                                      
        emit OracleUpdate(key, value, timestamp);                                  
    }                                                                              

    function getValue(string memory key) public view returns (uint128, uint128) {
        uint256 cValue = values[key];                                              
        uint128 timestamp = (uint128)(cValue % 2**128);                            
        uint128 value = (uint128)(cValue &gt;&gt; 128);                                  
        return (value, timestamp);                                                 
    }                                                                              

    function updateOracleUpdaterAddress(address newOracleUpdaterAddress) public {
        require(msg.sender == oracleUpdater);                                      
        oracleUpdater = newOracleUpdaterAddress;                                   
        emit UpdaterAddressChange(newOracleUpdaterAddress);                        
    }                                                                              
}
"><code><span class="hljs-meta"><span class="hljs-keyword">pragma</span> <span class="hljs-keyword">solidity</span> 0.7.4;</span>                                                                                                                                                                                                                      

<span class="hljs-class"><span class="hljs-keyword">contract</span> <span class="hljs-title">DIACoinmarketcapOracle</span> </span>{                                                  
    <span class="hljs-keyword">mapping</span> (<span class="hljs-keyword">string</span> <span class="hljs-operator">=</span><span class="hljs-operator">></span> <span class="hljs-keyword">uint256</span>) <span class="hljs-keyword">public</span> values;                                     
    <span class="hljs-keyword">address</span> oracleUpdater;                                                         

    <span class="hljs-function"><span class="hljs-keyword">event</span> <span class="hljs-title">OracleUpdate</span>(<span class="hljs-params"><span class="hljs-keyword">string</span> key, <span class="hljs-keyword">uint128</span> value, <span class="hljs-keyword">uint128</span> timestamp</span>)</span>;              
    <span class="hljs-function"><span class="hljs-keyword">event</span> <span class="hljs-title">UpdaterAddressChange</span>(<span class="hljs-params"><span class="hljs-keyword">address</span> newUpdater</span>)</span>;                                

    <span class="hljs-function"><span class="hljs-keyword">constructor</span>(<span class="hljs-params"></span>) </span>{                                                                
        oracleUpdater <span class="hljs-operator">=</span> <span class="hljs-built_in">msg</span>.<span class="hljs-built_in">sender</span>;                                                
    }                                                                              

    <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">setValue</span>(<span class="hljs-params"><span class="hljs-keyword">string</span> <span class="hljs-keyword">memory</span> key, <span class="hljs-keyword">uint128</span> value, <span class="hljs-keyword">uint128</span> timestamp</span>) <span class="hljs-title"><span class="hljs-keyword">public</span></span> </span>{
        <span class="hljs-built_in">require</span>(<span class="hljs-built_in">msg</span>.<span class="hljs-built_in">sender</span> <span class="hljs-operator">=</span><span class="hljs-operator">=</span> oracleUpdater);                                      
        <span class="hljs-keyword">uint256</span> cValue <span class="hljs-operator">=</span> (((<span class="hljs-keyword">uint256</span>)(value)) <span class="hljs-operator">&#x3C;</span><span class="hljs-operator">&#x3C;</span> <span class="hljs-number">128</span>) <span class="hljs-operator">+</span> timestamp;                  
        values[key] <span class="hljs-operator">=</span> cValue;                                                      
        <span class="hljs-keyword">emit</span> OracleUpdate(key, value, timestamp);                                  
    }                                                                              

    <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">getValue</span>(<span class="hljs-params"><span class="hljs-keyword">string</span> <span class="hljs-keyword">memory</span> key</span>) <span class="hljs-title"><span class="hljs-keyword">public</span></span> <span class="hljs-title"><span class="hljs-keyword">view</span></span> <span class="hljs-title"><span class="hljs-keyword">returns</span></span> (<span class="hljs-params"><span class="hljs-keyword">uint128</span>, <span class="hljs-keyword">uint128</span></span>) </span>{
        <span class="hljs-keyword">uint256</span> cValue <span class="hljs-operator">=</span> values[key];                                              
        <span class="hljs-keyword">uint128</span> timestamp <span class="hljs-operator">=</span> (<span class="hljs-keyword">uint128</span>)(cValue <span class="hljs-operator">%</span> <span class="hljs-number">2</span><span class="hljs-operator">*</span><span class="hljs-operator">*</span><span class="hljs-number">128</span>);                            
        <span class="hljs-keyword">uint128</span> value <span class="hljs-operator">=</span> (<span class="hljs-keyword">uint128</span>)(cValue <span class="hljs-operator">></span><span class="hljs-operator">></span> <span class="hljs-number">128</span>);                                  
        <span class="hljs-keyword">return</span> (value, timestamp);                                                 
    }                                                                              

    <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">updateOracleUpdaterAddress</span>(<span class="hljs-params"><span class="hljs-keyword">address</span> newOracleUpdaterAddress</span>) <span class="hljs-title"><span class="hljs-keyword">public</span></span> </span>{
        <span class="hljs-built_in">require</span>(<span class="hljs-built_in">msg</span>.<span class="hljs-built_in">sender</span> <span class="hljs-operator">=</span><span class="hljs-operator">=</span> oracleUpdater);                                      
        oracleUpdater <span class="hljs-operator">=</span> newOracleUpdaterAddress;                                   
        <span class="hljs-keyword">emit</span> UpdaterAddressChange(newOracleUpdaterAddress);                        
    }                                                                              
}
</code></pre><p>Scroll down to also find the contract&apos;s ABI as we would be using it shortly.</p><figure float="none" data-type="figure" class="img-center" style="max-width: null;"><img src="https://storage.googleapis.com/papyrus_images/f47ed03ddf1109ae0a1da2c92f286266179cc38b3ac05aa1834a419b4f50c6c4.png" alt="" blurdataurl="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=" nextheight="600" nextwidth="800" class="image-node embed"><figcaption HTMLAttributes="[object Object]" class="hide-figcaption"></figcaption></figure><p>Now looking at the contract, there is a getValue method, in order to get the response from the method, make a call to the method as shown below. Remember also that we are using the key ‘ETH’</p><p>Your code should look like this</p><pre data-type="codeBlock" text="const currentPriceResponse = await contract.methods.getValue(&apos;ETH&apos;).call()
"><code>const currentPriceResponse <span class="hljs-operator">=</span> await <span class="hljs-keyword">contract</span>.methods.getValue(<span class="hljs-string">'ETH'</span>).<span class="hljs-built_in">call</span>()
</code></pre><p>Copy the ABI as we would also be using it in our code. In the end, your js file would look something close to this</p><pre data-type="codeBlock" text="async function connect() {
    const priceElem = document.querySelector(&apos;#price&apos;)
    try {
        priceElem.textContent = &apos;Updating price...&apos;;

        const ABI = [ABI]

        const web3 = new Web3(new Web3.providers.HttpProvider(&quot;https://bsc-dataseed.binance.org/&quot;))
        const contract = new web3.eth.Contract(ABI);
        contract.options.address = &quot;0xbAFEe71d40baBC12a3D0B2b8937ee62D3A070835&quot;;
        const currentPriceResponse = await contract.methods.getValue(&apos;ETH&apos;).call()
        console.log(currentPriceResponse[0]);
        if (currentPriceResponse[0]) {
            const formatter = new Intl.NumberFormat(&apos;en-US&apos;, {
                style: &apos;currency&apos;,
                currency: &apos;USD&apos;,
                minimumFractionDigits: 2,
            });
            priceElem.textContent = formatter.format(currentPriceResponse[0] / 100000);
        }

    } catch (e) {
        priceElem.textContent = &apos;An error occurred while updating the price, please refresh your page.&apos;;
    }
}

window.onload = function() {
    connect();
}
"><code>async <span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">connect</span>(<span class="hljs-params"></span>) </span>{
    const priceElem <span class="hljs-operator">=</span> document.querySelector(<span class="hljs-string">'#price'</span>)
    <span class="hljs-keyword">try</span> {
        priceElem.textContent <span class="hljs-operator">=</span> <span class="hljs-string">'Updating price...'</span>;

        const ABI <span class="hljs-operator">=</span> [ABI]

        const web3 <span class="hljs-operator">=</span> <span class="hljs-keyword">new</span> Web3(<span class="hljs-keyword">new</span> Web3.providers.HttpProvider(<span class="hljs-string">"https://bsc-dataseed.binance.org/"</span>))
        const <span class="hljs-class"><span class="hljs-keyword">contract</span> = <span class="hljs-title"><span class="hljs-keyword">new</span></span> <span class="hljs-title">web3</span>.<span class="hljs-title">eth</span>.<span class="hljs-title">Contract</span>(<span class="hljs-params">ABI</span>);
        <span class="hljs-title"><span class="hljs-keyword">contract</span></span>.<span class="hljs-title">options</span>.<span class="hljs-title"><span class="hljs-keyword">address</span></span> = "0<span class="hljs-title">xbAFEe71d40baBC12a3D0B2b8937ee62D3A070835</span>";
        <span class="hljs-title">const</span> <span class="hljs-title">currentPriceResponse</span> = <span class="hljs-title">await</span> <span class="hljs-title"><span class="hljs-keyword">contract</span></span>.<span class="hljs-title">methods</span>.<span class="hljs-title">getValue</span>(<span class="hljs-params"><span class="hljs-string">'ETH'</span></span>).<span class="hljs-title">call</span>(<span class="hljs-params"></span>)
        <span class="hljs-title">console</span>.<span class="hljs-title">log</span>(<span class="hljs-params">currentPriceResponse[<span class="hljs-number">0</span>]</span>);
        <span class="hljs-title"><span class="hljs-keyword">if</span></span> (<span class="hljs-params">currentPriceResponse[<span class="hljs-number">0</span>]</span>) </span>{
            const formatter <span class="hljs-operator">=</span> <span class="hljs-keyword">new</span> Intl.NumberFormat(<span class="hljs-string">'en-US'</span>, {
                style: <span class="hljs-string">'currency'</span>,
                currency: <span class="hljs-string">'USD'</span>,
                minimumFractionDigits: <span class="hljs-number">2</span>,
            });
            priceElem.textContent <span class="hljs-operator">=</span> formatter.format(currentPriceResponse[<span class="hljs-number">0</span>] <span class="hljs-operator">/</span> <span class="hljs-number">100000</span>);
        }

    } <span class="hljs-keyword">catch</span> (e) {
        priceElem.textContent <span class="hljs-operator">=</span> <span class="hljs-string">'An error occurred while updating the price, please refresh your page.'</span>;
    }
}

window.onload <span class="hljs-operator">=</span> <span class="hljs-function"><span class="hljs-keyword">function</span>(<span class="hljs-params"></span>) </span>{
    connect();
}
</code></pre><p>Let&apos;s give some edits to the index.html file. You can write something as simple as a div or a header.</p><pre data-type="codeBlock" text="&lt;h5&gt;
    &lt;span&gt;Current Value: &lt;i id=&quot;price&quot;&gt;&lt;/i&gt;&lt;/span&gt;
&lt;/h5&gt;
"><code><span class="hljs-operator">&#x3C;</span>h5<span class="hljs-operator">></span>
    <span class="hljs-operator">&#x3C;</span>span<span class="hljs-operator">></span>Current Value: <span class="hljs-operator">&#x3C;</span>i id<span class="hljs-operator">=</span><span class="hljs-string">"price"</span><span class="hljs-operator">></span><span class="hljs-operator">&#x3C;</span><span class="hljs-operator">/</span>i<span class="hljs-operator">></span><span class="hljs-operator">&#x3C;</span><span class="hljs-operator">/</span>span<span class="hljs-operator">></span>
<span class="hljs-operator">&#x3C;</span><span class="hljs-operator">/</span>h5<span class="hljs-operator">></span>
</code></pre><p>Run your app and you would see that you are getting ETH/USD prices in real time. That’s pretty much it! A sample is deployed <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://objective-goldberg-1a9508.netlify.app/">here</a>. Feel free to check out the <a target="_blank" rel="noopener noreferrer nofollow ugc" class="dont-break-out" href="https://github.com/amoweolubusayo/pricefeed">Source Code</a>.</p><p>Thanks for reading! I hope you learnt a thing or two.</p>]]></content:encoded>
            <author>busayo@newsletter.paragraph.com (Busayo )</author>
            <enclosure url="https://storage.googleapis.com/papyrus_images/2b8945f7268af7c950cd73c5229b9781e68361fd187ed3d3f295925770b4134d.jpg" length="0" type="image/jpg"/>
        </item>
    </channel>
</rss>