Creates a proposal transaction.
Returns
Transaction Object - JSON Object: Unsigned transaction. Refer to the Transaction chapter for details. For the ProposalCreateContract
type, the fields in raw_data.contract[0].parameter.value
are:
Field | Type | Description |
---|---|---|
owner_address | string | Account address |
parameters | map<int64, int64> | Parameters proposed to be modified and their values |
{
"owner_address": "PHqgRM8giN6Nr9DgA1FybUjKFwd79cxhyp",
"parameters": [
{
"key": 0,
"value": 100000
},
{
"key": 1,
"value": 2
}
],
"visible": true
}
curl --location --request POST '/wallet/proposalcreate' \
--header 'Content-Type: application/json' \
--data-raw '{
"owner_address": "PHqgRM8giN6Nr9DgA1FybUjKFwd79cxhyp",
"parameters": [
{
"key": 0,
"value": 100000
},
{
"key": 1,
"value": 2
}
],
"visible": true
}'
{
"visible": true,
"txID": "5eacaa27d7088e4c43a8b84d381478d854bb1966f21f020a0250b9f2d94bb498",
"raw_data": {
"contract": [
{
"parameter": {
"value": {
"owner_address": "PHqgRM8giN6Nr9DgA1FybUjKFwd79cxhyp",
"parameters": [
{
"value": 100000,
"key": 0
},
{
"value": 2,
"key": 1
}
]
},
"type_url": "type.googleapis.com/protocol.ProposalCreateContract"
},
"type": "ProposalCreateContract"
}
],
"ref_block_bytes": "4ccf",
"ref_block_hash": "dc8516b52be48a41",
"expiration": 1737546636000,
"timestamp": 1737546577411
},
"raw_data_hex": "0a024ccf2208dc8516b52be48a4140e0b5e6eec8325a600810125c0a33747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e50726f706f73616c437265617465436f6e747261637412250a1541202d802d6f3db2ce59c632c13abe1b78a91528b71206080010a08d061204080110027083ece2eec832"
}