Skip to main content
This content applies to WaaS 1.0 only. We highly recommend that you upgrade to WaaS 2.0.
Authorizer is the core module in Cobo Safe that is used to implement access controls. All transactions sent by Delegates via execTransaction() must be approved by the Authorizer before execution. An Authorizer has to implement the following interfaces:
  • preExecCheck: validate the transaction before it is executed (e.g., contract address, call method, parameters, ETH amount of the transaction)
  • postExecCheck: validate the transaction and its outcomes after it has been executed (e.g., changes in wallet balance, leverage ratio in a DeFi protocol)
  • preExecProcess: complete certain operations before the transaction is executed (e.g., recording the transaction amount)
  • postExecProcess: complete certain operations after the transaction has been executed
  • flag: the above four methods are not mandatory for an Authorizer; the Authorizer can indicate the specific functions that need to be executed by configuring flag
The following struct shows a transaction that is yet to be executed:
  • from: the msg.sender of the transaction (e.g. the from value for a Cobo Safe Account will be the contract address of Safe)
  • delegate: the Delegate who sent the transaction; Authorizer will use this value to review whether the transaction is authorized
  • All other fields have the same definition as that for CallData
postExecCheck has two additional parameters:
  • TransactionResult: the status and output of a transaction after it has been executed
  • AuthorizerReturnData:data returned by preExecCheck