DexFactoryAuth ​
Inherits:DexFactoryCore
Implements Dex Factory auth-only callable methods. Owner / auths can set various config values and can define the allow-listed deployers.
Functions ​
setDeployer ​
Sets an address (deployer_) as allowed deployer or not. This function can only be called by the owner.
function setDeployer(address deployer_, bool allowed_) external onlyOwner validAddress(deployer_);Parameters
| Name | Type | Description |
|---|---|---|
deployer_ | address | The address to be set as deployer. |
allowed_ | bool | A boolean indicating whether the specified address is allowed to deploy dexes. |
setGlobalAuth ​
Sets an address (globalAuth_) as a global authorization or not. This function can only be called by the owner.
function setGlobalAuth(address globalAuth_, bool allowed_) external onlyOwner validAddress(globalAuth_);Parameters
| Name | Type | Description |
|---|---|---|
globalAuth_ | address | The address to be set as global authorization. |
allowed_ | bool | A boolean indicating whether the specified address is allowed to update any dex config. |
setDexAuth ​
Sets an address (dexAuth_) as allowed dex authorization or not for a specific dex (dex_). This function can only be called by the owner.
function setDexAuth(address dex_, address dexAuth_, bool allowed_) external onlyOwner validAddress(dexAuth_);Parameters
| Name | Type | Description |
|---|---|---|
dex_ | address | The address of the dex for which the authorization is being set. |
dexAuth_ | address | The address to be set as dex authorization. |
allowed_ | bool | A boolean indicating whether the specified address is allowed to update the specific dex config. |
setDexDeploymentLogic ​
Sets an address as allowed dex deployment logic (deploymentLogic_) contract or not. This function can only be called by the owner.
function setDexDeploymentLogic(address deploymentLogic_, bool allowed_)
public
onlyOwner
validAddress(deploymentLogic_);Parameters
| Name | Type | Description |
|---|---|---|
deploymentLogic_ | address | The address of the dex deployment logic contract to be set. |
allowed_ | bool | A boolean indicating whether the specified address is allowed to deploy new type of dex. |
spell ​
Spell allows owner aka governance to do any arbitrary call on factory
function spell(address target_, bytes memory data_) external onlyOwner returns (bytes memory response_);Parameters
| Name | Type | Description |
|---|---|---|
target_ | address | Address to which the call needs to be delegated |
data_ | bytes | Data to execute at the delegated address |
isDeployer ​
Checks if the provided address (deployer_) is authorized as a deployer.
function isDeployer(address deployer_) public view returns (bool);Parameters
| Name | Type | Description |
|---|---|---|
deployer_ | address | The address to be checked for deployer authorization. |
Returns
| Name | Type | Description |
|---|---|---|
<none> | bool | Returns true if the address is a deployer, otherwise false. |
isGlobalAuth ​
Checks if the provided address (globalAuth_) has global dex authorization privileges.
function isGlobalAuth(address globalAuth_) public view returns (bool);Parameters
| Name | Type | Description |
|---|---|---|
globalAuth_ | address | The address to be checked for global authorization privileges. |
Returns
| Name | Type | Description |
|---|---|---|
<none> | bool | Returns true if the given address has global authorization privileges, otherwise false. |
isDexAuth ​
Checks if the provided address (dexAuth_) has dex authorization privileges for the specified dex (dex_).
function isDexAuth(address dex_, address dexAuth_) public view returns (bool);Parameters
| Name | Type | Description |
|---|---|---|
dex_ | address | The address of the dex to check. |
dexAuth_ | address | The address to be checked for dex authorization privileges. |
Returns
| Name | Type | Description |
|---|---|---|
<none> | bool | Returns true if the given address has dex authorization privileges for the specified dex, otherwise false. |
isDexDeploymentLogic ​
Checks if the provided (dexDeploymentLogic_) address has authorization for dex deployment.
function isDexDeploymentLogic(address dexDeploymentLogic_) public view returns (bool);Parameters
| Name | Type | Description |
|---|---|---|
dexDeploymentLogic_ | address | The address of the dex deploy logic to check for authorization privileges. |
Returns
| Name | Type | Description |
|---|---|---|
<none> | bool | Returns true if the given address has authorization privileges for dex deployment, otherwise false. |

