- node.js
- node-gyp
$ git clone git@github.com:haechi-labs/audit-cojam
$ cd audit-cojam
$ npm install
fill in mnemonic to truffle-config.js:3
...
const mnemonic = 'YOURMNEMONIC';
...
write infura key for connecting to ethereum nodes in truffle-config.js:5
...
const privateKey = 'YOURINFURAKEY';
...
DEPLOY!!
$ npx truffle migrate --network mainnet
you'll see deployed contract address in the console
install privatekey provider package from npm
$ npm install truffle-privatekey-provider
change HDWalletProvider to privatekey provider in truffle-config.js:1
const HDWalletProvider = require('truffle-privatekey-provider');
change HDWalletProvider to get privateKey instead of mnemonic in line 11,18,26 of truffle-config.js
- return new HDWalletProvider(mnemonic, `https://mainnet.infura.io/v3/${infurakey}`);
+ return new HDWalletProvider(privateKey, `https://mainnet.infura.io/v3/${infurakey}`);
fill in privateKey to truffle-config.js:4
...
const privateKey = 'YOURPRIVATEKEY';
...
write infura key for connecting to ethereum nodes in truffle-config.js:5
...
const privateKey = 'YOURINFURAKEY';
...
DEPLOY!!
$ npx truffle migrate --network mainnet
you'll see deployed contract address in the console