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.token.transferFrom(contractAddress, sender, currencyID, reciever, target, amount);
console.log(Operation);
// output
Operation {
id: 'mitum',
fact: TransferFromFact {
hint: Hint { s: 'mitum-token-transfer-from-operation-fact' },
token: Token { s: '2024-05-20 08:41:50.029 +0000 UTC' },
_hash: <Buffer 76 b9 95 fc 1f 36 b0 6f 86 31 c6 a9 c8 33 d4 5b ea a4 ad f4 91 b3 e9 31 a6 f9 11 11 03 b2 3c dc>,
sender: Address {
s: '0x4874C17C354c498cf44D2946612DBe47fBcE7E87fca',
type: 'mitum'
},
contract: Address {
s: '0x41EFb6902ADcb1214a7123b01af66b1D13b89864fca',
type: 'mitum'
},
currency: CurrencyID { s: 'MCC' },
receiver: Address {
s: '0x07469989b2562afF5E5C3B116CD3AA5Ef814e5a1fca',
type: 'mitum'
},
target: Address {
s: '0xe1842cCaAf7Df28467ECFdFbD3bdB7de84dEDC3Dfca',
type: 'mitum'
},
amount: Big { big: 100n }
},
hint: Hint { s: 'mitum-token-transfer-from-operation' },
_factSigns: [],
_hash: <Buffer >
}
Last updated