View Source: contracts/core/lifecycle/CoverBase.sol
↗ Extends: ICover, Recoverable ↘ Derived Contracts: Cover
CoverBase
- constructor(IStore store)
- initialize(address liquidityToken, bytes32 liquidityName)
- setCoverFees(uint256 value)
- setMinCoverCreationStake(uint256 value)
- setMinStakeToAddLiquidity(uint256 value)
- getCover(bytes32 key)
- version()
- getName()
Constructs this smart contract
function (IStore store) internal nonpayable Recoverable
Arguments
Name | Type | Description |
---|---|---|
store | IStore | Provide the address of an eternal storage contract to use. This contract must be a member of the Protocol for write access to the storage |
Source Code
constructor(IStore store) Recoverable(store) {}
Initializes this contract
function initialize(address liquidityToken, bytes32 liquidityName) external nonpayable nonReentrant
Arguments
Name | Type | Description |
---|---|---|
liquidityToken | address | Provide the address of the token this cover will be quoted against. |
liquidityName | bytes32 | Enter a description or ENS name of your liquidity token. |
Source Code
function initialize(address liquidityToken, bytes32 liquidityName) external override nonReentrant {
// @suppress-initialization Can only be initialized once by a cover manager
// @suppress-address-trust-issue liquidityToken This instance of liquidityToken can be trusted because of the ACL requirement.
s.mustNotBePaused();
AccessControlLibV1.mustBeCoverManager(s);
require(s.getAddressByKey(ProtoUtilV1.CNS_COVER_STABLECOIN) == address(0), "Already initialized");
s.initializeCoverInternal(liquidityToken, liquidityName);
emit CoverInitialized(liquidityToken, liquidityName);
}
function setCoverFees(uint256 value) external nonpayable nonReentrant
Arguments
Name | Type | Description |
---|---|---|
value | uint256 |
Source Code
function setCoverFees(uint256 value) external override nonReentrant {
require(value > 0, "Please specify value");
s.mustNotBePaused();
AccessControlLibV1.mustBeCoverManager(s);
uint256 previous = s.setCoverFeesInternal(value);
emit CoverFeeSet(previous, value);
}
function setMinCoverCreationStake(uint256 value) external nonpayable nonReentrant
Arguments
Name | Type | Description |
---|---|---|
value | uint256 |
Source Code
function setMinCoverCreationStake(uint256 value) external override nonReentrant {
require(value > 0, "Please specify value");
s.mustNotBePaused();
AccessControlLibV1.mustBeCoverManager(s);
uint256 previous = s.setMinCoverCreationStakeInternal(value);
emit MinCoverCreationStakeSet(previous, value);
}
function setMinStakeToAddLiquidity(uint256 value) external nonpayable nonReentrant
Arguments
Name | Type | Description |
---|---|---|
value | uint256 |
Source Code
function setMinStakeToAddLiquidity(uint256 value) external override nonReentrant {
require(value > 0, "Please specify value");
s.mustNotBePaused();
AccessControlLibV1.mustBeCoverManager(s);
uint256 previous = s.setMinStakeToAddLiquidityInternal(value);
emit MinStakeToAddLiquiditySet(previous, value);
}
Get more information about this cover contract
function getCover(bytes32 key) external view
returns(coverOwner address, info bytes32, values uint256[])
Arguments
Name | Type | Description |
---|---|---|
key | bytes32 | Enter the cover key |
Source Code
function getCover(bytes32 key)
external
view
override
returns (
address coverOwner,
bytes32 info,
uint256[] memory values
)
{
return s.getCoverInfo(key);
}
Version number of this contract
function version() external pure
returns(bytes32)
Arguments
Name | Type | Description |
---|
Source Code
function version() external pure override returns (bytes32) {
return "v0.1";
}
Name of this contract
function getName() external pure
returns(bytes32)
Arguments
Name | Type | Description |
---|
Source Code
function getName() external pure override returns (bytes32) {
return ProtoUtilV1.CNAME_COVER;
}
- AaveStrategy
- AccessControl
- AccessControlLibV1
- Address
- BaseLibV1
- BokkyPooBahsDateTimeLibrary
- BondPool
- BondPoolBase
- BondPoolLibV1
- CompoundStrategy
- console
- Context
- Cover
- CoverBase
- CoverLibV1
- CoverProvision
- CoverReassurance
- CoverStake
- CoverUtilV1
- cxToken
- cxTokenFactory
- cxTokenFactoryLibV1
- Delayable
- Destroyable
- ERC165
- ERC20
- FakeAaveLendingPool
- FakeCompoundDaiDelegator
- FakeRecoverable
- FakeStore
- FakeToken
- FakeUniswapPair
- FakeUniswapV2FactoryLike
- FakeUniswapV2PairLike
- FakeUniswapV2RouterLike
- FaultyAaveLendingPool
- FaultyCompoundDaiDelegator
- Finalization
- ForceEther
- Governance
- GovernanceUtilV1
- IAaveV2LendingPoolLike
- IAccessControl
- IBondPool
- IClaimsProcessor
- ICompoundERC20DelegatorLike
- ICover
- ICoverProvision
- ICoverReassurance
- ICoverStake
- ICxToken
- ICxTokenFactory
- IERC165
- IERC20
- IERC20Detailed
- IERC20Metadata
- IERC3156FlashBorrower
- IERC3156FlashLender
- IFinalization
- IGovernance
- ILendingStrategy
- ILiquidityEngine
- IMember
- InvalidStrategy
- IPausable
- IPolicy
- IPolicyAdmin
- IPriceDiscovery
- IProtocol
- IRecoverable
- IReporter
- IResolution
- IResolvable
- IStakingPools
- IStore
- IUniswapV2FactoryLike
- IUniswapV2PairLike
- IUniswapV2RouterLike
- IUnstakable
- IVault
- IVaultDelegate
- IVaultFactory
- IWitness
- LiquidityEngine
- MaliciousToken
- MockCxToken
- MockCxTokenPolicy
- MockCxTokenStore
- MockFlashBorrower
- MockProcessorStore
- MockProcessorStoreLib
- MockProtocol
- MockStore
- MockVault
- NPM
- NTransferUtilV2
- NTransferUtilV2Intermediate
- Ownable
- Pausable
- Policy
- PolicyAdmin
- PolicyHelperV1
- PoorMansERC20
- PriceDiscovery
- PriceLibV1
- Processor
- ProtoBase
- Protocol
- ProtoUtilV1
- Recoverable
- ReentrancyGuard
- RegistryLibV1
- Reporter
- Resolution
- Resolvable
- RoutineInvokerLibV1
- SafeERC20
- StakingPoolBase
- StakingPoolCoreLibV1
- StakingPoolInfo
- StakingPoolLibV1
- StakingPoolReward
- StakingPools
- Store
- StoreBase
- StoreKeyUtil
- StrategyLibV1
- Strings
- TimelockController
- Unstakable
- ValidationLibV1
- Vault
- VaultBase
- VaultDelegate
- VaultDelegateBase
- VaultDelegateWithFlashLoan
- VaultFactory
- VaultFactoryLibV1
- VaultLibV1
- VaultLiquidity
- VaultStrategy
- WithFlashLoan
- WithPausability
- WithRecovery
- Witness