Proposal Data
Get all the proposal details through this module
Proposal Data is an instance of dApp

getProposalOwner

1
proposalData.getProposalOwner(proposalId,callback)
Copied!
Get the address of proposal owner
Arguments:
1
proposalId
Copied!
Returns
1
Proposal owner address
Copied!

getStatusOfProposals

1
proposalData.getStatusOfProposals(callback)
Copied!
Get status report of proposals in dApp
Returns
1
[
2
draftProposals //Number of proposals uncategorized and not open for voting
3
pendingProposals //Number of proposals in which voting in under process
4
acceptedProposals //Number of proposals accepted
5
rejectedProposals //Number of proposals rejected
6
]
Copied!

getProposalLength

1
proposalData.getProposalLength(callback)
Copied!
Get length of total number of proposals raised in dApp
Returns
1
Length of all proposals
Copied!

getProposalDetailsById1

1
proposalData.getProposalDetailsById1(proposalId,callback)
Copied!
Get proposal id,owner,date updated,version number,status id of proposal
Arguments:
1
proposalId
Copied!
Returns
1
Array of proposal details
Copied!

getProposalDetailsById2

1
proposalData.getProposalDetailsById2(proposalId,callback)
Copied!
Get proposal id, sub category id, current voting id, intermediate verdict, final verdict, voting type address, total solutions of proposal
Arguments:
1
proposalId
Copied!
Returns
1
Array of proposal details
Copied!

getProposalDetailsById3

1
proposalData.getProposalDetailsById3(proposalId,callback)
Copied!
Get proposal id, sub category id, status id, final verdict of proposal
Arguments:
1
proposalId
Copied!
Returns
1
Array of proposal details
Copied!

getProposalDetailsById6

1
proposalData.getProposalDetailsById6(proposalId,callback)
Copied!
Get proposal id, status id, total vote value, total solutions, common incentive and final verdict of proposal
Arguments:
1
proposalId
Copied!
Returns
1
Array of proposal details
Copied!

getProposalData

1
proposalData.getProposalData(proposalId,callback)
Copied!
Get proposal title , owner, description, short description, date created
Arguments:
1
proposalId
Copied!
Returns
1
{
2
title //proposal title
3
owner //address of proposal owner
4
description //proposal description
5
short description //proposal description in short
6
dateAdd //unix timestamp at which proposal is created
7
}
Copied!

getProposalEventData

1
proposalData.getProposalEventData(proposalId,callback)
Copied!
Get proposal data with status id and status name
Arguments:
1
proposalId
Copied!
Returns
1
Object of proposal details
Copied!

getProposalCategory

1
proposalData.getProposalCategory(proposalId,callback)
Copied!
Get category of the proposal
Arguments:
1
proposalId
Copied!
Returns
1
Category of proposal
Copied!

getProposalStatus

1
proposalData.getProposalStatus(proposalId,callback)
Copied!
Get current status of proposal
Arguments:
1
proposalId
Copied!
Returns
1
{
2
statusId //Id of the status
3
status //Name of the status
4
proposalId //Id of the proposal
5
}
Copied!

getProposalDateAdd

1
proposalData.getProposalDateAdd(proposalId,callback)
Copied!
Get date at which proposal was created
Arguments:
1
proposalId
Copied!
Returns
1
Unix timestamp of proposal created date
Copied!

getProposalIncentive

1
proposalData.getProposalIncentive(proposalId,callback)
Copied!
Get Incentive that will be distributed after proposal is passed
Arguments:
1
proposalId
Copied!
Returns
1
Proposal incentive
Copied!

getAllVoteIdsLength_byProposal

1
proposalData.getAllVoteIdsLength_byProposal(proposalId,callback)
Copied!
Get total number of votes polled for a proposal
Arguments:
1
proposalId
Copied!
Returns
1
Length of votes polled for a proposal
Copied!

Solution Data

getOptionDetailsById1

1
proposalData.getOptionDetailsById1(proposalId,optionId,callback)
Copied!
Get proposal id, solution owner, solution id, solution description hash and date solution was added
Arguments:
1
proposalId,
2
optionId
Copied!
Returns
1
{
2
proposalId //Id of the proposal
3
solutionOwner //Address of solution owner
4
solutionId //Id of the solution
5
descriptionHash //IPFS hash solution description
6
dateAdd //Unix timestamp at which solution was added
7
}
Copied!

getOptionDetailsByAddress

1
proposalData.getOptionDetailsByAddress(proposalId,memberAddress,callback)
Copied!
Get proposal id, solution owner, solution id,solution description hash and date of solution by owner address
Arguments:
1
proposalId,
2
memberAddress
Copied!
Returns
1
Object of solution details
Copied!

getOptionDetailsByProposalId

1
proposalData.getOptionDetailsByProposalId(proposalId,optionId,callback)
Copied!
Get solution details with onchain and offchain action parameter values
Arguments:
1
proposalId,
2
optionId
Copied!
Returns
1
Object of solution details with action parameter values
Copied!

getOptionAddressByProposalId

1
proposalData.getOptionAddressByProposalId(proposalId,optionId,callback)
Copied!
Get address of option owner
Arguments:
1
proposalId,
2
optionId
Copied!
Returns
1
Solution owner address
Copied!
getOptionByVoteId
1
proposalData.getOptionByVoteId(voteId,callback)
Copied!
Get solution id of proposal by vote id
Arguments:
1
voteId
Copied!
Returns
1
Solution id
Copied!

getOptionDateAdded

1
proposalData.getOptionDateAdded(proposalId,optionId,callback)
Copied!
Get date at which solution was added
Arguments:
1
proposalId,
2
optionId
Copied!
Returns
1
Timestamp of solution added date
Copied!

getSolutionDataByProposalId

1
proposalData.getSolutionDataByProposalId(proposalId,optionId,callback)
Copied!
Get proposal Id, solution description, solution owner, solution added date
Arguments:
1
proposalId,
2
optionId
Copied!
Returns
1
Object of solution data
Copied!
Last modified 3yr ago
Copy link