Operator

What everyone needs to know

  • An operator is an address that has been given permission to take one or more actions on another address's behalf.

  • Several functions are only available to a project's owner, or to an operator address that the project's owner has set.

  • Operator permissions are stored and managed in theSNOWOperatorStore, where they can be added or revoked at any time by the address being operated on behalf of.

  • Operator permissions are expressed in terms of indexes defined in SNOWOperations.

  • Operator permissions apply to a specific domain namespace, which is used in the Snowcone ecosystem to allow addresses to give permissions that only apply to a specific project (where the domain is the project's ID). A domain of 0 is a wildcard domain, giving an operator access to an action across all domains.

What you'll want to know if you're building

  • All permission indexes can be found inSNOWOperations.

  • Any address can give an operator permissions to take one or more actions on its behalf by sending a transaction to SNOWOperatorStore.setOperator(...). To set multiple operators in the same transaction, use SNOWOperatorStore.setOperators(...).

  • Access can be revoked from an operator through the same operations as above by sending an array of permissions that does not include those you wish to revoke.

  • Permission for each operation is stored in a bit within an uint256. If the bit is 1, the permission is enabled for the particular operator within the particular domain. Otherwise it is disabled.

  • SNOWOperatorStore.hasPermission(...) and SNOWOperatorStore.hasPermissions(...)can be used to check if an operator has a particular permission.

Operatable functionality

For each project, the following functions can only be accessed by either the address that owns the project's NFT or by operator addresses explicitly allowed by the address that owns the project's NFT. Operators are only valid in the context of a particular owner – if the NFT changes hands, the operators for the project must be set again by the new owner.

An address can set operators for its project with SNOWOperatorStore.setOperator(...), using the indexes from the SNOWOperations library. An Operator's permissions depend on the specific parameters the admin allows them. Each of the following functions can be called by the admin, and also by any operator that has been granted permission to call the function by the admin.

  • SNOWController.launchFundingCyclesFor(...)

  • SNOWController.reconfigureFundingCyclesOf(...)

  • SNOWController.mintTokensOf(...)

  • SNOWTokenStore.issueFor(...)

  • SNOWController.setFor(...)

  • SNOWController.migrate(...)

  • SNOWPayoutRedemptionPaymentTerminal.useAllowanceOf(...)

  • SNOWPayoutRedemptionPaymentTerminal.migrate(...)

  • SNOWPayoutRedemptionPaymentTerminal.processFees(...)

  • SNOWProjects.setMetadataOf(...)

  • SNOWSplitsStore.set(...)

  • SNOWDirectory.setControllerOf(...)

  • SNOWDirectory.setTerminalsOf(...)

  • SNOWDirectory.setPrimaryTerminalOf(...)

The following transactions can be used by token holders or operator addresses explicitly allowed by the address that owns the tokens. If the tokens change hands, the operators must be set again by the new holder.

  • SNOWController.burnTokensOf(...)

  • SNOWPayoutRedemptionPaymentTerminal.redeemTokensOf(...)

  • SNOWTokenStore.claimFor(...)

  • SNOWTokenStore.transferFrom(...)

Last updated

SnowconeDAO