Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
Votacion
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
blockchain
Votacion
Commits
74098505
Commit
74098505
authored
5 years ago
by
Otto Zaiser
Browse files
Options
Downloads
Patches
Plain Diff
Testeando
parent
5f6c7ba4
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
web/_src/js/vendor/abi.js
+399
-337
399 additions, 337 deletions
web/_src/js/vendor/abi.js
web/dist/js/vendor/abi.js
+408
-1
408 additions, 1 deletion
web/dist/js/vendor/abi.js
web/dist/js/vendor/ballot.js
+1
-0
1 addition, 0 deletions
web/dist/js/vendor/ballot.js
with
808 additions
and
338 deletions
web/_src/js/vendor/abi.js
+
399
−
337
View file @
74098505
...
@@ -2,345 +2,407 @@
...
@@ -2,345 +2,407 @@
var
abiBallot
=
[
var
abiBallot
=
[
{
{
"
name
"
:
"
vote
"
,
"
constant
"
:
false
,
"
type
"
:
"
function
"
,
"
inputs
"
:
[
"
payable
"
:
false
,
{
"
constant
"
:
false
,
"
name
"
:
"
proposal
"
,
"
stateMutability
"
:
"
nonpayable
"
,
"
type
"
:
"
uint256
"
"
inputs
"
:
[
}
{
],
"
name
"
:
"
proposal
"
,
"
name
"
:
"
vote
"
,
"
type
"
:
"
uint256
"
"
outputs
"
:
[],
}
"
payable
"
:
false
,
],
"
stateMutability
"
:
"
nonpayable
"
,
"
outputs
"
:
[]
"
type
"
:
"
function
"
},
},
{
{
"
name
"
:
"
ballotPercentOfRegisteredVotersReqToBeValid
"
,
"
constant
"
:
true
,
"
type
"
:
"
function
"
,
"
inputs
"
:
[],
"
payable
"
:
false
,
"
name
"
:
"
ballotPercentOfRegisteredVotersReqToBeValid
"
,
"
constant
"
:
true
,
"
outputs
"
:
[
"
inputs
"
:
[],
{
"
stateMutability
"
:
"
view
"
,
"
name
"
:
""
,
"
outputs
"
:
[
"
type
"
:
"
uint256
"
{
}
"
name
"
:
""
,
],
"
type
"
:
"
uint256
"
"
payable
"
:
false
,
}
"
stateMutability
"
:
"
view
"
,
]
"
type
"
:
"
function
"
},
},
{
{
"
name
"
:
"
voterMap
"
,
"
constant
"
:
true
,
"
type
"
:
"
function
"
,
"
inputs
"
:
[],
"
payable
"
:
false
,
"
name
"
:
"
proposalListLength
"
,
"
constant
"
:
true
,
"
outputs
"
:
[
"
stateMutability
"
:
"
view
"
,
{
"
inputs
"
:
[
"
name
"
:
""
,
{
"
type
"
:
"
uint256
"
"
name
"
:
""
,
}
"
type
"
:
"
address
"
],
}
"
payable
"
:
false
,
],
"
stateMutability
"
:
"
view
"
,
"
outputs
"
:
[
"
type
"
:
"
function
"
{
},
"
name
"
:
""
,
{
"
type
"
:
"
uint256
"
"
constant
"
:
true
,
}
"
inputs
"
:
[
]
{
},
"
name
"
:
""
,
{
"
type
"
:
"
address
"
"
name
"
:
"
getVoterIdx
"
,
}
"
type
"
:
"
function
"
,
],
"
payable
"
:
false
,
"
name
"
:
"
voterMap
"
,
"
constant
"
:
true
,
"
outputs
"
:
[
"
stateMutability
"
:
"
view
"
,
{
"
inputs
"
:
[
"
name
"
:
""
,
{
"
type
"
:
"
uint256
"
"
name
"
:
"
voter
"
,
}
"
type
"
:
"
address
"
],
}
"
payable
"
:
false
,
],
"
stateMutability
"
:
"
view
"
,
"
outputs
"
:
[
"
type
"
:
"
function
"
{
},
"
name
"
:
""
,
{
"
type
"
:
"
int256
"
"
constant
"
:
true
,
}
"
inputs
"
:
[
]
{
},
"
name
"
:
"
voter
"
,
{
"
type
"
:
"
address
"
"
name
"
:
"
uncreate
"
,
}
"
type
"
:
"
function
"
,
],
"
payable
"
:
false
,
"
name
"
:
"
getVoterIdx
"
,
"
constant
"
:
false
,
"
outputs
"
:
[
"
stateMutability
"
:
"
nonpayable
"
,
{
"
inputs
"
:
[],
"
name
"
:
""
,
"
outputs
"
:
[]
"
type
"
:
"
int256
"
},
}
{
],
"
name
"
:
"
voterList
"
,
"
payable
"
:
false
,
"
type
"
:
"
function
"
,
"
stateMutability
"
:
"
view
"
,
"
payable
"
:
false
,
"
type
"
:
"
function
"
"
constant
"
:
true
,
},
"
stateMutability
"
:
"
view
"
,
{
"
inputs
"
:
[
"
constant
"
:
false
,
{
"
inputs
"
:
[],
"
name
"
:
""
,
"
name
"
:
"
uncreate
"
,
"
type
"
:
"
uint256
"
"
outputs
"
:
[],
}
"
payable
"
:
false
,
],
"
stateMutability
"
:
"
nonpayable
"
,
"
outputs
"
:
[
"
type
"
:
"
function
"
{
},
"
name
"
:
"
voter
"
,
{
"
type
"
:
"
address
"
"
constant
"
:
true
,
},
"
inputs
"
:
[
{
{
"
name
"
:
"
votesLeft
"
,
"
name
"
:
""
,
"
type
"
:
"
uint256
"
"
type
"
:
"
uint256
"
}
}
]
],
},
"
name
"
:
"
voterList
"
,
{
"
outputs
"
:
[
"
name
"
:
"
ballotCountNonvotesAsBlanks
"
,
{
"
type
"
:
"
function
"
,
"
name
"
:
"
voter
"
,
"
payable
"
:
false
,
"
type
"
:
"
address
"
"
constant
"
:
true
,
},
"
stateMutability
"
:
"
view
"
,
{
"
inputs
"
:
[],
"
name
"
:
"
votesLeft
"
,
"
outputs
"
:
[
"
type
"
:
"
uint256
"
{
}
"
name
"
:
""
,
],
"
type
"
:
"
bool
"
"
payable
"
:
false
,
}
"
stateMutability
"
:
"
view
"
,
]
"
type
"
:
"
function
"
},
},
{
{
"
name
"
:
"
ballotVoteBefore
"
,
"
constant
"
:
true
,
"
type
"
:
"
function
"
,
"
inputs
"
:
[],
"
payable
"
:
false
,
"
name
"
:
"
ballotCountNonvotesAsBlanks
"
,
"
constant
"
:
true
,
"
outputs
"
:
[
"
stateMutability
"
:
"
view
"
,
{
"
inputs
"
:
[],
"
name
"
:
""
,
"
outputs
"
:
[
"
type
"
:
"
bool
"
{
}
"
name
"
:
""
,
],
"
type
"
:
"
uint256
"
"
payable
"
:
false
,
}
"
stateMutability
"
:
"
view
"
,
]
"
type
"
:
"
function
"
},
},
{
{
"
constant
"
:
false
,
"
constant
"
:
true
,
"
inputs
"
:
[
"
inputs
"
:
[],
{
"
name
"
:
"
ballotVoteBefore
"
,
"
name
"
:
"
voters
"
,
"
outputs
"
:
[
"
type
"
:
"
address[]
"
{
}
"
name
"
:
""
,
],
"
type
"
:
"
uint256
"
"
name
"
:
"
giveRightToVote
"
,
}
"
outputs
"
:
[],
],
"
payable
"
:
false
,
"
payable
"
:
false
,
"
stateMutability
"
:
"
nonpayable
"
,
"
stateMutability
"
:
"
view
"
,
"
type
"
:
"
function
"
"
type
"
:
"
function
"
},
},
{
{
"
constant
"
:
true
,
"
constant
"
:
false
,
"
inputs
"
:
[],
"
inputs
"
:
[
"
name
"
:
"
ballotVoteStarts
"
,
{
"
outputs
"
:
[
"
name
"
:
"
voters
"
,
{
"
type
"
:
"
address[]
"
"
name
"
:
""
,
}
"
type
"
:
"
uint256
"
],
}
"
name
"
:
"
giveRightToVote
"
,
],
"
outputs
"
:
[],
"
payable
"
:
false
,
"
payable
"
:
false
,
"
stateMutability
"
:
"
view
"
,
"
stateMutability
"
:
"
nonpayable
"
,
"
type
"
:
"
function
"
"
type
"
:
"
function
"
},
},
{
{
"
constant
"
:
true
,
"
constant
"
:
true
,
"
inputs
"
:
[],
"
inputs
"
:
[],
"
name
"
:
"
ballotMaxVotesPerProposal
"
,
"
name
"
:
"
ballotVoteStarts
"
,
"
outputs
"
:
[
"
outputs
"
:
[
{
{
"
name
"
:
""
,
"
name
"
:
""
,
"
type
"
:
"
uint256
"
"
type
"
:
"
uint256
"
}
}
],
],
"
payable
"
:
false
,
"
payable
"
:
false
,
"
stateMutability
"
:
"
view
"
,
"
stateMutability
"
:
"
view
"
,
"
type
"
:
"
function
"
"
type
"
:
"
function
"
},
},
{
{
"
constant
"
:
true
,
"
constant
"
:
true
,
"
inputs
"
:
[],
"
inputs
"
:
[],
"
name
"
:
"
ballotMaxVotesPerVoter
"
,
"
name
"
:
"
ballotMaxVotesPerProposal
"
,
"
outputs
"
:
[
"
outputs
"
:
[
{
{
"
name
"
:
""
,
"
name
"
:
""
,
"
type
"
:
"
uint256
"
"
type
"
:
"
uint256
"
}
}
],
],
"
payable
"
:
false
,
"
payable
"
:
false
,
"
stateMutability
"
:
"
view
"
,
"
stateMutability
"
:
"
view
"
,
"
type
"
:
"
function
"
"
type
"
:
"
function
"
},
},
{
{
"
constant
"
:
true
,
"
constant
"
:
true
,
"
inputs
"
:
[],
"
inputs
"
:
[],
"
name
"
:
"
ballotTitle
"
,
"
name
"
:
"
ballotMaxVotesPerVoter
"
,
"
outputs
"
:
[
"
outputs
"
:
[
{
{
"
name
"
:
""
,
"
name
"
:
""
,
"
type
"
:
"
string
"
"
type
"
:
"
uint256
"
}
}
],
],
"
payable
"
:
false
,
"
payable
"
:
false
,
"
stateMutability
"
:
"
view
"
,
"
stateMutability
"
:
"
view
"
,
"
type
"
:
"
function
"
"
type
"
:
"
function
"
},
},
{
{
"
constant
"
:
true
,
"
constant
"
:
true
,
"
inputs
"
:
[
"
inputs
"
:
[],
{
"
name
"
:
"
getTotalVoltes
"
,
"
name
"
:
""
,
"
outputs
"
:
[
"
type
"
:
"
uint256
"
{
}
"
name
"
:
""
,
],
"
type
"
:
"
uint256
"
"
name
"
:
"
proposalList
"
,
}
"
outputs
"
:
[
],
{
"
payable
"
:
false
,
"
name
"
:
""
,
"
stateMutability
"
:
"
view
"
,
"
type
"
:
"
bytes32
"
"
type
"
:
"
function
"
}
},
],
{
"
payable
"
:
false
,
"
constant
"
:
true
,
"
stateMutability
"
:
"
view
"
,
"
inputs
"
:
[],
"
type
"
:
"
function
"
"
name
"
:
"
ballotTitle
"
,
},
"
outputs
"
:
[
{
{
"
constant
"
:
true
,
"
name
"
:
""
,
"
inputs
"
:
[],
"
type
"
:
"
string
"
"
name
"
:
"
ballotPercentOfVotesCastToWin
"
,
}
"
outputs
"
:
[
],
{
"
payable
"
:
false
,
"
name
"
:
""
,
"
stateMutability
"
:
"
view
"
,
"
type
"
:
"
uint256
"
"
type
"
:
"
function
"
}
},
],
{
"
payable
"
:
false
,
"
constant
"
:
true
,
"
stateMutability
"
:
"
view
"
,
"
inputs
"
:
[
"
type
"
:
"
function
"
{
},
"
name
"
:
""
,
{
"
type
"
:
"
uint256
"
"
constant
"
:
true
,
}
"
inputs
"
:
[],
],
"
name
"
:
"
ballotChairman
"
,
"
name
"
:
"
proposalList
"
,
"
outputs
"
:
[
"
outputs
"
:
[
{
{
"
name
"
:
""
,
"
name
"
:
""
,
"
type
"
:
"
address
"
"
type
"
:
"
bytes32
"
}
}
],
],
"
payable
"
:
false
,
"
payable
"
:
false
,
"
stateMutability
"
:
"
view
"
,
"
stateMutability
"
:
"
view
"
,
"
type
"
:
"
function
"
"
type
"
:
"
function
"
},
},
{
{
"
inputs
"
:
[
"
constant
"
:
true
,
{
"
inputs
"
:
[],
"
name
"
:
"
title
"
,
"
name
"
:
"
ballotPercentOfVotesCastToWin
"
,
"
type
"
:
"
string
"
"
outputs
"
:
[
},
{
{
"
name
"
:
""
,
"
name
"
:
"
voteStarts
"
,
"
type
"
:
"
uint256
"
"
type
"
:
"
uint256
"
}
},
],
{
"
payable
"
:
false
,
"
name
"
:
"
voteBefore
"
,
"
stateMutability
"
:
"
view
"
,
"
type
"
:
"
uint256
"
"
type
"
:
"
function
"
},
},
{
{
"
name
"
:
"
percentOfRegisteredVotersReqToBeValid
"
,
"
constant
"
:
true
,
"
type
"
:
"
uint256
"
"
inputs
"
:
[],
},
"
name
"
:
"
ballotChairman
"
,
{
"
outputs
"
:
[
"
name
"
:
"
percentOfVotesCastToWin
"
,
{
"
type
"
:
"
uint256
"
"
name
"
:
""
,
},
"
type
"
:
"
address
"
{
}
"
name
"
:
"
countNonvotesAsBlanks
"
,
],
"
type
"
:
"
bool
"
"
payable
"
:
false
,
},
"
stateMutability
"
:
"
view
"
,
{
"
type
"
:
"
function
"
"
name
"
:
"
maxVotesPerVoter
"
,
},
"
type
"
:
"
uint256
"
{
},
"
constant
"
:
true
,
{
"
inputs
"
:
[
"
name
"
:
"
maxVotesPerProposal
"
,
{
"
type
"
:
"
uint256
"
"
name
"
:
""
,
},
"
type
"
:
"
uint256
"
{
}
"
name
"
:
"
proposalNames
"
,
],
"
type
"
:
"
bytes32[]
"
"
name
"
:
"
votedProposalList
"
,
}
"
outputs
"
:
[
],
{
"
payable
"
:
false
,
"
name
"
:
""
,
"
stateMutability
"
:
"
nonpayable
"
,
"
type
"
:
"
uint256
"
"
type
"
:
"
constructor
"
}
}
],
"
payable
"
:
false
,
"
stateMutability
"
:
"
view
"
,
"
type
"
:
"
function
"
},
{
"
inputs
"
:
[
{
"
name
"
:
"
title
"
,
"
type
"
:
"
string
"
},
{
"
name
"
:
"
voteStarts
"
,
"
type
"
:
"
uint256
"
},
{
"
name
"
:
"
voteBefore
"
,
"
type
"
:
"
uint256
"
},
{
"
name
"
:
"
percentOfRegisteredVotersReqToBeValid
"
,
"
type
"
:
"
uint256
"
},
{
"
name
"
:
"
percentOfVotesCastToWin
"
,
"
type
"
:
"
uint256
"
},
{
"
name
"
:
"
countNonvotesAsBlanks
"
,
"
type
"
:
"
bool
"
},
{
"
name
"
:
"
maxVotesPerVoter
"
,
"
type
"
:
"
uint256
"
},
{
"
name
"
:
"
maxVotesPerProposal
"
,
"
type
"
:
"
uint256
"
},
{
"
name
"
:
"
proposalNames
"
,
"
type
"
:
"
bytes32[]
"
},
{
"
name
"
:
"
voters
"
,
"
type
"
:
"
address[]
"
}
],
"
payable
"
:
false
,
"
stateMutability
"
:
"
nonpayable
"
,
"
type
"
:
"
constructor
"
}
];
];
// $ solc --abi src/Ballot.sol | tail -1 | jq
// $ solc --abi src/Ballot.sol | tail -1 | jq
var
abiNew
=
[
var
abiNew
=
[
{
{
"
constant
"
:
false
,
"
constant
"
:
false
,
"
inputs
"
:
[
"
inputs
"
:
[
{
{
"
name
"
:
"
title
"
,
"
name
"
:
"
title
"
,
"
type
"
:
"
string
"
"
type
"
:
"
string
"
},
},
{
{
"
name
"
:
"
voteStarts
"
,
"
name
"
:
"
voteStarts
"
,
"
type
"
:
"
uint256
"
"
type
"
:
"
uint256
"
},
},
{
{
"
name
"
:
"
voteBefore
"
,
"
name
"
:
"
voteBefore
"
,
"
type
"
:
"
uint256
"
"
type
"
:
"
uint256
"
},
},
{
{
"
name
"
:
"
percentOfRegisteredVotersReqToBeValid
"
,
"
name
"
:
"
percentOfRegisteredVotersReqToBeValid
"
,
"
type
"
:
"
uint256
"
"
type
"
:
"
uint256
"
},
},
{
{
"
name
"
:
"
percentOfVotesCastToWin
"
,
"
name
"
:
"
percentOfVotesCastToWin
"
,
"
type
"
:
"
uint256
"
"
type
"
:
"
uint256
"
},
},
{
{
"
name
"
:
"
countNonvotesAsBlanks
"
,
"
name
"
:
"
countNonvotesAsBlanks
"
,
"
type
"
:
"
bool
"
"
type
"
:
"
bool
"
},
},
{
{
"
name
"
:
"
maxVotesPerVoter
"
,
"
name
"
:
"
maxVotesPerVoter
"
,
"
type
"
:
"
uint256
"
"
type
"
:
"
uint256
"
},
},
{
{
"
name
"
:
"
maxVotesPerProposal
"
,
"
name
"
:
"
maxVotesPerProposal
"
,
"
type
"
:
"
uint256
"
"
type
"
:
"
uint256
"
},
},
{
{
"
name
"
:
"
proposalNames
"
,
"
name
"
:
"
proposalNames
"
,
"
type
"
:
"
bytes32[]
"
"
type
"
:
"
bytes32[]
"
}
},
],
{
"
name
"
:
"
newBallot
"
,
"
name
"
:
"
voters
"
,
"
outputs
"
:
[
"
type
"
:
"
address[]
"
{
}
"
name
"
:
"
newaddr
"
,
],
"
type
"
:
"
address
"
"
name
"
:
"
newBallot
"
,
}
"
outputs
"
:
[],
],
"
payable
"
:
false
,
"
payable
"
:
false
,
"
stateMutability
"
:
"
nonpayable
"
,
"
stateMutability
"
:
"
nonpayable
"
,
"
type
"
:
"
function
"
"
type
"
:
"
function
"
},
}
{
"
anonymous
"
:
false
,
"
inputs
"
:
[
{
"
indexed
"
:
false
,
"
name
"
:
"
contrato
"
,
"
type
"
:
"
address
"
}
],
"
name
"
:
"
contratocreado
"
,
"
type
"
:
"
event
"
}
];
];
This diff is collapsed.
Click to expand it.
web/dist/js/vendor/abi.js
+
408
−
1
View file @
74098505
var
abiBallot
=
[{
name
:
"
vote
"
,
type
:
"
function
"
,
payable
:
!
1
,
constant
:
!
1
,
stateMutability
:
"
nonpayable
"
,
inputs
:[{
name
:
"
proposal
"
,
type
:
"
uint256
"
}],
outputs
:[]},{
name
:
"
ballotPercentOfRegisteredVotersReqToBeValid
"
,
type
:
"
function
"
,
payable
:
!
1
,
constant
:
!
0
,
inputs
:[],
stateMutability
:
"
view
"
,
outputs
:[{
name
:
""
,
type
:
"
uint256
"
}]},{
name
:
"
voterMap
"
,
type
:
"
function
"
,
payable
:
!
1
,
constant
:
!
0
,
stateMutability
:
"
view
"
,
inputs
:[{
name
:
""
,
type
:
"
address
"
}],
outputs
:[{
name
:
""
,
type
:
"
uint256
"
}]},{
name
:
"
getVoterIdx
"
,
type
:
"
function
"
,
payable
:
!
1
,
constant
:
!
0
,
stateMutability
:
"
view
"
,
inputs
:[{
name
:
"
voter
"
,
type
:
"
address
"
}],
outputs
:[{
name
:
""
,
type
:
"
int256
"
}]},{
name
:
"
uncreate
"
,
type
:
"
function
"
,
payable
:
!
1
,
constant
:
!
1
,
stateMutability
:
"
nonpayable
"
,
inputs
:[],
outputs
:[]},{
name
:
"
voterList
"
,
type
:
"
function
"
,
payable
:
!
1
,
constant
:
!
0
,
stateMutability
:
"
view
"
,
inputs
:[{
name
:
""
,
type
:
"
uint256
"
}],
outputs
:[{
name
:
"
voter
"
,
type
:
"
address
"
},{
name
:
"
votesLeft
"
,
type
:
"
uint256
"
}]},{
name
:
"
ballotCountNonvotesAsBlanks
"
,
type
:
"
function
"
,
payable
:
!
1
,
constant
:
!
0
,
stateMutability
:
"
view
"
,
inputs
:[],
outputs
:[{
name
:
""
,
type
:
"
bool
"
}]},{
name
:
"
ballotVoteBefore
"
,
type
:
"
function
"
,
payable
:
!
1
,
constant
:
!
0
,
stateMutability
:
"
view
"
,
inputs
:[],
outputs
:[{
name
:
""
,
type
:
"
uint256
"
}]},{
constant
:
!
1
,
inputs
:[{
name
:
"
voters
"
,
type
:
"
address[]
"
}],
name
:
"
giveRightToVote
"
,
outputs
:[],
payable
:
!
1
,
stateMutability
:
"
nonpayable
"
,
type
:
"
function
"
},{
constant
:
!
0
,
inputs
:[],
name
:
"
ballotVoteStarts
"
,
outputs
:[{
name
:
""
,
type
:
"
uint256
"
}],
payable
:
!
1
,
stateMutability
:
"
view
"
,
type
:
"
function
"
},{
constant
:
!
0
,
inputs
:[],
name
:
"
ballotMaxVotesPerProposal
"
,
outputs
:[{
name
:
""
,
type
:
"
uint256
"
}],
payable
:
!
1
,
stateMutability
:
"
view
"
,
type
:
"
function
"
},{
constant
:
!
0
,
inputs
:[],
name
:
"
ballotMaxVotesPerVoter
"
,
outputs
:[{
name
:
""
,
type
:
"
uint256
"
}],
payable
:
!
1
,
stateMutability
:
"
view
"
,
type
:
"
function
"
},{
constant
:
!
0
,
inputs
:[],
name
:
"
ballotTitle
"
,
outputs
:[{
name
:
""
,
type
:
"
string
"
}],
payable
:
!
1
,
stateMutability
:
"
view
"
,
type
:
"
function
"
},{
constant
:
!
0
,
inputs
:[{
name
:
""
,
type
:
"
uint256
"
}],
name
:
"
proposalList
"
,
outputs
:[{
name
:
""
,
type
:
"
bytes32
"
}],
payable
:
!
1
,
stateMutability
:
"
view
"
,
type
:
"
function
"
},{
constant
:
!
0
,
inputs
:[],
name
:
"
ballotPercentOfVotesCastToWin
"
,
outputs
:[{
name
:
""
,
type
:
"
uint256
"
}],
payable
:
!
1
,
stateMutability
:
"
view
"
,
type
:
"
function
"
},{
constant
:
!
0
,
inputs
:[],
name
:
"
ballotChairman
"
,
outputs
:[{
name
:
""
,
type
:
"
address
"
}],
payable
:
!
1
,
stateMutability
:
"
view
"
,
type
:
"
function
"
},{
inputs
:[{
name
:
"
title
"
,
type
:
"
string
"
},{
name
:
"
voteStarts
"
,
type
:
"
uint256
"
},{
name
:
"
voteBefore
"
,
type
:
"
uint256
"
},{
name
:
"
percentOfRegisteredVotersReqToBeValid
"
,
type
:
"
uint256
"
},{
name
:
"
percentOfVotesCastToWin
"
,
type
:
"
uint256
"
},{
name
:
"
countNonvotesAsBlanks
"
,
type
:
"
bool
"
},{
name
:
"
maxVotesPerVoter
"
,
type
:
"
uint256
"
},{
name
:
"
maxVotesPerProposal
"
,
type
:
"
uint256
"
},{
name
:
"
proposalNames
"
,
type
:
"
bytes32[]
"
}],
payable
:
!
1
,
stateMutability
:
"
nonpayable
"
,
type
:
"
constructor
"
}],
abiNew
=
[{
constant
:
!
1
,
inputs
:[{
name
:
"
title
"
,
type
:
"
string
"
},{
name
:
"
voteStarts
"
,
type
:
"
uint256
"
},{
name
:
"
voteBefore
"
,
type
:
"
uint256
"
},{
name
:
"
percentOfRegisteredVotersReqToBeValid
"
,
type
:
"
uint256
"
},{
name
:
"
percentOfVotesCastToWin
"
,
type
:
"
uint256
"
},{
name
:
"
countNonvotesAsBlanks
"
,
type
:
"
bool
"
},{
name
:
"
maxVotesPerVoter
"
,
type
:
"
uint256
"
},{
name
:
"
maxVotesPerProposal
"
,
type
:
"
uint256
"
},{
name
:
"
proposalNames
"
,
type
:
"
bytes32[]
"
}],
name
:
"
newBallot
"
,
outputs
:[{
name
:
"
newaddr
"
,
type
:
"
address
"
}],
payable
:
!
1
,
stateMutability
:
"
nonpayable
"
,
type
:
"
function
"
}];
// $ solc --abi src/Ballot.sol | head -4 | tail -1 | jq
\ No newline at end of file
var
abiBallot
=
[
{
"
constant
"
:
false
,
"
inputs
"
:
[
{
"
name
"
:
"
proposal
"
,
"
type
"
:
"
uint256
"
}
],
"
name
"
:
"
vote
"
,
"
outputs
"
:
[],
"
payable
"
:
false
,
"
stateMutability
"
:
"
nonpayable
"
,
"
type
"
:
"
function
"
},
{
"
constant
"
:
true
,
"
inputs
"
:
[],
"
name
"
:
"
ballotPercentOfRegisteredVotersReqToBeValid
"
,
"
outputs
"
:
[
{
"
name
"
:
""
,
"
type
"
:
"
uint256
"
}
],
"
payable
"
:
false
,
"
stateMutability
"
:
"
view
"
,
"
type
"
:
"
function
"
},
{
"
constant
"
:
true
,
"
inputs
"
:
[],
"
name
"
:
"
proposalListLength
"
,
"
outputs
"
:
[
{
"
name
"
:
""
,
"
type
"
:
"
uint256
"
}
],
"
payable
"
:
false
,
"
stateMutability
"
:
"
view
"
,
"
type
"
:
"
function
"
},
{
"
constant
"
:
true
,
"
inputs
"
:
[
{
"
name
"
:
""
,
"
type
"
:
"
address
"
}
],
"
name
"
:
"
voterMap
"
,
"
outputs
"
:
[
{
"
name
"
:
""
,
"
type
"
:
"
uint256
"
}
],
"
payable
"
:
false
,
"
stateMutability
"
:
"
view
"
,
"
type
"
:
"
function
"
},
{
"
constant
"
:
true
,
"
inputs
"
:
[
{
"
name
"
:
"
voter
"
,
"
type
"
:
"
address
"
}
],
"
name
"
:
"
getVoterIdx
"
,
"
outputs
"
:
[
{
"
name
"
:
""
,
"
type
"
:
"
int256
"
}
],
"
payable
"
:
false
,
"
stateMutability
"
:
"
view
"
,
"
type
"
:
"
function
"
},
{
"
constant
"
:
false
,
"
inputs
"
:
[],
"
name
"
:
"
uncreate
"
,
"
outputs
"
:
[],
"
payable
"
:
false
,
"
stateMutability
"
:
"
nonpayable
"
,
"
type
"
:
"
function
"
},
{
"
constant
"
:
true
,
"
inputs
"
:
[
{
"
name
"
:
""
,
"
type
"
:
"
uint256
"
}
],
"
name
"
:
"
voterList
"
,
"
outputs
"
:
[
{
"
name
"
:
"
voter
"
,
"
type
"
:
"
address
"
},
{
"
name
"
:
"
votesLeft
"
,
"
type
"
:
"
uint256
"
}
],
"
payable
"
:
false
,
"
stateMutability
"
:
"
view
"
,
"
type
"
:
"
function
"
},
{
"
constant
"
:
true
,
"
inputs
"
:
[],
"
name
"
:
"
ballotCountNonvotesAsBlanks
"
,
"
outputs
"
:
[
{
"
name
"
:
""
,
"
type
"
:
"
bool
"
}
],
"
payable
"
:
false
,
"
stateMutability
"
:
"
view
"
,
"
type
"
:
"
function
"
},
{
"
constant
"
:
true
,
"
inputs
"
:
[],
"
name
"
:
"
ballotVoteBefore
"
,
"
outputs
"
:
[
{
"
name
"
:
""
,
"
type
"
:
"
uint256
"
}
],
"
payable
"
:
false
,
"
stateMutability
"
:
"
view
"
,
"
type
"
:
"
function
"
},
{
"
constant
"
:
false
,
"
inputs
"
:
[
{
"
name
"
:
"
voters
"
,
"
type
"
:
"
address[]
"
}
],
"
name
"
:
"
giveRightToVote
"
,
"
outputs
"
:
[],
"
payable
"
:
false
,
"
stateMutability
"
:
"
nonpayable
"
,
"
type
"
:
"
function
"
},
{
"
constant
"
:
true
,
"
inputs
"
:
[],
"
name
"
:
"
ballotVoteStarts
"
,
"
outputs
"
:
[
{
"
name
"
:
""
,
"
type
"
:
"
uint256
"
}
],
"
payable
"
:
false
,
"
stateMutability
"
:
"
view
"
,
"
type
"
:
"
function
"
},
{
"
constant
"
:
true
,
"
inputs
"
:
[],
"
name
"
:
"
ballotMaxVotesPerProposal
"
,
"
outputs
"
:
[
{
"
name
"
:
""
,
"
type
"
:
"
uint256
"
}
],
"
payable
"
:
false
,
"
stateMutability
"
:
"
view
"
,
"
type
"
:
"
function
"
},
{
"
constant
"
:
true
,
"
inputs
"
:
[],
"
name
"
:
"
ballotMaxVotesPerVoter
"
,
"
outputs
"
:
[
{
"
name
"
:
""
,
"
type
"
:
"
uint256
"
}
],
"
payable
"
:
false
,
"
stateMutability
"
:
"
view
"
,
"
type
"
:
"
function
"
},
{
"
constant
"
:
true
,
"
inputs
"
:
[],
"
name
"
:
"
getTotalVoltes
"
,
"
outputs
"
:
[
{
"
name
"
:
""
,
"
type
"
:
"
uint256
"
}
],
"
payable
"
:
false
,
"
stateMutability
"
:
"
view
"
,
"
type
"
:
"
function
"
},
{
"
constant
"
:
true
,
"
inputs
"
:
[],
"
name
"
:
"
ballotTitle
"
,
"
outputs
"
:
[
{
"
name
"
:
""
,
"
type
"
:
"
string
"
}
],
"
payable
"
:
false
,
"
stateMutability
"
:
"
view
"
,
"
type
"
:
"
function
"
},
{
"
constant
"
:
true
,
"
inputs
"
:
[
{
"
name
"
:
""
,
"
type
"
:
"
uint256
"
}
],
"
name
"
:
"
proposalList
"
,
"
outputs
"
:
[
{
"
name
"
:
""
,
"
type
"
:
"
bytes32
"
}
],
"
payable
"
:
false
,
"
stateMutability
"
:
"
view
"
,
"
type
"
:
"
function
"
},
{
"
constant
"
:
true
,
"
inputs
"
:
[],
"
name
"
:
"
ballotPercentOfVotesCastToWin
"
,
"
outputs
"
:
[
{
"
name
"
:
""
,
"
type
"
:
"
uint256
"
}
],
"
payable
"
:
false
,
"
stateMutability
"
:
"
view
"
,
"
type
"
:
"
function
"
},
{
"
constant
"
:
true
,
"
inputs
"
:
[],
"
name
"
:
"
ballotChairman
"
,
"
outputs
"
:
[
{
"
name
"
:
""
,
"
type
"
:
"
address
"
}
],
"
payable
"
:
false
,
"
stateMutability
"
:
"
view
"
,
"
type
"
:
"
function
"
},
{
"
constant
"
:
true
,
"
inputs
"
:
[
{
"
name
"
:
""
,
"
type
"
:
"
uint256
"
}
],
"
name
"
:
"
votedProposalList
"
,
"
outputs
"
:
[
{
"
name
"
:
""
,
"
type
"
:
"
uint256
"
}
],
"
payable
"
:
false
,
"
stateMutability
"
:
"
view
"
,
"
type
"
:
"
function
"
},
{
"
inputs
"
:
[
{
"
name
"
:
"
title
"
,
"
type
"
:
"
string
"
},
{
"
name
"
:
"
voteStarts
"
,
"
type
"
:
"
uint256
"
},
{
"
name
"
:
"
voteBefore
"
,
"
type
"
:
"
uint256
"
},
{
"
name
"
:
"
percentOfRegisteredVotersReqToBeValid
"
,
"
type
"
:
"
uint256
"
},
{
"
name
"
:
"
percentOfVotesCastToWin
"
,
"
type
"
:
"
uint256
"
},
{
"
name
"
:
"
countNonvotesAsBlanks
"
,
"
type
"
:
"
bool
"
},
{
"
name
"
:
"
maxVotesPerVoter
"
,
"
type
"
:
"
uint256
"
},
{
"
name
"
:
"
maxVotesPerProposal
"
,
"
type
"
:
"
uint256
"
},
{
"
name
"
:
"
proposalNames
"
,
"
type
"
:
"
bytes32[]
"
},
{
"
name
"
:
"
voters
"
,
"
type
"
:
"
address[]
"
}
],
"
payable
"
:
false
,
"
stateMutability
"
:
"
nonpayable
"
,
"
type
"
:
"
constructor
"
}
];
// $ solc --abi src/Ballot.sol | tail -1 | jq
var
abiNew
=
[
{
"
constant
"
:
false
,
"
inputs
"
:
[
{
"
name
"
:
"
title
"
,
"
type
"
:
"
string
"
},
{
"
name
"
:
"
voteStarts
"
,
"
type
"
:
"
uint256
"
},
{
"
name
"
:
"
voteBefore
"
,
"
type
"
:
"
uint256
"
},
{
"
name
"
:
"
percentOfRegisteredVotersReqToBeValid
"
,
"
type
"
:
"
uint256
"
},
{
"
name
"
:
"
percentOfVotesCastToWin
"
,
"
type
"
:
"
uint256
"
},
{
"
name
"
:
"
countNonvotesAsBlanks
"
,
"
type
"
:
"
bool
"
},
{
"
name
"
:
"
maxVotesPerVoter
"
,
"
type
"
:
"
uint256
"
},
{
"
name
"
:
"
maxVotesPerProposal
"
,
"
type
"
:
"
uint256
"
},
{
"
name
"
:
"
proposalNames
"
,
"
type
"
:
"
bytes32[]
"
},
{
"
name
"
:
"
voters
"
,
"
type
"
:
"
address[]
"
}
],
"
name
"
:
"
newBallot
"
,
"
outputs
"
:
[],
"
payable
"
:
false
,
"
stateMutability
"
:
"
nonpayable
"
,
"
type
"
:
"
function
"
},
{
"
anonymous
"
:
false
,
"
inputs
"
:
[
{
"
indexed
"
:
false
,
"
name
"
:
"
contrato
"
,
"
type
"
:
"
address
"
}
],
"
name
"
:
"
contratocreado
"
,
"
type
"
:
"
event
"
}
];
This diff is collapsed.
Click to expand it.
web/dist/js/vendor/ballot.js
+
1
−
0
View file @
74098505
...
@@ -448,6 +448,7 @@ async function nueva_votacion(arguments, proposals, voters) {
...
@@ -448,6 +448,7 @@ async function nueva_votacion(arguments, proposals, voters) {
async
function
contract_created
(
err
,
rcpt
)
{
async
function
contract_created
(
err
,
rcpt
)
{
console
.
log
(
rcpt
);
console
.
log
(
rcpt
);
alertarSuccess
(
'
La votación se creó correctamente, tome nota de su dirección:
'
+
rcpt
);
// the contract address
}
}
async
function
ver_votacion
(
addr
)
{
async
function
ver_votacion
(
addr
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment