getApproved(contract, proposalId, account)

Feature

Get information about the account set to “approved” during register.

Parameters

string contract address, string proposalId, string account

data of SucessResponse

object delegated Information

example

const contractAddress = "0x3FD3f21da255cbb8C2E76873EE6A3daC0cbc1b0Cfca";
const proposalID = "test_proposal";
const account = "0x893EEE05C6348516A583F02ccd1D065737261B53fca";

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

delegatorInfo();

// output
{
    _hint: "mitum-dao-delegator-info-v0.0.1",
    account: "0x893EEE05C6348516A583F02ccd1D065737261B53fca",
    approved: "0xE7221DE924c76C2F18B17a3345463dF3583580f0fca"
}

// if did not delegate voting right to other, account = approved
{
    _hint: "mitum-dao-delegator-info-v0.0.1",
    account: "0x893EEE05C6348516A583F02ccd1D065737261B53fca",
    approved: "0x893EEE05C6348516A583F02ccd1D065737261B53fca"
}

Last updated