Factory
Functions#
constructor#
sets the owner of the factory responsible for creating pools
createPool#
given an address of an ERC-20 token, creates a pool and initializes it. This is gas optimized to use the CREATE2 op code when creating a pool.
Parameters:#
| Name | Type | Description |
|---|---|---|
token | address | the ERC-20 token to create the pool for |
pools#
returns the total number of pools created
pool#
given an address, returns the address of the underlying pool
Parameters:#
| Name | Type | Description |
|---|---|---|
token | address | the address of the underlying ERC-20 token |
setOwner#
sets the owner of the factory
Parameters:#
| Name | Type | Description |
|---|---|---|
o | address | the new owner |
owner#
returns the current owner of the factory