Skip to main content

10. Proposal Management

Proposal Management Interface


TRC100 Address Query

POST chain_tvm (Query TRC100 contract addresses)
Parameters
nametypedata typedescription
slicenorequiredintMetaspace number
Responses
http codecontent-typeresponse
0application/jsonTRC100 contract addresses

Returns the minimum TC holdings required for voting rights and proposal submission.

Example cURL
{
"jsonrpc": "3.0",
"method": "chain_tvm",
"params": ["opcode=propose&subcode=trc100Addr&sliceno=0", "encryp=none"],
"id": "aa80aa0c6bb0c7d81ac7e5b3"
}
Response Example
{
"jsonrpc": "3.0",
"id": "85c42ddbd83c301a0f1bdfc0",
"result": {
"ret": "0",
"err": "",
"content": {
"trc_100_root_addr": "0x2bff1665aef450f0d5a2681f5b2f3a5df00633a0",
"trc_100_addr": "0x8d5dd47712a9d4c7ebcb570498a30407fda9a19a",
"slice_addr": "0xb2b60dabde3f9acc042528d2665237ac36e23a2e",
"lock_addr": "0xeb93cc79834ff35f48d69324476c5c573dc2cdab",
"propose_addr": "0x1bd1c092d49548cceb295cf9d0e351c6489fb059",
"static_addr": "0x23ee58b0e6cca745a633ae9b4eaa87929b55c803",
"cross_addr": "0xc4bb216db77ea104bba866fd535456ce9bd65d2f"
}
}
}

Query Proposal Permission

POST chain_tvm (Query proposal permission)

Participating in proposals will register the proposer's information in the proposal system.

Parameters
nametypedata typedescription
slicenorequiredintMetaspace number
Responses
http codecontent-typeresponse
0application/jsonPermission limits

Returns the minimum TC holdings required for voting rights and proposal submission.

Example cURL
{
"jsonrpc": "3.0",
"method": "chain_tvm",
"params": ["opcode=propose&subcode=confiminfo&sliceno=0", "encryp=none"],
"id": "aa80aa0c6bb0c7d81ac7e5b3"
}
Response Example
{
"jsonrpc": "3.0",
"id": "0549ba3bcd009e224f07e837",
"result": {
"ret": "0",
"err": "",
"content": {
"LimitVote": 30000,
"LimitSubmit": 50000
}
}
}

Submit Proposal

POST chain_tvm (Submit proposal)
Parameters
nametypedata typedescription
addressrequiredstringProposal content storage address
markrequiredstringContent hash
typerequiredintProposal type (see below)
daysrequiredintVoting valid days
slicenorequiredintMetaspace number

Proposal Types:

  • 0 - Foundation, community, public and private fundraising and other platform token pool (no private key) transfer proposal
  • 1 - Gas price adjustment proposal
  • 2 - Mainnet code upgrade proposal
  • 3 - Self-contract upgrade proposal
  • 4 - Token incentive miner proposal
  • 5 - Agree metaspace proposal
Responses
http codecontent-typeresponse
0application/json{"txhash":"..."}
Example cURL
{
"jsonrpc": "3.0",
"method": "chain_tvm",
"params": ["opcode=propose&subcode=submitpropose&address=0x...&mark=&type=&days=7&sliceno=0", "encryp=none"],
"id": "aa80aa0c6bb0c7d81ac7e5b3"
}
Response Example
{
"jsonrpc": "3.0",
"id": "1",
"result": {
"ret": "0",
"err": "",
"content": {
"txhash": "0x6885997ca51fa08ffded573088b0c5c294652ec842ac7f3182d32e30ce261025"
}
}
}

Vote

