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

Feature

Returns raw operation to transfer point from target to receiver.

Parameters

string contract address, string sender, string currency ID, string receiver, string target, string | int amount

Return Value

object transferFrom point operation

example

const contractAddress = "0x41EFb6902ADcb1214a7123b01af66b1D13b89864fca";
const sender = "0x4874C17C354c498cf44D2946612DBe47fBcE7E87fca";
const currencyID = "MCC"
const reciever = "0x07469989b2562afF5E5C3B116CD3AA5Ef814e5a1fca";
const target = "0xe1842cCaAf7Df28467ECFdFbD3bdB7de84dEDC3Dfca";
const amount = 100;

const Operation = mitum.point.transferFrom(contractAddress, sender, currencyID, reciever, target, amount);
console.log(Operation);

// output
BaseOperation {
  id: 'mitum',
  fact: TransferFromFact {
    hint: Hint { s: 'mitum-point-transfer-from-operation-fact' },
    token: Token { s: '2026-02-19 03:34:32.901 +0000 UTC' },
    _hash: <Buffer 39 e0 4c a5 04 c5 6c df 12 9e 38 38 68 03 c4 f7 50 50 f3 55 41 11 dc 2b 83 48 84 c3 57 6c 33 70>,
    sender: Address {
      s: '0x4874C17C354c498cf44D2946612DBe47fBcE7E87fca',
      type: 'mitum'
    },
    items: [ [TransferFromItem] ]
  },
  hint: Hint { s: 'mitum-point-transfer-from-operation' },
  _factSigns: [],
  _hash: <Buffer >
}

Last updated