ETH Price: $2,506.21 (-0.30%)

Token

ERC20 ***
 

Overview

Max Total Supply

3,753.774359565629122343 ERC20 ***

Holders

116

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

Balance
0 ERC20 ***

Value
$0.00
0x571feb6a7cdcb406cf1f219f2bb2f6072a6bd3d6
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x7cdaC79c...58A4eDcAF
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
InitializableAdminUpgradeabilityProxy

Compiler Version
v0.7.3+commit.9bfce1f6

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 25 : InitializableAdminUpgradeabilityProxy.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: No License
pragma solidity ^0.7.3;
import './BaseAdminUpgradeabilityProxy.sol';
/**
* @title InitializableAdminUpgradeabilityProxy
* @dev Extends from BaseAdminUpgradeabilityProxy with an initializer for
* initializing the implementation, admin, and init data.
*/
contract InitializableAdminUpgradeabilityProxy is BaseAdminUpgradeabilityProxy {
/**
* Contract initializer.
* @param _logic address of the initial implementation.
* @param _admin Address of the proxy administrator.
* @param _data Data to send as msg.data to the implementation to initialize the proxied contract.
* It should include the signature and the parameters of the function to be called, as described in
* https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding.
* This parameter is optional, if no data is given the initialization call to proxied contract will be skipped.
*/
function initialize(address _logic, address _admin, bytes memory _data) public payable {
require(_implementation() == address(0));
assert(IMPLEMENTATION_SLOT == bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1));
_setImplementation(_logic);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 2 of 25 : ClaimConfig.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.3;
import "./utils/SafeMath.sol";
import "./utils/Ownable.sol";
import "./interfaces/IClaimConfig.sol";
import "./interfaces/IProtocol.sol";
/**
* @title Config for ClaimManagement contract
* @author Alan
*/
contract ClaimConfig is IClaimConfig, Ownable {
using SafeMath for uint256;
bool public override allowPartialClaim = true;
address public override auditor;
address public override governance;
address public override treasury;
address public override protocolFactory;
// The max time allowed from filing a claim to a decision made
uint256 public override maxClaimDecisionWindow = 7 days;
uint256 public override baseClaimFee = 10e18;
uint256 public override forceClaimFee = 500e18;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 3 of 25 : SafeMath.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.3;
/**
* @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 SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 4 of 25 : Ownable.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: No License
pragma solidity ^0.7.3;
import "../interfaces/IOwnable.sol";
import "./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.
* @author crypto-pumpkin@github
*
* By initialization, the owner account will be the one that called initializeOwner. 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.
*/
contract Ownable is Initializable {
address private _owner;
address private _newOwner;
event OwnershipTransferInitiated(address indexed previousOwner, address indexed newOwner);
event OwnershipTransferCompleted(address indexed previousOwner, address indexed newOwner);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 5 of 25 : IClaimConfig.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.3;
import "./IERC20.sol";
/**
* @dev ClaimConfg contract interface. See {ClaimConfig}.
* @author Alan
*/
interface IClaimConfig {
function allowPartialClaim() external view returns (bool);
function auditor() external view returns (address);
function governance() external view returns (address);
function treasury() external view returns (address);
function protocolFactory() external view returns (address);
function maxClaimDecisionWindow() external view returns (uint256);
function baseClaimFee() external view returns (uint256);
function forceClaimFee() external view returns (uint256);
function feeMultiplier() external view returns (uint256);
function feeCurrency() external view returns (IERC20);
function getFileClaimWindow(address _protocol) external view returns (uint256);
// @dev Only callable by governance
function setMaxClaimDecisionWindow(uint256 _newTimeWindow) external;
function setGovernance(address _governance) external;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 6 of 25 : IProtocol.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: No License
pragma solidity ^0.7.3;
/**
* @dev Protocol contract interface. See {Protocol}.
* @author crypto-pumpkin@github
*/
interface IProtocol {
/// @notice emit when a claim against the protocol is accepted
event ClaimAccepted(uint256 newClaimNonce);
function getProtocolDetails()
external view returns (
bytes32 _name,
bool _active,
uint256 _claimNonce,
uint256 _claimRedeemDelay,
uint256 _noclaimRedeemDelay,
address[] memory _collaterals,
uint48[] memory _expirationTimestamps,
address[] memory _allCovers,
address[] memory _allActiveCovers
);
function active() external view returns (bool);
function name() external view returns (bytes32);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 7 of 25 : IOwnable.sol
1
2
3
4
5
6
7
8
9
10
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.3;
/**
* @title Interface of Ownable
*/
interface IOwnable {
function owner() external view returns (address);
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 8 of 25 : Initializable.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT
// solhint-disable-next-line compiler-version
pragma solidity >=0.4.24 <0.8.0;
/**
* @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;
/**
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 9 of 25 : IERC20.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// SPDX-License-Identifier: No License
pragma solidity ^0.7.3;
/**
* @title Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
function symbol() external view returns (string memory);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function approve(address spender, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
function totalSupply() external view returns (uint256);
function increaseAllowance(address spender, uint256 addedValue) external returns (bool);
function decreaseAllowance(address spender, uint256 subtractedValue) external returns (bool);
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 10 of 25 : ClaimManagement.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.3;
pragma experimental ABIEncoderV2;
import "./ClaimConfig.sol";
import "./interfaces/IProtocol.sol";
import "./interfaces/IProtocolFactory.sol";
import "./interfaces/IClaimManagement.sol";
/**
* @title Claim Management for claims filed for a COVER supported protocol
* @author Alan
*/
contract ClaimManagement is IClaimManagement, ClaimConfig {
using SafeMath for uint256;
// protocol => nonce => Claim[]
mapping(address => mapping(uint256 => Claim[])) public override protocolClaims;
modifier onlyApprovedDecider() {
if (isAuditorVoting()) {
require(msg.sender == auditor, "COVER_CM: !auditor");
} else {
require(msg.sender == governance, "COVER_CM: !governance");
}
_;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 11 of 25 : IProtocolFactory.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: No License
pragma solidity ^0.7.3;
/**
* @dev ProtocolFactory contract interface. See {ProtocolFactory}.
* @author crypto-pumpkin@github
*/
interface IProtocolFactory {
/// @notice emit when a new protocol is supported in COVER
event ProtocolInitiation(address protocolAddress);
function getAllProtocolAddresses() external view returns (address[] memory);
function getRedeemFees() external view returns (uint16 _numerator, uint16 _denominator);
function redeemFeeNumerator() external view returns (uint16);
function redeemFeeDenominator() external view returns (uint16);
function protocolImplementation() external view returns (address);
function coverImplementation() external view returns (address);
function coverERC20Implementation() external view returns (address);
function treasury() external view returns (address);
function governance() external view returns (address);
function claimManager() external view returns (address);
function protocols(bytes32 _protocolName) external view returns (address);
function getProtocolsLength() external view returns (uint256);
function getProtocolNameAndAddress(uint256 _index) external view returns (bytes32, address);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 12 of 25 : IClaimManagement.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.3;
pragma experimental ABIEncoderV2;
/**
* @dev ClaimManagement contract interface. See {ClaimManagement}.
* @author Alan
*/
interface IClaimManagement {
enum ClaimState { Filed, ForceFiled, Validated, Invalidated, Accepted, Denied }
struct Claim {
ClaimState state; // Current state of claim
address filedBy; // Address of user who filed claim
uint16 payoutNumerator; // Numerator of percent to payout
uint16 payoutDenominator; // Denominator of percent to payout
uint48 filedTimestamp; // Timestamp of submitted claim
uint48 incidentTimestamp; // Timestamp of the incident the claim is filed for
uint48 decidedTimestamp; // Timestamp when claim outcome is decided
uint256 feePaid; // Fee paid to file the claim
}
function protocolClaims(address _protocol, uint256 _nonce, uint256 _index) external view returns (
ClaimState state,
address filedBy,
uint16 payoutNumerator,
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 13 of 25 : ProtocolFactory.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: No License
pragma solidity ^0.7.3;
import "./proxy/InitializableAdminUpgradeabilityProxy.sol";
import "./utils/Address.sol";
import "./utils/Create2.sol";
import "./utils/Ownable.sol";
import "./interfaces/IProtocolFactory.sol";
/**
* @title ProtocolFactory contract
* @author crypto-pumpkin@github
*/
contract ProtocolFactory is IProtocolFactory, Ownable {
bytes4 private constant PROTOCOL_INIT_SIGNITURE = bytes4(keccak256("initialize(bytes32,bool,address,uint48[],bytes32[])"));
uint16 public override redeemFeeNumerator = 10; // 0 to 65,535
uint16 public override redeemFeeDenominator = 10000; // 0 to 65,535
address public override protocolImplementation;
address public override coverImplementation;
address public override coverERC20Implementation;
address public override treasury;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 14 of 25 : Address.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.3;
library Address {
/**
* @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) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. `keccak256('')`
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 15 of 25 : Create2.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.3;
/**
* @dev Helper to make usage of the `CREATE2` EVM opcode easier and safer.
* `CREATE2` can be used to compute in advance the address where a smart
* contract will be deployed, which allows for interesting new mechanisms known
* as 'counterfactual interactions'.
*
* See the https://eips.ethereum.org/EIPS/eip-1014#motivation[EIP] for more
* information.
*/
library Create2 {
/**
* @dev Deploys a contract using `CREATE2`. The address where the contract
* will be deployed can be known in advance via {computeAddress}.
*
* The bytecode for a contract can be obtained from Solidity with
* `type(contractName).creationCode`.
*
* Requirements:
*
* - `bytecode` must not be empty.
* - `salt` must have not been used for `bytecode` already.
* - the factory must have a balance of at least `amount`.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 16 of 25 : BaseAdminUpgradeabilityProxy.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.3;
import './BaseUpgradeabilityProxy.sol';
/**
* @title BaseAdminUpgradeabilityProxy
* @dev This contract combines an upgradeability proxy with an authorization
* mechanism for administrative tasks.
* All external functions in this contract must be guarded by the
* `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity
* feature proposal that would enable this to be done automatically.
*/
contract BaseAdminUpgradeabilityProxy is BaseUpgradeabilityProxy {
/**
* @dev Emitted when the administration has been transferred.
* @param previousAdmin Address of the previous admin.
* @param newAdmin Address of the new admin.
*/
event AdminChanged(address previousAdmin, address newAdmin);
/**
* @dev Storage slot with the admin of the contract.
* This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is
* validated in the constructor.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 17 of 25 : BaseUpgradeabilityProxy.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.3;
import "../utils/Address.sol";
import "./Proxy.sol";
/**
* @dev This contract implements an upgradeable proxy. It is upgradeable because calls are delegated to an
* implementation address that can be changed. This address is stored in storage in the location specified by
* https://eips.ethereum.org/EIPS/eip-1967[EIP1967], so that it doesn't conflict with the storage layout of the
* implementation behind the proxy.
*
* Upgradeability is only provided internally through {_upgradeTo}. For an externally upgradeable proxy see
* {TransparentUpgradeableProxy}.
*/
contract BaseUpgradeabilityProxy is Proxy {
/**
* @dev Storage slot with the address of the current implementation.
* This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is
* validated in the constructor.
*/
bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
event Upgraded(address indexed implementation);
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 18 of 25 : Proxy.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.3;
/**
* @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM
* instruction `delegatecall`. We refer to the second contract as the _implementation_ behind the proxy, and it has to
* be specified by overriding the virtual {_implementation} function.
*
* Additionally, delegation to the implementation can be triggered manually through the {_fallback} function, or to a
* different contract through the {_delegate} function.
*
* The success and return data of the delegated call will be returned back to the caller of the proxy.
*/
abstract contract Proxy {
/**
* @dev Delegates the current call to `implementation`.
*
* This function does not return to its internall call site, it will return directly to the external caller.
*/
function _delegate(address implementation) internal {
// solhint-disable-next-line no-inline-assembly
assembly {
// Copy msg.data. We take full control of memory in this inline assembly
// block because it will not return to Solidity code. We overwrite the
// Solidity scratch pad at memory position 0.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 19 of 25 : Protocol.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: No License
pragma solidity ^0.7.3;
import "./proxy/InitializableAdminUpgradeabilityProxy.sol";
import "./utils/Create2.sol";
import "./utils/Initializable.sol";
import "./utils/Ownable.sol";
import "./utils/SafeMath.sol";
import "./utils/SafeERC20.sol";
import "./utils/ReentrancyGuard.sol";
import "./interfaces/ICover.sol";
import "./interfaces/IERC20.sol";
import "./interfaces/IOwnable.sol";
import "./interfaces/IProtocol.sol";
import "./interfaces/IProtocolFactory.sol";
/**
* @title Protocol contract
* @author crypto-pumpkin@github
*/
contract Protocol is IProtocol, Initializable, ReentrancyGuard, Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
struct ClaimDetails {
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 20 of 25 : SafeERC20.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.3;
import "../interfaces/IERC20.sol";
import "./SafeMath.sol";
import "./Address.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 SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 21 of 25 : ReentrancyGuard.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;
/**
* @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 ReentrancyGuard {
// 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.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 22 of 25 : ICover.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// SPDX-License-Identifier: No License
pragma solidity ^0.7.3;
import "./ICoverERC20.sol";
/**
* @title Cover contract interface. See {Cover}.
* @author crypto-pumpkin@github
*/
interface ICover {
event NewCoverERC20(address);
function getCoverDetails()
external view returns (string memory _name, uint48 _expirationTimestamp, address _collateral, uint256 _claimNonce, ICoverERC20 _claimCovToken,
        ICoverERC20 _noclaimCovToken);
function expirationTimestamp() external view returns (uint48);
function collateral() external view returns (address);
function claimCovToken() external view returns (ICoverERC20);
function noclaimCovToken() external view returns (ICoverERC20);
function name() external view returns (string memory);
function claimNonce() external view returns (uint256);
function redeemClaim() external;
function redeemNoclaim() external;
function redeemCollateral(uint256 _amount) external;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 23 of 25 : ICoverERC20.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// SPDX-License-Identifier: No License
pragma solidity ^0.7.3;
import "./IERC20.sol";
/**
* @title CoverERC20 contract interface, implements {IERC20}. See {CoverERC20}.
* @author crypto-pumpkin@github
*/
interface ICoverERC20 is IERC20 {
function burn(uint256 _amount) external returns (bool);
/// @notice access restriction - owner (Cover)
function mint(address _account, uint256 _amount) external returns (bool);
function setSymbol(string calldata _symbol) external returns (bool);
function burnByCover(address _account, uint256 _amount) external returns (bool);
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 24 of 25 : Cover.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: No License
pragma solidity ^0.7.3;
import "./proxy/InitializableAdminUpgradeabilityProxy.sol";
import "./utils/Create2.sol";
import "./utils/Initializable.sol";
import "./utils/Ownable.sol";
import "./utils/SafeMath.sol";
import "./utils/SafeERC20.sol";
import "./interfaces/ICover.sol";
import "./interfaces/ICoverERC20.sol";
import "./interfaces/IERC20.sol";
import "./interfaces/IOwnable.sol";
import "./interfaces/IProtocol.sol";
import "./interfaces/IProtocolFactory.sol";
/**
* @title Cover contract
* @author crypto-pumpkin@github
*
* The contract
* - Holds collateral funds
* - Mints and burns CovTokens (CoverERC20)
* - Allows redeem from collateral pool with or without an accepted claim
*/
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

File 25 of 25 : CoverERC20.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// SPDX-License-Identifier: No License
pragma solidity ^0.7.3;
import "./utils/Initializable.sol";
import "./utils/Ownable.sol";
import "./utils/SafeMath.sol";
import "./interfaces/ICoverERC20.sol";
/**
* @title CoverERC20 implements {ERC20} standards with expended features for COVER
* @author crypto-pumpkin@github
*
* COVER's covToken Features:
* - Has mint and burn by owner (Cover contract) only feature.
* - No limit on the totalSupply.
* - Should only be created from Cover contract. See {Cover}
*/
contract CoverERC20 is ICoverERC20, Initializable, Ownable {
using SafeMath for uint256;
uint8 public constant decimals = 18;
string public constant name = "covToken";
// The symbol of the contract
string public override symbol;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Settings
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"abi"
]
}
},
"libraries": {}
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAdmin","type":"address"}],"name":"changeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_logic","type":"address"},{"internalType":"address","name":"_admin","type":"address"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"initialize","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405234801561001057600080fd5b5061077d806100206000396000f3fe6080604052600436106100595760003560e01c80633659cfe6146100705780634f1ef286146100a35780635c60da1b146101235780638f28397014610154578063cf7a1d7714610187578063f851a4401461024657610068565b366100685761006661025b565b005b61006661025b565b34801561007c57600080fd5b506100666004803603602081101561009357600080fd5b50356001600160a01b0316610275565b610066600480360360408110156100b957600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156100e457600080fd5b8201836020820111156100f657600080fd5b8035906020019184600183028401116401000000008311171561011857600080fd5b5090925090506102af565b34801561012f57600080fd5b5061013861035c565b604080516001600160a01b039092168252519081900360200190f35b34801561016057600080fd5b506100666004803603602081101561017757600080fd5b50356001600160a01b0316610399565b6100666004803603606081101561019d57600080fd5b6001600160a01b0382358116926020810135909116918101906060810160408201356401000000008111156101d157600080fd5b8201836020820111156101e357600080fd5b8035906020019184600183028401116401000000008311171561020557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610453945050505050565b34801561025257600080fd5b5061013861053a565b610263610273565b61027361026e610565565b61058a565b565b61027d6105ae565b6001600160a01b0316336001600160a01b031614156102a45761029f816105d3565b6102ac565b6102ac61025b565b50565b6102b76105ae565b6001600160a01b0316336001600160a01b0316141561034f576102d9836105d3565b6000836001600160a01b031683836040518083838082843760405192019450600093509091505080830381855af49150503d8060008114610336576040519150601f19603f3d011682016040523d82523d6000602084013e61033b565b606091505b505090508061034957600080fd5b50610357565b61035761025b565b505050565b60006103666105ae565b6001600160a01b0316336001600160a01b0316141561038e57610387610565565b9050610396565b61039661025b565b90565b6103a16105ae565b6001600160a01b0316336001600160a01b031614156102a4576001600160a01b0381166103ff5760405162461bcd60e51b81526004018080602001828103825260368152602001806106dc6036913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6104286105ae565b604080516001600160a01b03928316815291841660208301528051918290030190a161029f81610613565b600061045d610565565b6001600160a01b03161461047057600080fd5b61047983610637565b805115610531576000836001600160a01b0316826040518082805190602001908083835b602083106104bc5780518252601f19909201916020918201910161049d565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d806000811461051c576040519150601f19603f3d011682016040523d82523d6000602084013e610521565b606091505b505090508061052f57600080fd5b505b61035782610613565b60006105446105ae565b6001600160a01b0316336001600160a01b0316141561038e576103876105ae565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e8080156105a9573d6000f35b3d6000fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b6105dc81610637565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b6106408161069f565b61067b5760405162461bcd60e51b81526004018080602001828103825260368152602001806107126036913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708181148015906106d357508115155b94935050505056fe43616e6e6f74206368616e6765207468652061646d696e206f6620612070726f787920746f20746865207a65726f20616464726573735570677261646561626c6550726f78793a206e657720696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374a2646970667358221220bb1380c8baf572bad88171f2a9370ded98c1c442f5378d819a912f33b83f1bc964736f6c63430007030033

Deployed Bytecode

0x6080604052600436106100595760003560e01c80633659cfe6146100705780634f1ef286146100a35780635c60da1b146101235780638f28397014610154578063cf7a1d7714610187578063f851a4401461024657610068565b366100685761006661025b565b005b61006661025b565b34801561007c57600080fd5b506100666004803603602081101561009357600080fd5b50356001600160a01b0316610275565b610066600480360360408110156100b957600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156100e457600080fd5b8201836020820111156100f657600080fd5b8035906020019184600183028401116401000000008311171561011857600080fd5b5090925090506102af565b34801561012f57600080fd5b5061013861035c565b604080516001600160a01b039092168252519081900360200190f35b34801561016057600080fd5b506100666004803603602081101561017757600080fd5b50356001600160a01b0316610399565b6100666004803603606081101561019d57600080fd5b6001600160a01b0382358116926020810135909116918101906060810160408201356401000000008111156101d157600080fd5b8201836020820111156101e357600080fd5b8035906020019184600183028401116401000000008311171561020557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610453945050505050565b34801561025257600080fd5b5061013861053a565b610263610273565b61027361026e610565565b61058a565b565b61027d6105ae565b6001600160a01b0316336001600160a01b031614156102a45761029f816105d3565b6102ac565b6102ac61025b565b50565b6102b76105ae565b6001600160a01b0316336001600160a01b0316141561034f576102d9836105d3565b6000836001600160a01b031683836040518083838082843760405192019450600093509091505080830381855af49150503d8060008114610336576040519150601f19603f3d011682016040523d82523d6000602084013e61033b565b606091505b505090508061034957600080fd5b50610357565b61035761025b565b505050565b60006103666105ae565b6001600160a01b0316336001600160a01b0316141561038e57610387610565565b9050610396565b61039661025b565b90565b6103a16105ae565b6001600160a01b0316336001600160a01b031614156102a4576001600160a01b0381166103ff5760405162461bcd60e51b81526004018080602001828103825260368152602001806106dc6036913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6104286105ae565b604080516001600160a01b03928316815291841660208301528051918290030190a161029f81610613565b600061045d610565565b6001600160a01b03161461047057600080fd5b61047983610637565b805115610531576000836001600160a01b0316826040518082805190602001908083835b602083106104bc5780518252601f19909201916020918201910161049d565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d806000811461051c576040519150601f19603f3d011682016040523d82523d6000602084013e610521565b606091505b505090508061052f57600080fd5b505b61035782610613565b60006105446105ae565b6001600160a01b0316336001600160a01b0316141561038e576103876105ae565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e8080156105a9573d6000f35b3d6000fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b6105dc81610637565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b6106408161069f565b61067b5760405162461bcd60e51b81526004018080602001828103825260368152602001806107126036913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708181148015906106d357508115155b94935050505056fe43616e6e6f74206368616e6765207468652061646d696e206f6620612070726f787920746f20746865207a65726f20616464726573735570677261646561626c6550726f78793a206e657720696d706c656d656e746174696f6e206973206e6f74206120636f6e7472616374a2646970667358221220bb1380c8baf572bad88171f2a9370ded98c1c442f5378d819a912f33b83f1bc964736f6c63430007030033

Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.