POST chain_tvm (Vote on proposal)
Parameters
nametypedata typedescription
typerequiredintProposal type (0-5, same as submit proposal)
optyperequiredintVote intention (1 - agree, 2 - reject)
slicenorequiredintMetaspace number
Responses
http codecontent-typeresponse
0application/json{"txhash":"..."}
Example cURL
{
"jsonrpc": "3.0",
"method": "chain_tvm",
"params": ["opcode=propose&subcode=voteing&type=0&optype=1&sliceno=0", "encryp=none"],
"id": "aa80aa0c6bb0c7d81ac7e5b3"
}
Response Example
{
"jsonrpc": "3.0",
"id": "1",
"result": {
"ret": "0",
"err": "",
"content": {
"txhash": "0x6885997ca51fa08ffded573088b0c5c294652ec842ac7f3182d32e30ce261025"
}
}
}

Execute Proposal

POST chain_tvm (Execute proposal)

Can only be submitted after the proposal deadline has passed. Once submitted, whether successful or failed, the proposal will be cleared.

Parameters
nametypedata typedescription
typerequiredintProposal type
slicenorequiredintMetaspace number
Responses
http codecontent-typeresponse
0application/json{"txhash":"..."}
Example cURL
{
"jsonrpc": "3.0",
"method": "chain_tvm",
"params": ["opcode=propose&subcode=runpropose&type=0&sliceno=0", "encryp=none"],
"id": "aa80aa0c6bb0c7d81ac7e5b3"
}
Response Example
{
"jsonrpc": "3.0",
"id": "1",
"result": {
"ret": "0",
"err": "",
"content": {
"txhash": "0x6885997ca51fa08ffded573088b0c5c294652ec842ac7f3182d32e30ce261025"
}
}
}

Query Proposal

POST chain_tvm (Query proposal details)
Parameters
nametypedata typedescription
typerequiredintProposal type (0-5)
slicenorequiredintMetaspace number
Responses
http codecontent-typeresponse
0application/jsonProposal details
Example cURL
{
"jsonrpc": "3.0",
"method": "chain_tvm",
"params": ["opcode=propose&subcode=queryPropose&type=0&sliceno=0", "encryp=none"],
"id": "aa80aa0c6bb0c7d81ac7e5b3"
}
Response Example
{
"jsonrpc": "3.0",
"id": "53d8f08dbd01b459f83d3101",
"result": {
"ret": "0",
"err": "",
"content": {
"Submit": "0x35f4646842fc5fe208b7d3fab125c8542be88324",
"Status": false,
"No": 4,
"ContentAddr": "0x22d728a900c13800f19d31f300c4ad65576c4200",
"Mark": "00c13800f19d31f300c4ad65576",
"Days": 7,
"Timeval": 1727226885526038300,
"VoteStatus": false
}
}
}

Delete Proposal

POST chain_tvm (Delete proposal)

Note: Only the proposal initiator can delete the proposal.

Parameters
nametypedata typedescription
typerequiredintProposal type (0-5)
slicenorequiredintMetaspace number
Responses
http codecontent-typeresponse
0application/json{"txhash":"..."}
Example cURL
{
"jsonrpc": "3.0",
"method": "chain_tvm",
"params": ["opcode=propose&subcode=removePropose&type=0&sliceno=0", "encryp=none"],
"id": "aa80aa0c6bb0c7d81ac7e5b3"
}
Response Example
{
"jsonrpc": "3.0",
"id": "1",
"result": {
"ret": "0",
"err": "",
"content": {
"txhash": "0x6885997ca51fa08ffded573088b0c5c294652ec842ac7f3182d32e30ce261025"
}
}
}

Query Vote Information

POST chain_tvm (Query voting results)
Parameters
nametypedata typedescription
typerequiredintProposal type (0-5)
slicenorequiredintMetaspace number
Responses
http codecontent-typeresponse
0application/jsonVote statistics
Example cURL
{
"jsonrpc": "3.0",
"method": "chain_tvm",
"params": ["opcode=propose&subcode=queryVote&type=0&sliceno=0", "encryp=none"],
"id": "aa80aa0c6bb0c7d81ac7e5b3"
}
Response Example
{
"jsonrpc": "3.0",
"id": "1726b2be8fef1ec6fa30ada2",
"result": {
"ret": "0",
"err": "",
"content": {
"Pass": 1,
"Disagree": 0,
"PassTC": 523843176,
"DisagreeTC": 0
}
}
}