Operator in CIS-2

As Im looking into CIS-2 WCCD example I found their is operator I didn’t find out what is the purpose of operator and why we are using it can some one explain me It would be very helpful

The purpose of the operator is that an owner of a token gives permission to somebody else to act on their behalf, e.g., to transfer the token on their behalf. This can be used, for example, by an exchange or marketplace.

Note that an operator is entirely optional, and if you do not wish to use it you do not have to.

See CIS-2: Concordium Token Standard 2 - Interoperability Specifications

2 Likes

And what about implementers its also in standard

What do you mean by “implementers”?

these implementors in cis2

 fn have_implementors(&self, std_id: &StandardIdentifierOwned) -> SupportResult {
        if let Some(addresses) = self.implementors.get(std_id) {
            SupportResult::SupportBy(addresses.to_vec())
        } else {
            SupportResult::NoSupport
        }
    }

    /// Set implementors for a given standard.
    fn set_implementors(
        &mut self,
        std_id: StandardIdentifierOwned,
        implementors: Vec<ContractAddress>,
    ) {
        self.implementors.insert(std_id, implementors);
    }

Oh I see.

That is a notion from the CIS0 standard which allows for discoverability. You can see how this is used in the contract_supports function. The idea is that either the contract itself can support a standard, or alternatively it can point to another contract that implements the required interface. That is called an “implementor” for that specific interface. Does that make sense?

Yes thank you so much