authorizeOperator(contract, sender, operator, partition, currency)
Feature
Returns raw operation that authorize the operator. Note : Only contract’s owner (or operator) and authorized STO operator can execute the function. The executor must own the token for that partition.
Parameters
string
contract address,
string
sender,
string
operator,
string
partition,
string
currency
Return Value
object
authorizeOperation
example
const contractAddress = "0x41EFb6902ADcb1214a7123b01af66b1D13b89864fca";
const sender = "0x4874C17C354c498cf44D2946612DBe47fBcE7E87fca";
const operator = "0x07469989b2562afF5E5C3B116CD3AA5Ef814e5a1fca";
const partition = "ABCD";
const currencyID = "MCC";
const authorizeOperation = mitum.sto.authorizeOperator(contractAddress, sender, operator, partition, currencyID);
console.log(authorizeOperation);
//output
Operation {
id: 'mitum',
fact: AuthorizeOperatorFact {
hint: Hint { s: 'mitum-sto-authorize-operator-operation-fact' },
token: Token { s: '2023-11-23 04:50:12.744 +0000 UTC' },
_hash: <Buffer 96 2e 26 40 aa 70 82 4d af d8 70 f4 04 21 63 35 cf 80 53 19 ec b5 64 73 de 73 d7 56 ec c2 0d 0f>,
sender: Address {
s: '0x4874C17C354c498cf44D2946612DBe47fBcE7E87fca',
type: 'mitum'
},
items: [ [AuthorizeOperatorItem] ]
},
hint: Hint { s: 'mitum-sto-authorize-operator-operation' },
_factSigns: [],
_hash: <Buffer >
}
PreviousgetBalanceByHolder(contract, holder, partition)NextgetOperatorsByHolder(contract, holder, partition)
Last updated