Deploying the decentralized marketplace on AWS
The final step to complete this lab is to deploy the marketplace solution to the AWS services that we provisioned at the beginning. Deploying and especially automating the deployment of smart contracts can be challenging. For tools and best practices in deploying smart contracts, please refer to Chapter 3 of this book.
Deploying a smart contract to a blockchain network is a key step in building a decentralized marketplace. The following instructions focus on the Ethereum blockchain, utilizing Solidity for the smart contract and Truffle as the development environment:
- Install Truffle globally using
npm
:npm install -g truffle
- Create a new directory for the project and navigate to it:
mkdir MyDecentralizedMarketplace
cd MyDecentralizedMarketplace
- Initialize the Truffle project:
truffle init
- Create a new Solidity file under the
contracts
directory in the Truffle project:touch contracts/Marketplace.sol
Edit
Marketplace.sol...