UsdnProtocolImpl
Inherits: IUsdnProtocolImpl, UsdnProtocolActions, UsdnProtocolCore, UsdnProtocolVault, UsdnProtocolLong, UUPSUpgradeable
Functions
constructor
Note: oz-upgrades-unsafe-allow: constructor
constructor();
initializeStorage
Initializes the protocol's storage with the given values.
This function should be called on deployment when creating the proxy. It can only be called once.
function initializeStorage(InitStorage calldata initStorage) public reinitializer(2);
Parameters
Name | Type | Description |
---|---|---|
initStorage | InitStorage | The initial storage values. Any call with a function signature not present in this contract will be delegated to the fallback contract. |
_authorizeUpgrade
Verifies that the caller is allowed to upgrade the protocol.
*Function that should revert when msg.sender
is not authorized to upgrade the contract. Called by
{upgradeToAndCall}.
Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.
function _authorizeUpgrade(address) internal onlyOwner {}
```*
```solidity
function _authorizeUpgrade(address implementation) internal override onlyRole(Constants.PROXY_UPGRADE_ROLE);
Parameters
Name | Type | Description |
---|---|---|
implementation | address | The address of the new implementation contract. |
_delegate
Delegates the call to the fallback contract.
function _delegate(address protocolFallbackAddr) internal;
Parameters
Name | Type | Description |
---|---|---|
protocolFallbackAddr | address | The address of the fallback contract. |
fallback
Delegates the call to the fallback contract if the function signature contained in the transaction data does not match any function in the implementation contract.
fallback() external;