multiTransferFrom(contract, sender, currency, receiver, target, amount)

Feature

Returns raw operation to transfer token from target to receiver with multi items

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 receive, string[] array of target account’s address, string[] | int[] array of amount to transfer

Return Value

object transferFrom token operation with multi item

example1. transfer token to account(0x40…) from target(0x4F), account(0xC7…) from target(0x11…)

const contract = "0x04adb9825E50940E0722E795565a4f869e469005fca";
const sender = "0xF1858E0F9921ae2F1001F9B9132eFa15201E0318fca";
const currencyID = "MCC";
const receiver = ["0x403683b62188B7bbBdFF6668e1e04e5e48cc9b05fca", "0xC7b22225DDBD8af09f3c635C3b6b8300beaBa041fca"];
const target = ["0x4FbB44ddcD51a027849F3D23D7E2F15D0Bf1060efca", "0x1114B419Deb89ABA8cb6da2D12FE796217213a0efca"];
const amount = [100, 4000]

const Operation = mitum.token.multiTransferFrom(contract, sender, currencyID, receiver, target, amount);
console.log(Operation);

// output
BaseOperation {
  id: 'mitum',
  fact: TransferFromFact {
    hint: Hint { s: 'mitum-token-transfer-from-operation-fact' },
    token: Token { s: '2026-02-19 03:15:23.484 +0000 UTC' },
    _hash: <Buffer 4f cf 24 9b 65 0f 08 1f 90 05 b6 16 1e 6b 0c b0 8a 8a 94 3c 04 b2 88 48 7d d3 a6 77 bb 80 6f 42>,
    sender: Address {
      s: '0xF1858E0F9921ae2F1001F9B9132eFa15201E0318fca',
      type: 'mitum'
    },
    items: [ [TransferFromItem], [TransferFromItem] ]
  },
  hint: Hint { s: 'mitum-token-transfer-from-operation' },
  _factSigns: [],
  _hash: <Buffer >
}

example2. transfer token on the contract(0x04…) and contract(0x1e…) to account(0x40…) from target(0x4F…)

Last updated