Maple
Search…
PoolFactory
PoolFactory instantiates Pools.

Constructor

1
constructor(
2
address _globals
3
)
Copied!

Parameters:

Index
Name
Type
Internal Type
Description
0
_globals
address
address

Functions

LL_FACTORY (state variable)

The factory type of `LiquidityLockerFactory`.
1
function LL_FACTORY(
2
) view returns (
3
uint8
4
)
Copied!

Return Values:

Index
Name
Type
Internal Type
Description
0
uint8
uint8

SL_FACTORY (state variable)

The factory type of `StakeLockerFactory`.
1
function SL_FACTORY(
2
) view returns (
3
uint8
4
)
Copied!

Return Values:

Index
Name
Type
Internal Type
Description
0
uint8
uint8

createPool

Instantiates a Pool. It emits a `PoolCreated` event.
1
function createPool(
2
address liquidityAsset,
3
address stakeAsset,
4
address slFactory,
5
address llFactory,
6
uint256 stakingFee,
7
uint256 delegateFee,
8
uint256 liquidityCap
9
) nonpayable returns (
10
address poolAddress
11
)
Copied!

Parameters:

Index
Name
Type
Internal Type
Description
0
liquidityAsset
address
address
The asset escrowed in a LiquidityLocker.
1
stakeAsset
address
address
The asset escrowed in a StakeLocker.
2
slFactory
address
address
The factory to instantiate a StakeLocker from.
3
llFactory
address
address
The factory to instantiate a LiquidityLocker from.
4
stakingFee
uint256
uint256
The fee that Stakers earn on interest, in basis points.
5
delegateFee
uint256
uint256
The fee that the Pool Delegate earns on interest, in basis points.
6
liquidityCap
uint256
uint256
The amount of Liquidity Asset accepted by the Pool.

Return Values:

Index
Name
Type
Internal Type
Description
0
poolAddress
address
address
The address of the instantiated Pool.

globals (state variable)

The current MapleGlobals instance.
1
function globals(
2
) view returns (
3
address
4
)
Copied!

Return Values:

Index
Name
Type
Internal Type
Description
0
address
contract IMapleGlobals

isPool (state variable)

1
function isPool(
2
address
3
) view returns (
4
bool
5
)
Copied!

Parameters:

Index
Name
Type
Internal Type
Description
0
``
address
address

Return Values:

Index
Name
Type
Internal Type
Description
0
bool
bool
Whether the contract at `address` is a Pool.

pause

Triggers paused state. Halts functionality for certain functions. Only the Governor or a PoolFactory Admin can call this function.
1
function pause(
2
) nonpayable
Copied!

paused

Returns true if the contract is paused, and false otherwise.
1
function paused(
2
) view returns (
3
bool
4
)
Copied!

Return Values:

Index
Name
Type
Internal Type
Description
0
bool
bool

poolFactoryAdmins (state variable)

1
function poolFactoryAdmins(
2
address
3
) view returns (
4
bool
5
)
Copied!

Parameters:

Index
Name
Type
Internal Type
Description
0
``
address
address

Return Values:

Index
Name
Type
Internal Type
Description
0
bool
bool
Whether the `poolFactoryAdmin` has permission to do certain operations in case of disaster management

pools (state variable)

1
function pools(
2
uint256
3
) view returns (
4
address
5
)
Copied!

Parameters:

Index
Name
Type
Internal Type
Description
0
``
uint256
uint256

Return Values:

Index
Name
Type
Internal Type
Description
0
address
address
The address of the Pool at `index`.

poolsCreated (state variable)

The incrementor for number of Pools created.
1
function poolsCreated(
2
) view returns (
3
uint256
4
)
Copied!

Return Values:

Index
Name
Type
Internal Type
Description
0
uint256
uint256

setGlobals

Sets MapleGlobals instance. Only the Governor can call this function.
1
function setGlobals(
2
address newGlobals
3
) nonpayable
Copied!

Parameters:

Index
Name
Type
Internal Type
Description
0
newGlobals
address
address
The address of new MapleGlobals.

setPoolFactoryAdmin

Sets a PoolFactory Admin. Only the Governor can call this function. It emits a `PoolFactoryAdminSet` event.
1
function setPoolFactoryAdmin(
2
address poolFactoryAdmin,
3
bool allowed
4
) nonpayable
Copied!

Parameters:

Index
Name
Type
Internal Type
Description
0
poolFactoryAdmin
address
address
An address being allowed or disallowed as a PoolFactory Admin.
1
allowed
bool
bool
Whether `poolFactoryAdmin` is allowed as a PoolFactory Admin.

unpause

Triggers unpaused state. Restores functionality for certain functions. Only the Governor or a PoolFactory Admin can call this function.
1
function unpause(
2
) nonpayable
Copied!

Events

Paused

1
event Paused(
2
address account
3
)
Copied!

Parameters:

Index
Name
Type
Internal Type
Description
0
account
address
address

PoolCreated

Emits an event indicating a Pool was created.
1
event PoolCreated(
2
address pool,
3
address delegate,
4
address liquidityAsset,
5
address stakeAsset,
6
address liquidityLocker,
7
address stakeLocker,
8
uint256 stakingFee,
9
uint256 delegateFee,
10
uint256 liquidityCap,
11
string name,
12
string symbol
13
)
Copied!

Parameters:

Index
Name
Type
Internal Type
Description
0
pool
address
address
The address of the Pool.
1
delegate
address
address
The PoolDelegate.
2
liquidityAsset
address
address
The asset Loans will be funded in.
3
stakeAsset
address
address
The asset stake will be locked in.
4
liquidityLocker
address
address
The address of the LiquidityLocker.
5
stakeLocker
address
address
The address of the StakeLocker.
6
stakingFee
uint256
uint256
The fee paid to the Pool Delegate on Loans.
7
delegateFee
uint256
uint256
8
liquidityCap
uint256
uint256
The maximum liquidity the Pool will hold.
9
name
string
string
The name of the Pool FDTs.
10
symbol
string
string
The symbol of the Pool FDTs.

PoolFactoryAdminSet

Emits an event indicating a PoolFactoryAdmin was allowed.
1
event PoolFactoryAdminSet(
2
address poolFactoryAdmin,
3
bool allowed
4
)
Copied!

Parameters:

Index
Name
Type
Internal Type
Description
0
poolFactoryAdmin
address
address
The address of a PoolFactoryAdmin.
1
allowed
bool
bool
Whether `poolFactoryAdmin` is allowed as an admin of the PoolFactory.

Unpaused

1
event Unpaused(
2
address account
3
)
Copied!

Parameters:

Index
Name
Type
Internal Type
Description
0
account
address
address
Last modified 3mo ago