Chapter 5. Deploying and Interacting with Contracts
Now that we have completed development of our Greeter contract, it is time to look into how to deploy it.
In this chapter, we are going to learn how to deploy our contract three different ways. First, we will focus on deploying to Ganache, a local blockchain that will allow you to experiment with your application quickly.
Then, we will deploy our contract to the Goerli test network using the Parity Ethereum client. This process is how you would deploy your application directly to the Ethereum network by using a node you are managing yourself.
Lastly, we will deploy our contract to the Rinkeby test network using Infura, a third-party provider of managed Ethereum nodes. Using services like Infura can provide some additional analysis that may be helpful in understanding application performance and utilization.
By the end of this chapter, you will be able to start sharing your application with the decentralized community.
Contract Compilation and Deployment
Up to this point, the only way we have interacted with our contract is through our tests. When we have been running our test suite, Truffle has been compiling and deploying our contracts to a test network and executing our test scripts. When the tests have completed their run, Truffle destroys the test network and all the associated data.
If we want to use our contracts with something other than our tests, we will need to get our contract onto a network that runs outside of the ...
Get Hands-On Smart Contract Development with Solidity and Ethereum now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.