Access control list (acl) module. An acl is a list of account addresses who
have the access permission to a certain object.
This module uses a vector
to represent the list, but can be refactored to
use a "set" instead when it's available in the language in the future.
- Struct
ACL
- Constants
- Function
empty
- Function
add
- Function
remove
- Function
contains
- Function
assert_contains
use 0x1::error;
use 0x1::vector;
struct ACL has copy, drop, store
The ACL already contains the address.
The ACL does not contain the address.
const ENOT_CONTAIN: u64 = 1;
Return an empty ACL.
Add the address to the ACL.
Remove the address from the ACL.
Return true iff the ACL contains the address.
assert! that the ACL has the address.
public fun assert_contains(acl: &acl::ACL, addr: address)