multiApprove(contract, sender, currency, approved, amount)

Feature

Returns raw operation to approve point with multi item. Note: If you want to cancel the approve operation, execute approve function again with amount : 0.

Parameters

string | string[] contract address, // If given a string, it is automatically converted to an array filled with the same values. string sender, string currency ID, string[] array of account’s address to approve, string[] | int[] array of amount to approve

Return Value

object approve point operation with multi item

example1. approve point to account(0x40…), account(0xC7…)

const contract = "0x04adb9825E50940E0722E795565a4f869e469005fca";
const sender = "0xF1858E0F9921ae2F1001F9B9132eFa15201E0318fca";
const currencyID = "MCC";
const approved = ["0x403683b62188B7bbBdFF6668e1e04e5e48cc9b05fca", "0xC7b22225DDBD8af09f3c635C3b6b8300beaBa041fca"];
const amount = [100, 4000]

const Operation = mitum.point.multiApprove(contract, sender, currencyID, approved, amount);
console.log(Operation);

// output
BaseOperation {
  id: 'mitum',
  fact: ApproveFact {
    hint: Hint { s: 'mitum-point-approve-operation-fact' },
    token: Token { s: '2026-02-19 03:26:39.572 +0000 UTC' },
    _hash: <Buffer d2 f9 ff b1 eb 10 86 bf 94 be 07 89 14 38 bb ed c8 11 3b 90 f6 0f 0f ec f7 5b 16 f9 61 dd ce 9a>,
    sender: Address {
      s: '0xF1858E0F9921ae2F1001F9B9132eFa15201E0318fca',
      type: 'mitum'
    },
    items: [ [ApproveItem], [ApproveItem] ]
  },
  hint: Hint { s: 'mitum-point-approve-operation' },
  _factSigns: [],
  _hash: <Buffer >
}

example2. approve point on the contract(0x04…) and contract(0x1e…) to account(0x40…)

Last updated