IIntegrationFactory

Git Source

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

NameTypeDescription
admin_addressFactory 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

NameTypeDescription
proxyOwneraddressThe address used as an admin for the proxy
cdatabytesThe 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

NameTypeDescription
proxyOwneraddressThe address used as an admin for the proxy
configNative20ConfigurationThe 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

NameTypeDescription
proxyOwneraddressThe address used as an admin for the proxy
configNative20ConfigurationThe 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

NameTypeDescription
proxyOwneraddressThe address used as an admin for the proxy
configNative20ConfigurationThe 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

NameTypeDescription
proxyOwneraddressThe address used as an admin for the proxy
cdatabytesThe 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

NameTypeDescription
proxyOwneraddressThe address used as an admin for the proxy
cdatabytesThe 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

NameTypeDescription
proxyOwneraddressThe address used as an admin for the proxy
configNative1155ConfigurationThe 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

NameTypeDescription
proxyOwneraddressThe address used as an admin for the proxy
configNative1155ConfigurationThe 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

NameTypeDescription
proxyOwneraddressThe address used as an admin for the proxy
cdatabytesThe 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

NameTypeDescription
proxyOwneraddressThe address used as an admin for the proxy
cdatabytesThe 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

NameTypeDescription
proxyOwneraddressThe address used as an admin for the proxy
cdatabytesThe initial calldata

deployVNFTIntegration

function deployVNFTIntegration(address proxyOwner, IvNFT.VNFTConfiguration calldata config) external returns (address);

Parameters

NameTypeDescription
proxyOwneraddressThe address used as an admin for the proxy
configIvNFT.VNFTConfigurationThe parameters to initialize the contract.

updateImplementation

Update the channel implementation address

function updateImplementation(bytes32 channel, address implem, bool updateRequired) external;

Parameters

NameTypeDescription
channelbytes32Channel to update
implemaddressNew implementation address for the channel
updateRequiredboolIf 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

NameTypeDescription
deployeraddressAddress of the deployer
allowedboolAllowed or not

factory

retrieve the proxy factory address

function factory(bytes32 channel) external view returns (address);

Parameters

NameTypeDescription
channelbytes32channel identifier

implementation

retrieve the implementation address for a channel

function implementation(bytes32 channel) external view returns (address);

Parameters

NameTypeDescription
channelbytes32channel identifier

outdated

retrieve whether the implementation for a channel is outdated

function outdated(bytes32 channel) external view returns (bool);

Parameters

NameTypeDescription
channelbytes32channel identifier

Events

DeployerUpdated

Emitted when a deployer is allowed or disallowed

event DeployerUpdated(address indexed deployer, bool allowed);

Parameters

NameTypeDescription
deployeraddressDeployer allowed/disallowed
allowedboolAllowed or not

ChannelImplementationUpdated

Emitted when an implementation is updated

event ChannelImplementationUpdated(bytes32 indexed channel, address implem, bool updateRequired);

Parameters

NameTypeDescription
channelbytes32Channel to update
implemaddressNew implementation
updateRequiredboolTrue 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

NameTypeDescription
channelbytes32Channel to update
factoryaddressNew 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

NameTypeDescription
channelbytes32The 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

NameTypeDescription
channelbytes32The channel that requires initialization