add dapp scafold

This commit is contained in:
Barry Gitarts 2018-11-28 11:12:50 -05:00
parent 9376cfb1e2
commit 3d205e5cea
8 changed files with 6950 additions and 7 deletions

27
app/dapp.js Normal file
View File

@ -0,0 +1,27 @@
import React from 'react';
import EmbarkJS from 'Embark/EmbarkJS';
import web3 from "Embark/web3";
const { getNetworkType } = web3.eth.net;
class App extends React.Component {
constructor(props) {
super(props)
}
state = { admin: false };
componentDidMount(){
EmbarkJS.onReady((err) => {
getNetworkType().then(network => {
const { environment } = EmbarkJS
this.setState({ network, environment })
});
});
}
render() {
return (
<div>Hello world!</div>
)
}
}

11
app/index.html Normal file
View File

@ -0,0 +1,11 @@
<html>
<head>
<title>Status.im Liquid Funding</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body class="container">
<div id="app">
</div>
<script src="js/index.js" type="text/javascript"></script>
</body>
</html>

8
app/index.js Normal file
View File

@ -0,0 +1,8 @@
import React from 'react';
import { render } from 'react-dom';
import App from './dapp';
render(
<App />,
document.getElementById('app')
);

View File

@ -53,20 +53,27 @@ module.exports = {
'http://localhost:8545',
'$WEB3', // uses pre existing web3 object if available (e.g in Mist)
],
strategy: 'explicit',
contracts: {
LPVault: {},
LiquidPledgingMock: {},
RecoveryVault: {},
LPFactory: {
args: ['$LPVault', '$LiquidPledgingMock'],
args: ['$LPVault', '$LiquidPledgingMock']
// args: {
// _vaultBase: '$LPVault',
// _lpBase: '$LiquidPledgingMock',
// _vaultBase: '$LPVault',
// _lpBase: '$LiquidPledgingMock',
// },
},
// contracts for testing
StandardToken: {},
Kernel: {
file: "@aragon/os/contracts/kernel/Kernel.sol"
},
ACL: {
file: "@aragon/os/contracts/acl/ACL.sol"
}
},
// afterDeploy: [

5
config/webserver.js Normal file
View File

@ -0,0 +1,5 @@
module.exports = {
enabled: true,
host: "localhost",
port: 8000
};

View File

@ -1,6 +1,11 @@
{
"contracts": ["contracts/**"],
"app": {},
"app": {
"js/dapp.js": ["app/dapp.js"],
"js/index.js": ["app/index.js"],
"index.html": "app/index.html",
"images/": ["app/images/**"]
},
"buildDir": "dist/",
"config": {
"contracts": "config/contracts.js",
@ -8,10 +13,10 @@
"storage": false,
"namesystem": false,
"communication": false,
"webserver": false
"webserver": "config/webserver.js"
},
"versions": {
"web3": "1.0.0-beta",
"web3": "1.0.0-beta.34",
"solc": "0.4.18",
"ipfs-api": "17.2.4"
},

View File

@ -53,6 +53,8 @@
"@aragon/os": "3.1.9",
"async": "^2.4.0",
"chai": "^4.1.0",
"eth-contract-class": "^0.0.12"
"eth-contract-class": "^0.0.12",
"react": "^16.6.3",
"react-dom": "^16.6.3"
}
}

6878
yarn.lock Normal file

File diff suppressed because it is too large Load Diff