MetaCoin
A Truffle Example on Arcology
The Truffle MetaCoin example is a simple demonstration of a basic cryptocurrency-like smart contract and a corresponding decentralized application DApp provided by the Truffle framework to help developers learn and get started with Ethereum smart contract development using Truffle.
Create a New Directory
Create a new directory where you want to set up your Truffle project if you haven't already done so. You can use the Truffle Box feature to download the MetaCoin example. Run the following command to download the MetaCoin Truffle Box:
You can observe the directory structure as follows:
This directory structure includes contract storage, deployment scripts, test scripts, and the crucial configuration file for your Ethereum Native Contracts project.
Modifying Configuration
The Truffle Suite uses Ganache as its default development blockchain network for local development and testing purposes, but it allows you to configure and connect to custom development networks, including private or custom Devnets. Please refer to the configuration document for more.
Compile the Contract
Deployment
Use the command below to deploy the contract to the devnet.
That's it! You should now have the MetaCoin example downloaded and ready for testing in your Truffle project.
Testing
You can navigate to the project directory and run the tests now. The command below will run the test suite for the MetaCoin smart contract.
Last updated