Skip to main content

Diamonds

IDiamond

FacetInit

struct FacetInit {
address target;
address initTarget;
bytes initData;
bytes4[] selectors;
}

IDiamondFactory

DiamondCreated

event DiamondCreated(address diamondAddress)

createDiamond

function createDiamond(struct IDiamond.FacetInit[] facetInits) external returns (address)

OwnableDiamond

constructor

constructor(address owner, struct IDiamond.FacetInit[] facetInits) public

receive

receive() external payable

_transferOwnership

function _transferOwnership(address account) internal virtual

_getImplementation

function _getImplementation() internal view returns (address implementation)

query custom fallback address is no implementation is found

Return Values

NameTypeDescription
implementationaddressimplementation address

OwnableDiamondFactory

createDiamond

function createDiamond(struct IDiamond.FacetInit[] facetInits) external returns (address)

SingleCutDiamond

constructor

constructor(struct IDiamond.FacetInit[] facetInits) public

receive

receive() external payable

SingleCutDiamondFactory

createDiamond

function createDiamond(struct IDiamond.FacetInit[] facetInits) external returns (address)

BeaconDiamond

BeaconDiamond__NoFacetForSignature

error BeaconDiamond__NoFacetForSignature()

constructor

constructor(contract IDiamondReadable _beacon) public

_getImplementation

function _getImplementation() internal view returns (address)

get logic implementation address

Return Values

NameTypeDescription
[0]addressimplementation address

BeaconDiamondInternal

_setBeacon

function _setBeacon(contract IDiamondReadable beacon) internal

BeaconDiamondStorage

Layout

struct Layout {
contract IDiamondReadable beacon;
}

layout

function layout() internal pure returns (struct BeaconDiamondStorage.Layout l)