https://github.com/gersteinlab/idash19bc
Solution to iDASH'19 challenge track 1
https://github.com/gersteinlab/idash19bc
Last synced: 2 months ago
JSON representation
Solution to iDASH'19 challenge track 1
- Host: GitHub
- URL: https://github.com/gersteinlab/idash19bc
- Owner: gersteinlab
- Created: 2019-11-25T20:00:53.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-07-27T12:27:33.000Z (almost 5 years ago)
- Last Synced: 2025-01-20T12:07:53.574Z (4 months ago)
- Language: JavaScript
- Size: 189 KB
- Stars: 2
- Watchers: 16
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# idash19bc
Solution to iDASH'19 challenge track 1****************************************************************************************
****************************************************************************************
INSTRUCTIONS TO RUN GeneDrugRepo SMART CONTRACTS IN TRUFFLE
****************************************************************************************
********************************************************************************************************************************************************************************
Part 1: Configuring Truffle Directories
****************************************************************************************1. Install Truffle via the following terminal command:
npm install -g truffle
2. Make a directory named "truffle" and navigate to it.
3. Initialize Truffle via the following terminal command:
truffle init4. This will create four sub-directories and a config file: /build, /contracts, /migrations, /test, and truffle-config.js.
5. Move the smart contract solidity files to the /contracts dir.
6. Create a file in the /migrations dir named 2_deploy_contracts.js with the following contents:
var GDR = artifacts.require("./GeneDrugRepo.sol");
module.exports = function(deployer) {
deployer.deploy(GDR);
};7. Move the gdr_train javascript test files to /test.
****************************************************************************************
Part 2: Running Contracts in Truffle Test Network
****************************************************************************************1. Open terminal, cd to truffle dir, run the following command:
truffle develop2. Open a second terminal window. Run the test files to observe contract behavior via the following command:
truffle test ./test/[name of javascript test file]
3. Alternatively, to deploy contracts to a truffle test network and call transactions, see the instructions on the Truffle documentation: site: https://www.trufflesuite.com/docs/truffle/getting-started/running-migrations