View Source: contracts/interfaces/ICover.sol
↗ Extends: IMember ↘ Derived Contracts: CoverBase
ICover
Events
event CoverCreated(bytes32 indexed coverKey, bytes32 info, string tokenName, string tokenSymbol, bool indexed supportsProducts, bool indexed requiresWhitelist);
event ProductCreated(bytes32 indexed coverKey, bytes32 productKey, bytes32 info, bool requiresWhitelist, uint256[] values);
event CoverUpdated(bytes32 indexed coverKey, bytes32 info);
event ProductUpdated(bytes32 indexed coverKey, bytes32 productKey, bytes32 info, uint256[] values);
event ProductStateUpdated(bytes32 indexed coverKey, bytes32 indexed productKey, address indexed updatedBy, bool status, string reason);
event VaultDeployed(bytes32 indexed coverKey, address vault);
event CoverCreatorWhitelistUpdated(address account, bool status);
event CoverUserWhitelistUpdated(bytes32 indexed coverKey, bytes32 indexed productKey, address indexed account, bool status);
event CoverCreationFeeSet(uint256 previous, uint256 current);
event MinCoverCreationStakeSet(uint256 previous, uint256 current);
event MinStakeToAddLiquiditySet(uint256 previous, uint256 current);
event CoverInitialized(address indexed stablecoin, bytes32 withName);
- initialize(address stablecoin, bytes32 friendlyName)
- addCover(bytes32 coverKey, bytes32 info, string tokenName, string tokenSymbol, bool supportsProducts, bool requiresWhitelist, uint256[] values)
- addProduct(bytes32 coverKey, bytes32 productKey, bytes32 info, bool requiresWhitelist, uint256[] values)
- updateProduct(bytes32 coverKey, bytes32 productKey, bytes32 info, uint256[] values)
- updateCover(bytes32 coverKey, bytes32 info)
- updateCoverCreatorWhitelist(address account, bool whitelisted)
- updateCoverUsersWhitelist(bytes32 coverKey, bytes32 productKey, address[] accounts, bool[] statuses)
- disablePolicy(bytes32 coverKey, bytes32 productKey, bool status, string reason)
- checkIfWhitelistedCoverCreator(address account)
- checkIfWhitelistedUser(bytes32 coverKey, bytes32 productKey, address account)
- setCoverCreationFee(uint256 value)
- setMinCoverCreationStake(uint256 value)
- setMinStakeToAddLiquidity(uint256 value)
Initializes this contract
function initialize(address stablecoin, bytes32 friendlyName) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
stablecoin | address | Provide the address of the token this cover will be quoted against. |
friendlyName | bytes32 | Enter a description or ENS name of your liquidity token. |
Source Code
function initialize(address stablecoin, bytes32 friendlyName) external;
Adds a new coverage pool or cover contract.
To add a new cover, you need to pay cover creation fee
and stake minimum amount of NPM in the Vault.
Through the governance portal, projects will be able redeem
the full cover fee at a later date.
Apply for Fee Redemption
https://docs.neptunemutual.com/covers/cover-fee-redemption
As the cover creator, you will earn a portion of all cover fees
generated in this pool.
Read the documentation to learn more about the fees:
https://docs.neptunemutual.com/covers/contract-creators
function addCover(bytes32 coverKey, bytes32 info, string tokenName, string tokenSymbol, bool supportsProducts, bool requiresWhitelist, uint256[] values) external nonpayable
returns(address)
Arguments
Name | Type | Description |
---|---|---|
coverKey | bytes32 | Enter a unique key for this cover |
info | bytes32 | IPFS info of the cover contract |
tokenName | string | |
tokenSymbol | string | |
supportsProducts | bool | |
requiresWhitelist | bool | |
values | uint256[] | [0] stakeWithFee Enter the total NPM amount (stake + fee) to transfer to this contract. |
Source Code
function addCover(
bytes32 coverKey,
bytes32 info,
string calldata tokenName,
string calldata tokenSymbol,
bool supportsProducts,
bool requiresWhitelist,
uint256[] calldata values
) external returns (address);
function addProduct(bytes32 coverKey, bytes32 productKey, bytes32 info, bool requiresWhitelist, uint256[] values) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
coverKey | bytes32 | |
productKey | bytes32 | |
info | bytes32 | |
requiresWhitelist | bool | |
values | uint256[] |
Source Code
function addProduct(
bytes32 coverKey,
bytes32 productKey,
bytes32 info,
bool requiresWhitelist,
uint256[] calldata values
) external;
function updateProduct(bytes32 coverKey, bytes32 productKey, bytes32 info, uint256[] values) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
coverKey | bytes32 | |
productKey | bytes32 | |
info | bytes32 | |
values | uint256[] |
Source Code
function updateProduct(
bytes32 coverKey,
bytes32 productKey,
bytes32 info,
uint256[] calldata values
) external;
Updates the cover contract. This feature is accessible only to the cover owner or protocol owner (governance).
function updateCover(bytes32 coverKey, bytes32 info) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
coverKey | bytes32 | Enter the cover key |
info | bytes32 | Enter a new IPFS URL to update |
Source Code
function updateCover(bytes32 coverKey, bytes32 info) external;
function updateCoverCreatorWhitelist(address account, bool whitelisted) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
account | address | |
whitelisted | bool |
Source Code
function updateCoverCreatorWhitelist(address account, bool whitelisted) external;
function updateCoverUsersWhitelist(bytes32 coverKey, bytes32 productKey, address[] accounts, bool[] statuses) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
coverKey | bytes32 | |
productKey | bytes32 | |
accounts | address[] | |
statuses | bool[] |
Source Code
function updateCoverUsersWhitelist(
bytes32 coverKey,
bytes32 productKey,
address[] calldata accounts,
bool[] calldata statuses
) external;
function disablePolicy(bytes32 coverKey, bytes32 productKey, bool status, string reason) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
coverKey | bytes32 | |
productKey | bytes32 | |
status | bool | |
reason | string |
Source Code
function disablePolicy(
bytes32 coverKey,
bytes32 productKey,
bool status,
string calldata reason
) external;
function checkIfWhitelistedCoverCreator(address account) external view
returns(bool)
Arguments
Name | Type | Description |
---|---|---|
account | address |
Source Code
function checkIfWhitelistedCoverCreator(address account) external view returns (bool);
function checkIfWhitelistedUser(bytes32 coverKey, bytes32 productKey, address account) external view
returns(bool)
Arguments
Name | Type | Description |
---|---|---|
coverKey | bytes32 | |
productKey | bytes32 | |
account | address |
Source Code
function checkIfWhitelistedUser(
bytes32 coverKey,
bytes32 productKey,
address account
) external view returns (bool);
function setCoverCreationFee(uint256 value) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
value | uint256 |
Source Code
function setCoverCreationFee(uint256 value) external;
function setMinCoverCreationStake(uint256 value) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
value | uint256 |
Source Code
function setMinCoverCreationStake(uint256 value) external;
function setMinStakeToAddLiquidity(uint256 value) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
value | uint256 |
Source Code
function setMinStakeToAddLiquidity(uint256 value) external;
- AaveStrategy
- AccessControl
- AccessControlLibV1
- Address
- BaseLibV1
- BokkyPooBahsDateTimeLibrary
- BondPool
- BondPoolBase
- BondPoolLibV1
- CompoundStrategy
- Context
- Cover
- CoverBase
- CoverLibV1
- CoverReassurance
- CoverStake
- CoverUtilV1
- cxToken
- cxTokenFactory
- cxTokenFactoryLibV1
- Delayable
- Destroyable
- ERC165
- ERC20
- FakeAaveLendingPool
- FakeCompoundDaiDelegator
- FakePriceOracle
- FakeRecoverable
- FakeStore
- FakeToken
- FakeUniswapPair
- FakeUniswapV2FactoryLike
- FakeUniswapV2PairLike
- FakeUniswapV2RouterLike
- FaultyAaveLendingPool
- FaultyCompoundDaiDelegator
- Finalization
- ForceEther
- Governance
- GovernanceUtilV1
- IAaveV2LendingPoolLike
- IAccessControl
- IBondPool
- IClaimsProcessor
- ICompoundERC20DelegatorLike
- ICover
- ICoverReassurance
- ICoverStake
- ICxToken
- ICxTokenFactory
- IERC165
- IERC20
- IERC20Detailed
- IERC20Metadata
- IERC3156FlashBorrower
- IERC3156FlashLender
- IFinalization
- IGovernance
- ILendingStrategy
- ILiquidityEngine
- IMember
- InvalidStrategy
- IPausable
- IPolicy
- IPolicyAdmin
- IPriceOracle
- IProtocol
- IRecoverable
- IReporter
- IResolution
- IResolvable
- IStakingPools
- IStore
- IStoreLike
- IUniswapV2FactoryLike
- IUniswapV2PairLike
- IUniswapV2RouterLike
- IUnstakable
- IVault
- IVaultDelegate
- IVaultFactory
- IWitness
- LiquidityEngine
- MaliciousToken
- MockAccessControlUser
- MockCoverUtilUser
- MockCxToken
- MockCxTokenPolicy
- MockCxTokenStore
- MockFlashBorrower
- MockLiquidityEngineUser
- MockProcessorStore
- MockProcessorStoreLib
- MockProtocol
- MockRegistryClient
- MockStore
- MockStoreKeyUtilUser
- MockValidationLibUser
- MockVault
- MockVaultLibUser
- NPM
- NpmDistributor
- NTransferUtilV2
- NTransferUtilV2Intermediate
- Ownable
- Pausable
- Policy
- PolicyAdmin
- PolicyHelperV1
- PoorMansERC20
- POT
- 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