OCPoolFactory

OCPoolFactory

getPool

mapping(address => address) getPool

createPool

function createPool(address _token) external returns (address pool)

_create a new pool

createPool is a helper function to create a new pool.

Emits a {PoolCreated} event.

If the pool already exists, it will revert.

If the pool is created successfully, it will return the pool address and be added to getPool.

Requirements:

  • _token must be valid

  • getPool[_token] must be empty_

Parameters

NameTypeDescription

_token

address

token address

Return Values

NameTypeDescription

pool

address

address