Wildcat Protocol Documentation
  • The Wildcat Protocol
  • Overview
    • The Elevator Pitch
    • Whitepaper
    • FAQs
  • Using Wildcat
    • Terminology
    • Onboarding
    • Day-To-Day Usage
      • Borrowers
      • Lenders
      • Market Access Via Policies/Hooks
      • The Sentinel
    • Protocol Usage Fees
    • Delinquency
  • Technical Overview
    • Security/Developer Dives
      • The Scale Factor
      • Core Behaviour
      • V1 -> V2 Changelog
      • Known Issues
      • Hooks
        • How Hooks Work
        • Access Control Hooks
        • Fixed Term Loan Hooks
    • Function/Event Signatures
      • /access
        • AccessControlHooks.sol
        • IRoleProvider.sol
        • MarketConstraintHooks.sol
      • /interfaces
        • IHooks.sol
        • IMarketEventsAndErrors.sol
        • IWildcatArchController.sol
        • IWildcatSanctionsEscrow.sol
        • IWildcatSanctionsSentinel.sol
      • /market
        • WildcatMarketConfig.sol
        • WildcatMarketToken.sol
        • WildcatMarketWithdrawals.sol
        • WildcatMarketBase.sol
      • /spherex
        • ISphereXEngine.sol
        • ISphereXProtectedRegisteredBase.sol
        • SphereXConfig.sol
      • HooksFactory.sol
      • IHooksFactory.sol
      • WildcatArchController.sol
      • WildcatSanctionsEscrow.sol
      • WildcatSanctionsSentinel.sol
    • Protocol Structs
    • Contract Deployments
  • Security Measures
    • Code Security Reviews
    • SphereX Protection
    • Bug Bounty Program
  • Legal
    • Wildcat Terms Of Use
    • Risk Disclosure Statement
    • Template MLA
    • Privacy Policy
Powered by GitBook
On this page
  1. Miscellaneous
  2. DEPRECATED DOCUMENTATION
  3. V1 Component Overview

WildcatArchController.sol

The WildcatArchcontroller is the contract that determines which addresses are capable of deploying controllers (and thereafter markets through these controllers).

Controllers must be deployed through a controller factory, which must be registered with the archcontroller.

The addresses of all deployed controllers, factories and markets are logged by the archcontroller in its capacity as a registry: these are used for access control.

registerBorrower

function registerBorrower(address borrower)
  external onlyOwner;

Permits a borrower address to deploy controllers and markets.

Reverts if:

  • Not called by the owner of the archcontroller.

Events:

  • BorrowerAdded

removeBorrower

function removeBorrower(address borrower)
  external onlyOwner; 

Prevents a borrower address from deploying any further controllers or markets.

Reverts if:

  • Not called by the owner of the archcontroller.

Events:

  • BorrowerRemoved

isRegisteredBorrower

function isRegisteredBorrower(address borrower)
  external view returns (bool);

Boolean lookup for whether an address is currently a registered borrower.

getRegisteredBorrowers

function getRegisteredBorrowers() 
   external view returns (address[] memory);

function getRegisteredBorrowers(
    uint256 start,
    uint256 end
  ) external view returns (address[] memory arr);

Returns either the entire array of currently registered borrower addresses, or a slice of the array given start and end indices.

registerControllerFactory

function registerControllerFactory(address factory)
  external onlyOwner;

Registers a new market controller factory smart contract, allowing borrowers to deploy new controllers and markets through it.

Reverts if:

  • The controller factory has already been registered.

Events:

  • ControllerFactoryAdded

removeControllerFactory

function removeControllerFactory(address factory)
  external onlyOwner

Removes a market controller factory, preventing borrowers from deploying any further controllers and markets through it.

Reverts if:

  • The controller factory address does not exist or has been removed.

Events:

  • ControllerFactoryRemoved

isRegisteredControllerFactory

function isRegisteredControllerFactory(address factory)
  external view returns (bool)

getRegisteredControllerFactories

function getRegisteredControllerFactories()
  external view returns (address[] memory);
  
function getRegisteredControllerFactories(
    uint256 start,
    uint256 end
  ) external view returns (address[] memory arr);

getRegisteredControllerFactoriesCount

function getRegisteredControllerFactoriesCount()
  external view returns (uint256);

registerController

function registerController(address controller)
  external onlyControllerFactory;

removeController

function removeController(address controller)
  external onlyOwner;

isRegisteredController

function isRegisteredController(address controller)
  external view returns (bool);

getRegisteredControllers

 function getRegisteredControllers()
   external view returns (address[] memory);
   
 function getRegisteredControllers(
    uint256 start,
    uint256 end
  ) external view returns (address[] memory arr);

getRegisteredControllersCount

 function getRegisteredControllersCount()
   external view returns (uint256);

registerMarket

 function registerMarket(address market)
   external onlyController;

removeMarket

function removeMarket(address market)
  external onlyOwner;

isRegisteredMarket

function isRegisteredMarket(address market)
  external view returns (bool);

getRegisteredMarkets

 function getRegisteredMarkets()
   external view returns (address[] memory);
 
 function getRegisteredMarkets(
    uint256 start,
    uint256 end
  ) external view returns (address[] memory arr);

getRegisteredMarketsCount

 function getRegisteredMarketsCount()
   external view returns (uint256);

Last updated 1 year ago