Proposal Data

Get all the proposal details through this module

Proposal Data is an instance of dApp

getProposalOwner

proposalData.getProposalOwner(proposalId,callback)

Get the address of proposal owner

Arguments:

proposalId

Returns

Proposal owner address

getStatusOfProposals

proposalData.getStatusOfProposals(callback)

Get status report of proposals in dApp

Returns

[
draftProposals //Number of proposals uncategorized and not open for voting
pendingProposals //Number of proposals in which voting in under process
acceptedProposals //Number of proposals accepted
rejectedProposals //Number of proposals rejected
]

getProposalLength

proposalData.getProposalLength(callback)

Get length of total number of proposals raised in dApp

Returns

Length of all proposals

getProposalDetailsById1

proposalData.getProposalDetailsById1(proposalId,callback)

Get proposal id,owner,date updated,version number,status id of proposal

Arguments:

proposalId

Returns

Array of proposal details

getProposalDetailsById2

proposalData.getProposalDetailsById2(proposalId,callback)

Get proposal id, sub category id, current voting id, intermediate verdict, final verdict, voting type address, total solutions of proposal

Arguments:

proposalId

Returns

Array of proposal details

getProposalDetailsById3

proposalData.getProposalDetailsById3(proposalId,callback)

Get proposal id, sub category id, status id, final verdict of proposal

Arguments:

proposalId

Returns

Array of proposal details

getProposalDetailsById6

proposalData.getProposalDetailsById6(proposalId,callback)

Get proposal id, status id, total vote value, total solutions, common incentive and final verdict of proposal

Arguments:

proposalId

Returns

Array of proposal details

getProposalData

proposalData.getProposalData(proposalId,callback)

Get proposal title , owner, description, short description, date created

Arguments:

proposalId

Returns

{
title //proposal title
owner //address of proposal owner
description //proposal description
short description //proposal description in short
dateAdd //unix timestamp at which proposal is created
}

getProposalEventData

proposalData.getProposalEventData(proposalId,callback)

Get proposal data with status id and status name

Arguments:

proposalId

Returns

Object of proposal details

getProposalCategory

proposalData.getProposalCategory(proposalId,callback)

Get category of the proposal

Arguments:

proposalId

Returns

Category of proposal

getProposalStatus

proposalData.getProposalStatus(proposalId,callback)

Get current status of proposal

Arguments:

proposalId

Returns

{
statusId //Id of the status
status //Name of the status
proposalId //Id of the proposal
}

getProposalDateAdd

proposalData.getProposalDateAdd(proposalId,callback)

Get date at which proposal was created

Arguments:

proposalId

Returns

Unix timestamp of proposal created date

getProposalIncentive

proposalData.getProposalIncentive(proposalId,callback)

Get Incentive that will be distributed after proposal is passed

Arguments:

proposalId

Returns

Proposal incentive

getAllVoteIdsLength_byProposal

proposalData.getAllVoteIdsLength_byProposal(proposalId,callback)

Get total number of votes polled for a proposal

Arguments:

proposalId

Returns

Length of votes polled for a proposal

Solution Data

getOptionDetailsById1

proposalData.getOptionDetailsById1(proposalId,optionId,callback)

Get proposal id, solution owner, solution id, solution description hash and date solution was added

Arguments:

proposalId,
optionId

Returns

{
proposalId //Id of the proposal
solutionOwner //Address of solution owner
solutionId //Id of the solution
descriptionHash //IPFS hash solution description
dateAdd //Unix timestamp at which solution was added
}

getOptionDetailsByAddress

proposalData.getOptionDetailsByAddress(proposalId,memberAddress,callback)

Get proposal id, solution owner, solution id,solution description hash and date of solution by owner address

Arguments:

proposalId,
memberAddress

Returns

Object of solution details

getOptionDetailsByProposalId

proposalData.getOptionDetailsByProposalId(proposalId,optionId,callback)

Get solution details with onchain and offchain action parameter values

Arguments:

proposalId,
optionId

Returns

Object of solution details with action parameter values

getOptionAddressByProposalId

proposalData.getOptionAddressByProposalId(proposalId,optionId,callback)

Get address of option owner

Arguments:

proposalId,
optionId

Returns

Solution owner address

getOptionByVoteId

proposalData.getOptionByVoteId(voteId,callback)

Get solution id of proposal by vote id

Arguments:

voteId

Returns

Solution id

getOptionDateAdded

proposalData.getOptionDateAdded(proposalId,optionId,callback)

Get date at which solution was added

Arguments:

proposalId,
optionId

Returns

Timestamp of solution added date

getSolutionDataByProposalId

proposalData.getSolutionDataByProposalId(proposalId,optionId,callback)

Get proposal Id, solution description, solution owner, solution added date

Arguments:

proposalId,
optionId

Returns

Object of solution data