Skip to content
On this page

Proposals ​


This function returns number of all proposals on the Octus Bridge.

It can be used anywhere where number of all proposals is needed.

Request parameters ​

No required parameters

Response fields explanation ​

NameExample valueComment
proposalsTotalCount6Total number of DAO proposals

Example ​

java
app.get('/proposals/overview', (req, res) => {
    axios({
        method: 'get',
        url: `${apiUrl}/proposals/overview`
      })
    .then(function (response) {
        res.send(response.data)
    })
    .catch(function(error){
        console.error(error)
        res.send('Error')
    })
})

This function returns details about certain proposals based on proposal address, id, proposer’s address, start and end time as well as the proposal’s status (Pending, Executed, etc.).

It can be used for filtering proposals based on parameters such as proposal id, proposal’s address, proposer’s address, start and end time of the proposal, showing all the details about the searched proposal such as: description, state, information about the votes, execution time, grace period, quorum details, message and transaction hash, etc.

Request parameters ​

Required body parameters:

NameExample valueComment
endTimeGe1641776400Proposals that ended after or during the given time (in UNIX format)
endTimeLe1655859600Proposals that ended before or during the given time (in UNIX format)
limit10Maximum number of proposals to be retrieved
offset0Offset
orderingSet of parameters based on which the retrieved proposals will be ordered
columncreatedAtOrder by given column name (i.e. createdAt)
directionASCOrder by given direction (ascending or descending)
proposalAddress0:b0719c636ebd7e5fde1b4c0374dfe1808b46ca47afd2999379fc23cc9ce1edbdAddress of the desired proposal
proposalId6Id of the desired proposal
proposer0:56629b68a5ac850b5513ec992998a24eb4330d03171db1db91d485133dbe88c2Address of the user that created the proposal
startTimeGe1641776400Proposals that started after or during the given time (in UNIX format)
startTimeLe1654822800Proposals that started before or during the given time (in UNIX format)
stateExecutedState of the proposal (Executed, pending…)

Response fields explanation ​

NameExample valueComment
ethActionslist of all the actions arrived from Everscale with following data:
- callData"string"Additional call data
- chainId0Id of the chain where the action happened
- signature"string"Relay’s signature
- target"string"Target address
- value"string"Amount of tokens
tonActionslist of all the actions arrived from ethereum side:
- payloadte6ccgEBAgEAEQABCAMFmxgBABBBY2NlcHRlZAPayload data
- target0:cb5f0cb869c91731da283f5546c42d3a3353e6e260dda170b4650970b62519b0Target address
- value1000000000Amount of tokens
againstVotes0Number of votes against proposal
canceledfalseTrue if proposal is canceled, false if not
canceledAtnullDate time of canceling event in UNIX format
createdAt1654188416Date time of proposal’s creation in UNIX format
descriptionIncrease Octusbridge vault limits...
endTime1654620425Date time of the end of voting in UNIX format
executedtrueTrue if proposal is executed, false if not
executedAt1654796642Date time of proposal’s actual execution
executionTime1654793225Predicted execution time in UNIX format
forVotes607634505921299Number of votes supporting the proposal
gracePeriod172800Timespan in days for how long will the proposal be in the grace period
messageHash530b6645278c64e8c72822f6bd29cb8d890b2196531404b1387fc403cb885d3cHash code of the message
proposalAddress0:b0719c636ebd7e5fde1b4c0374dfe1808b46ca47afd2999379fc23cc9ce1edbdAddress of the proposal’s contract
proposalId6Id of the proposal
proposer0:56629b68a5ac850b5513ec992998a24eb4330d03171db1db91d485133dbe88c2Address of the user that created the proposal
queuedtrueTrue if the proposal is queued, false if not
queuedAt1654650616Date of queuing the proposal
quorumVotes500000000000000Number of votes for reaching the quorum
startTime1654361225Date time of the start of voting
stateExecutedState of the proposal (Executed, Pending…)
timeLock172800Timespan of the lock of proposal (grace period)
transactionHasheb4c542297509c1662e6e6f268e7ab6670605d454cf36628925a1817b644f24aHash code of the transaction
votingDelay172800Timespan of the voting delay (grace period)
totalCount1Total number of proposals retrieved

Example ​

java
app.post('/proposals/search', (req, res) => {
 
    console.log(req.body)
    axios({
        method: 'post',
        url: `${apiUrl}/proposals/search`,
        data: {
            endTimeGe: req.body.endTimeGe,
            endTimeLe: req.body.endTimeLe,
            limit: req.body.limit,
            offset: req.body.offset,
            ordering: req.body.ordering,
            proposalAddress: req.body.proposalAddress,
            proposalId: req.body.proposalId,
            proposer: req.body.proposer,
            startTimeGe: req.body.startTimeGe,
            startTimeLe: req.body.startTimeLe,
            state: req.body.state
        }
    })
    .then(function(response){
        res.send(response.data)
    })
    .catch(function(error){
        console.error(error)
        res.send('Error')
    })
})