IPoolFactory
Inherits: IPoolFactoryEvents
Functions
isPool
Returns whether the given address is a pool
function isPool(address contractAddress) external view returns (bool);
Parameters
Name | Type | Description |
---|---|---|
contractAddress | address | The address to check |
Returns
Name | Type | Description |
---|---|---|
<none> | bool | Whether the given address is a pool |
getPoolAddress
Returns the address of a valid pool, and whether it has been deployed. If the pool configuration is invalid the transaction will revert.
function getPoolAddress(PoolKey calldata k) external view returns (address pool, bool isDeployed);
Parameters
Name | Type | Description |
---|---|---|
k | PoolKey | The pool key |
Returns
Name | Type | Description |
---|---|---|
pool | address | The pool address |
isDeployed | bool | Whether the pool has been deployed |
deployPool
Deploy a new option pool
function deployPool(PoolKey calldata k) external payable returns (address poolAddress);
Parameters
Name | Type | Description |
---|---|---|
k | PoolKey | The pool key |
Returns
Name | Type | Description |
---|---|---|
poolAddress | address | The address of the deployed pool |
initializationFee
DEPRECATED: Calculates the initialization fee for a pool
function initializationFee(PoolKey calldata k) external view returns (UD60x18);
Parameters
Name | Type | Description |
---|---|---|
k | PoolKey | The pool key |
Returns
Name | Type | Description |
---|---|---|
<none> | UD60x18 | The initialization fee (18 decimals) |
Errors
PoolFactory__IdenticalAddresses
error PoolFactory__IdenticalAddresses();
PoolFactory__OptionExpired
error PoolFactory__OptionExpired(uint256 maturity);
PoolFactory__OptionMaturityExceedsMax
error PoolFactory__OptionMaturityExceedsMax(uint256 maturity);
PoolFactory__OptionMaturityNot8UTC
error PoolFactory__OptionMaturityNot8UTC(uint256 maturity);
PoolFactory__OptionMaturityNotFriday
error PoolFactory__OptionMaturityNotFriday(uint256 maturity);
PoolFactory__OptionMaturityNotLastFriday
error PoolFactory__OptionMaturityNotLastFriday(uint256 maturity);
PoolFactory__OptionStrikeEqualsZero
error PoolFactory__OptionStrikeEqualsZero();
PoolFactory__OptionStrikeInvalid
error PoolFactory__OptionStrikeInvalid(UD60x18 strike, UD60x18 strikeInterval);
PoolFactory__PoolAlreadyDeployed
error PoolFactory__PoolAlreadyDeployed(address poolAddress);
PoolFactory__TransferNativeTokenFailed
error PoolFactory__TransferNativeTokenFailed();
PoolFactory__ZeroAddress
error PoolFactory__ZeroAddress();
Structs
PoolKey
struct PoolKey {
address base;
address quote;
address oracleAdapter;
UD60x18 strike;
uint256 maturity;
bool isCallPool;
}