icon-project / governance2 Goto Github PK
View Code? Open in Web Editor NEWGovernance 2.0
Governance 2.0
currently running the following query:
{"jsonrpc":"2.0","method":"icx_call","id":732,"params":{"to":"cx0000000000000000000000000000000000000001","dataType":"call","data":{"method":"getProposals","params":{"status":"0x0"}}}}
getting the following results:
{
proposals: [
{
apply: [Object],
contents: [Object],
endBlockHeight: '0x31bacd2',
id: '0xce1cd28129fd6787b099baac5e18b0786a2bcab1a5c5b6eb4484073509176467',
proposer: 'hx0b047c751658f7ce1b2595da34d57a0e7dad357d',
proposerName: 'ICON Foundation',
startBlockHeight: '0x318653b',
status: '0x1',
vote: [Object]
},
{
apply: [Object],
contents: [Object],
endBlockHeight: '0x2ee46a2',
id: '0x269f051b5c243a5d9c1f8400ac0fcd630587d3a237dc2896211c88c098d8cc43',
proposer: 'hx0b047c751658f7ce1b2595da34d57a0e7dad357d',
proposerName: 'ICON Foundation',
startBlockHeight: '0x2eb1f66',
status: '0x1',
vote: [Object]
},
{
contents: [Object],
endBlockHeight: '0x2cb6772',
id: '0x50f73b71ea15117318acd75904bd52e06180a3d7a8893798de5b1b7fa82f7e88',
proposer: 'hx0b047c751658f7ce1b2595da34d57a0e7dad357d',
proposerName: 'ICON Foundation',
startBlockHeight: '0x2cac027',
status: '0x1',
vote: [Object]
},
{
contents: [Object],
endBlockHeight: '0x29ea9b2',
id: '0x140af4fbe9adfec2dc215f47355560b01a9b4d9f3b0e2aff702d0c9bd6ad506d',
proposer: 'hx0b047c751658f7ce1b2595da34d57a0e7dad357d',
proposerName: 'ICON Foundation',
startBlockHeight: '0x29e01cc',
status: '0x1',
vote: [Object]
},
{
contents: [Object],
endBlockHeight: '0x29e0142',
id: '0x4f9a5146e364ff0c32c5e6f3922b13fea5e720d2bfc3eaf24f808daa3052ec83',
proposer: 'hxfba37e91ccc13ec1dab115811f73e429cde44d48',
proposerName: 'ICX_Station',
startBlockHeight: '0x29d5c43',
status: '0x1',
vote: [Object]
},
{
contents: [Object],
endBlockHeight: '0x29d58d2',
id: '0x6121aa4e693bd7e747760e55dda07fdb954d858d0f7936088a1296da0cff0a99',
proposer: 'hx0b047c751658f7ce1b2595da34d57a0e7dad357d',
proposerName: 'ICON Foundation',
startBlockHeight: '0x29cb79c',
status: '0x1',
vote: [Object]
},
{
contents: [Object],
endBlockHeight: '0x29cb062',
id: '0x57553a2b1e6913ff5e8b929689f2d24fd4e30d20ef486ae81a09db7436070585',
proposer: 'hx0b047c751658f7ce1b2595da34d57a0e7dad357d',
proposerName: 'ICON Foundation',
startBlockHeight: '0x29c0d3b',
status: '0x1',
vote: [Object]
},
{
contents: [Object],
endBlockHeight: '0x2981552',
id: '0x2d82b7c7ac882d63c3fc7c31df30262f9033e34edc52b4f22758de66131dce39',
proposer: 'hx0b047c751658f7ce1b2595da34d57a0e7dad357d',
proposerName: 'ICON Foundation',
startBlockHeight: '0x2977a14',
status: '0x1',
vote: [Object]
},
{
contents: [Object],
endBlockHeight: '0x2981552',
id: '0x5fb632c4378adf1a52815af5a5f6294563d9d1c2403b86cc62d2414e1ec048fd',
proposer: 'hx0b047c751658f7ce1b2595da34d57a0e7dad357d',
proposerName: 'ICON Foundation',
startBlockHeight: '0x2977a0a',
status: '0x1',
vote: [Object]
},
{
contents: [Object],
endBlockHeight: '0x27d1b62',
id: '0x584ede3def9f05be82d254bfab2013a25936a076462fbe4920695b5c9929d38a',
proposer: 'hx0b047c751658f7ce1b2595da34d57a0e7dad357d',
proposerName: 'ICON Foundation',
startBlockHeight: '0x27cc0a5',
status: '0x1',
vote: [Object]
}
]
}
As you can see all the returned proposals have status of 0x1
, I was expecting the query to return an empty array because there are no network proposals currently open for voting.
Edit to add more info:
calling it with {status: '0x1'}
returns the same results and calling it with status 0x2
and 0x3
returns the following:
{
jsonrpc: '2.0',
error: { code: -30010, message: 'SystemError(-30010): E0010:OutOfStep' },
id: 495
}
governance2/governance/src/main/java/foundation/icon/governance/Proposal.java
Lines 137 to 145 in 86fc483
After the completion of the proposal time, if the proposal has been approved, the status is changed to expired. It doesn't allow the proposal creator to wait for the completion of the voting period to receive votes from the maximum number of participants.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.