Execute a Smart Contract Method
Understand how to send bids to an Ethereum smart contract using a React frontend integrated with MetaMask and web3.js. This lesson guides you through creating transactions, converting Ether amounts, and handling user signatures to interact with the blockchain.
We'll cover the following...
In the previous lesson, we saw how to read data from a smart contract and use this data to populate our application’s UI. In this lesson, we'll continue improving our frontend and implement a feature that'll allow users to send bids to an Auction smart contract.
Executing a smart contract method
The last feature we'll implement will allow users to send bids to the Auction smart contract. We already have the BidInput component that renders components to input a bid amount and place a bid, so all we need to do is update this component to send an Ethereum transaction that'll execute the placeBid method.
To implement this, we need to add two new properties to the BidInput component ...