ProtoconNet / mitum-dao

0 stars 0 forks source link

The state of the poposal doesn't change. #28

Open JustinInkyunPark opened 1 year ago

JustinInkyunPark commented 1 year ago

I created a DAO service by setting whitelist to false. The operation to change the governance policy was tested with transfer calldata because the 'wrong fact hash' error kept occurring.

The executable code is shown below.

const proposalId = "2VKEH78tLMJ";
const currencyID = "MCC";
const amount = 10000;
const calldata = functionCreateTransferCalldata(address1, address2, currencyID, amount);

// value configuration
const reviewTime = 180000;
const registrationPeriod = 180000;
const preSnapPeriod = 180000;
const votingPeriod = 180000;
const postSnapPeriod = 180000;
const executionDelay = 180000;

const startTime = Date.now() + 1000 * 60 * 2;
const proposalObj = mitum.dao.writeCryptoProposal(address3, startTime, calldata);
const rawOperation = mitum.dao.propose(address3, proposalId, proposalObj, currencyID);
const signedOperation = mitum.operation.sign(privatekey3, rawOperation);
const res = await mitum.operation.send(signedOperation);

I now have a response with a status of 200, and the operation ran fine.

I waited 3 minutes, then ran the code below to continue the query and wait again.

const info = await mitum.dao.getProposalInfo(serviceId, proposalId);
console.log(info);

However, the status of the proposal doesn't change from 0 over time.

{
  _hint: 'mitum-currency-hal-v0.0.1',
  _embedded: {
    _hint: 'mitum-dao-proposal-state-value-v0.0.1',
    status: 0,
    proposal: {
      _hint: 'mitum-dao-crypto-proposal-v0.0.1',
      proposer: '2gWeBMRnZ8kmwU7dvJgv3rHpui7ksHMRKLjJiPUsbBAAmca',
      start_time: 1690508119559,
      call_data: [Object]
    }
  },
  _links: {
    self: {
      href: '/dao/2VKEH78tLMJ71KXzYQUFej5LmwprqiRSC44E2ax2tn8Bmca/service/TEST03'
    }
  }
}
soonkuk commented 1 year ago

@JustinInkyunPark Have you resolved the issue that involves receiving the 'wrong fact hash' error?