preSnap(contract, sender, proposalID, currency)

Feature

Return raw operation to check voting power of the account that participated in the registration. Can use it only within the ‘PreSnapshotPeriod’, anyone can execute. Notes: If the registration participation rate does not exceed turnout, the proposal is automatically canceled. Must execute only once.

Parameters

string contract address, string sender, string proposal ID, string currency ID

Return Value

object snap operation

example

const contractAddress = "0x41EFb6902ADcb1214a7123b01af66b1D13b89864fca";
const sender = "0x4874C17C354c498cf44D2946612DBe47fBcE7E87fca";
const proposalID = "test_proposal";
const currencyID = "MCC";
const snapOperation = mitum.dao.preSnap(contractAddress, sender, proposalID, currencyID);

console.log(snapOperation)

// output
Operation {
  id: 'mitum',
  fact: PreSnapFact {
    hint: Hint { s: 'mitum-dao-pre-snap-operation-fact' },
    token: Token { s: '2023-10-18 06:03:00.136 +0000 UTC' },
    _hash: <Buffer f9 17 1a 21 fc 1f 5f cc 12 1d 34 68 46 4c c5 a1 10 87 60 e0 f4 9b 8f df 72 8c ad c8 eb de c9 9e>,
    sender: Address {
      s: '0x4874C17C354c498cf44D2946612DBe47fBcE7E87fca',
      type: 'mitum'
    },
    contract: Address {
      s: '0x41EFb6902ADcb1214a7123b01af66b1D13b89864fca',
      type: 'mitum'
    },
    currency: CurrencyID { s: 'MCC' },
    proposalID: 'test_proposal'
  },
  hint: Hint { s: 'mitum-dao-pre-snap-operation' },
  _factSigns: [],
  _hash: <Buffer >
}

Last updated