Read Contract Data
Learn how to read smart contract data in a web application.
Once we’ve got through the initial hurdles of integrating our application with MetaMask, we can finally see how our application can interact with an Auction
smart contract. In this lesson, we'll see how to read and display data about an existing auction; and in the next lesson, we'll update our application to allow our users to participate in an auction.
Connecting to MetaMask
Before we can read data from Ganache, there's one issue we need to fix. MetaMask is currently connected to the Goerli network and can't interact with Ganache. Fortunately, this isn't hard to fix. We need to open the MetaMask UI and click on the name of the network we're currently using. We'll see the “Add network” button that allows adding a new network, including a network emulated by Ganache.
Get hands-on with 1400+ tech skills courses.