PermissionManager
Last updated
Last updated
The PermissionManager
contract implements the basic whitelisting functions for the actors in the permissioned market aka Aave Arc.
The source code can be found on Github .
Only certain entities have permission to 'whitelist' wallet addresses. These are the permissionAdmins
that can add/remove permission to wallet address to participate in Aave Arc. Whitelisters are responsible for conducting KYC/AML diligence on the entities or individuals associated with the wallet addresses seeking to interact with the Aave Arc market.
Only those individuals/entities with Ethereum wallet addresses that have been “whitelisted” to act in one or more valid role (enumerated👇🏻) have permission to participate in Aave Arc pool.
0: Depositor
1: Borrower
2: Liquidator
3: Stable Rate Manager
Adds a new whitelister for the permission-ed market.
admins
Addresses to be added as market's PermissionAdmin aka whitelisters
Removes an existing whitelister of the permission-ed market.
admins
Addresses to be removed as market's PermissionAdmin aka whitelisters
Allows permission admins to whitelist a set of addresses for various permission-ed roles.
roles
List of permissioned roles to be added for corresponding user addresses
users
User addresses to be whitelisted. This needs to contain the same number of elements as roles
Allows owner to remove permissions on a set of addresses for varous permission-ed roles.
roles
List of permissioned roles to be removed for corresponding user addresses
users
User addresses to be removed from whitelisted roles. This needs to contain the same number of elements as roles
Returns the permissions configuration for a specific account.
Call Params
user
address of the user
Return Values
roles
List of roles for which user address has permission
rolesCount
Total number of roles for which user address has permission
Used to query if a certain account has permission for the given role.
Call Params
user
address of the user
role
whitelisted role
0: Depositor
1: Borrower
2: Liquidator
3: Stable Rate Manager
Return Values
inRole
true if account has permissions for the specified role, else false
Used to query if a certain account has permission for all of the roles passed as parameter.
Call Params
user
address of the user
roles
set of whitelisted roles
0: Depositor
1: Borrower
2: Liquidator
3: Stable Rate Manager
Return Values
inRole
true if account has permissions for all the specified roles, else false
Used to query if a certain account has permission for any of the roles passed as parameter.
Call Params
user
address of the user
roles
set of whitelisted roles
0: Depositor
1: Borrower
2: Liquidator
3: Stable Rate Manager
Return Values
inRole
true if account has permissions for any of the specified roles, else false
Returns true
if the the account has permission to whitelist ie. account is PermissionAdmin
.
Call Params
admin
address to be verified
Return Values
isPermissionAdmin
true if the account is a PermissionAdmin aka whitelister, else false
Returns address of the PermissionAdmin
that whitelisted (added role for) the given user.
Call Params
user
address of the user
Return Values
permissionAdmin
address of the whitelister aka PermissionAdmin
Used to query if PermissionAdmin
that whitelisted given user is still valid and has not been removed from the list of whitelister.
Call Params
user
address of the user whose PermissionAdmin is being validated
Return Values
isValidPermissionAdmin
true if PermissionAdmin associated with the user address is valid, else false