Using Truffle
Setting up the development environment
There are a few technical requirements before we start. Please install the following:
- Node.js v8+ LTS and npm (comes with Node)
- Git
Once we have those installed, we only need one command to install Truffle:
To verify that Truffle is installed properly, type truffle version
on a terminal. If you see an error, make sure that your npm modules are added to your path.
If you're new to Truffle then please follow the Getting Started by truffle, To setup the truffle environment.
truffle-config
- Go to truffle-config.js
- Update the truffle-config with AGV-network-crendentials.
Notice, it requires mnemonic to be passed in for AGV, this is the seed phrase for the account you'd like to deploy from. Create a new .secret file in root directory and enter your 12 word mnemonic seed phrase to get started. To get the seedwords from metamask wallet you can go to Metamask Settings, then from the menu choose Security and Privacy where you will see a button that says reveal seed words.
Deploying on AGV Network
Add AGV to your wallet using https://faucet.agvnetwork.org/
Run this command in root of the project directory:
Contract will be deployed on AGV's Testnet, it look like this:
Remember your address, transaction_hash and other details provided would differ, Above is just to provide an idea of structure.
Congratulations! You have successfully deployed HelloWorld Smart Contract. Now you can interact with the Smart Contract.