# IDiamondOrProxyFacet

## IDiamondOrProxyFacet

Used to distinguish between the diamond and the proxy.

### OnlyAllowedOnDiamondNotProxy

```solidity
error OnlyAllowedOnDiamondNotProxy()
```

*Raised when a method is called on the proxy that should only be called on the diamond.*

### OnlyAllowedOnProxyNotDiamond

```solidity
error OnlyAllowedOnProxyNotDiamond()
```

*Raised when a method is called on the diamond that should only be called on the proxy.*

### isDiamondContract

```solidity
function isDiamondContract() external pure returns (bool)
```

*Determines if we are operating against the proxy or the diamond.*

#### Return Values

| Name | Type | Description                                                                                                                                      |
| ---- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| \[0] | bool | bool True if this is the diamond contract, false if it's a proxy. Note - this must be public when implemented in the proxy or the diamond facet. |

## IDiamondOrProxyFacet

Used to distinguish between the diamond and the proxy.

### OnlyAllowedOnDiamondNotProxy

```solidity
error OnlyAllowedOnDiamondNotProxy()
```

*Raised when a method is called on the proxy that should only be called on the diamond.*

### OnlyAllowedOnProxyNotDiamond

```solidity
error OnlyAllowedOnProxyNotDiamond()
```

*Raised when a method is called on the diamond that should only be called on the proxy.*

### isDiamondContract

```solidity
function isDiamondContract() external pure returns (bool)
```

*Determines if we are operating against the proxy or the diamond.*

#### Return Values

| Name | Type | Description                                                                                                                                      |
| ---- | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| \[0] | bool | bool True if this is the diamond contract, false if it's a proxy. Note - this must be public when implemented in the proxy or the diamond facet. |
