Developer Docs
Smart Contracts
Contract Logic
Security

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 nonpayable

Parameters

NameTypeDescription
executorAddress_addressNew address of the Executor to be set

getExecutorAddress

function getExecutorAddress() external view returns (address)

Returns the executor address

Returns

NameTypeDescription
_0addressThe executor address

owner

function owner() external view returns (address)

Returns the address of the current owner.

Returns

NameTypeDescription
_0addressowner of the contract

removeExecutor

function removeExecutor() external nonpayable

Removes the executor address

renounceOwnership

function renounceOwnership() external nonpayable

Leaves 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 nonpayable

Transfers ownership of the contract to a new account (newOwner). Can only be called by the current owner.

Parameters

NameTypeDescription
newOwneraddressAddress of the new user

Events

ExecutorAddressChange

event ExecutorAddressChange(address indexed newAddress_)

Emitted when the executor address is changed

Parameters

NameTypeDescription
newAddress_ indexedaddressThe new executor address

OwnershipTransferred

event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)

Parameters

NameTypeDescription
previousOwner indexedaddressundefined
newOwner indexedaddressundefined

Errors

OwnableInvalidOwner

error OwnableInvalidOwner(address owner)

The owner is not a valid owner account. (eg. address(0))

Parameters

NameTypeDescription
owneraddressundefined

OwnableUnauthorizedAccount

error OwnableUnauthorizedAccount(address account)

The caller account is not authorized to perform an operation.

Parameters

NameTypeDescription
accountaddressundefined

OnlyActive

isActive

function isActive() external view returns (bool)

Returns

NameTypeDescription
_0boolundefined

owner

function owner() external view returns (address)

Returns the address of the current owner.

Returns

NameTypeDescription
_0addressundefined

renounceOwnership

function renounceOwnership() external nonpayable

Leaves 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 nonpayable

Transfers ownership of the contract to a new account (newOwner). Can only be called by the current owner.

Parameters

NameTypeDescription
newOwneraddressundefined

Events

ContractActiveStateChange

event ContractActiveStateChange(bool indexed newState_)

Parameters

NameTypeDescription
newState_ indexedboolundefined

OwnershipTransferred

event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)

Parameters

NameTypeDescription
previousOwner indexedaddressundefined
newOwner indexedaddressundefined

Errors

OwnableInvalidOwner

error OwnableInvalidOwner(address owner)

The owner is not a valid owner account. (eg. address(0))

Parameters

NameTypeDescription
owneraddressundefined

OwnableUnauthorizedAccount

error OwnableUnauthorizedAccount(address account)

The caller account is not authorized to perform an operation.

Parameters

NameTypeDescription
accountaddressundefined