AccessController.sol
View the smart contract for the Access Controller.

Permission Table
Permission Record
| IPAccount | Signer (caller) | To (only module) | Function Sig | Permission |
|---|---|---|---|---|
| 0x123..111 | 0x789..222 | 0x790..333 | 0xAaAaAaAa | Allow |
| 0x123..111 | 0x789..222 | 0x790..333 | 0xBBBBBBBB | Deny |
| 0x123..111 | 0x789..222 | 0x790..333 | 0xCCCCCC | Abstain |
Wildcard
Wildcard is also supported when defining permissions; it defines a permission that applies to multiple modules and/or functions. With wildcards, users can easily define a whitelist or blacklist of permissions.| IPAccount | Signer (caller) | To (module) | Func | Permission |
|---|---|---|---|---|
| 0x123..111 | 0x789..222 | * | * | Allow |
| 0x123..111 | 0x789..222 | 0x790..333 | * | Deny |
- Supported wildcards:
| Parameter | Wildcard |
|---|---|
| Func | bytes4(0) |
| Addresses (IPAccount / To) | address(0) |
Permission Prioritization
Specific permissions override general permissions.| IPAccount | Signer (caller) | To (module) | Func | Permission |
|---|---|---|---|---|
| 0x123..111 | 0x789..222 | * | * | Allow |
| 0x123..111 | 0x789..222 | 0x790..333 | * | Deny |
| 0x123..111 | 0x789..222 | 0x790..333 | 0xCCCCDDDD | Allow |
Call Flows with Access Control
There exist three types of call flows expected by the Access Controller.- An IPAccount calls a module directly.
- A module calls another module directly.
- A module calls a registry directly.
IPAccount calling a Module directly
- IPAccount performs a permission check with the Access Controller.
- The module only needs to check if the
msg.senderis a valid IPAccount.
msg.sender is a valid IPAccount.
AccessControlled provide a modifier onlyIpAccount() helps to perform the access control check.
Solidity

Module calling another Module
- The callee module needs to perform the authorization check itself.
AccessControlled provide a modifier verifyPermission(address ipAccount) helps to perform the access control check.
Solidity

Module calling Registry
- The registry performs the authorization check by calling AccessController.
- The registry authorizes modules through set global permission
Solidity
Solidity

The IPAccount’s permissions will be revoked upon transfer of ownership.The permissions associated with the IPAccount are exclusively linked to its current owner. When the ownership of the IPAccount is transferred to a new individual, the existing permissions granted to the previous owner are automatically revoked. This ensures that only the current, legitimate owner has access to these permissions. If, in the future, the IPAccount ownership is transferred back to the original owner, the permissions that were initially revoked will be reinstated, restoring the original owner’s access and control.

