Security
The DCA Contract rely on a mix of access control contracts. Derived from the renouned Ownable contract standard, we have created a range of access levels to allow for trustless execution and maintanance.
For a users account we impliment 1 security control contract, OnlyExecutor. This allows the user to control the address of the executor of witch will call the functions in the Account. This level also inherits Ownable, tieing the users address to the account.
OnlyExecutor
changeExecutor
function changeExecutor(address executorAddress_) external nonpayableParameters
| Name | Type | Description |
|---|---|---|
| executorAddress_ | address | New address of the Executor to be set |
getExecutorAddress
function getExecutorAddress() external view returns (address)Returns the executor address
Returns
| Name | Type | Description |
|---|---|---|
| _0 | address | The executor address |
owner
function owner() external view returns (address)Returns the address of the current owner.
Returns
| Name | Type | Description |
|---|---|---|
| _0 | address | owner of the contract |
removeExecutor
function removeExecutor() external nonpayableRemoves the executor address
renounceOwnership
function renounceOwnership() external nonpayableLeaves the contract without owner. It will not be possible to call onlyOwner functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.
transferOwnership
function transferOwnership(address newOwner) external nonpayableTransfers ownership of the contract to a new account (newOwner). Can only be called by the current owner.
Parameters
| Name | Type | Description |
|---|---|---|
| newOwner | address | Address of the new user |
Events
ExecutorAddressChange
event ExecutorAddressChange(address indexed newAddress_)Emitted when the executor address is changed
Parameters
| Name | Type | Description |
|---|---|---|
newAddress_ indexed | address | The new executor address |
OwnershipTransferred
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)Parameters
| Name | Type | Description |
|---|---|---|
previousOwner indexed | address | undefined |
newOwner indexed | address | undefined |
Errors
OwnableInvalidOwner
error OwnableInvalidOwner(address owner)The owner is not a valid owner account. (eg. address(0))
Parameters
| Name | Type | Description |
|---|---|---|
| owner | address | undefined |
OwnableUnauthorizedAccount
error OwnableUnauthorizedAccount(address account)The caller account is not authorized to perform an operation.
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | undefined |
OnlyActive
isActive
function isActive() external view returns (bool)Returns
| Name | Type | Description |
|---|---|---|
| _0 | bool | undefined |
owner
function owner() external view returns (address)Returns the address of the current owner.
Returns
| Name | Type | Description |
|---|---|---|
| _0 | address | undefined |
renounceOwnership
function renounceOwnership() external nonpayableLeaves the contract without owner. It will not be possible to call onlyOwner functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.
transferOwnership
function transferOwnership(address newOwner) external nonpayableTransfers ownership of the contract to a new account (newOwner). Can only be called by the current owner.
Parameters
| Name | Type | Description |
|---|---|---|
| newOwner | address | undefined |
Events
ContractActiveStateChange
event ContractActiveStateChange(bool indexed newState_)Parameters
| Name | Type | Description |
|---|---|---|
newState_ indexed | bool | undefined |
OwnershipTransferred
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)Parameters
| Name | Type | Description |
|---|---|---|
previousOwner indexed | address | undefined |
newOwner indexed | address | undefined |
Errors
OwnableInvalidOwner
error OwnableInvalidOwner(address owner)The owner is not a valid owner account. (eg. address(0))
Parameters
| Name | Type | Description |
|---|---|---|
| owner | address | undefined |
OwnableUnauthorizedAccount
error OwnableUnauthorizedAccount(address account)The caller account is not authorized to perform an operation.
Parameters
| Name | Type | Description |
|---|---|---|
| account | address | undefined |