CronV1PoolFactory

owner

address owner

pendingOwner

address pendingOwner

poolMap

mapping(address => mapping(address => mapping(uint256 => address))) poolMap

onlyOwner

modifier onlyOwner()

Only allows the owner to execute the function.

constructor

constructor(contract IVault _vault) public

This function constructs the pool

Parameters

NameTypeDescription

_vault

contract IVault

The balancer v2 vault

create

function create(address _token0, address _token1, string _name, string _symbol, uint256 _poolType) external returns (address)

Deploys a new CronV1Pool

Parameters

NameTypeDescription

_token0

address

The asset which is converged to ie "base'

_token1

address

The asset which converges to the underlying

_name

string

The name of the balancer v2 lp token for this pool

_symbol

string

The symbol of the balancer v2 lp token for this pool

_poolType

uint256

The type of pool (stable, liquid, volatile)

Return Values

NameTypeDescription

[0]

address

The new pool address

set

function set(address _token0, address _token1, uint256 _poolType, address _pool) external

Sets CronV1Pool address in the mapping

Parameters

NameTypeDescription

_token0

address

address of token0

_token1

address

address of token1

_poolType

uint256

type of pool (stable, liquid, volatile)

_pool

address

address of pool to set in the mapping

remove

function remove(address _token0, address _token1, uint256 _poolType) external

Removes an already deployed CronV1Pool from the mapping WARNING - Best practice to disable Cron-Fi fees before removing it from the factory pool mapping. Also advisable to notify LPs / LT swappers in some way that this is occurring.

Parameters

NameTypeDescription

_token0

address

address of token0

_token1

address

address of token1

_poolType

uint256

type of pool (stable, liquid, volatile)

transferOwnership

function transferOwnership(address _newOwner, bool _direct, bool _renounce) external

Transfers ownership to _newOwner. Either directly or claimable by the new pending owner. Can only be invoked by the current owner.

Parameters

NameTypeDescription

_newOwner

address

Address of the new owner.

_direct

bool

True if _newOwner should be set immediately. False if _newOwner needs to use claimOwnership.

_renounce

bool

Allows the _newOwner to be address(0) if _direct and _renounce is True. Has no effect otherwise.

claimOwnership

function claimOwnership() external

Needs to be called by pendingOwner to claim ownership.

getPool

function getPool(address _token0, address _token1, uint256 _poolType) external view returns (address)

Gets existing pool for given address pair post sort and pool type

Parameters

NameTypeDescription

_token0

address

address of token 0

_token1

address

address of token 1

_poolType

uint256

type of pool

Last updated