Skip to content

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.

Accepts the pending Unitroller implementation role. Only the Unitroller admin can initiate this transition.

function _become(Unitroller unitroller) public

Adds, replaces, or removes selector assignments. Only the Unitroller admin can call it in the delegated Unitroller context.

function diamondCut(IDiamondCut.FacetCut[] diamondCut_) public

Returns the selectors currently assigned to a facet address.

function facetFunctionSelectors(address facet) external view returns (bytes4[])

Returns a facet’s position in the internal facet-address array.

function facetPosition(address facet) external view returns (uint256)

Returns every facet address currently registered in the Diamond.

function facetAddresses() external view returns (address[])

Returns the current facet address and selector position for a function selector.

function facetAddress(bytes4 functionSelector)
external
view
returns (ComptrollerV19Storage.FacetAddressAndPosition)

Returns every registered facet with its assigned selectors.

function facets() external view returns (Diamond.Facet[])