This content applies to WaaS 1.0 only. We highly recommend that you upgrade to WaaS 2.0.
Cobo Safe
is embedded with multiple types of built-in Authorizers
.
FuncAuthorizer
FuncAuthorizer
is a simple Authorizer
that is used to validate the address and the function of a smart contract call.
Assume that an Owner
wants to authorize a Delegate
to transfer USDT
via Ethereum. This can be achieved through the following configuration of FuncAuthorizer
:
- Validate that the
USDT
contract address is0xdAC17F958D2ee523a2206206994597C13D831ec7.
- Validate that the transaction will invoke the
transfer(address,uint256)
function. Note that this function must follow the contract ABI specification. - Call
addContractFuncs()
oraddContractFuncsSig()
ofFuncAuthorizer
to add the above address and function.
FuncAuthorizer
only validates the address and the function of a smart contract call. It does not validate the parameters that are passed in when the contract is called. For example, FuncAuthorizer
cannot be used to configure the receipt or the USDT transaction amount. You will need to manually write an ACL instead to implement access controls at the granular level.
TransferAuthorizer
TransferAuthorizer
allows you to validate the token type
and receipt
of a transaction using the addTokenReceivers
function. The Delegate
can transfer the authorized type
of tokens directly to the receipt
.
Note that for ERC-20 tokens, the token type
will be the token address. For native tokens, the token type
will be 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE
.
ArgusRootAuthorizer
ArgusRootAuthorizer
is the default type of Authorizer
on Cobo Argus. ArgusRootAuthorizer
is not used for validation purposes. Instead, it is used to maintain a set of Sub-Authorizers
.
ArgusRootAuthorizer
is also designed in the Role-Based Access Control (RBAC) framework. You can use ArgusRootAuthorizer
to configure one or multiple Sub-Authorizers
for each Role
.
When a transaction is sent to ArgusRootAuthorizer
:
ArgusRootAuthorizer
will query theDelegate
of the transaction and identify theRole
assigned to theDelegate
with the help of aRole Manager
.ArgusRootAuthorizer
will query theSub-Authorizers
associated with eachRole
.ArgusRootAuthorizer
will call theSub-Authorizers
associated with eachRole
. If the transaction passes validation from any of theseSub-Authorizers
, it will be approved. If the transaction fails validation from all of theseSub-Authorizers
, it will be rejected.
Sub-Authorizer
contains both preExecCheck
and postExecCheck
, a transaction will be approved only if it passes validation from both functions.
Feel free to share your feedback to improve our documentation!