Deploying the Auction Smart Contract
Explore the process of deploying the Auction smart contract using the Truffle framework. Understand how to configure and use Ganache as a local Ethereum test network, write migration scripts, and interact with deployed contracts through the Truffle console. This lesson equips you with practical skills for testing and deploying smart contracts before using public networks.
We’ve covered the theory of deploying smart contracts with the Truffle Framework. Now, we'll deploy the Auction smart contract. While we could deploy it directly to the Mainnet or Goerli, it would be a good idea to first see how it works in a testing environment. For this, we can use one of the local Ethereum implementations, such as Ganache, which we'll cover in this lesson.
Deploy the Auction smart contract
To deploy the Auction smart contract, we first need to have an Ownable instance that'll be sold at the auction. Therefore, we'll write a migration script that deploys the Ownable instance and then passes its address to the constructor of the Auction.
We then start an auction using the startAuction method. But before we can call it, we need to transfer ownership of the Ownable instance to the auction contract using transferOwnership.
Where to deploy the contract
With Truffle, we could deploy our contract to the Mainnet or a ...