Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Update MCR | 18359346 | 327 days ago | IN | 0 ETH | 0.00132744 |
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
16790929 | 548 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Contract Name:
MCR
Compiler Version
v0.8.18+commit.87f61d96
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0-only pragma solidity ^0.8.18; import "@openzeppelin/contracts-v4/token/ERC20/IERC20.sol"; import "../../interfaces/IMCR.sol"; import "../../interfaces/INXMToken.sol"; import "../../interfaces/IPool.sol"; import "../../interfaces/IPriceFeedOracle.sol"; import "../../interfaces/IQuotationData.sol"; import "../../interfaces/ICover.sol"; import "../../abstract/MasterAwareV2.sol"; import "../../libraries/Math.sol"; contract MCR is IMCR, MasterAwareV2 { // sizeof(qd) + 96 = 160 + 96 = 256 (occupies entire slot) uint96 _unused; // the following values are expressed in basis points uint24 public mcrFloorIncrementThreshold = 13000; uint24 public maxMCRFloorIncrement = 100; uint24 public maxMCRIncrement = 500; uint24 public gearingFactor = 48000; // min update between MCR updates in seconds uint24 public minUpdateTime = 3600; uint112 public mcrFloor; uint112 public mcr; uint112 public desiredMCR; uint32 public lastUpdateTime; IMCR public previousMCR; event MCRUpdated( uint mcr, uint desiredMCR, uint mcrFloor, uint mcrETHWithGear, uint totalSumAssured ); uint constant UINT24_MAX = type(uint24).max; uint constant MAX_MCR_ADJUSTMENT = 100; uint constant BASIS_PRECISION = 10000; constructor (address masterAddress) { changeMasterAddress(masterAddress); if (masterAddress != address(0)) { previousMCR = IMCR(master.getLatestAddress("MC")); } } /* ========== DEPENDENCIES ========== */ function pool() internal view returns (IPool) { return IPool(internalContracts[uint(ID.P1)]); } function memberRoles() internal view returns (IMemberRoles) { return IMemberRoles(internalContracts[uint(ID.MR)]); } function cover() internal view returns (ICover) { return ICover(internalContracts[uint(ID.CO)]); } function changeDependentContractAddress() external override { internalContracts[uint(ID.P1)] = master.getLatestAddress("P1"); internalContracts[uint(ID.MR)] = master.getLatestAddress("MR"); internalContracts[uint(ID.CO)] = master.getLatestAddress("CO"); initialize(); } function initialize() internal { address currentMCR = master.getLatestAddress("MC"); if (address(previousMCR) == address(0) || currentMCR != address(this)) { // already initialized or not ready for initialization return; } // copy over values mcrFloor = previousMCR.mcrFloor(); mcr = previousMCR.mcr(); desiredMCR = previousMCR.desiredMCR(); lastUpdateTime = previousMCR.lastUpdateTime(); // copy over parameters mcrFloorIncrementThreshold = previousMCR.mcrFloorIncrementThreshold(); maxMCRFloorIncrement = previousMCR.maxMCRFloorIncrement(); maxMCRIncrement = previousMCR.maxMCRIncrement(); gearingFactor = previousMCR.gearingFactor(); minUpdateTime = previousMCR.minUpdateTime(); previousMCR = IMCR(address(0)); } /** * @dev Gets total sum assured (in ETH). * @return amount of sum assured */ function getAllSumAssurance() public view returns (uint) { IPool _pool = pool(); IPriceFeedOracle priceFeed = _pool.priceFeedOracle(); ICover _cover = cover(); uint totalActiveCoverAmountInEth = _cover.totalActiveCoverInAsset(0); Asset[] memory assets = _pool.getAssets(); // the first asset is ETH. skip it, it's already counted for (uint i = 1; i < assets.length; i++) { uint activeCoverAmount = _cover.totalActiveCoverInAsset(i); uint assetAmountInEth = priceFeed.getEthForAsset(assets[i].assetAddress, activeCoverAmount); totalActiveCoverAmountInEth += assetAmountInEth; } return totalActiveCoverAmountInEth; } /* * @dev trigger an MCR update. Current virtual MCR value is synced to storage, mcrFloor is potentially updated * and a new desiredMCR value to move towards is set. * */ function updateMCR() whenNotPaused public { _updateMCR(pool().getPoolValueInEth(), false); } function updateMCRInternal(uint poolValueInEth, bool forceUpdate) public onlyInternal { _updateMCR(poolValueInEth, forceUpdate); } function _updateMCR(uint poolValueInEth, bool forceUpdate) internal { // read with 1 SLOAD uint _mcrFloorIncrementThreshold = mcrFloorIncrementThreshold; uint _maxMCRFloorIncrement = maxMCRFloorIncrement; uint _gearingFactor = gearingFactor; uint _minUpdateTime = minUpdateTime; uint _mcrFloor = mcrFloor; // read with 1 SLOAD uint112 _mcr = mcr; uint112 _desiredMCR = desiredMCR; uint32 _lastUpdateTime = lastUpdateTime; if (!forceUpdate && _lastUpdateTime + _minUpdateTime > block.timestamp) { return; } if (block.timestamp > _lastUpdateTime && pool().calculateMCRRatio(poolValueInEth, _mcr) >= _mcrFloorIncrementThreshold) { // MCR floor updates by up to maxMCRFloorIncrement percentage per day whenever the MCR ratio exceeds 1.3 // MCR floor is monotonically increasing. uint basisPointsAdjustment = Math.min( _maxMCRFloorIncrement * (block.timestamp - _lastUpdateTime) / 1 days, _maxMCRFloorIncrement ); uint newMCRFloor = _mcrFloor * (basisPointsAdjustment + BASIS_PRECISION) / BASIS_PRECISION; require(newMCRFloor <= type(uint112).max, 'MCR: newMCRFloor overflow'); mcrFloor = uint112(newMCRFloor); } // sync the current virtual MCR value to storage uint112 newMCR = uint112(getMCR()); if (newMCR != _mcr) { mcr = newMCR; } // the desiredMCR cannot fall below the mcrFloor but may have a higher or lower target value based // on the changes in the totalSumAssured in the system. uint totalSumAssured = getAllSumAssurance(); uint gearedMCR = totalSumAssured * BASIS_PRECISION / _gearingFactor; uint112 newDesiredMCR = uint112(Math.max(gearedMCR, mcrFloor)); if (newDesiredMCR != _desiredMCR) { desiredMCR = newDesiredMCR; } lastUpdateTime = uint32(block.timestamp); emit MCRUpdated(mcr, desiredMCR, mcrFloor, gearedMCR, totalSumAssured); } /** * @dev Calculates the current virtual MCR value. The virtual MCR value moves towards the desiredMCR value away * from the stored mcr value at constant velocity based on how much time passed from the lastUpdateTime. * The total change in virtual MCR cannot exceed 1% of stored mcr. * * This approach allows for the MCR to change smoothly across time without sudden jumps between values, while * always progressing towards the desiredMCR goal. The desiredMCR can change subject to the call of _updateMCR * so the virtual MCR value may change direction and start decreasing instead of increasing or vice-versa. * * @return mcr */ function getMCR() public view returns (uint) { // read with 1 SLOAD uint _mcr = mcr; uint _desiredMCR = desiredMCR; uint _lastUpdateTime = lastUpdateTime; if (block.timestamp == _lastUpdateTime) { return _mcr; } uint _maxMCRIncrement = maxMCRIncrement; uint basisPointsAdjustment = _maxMCRIncrement * (block.timestamp - _lastUpdateTime) / 1 days; basisPointsAdjustment = Math.min(basisPointsAdjustment, MAX_MCR_ADJUSTMENT); if (_desiredMCR > _mcr) { return Math.min(_mcr * (basisPointsAdjustment + BASIS_PRECISION) / BASIS_PRECISION, _desiredMCR); } // in case desiredMCR <= mcr return Math.max(_mcr * (BASIS_PRECISION - basisPointsAdjustment) / (BASIS_PRECISION), _desiredMCR); } function getGearedMCR() external view returns (uint) { return getAllSumAssurance() * BASIS_PRECISION / gearingFactor; } /** * @dev Updates Uint Parameters * @param code parameter code * @param val new value */ function updateUintParameters(bytes8 code, uint val) public onlyGovernance { if (code == "DMCT") { require(val <= UINT24_MAX, "MCR: value too large"); mcrFloorIncrementThreshold = uint24(val); } else if (code == "DMCI") { require(val <= UINT24_MAX, "MCR: value too large"); maxMCRFloorIncrement = uint24(val); } else if (code == "MMIC") { require(val <= UINT24_MAX, "MCR: value too large"); maxMCRIncrement = uint24(val); } else if (code == "GEAR") { require(val <= UINT24_MAX, "MCR: value too large"); gearingFactor = uint24(val); } else if (code == "MUTI") { require(val <= UINT24_MAX, "MCR: value too large"); minUpdateTime = uint24(val); } else { revert("Invalid param code"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @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); /** * @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 `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, 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 `from` to `to` 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 from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: GPL-3.0-only pragma solidity ^0.8.18; import "../interfaces/INXMMaster.sol"; import "../interfaces/IMasterAwareV2.sol"; import "../interfaces/IMemberRoles.sol"; abstract contract MasterAwareV2 is IMasterAwareV2 { INXMMaster public master; mapping(uint => address payable) public internalContracts; modifier onlyMember { require( IMemberRoles(internalContracts[uint(ID.MR)]).checkRole( msg.sender, uint(IMemberRoles.Role.Member) ), "Caller is not a member" ); _; } modifier onlyAdvisoryBoard { require( IMemberRoles(internalContracts[uint(ID.MR)]).checkRole( msg.sender, uint(IMemberRoles.Role.AdvisoryBoard) ), "Caller is not an advisory board member" ); _; } modifier onlyInternal { require(master.isInternal(msg.sender), "Caller is not an internal contract"); _; } modifier onlyMaster { if (address(master) != address(0)) { require(address(master) == msg.sender, "Not master"); } _; } modifier onlyGovernance { require( master.checkIsAuthToGoverned(msg.sender), "Caller is not authorized to govern" ); _; } modifier onlyEmergencyAdmin { require( msg.sender == master.emergencyAdmin(), "Caller is not emergency admin" ); _; } modifier whenPaused { require(master.isPause(), "System is not paused"); _; } modifier whenNotPaused { require(!master.isPause(), "System is paused"); _; } function getInternalContractAddress(ID id) internal view returns (address payable) { return internalContracts[uint(id)]; } function changeMasterAddress(address masterAddress) public onlyMaster { master = INXMMaster(masterAddress); } }
// SPDX-License-Identifier: GPL-3.0-only pragma solidity >=0.5.0; import "./ICoverNFT.sol"; import "./IStakingNFT.sol"; import "./IStakingPool.sol"; import "./IStakingPoolFactory.sol"; /* ========== DATA STRUCTURES ========== */ enum ClaimMethod { IndividualClaims, YieldTokenIncidents } // Basically CoverStatus from QuotationData.sol but with the extra Migrated status to avoid // polluting Cover.sol state layout with new status variables. enum LegacyCoverStatus { Active, ClaimAccepted, ClaimDenied, CoverExpired, ClaimSubmitted, Requested, Migrated } /* io structs */ struct PoolAllocationRequest { uint40 poolId; bool skip; uint coverAmountInAsset; } struct RequestAllocationVariables { uint previousPoolAllocationsLength; uint previousPremiumInNXM; uint refund; uint coverAmountInNXM; } struct BuyCoverParams { uint coverId; address owner; uint24 productId; uint8 coverAsset; uint96 amount; uint32 period; uint maxPremiumInAsset; uint8 paymentAsset; uint16 commissionRatio; address commissionDestination; string ipfsData; } struct ProductParam { string productName; uint productId; string ipfsMetadata; Product product; uint[] allowedPools; } struct ProductTypeParam { string productTypeName; uint productTypeId; string ipfsMetadata; ProductType productType; } struct ProductInitializationParams { uint productId; uint8 weight; uint96 initialPrice; uint96 targetPrice; } /* storage structs */ struct PoolAllocation { uint40 poolId; uint96 coverAmountInNXM; uint96 premiumInNXM; uint24 allocationId; } struct CoverData { uint24 productId; uint8 coverAsset; uint96 amountPaidOut; } struct CoverSegment { uint96 amount; uint32 start; uint32 period; // seconds uint32 gracePeriod; // seconds uint24 globalRewardsRatio; uint24 globalCapacityRatio; } struct Product { uint16 productType; address yieldTokenAddress; // cover assets bitmap. each bit represents whether the asset with // the index of that bit is enabled as a cover asset for this product uint32 coverAssets; uint16 initialPriceRatio; uint16 capacityReductionRatio; bool isDeprecated; bool useFixedPrice; } struct ProductType { uint8 claimMethod; uint32 gracePeriod; } struct ActiveCover { // Global active cover amount per asset. uint192 totalActiveCoverInAsset; // The last time activeCoverExpirationBuckets was updated uint64 lastBucketUpdateId; } interface ICover { /* ========== VIEWS ========== */ function coverData(uint coverId) external view returns (CoverData memory); function coverDataCount() external view returns (uint); function coverSegmentsCount(uint coverId) external view returns (uint); function coverSegments(uint coverId) external view returns (CoverSegment[] memory); function coverSegmentWithRemainingAmount( uint coverId, uint segmentId ) external view returns (CoverSegment memory); function products(uint id) external view returns (Product memory); function productTypes(uint id) external view returns (ProductType memory); function stakingPool(uint index) external view returns (IStakingPool); function productNames(uint productId) external view returns (string memory); function productsCount() external view returns (uint); function productTypesCount() external view returns (uint); function totalActiveCoverInAsset(uint coverAsset) external view returns (uint); function globalCapacityRatio() external view returns (uint); function globalRewardsRatio() external view returns (uint); function getPriceAndCapacityRatios(uint[] calldata productIds) external view returns ( uint _globalCapacityRatio, uint _globalMinPriceRatio, uint[] memory _initialPriceRatios, uint[] memory _capacityReductionRatios ); /* === MUTATIVE FUNCTIONS ==== */ function addLegacyCover( uint productId, uint coverAsset, uint amount, uint start, uint period, address newOwner ) external returns (uint coverId); function buyCover( BuyCoverParams calldata params, PoolAllocationRequest[] calldata coverChunkRequests ) external payable returns (uint coverId); function setProductTypes(ProductTypeParam[] calldata productTypes) external; function setProducts(ProductParam[] calldata params) external; function burnStake( uint coverId, uint segmentId, uint amount ) external returns (address coverOwner); function coverNFT() external returns (ICoverNFT); function stakingNFT() external returns (IStakingNFT); function stakingPoolFactory() external returns (IStakingPoolFactory); function createStakingPool( bool isPrivatePool, uint initialPoolFee, uint maxPoolFee, ProductInitializationParams[] calldata productInitParams, string calldata ipfsDescriptionHash ) external returns (uint poolId, address stakingPoolAddress); function isPoolAllowed(uint productId, uint poolId) external returns (bool); /* ========== EVENTS ========== */ event ProductSet(uint id, string ipfsMetadata); event ProductTypeSet(uint id, string ipfsMetadata); event CoverEdited(uint indexed coverId, uint indexed productId, uint indexed segmentId, address buyer, string ipfsMetadata); // Auth error OnlyMemberRolesCanOperateTransfer(); error OnlyOwnerOrApproved(); // Cover details error CoverPeriodTooShort(); error CoverPeriodTooLong(); error CoverOutsideOfTheGracePeriod(); error CoverAmountIsZero(); // Products error ProductDoesntExist(); error ProductTypeNotFound(); error ProductDeprecated(); error ProductDeprecatedOrNotInitialized(); error InvalidProductType(); error UnexpectedProductId(); // Cover and payment assets error CoverAssetNotSupported(); error InvalidPaymentAsset(); error UnexpectedCoverAsset(); error UnsupportedCoverAssets(); error UnexpectedEthSent(); // Price & Commission error PriceExceedsMaxPremiumInAsset(); error TargetPriceBelowGlobalMinPriceRatio(); error InitialPriceRatioBelowGlobalMinPriceRatio(); error InitialPriceRatioAbove100Percent(); error CommissionRateTooHigh(); // ETH transfers error InsufficientEthSent(); error SendingEthToPoolFailed(); error SendingEthToCommissionDestinationFailed(); error ReturningEthRemainderToSenderFailed(); // Misc error AlreadyInitialized(); error ExpiredCoversCannotBeEdited(); error InsufficientCoverAmountAllocated(); error UnexpectedPoolId(); error CapacityReductionRatioAbove100Percent(); }
// SPDX-License-Identifier: GPL-3.0-only pragma solidity >=0.5.0; import "@openzeppelin/contracts-v4/token/ERC721/IERC721.sol"; interface ICoverNFT is IERC721 { function isApprovedOrOwner(address spender, uint tokenId) external returns (bool); function mint(address to) external returns (uint tokenId); function changeOperator(address newOperator) external; function totalSupply() external view returns (uint); function name() external view returns (string memory); error NotOperator(); error NotMinted(); error WrongFrom(); error InvalidRecipient(); error InvalidNewOperatorAddress(); error InvalidNewNFTDescriptorAddress(); error NotAuthorized(); error UnsafeRecipient(); error AlreadyMinted(); }
// SPDX-License-Identifier: GPL-3.0-only pragma solidity >=0.5.0; interface IMasterAwareV2 { enum ID { TC, // TokenController.sol P1, // Pool.sol MR, // MemberRoles.sol MC, // MCR.sol CO, // Cover.sol SP, // StakingProducts.sol PS, // LegacyPooledStaking.sol GV, // Governance.sol GW, // LegacyGateway.sol CL, // CoverMigrator.sol AS, // Assessment.sol CI, // IndividualClaims.sol - Claims for Individuals CG, // YieldTokenIncidents.sol - Claims for Groups // TODO: 1) if you update this enum, update lib/constants.js as well // TODO: 2) TK is not an internal contract! // If you want to add a new contract below TK, remove TK and make it immutable in all // contracts that are using it (currently LegacyGateway and LegacyPooledStaking). TK // NXMToken.sol } function changeMasterAddress(address masterAddress) external; function changeDependentContractAddress() external; }
// SPDX-License-Identifier: GPL-3.0-only pragma solidity >=0.5.0; interface IMCR { function updateMCRInternal(uint poolValueInEth, bool forceUpdate) external; function getMCR() external view returns (uint); function mcr() external view returns (uint112); function mcrFloor() external view returns (uint112); function desiredMCR() external view returns (uint112); function lastUpdateTime() external view returns (uint32); function mcrFloorIncrementThreshold() external view returns (uint24); function maxMCRFloorIncrement() external view returns (uint24); function maxMCRIncrement() external view returns (uint24); function gearingFactor() external view returns (uint24); function minUpdateTime() external view returns (uint24); }
// SPDX-License-Identifier: GPL-3.0-only pragma solidity >=0.5.0; interface IMemberRoles { enum Role {Unassigned, AdvisoryBoard, Member, Owner} function join(address _userAddress, uint nonce, bytes calldata signature) external payable; function switchMembership(address _newAddress) external; function switchMembershipAndAssets( address newAddress, uint[] calldata coverIds, uint[] calldata stakingTokenIds ) external; function switchMembershipOf(address member, address _newAddress) external; function totalRoles() external view returns (uint256); function changeAuthorized(uint _roleId, address _newAuthorized) external; function setKycAuthAddress(address _add) external; function members(uint _memberRoleId) external view returns (uint, address[] memory memberArray); function numberOfMembers(uint _memberRoleId) external view returns (uint); function authorized(uint _memberRoleId) external view returns (address); function roles(address _memberAddress) external view returns (uint[] memory); function checkRole(address _memberAddress, uint _roleId) external view returns (bool); function getMemberLengthForAllRoles() external view returns (uint[] memory totalMembers); function memberAtIndex(uint _memberRoleId, uint index) external view returns (address, bool); function membersLength(uint _memberRoleId) external view returns (uint); event MemberRole(uint256 indexed roleId, bytes32 roleName, string roleDescription); event MemberJoined(address indexed newMember, uint indexed nonce); event switchedMembership(address indexed previousMember, address indexed newMember, uint timeStamp); }
// SPDX-License-Identifier: GPL-3.0-only pragma solidity >=0.5.0; interface INXMMaster { function tokenAddress() external view returns (address); function owner() external view returns (address); function emergencyAdmin() external view returns (address); function masterInitialized() external view returns (bool); function isInternal(address _add) external view returns (bool); function isPause() external view returns (bool check); function isMember(address _add) external view returns (bool); function checkIsAuthToGoverned(address _add) external view returns (bool); function getLatestAddress(bytes2 _contractName) external view returns (address payable contractAddress); function contractAddresses(bytes2 code) external view returns (address payable); function upgradeMultipleContracts( bytes2[] calldata _contractCodes, address payable[] calldata newAddresses ) external; function removeContracts(bytes2[] calldata contractCodesToRemove) external; function addNewInternalContracts( bytes2[] calldata _contractCodes, address payable[] calldata newAddresses, uint[] calldata _types ) external; function updateOwnerParameters(bytes8 code, address payable val) external; }
// SPDX-License-Identifier: GPL-3.0-only pragma solidity >=0.5.0; interface INXMToken { function burn(uint256 amount) external returns (bool); function burnFrom(address from, uint256 value) external returns (bool); function operatorTransfer(address from, uint256 value) external returns (bool); function mint(address account, uint256 amount) external; function isLockedForMV(address member) external view returns (uint); function addToWhiteList(address _member) external returns (bool); function removeFromWhiteList(address _member) external returns (bool); function changeOperator(address _newOperator) external returns (bool); function lockForMemberVote(address _of, uint _days) external; /** * @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: GPL-3.0-only pragma solidity >=0.5.0; import "./IPriceFeedOracle.sol"; struct SwapDetails { uint104 minAmount; uint104 maxAmount; uint32 lastSwapTime; // 2 decimals of precision. 0.01% -> 0.0001 -> 1e14 uint16 maxSlippageRatio; } struct Asset { address assetAddress; bool isCoverAsset; bool isAbandoned; } interface IPool { function getAsset(uint assetId) external view returns (Asset memory); function getAssets() external view returns (Asset[] memory); function buyNXM(uint minTokensOut) external payable; function sellNXM(uint tokenAmount, uint minEthOut) external; function sellNXMTokens(uint tokenAmount) external returns (bool); function transferAssetToSwapOperator(address asset, uint amount) external; function setSwapDetailsLastSwapTime(address asset, uint32 lastSwapTime) external; function getAssetSwapDetails(address assetAddress) external view returns (SwapDetails memory); function getNXMForEth(uint ethAmount) external view returns (uint); function sendPayout(uint assetIndex, address payable payoutAddress, uint amount) external; function upgradeCapitalPool(address payable newPoolAddress) external; function priceFeedOracle() external view returns (IPriceFeedOracle); function getPoolValueInEth() external view returns (uint); function getEthForNXM(uint nxmAmount) external view returns (uint ethAmount); function calculateEthForNXM(uint nxmAmount, uint currentTotalAssetValue, uint mcrEth) external pure returns (uint); function calculateMCRRatio(uint totalAssetValue, uint mcrEth) external pure returns (uint); function calculateTokenSpotPrice(uint totalAssetValue, uint mcrEth) external pure returns (uint tokenPrice); function getTokenPriceInAsset(uint assetId) external view returns (uint tokenPrice); function getTokenPrice() external view returns (uint tokenPrice); function getMCRRatio() external view returns (uint); function setSwapValue(uint value) external; }
// SPDX-License-Identifier: GPL-3.0-only pragma solidity >=0.5.0; interface Aggregator { function latestAnswer() external view returns (int); } struct OracleAsset { Aggregator aggregator; uint8 decimals; } interface IPriceFeedOracle { function ETH() external view returns (address); function assets(address) external view returns (Aggregator, uint8); function getAssetToEthRate(address asset) external view returns (uint); function getAssetForEth(address asset, uint ethIn) external view returns (uint); function getEthForAsset(address asset, uint amount) external view returns (uint); }
// SPDX-License-Identifier: GPL-3.0-only pragma solidity >=0.5.0; interface IQuotationData { function authQuoteEngine() external view returns (address); function stlp() external view returns (uint); function stl() external view returns (uint); function pm() external view returns (uint); function minDays() external view returns (uint); function tokensRetained() external view returns (uint); function kycAuthAddress() external view returns (address); function refundEligible(address) external view returns (bool); function holdedCoverIDStatus(uint) external view returns (uint); function timestampRepeated(uint) external view returns (bool); enum HCIDStatus {NA, kycPending, kycPass, kycFailedOrRefunded, kycPassNoCover} enum CoverStatus {Active, ClaimAccepted, ClaimDenied, CoverExpired, ClaimSubmitted, Requested} function addInTotalSumAssuredSC(address _add, bytes4 _curr, uint _amount) external; function subFromTotalSumAssuredSC(address _add, bytes4 _curr, uint _amount) external; function subFromTotalSumAssured(bytes4 _curr, uint _amount) external; function addInTotalSumAssured(bytes4 _curr, uint _amount) external; function setTimestampRepeated(uint _timestamp) external; /// @dev Creates a blank new cover. function addCover( uint16 _coverPeriod, uint _sumAssured, address payable _userAddress, bytes4 _currencyCode, address _scAddress, uint premium, uint premiumNXM ) external; function addHoldCover( address payable from, address scAddress, bytes4 coverCurr, uint[] calldata coverDetails, uint16 coverPeriod ) external; function setRefundEligible(address _add, bool status) external; function setHoldedCoverIDStatus(uint holdedCoverID, uint status) external; function setKycAuthAddress(address _add) external; function changeAuthQuoteEngine(address _add) external; function getUintParameters(bytes8 code) external view returns (bytes8 codeVal, uint val); function getProductDetails() external view returns ( uint _minDays, uint _pm, uint _stl, uint _stlp ); function getCoverLength() external view returns (uint len); function getAuthQuoteEngine() external view returns (address _add); function getTotalSumAssured(bytes4 _curr) external view returns (uint amount); function getAllCoversOfUser(address _add) external view returns (uint[] memory allCover); function getUserCoverLength(address _add) external view returns (uint len); function getCoverStatusNo(uint _cid) external view returns (uint8); function getCoverPeriod(uint _cid) external view returns (uint32 cp); function getCoverSumAssured(uint _cid) external view returns (uint sa); function getCurrencyOfCover(uint _cid) external view returns (bytes4 curr); function getValidityOfCover(uint _cid) external view returns (uint date); function getscAddressOfCover(uint _cid) external view returns (uint, address); function getCoverMemberAddress(uint _cid) external view returns (address payable _add); function getCoverPremiumNXM(uint _cid) external view returns (uint _premiumNXM); function getCoverDetailsByCoverID1( uint _cid ) external view returns ( uint cid, address _memberAddress, address _scAddress, bytes4 _currencyCode, uint _sumAssured, uint premiumNXM ); function getCoverDetailsByCoverID2( uint _cid ) external view returns ( uint cid, uint8 status, uint sumAssured, uint16 coverPeriod, uint validUntil ); function getHoldedCoverDetailsByID1( uint _hcid ) external view returns ( uint hcid, address scAddress, bytes4 coverCurr, uint16 coverPeriod ); function getUserHoldedCoverLength(address _add) external view returns (uint); function getUserHoldedCoverByIndex(address _add, uint index) external view returns (uint); function getHoldedCoverDetailsByID2( uint _hcid ) external view returns ( uint hcid, address payable memberAddress, uint[] memory coverDetails ); function getTotalSumAssuredSC(address _add, bytes4 _curr) external view returns (uint amount); function changeCoverStatusNo(uint _cid, uint8 _stat) external; }
// SPDX-License-Identifier: GPL-3.0-only pragma solidity >=0.5.0; import "@openzeppelin/contracts-v4/token/ERC721/IERC721.sol"; interface IStakingNFT is IERC721 { function isApprovedOrOwner(address spender, uint tokenId) external returns (bool); function mint(uint poolId, address to) external returns (uint tokenId); function changeOperator(address newOperator) external; function totalSupply() external returns (uint); function tokenInfo(uint tokenId) external view returns (uint poolId, address owner); function stakingPoolOf(uint tokenId) external view returns (uint poolId); function stakingPoolFactory() external view returns (address); function name() external view returns (string memory); error NotOperator(); error NotMinted(); error WrongFrom(); error InvalidRecipient(); error InvalidNewOperatorAddress(); error InvalidNewNFTDescriptorAddress(); error NotAuthorized(); error UnsafeRecipient(); error AlreadyMinted(); error NotStakingPool(); }
// SPDX-License-Identifier: GPL-3.0-only pragma solidity >=0.5.0; /* structs for io */ struct AllocationRequest { uint productId; uint coverId; uint allocationId; uint period; uint gracePeriod; bool useFixedPrice; uint previousStart; uint previousExpiration; uint previousRewardsRatio; uint globalCapacityRatio; uint capacityReductionRatio; uint rewardRatio; uint globalMinPrice; } struct StakedProductParam { uint productId; bool recalculateEffectiveWeight; bool setTargetWeight; uint8 targetWeight; bool setTargetPrice; uint96 targetPrice; } struct BurnStakeParams { uint allocationId; uint productId; uint start; uint period; uint deallocationAmount; } interface IStakingPool { /* structs for storage */ // stakers are grouped in tranches based on the timelock expiration // tranche index is calculated based on the expiration date // the initial proposal is to have 4 tranches per year (1 tranche per quarter) struct Tranche { uint128 stakeShares; uint128 rewardsShares; } struct ExpiredTranche { uint96 accNxmPerRewardShareAtExpiry; uint96 stakeAmountAtExpiry; // nxm total supply is 6.7e24 and uint96.max is 7.9e28 uint128 stakeSharesSupplyAtExpiry; } struct Deposit { uint96 lastAccNxmPerRewardShare; uint96 pendingRewards; uint128 stakeShares; uint128 rewardsShares; } function initialize( bool isPrivatePool, uint initialPoolFee, uint maxPoolFee, uint _poolId, string memory ipfsDescriptionHash ) external; function processExpirations(bool updateUntilCurrentTimestamp) external; function requestAllocation( uint amount, uint previousPremium, AllocationRequest calldata request ) external returns (uint premium, uint allocationId); function burnStake(uint amount, BurnStakeParams calldata params) external; function depositTo( uint amount, uint trancheId, uint requestTokenId, address destination ) external returns (uint tokenId); function withdraw( uint tokenId, bool withdrawStake, bool withdrawRewards, uint[] memory trancheIds ) external returns (uint withdrawnStake, uint withdrawnRewards); function isPrivatePool() external view returns (bool); function isHalted() external view returns (bool); function manager() external view returns (address); function getPoolId() external view returns (uint); function getPoolFee() external view returns (uint); function getMaxPoolFee() external view returns (uint); function getActiveStake() external view returns (uint); function getStakeSharesSupply() external view returns (uint); function getRewardsSharesSupply() external view returns (uint); function getRewardPerSecond() external view returns (uint); function getAccNxmPerRewardsShare() external view returns (uint); function getLastAccNxmUpdate() external view returns (uint); function getFirstActiveTrancheId() external view returns (uint); function getFirstActiveBucketId() external view returns (uint); function getNextAllocationId() external view returns (uint); function getDeposit(uint tokenId, uint trancheId) external view returns ( uint lastAccNxmPerRewardShare, uint pendingRewards, uint stakeShares, uint rewardsShares ); function getTranche(uint trancheId) external view returns ( uint stakeShares, uint rewardsShares ); function getExpiredTranche(uint trancheId) external view returns ( uint accNxmPerRewardShareAtExpiry, uint stakeAmountAtExpiry, uint stakeShareSupplyAtExpiry ); function setPoolFee(uint newFee) external; function setPoolPrivacy(bool isPrivatePool) external; function getActiveAllocations( uint productId ) external view returns (uint[] memory trancheAllocations); function getTrancheCapacities( uint productId, uint firstTrancheId, uint trancheCount, uint capacityRatio, uint reductionRatio ) external view returns (uint[] memory trancheCapacities); /* ========== EVENTS ========== */ event StakeDeposited(address indexed user, uint256 amount, uint256 trancheId, uint256 tokenId); event DepositExtended(address indexed user, uint256 tokenId, uint256 initialTrancheId, uint256 newTrancheId, uint256 topUpAmount); event PoolPrivacyChanged(address indexed manager, bool isPrivate); event PoolFeeChanged(address indexed manager, uint newFee); event PoolDescriptionSet(string ipfsDescriptionHash); event Withdraw(address indexed user, uint indexed tokenId, uint tranche, uint amountStakeWithdrawn, uint amountRewardsWithdrawn); event StakeBurned(uint amount); // Auth error OnlyCoverContract(); error OnlyManager(); error PrivatePool(); error SystemPaused(); error PoolHalted(); // Fees error PoolFeeExceedsMax(); error MaxPoolFeeAbove100(); // Voting error NxmIsLockedForGovernanceVote(); error ManagerNxmIsLockedForGovernanceVote(); // Deposit error InsufficientDepositAmount(); error RewardRatioTooHigh(); // Staking NFTs error InvalidTokenId(); error NotTokenOwnerOrApproved(); error InvalidStakingPoolForToken(); // Tranche & capacity error NewTrancheEndsBeforeInitialTranche(); error RequestedTrancheIsNotYetActive(); error RequestedTrancheIsExpired(); error InsufficientCapacity(); }
// SPDX-License-Identifier: GPL-3.0-only pragma solidity >=0.5.0; interface IStakingPoolFactory { function stakingPoolCount() external view returns (uint); function beacon() external view returns (address); function create(address beacon) external returns (uint poolId, address stakingPoolAddress); event StakingPoolCreated(uint indexed poolId, address indexed stakingPoolAddress); }
// SPDX-License-Identifier: GPL-3.0-only pragma solidity ^0.8.18; /** * @dev Simple library that defines min, max and babylonian sqrt functions */ library Math { function min(uint a, uint b) internal pure returns (uint) { return a < b ? a : b; } function max(uint a, uint b) internal pure returns (uint) { return a > b ? a : b; } function sum(uint[] memory items) internal pure returns (uint) { uint count = items.length; uint total; for (uint i = 0; i < count; i++) { total += items[i]; } return total; } function divRound(uint a, uint b) internal pure returns (uint) { return (a + b / 2) / b; } function divCeil(uint a, uint b) internal pure returns (uint) { return (a + b - 1) / b; } function roundUp(uint a, uint b) internal pure returns (uint) { return divCeil(a, b) * b; } // babylonian method function sqrt(uint y) internal pure returns (uint) { if (y > 3) { uint z = y; uint x = y / 2 + 1; while (x < z) { z = x; x = (y / x + x) / 2; } return z; } if (y != 0) { return 1; } return 0; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"masterAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"mcr","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"desiredMCR","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"mcrFloor","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"mcrETHWithGear","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalSumAssured","type":"uint256"}],"name":"MCRUpdated","type":"event"},{"inputs":[],"name":"changeDependentContractAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"masterAddress","type":"address"}],"name":"changeMasterAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"desiredMCR","outputs":[{"internalType":"uint112","name":"","type":"uint112"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gearingFactor","outputs":[{"internalType":"uint24","name":"","type":"uint24"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllSumAssurance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getGearedMCR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMCR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"internalContracts","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUpdateTime","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"master","outputs":[{"internalType":"contract INXMMaster","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMCRFloorIncrement","outputs":[{"internalType":"uint24","name":"","type":"uint24"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMCRIncrement","outputs":[{"internalType":"uint24","name":"","type":"uint24"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mcr","outputs":[{"internalType":"uint112","name":"","type":"uint112"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mcrFloor","outputs":[{"internalType":"uint112","name":"","type":"uint112"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mcrFloorIncrementThreshold","outputs":[{"internalType":"uint24","name":"","type":"uint24"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minUpdateTime","outputs":[{"internalType":"uint24","name":"","type":"uint24"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"previousMCR","outputs":[{"internalType":"contract IMCR","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"updateMCR","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"poolValueInEth","type":"uint256"},{"internalType":"bool","name":"forceUpdate","type":"bool"}],"name":"updateMCRInternal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes8","name":"code","type":"bytes8"},{"internalType":"uint256","name":"val","type":"uint256"}],"name":"updateUintParameters","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405260028054600160601b600160d81b031916790e1000bb800001f40000640032c80000000000000000000000001790553480156200004057600080fd5b5060405162001da938038062001da98339810160408190526200006391620001b2565b6200006e8162000119565b6001600160a01b0381161562000112576000546040516227050b60e31b8152614d4360f01b60048201526001600160a01b0390911690630138285890602401602060405180830381865afa158015620000cb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000f19190620001b2565b600580546001600160a01b0319166001600160a01b03929092169190911790555b50620001d9565b6000546001600160a01b03161562000177576000546001600160a01b03163314620001775760405162461bcd60e51b815260206004820152600a6024820152692737ba1036b0b9ba32b960b11b604482015260640160405180910390fd5b600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0381168114620001af57600080fd5b50565b600060208284031215620001c557600080fd5b8151620001d28162000199565b9392505050565b611bc080620001e96000396000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c80639dd86e0f116100ad578063c8f33c9111610071578063c8f33c9114610291578063d46655f4146102bd578063eb2fe983146102d0578063eb962360146102d8578063ee97f7f31461030157600080fd5b80639dd86e0f14610230578063a399af0f14610243578063a8a41a6814610259578063b34524871461026f578063b8caedc41461027757600080fd5b806344936b10116100f457806344936b10146101d657806369da148d146101ec5780636ec210d9146102025780637a2dbb6f1461020a5780638cd4f0a01461021d57600080fd5b8063017e7d8f14610131578063024687fd146101615780630ea9c9841461018c57806317797259146101965780633e434e33146101c0575b600080fd5b600454610144906001600160701b031681565b6040516001600160701b0390911681526020015b60405180910390f35b600554610174906001600160a01b031681565b6040516001600160a01b039091168152602001610158565b610194610314565b005b6002546101ac90600160781b900462ffffff1681565b60405162ffffff9091168152602001610158565b6002546101ac90600160601b900462ffffff1681565b6101de610534565b604051908152602001610158565b6002546101ac90600160c01b900462ffffff1681565b6101de610615565b600354610144906001600160701b031681565b61019461022b3660046117d7565b61064b565b61019461023e366004611807565b610721565b6002546101ac90600160901b900462ffffff1681565b6002546101ac90600160a81b900462ffffff1681565b6101de6109f2565b60035461014490600160701b90046001600160701b031681565b6004546102a890600160701b900463ffffffff1681565b60405163ffffffff9091168152602001610158565b6101946102cb366004611855565b610c8f565b610194610d09565b6101746102e6366004611879565b6001602052600090815260409020546001600160a01b031681565b600054610174906001600160a01b031681565b6000546040516227050b60e31b815261503160f01b60048201526001600160a01b0390911690630138285890602401602060405180830381865afa158015610360573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103849190611892565b600160008181526020919091527fcc69885fda6bcc1a4ace058b4a62bf5e179ea78fd58a1ccd71c22cc9b688792f80546001600160a01b039384166001600160a01b0319909116179055546040516227050b60e31b81526126a960f11b6004820152911690630138285890602401602060405180830381865afa15801561040f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104339190611892565b6002600090815260016020527fd9d16d34ffb15ba3a3d852f0d403e2ce1d691fb54de27ac87cd2f993f3ec330f80546001600160a01b039384166001600160a01b0319909116179055546040516227050b60e31b815261434f60f01b6004820152911690630138285890602401602060405180830381865afa1580156104bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104e19190611892565b600460005260016020527fedc95719e9a3b28dd8e80877cb5880a9be7de1a13fc8b05e7999683b6b56764380546001600160a01b0319166001600160a01b0392909216919091179055610532610e31565b565b6003546004546000916001600160701b03600160701b918290048116929081169163ffffffff9104164281900361056d57509092915050565b600254600160901b900462ffffff1660006201518061058c84426118c5565b61059690846118d8565b6105a091906118ef565b90506105ad816064611413565b9050848411156105eb576105e16127106105c78184611911565b6105d190886118d8565b6105db91906118ef565b85611413565b9550505050505090565b6105e16127106105fb83826118c5565b61060590886118d8565b61060f91906118ef565b8561142d565b600254600090600160a81b900462ffffff166127106106326109f2565b61063c91906118d8565b61064691906118ef565b905090565b6000546040516323c5b10760e21b81523360048201526001600160a01b0390911690638f16c41c90602401602060405180830381865afa158015610693573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b79190611924565b6107135760405162461bcd60e51b815260206004820152602260248201527f43616c6c6572206973206e6f7420616e20696e7465726e616c20636f6e74726160448201526118dd60f21b60648201526084015b60405180910390fd5b61071d828261143c565b5050565b600054604051632c1a733d60e11b81523360048201526001600160a01b0390911690635834e67a90602401602060405180830381865afa158015610769573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061078d9190611924565b6107e45760405162461bcd60e51b815260206004820152602260248201527f43616c6c6572206973206e6f7420617574686f72697a656420746f20676f7665604482015261393760f11b606482015260840161070a565b6001600160c01b0319821663111350d560e21b036108415762ffffff81111561081f5760405162461bcd60e51b815260040161070a90611941565b6002805462ffffff8316600160601b0262ffffff60601b199091161790555050565b6001600160c01b0319821663444d434960e01b0361089e5762ffffff81111561087c5760405162461bcd60e51b815260040161070a90611941565b6002805462ffffff8316600160781b0262ffffff60781b199091161790555050565b6001600160c01b03198216634d4d494360e01b036108fb5762ffffff8111156108d95760405162461bcd60e51b815260040161070a90611941565b6002805462ffffff8316600160901b0262ffffff60901b199091161790555050565b6001600160c01b031982166323a2a0a960e11b036109585762ffffff8111156109365760405162461bcd60e51b815260040161070a90611941565b6002805462ffffff8316600160a81b0262ffffff60a81b199091161790555050565b6001600160c01b03198216634d55544960e01b036109b55762ffffff8111156109935760405162461bcd60e51b815260040161070a90611941565b6002805462ffffff8316600160c01b0262ffffff60c01b199091161790555050565b60405162461bcd60e51b8152602060048201526012602482015271496e76616c696420706172616d20636f646560701b604482015260640161070a565b6000806109fd611794565b90506000816001600160a01b031663b9ab99276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a3f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a639190611892565b90506000610a6f6117ba565b60405163f480b7b960e01b81526000600482018190529192506001600160a01b0383169063f480b7b990602401602060405180830381865afa158015610ab9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610add919061196f565b90506000846001600160a01b03166367e4ac2c6040518163ffffffff1660e01b8152600401600060405180830381865afa158015610b1f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610b4791908101906119f8565b905060015b8151811015610c845760405163f480b7b960e01b8152600481018290526000906001600160a01b0386169063f480b7b990602401602060405180830381865afa158015610b9d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bc1919061196f565b90506000866001600160a01b031663bbff4e5a858581518110610be657610be6611ae7565b6020908102919091010151516040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101859052604401602060405180830381865afa158015610c3d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c61919061196f565b9050610c6d8186611911565b945050508080610c7c90611afd565b915050610b4c565b509095945050505050565b6000546001600160a01b031615610ce7576000546001600160a01b03163314610ce75760405162461bcd60e51b815260206004820152600a6024820152692737ba1036b0b9ba32b960b11b604482015260640161070a565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008054906101000a90046001600160a01b03166001600160a01b031663ff0938a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d5a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d7e9190611924565b15610dbe5760405162461bcd60e51b815260206004820152601060248201526f14de5cdd195b481a5cc81c185d5cd95960821b604482015260640161070a565b610532610dc9611794565b6001600160a01b0316632f04d7986040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e2a919061196f565b600061143c565b600080546040516227050b60e31b8152614d4360f01b60048201526001600160a01b0390911690630138285890602401602060405180830381865afa158015610e7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ea29190611892565b6005549091506001600160a01b03161580610ec657506001600160a01b0381163014155b15610ece5750565b600560009054906101000a90046001600160a01b03166001600160a01b0316637a2dbb6f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f21573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f459190611b16565b600380546001600160701b0319166001600160701b039290921691909117905560055460408051632e32bb7160e21b815290516001600160a01b039092169163b8caedc4916004808201926020929091908290030181865afa158015610faf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fd39190611b16565b6003600e6101000a8154816001600160701b0302191690836001600160701b03160217905550600560009054906101000a90046001600160a01b03166001600160a01b031663017e7d8f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561104c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110709190611b16565b600480546001600160701b0319166001600160701b03929092169190911781556005546040805163c8f33c9160e01b815290516001600160a01b039092169263c8f33c919282820192602092908290030181865afa1580156110d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110fa9190611b3f565b6004805463ffffffff92909216600160701b0263ffffffff60701b1990921691909117815560055460408051633e434e3360e01b815290516001600160a01b0390921692633e434e339282820192602092908290030181865afa158015611165573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111899190611b65565b6002600c6101000a81548162ffffff021916908362ffffff160217905550600560009054906101000a90046001600160a01b03166001600160a01b031663177972596040518163ffffffff1660e01b8152600401602060405180830381865afa1580156111fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061121e9190611b65565b6002600f6101000a81548162ffffff021916908362ffffff160217905550600560009054906101000a90046001600160a01b03166001600160a01b031663a399af0f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561128f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112b39190611b65565b600260126101000a81548162ffffff021916908362ffffff160217905550600560009054906101000a90046001600160a01b03166001600160a01b031663a8a41a686040518163ffffffff1660e01b8152600401602060405180830381865afa158015611324573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113489190611b65565b600260156101000a81548162ffffff021916908362ffffff160217905550600560009054906101000a90046001600160a01b03166001600160a01b03166369da148d6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156113b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113dd9190611b65565b6002805462ffffff92909216600160c01b0262ffffff60c01b1990921691909117905550600580546001600160a01b0319169055565b60008183106114225781611424565b825b90505b92915050565b60008183116114225781611424565b60025460035460045462ffffff600160601b8404811693600160781b8104821693600160a81b8204831693600160c01b909204909216916001600160701b0380821692600160701b928390048216929181169163ffffffff910416881580156114b35750426114b18663ffffffff8416611911565b115b156114c45750505050505050505050565b8063ffffffff164211801561155a5750876114dd611794565b6040516370310cb760e01b8152600481018d90526001600160701b03861660248201526001600160a01b0391909116906370310cb790604401602060405180830381865afa158015611533573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611557919061196f565b10155b156116325760006115926201518061157863ffffffff8516426118c5565b611582908b6118d8565b61158c91906118ef565b89611413565b905060006127106115a38184611911565b6115ad90886118d8565b6115b791906118ef565b90506001600160701b038111156116105760405162461bcd60e51b815260206004820152601960248201527f4d43523a206e65774d4352466c6f6f72206f766572666c6f7700000000000000604482015260640161070a565b600380546001600160701b0319166001600160701b0392909216919091179055505b600061163c610534565b9050836001600160701b0316816001600160701b03161461168357600380546dffffffffffffffffffffffffffff60701b1916600160701b6001600160701b038416021790555b600061168d6109f2565b905060008861169e612710846118d8565b6116a891906118ef565b6003549091506000906116c59083906001600160701b031661142d565b9050856001600160701b0316816001600160701b0316146116fc57600480546001600160701b0319166001600160701b0383161790555b6004805463ffffffff4216600160701b90810263ffffffff60701b1983168117909355600354604080516001600160701b0393830484168152948316938316939093176020850152169082015260608101839052608081018490527f6e87c25e322c4ad68faf7916d0788baaf714d806fe887a84ee4b84ad9666f6869060a00160405180910390a15050505050505050505050505050565b6000600181815b81526020810191909152604001600020546001600160a01b0316919050565b6000600181600461179b565b80151581146117d457600080fd5b50565b600080604083850312156117ea57600080fd5b8235915060208301356117fc816117c6565b809150509250929050565b6000806040838503121561181a57600080fd5b82356001600160c01b03198116811461183257600080fd5b946020939093013593505050565b6001600160a01b03811681146117d457600080fd5b60006020828403121561186757600080fd5b813561187281611840565b9392505050565b60006020828403121561188b57600080fd5b5035919050565b6000602082840312156118a457600080fd5b815161187281611840565b634e487b7160e01b600052601160045260246000fd5b81810381811115611427576114276118af565b8082028115828204841417611427576114276118af565b60008261190c57634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115611427576114276118af565b60006020828403121561193657600080fd5b8151611872816117c6565b6020808252601490820152734d43523a2076616c756520746f6f206c6172676560601b604082015260600190565b60006020828403121561198157600080fd5b5051919050565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff811182821017156119c1576119c1611988565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156119f0576119f0611988565b604052919050565b60006020808385031215611a0b57600080fd5b825167ffffffffffffffff80821115611a2357600080fd5b818501915085601f830112611a3757600080fd5b815181811115611a4957611a49611988565b611a57848260051b016119c7565b81815284810192506060918202840185019188831115611a7657600080fd5b938501935b82851015611adb5780858a031215611a935760008081fd5b611a9b61199e565b8551611aa681611840565b815285870151611ab5816117c6565b81880152604086810151611ac8816117c6565b9082015284529384019392850192611a7b565b50979650505050505050565b634e487b7160e01b600052603260045260246000fd5b600060018201611b0f57611b0f6118af565b5060010190565b600060208284031215611b2857600080fd5b81516001600160701b038116811461187257600080fd5b600060208284031215611b5157600080fd5b815163ffffffff8116811461187257600080fd5b600060208284031215611b7757600080fd5b815162ffffff8116811461187257600080fdfea26469706673582212203b600bc499df6db36981a0be41001d6d8fa43ea45ddc602534a40da5a2e65b9c64736f6c6343000812003300000000000000000000000001bfd82675dbcc7762c84019ca518e701c0cd07e
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061012c5760003560e01c80639dd86e0f116100ad578063c8f33c9111610071578063c8f33c9114610291578063d46655f4146102bd578063eb2fe983146102d0578063eb962360146102d8578063ee97f7f31461030157600080fd5b80639dd86e0f14610230578063a399af0f14610243578063a8a41a6814610259578063b34524871461026f578063b8caedc41461027757600080fd5b806344936b10116100f457806344936b10146101d657806369da148d146101ec5780636ec210d9146102025780637a2dbb6f1461020a5780638cd4f0a01461021d57600080fd5b8063017e7d8f14610131578063024687fd146101615780630ea9c9841461018c57806317797259146101965780633e434e33146101c0575b600080fd5b600454610144906001600160701b031681565b6040516001600160701b0390911681526020015b60405180910390f35b600554610174906001600160a01b031681565b6040516001600160a01b039091168152602001610158565b610194610314565b005b6002546101ac90600160781b900462ffffff1681565b60405162ffffff9091168152602001610158565b6002546101ac90600160601b900462ffffff1681565b6101de610534565b604051908152602001610158565b6002546101ac90600160c01b900462ffffff1681565b6101de610615565b600354610144906001600160701b031681565b61019461022b3660046117d7565b61064b565b61019461023e366004611807565b610721565b6002546101ac90600160901b900462ffffff1681565b6002546101ac90600160a81b900462ffffff1681565b6101de6109f2565b60035461014490600160701b90046001600160701b031681565b6004546102a890600160701b900463ffffffff1681565b60405163ffffffff9091168152602001610158565b6101946102cb366004611855565b610c8f565b610194610d09565b6101746102e6366004611879565b6001602052600090815260409020546001600160a01b031681565b600054610174906001600160a01b031681565b6000546040516227050b60e31b815261503160f01b60048201526001600160a01b0390911690630138285890602401602060405180830381865afa158015610360573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103849190611892565b600160008181526020919091527fcc69885fda6bcc1a4ace058b4a62bf5e179ea78fd58a1ccd71c22cc9b688792f80546001600160a01b039384166001600160a01b0319909116179055546040516227050b60e31b81526126a960f11b6004820152911690630138285890602401602060405180830381865afa15801561040f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104339190611892565b6002600090815260016020527fd9d16d34ffb15ba3a3d852f0d403e2ce1d691fb54de27ac87cd2f993f3ec330f80546001600160a01b039384166001600160a01b0319909116179055546040516227050b60e31b815261434f60f01b6004820152911690630138285890602401602060405180830381865afa1580156104bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104e19190611892565b600460005260016020527fedc95719e9a3b28dd8e80877cb5880a9be7de1a13fc8b05e7999683b6b56764380546001600160a01b0319166001600160a01b0392909216919091179055610532610e31565b565b6003546004546000916001600160701b03600160701b918290048116929081169163ffffffff9104164281900361056d57509092915050565b600254600160901b900462ffffff1660006201518061058c84426118c5565b61059690846118d8565b6105a091906118ef565b90506105ad816064611413565b9050848411156105eb576105e16127106105c78184611911565b6105d190886118d8565b6105db91906118ef565b85611413565b9550505050505090565b6105e16127106105fb83826118c5565b61060590886118d8565b61060f91906118ef565b8561142d565b600254600090600160a81b900462ffffff166127106106326109f2565b61063c91906118d8565b61064691906118ef565b905090565b6000546040516323c5b10760e21b81523360048201526001600160a01b0390911690638f16c41c90602401602060405180830381865afa158015610693573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b79190611924565b6107135760405162461bcd60e51b815260206004820152602260248201527f43616c6c6572206973206e6f7420616e20696e7465726e616c20636f6e74726160448201526118dd60f21b60648201526084015b60405180910390fd5b61071d828261143c565b5050565b600054604051632c1a733d60e11b81523360048201526001600160a01b0390911690635834e67a90602401602060405180830381865afa158015610769573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061078d9190611924565b6107e45760405162461bcd60e51b815260206004820152602260248201527f43616c6c6572206973206e6f7420617574686f72697a656420746f20676f7665604482015261393760f11b606482015260840161070a565b6001600160c01b0319821663111350d560e21b036108415762ffffff81111561081f5760405162461bcd60e51b815260040161070a90611941565b6002805462ffffff8316600160601b0262ffffff60601b199091161790555050565b6001600160c01b0319821663444d434960e01b0361089e5762ffffff81111561087c5760405162461bcd60e51b815260040161070a90611941565b6002805462ffffff8316600160781b0262ffffff60781b199091161790555050565b6001600160c01b03198216634d4d494360e01b036108fb5762ffffff8111156108d95760405162461bcd60e51b815260040161070a90611941565b6002805462ffffff8316600160901b0262ffffff60901b199091161790555050565b6001600160c01b031982166323a2a0a960e11b036109585762ffffff8111156109365760405162461bcd60e51b815260040161070a90611941565b6002805462ffffff8316600160a81b0262ffffff60a81b199091161790555050565b6001600160c01b03198216634d55544960e01b036109b55762ffffff8111156109935760405162461bcd60e51b815260040161070a90611941565b6002805462ffffff8316600160c01b0262ffffff60c01b199091161790555050565b60405162461bcd60e51b8152602060048201526012602482015271496e76616c696420706172616d20636f646560701b604482015260640161070a565b6000806109fd611794565b90506000816001600160a01b031663b9ab99276040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a3f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a639190611892565b90506000610a6f6117ba565b60405163f480b7b960e01b81526000600482018190529192506001600160a01b0383169063f480b7b990602401602060405180830381865afa158015610ab9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610add919061196f565b90506000846001600160a01b03166367e4ac2c6040518163ffffffff1660e01b8152600401600060405180830381865afa158015610b1f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610b4791908101906119f8565b905060015b8151811015610c845760405163f480b7b960e01b8152600481018290526000906001600160a01b0386169063f480b7b990602401602060405180830381865afa158015610b9d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bc1919061196f565b90506000866001600160a01b031663bbff4e5a858581518110610be657610be6611ae7565b6020908102919091010151516040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101859052604401602060405180830381865afa158015610c3d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c61919061196f565b9050610c6d8186611911565b945050508080610c7c90611afd565b915050610b4c565b509095945050505050565b6000546001600160a01b031615610ce7576000546001600160a01b03163314610ce75760405162461bcd60e51b815260206004820152600a6024820152692737ba1036b0b9ba32b960b11b604482015260640161070a565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008054906101000a90046001600160a01b03166001600160a01b031663ff0938a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d5a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d7e9190611924565b15610dbe5760405162461bcd60e51b815260206004820152601060248201526f14de5cdd195b481a5cc81c185d5cd95960821b604482015260640161070a565b610532610dc9611794565b6001600160a01b0316632f04d7986040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e06573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e2a919061196f565b600061143c565b600080546040516227050b60e31b8152614d4360f01b60048201526001600160a01b0390911690630138285890602401602060405180830381865afa158015610e7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ea29190611892565b6005549091506001600160a01b03161580610ec657506001600160a01b0381163014155b15610ece5750565b600560009054906101000a90046001600160a01b03166001600160a01b0316637a2dbb6f6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f21573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f459190611b16565b600380546001600160701b0319166001600160701b039290921691909117905560055460408051632e32bb7160e21b815290516001600160a01b039092169163b8caedc4916004808201926020929091908290030181865afa158015610faf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fd39190611b16565b6003600e6101000a8154816001600160701b0302191690836001600160701b03160217905550600560009054906101000a90046001600160a01b03166001600160a01b031663017e7d8f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561104c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110709190611b16565b600480546001600160701b0319166001600160701b03929092169190911781556005546040805163c8f33c9160e01b815290516001600160a01b039092169263c8f33c919282820192602092908290030181865afa1580156110d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110fa9190611b3f565b6004805463ffffffff92909216600160701b0263ffffffff60701b1990921691909117815560055460408051633e434e3360e01b815290516001600160a01b0390921692633e434e339282820192602092908290030181865afa158015611165573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111899190611b65565b6002600c6101000a81548162ffffff021916908362ffffff160217905550600560009054906101000a90046001600160a01b03166001600160a01b031663177972596040518163ffffffff1660e01b8152600401602060405180830381865afa1580156111fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061121e9190611b65565b6002600f6101000a81548162ffffff021916908362ffffff160217905550600560009054906101000a90046001600160a01b03166001600160a01b031663a399af0f6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561128f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112b39190611b65565b600260126101000a81548162ffffff021916908362ffffff160217905550600560009054906101000a90046001600160a01b03166001600160a01b031663a8a41a686040518163ffffffff1660e01b8152600401602060405180830381865afa158015611324573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113489190611b65565b600260156101000a81548162ffffff021916908362ffffff160217905550600560009054906101000a90046001600160a01b03166001600160a01b03166369da148d6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156113b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113dd9190611b65565b6002805462ffffff92909216600160c01b0262ffffff60c01b1990921691909117905550600580546001600160a01b0319169055565b60008183106114225781611424565b825b90505b92915050565b60008183116114225781611424565b60025460035460045462ffffff600160601b8404811693600160781b8104821693600160a81b8204831693600160c01b909204909216916001600160701b0380821692600160701b928390048216929181169163ffffffff910416881580156114b35750426114b18663ffffffff8416611911565b115b156114c45750505050505050505050565b8063ffffffff164211801561155a5750876114dd611794565b6040516370310cb760e01b8152600481018d90526001600160701b03861660248201526001600160a01b0391909116906370310cb790604401602060405180830381865afa158015611533573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611557919061196f565b10155b156116325760006115926201518061157863ffffffff8516426118c5565b611582908b6118d8565b61158c91906118ef565b89611413565b905060006127106115a38184611911565b6115ad90886118d8565b6115b791906118ef565b90506001600160701b038111156116105760405162461bcd60e51b815260206004820152601960248201527f4d43523a206e65774d4352466c6f6f72206f766572666c6f7700000000000000604482015260640161070a565b600380546001600160701b0319166001600160701b0392909216919091179055505b600061163c610534565b9050836001600160701b0316816001600160701b03161461168357600380546dffffffffffffffffffffffffffff60701b1916600160701b6001600160701b038416021790555b600061168d6109f2565b905060008861169e612710846118d8565b6116a891906118ef565b6003549091506000906116c59083906001600160701b031661142d565b9050856001600160701b0316816001600160701b0316146116fc57600480546001600160701b0319166001600160701b0383161790555b6004805463ffffffff4216600160701b90810263ffffffff60701b1983168117909355600354604080516001600160701b0393830484168152948316938316939093176020850152169082015260608101839052608081018490527f6e87c25e322c4ad68faf7916d0788baaf714d806fe887a84ee4b84ad9666f6869060a00160405180910390a15050505050505050505050505050565b6000600181815b81526020810191909152604001600020546001600160a01b0316919050565b6000600181600461179b565b80151581146117d457600080fd5b50565b600080604083850312156117ea57600080fd5b8235915060208301356117fc816117c6565b809150509250929050565b6000806040838503121561181a57600080fd5b82356001600160c01b03198116811461183257600080fd5b946020939093013593505050565b6001600160a01b03811681146117d457600080fd5b60006020828403121561186757600080fd5b813561187281611840565b9392505050565b60006020828403121561188b57600080fd5b5035919050565b6000602082840312156118a457600080fd5b815161187281611840565b634e487b7160e01b600052601160045260246000fd5b81810381811115611427576114276118af565b8082028115828204841417611427576114276118af565b60008261190c57634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115611427576114276118af565b60006020828403121561193657600080fd5b8151611872816117c6565b6020808252601490820152734d43523a2076616c756520746f6f206c6172676560601b604082015260600190565b60006020828403121561198157600080fd5b5051919050565b634e487b7160e01b600052604160045260246000fd5b6040516060810167ffffffffffffffff811182821017156119c1576119c1611988565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156119f0576119f0611988565b604052919050565b60006020808385031215611a0b57600080fd5b825167ffffffffffffffff80821115611a2357600080fd5b818501915085601f830112611a3757600080fd5b815181811115611a4957611a49611988565b611a57848260051b016119c7565b81815284810192506060918202840185019188831115611a7657600080fd5b938501935b82851015611adb5780858a031215611a935760008081fd5b611a9b61199e565b8551611aa681611840565b815285870151611ab5816117c6565b81880152604086810151611ac8816117c6565b9082015284529384019392850192611a7b565b50979650505050505050565b634e487b7160e01b600052603260045260246000fd5b600060018201611b0f57611b0f6118af565b5060010190565b600060208284031215611b2857600080fd5b81516001600160701b038116811461187257600080fd5b600060208284031215611b5157600080fd5b815163ffffffff8116811461187257600080fd5b600060208284031215611b7757600080fd5b815162ffffff8116811461187257600080fdfea26469706673582212203b600bc499df6db36981a0be41001d6d8fa43ea45ddc602534a40da5a2e65b9c64736f6c63430008120033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000001bfd82675dbcc7762c84019ca518e701c0cd07e
-----Decoded View---------------
Arg [0] : masterAddress (address): 0x01BFd82675DBCc7762C84019cA518e701C0cD07e
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000001bfd82675dbcc7762c84019ca518e701c0cd07e
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.