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

@abizjak where do I find that in the docs? It is not at CIS-0: Standard Detection - Interoperability Specifications AFAICS

I’m not sure what specifically you mean. Can you elaborate?

I do not find the details regarding implementors in the CIS-0 standard documentation.

I am not sure which detail you are still missing.

CIS0 simply specifies a way of querying whether a contract supports some other standard. The response to this question is either

  • no
  • yes
  • yes, but via this other contract address.

This is detailed in the response description CIS-0: Standard Detection - Interoperability Specifications

CIS0 does not specify more than this.

1 Like

Ok, I understand. Thanks!