Skip to content

Error : dao's state & whitelist's authority for 'CreateDAOFact' #24

@JustinInkyunPark

Description

@JustinInkyunPark

There are two issues with CreateDAOFact.
...this prevents propose from running, and I can't proceed with the test any further.

  1. If I run the operation with the structure for creating 'DAO service' as a parameter, I can see that it was successfully executed with status 200.
    However, if i use the digest API to retrieve the service information, the value of 'post_snapshot_period' continues to be 0 as shown below.
  const option01 = "crypto";
  const option02 = "biz";
  const option03 = "any"; // must throw error
  const voteToken = "MCC";
  const threshold = 50001;
  const fee = 100;
  const proposers = [a1, a2, a3];
  const waitingTime = 180000;
  const registrationPeriod = 180000;
  const preSnapPeriod = 180000;
  const votingPeriod = 180000;
  const postSnapPeriod = 180000;
  const executionDelay = 180000;
  const turnout = 33;
  const quorum = 50;
  const daoData = {
    serviceId: "TEST02",
    option: option01,
    voteToken: voteToken,
    threshold: threshold,
    fee: fee,
    proposers: proposers,
    waitingTime: waitingTime,
    registrationPeriod: registrationPeriod,
    preSnapPeriod: preSnapPeriod,
    votingPeriod: votingPeriod,
    postSnapPeriod: postSnapPeriod,
    executionDelay: executionDelay,
    turnout: turnout,
    quorum: quorum,
  };
  const o = mitum.dao.createDAOService(a1, daoData, currencyID);
  const s = mitum.operation.sign(pv1, o);
  const res = await mitum.operation.send(s);

digest api

{
    "_hint": "mitum-currency-hal-v0.0.1",
    "_embedded": {
        "_hint": "mitum-dao-design-v0.0.1",
        "option": "crypto",
        "dao_id": "TEST02",
        "policy": {
            "_hint": "mitum-dao-policy-v0.0.1",
            "token": "MCC",
            "threshold": {
                "amount": "50001",
                "currency": "MCC",
                "_hint": "mitum-currency-amount-v0.0.1"
            },
            "fee": {
                "amount": "100",
                "currency": "MCC",
                "_hint": "mitum-currency-amount-v0.0.1"
            },
            "whitelist": {
                "_hint": "mitum-dao-whitelist-v0.0.1",
                "active": true,
                "accounts": [
                    "2gWeBMRnZ8kmwU7dvJgv3rHpui7ksHMRKLjJiPUsbBAAmca",
                    "3a9ooHpDo2MTLcNS6MJKjFeYv59zFyfzm6f3cVVihBZTmca",
                    "5zPANS8TqGwvVh1bghiFQpX2v4GqPsW2Rx1xtonNPMsSmca"
                ]
            },
            "proposal_review_period": 180000,
            "registration_period": 180000,
            "pre_snapshot_period": 180000,
            "voting_period": 180000,
            "post_snapshot_period": 0,
            "execution_delay_period": 180000,
            "turnout": 33,
            "quorum": 50
        }
    },
    "_links": {
        "self": {
            "href": "/dao/2VKEH78tLMJ71KXzYQUFej5LmwprqiRSC44E2ax2tn8Bmca/service/TEST02"
        }
    }
}
  1. Also, in the case of the whitelist that can propose, an error occurs when executing propose, even though the account "5zPANS8TqGwvVh1bghiFQpX2v4GqPsW2Rx1xtonNPMsSmca" is included, as shown below.
Error: handle new operation; sender not in whitelist, "5zPANS8TqGwvVh1bghiFQpX2v4GqPsW2Rx1xtonNPMsSmca"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions