Diamond
The Diamond is the selector router used as the BNB Core Pool Unitroller implementation. The current stable source inherits ComptrollerV19Storage.
Source: Diamond.sol in venus-protocol v10.3.0.
Solidity API
Section titled “Solidity API”_become
Section titled “_become”Accepts the pending Unitroller implementation role. Only the Unitroller admin can initiate this transition.
function _become(Unitroller unitroller) publicdiamondCut
Section titled “diamondCut”Adds, replaces, or removes selector assignments. Only the Unitroller admin can call it in the delegated Unitroller context.
function diamondCut(IDiamondCut.FacetCut[] diamondCut_) publicfacetFunctionSelectors
Section titled “facetFunctionSelectors”Returns the selectors currently assigned to a facet address.
function facetFunctionSelectors(address facet) external view returns (bytes4[])facetPosition
Section titled “facetPosition”Returns a facet’s position in the internal facet-address array.
function facetPosition(address facet) external view returns (uint256)facetAddresses
Section titled “facetAddresses”Returns every facet address currently registered in the Diamond.
function facetAddresses() external view returns (address[])facetAddress
Section titled “facetAddress”Returns the current facet address and selector position for a function selector.
function facetAddress(bytes4 functionSelector) external view returns (ComptrollerV19Storage.FacetAddressAndPosition)facets
Section titled “facets”Returns every registered facet with its assigned selectors.
function facets() external view returns (Diamond.Facet[])