update_operators
type token_id_type is nat
type operator_type is [@layout:comb] record [
owner : address;
operator : address;
token_id : token_id_type;
]
type upd_operator_type is
| Add_operator of operator_type
| Remove_operator of operator_type
type update_ops_type is list(upd_operator_type)
Field | Type | Description |
---|---|---|
owner | address | Owner of tokens |
operator | address | Operator of tokens |
token_id | token_id_type | Token ID |
🌮 Taquito
const tFarmAddress = "KT1...";
const params = [
{
add_operator: {
owner: "tz1.../KT1...",
operator: "tz1.../KT1...",
token_id: 0,
},
},
{
remove_operator: {
owner: "tz1.../KT1...",
operator: "tz1.../KT1...",
token_id: 1,
},
},
...
];
const tFarm = await tezos.contract.at(tFarmAddress);
const operation = await tFarm.methods.update_operators(params).send();
await operation.confirmation();
FA2_NOT_OWNER
-sender
is notowner
of account.
Last modified 1yr ago