Mimic Docs
Search
K

Registry

The Registry contract is a key component of the Mimic protocol, providing a centralized registry for storing and managing various implementations related to the protocol. It serves as a central authority for maintaining the list of curated implementations and versions that can be trusted by the Mimic ecosystem.
This component is not deployed per user, it is shared among all Mimic users. Even though this acts a the single source of truth for different implementations like the Smart Vault, Connectors, Price Oracle, and Tasks, and the different versions of them, users are allowed to by-pass any of the protocol checks in case they want to use custom components.
The contract code of the Registry can be found here.

Functionality

Create

This function allows the Mimic team to deploy an implementation using the CREATE3 pattern to make sure it can have the same address in all the supported chains.
/**
* @dev Creates and registers an implementation
* @param name Name of the implementation
* @param code Code of the implementation to create and register
* @param stateless Whether the new implementation is considered stateless or not
*/
function create(string memory name, bytes memory code, bool stateless) external;

Register

This function allows the Mimic team to register an implementation in the Mimic Registry.
/**
* @dev Registers an implementation
* @param name Name of the implementation
* @param implementation Address of the implementation to be registered
* @param stateless Whether the given implementation is considered stateless or not
*/
function register(string memory name, address implementation, bool stateless) external;

Deprecate

This function allows the Mimic team to deprecate any existing implementation.
/**
* @dev Deprecates an implementation
* @param implementation Address of the implementation to be deprecated
*/
function deprecate(address implementation) external;