Setting Up Auction in Remix

In the previous lesson, we took the first step in implementing the Auction smart contract. Now, we need to see how to test it in Remix. Because setting up the Auction contract requires several steps, we’ve added a step-by-step guide for how to configure this smart contract in Remix. Feel free to use this guide later when working on the exercises for this chapter.

Deploying the Auction contract

To deploy the Auction contract, we need to go through a few steps in the correct order. We'll first take a high-level overview of what we need to do, and then we'll see exactly what is required at each step.

Here's a simple breakdown of the deployment process:

  1. Deploy the Ownable contract. The deployed instance of this contract will be for sale during the auction implemented by the Auction contract.

  2. Deploy the Auction smart contract. It will use the deployed Ownable smart contract to run the auction.

  3. Transfer ownership of the Ownable contract to the deployed Auction contract. This will allow the Auction smart contract to set the new owner when the auction is over.

  4. Start the auction using the startAuction method.

Now, let’s look at how to perform these steps one by one.

Create a new project

Before we start, we need to have a new project in Remix. Just as before, we need to create a blank workspace with an arbitrary name.

Get hands-on with 1400+ tech skills courses.