View Source: contracts/core/governance/resolution/Finalization.sol
↗ Extends: Recoverable, IFinalization ↘ Derived Contracts: Resolvable
Finalization
This contract allows governance agents "finalize" a resolved cover product after the claim period. When a cover product is finalized, it resets back to normal state where tokenholders can again supply liquidity and purchase policies.
function finalize(bytes32 key, uint256 incidentDate) external nonpayable nonReentrant
Arguments
Name | Type | Description |
---|---|---|
key | bytes32 | |
incidentDate | uint256 |
Source Code
function finalize(bytes32 key, uint256 incidentDate) external override nonReentrant {
s.mustNotBePaused();
AccessControlLibV1.mustBeGovernanceAgent(s);
s.mustBeClaimingOrDisputed(key);
s.mustBeValidIncidentDate(key, incidentDate);
s.mustBeAfterClaimExpiry(key);
_finalize(key, incidentDate);
}
function _finalize(bytes32 key, uint256 incidentDate) internal nonpayable
Arguments
Name | Type | Description |
---|---|---|
key | bytes32 | |
incidentDate | uint256 |
Source Code
function _finalize(bytes32 key, uint256 incidentDate) internal {
// Reset to normal
s.setStatus(key, CoverUtilV1.CoverStatus.Normal);
s.deleteUintByKeys(ProtoUtilV1.NS_GOVERNANCE_REPORTING_INCIDENT_DATE, key);
s.deleteUintByKeys(ProtoUtilV1.NS_GOVERNANCE_RESOLUTION_TS, key);
s.deleteUintByKeys(ProtoUtilV1.NS_CLAIM_BEGIN_TS, key);
s.deleteUintByKeys(ProtoUtilV1.NS_CLAIM_EXPIRY_TS, key);
s.deleteAddressByKeys(ProtoUtilV1.NS_GOVERNANCE_REPORTING_WITNESS_YES, key);
s.deleteUintByKeys(ProtoUtilV1.NS_GOVERNANCE_REPORTING_WITNESS_YES, key);
s.updateStateAndLiquidity(key);
emit Finalized(key, msg.sender, incidentDate);
}
- AaveStrategy
- AccessControl
- AccessControlLibV1
- Address
- BaseLibV1
- BokkyPooBahsDateTimeLibrary
- BondPool
- BondPoolBase
- BondPoolLibV1
- CompoundStrategy
- Context
- Controller
- Cover
- CoverBase
- CoverLibV1
- CoverProvision
- CoverReassurance
- CoverStake
- CoverUtilV1
- cxToken
- cxTokenFactory
- cxTokenFactoryLibV1
- Destroyable
- ERC165
- ERC20
- FakeAaveLendingPool
- FakeCompoundERC20Delegator
- FakeRecoverable
- FakeStore
- FakeToken
- FakeUniswapPair
- FakeUniswapV2FactoryLike
- FakeUniswapV2PairLike
- FakeUniswapV2RouterLike
- Finalization
- Governance
- GovernanceUtilV1
- IAaveV2LendingPoolLike
- IAccessControl
- IBondPool
- IClaimsProcessor
- ICommission
- ICompoundERC20DelegatorLike
- ICover
- ICoverProvision
- ICoverReassurance
- ICoverStake
- ICxToken
- ICxTokenFactory
- IERC165
- IERC20
- IERC20Detailed
- IERC20Metadata
- IERC3156FlashBorrower
- IERC3156FlashLender
- IFinalization
- IGovernance
- ILendingStrategy
- IMember
- IPausable
- IPolicy
- IPolicyAdmin
- IPriceDiscovery
- IProtocol
- IRecoverable
- IReporter
- IResolution
- IResolvable
- IStakingPools
- IStore
- IUniswapV2FactoryLike
- IUniswapV2PairLike
- IUniswapV2RouterLike
- IUnstakable
- IVault
- IVaultFactory
- IWitness
- LiquidityEngine
- MaliciousToken
- Migrations
- MockCxToken
- MockCxTokenPolicy
- MockCxTokenStore
- MockProcessorStore
- MockProcessorStoreLib
- MockProtocol
- MockStore
- MockVault
- NTransferUtilV2
- NTransferUtilV2Intermediate
- Ownable
- Pausable
- Policy
- PolicyAdmin
- PolicyHelperV1
- 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
- Unstakable
- ValidationLibV1
- Vault
- VaultBase
- VaultFactory
- VaultFactoryLibV1
- VaultLibV1
- WithFlashLoan
- Witness