Exercise: Payments

Practice implementing payments in Solidity.

We'll cover the following

In this exercise, we'll implement the last method in the Auction smart contract and allow users to withdraw their unsuccessful bids after the auction finishes. This will also allow us to practice working with payments in Solidity.

The withdrawBid method

The final function we need to implement is the withdrawBid method. Users will call this method after the auction is finished to withdraw the full amount of their bids.

As always, we’ve added TODO comments for what should be changed/implemented in this exercise.

Get hands-on with 1400+ tech skills courses.