IIntegrationFactory
Author: gauthiermyr @ Kiln
IntegrationFactory deploys predefined integrations contracts through a ProxyFactory.
Functions
initialize
Initializes the contract with the given parameters.
function initialize(address admin_) external;
Parameters
| Name | Type | Description |
|---|---|---|
admin_ | address | Factory admin |
deployNative20vPoolIntegration
Deploy a proxy for the implementation of a Native vPool integration contract
function deployNative20vPoolIntegration(address proxyOwner, bytes calldata cdata) external returns (address);
Parameters
| Name | Type | Description |
|---|---|---|
proxyOwner | address | The address used as an admin for the proxy |
cdata | bytes | The initial calldata |
deployNative20vPoolIntegration
Deploy a proxy for the implementation of a Native vPool integration contract
function deployNative20vPoolIntegration(address proxyOwner, Native20Configuration calldata config) external returns (address);
Parameters
| Name | Type | Description |
|---|---|---|
proxyOwner | address | The address used as an admin for the proxy |
config | Native20Configuration | The parameters to initialize the contract. |
deployLiquid20AvPoolIntegration
Deploy a proxy for the implementation of a liquid ERC20 aToken vPool integration contract
function deployLiquid20AvPoolIntegration(address proxyOwner, Native20Configuration calldata config) external returns (address);
Parameters
| Name | Type | Description |
|---|---|---|
proxyOwner | address | The address used as an admin for the proxy |
config | Native20Configuration | The parameters to initialize the contract. |
deployLiquid20CvPoolIntegration
Deploy a proxy for the implementation of a liquid ERC20 cToken vPool integration contract
function deployLiquid20CvPoolIntegration(address proxyOwner, Native20Configuration calldata config) external returns (address);
Parameters
| Name | Type | Description |
|---|---|---|
proxyOwner | address | The address used as an admin for the proxy |
config | Native20Configuration | The parameters to initialize the contract. |
deployLiquid20AvPoolIntegration
Deploy a proxy for the implementation of a liquid ERC20 aToken vPool integration contract
function deployLiquid20AvPoolIntegration(address proxyOwner, bytes calldata cdata) external returns (address);
Parameters
| Name | Type | Description |
|---|---|---|
proxyOwner | address | The address used as an admin for the proxy |
cdata | bytes | The initial calldata |
deployLiquid20CvPoolIntegration
Deploy a proxy for the implementation of a liquid ERC20 cToken vPool integration contract
function deployLiquid20CvPoolIntegration(address proxyOwner, bytes calldata cdata) external returns (address);
Parameters
| Name | Type | Description |
|---|---|---|
proxyOwner | address | The address used as an admin for the proxy |
cdata | bytes | The initial calldata |
deployNative1155vPoolIntegration
Deploy a proxy for the implementation of a native 1155 vPool integration contract
function deployNative1155vPoolIntegration(address proxyOwner, Native1155Configuration calldata config) external returns (address);
Parameters
| Name | Type | Description |
|---|---|---|
proxyOwner | address | The address used as an admin for the proxy |
config | Native1155Configuration | The parameters to initialize the contract. |
deployLiquid1155vPoolIntegration
Deploy a proxy for the implementation of a liquid 1155 vPool integration contract
function deployLiquid1155vPoolIntegration(address proxyOwner, Native1155Configuration calldata config) external returns (address);
Parameters
| Name | Type | Description |
|---|---|---|
proxyOwner | address | The address used as an admin for the proxy |
config | Native1155Configuration | The parameters to initialize the contract |
deployNative1155vPoolIntegration
Deploy a proxy for the implementation of a native 1155 vPool integration contract
function deployNative1155vPoolIntegration(address proxyOwner, bytes calldata cdata) external returns (address);
Parameters
| Name | Type | Description |
|---|---|---|
proxyOwner | address | The address used as an admin for the proxy |
cdata | bytes | The initial calldata |
deployLiquid1155vPoolIntegration
Deploy a proxy for the implementation of a liquid 1155 vPool integration contract
function deployLiquid1155vPoolIntegration(address proxyOwner, bytes calldata cdata) external returns (address);
Parameters
| Name | Type | Description |
|---|---|---|
proxyOwner | address | The address used as an admin for the proxy |
cdata | bytes | The initial calldata |
deployVNFTIntegration
Deploy a proxy for the implementation of a vNFT integration contract
function deployVNFTIntegration(address proxyOwner, bytes calldata cdata) external returns (address);
Parameters
| Name | Type | Description |
|---|---|---|
proxyOwner | address | The address used as an admin for the proxy |
cdata | bytes | The initial calldata |
deployVNFTIntegration
function deployVNFTIntegration(address proxyOwner, IvNFT.VNFTConfiguration calldata config) external returns (address);
Parameters
| Name | Type | Description |
|---|---|---|
proxyOwner | address | The address used as an admin for the proxy |
config | IvNFT.VNFTConfiguration | The parameters to initialize the contract. |
updateImplementation
Update the channel implementation address
function updateImplementation(bytes32 channel, address implem, bool updateRequired) external;
Parameters
| Name | Type | Description |
|---|---|---|
channel | bytes32 | Channel to update |
implem | address | New implementation address for the channel |
updateRequired | bool | If true it will prevent from deploying an instance with the old implementation parameters |
setDeployer
Allow or disallow an address to deploy integration contracts
function setDeployer(address deployer, bool allowed) external;
Parameters
| Name | Type | Description |
|---|---|---|
deployer | address | Address of the deployer |
allowed | bool | Allowed or not |
factory
retrieve the proxy factory address
function factory(bytes32 channel) external view returns (address);
Parameters
| Name | Type | Description |
|---|---|---|
channel | bytes32 | channel identifier |
implementation
retrieve the implementation address for a channel
function implementation(bytes32 channel) external view returns (address);
Parameters
| Name | Type | Description |
|---|---|---|
channel | bytes32 | channel identifier |
outdated
retrieve whether the implementation for a channel is outdated
function outdated(bytes32 channel) external view returns (bool);
Parameters
| Name | Type | Description |
|---|---|---|
channel | bytes32 | channel identifier |
Events
DeployerUpdated
Emitted when a deployer is allowed or disallowed
event DeployerUpdated(address indexed deployer, bool allowed);
Parameters
| Name | Type | Description |
|---|---|---|
deployer | address | Deployer allowed/disallowed |
allowed | bool | Allowed or not |
ChannelImplementationUpdated
Emitted when an implementation is updated
event ChannelImplementationUpdated(bytes32 indexed channel, address implem, bool updateRequired);
Parameters
| Name | Type | Description |
|---|---|---|
channel | bytes32 | Channel to update |
implem | address | New implementation |
updateRequired | bool | True for a channel if the related implementation requires a factory update |
ProxyFactoryDeployed
Emitted when a ProxyFactory is deployed for a channel
event ProxyFactoryDeployed(bytes32 indexed channel, address factory);
Parameters
| Name | Type | Description |
|---|---|---|
channel | bytes32 | Channel to update |
factory | address | New implementation |
Errors
NotAnAllowedDeployer
Thrown when someone not allowed is trying to deploy an integration
error NotAnAllowedDeployer();
FactoryUpdateRequired
Thrown when we try to deploy an outdated implementation
error FactoryUpdateRequired(bytes32 channel);
Parameters
| Name | Type | Description |
|---|---|---|
channel | bytes32 | The channel that requires an update |
ChannelNotInitialized
Thrown when we try to deploy an integration for a channel that is not initialized
error ChannelNotInitialized(bytes32 channel);
Parameters
| Name | Type | Description |
|---|---|---|
channel | bytes32 | The channel that requires initialization |