This file contains hidden or 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
| pragma solidity ^0.4.18; | |
| contract Greeting { | |
| function say() public pure returns(string result) { | |
| result = "Hello world"; | |
| return result; | |
| } | |
| } |
This file contains hidden or 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
| pragma solidity ^0.4.18; | |
| contract Organization { | |
| mapping (address => bool) public members; | |
| mapping (uint => Proposal) public proposals; | |
| mapping(uint => bool) public proposalExist; |
This file contains hidden or 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
| const Organization = artifacts.require("Organization"); | |
| contract('Organization', (accounts) => { | |
| let contractInstance; | |
| const creator = accounts[0]; | |
| beforeEach(async function () { | |
| contractInstance = await Organization.new(4, 4, { from: creator }); | |
| }); |
This file contains hidden or 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
| module.exports = { | |
| contracts_build_directory: "./src/build", | |
| networks: { | |
| development: { | |
| host: "127.0.0.1", | |
| port: 8545, | |
| network_id: "*" // match any network | |
| } | |
| } | |
| }; |
This file contains hidden or 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
| import React from 'react'; | |
| import { Switch, Route, BrowserRouter as Router } from 'react-router-dom'; | |
| import Home from './containers/Home'; | |
| import NewProposal from './containers/NewProposal'; | |
| import ProposalDetail from './containers/ProposalDetail'; | |
| import Proposals from './containers/Proposals'; | |
| import Results from './containers/Results'; | |
| import withLayout from './containers/Layout'; |
This file contains hidden or 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
| import React from 'react'; | |
| import ReactDOM from 'react-dom'; | |
| import { createStore, applyMiddleware } from 'redux'; | |
| import reduxThunk from 'redux-thunk'; | |
| import reducers from './reducers'; | |
| import App from './App'; | |
| const createStoreWithMiddleware = applyMiddleware(reduxThunk)(createStore); | |
| const store = createStoreWithMiddleware(reducers); |
This file contains hidden or 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
| import React from 'react'; | |
| import PropTypes from 'prop-types' | |
| import Routes from './Routes'; | |
| import { Provider } from 'react-redux'; | |
| import './App.css'; | |
| class App extends React.Component { | |
| render() { | |
| return ( | |
| <Provider className="app" store={this.props.store}> |
This file contains hidden or 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
| import React from 'react'; | |
| import './layout.css'; | |
| import { Container, Grid, Header } from 'semantic-ui-react'; | |
| function withLayout(WrappedComponent) { | |
| return class extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| } |
This file contains hidden or 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
| import React from 'react'; | |
| import { Switch, Route, BrowserRouter as Router } from 'react-router-dom'; | |
| import Home from './containers/Home'; | |
| import NewProposal from './containers/NewProposal'; | |
| import ProposalDetail from './containers/ProposalDetail'; | |
| import Proposals from './containers/Proposals'; | |
| import Results from './containers/Results'; | |
| const Routes = () => ( |
This file contains hidden or 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
| import React from 'react'; | |
| import './layout.css'; | |
| import { Container, Grid, Header } from 'semantic-ui-react'; | |
| function withLayout(WrappedComponent) { | |
| return class extends React.Component { | |
| constructor(props) { | |
| super(props); | |
| } |