Git Source
Methods
blacklist
function blacklist(uint64 type_) external nonpayable
Blacklist a type of entity.
The given type will still be deployable.
Parameters
| Name | Type | Description | 
|---|
| type_ | uint64 | type to blacklist | 
blacklisted
function blacklisted(uint64 type_) external view returns (bool value)
Get if a type is blacklisted (e.g., in case of invalid implementation).
The given type is still deployable.
Parameters
| Name | Type | Description | 
|---|
| type_ | uint64 | type to check | 
Returns
| Name | Type | Description | 
|---|
|  | bool | whether the type is blacklisted | 
create
function create(uint64 type_, bytes data) external nonpayable returns (address entity)
Create a new entity at the factory.
CREATE2 salt is constructed from the given parameters.
Parameters
| Name | Type | Description | 
|---|
| type_ | uint64 | type’s implementation to use | 
| data | bytes | initial data for the entity creation | 
Returns
| Name | Type | Description | 
|---|
| entity | address | address of the entity | 
entity
function entity(uint256 index) external view returns (address)
Get an entity given its index.
Parameters
| Name | Type | Description | 
|---|
| index | uint256 | index of the entity to get | 
Returns
| Name | Type | Description | 
|---|
|  | address | address of the entity | 
implementation
function implementation(uint64 type_) external view returns (address)
Get the implementation for a given type.
Parameters
| Name | Type | Description | 
|---|
| type_ | uint64 | position to get the implementation at | 
Returns
| Name | Type | Description | 
|---|
|  | address | address of the implementation | 
isEntity
function isEntity(address entity) external view returns (bool)
Get if a given address is an entity.
Parameters
| Name | Type | Description | 
|---|
| entity | address | address to check | 
Returns
| Name | Type | Description | 
|---|
|  | bool | if the given address is an entity | 
owner
function owner() external view returns (address)
Returns the address of the current owner.
Returns
| Name | Type | Description | 
|---|
|  | address |  | 
renounceOwnership
function renounceOwnership() external nonpayable
Leaves the contract without owner. It will not be possible to call onlyOwner functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.
totalEntities
function totalEntities() external view returns (uint256)
Get a total number of entities.
Returns
| Name | Type | Description | 
|---|
|  | uint256 | total number of entities added | 
totalTypes
function totalTypes() external view returns (uint64)
Get the total number of whitelisted types.
Returns
| Name | Type | Description | 
|---|
|  | uint64 | total number of types | 
transferOwnership
function transferOwnership(address newOwner) external nonpayable
Transfers ownership of the contract to a new account (newOwner). Can only be called by the current owner.
Parameters
| Name | Type | Description | 
|---|
| newOwner | address |  | 
whitelist
function whitelist(address implementation) external nonpayable
Whitelist a new type of entity.
Parameters
| Name | Type | Description | 
|---|
| implementation | address | address of the new implementation | 
Events
AddEntity
event AddEntity(address indexed entity)
Emitted when an entity is added.
Parameters
| Name | Type | Description | 
|---|
| entity indexed | address | address of the added entity | 
Blacklist
event Blacklist(uint64 indexed type_)
Emitted when a type is blacklisted (e.g., in case of invalid implementation).
The given type is still deployable.
Parameters
| Name | Type | Description | 
|---|
| type_ indexed | uint64 | type that was blacklisted | 
OwnershipTransferred
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
Parameters
| Name | Type | Description | 
|---|
| previousOwner indexed | address |  | 
| newOwner indexed | address |  | 
Whitelist
event Whitelist(address indexed implementation)
Emitted when a new type is whitelisted.
Parameters
| Name | Type | Description | 
|---|
| implementation indexed | address | address of the new implementation |