The Ethereum smart contract necessary to deploy intel into the Pareto Alpha Capture System
Run this command in the root folder of project
npm install
In truffle.js
file, on line # 3, set your mnemonic.
Under migrations
folder in 2_deploy_Intel.js
, on line # 3, set the address of owner of Intel contract. (Often times, the deployment address is the address owner, so the deployment address would be address[0] of the mnemonic phrase)
####3.1 - npm install truffle-hdwallet-provider
Deploy the Intel contract using following command
truffle migrate --network mainnet
Other options are
truffle migrate --network ropsten
for deploying to Ropsten
Troubleshooting: use --reset if the command doesn't connect to the network (If "Running Migration" doesn't appear on command line)
truffle migrate --reset --network mainnet
More Troubleshooting: sometimes delete the whole build folder - especially after deploying on a different network already - go to the parent folder and run
truffle migrate
it should recreate the build/contracts folder and then run
truffle migrate --reset --network ropsten
Copy the Intel.json
file under build/contracts
on this repository and paste it in build/contracts
in the development
branch of ParetoNetworkServer
. RENAME Intel.json
in that folder to Intel-ropsten.json
Copy the Intel.json
file under build/contracts
on this repository and paste it in build/contracts
in the staging
branch of ParetoNetworkServer
. RENAME Intel.json
in that folder to Intel-mainnet.json
This avoids merge conflicts upstream
####6.1 - npm install web3 - Required by IntelTest.js ####6.2 - Install Ganache https://truffleframework.com/ganache ####6.3 - Launch Gananche. Click on Settings. Take the mnemonics from IntelTest.js paste them into the Ganache textfield for mnemonics on Account & Keys. Hit Save and Restart. ####6.4 - Run against your local environment - truffle test --network development ####6.5 - If no events are emitted when you run the test, you may need to increment your _intelID
The Distribute Fee Rewards script is independent of the Truffle project. You should be able to run the script without getting the Truffle project to build.
You will need to do a npm install at the root directory of the project to resolve all of the node modules include ethereum-tx
"intelAddress" will be set to the Intel contract's address
"ownerPrivateKey" will be set to the private key of owner ( this address has to be the owner of Intel contract )
"network_URL" will be set to the URL of Ethereum network
next, you will run the command under script directory
node distributeFee.js