Contract Overview
Balance:
0 AVAX
AVAX Value:
$0.00
My Name Tag:
Not Available, login to update
Txn Hash | Method |
Block
|
From
|
To
|
Value | [Txn Fee] | |||
---|---|---|---|---|---|---|---|---|---|
0x2ccf770bca50cad55739b4bd18e0ac5cdef091ad57d5b01f04393ce32326c6e7 | 0x60806040 | 12710251 | 51 days 15 hrs ago | InsurAce: Deployer | IN | Create: Cover | 0 AVAX | 0.19674468 |
[ Download CSV Export ]
Contract Name:
Cover
Compiler Version
v0.7.3+commit.9bfce1f6
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
/* Copyright (C) 2020 InsurAce.io This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/ */ // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.7.3; import "@openzeppelin/contracts-upgradeable/token/ERC20/SafeERC20Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol"; import {ISecurityMatrix} from "../secmatrix/ISecurityMatrix.sol"; import {Math} from "../common/Math.sol"; import {Constant} from "../common/Constant.sol"; import {ICoverConfig} from "./ICoverConfig.sol"; import {ICoverData} from "./ICoverData.sol"; import {ICoverQuotation} from "./ICoverQuotation.sol"; import {ICapitalPool} from "../pool/ICapitalPool.sol"; import {IPremiumPool} from "../pool/IPremiumPool.sol"; import {IExchangeRate} from "../exchange/IExchangeRate.sol"; import {IReferralProgram} from "../referral/IReferralProgram.sol"; import {IProduct} from "../product/IProduct.sol"; import {ICover} from "./ICover.sol"; import {ICoverPurchase} from "./ICoverPurchase.sol"; import {ICoverCancellation} from "./ICoverCancellation.sol"; contract Cover is ICover, OwnableUpgradeable, PausableUpgradeable, ReentrancyGuardUpgradeable { using SafeERC20Upgradeable for IERC20Upgradeable; using SafeMathUpgradeable for uint256; using AddressUpgradeable for address; // the security matrix address address public smx; // the cover data address address public data; // the cover config address address public cfg; // the cover quotation address address public quotation; // the capital pool address address public capitalPool; // the premium pool address address public premiumPool; // the insur token address address public insur; // buy cover maxmimum block number latency uint256 public buyCoverMaxBlkNumLatency; // buy cover signer flag map (signer -> true/false) mapping(address => bool) public buyCoverSignerFlagMap; // buy cover owner nonce flag map (owner -> nonce -> true/false) mapping(address => mapping(uint256 => bool)) public buyCoverNonceFlagMap; // the exchange rate address address public exchangeRate; // the referral program address address public referralProgram; // the product address address public product; // the cover purchase address address public coverPurchase; // the cover cancellation address address public coverCancellation; function initialize() public initializer { __Ownable_init(); __ReentrancyGuard_init(); } function setup( address securityMatrixAddress, address insurTokenAddress, address _coverDataAddress, address _coverCfgAddress, address _coverQuotationAddress, address _capitalPool, address _premiumPool, address _exchangeRate, address _referralProgram, address _productAddress, address _coverPurchase, address _coverCancellation ) external onlyOwner { require(securityMatrixAddress != address(0), "S:1"); require(insurTokenAddress != address(0), "S:2"); require(_coverDataAddress != address(0), "S:3"); require(_coverCfgAddress != address(0), "S:4"); require(_coverQuotationAddress != address(0), "S:5"); require(_capitalPool != address(0), "S:6"); require(_premiumPool != address(0), "S:7"); require(_exchangeRate != address(0), "S:8"); require(_referralProgram != address(0), "S:9"); require(_productAddress != address(0), "S:10"); require(_coverPurchase != address(0), "S:11"); require(_coverCancellation != address(0), "S:12"); smx = securityMatrixAddress; insur = insurTokenAddress; data = _coverDataAddress; cfg = _coverCfgAddress; quotation = _coverQuotationAddress; capitalPool = _capitalPool; premiumPool = _premiumPool; exchangeRate = _exchangeRate; referralProgram = _referralProgram; product = _productAddress; coverPurchase = _coverPurchase; coverCancellation = _coverCancellation; } function pauseAll() external onlyOwner whenNotPaused { _pause(); } function unPauseAll() external onlyOwner whenPaused { _unpause(); } modifier allowedCaller() { require((ISecurityMatrix(smx).isAllowdCaller(address(this), _msgSender())) || (_msgSender() == owner()), "allowedCaller"); _; } event BuyCoverEvent(address indexed currency, address indexed owner, uint256 coverId, uint256 productId, uint256 durationInDays, uint256 extendedClaimDays, uint256 coverAmount, uint256 estimatedPremium, uint256 coverStatus); event BuyCoverEventV2(address indexed currency, address indexed owner, uint256 coverId, uint256 productId, uint256 durationInDays, uint256 extendedClaimDays, uint256 coverAmount, uint256 estimatedPremium, uint256 coverStatus, uint256 delayEffectiveDays); event BuyCoverOwnerRewardEvent(address indexed owner, uint256 rewardPctg, uint256 insurRewardAmt); function buyCover( uint16[] memory products, uint16[] memory durationInDays, uint256[] memory amounts, address currency, address owner, uint256 referralCode, uint256 premiumAmount, uint256[] memory helperParameters, uint256[] memory securityParameters, uint8[] memory v, bytes32[] memory r, bytes32[] memory s ) external payable override whenNotPaused nonReentrant { { bytes memory msg1 = abi.encodePacked(address(this), products, durationInDays, amounts, currency); bytes memory msg2 = abi.encodePacked(owner, referralCode, currency, premiumAmount, helperParameters, securityParameters); bytes32 msgHash = keccak256(abi.encodePacked(msg1, msg2)); require(_checkSignature(msgHash, v[0], r[0], s[0]), "BCV1: 1"); } _buyCover(products, durationInDays, amounts, currency, owner, referralCode, currency, premiumAmount, helperParameters, securityParameters); } function buyCoverV2( uint16[] memory products, uint16[] memory durationInDays, uint256[] memory amounts, address currency, address owner, uint256 referralCode, address premiumCurrency, uint256 premiumAmount, uint256[] memory helperParameters, uint256[] memory securityParameters, uint8[] memory v, bytes32[] memory r, bytes32[] memory s ) external payable override whenNotPaused nonReentrant { { bytes memory msg1 = abi.encodePacked(address(this), products, durationInDays, amounts, currency); bytes memory msg2 = abi.encodePacked(owner, referralCode, premiumCurrency, premiumAmount, helperParameters, securityParameters); bytes32 msgHash = keccak256(abi.encodePacked(msg1, msg2)); require(_checkSignature(msgHash, v[0], r[0], s[0]), "BCV2: 1"); } _buyCover(products, durationInDays, amounts, currency, owner, referralCode, premiumCurrency, premiumAmount, helperParameters, securityParameters); } function _buyCover( uint16[] memory products, uint16[] memory durationInDays, uint256[] memory amounts, address currency, address owner, uint256 referralCode, address premiumCurrency, uint256 premiumAmount, uint256[] memory helperParameters, uint256[] memory securityParameters ) internal { // check the number of cover details require(products.length == durationInDays.length, "BC: 1"); require(products.length == amounts.length, "BC: 2"); // check if the currency is a valid premium currency require(ICoverConfig(cfg).isValidCurrency(currency), "BC: 3"); // check the beneficiary address list (its length is 2) require(owner != address(0), "BC: 4"); require(address(uint160(referralCode)) != address(0), "BC: 5"); // check the helper parameters (its length is 4) // helperParameters[0] -> totalAmounts (the sum of cover amounts) // helperParameters[1] -> totalWeight (the sum of cover amount * cover duration * cover unit cost) // helperParameters[2] -> coverOwnerRewardPctg (the cover owner reward perentageX10000 of premium, 0 if not set) // helperParameters[3] -> referralRewardPctg (the referral reward perentageX10000 of premium, 0 if not set) require(helperParameters.length == 4, "BC: 6"); // check the security parameters (its length is 2) // securityParameters[0] -> blockNumber (the block number when the signature is generated off-chain) // securityParameters[1] -> nonce (the nonce of the cover owner, can be timestamp in seconds) require(securityParameters.length == 2, "BC: 7"); // check the block number latency require((block.number >= securityParameters[0]) && (block.number - securityParameters[0] <= buyCoverMaxBlkNumLatency), "BC: 8"); // check the cover owner nonce flag require(!buyCoverNonceFlagMap[owner][securityParameters[1]], "BC: 9"); buyCoverNonceFlagMap[owner][securityParameters[1]] = true; // check and receive the premium from this transaction _receivePremium(_msgSender(), premiumCurrency, premiumAmount); // process the cover creation and reward distribution ICoverPurchase(coverPurchase).buyCover(products, durationInDays, amounts, currency, owner, referralCode, premiumCurrency, premiumAmount, helperParameters); } function cancelCover(uint256 coverId) external override whenNotPaused nonReentrant { address owner = _msgSender(); // process the request and refund unearned premium in INSUR token uint256 refundINSURAmount = ICoverCancellation(coverCancellation).cancelCover(owner, coverId); if (refundINSURAmount > 0) { IERC20Upgradeable(insur).safeTransfer(owner, refundINSURAmount); } } function _checkSignature( bytes32 msgHash, uint8 v, bytes32 r, bytes32 s ) internal view returns (bool) { bytes memory prefix = "\x19Ethereum Signed Message:\n32"; bytes32 prefixedHash = keccak256(abi.encodePacked(prefix, msgHash)); address signer = ecrecover(prefixedHash, v, r, s); return buyCoverSignerFlagMap[signer]; } function _receivePremium( address msgSender, address premiumCurrency, uint256 premiumAmount ) internal { if (premiumCurrency == Constant.BCNATIVETOKENADDRESS) { require(premiumAmount <= msg.value, "RCPM: 1"); IPremiumPool(premiumPool).addPremiumAmount{value: premiumAmount}(premiumCurrency, premiumAmount); } else { require(IERC20Upgradeable(premiumCurrency).balanceOf(msgSender) >= premiumAmount, "RCPM: 2"); require(IERC20Upgradeable(premiumCurrency).allowance(msgSender, address(this)) >= premiumAmount, "RCPM: 3"); IERC20Upgradeable(premiumCurrency).safeTransferFrom(msgSender, address(this), premiumAmount); IERC20Upgradeable(premiumCurrency).safeTransfer(premiumPool, premiumAmount); IPremiumPool(premiumPool).addPremiumAmount(premiumCurrency, premiumAmount); } } event UnlockCoverRewardEvent(address indexed owner, uint256 amount); function unlockRewardByController(address _owner, address _to) external override allowedCaller whenNotPaused nonReentrant returns (uint256) { return _unlockReward(_owner, _to); } function _unlockReward(address owner, address to) internal returns (uint256) { uint256 toBeunlockedAmt = ICoverData(data).getBuyCoverInsurTokenEarned(owner); if (toBeunlockedAmt > 0) { ICoverData(data).decreaseTotalInsurTokenRewardAmount(toBeunlockedAmt); ICoverData(data).decreaseBuyCoverInsurTokenEarned(owner, toBeunlockedAmt); IERC20Upgradeable(insur).safeTransfer(to, toBeunlockedAmt); emit UnlockCoverRewardEvent(owner, toBeunlockedAmt); } return toBeunlockedAmt; } function getRewardAmount() external view override returns (uint256) { return ICoverData(data).getBuyCoverInsurTokenEarned(_msgSender()); } function getINSURRewardBalanceDetails() external view override returns (uint256, uint256) { uint256 insurRewardBalance = IERC20Upgradeable(insur).balanceOf(address(this)); uint256 totalRewardRequired = ICoverData(data).getTotalInsurTokenRewardAmount(); return (insurRewardBalance, totalRewardRequired); } function removeINSURRewardBalance(address toAddress, uint256 amount) external override onlyOwner { IERC20Upgradeable(insur).safeTransfer(toAddress, amount); } event SetBuyCoverMaxBlkNumLatencyEvent(uint256 numOfBlocks); function setBuyCoverMaxBlkNumLatency(uint256 numOfBlocks) external override onlyOwner { require(numOfBlocks > 0, "SBCMBNL: 1"); buyCoverMaxBlkNumLatency = numOfBlocks; emit SetBuyCoverMaxBlkNumLatencyEvent(numOfBlocks); } event SetBuyCoverSignerEvent(address indexed signer, bool enabled); function setBuyCoverSigner(address signer, bool enabled) external override onlyOwner { require(signer != address(0), "SBCS: 1"); buyCoverSignerFlagMap[signer] = enabled; emit SetBuyCoverSignerEvent(signer, enabled); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "./IERC20Upgradeable.sol"; import "../../math/SafeMathUpgradeable.sol"; import "../../utils/AddressUpgradeable.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20Upgradeable { using SafeMathUpgradeable for uint256; using AddressUpgradeable for address; function safeTransfer(IERC20Upgradeable token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20Upgradeable token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20Upgradeable token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line max-line-length require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20Upgradeable token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20Upgradeable token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20Upgradeable token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20Upgradeable { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMathUpgradeable { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b > a) return (false, 0); return (true, a - b); } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a / b); } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a % b); } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) return 0; uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: division by zero"); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: modulo by zero"); return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); return a - b; } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryDiv}. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a % b; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/Initializable.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal initializer { __Context_init_unchained(); __Ownable_init_unchained(); } function __Ownable_init_unchained() internal initializer { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } uint256[49] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "./ContextUpgradeable.sol"; import "../proxy/Initializable.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract PausableUpgradeable is Initializable, ContextUpgradeable { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ function __Pausable_init() internal initializer { __Context_init_unchained(); __Pausable_init_unchained(); } function __Pausable_init_unchained() internal initializer { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } uint256[49] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../proxy/Initializable.sol"; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuardUpgradeable is Initializable { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; function __ReentrancyGuard_init() internal initializer { __ReentrancyGuard_init_unchained(); } function __ReentrancyGuard_init_unchained() internal initializer { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } uint256[49] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <0.8.0; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
/* Copyright (C) 2020 InsurAce.io This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/ */ // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.7.3; interface ISecurityMatrix { function isAllowdCaller(address _callee, address _caller) external view returns (bool); }
/* Copyright (C) 2020 InsurAce.io This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/ */ // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.7.3; import "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol"; // a library for performing various math operations library Math { using SafeMathUpgradeable for uint256; function max(uint256 x, uint256 y) internal pure returns (uint256) { return x < y ? y : x; } function min(uint256 x, uint256 y) internal pure returns (uint256) { return x < y ? x : y; } // babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method) function sqrt(uint256 y) internal pure returns (uint256 z) { if (y > 3) { z = y; uint256 x = y.div(2).add(1); while (x < z) { z = x; x = (y.div(x).add(x)).div(2); } } else if (y != 0) { z = 1; } } // power private function function pow(uint256 _base, uint256 _exponent) internal pure returns (uint256) { if (_exponent == 0) { return 1; } else if (_exponent == 1) { return _base; } else if (_base == 0 && _exponent != 0) { return 0; } else { uint256 z = _base; for (uint256 i = 1; i < _exponent; i++) { z = z.mul(_base); } return z; } } }
/* Copyright (C) 2020 InsurAce.io This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/ */ // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.7.3; library Constant { // the standard 10**18 Amount Multiplier uint256 public constant MULTIPLIERX10E18 = 10**18; // the valid ETH and DAI addresses (Rinkeby, TBD: Mainnet) address public constant BCNATIVETOKENADDRESS = address(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE); // product status enumerations uint256 public constant PRODUCTSTATUS_ENABLED = 1; uint256 public constant PRODUCTSTATUS_DISABLED = 2; // the cover status enumerations uint256 public constant COVERSTATUS_ACTIVE = 0; uint256 public constant COVERSTATUS_EXPIRED = 1; uint256 public constant COVERSTATUS_CLAIMINPROGRESS = 2; uint256 public constant COVERSTATUS_CLAIMDONE = 3; uint256 public constant COVERSTATUS_CANCELLED = 4; // the claim status enumerations uint256 public constant CLAIMSTATUS_SUBMITTED = 0; uint256 public constant CLAIMSTATUS_INVESTIGATING = 1; uint256 public constant CLAIMSTATUS_PREPAREFORVOTING = 2; uint256 public constant CLAIMSTATUS_VOTING = 3; uint256 public constant CLAIMSTATUS_VOTINGCOMPLETED = 4; uint256 public constant CLAIMSTATUS_ABDISCRETION = 5; uint256 public constant CLAIMSTATUS_COMPLAINING = 6; uint256 public constant CLAIMSTATUS_COMPLAININGCOMPLETED = 7; uint256 public constant CLAIMSTATUS_ACCEPTED = 8; uint256 public constant CLAIMSTATUS_REJECTED = 9; uint256 public constant CLAIMSTATUS_PAYOUTREADY = 10; uint256 public constant CLAIMSTATUS_PAID = 11; // the voting outcome status enumerations uint256 public constant OUTCOMESTATUS_NONE = 0; uint256 public constant OUTCOMESTATUS_ACCEPTED = 1; uint256 public constant OUTCOMESTATUS_REJECTED = 2; // the referral reward type uint256 public constant REFERRALREWARD_NONE = 0; uint256 public constant REFERRALREWARD_COVER = 1; uint256 public constant REFERRALREWARD_STAKING = 2; }
/* Copyright (C) 2020 InsurAce.io This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/ */ // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.7.3; interface ICoverConfig { function getAllValidCurrencyArray() external view returns (address[] memory); function isValidCurrency(address currency) external view returns (bool); function getMinDurationInDays() external view returns (uint256); function getMaxDurationInDays() external view returns (uint256); function getMinAmountOfCurrency(address currency) external view returns (uint256); function getMaxAmountOfCurrency(address currency) external view returns (uint256); function getCoverConfigDetails() external view returns ( uint256, uint256, address[] memory, uint256[] memory, uint256[] memory ); function getMaxClaimDurationInDaysAfterExpired() external view returns (uint256); function getInsurTokenRewardPercentX10000() external view returns (uint256); function getCancelCoverFeeRateX10000() external view returns (uint256); }
/* Copyright (C) 2020 InsurAce.io This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/ */ // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.7.3; interface ICoverData { function getCoverCount(address owner) external view returns (uint256); function increaseCoverCount(address owner) external returns (uint256); function setNewCoverDetails( address owner, uint256 coverId, uint256 productId, uint256 amount, address currency, address premiumCurrency, uint256 premiumAmount, uint256 beginTimestamp, uint256 endTimestamp, uint256 maxClaimableTimestamp, uint256 coverStatus ) external; function getCoverBeginTimestamp(address owner, uint256 coverId) external view returns (uint256); function setCoverBeginTimestamp( address owner, uint256 coverId, uint256 timestamp ) external; function getCoverEndTimestamp(address owner, uint256 coverId) external view returns (uint256); function setCoverEndTimestamp( address owner, uint256 coverId, uint256 timestamp ) external; function getCoverMaxClaimableTimestamp(address owner, uint256 coverId) external view returns (uint256); function setCoverMaxClaimableTimestamp( address owner, uint256 coverId, uint256 timestamp ) external; function getCoverProductId(address owner, uint256 coverId) external view returns (uint256); function setCoverProductId( address owner, uint256 coverId, uint256 productId ) external; function getCoverCurrency(address owner, uint256 coverId) external view returns (address); function setCoverCurrency( address owner, uint256 coverId, address currency ) external; function getCoverAmount(address owner, uint256 coverId) external view returns (uint256); function setCoverAmount( address owner, uint256 coverId, uint256 amount ) external; function getAdjustedCoverStatus(address owner, uint256 coverId) external view returns (uint256); function setCoverStatus( address owner, uint256 coverId, uint256 coverStatus ) external; function getEligibleClaimAmount(address owner, uint256 coverId) external view returns (uint256); function isValidClaim( address owner, uint256 coverId, uint256 amount ) external view returns (bool); function getCoverEstimatedPremiumAmount(address owner, uint256 coverId) external view returns (uint256); function setCoverEstimatedPremiumAmount( address owner, uint256 coverId, uint256 amount ) external; function getBuyCoverInsurTokenEarned(address owner) external view returns (uint256); function increaseBuyCoverInsurTokenEarned(address owner, uint256 amount) external; function decreaseBuyCoverInsurTokenEarned(address owner, uint256 amount) external; function getTotalInsurTokenRewardAmount() external view returns (uint256); function increaseTotalInsurTokenRewardAmount(uint256 amount) external; function decreaseTotalInsurTokenRewardAmount(uint256 amount) external; function getCoverRewardPctg(address owner, uint256 coverId) external view returns (uint256); function setCoverRewardPctg( address owner, uint256 coverId, uint256 rewardPctg ) external; function getCoverClaimedAmount(address owner, uint256 coverId) external view returns (uint256); function increaseCoverClaimedAmount( address owner, uint256 coverId, uint256 amount ) external; function getCoverReferralRewardPctg(address owner, uint256 coverId) external view returns (uint256); function setCoverReferralRewardPctg( address owner, uint256 coverId, uint256 referralRewardPctg ) external; function getCoverPremiumCurrency(address owner, uint256 coverId) external view returns (address); function setCoverPremiumCurrency( address owner, uint256 coverId, address premiumCurrency ) external; }
/* Copyright (C) 2020 InsurAce.io This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/ */ // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.7.3; interface ICoverQuotation { function getNetUnitCosts( uint256[] memory products, uint256[] memory usedAmounts, uint256[] memory totalAmounts, uint256 allTotalAmount ) external view returns (uint256[] memory); function getGrossUnitCosts( uint256[] memory products, uint256[] memory usedAmounts, uint256[] memory totalAmounts, uint256 allTotalAmount ) external view returns (uint256[] memory); function getPremium( uint256[] memory products, uint256[] memory durationInDays, uint256[] memory amounts, uint256[] memory usedAmounts, uint256[] memory totalAmounts, uint256 allTotalAmount, address currency ) external view returns (uint256, uint256); }
/* Copyright (C) 2020 InsurAce.io This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/ */ // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.7.3; interface ICapitalPool { function canBuyCoverPerProduct( uint256 _productId, uint256 _amount, address _token ) external view returns (bool); function canBuyCover(uint256 _amount, address _token) external view returns (bool); function buyCoverPerProduct( uint256 _productId, uint256 _amount, address _token ) external; function hasTokenInStakersPool(address _token) external view returns (bool); function getCapacityInfo() external view returns (uint256, uint256); function getProductCapacityInfo(uint256[] memory _products) external view returns ( address, uint256[] memory, uint256[] memory ); function getProductCapacityRatio(uint256 _productId) external view returns (uint256); function getBaseToken() external view returns (address); function getCoverAmtPPMaxRatio() external view returns (uint256); function getCoverAmtPPInBaseToken(uint256 _productId) external view returns (uint256); function settlePaymentForClaim( address _token, uint256 _amount, uint256 _claimId ) external; function getStakingPercentageX10000() external view returns (uint256); function getTVLinBaseToken() external view returns (address, uint256); }
/* Copyright (C) 2020 InsurAce.io This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/ */ // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.7.3; interface IPremiumPool { function addPremiumAmount(address _token, uint256 _amount) external payable; function getPremiumPoolAmtInPaymentToken(address _paymentToken) external view returns (uint256); function settlePayoutFromPremium( address _paymentToken, uint256 _settleAmt, address _claimToSettlementPool ) external returns (uint256); }
/* Copyright (C) 2020 InsurAce.io This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/ */ // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.7.3; interface IExchangeRate { function getBaseCurrency() external view returns (address); function setBaseCurrency(address _currency) external; function getAllCurrencyArray() external view returns (address[] memory); function addCurrencies( address[] memory _currencies, uint128[] memory _multipliers, uint128[] memory _rates ) external; function removeCurrency(address _currency) external; function getAllCurrencyRates() external view returns (uint256[] memory); function updateAllCurrencies(uint128[] memory _rates) external; function updateCurrency(address _currency, uint128 _rate) external; function getTokenToTokenAmount( address _fromToken, address _toToken, uint256 _amount ) external view returns (uint256); }
/* Copyright (C) 2020 InsurAce.io This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/ */ // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.7.3; interface IReferralProgram { function getReferralINSURRewardPctg(uint256 rewardType) external view returns (uint256); function setReferralINSURRewardPctg(uint256 rewardType, uint256 percent) external; function getReferralINSURRewardAmount() external view returns (uint256); function getTotalReferralINSURRewardAmount() external view returns (uint256); function getRewardPctg(uint256 rewardType, uint256 overwrittenRewardPctg) external view returns (uint256); function getRewardAmount( uint256 rewardType, uint256 baseAmount, uint256 overwrittenRewardPctg ) external view returns (uint256); function processReferralReward( address referrer, address referee, uint256 rewardType, uint256 baseAmount, uint256 rewardPctg ) external; function unlockRewardByController(address referrer, address to) external returns (uint256); function getINSURRewardBalanceDetails() external view returns (uint256, uint256); function removeINSURRewardBalance(address toAddress, uint256 amount) external; }
/* Copyright (C) 2020 InsurAce.io This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/ */ // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.7.3; interface IProduct { function getProductCount() external view returns (uint256); function getProductDelayEffectiveDays(uint256 productId) external view returns (uint256); function getProductScore(uint256 productId) external view returns (uint256); function getProductStatus(uint256 productId) external view returns (uint256); function getProductDetails(uint256 productId) external view returns ( bytes32, bytes32, bytes32, uint256, uint256, uint256 ); function getAllProductDetails() external view returns ( uint256[] memory, bytes32[] memory, bytes32[] memory, bytes32[] memory, uint256[] memory, uint256[] memory, uint256[] memory ); }
/* Copyright (C) 2020 InsurAce.io This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/ */ // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.7.3; interface ICover { function buyCover( uint16[] memory products, uint16[] memory durationInDays, uint256[] memory amounts, address currency, address owner, uint256 referralCode, uint256 premiumAmount, uint256[] memory helperParameters, uint256[] memory securityParameters, uint8[] memory v, bytes32[] memory r, bytes32[] memory s ) external payable; function buyCoverV2( uint16[] memory products, uint16[] memory durationInDays, uint256[] memory amounts, address currency, address owner, uint256 referralCode, address premiumCurrency, uint256 premiumAmount, uint256[] memory helperParameters, uint256[] memory securityParameters, uint8[] memory v, bytes32[] memory r, bytes32[] memory s ) external payable; function cancelCover(uint256 coverId) external; function unlockRewardByController(address owner, address to) external returns (uint256); function getRewardAmount() external view returns (uint256); function getINSURRewardBalanceDetails() external view returns (uint256, uint256); function removeINSURRewardBalance(address toAddress, uint256 amount) external; function setBuyCoverMaxBlkNumLatency(uint256 numOfBlocks) external; function setBuyCoverSigner(address signer, bool enabled) external; }
/* Copyright (C) 2020 InsurAce.io This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/ */ // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.7.3; interface ICoverPurchase { function setOverallCapacity( address _currency, uint256 _availableAmount, uint256 _numOfBlocksWindowSize ) external; function getOverallCapacity() external view returns ( address, uint256, uint256 ); function prepareBuyCover( uint256[] memory products, uint256[] memory durationInDays, uint256[] memory amounts, uint256[] memory usedAmounts, uint256[] memory totalAmounts, uint256 allTotalAmount, address[] memory currencies, address owner, uint256 referralCode, uint256[] memory rewardPercentages ) external view returns ( uint256, uint256[] memory, uint256, uint256[] memory ); function buyCover( uint16[] memory products, uint16[] memory durationInDays, uint256[] memory amounts, address currency, address owner, uint256 referralCode, address premiumCurrency, uint256 premiumAmount, uint256[] memory helperParameters ) external; }
/* Copyright (C) 2020 InsurAce.io This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/ */ // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.7.3; interface ICoverCancellation { function cancelCover(address owner, uint256 coverId) external returns (uint256); function getINSURAmountDetails(address owner, uint256 coverId) external view returns (uint256, uint256); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../proxy/Initializable.sol"; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract ContextUpgradeable is Initializable { function __Context_init() internal initializer { __Context_init_unchained(); } function __Context_init_unchained() internal initializer { } function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // solhint-disable-next-line compiler-version pragma solidity >=0.4.24 <0.8.0; import "../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { require(_initializing || _isConstructor() || !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } /// @dev Returns true if and only if the function is running in the constructor function _isConstructor() private view returns (bool) { return !AddressUpgradeable.isContract(address(this)); } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"currency","type":"address"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"coverId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"productId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"durationInDays","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"extendedClaimDays","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"coverAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"estimatedPremium","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"coverStatus","type":"uint256"}],"name":"BuyCoverEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"currency","type":"address"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"coverId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"productId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"durationInDays","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"extendedClaimDays","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"coverAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"estimatedPremium","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"coverStatus","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"delayEffectiveDays","type":"uint256"}],"name":"BuyCoverEventV2","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"rewardPctg","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"insurRewardAmt","type":"uint256"}],"name":"BuyCoverOwnerRewardEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"numOfBlocks","type":"uint256"}],"name":"SetBuyCoverMaxBlkNumLatencyEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"signer","type":"address"},{"indexed":false,"internalType":"bool","name":"enabled","type":"bool"}],"name":"SetBuyCoverSignerEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"UnlockCoverRewardEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[{"internalType":"uint16[]","name":"products","type":"uint16[]"},{"internalType":"uint16[]","name":"durationInDays","type":"uint16[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"address","name":"currency","type":"address"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"referralCode","type":"uint256"},{"internalType":"uint256","name":"premiumAmount","type":"uint256"},{"internalType":"uint256[]","name":"helperParameters","type":"uint256[]"},{"internalType":"uint256[]","name":"securityParameters","type":"uint256[]"},{"internalType":"uint8[]","name":"v","type":"uint8[]"},{"internalType":"bytes32[]","name":"r","type":"bytes32[]"},{"internalType":"bytes32[]","name":"s","type":"bytes32[]"}],"name":"buyCover","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"buyCoverMaxBlkNumLatency","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"buyCoverNonceFlagMap","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"buyCoverSignerFlagMap","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16[]","name":"products","type":"uint16[]"},{"internalType":"uint16[]","name":"durationInDays","type":"uint16[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"address","name":"currency","type":"address"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"referralCode","type":"uint256"},{"internalType":"address","name":"premiumCurrency","type":"address"},{"internalType":"uint256","name":"premiumAmount","type":"uint256"},{"internalType":"uint256[]","name":"helperParameters","type":"uint256[]"},{"internalType":"uint256[]","name":"securityParameters","type":"uint256[]"},{"internalType":"uint8[]","name":"v","type":"uint8[]"},{"internalType":"bytes32[]","name":"r","type":"bytes32[]"},{"internalType":"bytes32[]","name":"s","type":"bytes32[]"}],"name":"buyCoverV2","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"coverId","type":"uint256"}],"name":"cancelCover","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"capitalPool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cfg","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"coverCancellation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"coverPurchase","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"data","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"exchangeRate","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getINSURRewardBalanceDetails","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRewardAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"insur","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pauseAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"premiumPool","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"product","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"quotation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"referralProgram","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"toAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"removeINSURRewardBalance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"numOfBlocks","type":"uint256"}],"name":"setBuyCoverMaxBlkNumLatency","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"signer","type":"address"},{"internalType":"bool","name":"enabled","type":"bool"}],"name":"setBuyCoverSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"securityMatrixAddress","type":"address"},{"internalType":"address","name":"insurTokenAddress","type":"address"},{"internalType":"address","name":"_coverDataAddress","type":"address"},{"internalType":"address","name":"_coverCfgAddress","type":"address"},{"internalType":"address","name":"_coverQuotationAddress","type":"address"},{"internalType":"address","name":"_capitalPool","type":"address"},{"internalType":"address","name":"_premiumPool","type":"address"},{"internalType":"address","name":"_exchangeRate","type":"address"},{"internalType":"address","name":"_referralProgram","type":"address"},{"internalType":"address","name":"_productAddress","type":"address"},{"internalType":"address","name":"_coverPurchase","type":"address"},{"internalType":"address","name":"_coverCancellation","type":"address"}],"name":"setup","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"smx","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unPauseAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_to","type":"address"}],"name":"unlockRewardByController","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50613a58806100206000396000f3fe6080604052600436106101e35760003560e01c8063679faa3911610102578063b77b940911610095578063ddeb2d4e11610064578063ddeb2d4e14610a2e578063f2fde38b14610e83578063fe95f82814610eb6578063ffe6e7d714610ecb576101e3565b8063b77b94091461057f578063bf9ce952146105a9578063cdc42344146105be578063d2f4d22b146105d3576101e3565b80638129fc1c116100d15780638129fc1c1461050d5780638da5cb5b146105225780639c9ace0d14610537578063a64fb0a61461056a576101e3565b8063679faa391461046f578063715018a6146104a857806373d4a13a146104bd5780637894b779146104d2576101e3565b80634ba69faa1161017a578063595c6a6711610149578063595c6a67146104075780635bfb75081461041c5780635c975abb146104315780635f3350ff1461045a576101e3565b80634ba69faa146102ff5780634c26a522146103145780634cb5ad7f146103a457806357776aa5146103ce576101e3565b80630b0b9311116101b65780630b0b93111461028557806339a02e23146102c05780633ba0b9a9146102d5578063441da1ba146102ea576101e3565b80630457dad2146101e857806304caf0651461021957806307c97ffb1461024757806309a69f571461025e575b600080fd5b3480156101f457600080fd5b506101fd610ee0565b604080516001600160a01b039092168252519081900360200190f35b34801561022557600080fd5b5061022e610eef565b6040805192835260208301919091528051918290030190f35b34801561025357600080fd5b5061025c610fef565b005b34801561026a57600080fd5b506102736110ab565b60408051918252519081900360200190f35b34801561029157600080fd5b50610273600480360360408110156102a857600080fd5b506001600160a01b0381358116916020013516611135565b3480156102cc57600080fd5b506101fd6112e4565b3480156102e157600080fd5b506101fd6112f3565b3480156102f657600080fd5b506101fd611302565b34801561030b57600080fd5b506101fd611311565b34801561032057600080fd5b5061025c600480360361018081101561033857600080fd5b506001600160a01b038135811691602081013582169160408201358116916060810135821691608082013581169160a081013582169160c082013581169160e0810135821691610100820135811691610120810135821691610140820135811691610160013516611320565b3480156103b057600080fd5b5061025c600480360360208110156103c757600080fd5b5035611763565b3480156103da57600080fd5b5061025c600480360360408110156103f157600080fd5b506001600160a01b038135169060200135611842565b34801561041357600080fd5b5061025c6118bf565b34801561042857600080fd5b506101fd611976565b34801561043d57600080fd5b50610446611985565b604080519115158252519081900360200190f35b34801561046657600080fd5b506101fd61198e565b34801561047b57600080fd5b506104466004803603604081101561049257600080fd5b506001600160a01b03813516906020013561199d565b3480156104b457600080fd5b5061025c6119bd565b3480156104c957600080fd5b506101fd611a69565b3480156104de57600080fd5b5061025c600480360360408110156104f557600080fd5b506001600160a01b0381351690602001351515611a78565b34801561051957600080fd5b5061025c611b7f565b34801561052e57600080fd5b506101fd611c31565b34801561054357600080fd5b506104466004803603602081101561055a57600080fd5b50356001600160a01b0316611c40565b34801561057657600080fd5b506101fd611c55565b34801561058b57600080fd5b5061025c600480360360208110156105a257600080fd5b5035611c64565b3480156105b557600080fd5b506101fd611db6565b3480156105ca57600080fd5b506101fd611dc5565b61025c60048036036101a08110156105ea57600080fd5b810190602081018135600160201b81111561060457600080fd5b82018360208201111561061657600080fd5b803590602001918460208302840111600160201b8311171561063757600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561068657600080fd5b82018360208201111561069857600080fd5b803590602001918460208302840111600160201b831117156106b957600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561070857600080fd5b82018360208201111561071a57600080fd5b803590602001918460208302840111600160201b8311171561073b57600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092956001600160a01b03853581169660208701358216966040810135965060608101359092169450608082013593509060c081019060a00135600160201b8111156107b557600080fd5b8201836020820111156107c757600080fd5b803590602001918460208302840111600160201b831117156107e857600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561083757600080fd5b82018360208201111561084957600080fd5b803590602001918460208302840111600160201b8311171561086a57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156108b957600080fd5b8201836020820111156108cb57600080fd5b803590602001918460208302840111600160201b831117156108ec57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561093b57600080fd5b82018360208201111561094d57600080fd5b803590602001918460208302840111600160201b8311171561096e57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156109bd57600080fd5b8201836020820111156109cf57600080fd5b803590602001918460208302840111600160201b831117156109f057600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611dd4945050505050565b61025c6004803603610180811015610a4557600080fd5b810190602081018135600160201b811115610a5f57600080fd5b820183602082011115610a7157600080fd5b803590602001918460208302840111600160201b83111715610a9257600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610ae157600080fd5b820183602082011115610af357600080fd5b803590602001918460208302840111600160201b83111715610b1457600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610b6357600080fd5b820183602082011115610b7557600080fd5b803590602001918460208302840111600160201b83111715610b9657600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092956001600160a01b03853581169660208701359091169560408101359550606081013594509192509060a081019060800135600160201b811115610c0a57600080fd5b820183602082011115610c1c57600080fd5b803590602001918460208302840111600160201b83111715610c3d57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610c8c57600080fd5b820183602082011115610c9e57600080fd5b803590602001918460208302840111600160201b83111715610cbf57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610d0e57600080fd5b820183602082011115610d2057600080fd5b803590602001918460208302840111600160201b83111715610d4157600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610d9057600080fd5b820183602082011115610da257600080fd5b803590602001918460208302840111600160201b83111715610dc357600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610e1257600080fd5b820183602082011115610e2457600080fd5b803590602001918460208302840111600160201b83111715610e4557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550612169945050505050565b348015610e8f57600080fd5b5061025c60048036036020811015610ea657600080fd5b50356001600160a01b03166124c6565b348015610ec257600080fd5b506102736125c9565b348015610ed757600080fd5b506101fd6125cf565b60cb546001600160a01b031681565b60cf54604080516370a0823160e01b81523060048201529051600092839283926001600160a01b03909216916370a0823191602480820192602092909190829003018186803b158015610f4157600080fd5b505afa158015610f55573d6000803e3d6000fd5b505050506040513d6020811015610f6b57600080fd5b505160ca54604080516301eaa5d760e71b815290519293506000926001600160a01b039092169163f552eb8091600480820192602092909190829003018186803b158015610fb857600080fd5b505afa158015610fcc573d6000803e3d6000fd5b505050506040513d6020811015610fe257600080fd5b5051919350909150509091565b610ff76125de565b6001600160a01b0316611008611c31565b6001600160a01b031614611051576040805162461bcd60e51b815260206004820181905260248201526000805160206139d9833981519152604482015290519081900360640190fd5b611059611985565b6110a1576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6110a96125e2565b565b60ca546000906001600160a01b031663a31ede216110c76125de565b6040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561110457600080fd5b505afa158015611118573d6000803e3d6000fd5b505050506040513d602081101561112e57600080fd5b5051905090565b60c9546000906001600160a01b0316632a1450ea306111526125de565b6040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b15801561119f57600080fd5b505afa1580156111b3573d6000803e3d6000fd5b505050506040513d60208110156111c957600080fd5b5051806111f557506111d9611c31565b6001600160a01b03166111ea6125de565b6001600160a01b0316145b611236576040805162461bcd60e51b815260206004820152600d60248201526c30b63637bbb2b221b0b63632b960991b604482015290519081900360640190fd5b61123e611985565b15611283576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b600260975414156112c9576040805162461bcd60e51b815260206004820152601f602482015260008051602061393f833981519152604482015290519081900360640190fd5b60026097556112d88383612682565b60016097559392505050565b60d6546001600160a01b031681565b60d3546001600160a01b031681565b60cc546001600160a01b031681565b60ce546001600160a01b031681565b6113286125de565b6001600160a01b0316611339611c31565b6001600160a01b031614611382576040805162461bcd60e51b815260206004820181905260248201526000805160206139d9833981519152604482015290519081900360640190fd5b6001600160a01b038c166113c3576040805162461bcd60e51b8152602060048201526003602482015262533a3160e81b604482015290519081900360640190fd5b6001600160a01b038b16611404576040805162461bcd60e51b8152602060048201526003602482015262299d1960e91b604482015290519081900360640190fd5b6001600160a01b038a16611445576040805162461bcd60e51b8152602060048201526003602482015262533a3360e81b604482015290519081900360640190fd5b6001600160a01b038916611486576040805162461bcd60e51b815260206004820152600360248201526214ce8d60ea1b604482015290519081900360640190fd5b6001600160a01b0388166114c7576040805162461bcd60e51b8152602060048201526003602482015262533a3560e81b604482015290519081900360640190fd5b6001600160a01b038716611508576040805162461bcd60e51b8152602060048201526003602482015262299d1b60e91b604482015290519081900360640190fd5b6001600160a01b038616611549576040805162461bcd60e51b8152602060048201526003602482015262533a3760e81b604482015290519081900360640190fd5b6001600160a01b03851661158a576040805162461bcd60e51b81526020600482015260036024820152620a674760eb1b604482015290519081900360640190fd5b6001600160a01b0384166115cb576040805162461bcd60e51b8152602060048201526003602482015262533a3960e81b604482015290519081900360640190fd5b6001600160a01b03831661160f576040805162461bcd60e51b815260206004808301919091526024820152630533a31360e41b604482015290519081900360640190fd5b6001600160a01b038216611653576040805162461bcd60e51b81526020600480830191909152602482015263533a313160e01b604482015290519081900360640190fd5b6001600160a01b038116611697576040805162461bcd60e51b81526020600480830191909152602482015263299d189960e11b604482015290519081900360640190fd5b60c980546001600160a01b03199081166001600160a01b039e8f161790915560cf805482169c8e169c909c17909b5560ca80548c169a8d169a909a1790995560cb80548b16988c169890981790975560cc80548a16968b169690961790955560cd80548916948a169490941790935560ce805488169289169290921790915560d38054871691881691909117905560d48054861691871691909117905560d58054851691861691909117905560d68054841691851691909117905560d780549092169216919091179055565b61176b6125de565b6001600160a01b031661177c611c31565b6001600160a01b0316146117c5576040805162461bcd60e51b815260206004820181905260248201526000805160206139d9833981519152604482015290519081900360640190fd5b60008111611807576040805162461bcd60e51b815260206004820152600a6024820152695342434d424e4c3a203160b01b604482015290519081900360640190fd5b60d08190556040805182815290517f12605320350ba7ef8ab3aa0ccb329aa20c826013b6d739d9d93070a36b711df09181900360200190a150565b61184a6125de565b6001600160a01b031661185b611c31565b6001600160a01b0316146118a4576040805162461bcd60e51b815260206004820181905260248201526000805160206139d9833981519152604482015290519081900360640190fd5b60cf546118bb906001600160a01b03168383612836565b5050565b6118c76125de565b6001600160a01b03166118d8611c31565b6001600160a01b031614611921576040805162461bcd60e51b815260206004820181905260248201526000805160206139d9833981519152604482015290519081900360640190fd5b611929611985565b1561196e576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6110a961288d565b60cd546001600160a01b031681565b60655460ff1690565b60d7546001600160a01b031681565b60d260209081526000928352604080842090915290825290205460ff1681565b6119c56125de565b6001600160a01b03166119d6611c31565b6001600160a01b031614611a1f576040805162461bcd60e51b815260206004820181905260248201526000805160206139d9833981519152604482015290519081900360640190fd5b6033546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3603380546001600160a01b0319169055565b60ca546001600160a01b031681565b611a806125de565b6001600160a01b0316611a91611c31565b6001600160a01b031614611ada576040805162461bcd60e51b815260206004820181905260248201526000805160206139d9833981519152604482015290519081900360640190fd5b6001600160a01b038216611b1f576040805162461bcd60e51b8152602060048201526007602482015266534243533a203160c81b604482015290519081900360640190fd5b6001600160a01b038216600081815260d16020908152604091829020805460ff1916851515908117909155825190815291517fd326b7ceeb8e8f511f9e85adedac8271ff0c316822de1ec8f73765a5a5532e269281900390910190a25050565b600054610100900460ff1680611b985750611b98612910565b80611ba6575060005460ff16155b611be15760405162461bcd60e51b815260040180806020018281038252602e8152602001806139ab602e913960400191505060405180910390fd5b600054610100900460ff16158015611c0c576000805460ff1961ff0019909116610100171660011790555b611c14612921565b611c1c6129be565b8015611c2e576000805461ff00191690555b50565b6033546001600160a01b031690565b60d16020526000908152604090205460ff1681565b60cf546001600160a01b031681565b611c6c611985565b15611cb1576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b60026097541415611cf7576040805162461bcd60e51b815260206004820152601f602482015260008051602061393f833981519152604482015290519081900360640190fd5b60026097556000611d066125de565b60d75460408051630133f3dd60e41b81526001600160a01b038085166004830152602482018790529151939450600093919092169163133f3dd091604480830192602092919082900301818787803b158015611d6157600080fd5b505af1158015611d75573d6000803e3d6000fd5b505050506040513d6020811015611d8b57600080fd5b505190508015611dac5760cf54611dac906001600160a01b03168383612836565b5050600160975550565b60d5546001600160a01b031681565b60d4546001600160a01b031681565b611ddc611985565b15611e21576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b60026097541415611e67576040805162461bcd60e51b815260206004820152601f602482015260008051602061393f833981519152604482015290519081900360640190fd5b60026097819055506060308e8e8e8e60405160200180866001600160a01b031660601b8152601401858051906020019060200280838360005b83811015611eb8578181015183820152602001611ea0565b50505050905001848051906020019060200280838360005b83811015611ee8578181015183820152602001611ed0565b50505050905001838051906020019060200280838360005b83811015611f18578181015183820152602001611f00565b50505050905001826001600160a01b031660601b815260140195505050505050604051602081830303815290604052905060608a8a8a8a8a8a60405160200180876001600160a01b031660601b8152601401868152602001856001600160a01b031660601b8152601401848152602001838051906020019060200280838360005b83811015611fb1578181015183820152602001611f99565b50505050905001828051906020019060200280838360005b83811015611fe1578181015183820152602001611fc9565b5050505090500196505050505050506040516020818303038152906040529050600082826040516020018083805190602001908083835b602083106120375780518252601f199092019160209182019101612018565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b6020831061207f5780518252601f199092019160209182019101612060565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405280519060200120905061210581876000815181106120ce57fe5b6020026020010151876000815181106120e357fe5b6020026020010151876000815181106120f857fe5b6020026020010151612a53565b612140576040805162461bcd60e51b8152602060048201526007602482015266424356323a203160c81b604482015290519081900360640190fd5b5050506121558d8d8d8d8d8d8d8d8d8d612b84565b505060016097555050505050505050505050565b612171611985565b156121b6576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b600260975414156121fc576040805162461bcd60e51b815260206004820152601f602482015260008051602061393f833981519152604482015290519081900360640190fd5b60026097819055506060308d8d8d8d60405160200180866001600160a01b031660601b8152601401858051906020019060200280838360005b8381101561224d578181015183820152602001612235565b50505050905001848051906020019060200280838360005b8381101561227d578181015183820152602001612265565b50505050905001838051906020019060200280838360005b838110156122ad578181015183820152602001612295565b50505050905001826001600160a01b031660601b8152601401955050505050506040516020818303038152906040529050606089898c8a8a8a60405160200180876001600160a01b031660601b8152601401868152602001856001600160a01b031660601b8152601401848152602001838051906020019060200280838360005b8381101561234657818101518382015260200161232e565b50505050905001828051906020019060200280838360005b8381101561237657818101518382015260200161235e565b5050505090500196505050505050506040516020818303038152906040529050600082826040516020018083805190602001908083835b602083106123cc5780518252601f1990920191602091820191016123ad565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b602083106124145780518252601f1990920191602091820191016123f5565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405280519060200120905061246381876000815181106120ce57fe5b61249e576040805162461bcd60e51b8152602060048201526007602482015266424356313a203160c81b604482015290519081900360640190fd5b5050506124b38c8c8c8c8c8c8f8d8d8d612b84565b5050600160975550505050505050505050565b6124ce6125de565b6001600160a01b03166124df611c31565b6001600160a01b031614612528576040805162461bcd60e51b815260206004820181905260248201526000805160206139d9833981519152604482015290519081900360640190fd5b6001600160a01b03811661256d5760405162461bcd60e51b815260040180806020018281038252602681526020018061395f6026913960400191505060405180910390fd5b6033546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3603380546001600160a01b0319166001600160a01b0392909216919091179055565b60d05481565b60c9546001600160a01b031681565b3390565b6125ea611985565b612632576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6065805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6126656125de565b604080516001600160a01b039092168252519081900360200190a1565b60ca546040805163a31ede2160e01b81526001600160a01b03858116600483015291516000938493169163a31ede21916024808301926020929190829003018186803b1580156126d157600080fd5b505afa1580156126e5573d6000803e3d6000fd5b505050506040513d60208110156126fb57600080fd5b50519050801561282f5760ca5460408051639f44ff8d60e01b81526004810184905290516001600160a01b0390921691639f44ff8d9160248082019260009290919082900301818387803b15801561275257600080fd5b505af1158015612766573d6000803e3d6000fd5b505060ca546040805163710bf84d60e01b81526001600160a01b03898116600483015260248201879052915191909216935063710bf84d9250604480830192600092919082900301818387803b1580156127bf57600080fd5b505af11580156127d3573d6000803e3d6000fd5b505060cf546127ef92506001600160a01b031690508483612836565b6040805182815290516001600160a01b038616917fcda7ed6c14eca52ea33cd0011e0aa301a0d2d857b38df26366b098d36344263f919081900360200190a25b9392505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526128889084906130e6565b505050565b612895611985565b156128da576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6065805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586126656125de565b600061291b30613197565b15905090565b600054610100900460ff168061293a575061293a612910565b80612948575060005460ff16155b6129835760405162461bcd60e51b815260040180806020018281038252602e8152602001806139ab602e913960400191505060405180910390fd5b600054610100900460ff161580156129ae576000805460ff1961ff0019909116610100171660011790555b6129b661319d565b611c1c61323d565b600054610100900460ff16806129d757506129d7612910565b806129e5575060005460ff16155b612a205760405162461bcd60e51b815260040180806020018281038252602e8152602001806139ab602e913960400191505060405180910390fd5b600054610100900460ff16158015612a4b576000805460ff1961ff0019909116610100171660011790555b611c1c613336565b600060606040518060400160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152509050600081876040516020018083805190602001908083835b60208310612ac55780518252601f199092019160209182019101612aa6565b51815160209384036101000a600019018019909216911617905292019384525060408051808503815284830180835281519184019190912060009182905282860180845281905260ff8d166060870152608086018c905260a086018b90529151919650945060019360c08082019450601f19830192918290030190855afa158015612b54573d6000803e3d6000fd5b505060408051601f1901516001600160a01b0316600090815260d1602052205460ff169998505050505050505050565b88518a5114612bc2576040805162461bcd60e51b815260206004820152600560248201526442433a203160d81b604482015290519081900360640190fd5b87518a5114612c00576040805162461bcd60e51b815260206004820152600560248201526421219d101960d91b604482015290519081900360640190fd5b60cb54604080516309f724ab60e31b81526001600160a01b038a8116600483015291519190921691634fb92558916024808301926020929190829003018186803b158015612c4d57600080fd5b505afa158015612c61573d6000803e3d6000fd5b505050506040513d6020811015612c7757600080fd5b5051612cb2576040805162461bcd60e51b815260206004820152600560248201526442433a203360d81b604482015290519081900360640190fd5b6001600160a01b038616612cf5576040805162461bcd60e51b81526020600482015260056024820152641090ce880d60da1b604482015290519081900360640190fd5b6001600160a01b038516612d38576040805162461bcd60e51b815260206004820152600560248201526442433a203560d81b604482015290519081900360640190fd5b8151600414612d76576040805162461bcd60e51b815260206004820152600560248201526421219d101b60d91b604482015290519081900360640190fd5b8051600214612db4576040805162461bcd60e51b815260206004820152600560248201526442433a203760d81b604482015290519081900360640190fd5b80600081518110612dc157fe5b60200260200101514310158015612df0575060d05481600081518110612de357fe5b6020026020010151430311155b612e29576040805162461bcd60e51b8152602060048201526005602482015264084867440760db1b604482015290519081900360640190fd5b6001600160a01b038616600090815260d260205260408120825190919083906001908110612e5357fe5b60209081029190910181015182528101919091526040016000205460ff1615612eab576040805162461bcd60e51b815260206004820152600560248201526442433a203960d81b604482015290519081900360640190fd5b6001600160a01b038616600090815260d260205260408120825160019290849084908110612ed557fe5b6020026020010151815260200190815260200160002060006101000a81548160ff021916908315150217905550612f14612f0d6125de565b85856133dc565b60d660009054906101000a90046001600160a01b03166001600160a01b0316630d1d9d168b8b8b8b8b8b8b8b8b6040518a63ffffffff1660e01b8152600401808060200180602001806020018a6001600160a01b03168152602001896001600160a01b03168152602001888152602001876001600160a01b031681526020018681526020018060200185810385528e818151815260200191508051906020019060200280838360005b83811015612fd5578181015183820152602001612fbd565b5050505090500185810384528d818151815260200191508051906020019060200280838360005b83811015613014578181015183820152602001612ffc565b5050505090500185810383528c818151815260200191508051906020019060200280838360005b8381101561305357818101518382015260200161303b565b50505050905001858103825286818151815260200191508051906020019060200280838360005b8381101561309257818101518382015260200161307a565b505050509050019d5050505050505050505050505050600060405180830381600087803b1580156130c257600080fd5b505af11580156130d6573d6000803e3d6000fd5b5050505050505050505050505050565b606061313b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166136c79092919063ffffffff16565b8051909150156128885780806020019051602081101561315a57600080fd5b50516128885760405162461bcd60e51b815260040180806020018281038252602a8152602001806139f9602a913960400191505060405180910390fd5b3b151590565b600054610100900460ff16806131b657506131b6612910565b806131c4575060005460ff16155b6131ff5760405162461bcd60e51b815260040180806020018281038252602e8152602001806139ab602e913960400191505060405180910390fd5b600054610100900460ff16158015611c1c576000805460ff1961ff0019909116610100171660011790558015611c2e576000805461ff001916905550565b600054610100900460ff16806132565750613256612910565b80613264575060005460ff16155b61329f5760405162461bcd60e51b815260040180806020018281038252602e8152602001806139ab602e913960400191505060405180910390fd5b600054610100900460ff161580156132ca576000805460ff1961ff0019909116610100171660011790555b60006132d46125de565b603380546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508015611c2e576000805461ff001916905550565b600054610100900460ff168061334f575061334f612910565b8061335d575060005460ff16155b6133985760405162461bcd60e51b815260040180806020018281038252602e8152602001806139ab602e913960400191505060405180910390fd5b600054610100900460ff161580156133c3576000805460ff1961ff0019909116610100171660011790555b60016097558015611c2e576000805461ff001916905550565b6001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156134b65734811115613440576040805162461bcd60e51b81526020600482015260076024820152665243504d3a203160c81b604482015290519081900360640190fd5b60ce5460408051632aed081d60e01b81526001600160a01b0385811660048301526024820185905291519190921691632aed081d91849160448082019260009290919082900301818588803b15801561349857600080fd5b505af11580156134ac573d6000803e3d6000fd5b5050505050612888565b80826001600160a01b03166370a08231856040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561350457600080fd5b505afa158015613518573d6000803e3d6000fd5b505050506040513d602081101561352e57600080fd5b5051101561356d576040805162461bcd60e51b81526020600482015260076024820152662921a8269d101960c91b604482015290519081900360640190fd5b60408051636eb1769f60e11b81526001600160a01b0385811660048301523060248301529151839285169163dd62ed3e916044808301926020929190829003018186803b1580156135bd57600080fd5b505afa1580156135d1573d6000803e3d6000fd5b505050506040513d60208110156135e757600080fd5b50511015613626576040805162461bcd60e51b81526020600482015260076024820152665243504d3a203360c81b604482015290519081900360640190fd5b61363b6001600160a01b0383168430846136de565b60ce54613655906001600160a01b03848116911683612836565b60ce5460408051632aed081d60e01b81526001600160a01b0385811660048301526024820185905291519190921691632aed081d91604480830192600092919082900301818387803b1580156136aa57600080fd5b505af11580156136be573d6000803e3d6000fd5b50505050505050565b60606136d6848460008561373e565b949350505050565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526137389085906130e6565b50505050565b60608247101561377f5760405162461bcd60e51b81526004018080602001828103825260268152602001806139856026913960400191505060405180910390fd5b61378885613197565b6137d9576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106138185780518252601f1990920191602091820191016137f9565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461387a576040519150601f19603f3d011682016040523d82523d6000602084013e61387f565b606091505b509150915061388f82828661389a565b979650505050505050565b606083156138a957508161282f565b8251156138b95782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156139035781810151838201526020016138eb565b50505050905090810190601f1680156139305780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe5265656e7472616e637947756172643a207265656e7472616e742063616c6c004f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a65644f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220b916e8eb1190d9cba075dd70c06c2e7a712f9bc3563485e276628f69d21376c164736f6c63430007030033
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.