Skip to content

Solidity API

PropsDiamond

This contract implements the Diamond pattern for upgradeable contracts with additional Props-specific functionality

Inherits from Diamond and PropsReceiver

constructor

solidity
constructor() public

initialize

solidity
function initialize(address _newOwner, address _diamondCutFacet, struct IPropsInitCall.InitCall[] _initCalls) external

Initializes the PropsDiamond contract with a new owner and initial facets

Can only be called once when the contract owner is not set

Parameters

NameTypeDescription
_newOwneraddressThe address to be set as the new owner
_diamondCutFacetaddressThe address of the DiamondCutFacet contract
_initCallsstruct IPropsInitCall.InitCall[]An array of initialization calls to be executed

initialize

solidity
function initialize(address _newOwner, address _diamondCutFacet, struct IDiamondCut.FacetCut[] _initialDiamondCuts, struct IPropsInitCall.InitCall[] _initCalls) external

Initializes the PropsDiamond contract with a new owner, initial facets, and additional diamond cuts

Can only be called once when the contract owner is not set

Parameters

NameTypeDescription
_newOwneraddressThe address to be set as the new owner
_diamondCutFacetaddressThe address of the DiamondCutFacet contract
_initialDiamondCutsstruct IDiamondCut.FacetCut[]An array of initial diamond cuts to be applied
_initCallsstruct IPropsInitCall.InitCall[]An array of initialization calls to be executed

diamondCut

solidity
function diamondCut(struct IDiamondCut.FacetCut[] _diamondCuts, struct IPropsInitCall.InitCall[] _initCalls) internal

Internal function to perform a diamond cut

This function is called by both initialize functions to apply facet changes and execute initialization calls

Parameters

NameTypeDescription
_diamondCutsstruct IDiamondCut.FacetCut[]An array of FacetCut structs defining the facet changes to be made
_initCallsstruct IPropsInitCall.InitCall[]An array of initialization calls to be executed after the diamond cut

getHookPermissions

solidity
function getHookPermissions() public pure returns (struct Hooks.Permissions)

Returns the permissions for Uniswap hooks as true, PropsUniswapHook will run/skip based on the hook permissions set in storage This is a default implementation that allows all hooks to be called, individual hooks will run/skip based on the hook permissions set in storage

Return Values

NameTypeDescription
[0]struct Hooks.PermissionsPermissions The permissions for diamond uniswap hooks