transferByPartition(contract, sender, holder, receiver, partition, amount, currency)

Feature

Returns raw operation that transfer security token by partition. Note : Only contract’s owner (or operator) and authorized STO operator can execute the function. Contract’s owner (or operator) can transfer other people's tokens, and the STO operators can transfer their own tokens.

Parameters

string contract address,

string sender, string holder, string receiver, string partition, integer amount, string currency

Return Value

object transferOperation

example

const contractAddress = "0x41EFb6902ADcb1214a7123b01af66b1D13b89864fca";
const sender = "0x4874C17C354c498cf44D2946612DBe47fBcE7E87fca";
const holder = "0x07469989b2562afF5E5C3B116CD3AA5Ef814e5a1fca";
const receiver = "0xe1842cCaAf7Df28467ECFdFbD3bdB7de84dEDC3Dfca";
const partition = "ABCD";
const amount = "3000";
const currencyID = "MCC";

const transferOperation = mitum.sto.transferByPartition(contractAddress, sender, holder, receiver, partition, amount, currencyID);
console.log(transferOperation);

//output
Operation {
  id: 'mitum',
  fact: TransferSecurityTokenPartitionFact {
    hint: Hint { s: 'mitum-sto-transfer-by-partition-operation-fact' },
    token: Token { s: '2023-11-23 05:28:13.838 +0000 UTC' },
    _hash: <Buffer 31 35 4f e6 0c eb 60 88 48 53 96 20 f4 14 06 0e ee b6 a3 aa 9d 7a 4b 28 84 ab c6 ed f1 56 5c da>,
    sender: Address {
      s: '0x4874C17C354c498cf44D2946612DBe47fBcE7E87fca',
      type: 'mitum'
    },
    items: [ [TransferSecurityTokenPartitionItem] ]
  },
  hint: Hint { s: 'mitum-sto-transfer-by-partition-operation' },
  _factSigns: [],
  _hash: <Buffer >
}

Last updated