Truffle
Installing
In order to use Truffle, we just need one command to install Truffle.
You can confirm the installed truffle's version by typing truffle version
on a terminal.
Create a Project
The first step is to create a project using Truffle. Let's create a project called "MetaCCN".
Create a new directory for your Truffle project and initialize it.
Once this operation is completed, you'll now have a project structure with the following items.
Create Your Contract
You can write your own smart contract in contracts/ directory.
Compile Contract
To compile a Truffle project, change to the root of the directory where the project is located and then type the following into a terminal.
Config Truffle for Mainnet
truffle-config.js
secrets.json
Notice, it requires private key to be passed in for Provider, this is the private key for the account you'd like to deploy from. Create a new secrets.json file in root directory and enter private key to get started. You have enough CCN in the account corresponding to this private key.
Run this command in root of the project directory:
Reference
Last updated