getProposal(contract, proposalID)

Feature

Get information about specific proposal with given proposal ID. Proposal status : Proposed (0), Canceled (1), PreSnapped (2), PostSnapped (3), Completed (4), Rejected (5), Executed (6), NilStatus (7) Note : Proposal status does not automatically update over time. It is updated when the next step action request comes in.

Parameters

string contract address, string proposal ID

data of SucessResponse

object proposal Info

example

const contractAddress = "0x41EFb6902ADcb1214a7123b01af66b1D13b89864fca";
const proposalID = "test_proposal2";

// Note: an asynchronous request.
const proposalInfo = async () => {
    const info = await mitum.dao.getProposal(contractAddress, proposalID);
    console.log(info.data);
};
proposalInfo();

// output
{
    _hint: "mitum-dao-proposal-state-value-v0.0.1",
    status: 0,
    reason: "proposed",
    proposal: {
        _hint: "mitum-dao-biz-proposal-v0.0.1",
        proposer: "0x893EEE05C6348516A583F02ccd1D065737261B53fca",
        start_time: 1718936039,
        url: "www.myproposal.com",
        hash: "381yXYxtWCavzPxeUXRewT412gbLt2hx7VanKazkBrsnyfPPBdXfoG52Yb2wkF8vC3KJyoWgETpsN6k97mQ8tUXr1CmTedcj",
        options: 2
    },
    policy: {
        _hint: "mitum-dao-policy-v0.0.1",
        voting_power_token: "MIT",
        threshold: "1000",
        proposal_fee: {
            amount: "10",
            currency: "MIT",
            _hint: "mitum-currency-amount-v0.0.1"
        },
        proposer_whitelist: {
            _hint: "mitum-dao-whitelist-v0.0.1",
            active: true,
            accounts: [
                0x893EEE05C6348516A583F02ccd1D065737261B53fca"
            ]
        },
        proposal_review_period: 30,
        registration_period: 30,
        pre_snapshot_period: 30,
        voting_period: 30,
        post_snapshot_period: 30,
        execution_delay_period: 30,
        turnout: 1,
        quorum: 1
    }
}

Last updated