View Source: contracts/mock/claims-processor/MockProcessorStore.sol
↗ Extends: MockStore
MockProcessorStoreLib
- initialize(MockStore s, bytes32 coverKey, bytes32 productKey, address cxToken, uint256 incidentDate)
- disassociateCxToken(MockStore s, address cxToken)
- setProductStatus(MockStore s, bytes32 coverKey, bytes32 productKey, uint256 incidentDate, uint256 value)
- setClaimBeginTimestamp(MockStore s, bytes32 coverKey, bytes32 productKey, uint256 value)
- setClaimExpiryTimestamp(MockStore s, bytes32 coverKey, bytes32 productKey, uint256 value)
- initialize(bytes32 coverKey, bytes32 productKey, address cxToken, uint256 incidentDate)
- disassociateCxToken(address cxToken)
- setProductStatus(bytes32 coverKey, bytes32 productKey, uint256 incidentDate, uint256 value)
- setClaimBeginTimestamp(bytes32 coverKey, bytes32 productKey, uint256 value)
- setClaimExpiryTimestamp(bytes32 coverKey, bytes32 productKey, uint256 value)
function initialize(MockStore s, bytes32 coverKey, bytes32 productKey, address cxToken, uint256 incidentDate) external nonpayable
returns(values address[])
Arguments
Name | Type | Description |
---|---|---|
s | MockStore | |
coverKey | bytes32 | |
productKey | bytes32 | |
cxToken | address | |
incidentDate | uint256 |
Source Code
function initialize(
MockStore s,
bytes32 coverKey,
bytes32 productKey,
address cxToken,
uint256 incidentDate
) external returns (address[] memory values) {
MockProtocol protocol = new MockProtocol();
MockVault vault = new MockVault();
FakePriceOracle oracle = new FakePriceOracle();
s.setAddress(ProtoUtilV1.CNS_CORE, address(protocol));
s.setAddress(ProtoUtilV1.CNS_COVER_STABLECOIN, cxToken);
s.setAddress(ProtoUtilV1.CNS_NPM_PRICE_ORACLE, address(oracle));
s.setBool(ProtoUtilV1.NS_COVER_CXTOKEN, cxToken);
s.setBool(ProtoUtilV1.NS_MEMBERS, cxToken);
s.setUint(keccak256(abi.encodePacked(ProtoUtilV1.NS_GOVERNANCE_REPORTING_INCIDENT_DATE, coverKey, productKey)), incidentDate);
s.setBool(ProtoUtilV1.NS_MEMBERS, address(vault));
s.setAddress(ProtoUtilV1.NS_CONTRACTS, "cns:cover:vault", coverKey, address(vault));
setProductStatus(s, coverKey, productKey, incidentDate, 4);
setClaimBeginTimestamp(s, coverKey, productKey, block.timestamp - 100 days); // solhint-disable-line
setClaimExpiryTimestamp(s, coverKey, productKey, block.timestamp + 100 days); // solhint-disable-line
values = new address[](2);
values[0] = address(protocol);
values[1] = address(vault);
}
function disassociateCxToken(MockStore s, address cxToken) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
s | MockStore | |
cxToken | address |
Source Code
function disassociateCxToken(MockStore s, address cxToken) external {
s.unsetBool(ProtoUtilV1.NS_COVER_CXTOKEN, cxToken);
}
function setProductStatus(MockStore s, bytes32 coverKey, bytes32 productKey, uint256 incidentDate, uint256 value) public nonpayable
Arguments
Name | Type | Description |
---|---|---|
s | MockStore | |
coverKey | bytes32 | |
productKey | bytes32 | |
incidentDate | uint256 | |
value | uint256 |
Source Code
function setProductStatus(
MockStore s,
bytes32 coverKey,
bytes32 productKey,
uint256 incidentDate,
uint256 value
) public {
s.setUint(keccak256(abi.encodePacked(ProtoUtilV1.NS_COVER_STATUS, coverKey, productKey, incidentDate)), value);
}
function setClaimBeginTimestamp(MockStore s, bytes32 coverKey, bytes32 productKey, uint256 value) public nonpayable
Arguments
Name | Type | Description |
---|---|---|
s | MockStore | |
coverKey | bytes32 | |
productKey | bytes32 | |
value | uint256 |
Source Code
function setClaimBeginTimestamp(
MockStore s,
bytes32 coverKey,
bytes32 productKey,
uint256 value
) public {
s.setUint(keccak256(abi.encodePacked(ProtoUtilV1.NS_CLAIM_BEGIN_TS, coverKey, productKey)), value);
}
function setClaimExpiryTimestamp(MockStore s, bytes32 coverKey, bytes32 productKey, uint256 value) public nonpayable
Arguments
Name | Type | Description |
---|---|---|
s | MockStore | |
coverKey | bytes32 | |
productKey | bytes32 | |
value | uint256 |
Source Code
function setClaimExpiryTimestamp(
MockStore s,
bytes32 coverKey,
bytes32 productKey,
uint256 value
) public {
s.setUint(keccak256(abi.encodePacked(ProtoUtilV1.NS_CLAIM_EXPIRY_TS, coverKey, productKey)), value);
}
function initialize(bytes32 coverKey, bytes32 productKey, address cxToken, uint256 incidentDate) external nonpayable
returns(values address[])
Arguments
Name | Type | Description |
---|---|---|
coverKey | bytes32 | |
productKey | bytes32 | |
cxToken | address | |
incidentDate | uint256 |
Source Code
function initialize(
bytes32 coverKey,
bytes32 productKey,
address cxToken,
uint256 incidentDate
) external returns (address[] memory values) {
return MockProcessorStoreLib.initialize(this, coverKey, productKey, cxToken, incidentDate);
}
function disassociateCxToken(address cxToken) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
cxToken | address |
Source Code
function disassociateCxToken(address cxToken) external {
MockProcessorStoreLib.disassociateCxToken(this, cxToken);
}
function setProductStatus(bytes32 coverKey, bytes32 productKey, uint256 incidentDate, uint256 value) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
coverKey | bytes32 | |
productKey | bytes32 | |
incidentDate | uint256 | |
value | uint256 |
Source Code
function setProductStatus(
bytes32 coverKey,
bytes32 productKey,
uint256 incidentDate,
uint256 value
) external {
MockProcessorStoreLib.setProductStatus(this, coverKey, productKey, incidentDate, value);
}
function setClaimBeginTimestamp(bytes32 coverKey, bytes32 productKey, uint256 value) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
coverKey | bytes32 | |
productKey | bytes32 | |
value | uint256 |
Source Code
function setClaimBeginTimestamp(
bytes32 coverKey,
bytes32 productKey,
uint256 value
) external {
MockProcessorStoreLib.setClaimBeginTimestamp(this, coverKey, productKey, value);
}
function setClaimExpiryTimestamp(bytes32 coverKey, bytes32 productKey, uint256 value) external nonpayable
Arguments
Name | Type | Description |
---|---|---|
coverKey | bytes32 | |
productKey | bytes32 | |
value | uint256 |
Source Code
function setClaimExpiryTimestamp(
bytes32 coverKey,
bytes32 productKey,
uint256 value
) external {
MockProcessorStoreLib.setClaimExpiryTimestamp(this, coverKey, productKey, value);
}
- 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
- FakeCompoundStablecoinDelegator
- FakePriceOracle
- FakeRecoverable
- FakeStore
- FakeToken
- FakeUniswapPair
- FakeUniswapV2FactoryLike
- FakeUniswapV2PairLike
- FakeUniswapV2RouterLike
- FaultyAaveLendingPool
- FaultyCompoundStablecoinDelegator
- 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
- INeptuneRouterV1
- 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
- NeptuneRouterV1
- 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