Skip to content

AssetClassRegistry

AssetClassRegistry

AssetClassRegistryInitParams

struct AssetClassRegistryInitParams {
  contract IACL acl;
}

onlyRegisteredAssetClass

modifier onlyRegisteredAssetClass(bytes4 assetClass)

Modifier to make a function callable only for the registered asset class.

constructor

constructor() public

initialize

function initialize(struct AssetClassRegistry.AssetClassRegistryInitParams params) external

AssetClassRegistry initializer.

Name Type Description
params struct AssetClassRegistry.AssetClassRegistryInitParams Initialization params.

registerAssetClass

function registerAssetClass(bytes4 assetClass, struct IAssetClassRegistry.ClassConfig config) external

Registers new asset class.

Name Type Description
assetClass bytes4 Asset class ID.
config struct IAssetClassRegistry.ClassConfig Asset class initial configuration.

setAssetClassVault

function setAssetClassVault(bytes4 assetClass, address vault) external

Sets asset class vault.

Name Type Description
assetClass bytes4 Asset class ID.
vault address Asset class vault address.

setAssetClassController

function setAssetClassController(bytes4 assetClass, address controller) external

Sets asset class controller.

Name Type Description
assetClass bytes4 Asset class ID.
controller address Asset class controller address.

assetClassConfig

function assetClassConfig(bytes4 assetClass) external view returns (struct IAssetClassRegistry.ClassConfig)

Returns asset class configuration.

Name Type Description
assetClass bytes4 Asset class ID.
Name Type Description
[0] struct IAssetClassRegistry.ClassConfig Asset class configuration.

contractKey

function contractKey() external pure returns (bytes4)

Returns implemented contract key.

Name Type Description
[0] bytes4 Contract key;

isRegisteredAssetClass

function isRegisteredAssetClass(bytes4 assetClass) public view returns (bool)

Checks asset class registration.

Name Type Description
assetClass bytes4 Asset class ID.

checkRegisteredAssetClass

function checkRegisteredAssetClass(bytes4 assetClass) public view

Reverts if asset class is not registered.

Name Type Description
assetClass bytes4 Asset class ID.

supportsInterface

function supportsInterface(bytes4 interfaceId) public view returns (bool)

_Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created.

This function call must use less than 30 000 gas._

_authorizeUpgrade

function _authorizeUpgrade(address newImplementation) internal

_Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by {upgradeTo} and {upgradeToAndCall}.

Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}.

```solidity function authorizeUpgrade(address) internal override onlyOwner {} ```

_checkValidAssetController

function _checkValidAssetController(bytes4 assetClass, address controller) internal view

Reverts if provided address is not a valid asset controller address.

Name Type Description
assetClass bytes4 Asset class ID.
controller address Asset controller address.

_checkValidAssetVault

function _checkValidAssetVault(bytes4 assetClass, address vault) internal view

Reverts if provided address is not a valid asset vault address.

Name Type Description
assetClass bytes4 Asset class ID.
vault address Asset vault address.

_acl

function _acl() internal view returns (contract IACL)

return the IACL address