execute(contract, sender, proposalID, currency)

Feature

Returns an operation that executes the proposal that won the vote. Can use it only within the ‘Execution period’, anyone can execute Notes: Proposal execution is not possible until the 'execution delay time' (timelock) has passed.

Parameters

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

Return Value

object execute operation

example

const contractAddress = "0x41EFb6902ADcb1214a7123b01af66b1D13b89864fca";
const sender = "0x4874C17C354c498cf44D2946612DBe47fBcE7E87fca";
const proposalID = "test_proposal";
const currencyID = "MCC";

const executeOperation = mitum.dao.execute(contractAddress, sender, proposalID, currencyID);
console.log(executeOperation);

// output
Operation {
  id: 'mitum',
  fact: ExecuteFact {
    hint: Hint { s: 'mitum-dao-execute-operation-fact' },
    token: Token { s: '2023-10-18 06:20:09.278 +0000 UTC' },
    _hash: <Buffer >,
    sender: Address {
      s: '0x4874C17C354c498cf44D2946612DBe47fBcE7E87fca',
      type: 'mitum'
    },
    contract: Address {
      s: '0x41EFb6902ADcb1214a7123b01af66b1D13b89864fca',
      type: 'mitum'
    },
    currency: CurrencyID { s: 'MCC' },
    proposalID: 'test_proposal'
  },
  hint: Hint { s: 'mitum-dao-execute-operation' },
  _factSigns: [],
  _hash: <Buffer >
}

Last updated