Using Truffle
Adding Truffle to your project
# To use truffle locally in your project, you must init a package.json file
$ npm init
# Install truffle and wallet-provider to your project
$ npm i -D truffle @truffle/hdwallet-provider
# Generate truffle configuation file and default folders
$ npm exec -- truffle init# To use truffle locally in your project, you must init a package.json file
$ yarn init
# Install truffle and wallet-provider to your project
$ yarn add --dev truffle @truffle/hdwallet-provider
# Generate truffle configuation file and default folders
$ yarn truffle initSetup Truffle config file
- // const HDWalletProvider = require('@truffle/hdwallet-provider');
+ const HDWalletProvider = require('@truffle/hdwallet-provider');Deploy a Contract
Last updated