contract.updateRecipient(sender, contract, currencyID, recipients)
Feature
Return raw operation to update recipients of the contract.
Used to register and update recipients in the CA used as proxy_payer.
Note: Only the owner of the contract account can execute the operation.
Parameters
string sender address,
string contract address,
string currency ID,
string[] recipients // The length of a can be from 0 to 20.
Return Value
object update recipient operation
example
const sender = "0x4526f3D0EdC63D9EaeCD94D56551e0f061CFCa47fca";
const contract = '0xf19B03f1523aEab2902D0e17C8112fEe084c0087fca';
const currencyID = "MCC";
const recipients = ["0x15BA88c34E4F4D917E48FCDC838f9f41027cabA7fca"];
const op = mitum.contract.updateRecipient(sender, contract, currencyID, recipients);
console.log(op)
// output
Operation {
id: 'mitum',
fact: UpdateRecipientFact {
hint: Hint { s: 'mitum-extension-update-recipient-operation-fact' },
token: Token { s: '2024-12-06 07:23:14.564 +0000 UTC' },
_hash: <Buffer 57 1b 43 bb 32 ee c2 c1 76 44 27 00 cc 61 24 11 00 35 a1 48 4f ac a9 69 2c 75 2f f2 9d 4a 92 52>,
sender: Address {
s: '0x4526f3D0EdC63D9EaeCD94D56551e0f061CFCa47fca',
type: 'mitum'
},
contract: Address {
s: '0xf19B03f1523aEab2902D0e17C8112fEe084c0087fca',
type: 'mitum'
},
currency: CurrencyID { s: 'MCC' },
recipients: [ [Address] ]
},
hint: Hint { s: 'mitum-extension-update-recipient-operation' },
_factSigns: [],
_hash: <Buffer >
}Last updated