PrimeLiquidityProvider is used to fund Prime
The default max token distribution speed
Address of the Prime contract
The rate at which token is distributed (per block)
The max token distribution speed for token
The rate at which token is distributed to the Prime contract
The token accrued but not yet transferred to prime contract
PrimeLiquidityProvider initializer
Parameters
❌ Errors
Throw InvalidArguments on different length of tokens and speeds array
Initialize the distribution of the token
Parameters
⛔️ Access Requirements
Only Governance
Pause fund transfer of tokens to Prime contract
⛔️ Access Requirements
Controlled by ACM
Resume fund transfer of tokens to Prime contract
⛔️ Access Requirements
Controlled by ACM
Set distribution speed (amount of token distribute per block)
Parameters
⛔️ Access Requirements
Controlled by ACM
❌ Errors
Throw InvalidArguments on different length of tokens and speeds array
Set max distribution speed for token (amount of maximum token distribute per block)
Parameters
⛔️ Access Requirements
Controlled by ACM
❌ Errors
Throw InvalidArguments on different length of tokens and speeds array
Set the prime token contract address
Parameters
📅 Events
Emits PrimeTokenUpdated event
⛔️ Access Requirements
Only owner
Set the limit for the loops can iterate to avoid the DOS
Parameters
📅 Events
Emits MaxLoopsLimitUpdated event on success
⛔️ Access Requirements
Controlled by ACM
Claim all the token accrued till last block
Parameters
📅 Events
Emits TokenTransferredToPrime event
❌ Errors
Throw InvalidArguments on Zero address(token)
Throw FundsTransferIsPaused is paused
Throw InvalidCaller if the sender is not the Prime contract
A public function to sweep accidental ERC-20 transfers to this contract. Tokens are sent to user
Parameters
📅 Events
Emits SweepToken event
⛔️ Access Requirements
Only Governance
❌ Errors
Throw InsufficientBalance if amount_ is greater than the available balance of the token in the contract
Get rewards per block for token
Parameters
Return Values
Accrue token by updating the distribution state
Parameters
📅 Events
Emits TokensAccrued event
Get the latest block number
Return Values
loopsLimit_
uint256
Maximum number of loops allowed in a single transaction
accessControlManager_
address
AccessControlManager contract address
tokens_
address[]
Array of addresses of the tokens
distributionSpeeds_
uint256[]
New distribution speeds for tokens
maxDistributionSpeeds_
uint256[]
tokens_
address[]
Array of addresses of the tokens to be intialized
tokens_
address[]
Array of addresses of the tokens
distributionSpeeds_
uint256[]
New distribution speeds for tokens
tokens_
address[]
Array of addresses of the tokens
maxDistributionSpeeds_
uint256[]
New distribution speeds for tokens
prime_
address
The new address of the prime token contract
loopsLimit
uint256
Limit for the max loops can execute at a time
token_
address
The token to release to the Prime contract
token_
contract IERC20Upgradeable
The address of the ERC-20 token to sweep
to_
address
The address of the recipient
amount_
uint256
The amount of tokens needs to transfer
token_
address
Address of the token
[0]
uint256
speed returns the per block reward
token_
address
Address of the token
[0]
uint256
blockNumber returns the block number
uint256 DEFAULT_MAX_DISTRIBUTION_SPEEDaddress primemapping(address => uint256) tokenDistributionSpeedsmapping(address => uint256) maxTokenDistributionSpeedsmapping(address => uint256) lastAccruedBlockmapping(address => uint256) tokenAmountAccruedfunction initialize(address accessControlManager_, address[] tokens_, uint256[] distributionSpeeds_, uint256[] maxDistributionSpeeds_, uint256 loopsLimit_) externalfunction initializeTokens(address[] tokens_) externalfunction pauseFundsTransfer() externalfunction resumeFundsTransfer() externalfunction setTokensDistributionSpeed(address[] tokens_, uint256[] distributionSpeeds_) externalfunction setMaxTokensDistributionSpeed(address[] tokens_, uint256[] maxDistributionSpeeds_) externalfunction setPrimeToken(address prime_) externalfunction setMaxLoopsLimit(uint256 loopsLimit) externalfunction releaseFunds(address token_) externalfunction sweepToken(contract IERC20Upgradeable token_, address to_, uint256 amount_) externalfunction getEffectiveDistributionSpeed(address token_) external view returns (uint256)function accrueTokens(address token_) publicfunction getBlockNumber() public view virtual returns (uint256)