-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ricardo Silva
committed
Feb 2, 2018
1 parent
dec0eef
commit 8b200dc
Showing
15 changed files
with
84 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
build | ||
node_modules | ||
package-lock.json | ||
.vscode |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
pragma solidity ^0.4.18; | ||
|
||
import "./OpenFundToken.sol"; | ||
|
||
contract OpenFund { | ||
string public name; | ||
OpenFundToken public token; | ||
|
||
function purchase() public payable; | ||
function sell(uint256 tokenAmount) public; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
truffle deploy --reset | ||
redis-cli flushall | ||
cp build/contracts/* ../cf-core/blockchain/contracts | ||
cp build/contracts/* ../cf-web/src/contracts | ||
cd ../cf-core | ||
pm2 restart ./ecosystem.config.js | ||
cd ../cf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
var Fund = artifacts.require("./Fund.sol"); | ||
|
||
module.exports = function(callback) { | ||
var fund = Fund.deployed(); | ||
fund.then(async function(instance) { | ||
instance.purchase({from: web3.eth.accounts[1], value: web3.toWei(1, 'ether')}); | ||
}); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
var Fund = artifacts.require("./Fund.sol"); | ||
var OpenFundToken = artifacts.require("./OpenFundToken.sol"); | ||
|
||
module.exports = function (callback) { | ||
var fund = Fund.deployed(); | ||
fund.then(async function (instance) { | ||
let token = await OpenFundToken.at(await instance.token()); | ||
let tokenAmount = await token.balanceOf(web3.eth.accounts[1]); | ||
instance.sell(tokenAmount, { from: web3.eth.accounts[1] }); | ||
}); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
var Fund = artifacts.require("./Fund.sol"); | ||
|
||
module.exports = function (callback) { | ||
web3.eth.sendTransaction({ from: web3.eth.accounts[2], to: "0xED7f4Bb6f52033535f555923E906AE64B155D9Ef", value: web3.toWei(20, 'ether') }) | ||
} | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
var Fund = artifacts.require('./Fund.sol') | ||
|
||
module.exports = async (deployer, network, accounts) => { | ||
let investmentAccount = accounts[1]; | ||
let purchaseFeePP = 1; | ||
let sellFeePP = 3; | ||
deployer.deploy(Fund, investmentAccount, "Fund Market 1", "FUNDX1", purchaseFeePP, sellFeePP, 100); | ||
}; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ | |
"author": "", | ||
"license": "ISC", | ||
"dependencies": { | ||
"package.json": "^2.0.1", | ||
"zeppelin-solidity": "^1.5.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters