Let's deploy the contract token we wrote in the previous section to our Ganache development blockchain, as follows:
- Bring your Ganache blockchain online.
- Start your truffle console and connect it to the local blockchain by using the following command:
>>truffle console
- Move the USD.sol file to the contracts directory in your truffle path. Navigate back to the truffle console and compile the contract from the truffle console, like this:
(truffle development)>> compile
- Next, create a migration file for USD.sol, like this:
create migration USD
- Check under the migration directory in your truffle path. You'll observe a new migration file for USD. Update it, as follows:
const USD = artifacts.require("USD");
module.exports = function(deployer) {
deployer.deploy(USD);
};
- Navigate back to the console. Migrate...