Diamond
Diamond
This contract contains functions related to facets
Solidity API
_become
Call _acceptImplementation to accept the diamond proxy as new implementaion
Parameters
Name | Type | Description |
---|---|---|
unitroller | contract Unitroller | Address of the unitroller |
diamondCut
To add function selectors to the facet's mapping
Parameters
Name | Type | Description |
---|---|---|
diamondCut_ | struct IDiamondCut.FacetCut[] | IDiamondCut contains facets address, action and function selectors |
facetFunctionSelectors
Get all function selectors mapped to the facet address
Parameters
Name | Type | Description |
---|---|---|
facet | address | Address of the facet |
Return Values
Name | Type | Description |
---|---|---|
[0] | bytes4[] | selectors Array of function selectors |
facetPosition
Get facet position in the _facetFunctionSelectors through facet address
Parameters
Name | Type | Description |
---|---|---|
facet | address | Address of the facet |
Return Values
Name | Type | Description |
---|---|---|
[0] | uint256 | Position of the facet |
facetAddresses
Get all facet addresses
Return Values
Name | Type | Description |
---|---|---|
[0] | address[] | facetAddresses Array of facet addresses |
facetAddress
Get facet address and position through function selector
Parameters
Name | Type | Description |
---|---|---|
functionSelector | bytes4 | function selector |
Return Values
Name | Type | Description |
---|---|---|
[0] | struct ComptrollerV13Storage.FacetAddressAndPosition | FacetAddressAndPosition facet address and position |
facets
Get all facets address and their function selector
Return Values
Name | Type | Description |
---|---|---|
[0] | struct Diamond.Facet[] | facets_ Array of Facet |
Last updated