Skip to content
This repository has been archived by the owner on Mar 11, 2024. It is now read-only.

Initial README setup issues #4

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ All truffle boxes come with Truffle, Webpack and React. This box adds react-rout

## Installation

1. Install truffle and an ethereum client. For local development, try EthereumJS TestRPC.
1. Install geth, truffle and an ethereum client. For local development, try EthereumJS TestRPC. Geth might take a while, but instructions can be found here: https://github.com/ethereum/go-ethereum/wiki/Installation-Instructions-for-Mac -- then after that install truffle:
```javascript
npm install -g truffle // Version 3.0.5+ required.
npm install -g ethereumjs-testrpc
Expand All @@ -19,19 +19,24 @@ All truffle boxes come with Truffle, Webpack and React. This box adds react-rout
```javascript
npm install
```
4. Start geth console, and open a port on your local machine
```javascript
geth console
admin.startRPC("127.0.0.1", 8545, "*", "web3,db,net,eth")
```

4. Compile and migrate the contracts.
5. Compile and migrate the contracts.
```javascript
truffle compile
truffle migrate
NODE_ENV=test truffle compile
NODE_ENV=test truffle migrate
```

5. Run the webpack server for front-end hot reloading. For now, smart contract changes must be manually recompiled and migrated.
6. Run the webpack server for front-end hot reloading. For now, smart contract changes must be manually recompiled and migrated.
```javascript
npm run start
```

6. Jest is included for testing React components and Truffle's own suite is incldued for smart contracts. Be sure you've compile your contracts before running jest, or you'll receive some file not found errors.
7. Jest is included for testing React components and Truffle's own suite is incldued for smart contracts. Be sure you've compile your contracts before running jest, or you'll receive some file not found errors.
```javascript
// Runs Jest for component tests.
npm run test
Expand All @@ -40,7 +45,7 @@ All truffle boxes come with Truffle, Webpack and React. This box adds react-rout
truffle test
```

7. To build the application for production, use the build command. A production build will be in the build_webpack folder.
8. To build the application for production, use the build command. A production build will be in the build_webpack folder.
```javascript
npm run build
```
Expand Down
8 changes: 6 additions & 2 deletions migrations/1_initial_migration.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
var Migrations = artifacts.require("./Migrations.sol");
var Migrations = require("../contracts/Migrations.sol");
var artifactor = require("truffle-artifactor");

module.exports = function(deployer) {
deployer.deploy(Migrations);
artifactor.save({}, Migrations).then(()=> {
console.log('made it here')
deployer.deploy(Migrations);
})
};
8 changes: 6 additions & 2 deletions migrations/2_deploy_contracts.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
var SimpleStorage = artifacts.require("./SimpleStorage.sol");
var SimpleStorage = require("../contracts/SimpleStorage.sol");
var artifactor = require("truffle-artifactor");

module.exports = function(deployer) {
deployer.deploy(SimpleStorage);
artifactor.save({}, SimpleStorage).then(()=> {
console.log('made it SimpleStorage')
deployer.deploy(SimpleStorage);
})
};
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"recursive-readdir": "2.1.0",
"strip-ansi": "3.0.1",
"style-loader": "0.13.1",
"truffle-artifactor": "^1.0.2",
"truffle-contract": "^1.1.8",
"truffle-solidity-loader": "0.0.8",
"url-loader": "0.5.7",
Expand Down
2 changes: 1 addition & 1 deletion test/metacoin.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var MetaCoin = artifacts.require("./MetaCoin.sol");
var MetaCoin = require("./TestMetacoin.sol");

contract('MetaCoin', function(accounts) {
it("should put 10000 MetaCoin in the first account", function() {
Expand Down