⚠️ multiWithdraw(sender, target, currency, amount)

Feature

Return raw operation to withdraw from contract account with multi-item. Only owner of the contract accounts can execute the operation.

Parameters

string sender address, string[] array of target contract address, string currency ID, int[] array of amount to withdraw from each contract account

Return Value

object withdraw operation with multi item

example

const sender = "0x4526f3D0EdC63D9EaeCD94D56551e0f061CFCa47fca";
const target = ["0x2F45f1AD55E809629F36BDb0677C61c82539D258fca" "0x626410F061e62d79294f82603b872Db7d1711Bf7fca"];
const currencyID = "MCC";
const amount = [200, 400];

const rawOperation = mitum.currency.multiWithdraw(sender, target, currencyID, amount);
console.log(rawOperation);

// output
Operation {
  id: 'mitum',
  fact: WithdrawFact {
    hint: Hint { s: 'mitum-extension-withdraw-operation-fact' },
    token: Token { s: '2025-01-14 02:10:31.406 +0000 UTC' },
    _hash: <Buffer 62 b4 e6 46 8c c4 92 94 ae f3 fc 8d 07 da b1 85 2f 8a ca 3b 6a 9d 85 6b d8 bc c5 76 d4 7f 76 24>,
    sender: Address {
      s: '0x4526f3D0EdC63D9EaeCD94D56551e0f061CFCa47fca',
      type: 'mitum'
    },
    items: [ [WithdrawItem], [WithdrawItem] ]
  },
  hint: Hint { s: 'mitum-extension-withdraw-operation' },
  _factSigns: [],
  _hash: <Buffer >
}

Last updated