63 | )
64 | }
65 | }
66 |
67 | export default Page
68 |
--------------------------------------------------------------------------------
/support/Merit Examples.md:
--------------------------------------------------------------------------------
1 | # Examples
2 | These examples are to show how current governance system fits on the described meritocracy
3 | _The numbers (1,2,3) make reference to the described merit properties_
4 |
5 |
6 | ## Nation state elections
7 | **Decisions to make:** Choose the representatives
8 |
9 | **Participants:** Legal citizens
10 |
11 | **Merit properties:**
12 |
13 | 1. The required merit is to be a citizen.
14 | 2. Merit is bound to your identity, therefore can't be exchanged
15 | 3. Merit is tokenized by using ID cards. Each ID card is one vote.
16 |
17 | **Reality (undesired consequences):**
18 |
19 | 1. All the participants (whatever they have the right capacities to make good decisions or not) have the same decision power. There is no required skill to vote.
20 | 2. While the ID card can't be exchanged, the opinion of the participants can be easily manipulated by media (especially because they don't have the capacities to understand the problems (#1)) which is manipulated by lobbyist, which are the entities with more economic power.
21 | 3. Id cards tokenize merit but not without compromising the other properties.
22 |
23 | ## Bitcoin
24 | **Decisions to make:** Change the protocol rules
25 |
26 | **Participants:** Miners
27 |
28 | **Merit properties:**
29 |
30 | 1. The required merit is a proof that it recently secured the network by validating transactions.
31 | 2. POW can't be exchanged. It is also directly attached to the coinbase reward, disincentivizing any attempt.
32 | 3. How many times a miner has been the first to find the block hash within a defined amount of blocks.
33 |
34 | **Reality (undesired consequences):**
35 |
36 | 1. Miners don't want network upgrades that don't maximize their profit. A brutal amount of electricity is used.
37 | 2. All good here.
38 | 3. All good here.
39 |
40 | ## A company department
41 | **Decisions to make:** What features of a product should we focus, who to hire, how much to pay?
42 |
43 | **Participants:** Head of the department
44 |
45 | **Merit properties:**
46 |
47 | 1. Someone with expertise on the subject, with fidelity to the company.
48 | 2. The merit is being himself, can't be exchanged, can be influenced.
49 | 3. Role defined in its contract ( a consequence of the time working for the company, resume...)
50 |
51 | **Reality (undesired consequences):**
52 |
53 | All good here, probably because it is not in a trustless environment, and it is easy to adapt.
--------------------------------------------------------------------------------
/src/CreateProposalPage.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import TextField from 'material-ui/TextField'
3 | import Dialog from 'material-ui/Dialog'
4 | import FlatButton from 'material-ui/FlatButton'
5 |
6 | class CreateProposalPage extends React.Component
7 | {
8 | constructor(props)
9 | {
10 | super();
11 | this.state = {
12 | "proposalTitle" : "",
13 | "proposalReference" : "",
14 | "tokenAmount" : ""
15 | }
16 | }
17 |
18 | onCreate=()=>
19 | {
20 | this.props.onCreate(this.state.proposalTitle, this.state.proposalReference, this.state.tokenAmount)
21 | }
22 |
23 | onCancel=()=>
24 | {
25 | this.props.onCancel()
26 | }
27 |
28 | onProposalTitleTextChange = (e, newText) => {
29 | if(newText.length<32)
30 | this.setState({proposalTitle:newText})
31 | }
32 |
33 | onProposalReferenceTextChange = (e, newText) => {
34 | this.setState({proposalReference:newText})
35 | }
36 |
37 | onTokenAmountTextChange = (e, newText) => {
38 | if(isNaN(newText))
39 | return
40 | this.setState({tokenAmount:newText})
41 | }
42 |
43 | render()
44 | {
45 | const actions = [
46 | ,
51 |
57 | ]
58 |
59 | return (
60 |
84 | )
85 | }
86 | }
87 |
88 | export default CreateProposalPage;
--------------------------------------------------------------------------------
/support/Interoperable Adhocracy.md:
--------------------------------------------------------------------------------
1 | # Interoperable Adhocracy
2 | In the previous document we suggested an improvment on how a single decision making process could be improved.
3 |
4 | On this one we'll try to envision how a decentralized ecosystem may function as a whole.
5 |
6 | ### Why adhocracy?
7 | _Governance_ is a broad concept very loosely used. The new decentralized paradigmn has a set of properties that are much better captured by adhocracy.
8 |
9 | >[Adhocracy](https://en.wikipedia.org/wiki/Adhocracy#Types_of_adhocracy) is characterized by an adaptive, creative and flexible integrative behavior based on **non-permanence** and **spontaneity**. - Wikipedia
10 |
11 |
12 | ## Voluntary
13 |
14 | If you go over adhocracy [characteristics](https://en.wikipedia.org/wiki/Adhocracy#Characteristics_of_adhocracy) you will realize that many of those are just the result of participation being voluntary, therefore the _non-permanence_ feature.
15 |
16 | While this may not be the case of some organizations. I belive we could assume it will be the case for most of them
17 |
18 | ### Darwinian selection
19 | Voluntary participation on a governance system serves as [natural selection](https://en.wikipedia.org/wiki/Universal_Darwinism) tool.
20 |
21 | This is important because it becomes another governance process at the most fundamental level. It tells if a project should exist or not.
22 |
23 | ## Identity agnostic
24 |
25 | If the goal is to make the best decision possible, it should not matter where the ideas com from. Anyone/anything should be a potential participant, whatever it's a kid, an AI, a prediction market or another governance entity.
26 |
27 | Is the merit's job to filter who can participate.
28 |
29 | ## Non-permanence
30 | The none-permanence feature makes organizations to be resilient when an associated entity drops the relationship.
31 |
32 | ## Nestable governance
33 | That means that a governance system should be able to act as a participant entity to another governance system.
34 |
35 | ### Keep it simple
36 | Governance models tend to complexity. By nesting a governance inside another the goals of a single governance entity can be keep simpler and therefore making the required merits simpler as well.
37 |
38 | This means that a governance entity would be used as merit agregator of its participants.
39 |
40 | ### But complex
41 | This would allow the creation of hierachical structures, making the system as a whole complex, while keeping each entity simple.
42 |
43 | This is common in most goverances already (departments of a company, states/counties), that's why I was surprized to not find any existing proposal within the decentralized paradigm.
44 |
45 |
46 | ### Interoperability
47 |
48 |
49 | ### Wisdown of the crowds
50 | We never witness the outcomes of [The DAO] (https://en.wikipedia.org/wiki/The_DAO_(organization)) governance. Probably [it was not aimed to succeed](https://forum.daohub.org/t/the-dao-are-we-taking-the-wisdom-of-the-crowd-too-far/1486/8) anyway to put the [wisdom of the crowds](https://en.wikipedia.org/wiki/Wisdom_of_the_crowd) in practice.
51 |
52 | (https://forum.daohub.org/t/the-dao-are-we-taking-the-wisdom-of-the-crowd-too-far/1486/8)
53 |
54 | ###Friction less
55 | ###Voluntary
56 | ###Simple
57 | ###Enforcable or turstable
58 |
--------------------------------------------------------------------------------
/src/ProjectOverview.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import State from './State.js'
3 | import Web3AutoSetup from './Web3AutoSetup.js'
4 | import OwnershipChart from './OwnershipChart.js'
5 | import Numeral from 'numeral'
6 |
7 | const overflowStyle = {
8 | whiteSpace: "nowrap",
9 | textOverflow: "ellipsis",
10 | overflow: "hidden"
11 | }
12 |
13 | const subheaderStyle = {
14 | color:"grey",
15 | marginBottom:-10,
16 | marginTop:0
17 | }
18 |
19 | class ProjectDetails extends React.Component {
20 |
21 | constructor(props)
22 | {
23 | super()
24 | }
25 |
26 | getAddressStyle=(color)=>
27 | {
28 | var style = overflowStyle
29 | style.color = color
30 | return style
31 | }
32 |
33 | render()
34 | {
35 | var projectData = State.getEmptyProject()
36 | var contributorData = State.getEmptyContributor()
37 | if(State.data.projects[this.props.projectId])
38 | projectData = State.data.projects[this.props.projectId]
39 |
40 | if(projectData.contributors)
41 | if(projectData.contributors[Web3AutoSetup.currentAccount])
42 | contributorData = projectData.contributors[Web3AutoSetup.currentAccount]
43 |
44 | //var ownership = Numeral(contributorData.valueTokens/projectData.totalSupply).format('0.0%')
45 |
46 | return (
47 |
84 | )
85 | }
86 | }
87 |
88 | export default ProjectDetails
--------------------------------------------------------------------------------
/support/Reputation for governance.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | # Reputation for governance
4 |
5 | Since we can't directly tokenize them, we can use the past as an indicator of the future. We can quantify proven capacities, and use it as merit.
6 |
7 | Within this context, merit defines a required capacity of an entity to make decisions, while reputation is a proven record of a capacity.
8 |
9 | This makes reputation systems extremely suitable for governance.
10 |
11 |
12 | ### Concensus problem
13 |
14 | In both cases we still need to have concensus over these metrics, at least among the participants.
15 |
16 |
17 |
18 | ### Centralized
19 | There are thousands of reputation systems already in use (5 stars rating, credentials, comments, followers, likes...), the problem is that they usually live in mutable (therefore can be altered) permission-ed (therefore un-accessible) databases. And because they're owned by entities that monetize on them, they have no incentive to change.
20 |
21 | ### Decentralized
22 | The new paradigm is different, and there are already [so many reasons](https://medium.com/@2W/fixing-orwellian-reputation-systems-4d01d489dcb7) to move away from the centralized reputation.
23 |
24 | Communities/platforms/DAOs that live on decentralized networks do not benefit by keeping all this data, it's quite the opposite. They enhance each other when the data is accessible.
25 |
26 |
27 | ## Towards merit as reputation
28 | So, how do we get there?
29 |
30 | ### Decentralized identity
31 | In order to create decentralized reputation we need decentralized identities. Luckily, with different aproaches, there are several endeveours on the works: [DID](https://w3c-ccg.github.io/did-spec/), [UPort](https://www.uport.me/), [Blockstack](https://blockstack.org/), [Keybase](https://keybase.io), [identifi](https://github.com/identifi/) (missing any?)
32 |
33 | ### Accessible reputation
34 | While each governance is free to use any reputation metric it wants, a standaritzation would make things much accessible. In the same fashion that the [ERC20](http://www.investopedia.com/news/what-erc20-and-what-does-it-mean-ethereum/) has enabled all sorts of new services and platforms. Having and standard for decentralized reputation will greatly benefit the community.
35 |
36 | While there have been attempts to standardize reputation [in the past](https://tools.ietf.org/html/rfc7071), this document is only attempt of decentralized reputation I'm aware of:
37 |
38 | [Decentralized Cooperation needs Decentralized Reputation](https://github.com/WebOfTrustInfo/rebooting-the-web-of-trust/blob/master/topics-and-advance-readings/DecentralizedCooperationNeedsDecentralizedReputation.md) by [Noah Thorp](https://twitter.com/noahthorp) (2015)
39 |
40 | ### Subjective reputation
41 | The previous assumes reputation systems to be objective. Meaning that at least the participants need to have consensus over the state of a reputation metric.
42 | To my knowledge blockchains are the more suitable technology for it.
43 |
44 | In general when we talk about reputation, we refer to subjective reputation. How do an entity _feels_ about something. Each entity may have a different opinon.
45 |
46 | Subjective reputation may be very useful for decision making processes, but makes things harder to implement. I currently don't have an opinion on how this could be done.
47 |
48 | like [identifi](https://github.com/identifi/) and [Trust Graph](https://github.com/trustgraph/trustgraph) work on P2P basis.
--------------------------------------------------------------------------------
/src/LandingPage.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import ReactMarkdown from'react-markdown'
3 | import RaisedButton from 'material-ui/RaisedButton'
4 |
5 | const whatIsThis=`
6 | # What is this
7 |
8 | In recent years a new paradigm around decentralization has emerged.
9 | Technologies such as [Ethereum](https://www.ethereum.org/), [IPFS](https://ipfs.io/) or [Bitcoin](https://en.wikipedia.org/wiki/Bitcoin) offer a new set of possibilities for re-designing most of the systems that drive our society.
10 |
11 | Uumm is an open-source, experimental tool, for the process of decision making build on top of these new exciting technologies.
12 |
13 | # Where are we
14 | We have a first working prototype. On the [Github repo](https://github.com/xavivives/uumm) you can find all the details about it.
15 |
16 | We're already [designing the next iteration](https://github.com/xavivives/Uumm/blob/master/support/Broken%20meritocracy.md), while keep polishing this one.
17 |
18 | [Follow us on twitter](https://twitter.com/xavivives), to stay up to date.`
19 |
20 | const imgUrl= process.env.PUBLIC_URL + '/img/horseAnatomy.jpg'
21 |
22 | const backgroundImageStyle={
23 | backgroundColor:'grey',
24 | height:window.innerHeight,
25 | minWidth: '100%',
26 | backgroundImage:'url('+imgUrl+')',
27 | backgroundRepeat:'no-repeat',
28 | backgroundSize:'cover',
29 | backgroundPosition:'center',
30 | }
31 |
32 | const titleStyle ={
33 | color: '#666666',
34 | fontSize: '3em',
35 | margin:0,
36 | }
37 |
38 | const subtitleStyle = {
39 | color: '#666666'
40 | }
41 |
42 | class LandingPage extends React.Component {
43 |
44 | constructor(props)
45 | {
46 | super()
47 | window.location.hash = "intro"
48 | }
49 |
50 | render()
51 | {
52 | return (
53 |
113 | );
114 | }
115 | }
116 |
117 | export default ProposalsList;
--------------------------------------------------------------------------------
/test/VotingData.js:
--------------------------------------------------------------------------------
1 | const ProposalState =
2 | {
3 | PENDING:0,
4 | APPROVED:1,
5 | DENIED:2,
6 | EXPIRED:3
7 | }
8 |
9 | exports.proposals =
10 | [
11 | {
12 | id:0,
13 | author:"",
14 | title:"This is a 32 characthers title!!",
15 | reference:"This is a 35 characthers reference!!",
16 | valueAmount:9,
17 | creationTimestamp:0,
18 | stateData:[
19 | {
20 | //#0 Initial state
21 | state:ProposalState.PENDING,
22 | positiveVotes:0,
23 | negativeVotes:0,
24 | totalSupply:1,
25 | contributorVotes:[0]//Represents the list of contributors, indexes matches accounts[]
26 | },
27 | {
28 | //#1 ProjectCreator (1 token) voted to approve
29 | state:ProposalState.PENDING,
30 | positiveVotes:1,
31 | negativeVotes:0,
32 | totalSupply:1,
33 | contributorVotes:[1]
34 | },
35 | {
36 | //#2 ProjectCreator (1 token) voted to approve(again).
37 | //Data stays the same
38 | state:ProposalState.PENDING,
39 | positiveVotes:1,
40 | negativeVotes:0,
41 | totalSupply:1,
42 | contributorVotes:[1]
43 | },
44 | {
45 | //#3 ProjectCreator (1 token) voted against.
46 | //Postive vote goes back to zero, negative to one
47 | state:ProposalState.PENDING,
48 | positiveVotes:0,
49 | negativeVotes:1,
50 | totalSupply:1,
51 | contributorVotes:[-1]
52 | },
53 | {
54 | //#4 ProjectCreator (1 token) voted in favor.
55 | //Negative vote goes back to zero, positive to one
56 | state:ProposalState.PENDING,
57 | positiveVotes:1,
58 | negativeVotes:0,
59 | totalSupply:1,
60 | contributorVotes:[1]
61 | },
62 | {
63 | //#5 Proposal is resolved and approved
64 | //State changes from PENDING to APPROVED
65 | //The totalSupply in the proposal remains the same
66 | state:ProposalState.APPROVED,
67 | positiveVotes:1,
68 | negativeVotes:0,
69 | totalSupply:1,
70 | contributorVotes:[1]
71 | }
72 | ]
73 | },
74 | {
75 | //Proposal[1]. Done by contributor1
76 | id:1,
77 | author:"",
78 | title:"Second proposal title",
79 | reference:"Proposal 2 Reference",
80 | valueAmount:30,
81 | creationTimestamp:0,
82 | stateData:[
83 | {
84 | //#0 Initial state
85 | //Token supply is updated because of previous proposal (1+9)
86 | state:ProposalState.PENDING,
87 | positiveVotes:0,
88 | negativeVotes:0,
89 | totalSupply:10,
90 | contributorVotes:[0]
91 | },
92 | {
93 | //#1 Project creator voted (10 tokens)
94 | state:ProposalState.PENDING,
95 | positiveVotes:10,
96 | negativeVotes:0,
97 | totalSupply:10,
98 | contributorVotes:[10]
99 | },
100 | {
101 | //#2 Project creator resolved (10 tokens)
102 | state:ProposalState.APPROVED,
103 | positiveVotes:10,
104 | negativeVotes:0,
105 | totalSupply:10,
106 | contributorVotes:[10]
107 | },
108 | ]
109 | }
110 | ]
111 |
112 | exports.contributors =
113 | [
114 | {
115 | //First contributor is empty
116 | id:0,
117 | contributorAddress:"",
118 | name:"",
119 | valueTokens:0,
120 | etherBalance:0
121 | },
122 | {
123 | id:1,
124 | contributorAddress:"",
125 | name:"",
126 | valueTokens:10,
127 | etherBalance:0.25
128 | },
129 | {
130 | id:2,
131 | contributorAddress:"",
132 | name:"",
133 | valueTokens:30,
134 | etherBalance:0.75
135 | }
136 | ]
137 |
138 |
--------------------------------------------------------------------------------
/src/fonts/Oswald-300/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright 2016 The Oswald Project Authors (contact@sansoxygen.com)
2 |
3 | This Font Software is licensed under the SIL Open Font License, Version 1.1.
4 | This license is copied below, and is also available with a FAQ at:
5 | http://scripts.sil.org/OFL
6 |
7 |
8 | -----------------------------------------------------------
9 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
10 | -----------------------------------------------------------
11 |
12 | PREAMBLE
13 | The goals of the Open Font License (OFL) are to stimulate worldwide
14 | development of collaborative font projects, to support the font creation
15 | efforts of academic and linguistic communities, and to provide a free and
16 | open framework in which fonts may be shared and improved in partnership
17 | with others.
18 |
19 | The OFL allows the licensed fonts to be used, studied, modified and
20 | redistributed freely as long as they are not sold by themselves. The
21 | fonts, including any derivative works, can be bundled, embedded,
22 | redistributed and/or sold with any software provided that any reserved
23 | names are not used by derivative works. The fonts and derivatives,
24 | however, cannot be released under any other type of license. The
25 | requirement for fonts to remain under this license does not apply
26 | to any document created using the fonts or their derivatives.
27 |
28 | DEFINITIONS
29 | "Font Software" refers to the set of files released by the Copyright
30 | Holder(s) under this license and clearly marked as such. This may
31 | include source files, build scripts and documentation.
32 |
33 | "Reserved Font Name" refers to any names specified as such after the
34 | copyright statement(s).
35 |
36 | "Original Version" refers to the collection of Font Software components as
37 | distributed by the Copyright Holder(s).
38 |
39 | "Modified Version" refers to any derivative made by adding to, deleting,
40 | or substituting -- in part or in whole -- any of the components of the
41 | Original Version, by changing formats or by porting the Font Software to a
42 | new environment.
43 |
44 | "Author" refers to any designer, engineer, programmer, technical
45 | writer or other person who contributed to the Font Software.
46 |
47 | PERMISSION & CONDITIONS
48 | Permission is hereby granted, free of charge, to any person obtaining
49 | a copy of the Font Software, to use, study, copy, merge, embed, modify,
50 | redistribute, and sell modified and unmodified copies of the Font
51 | Software, subject to the following conditions:
52 |
53 | 1) Neither the Font Software nor any of its individual components,
54 | in Original or Modified Versions, may be sold by itself.
55 |
56 | 2) Original or Modified Versions of the Font Software may be bundled,
57 | redistributed and/or sold with any software, provided that each copy
58 | contains the above copyright notice and this license. These can be
59 | included either as stand-alone text files, human-readable headers or
60 | in the appropriate machine-readable metadata fields within text or
61 | binary files as long as those fields can be easily viewed by the user.
62 |
63 | 3) No Modified Version of the Font Software may use the Reserved Font
64 | Name(s) unless explicit written permission is granted by the corresponding
65 | Copyright Holder. This restriction only applies to the primary font name as
66 | presented to the users.
67 |
68 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
69 | Software shall not be used to promote, endorse or advertise any
70 | Modified Version, except to acknowledge the contribution(s) of the
71 | Copyright Holder(s) and the Author(s) or with their explicit written
72 | permission.
73 |
74 | 5) The Font Software, modified or unmodified, in part or in whole,
75 | must be distributed entirely under this license, and must not be
76 | distributed under any other license. The requirement for fonts to
77 | remain under this license does not apply to any document created
78 | using the Font Software.
79 |
80 | TERMINATION
81 | This license becomes null and void if any of the above conditions are
82 | not met.
83 |
84 | DISCLAIMER
85 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
86 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
87 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
88 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
89 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
90 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
91 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
92 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
93 | OTHER DEALINGS IN THE FONT SOFTWARE.
94 |
--------------------------------------------------------------------------------
/test/Funding.js:
--------------------------------------------------------------------------------
1 | /*var Uumm = artifacts.require("./Uumm.sol")
2 | var Web3 = new (require("web3"))
3 |
4 | var Validators = require("./Validators.js")
5 |
6 | const addressBook=
7 | {
8 | PROJECT_CREATOR:0,
9 | CONTRIBUTOR1: 1,
10 | CONTRIBUTOR2: 2,
11 | CONTRIBUTOR3: 3,
12 | RANDOM_USER:9 //Never writes (only calls, no transfers)
13 | }
14 |
15 | contract('Uumm', async function(accounts)
16 | {
17 |
18 | getAddress=(index)=>
19 | {
20 | return accounts[index]
21 | }
22 |
23 | const proposals =
24 | [
25 | {
26 | id:0,
27 | title:"P0,",
28 | reference:"R",
29 | valueAmount:100,
30 | address: getAddress(addressBook.PROJECT_CREATOR),
31 | },
32 | {
33 | id:1,
34 | title:"P1,",
35 | reference:"R",
36 | valueAmount:1,
37 | address: accounts[1]
38 | },
39 | {
40 | id:2,
41 | title:"P2,",
42 | reference:"R",
43 | valueAmount:1,
44 | address: accounts[2]
45 | },
46 | {
47 | id:3,
48 | title:"P3,",
49 | reference:"R",
50 | valueAmount:1,
51 | address: accounts[3]
52 | },
53 | {
54 | id:4,
55 | title:"P4,",
56 | reference:"R",
57 | valueAmount:1,
58 | address: accounts[4]
59 | },
60 | {
61 | id:5,
62 | title:"P5,",
63 | reference:"R",
64 | valueAmount:1,
65 | address: accounts[5]
66 | },
67 | {
68 | id:6,
69 | title:"P6,",
70 | reference:"R",
71 | valueAmount:1,
72 | address: accounts[6]
73 | },
74 | {
75 | id:7,
76 | title:"P7,",
77 | reference:"R",
78 | valueAmount:1,
79 | address: accounts[7]
80 | },
81 | {
82 | id:8,
83 | title:"P8,",
84 | reference:"R",
85 | valueAmount:1,
86 | address: accounts[8]
87 | }
88 |
89 | ]
90 |
91 | const contributors =
92 | [
93 | {
94 | //First contributor is empty
95 | id:0,
96 | contributorAddress:"",
97 | name:"",
98 | valueTokens:0,
99 | etherBalance:0
100 | },
101 | {
102 | id:1,
103 | contributorAddress:"",
104 | name:"",
105 | valueTokens:10,
106 | etherBalance:0.25
107 | },
108 | {
109 | id:2,
110 | contributorAddress:"",
111 | name:"",
112 | valueTokens:30,
113 | etherBalance:0.75
114 | }
115 | ]
116 |
117 | getAddress(addressBook.PROJECT_CREATOR)
118 |
119 | let uummInstance = await Uumm.deployed()
120 | await uummInstance.CreateProject("A name", {from: getAddress(addressBook.PROJECT_CREATOR)})
121 |
122 | let project1Id = await uummInstance.GetProjectId(getAddress(addressBook.PROJECT_CREATOR), 0, {from: getAddress(addressBook.RANDOM_USER)})
123 |
124 | for(let i = 0; i{
23 | this.setState({
24 | "loaded":true,
25 | "connected": true,
26 | "userAddress":Web3AutoSetup.currentAccount,
27 | "provider":Web3AutoSetup.getProviderInfo(),
28 | "network": Web3AutoSetup.getCurrentNetwork().name
29 | })
30 |
31 | }).catch((error)=>{
32 | this.setState({
33 | "loaded":true,
34 | "connected": false})
35 | console.error(error)
36 | })
37 |
38 | Web3AutoSetup.addAccountChangedListener(this.onAddressChange)
39 | Web3AutoSetup.addNetworkChangedListener(this.onNetworkChange)
40 | }
41 |
42 | onAddressChange=(newAddress)=>
43 | {
44 | console.log(newAddress)
45 | this.setState({
46 | "provider":Web3AutoSetup.getProviderInfo(),
47 | "userAddress":newAddress})
48 | }
49 |
50 | onNetworkChange=(newNetworkId)=>
51 | {
52 | this.setState({ "network":Web3AutoSetup.getCurrentNetwork().name})
53 | }
54 |
55 | getSmallHint=(text)=>
56 | {
57 | return (
58 |