More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 2,096 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Purchase With Us... | 18140292 | 358 days ago | IN | 0 ETH | 0.00046366 | ||||
Purchase With Et... | 18140291 | 358 days ago | IN | 0.000615 ETH | 0.00102795 | ||||
Purchase With Et... | 18140291 | 358 days ago | IN | 0.003 ETH | 0.00102807 | ||||
Purchase With Et... | 18140289 | 358 days ago | IN | 0.03 ETH | 0.00151133 | ||||
Purchase With Et... | 18140286 | 358 days ago | IN | 0.0388 ETH | 0.00156321 | ||||
Purchase With Et... | 18140284 | 358 days ago | IN | 0.04 ETH | 0.00124913 | ||||
Purchase With Et... | 18140281 | 358 days ago | IN | 0.00615 ETH | 0.00105862 | ||||
Purchase With Et... | 18140279 | 358 days ago | IN | 0.1 ETH | 0.00163568 | ||||
Purchase With Us... | 18140277 | 358 days ago | IN | 0 ETH | 0.00138807 | ||||
Purchase With Us... | 18140277 | 358 days ago | IN | 0 ETH | 0.0014663 | ||||
Purchase With Us... | 18140269 | 358 days ago | IN | 0 ETH | 0.00148604 | ||||
Purchase With Et... | 18140267 | 358 days ago | IN | 0.1 ETH | 0.00180427 | ||||
Purchase With Et... | 18140265 | 358 days ago | IN | 1.221 ETH | 0.00147574 | ||||
Purchase With Et... | 18140264 | 358 days ago | IN | 0.1 ETH | 0.00142341 | ||||
Purchase With Et... | 18140260 | 358 days ago | IN | 0.004 ETH | 0.00129211 | ||||
Purchase With Et... | 18140257 | 358 days ago | IN | 0.1 ETH | 0.00176352 | ||||
Purchase With Et... | 18140252 | 358 days ago | IN | 0.052 ETH | 0.00157206 | ||||
Purchase With Et... | 18140248 | 358 days ago | IN | 0.11111 ETH | 0.00134827 | ||||
Purchase With Us... | 18140247 | 358 days ago | IN | 0 ETH | 0.00182904 | ||||
Purchase With Us... | 18140240 | 358 days ago | IN | 0 ETH | 0.00126228 | ||||
Purchase With Et... | 18140235 | 358 days ago | IN | 0.01 ETH | 0.0017045 | ||||
Purchase With Us... | 18140223 | 358 days ago | IN | 0 ETH | 0.00158242 | ||||
Purchase With Us... | 18140221 | 358 days ago | IN | 0 ETH | 0.00150484 | ||||
Purchase With Us... | 18140220 | 358 days ago | IN | 0 ETH | 0.00133699 | ||||
Purchase With Et... | 18140218 | 358 days ago | IN | 0.012266 ETH | 0.00154409 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
18140291 | 358 days ago | 0.00046125 ETH | ||||
18140291 | 358 days ago | 0.00015375 ETH | ||||
18140291 | 358 days ago | 0.00225 ETH | ||||
18140291 | 358 days ago | 0.00075 ETH | ||||
18140289 | 358 days ago | 0.0225 ETH | ||||
18140289 | 358 days ago | 0.0075 ETH | ||||
18140286 | 358 days ago | 0.0291 ETH | ||||
18140286 | 358 days ago | 0.0097 ETH | ||||
18140284 | 358 days ago | 0.03 ETH | ||||
18140284 | 358 days ago | 0.01 ETH | ||||
18140281 | 358 days ago | 0.0046125 ETH | ||||
18140281 | 358 days ago | 0.0015375 ETH | ||||
18140279 | 358 days ago | 0.075 ETH | ||||
18140279 | 358 days ago | 0.025 ETH | ||||
18140267 | 358 days ago | 0.075 ETH | ||||
18140267 | 358 days ago | 0.025 ETH | ||||
18140265 | 358 days ago | 0.91575 ETH | ||||
18140265 | 358 days ago | 0.30525 ETH | ||||
18140264 | 358 days ago | 0.075 ETH | ||||
18140264 | 358 days ago | 0.025 ETH | ||||
18140260 | 358 days ago | 0.003 ETH | ||||
18140260 | 358 days ago | 0.001 ETH | ||||
18140257 | 358 days ago | 0.075 ETH | ||||
18140257 | 358 days ago | 0.025 ETH | ||||
18140252 | 358 days ago | 0.039 ETH |
Loading...
Loading
Contract Name:
PreSaleDop
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 1000000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.19; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {AggregatorV3Interface} from "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; import {ECDSA} from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import {Address} from "@openzeppelin/contracts/utils/Address.sol"; import {Utils} from "./Utils.sol"; /// @title PreSaleDop contract /// @author Dop /// @notice Implements the preSale of Dop Token /// @dev The presale contract allows you to purchase dop token with ETH and USD, and there will be certain rounds, user will be able to claim tokens after completion of all rounds contract PreSaleDop is Ownable, Utils { using SafeERC20 for IERC20; using Address for address payable; /// @notice Thrown when address is blacklisted error Blacklisted(); /// @notice Thrown when updating an address with zero address error ZeroAddress(); /// @notice Thrown when buy is disabled error BuyNotEnable(); /// @notice Thrown when claim is disabled error ClaimNotEnable(); /// @notice Thrown when sign deadline is expired error DeadlineExpired(); /// @notice Thrown when round time is not started error RoundNotStarted(); /// @notice Thrown when round time is ended error RoundEnded(); /// @notice Thrown when Sign is invalid error InvalidSignature(); /// @notice Thrown when Eth price suddenly drops while purchasing with ETH error UnexpectedPriceDifference(); /// @notice Thrown when Round is not created error RoundIncorrect(); /// @notice Thrown when new round price is less than previous round price error PriceLessThanOldRound(); /// @notice Thrown when round start time is less than previous round error InvalidStartTime(); /// @notice Thrown when round starttime is less than or equal to previous round error InvalidEndTime(); /// @notice Thrown when new round price is less than previous round error PriceInvalid(); /// @notice Thrown when updating with the same value as previously stored error IdenticalValue(); /// @notice Thrown when value to trasfer is zero error ValueZero(); /// @notice Thrown when startTime is incorrect when updating round error StartTimeIncorrect(); /// @notice Thrown when endTime is incorrect when updating round error EndTimeIncorrect(); /// @notice Thrown when round price is greater than next round while updating error PriceGreaterThanNextRound(); /// @notice Returns the chainlink PriceFeed contract address AggregatorV3Interface internal immutable PRICE_FEED; /// @notice Returns the Count of rounds created uint8 private _roundIndex; /// @notice Returns the multiplier to handle zeros uint256 private constant MULTIPLIER10 = 1e10; /// @notice Returns the multiplier to handle zeros uint256 private constant MULTIPLIER30 = 1e30; /// @notice Returns that BuyEnable or not bool public buyEnable; /// @notice Returns that claimEnable or not bool public claimEnable; /// @notice Returns the address of signerWallet address public signerWallet; /// @notice Returns the address of DopWallet address public dopWallet; /// @notice Returns the address of claimsContract address public claimsContract; /// @notice Returns the address of fundsWallet address public fundsWallet; /// @notice Returns the USDT address IERC20 public immutable USDT; /// @notice Returns the dopToken address IERC20 public dopToken; /// @member startTime The start time of round /// @member endTime The end time of round /// @member price The price in usd per dop struct RoundData { uint256 startTime; uint256 endTime; uint256 price; } /// @notice mapping gives Round Data of each round mapping(uint8 => RoundData) public rounds; /// @notice mapping gives claim info of user in every round mapping(address => mapping(uint8 => uint256)) public claims; /// @notice mapping gives info about address's permission mapping(address => bool) public blacklistAddress; /* ========== EVENTS ========== */ event InvestedWithEth( address indexed by, string code, uint256 amountInvestedEth, uint8 indexed round, uint256 price, uint256 dopPurchased ); event InvestedWithUSDT( address indexed by, string code, uint256 amountInUsd, uint8 indexed round, uint256 price, uint256 dopPurchased ); event Claimed(address indexed by, uint256 amount, uint8 indexed round); event ClaimedBatch( address indexed by, uint256 amount, uint8[] indexed rounds ); event SignerUpdated(address oldSigner, address newSigner); event DopWalletUpdated(address oldAddress, address newAddress); event DopTokenUpdated(address oldDopAddress, address newDopAddress); event FundsWalletUpdated(address oldAddress, address newAddress); event BlacklistUpdated(address which, bool accessNow); event RoundCreated(uint8 newRound, RoundData roundData); event RoundUpdated(uint8 round, RoundData roundData); event BuyEnableUpdated(bool oldAccess, bool newAccess); event ClaimEnableUpdated(bool oldAccess, bool newAccess); /* ========== MODIFIERS ========== */ /// @notice restricts blacklisted addresses modifier notBlacklisted(address which) { if (blacklistAddress[which]) { revert Blacklisted(); } _; } /// @notice restricts when updating wallet/contract address to zero address modifier checkZeroAddress(address which) { if (which == address(0)) { revert ZeroAddress(); } _; } /// @notice ensures that buy is enabled when buying modifier canBuy() { if (!buyEnable) { revert BuyNotEnable(); } _; } /// @notice ensures that claim is enabled when claiming modifier canClaim() { if (!claimEnable) { revert ClaimNotEnable(); } _; } /// @dev Constructor. /// @param pricefeed The address of chainlink pricefeed contract /// @param signerAddress The address of signer wallet /// @param dopAddress The address of Dop token /// @param usdt The address of usdt contract constructor( AggregatorV3Interface pricefeed, address fundsWalletAddress, address signerAddress, address dopAddress, address claimsContractAddress, IERC20 usdt ) { if ( address(pricefeed) == address(0) || fundsWalletAddress == address(0) || signerAddress == address(0) || dopAddress == address(0) || claimsContractAddress == address(0) || address(usdt) == address(0) ) { revert ZeroAddress(); } PRICE_FEED = AggregatorV3Interface(pricefeed); buyEnable = true; fundsWallet = fundsWalletAddress; signerWallet = signerAddress; dopWallet = dopAddress; claimsContract = claimsContractAddress; USDT = usdt; } /// @notice Creates a new Round /// @param startTime The startTime of the round /// @param endTime The endTime of the round /// @param price The dopToken price in the round function createNewRound( uint256 startTime, uint256 endTime, uint256 price ) external onlyOwner { RoundData memory roundData = rounds[_roundIndex]; uint8 newRound = ++_roundIndex; if (price < roundData.price) { revert PriceLessThanOldRound(); } if (startTime < roundData.endTime) { revert InvalidStartTime(); } _verifyRound(startTime, endTime, price); roundData = RoundData({ startTime: startTime, endTime: endTime, price: price }); rounds[newRound] = roundData; emit RoundCreated({newRound: newRound, roundData: roundData}); } /// @notice Updates round data /// @param round The Round that will be updated /// @param startTime The StartTime of the round /// @param endTime The EndTime of the round /// @param price The price of the round function updateRound( uint8 round, uint256 startTime, uint256 endTime, uint256 price ) external onlyOwner { if (round == 0 || round > _roundIndex) { revert RoundIncorrect(); } RoundData memory roundPrevious = rounds[round - 1]; RoundData memory roundNext = rounds[round + 1]; if (startTime < roundPrevious.endTime) { revert StartTimeIncorrect(); } if (round != _roundIndex && endTime > roundNext.startTime) { revert EndTimeIncorrect(); } if (price < roundPrevious.price) { revert PriceLessThanOldRound(); } if (round != _roundIndex && price > roundNext.price) { revert PriceGreaterThanNextRound(); } _verifyRound(startTime, endTime, price); rounds[round] = RoundData({ startTime: startTime, endTime: endTime, price: price }); emit RoundUpdated({round: round, roundData: rounds[round]}); } /// @notice Changes access of buying /// @param enabled The decision about buying function enableBuy(bool enabled) external onlyOwner { if (buyEnable == enabled) { revert IdenticalValue(); } emit BuyEnableUpdated({oldAccess: buyEnable, newAccess: enabled}); buyEnable = enabled; } /// @notice Changes access of claiming /// @param enabled The decision about claiming function enableClaim(bool enabled) external onlyOwner { if (claimEnable == enabled) { revert IdenticalValue(); } emit ClaimEnableUpdated({oldAccess: claimEnable, newAccess: enabled}); claimEnable = enabled; } /// @notice Changes signer wallet address /// @param newSigner The address of the new signer wallet function changeSigner( address newSigner ) external checkZeroAddress(newSigner) onlyOwner { address oldSigner = signerWallet; if (oldSigner == newSigner) { revert IdenticalValue(); } emit SignerUpdated({oldSigner: oldSigner, newSigner: newSigner}); signerWallet = newSigner; } /// @notice Changes funds wallet to a new address /// @param newFundsWallet The address of the new funds wallet function changeFundsWallet( address newFundsWallet ) external checkZeroAddress(newFundsWallet) onlyOwner { address oldWallet = fundsWallet; if (oldWallet == newFundsWallet) { revert IdenticalValue(); } emit FundsWalletUpdated({ oldAddress: oldWallet, newAddress: newFundsWallet }); fundsWallet = newFundsWallet; } /// @notice Changes dop wallet to a new address /// @param newDopWallet The address of the new dop wallet function changeDopWallet( address newDopWallet ) external checkZeroAddress(newDopWallet) onlyOwner { address dopWalletOld = dopWallet; if (dopWalletOld == newDopWallet) { revert IdenticalValue(); } emit DopWalletUpdated({ oldAddress: dopWalletOld, newAddress: newDopWallet }); dopWallet = newDopWallet; } /// @notice Changes dop token contract to a new address /// @param newDopAddress The address of the new dop token function updateDopToken( IERC20 newDopAddress ) external checkZeroAddress(address(newDopAddress)) onlyOwner { IERC20 oldDop = dopToken; if (oldDop == newDopAddress) { revert IdenticalValue(); } emit DopTokenUpdated({ oldDopAddress: address(oldDop), newDopAddress: address(newDopAddress) }); dopToken = newDopAddress; } /// @notice Changes the access of any address in contract interaction /// @param which The address for which access is updated /// @param access The access decision of `which` address function updateBlackListedUser( address which, bool access ) external checkZeroAddress(which) onlyOwner { bool oldAccess = blacklistAddress[which]; if (oldAccess == access) { revert IdenticalValue(); } emit BlacklistUpdated({which: which, accessNow: access}); blacklistAddress[which] = access; } /// @notice Purchases dopToken with Eth /// @param code The code is used to verify signature of the user /// @param round The round in which user wants to purchase /// @param minAmountDop The minAmountDop user agrees to purchase /// @param deadline The deadline is validity of the signature /// @param v The `v` signature parameter /// @param r The `r` signature parameter /// @param s The `s` signature parameter function purchaseWithEth( string memory code, uint8 round, uint256 deadline, uint256 minAmountDop, uint8 v, bytes32 r, bytes32 s ) external payable notBlacklisted(msg.sender) canBuy { if (block.timestamp > deadline) { revert DeadlineExpired(); } _verifyInRound(round); _checkValue(msg.value); _verifyCode(code, deadline, v, r, s); // we don't expect such large msg.value `or `getLatestPriceEth() value such that this multiplication overflows and reverts. uint256 roundPrice = rounds[round].price; uint256 toReturn = ((msg.value * getLatestPriceEth()) * MULTIPLIER10) / (roundPrice); if (toReturn < minAmountDop) { revert UnexpectedPriceDifference(); } claims[msg.sender][round] += toReturn; uint256 claimContractAmount = (msg.value * 25) / 100; payable(claimsContract).sendValue(claimContractAmount); payable(fundsWallet).sendValue(msg.value - claimContractAmount); emit InvestedWithEth({ by: msg.sender, code: code, amountInvestedEth: msg.value, round: round, price: roundPrice, dopPurchased: toReturn }); } /// @notice Purchases dopToken with Usdt token /// @param investment The Investment amount /// @param code The code is used to verify signature of the user /// @param round The round in which user wants to purchase /// @param deadline The deadline is validity of the signature /// @param v The `v` signature parameter /// @param r The `r` signature parameter /// @param s The `s` signature parameter function purchaseWithUsdt( uint256 investment, string memory code, uint8 round, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external notBlacklisted(msg.sender) canBuy { if (block.timestamp > deadline) { revert DeadlineExpired(); } _verifyInRound(round); _checkValue(investment); _verifyCode(code, deadline, v, r, s); RoundData memory dataRound = rounds[round]; // we don't expect such large msg.value `or `getLatestPriceEth() value such that this multiplication overflows and reverts. uint256 toReturn = (investment * MULTIPLIER30) / (dataRound.price); claims[msg.sender][round] += toReturn; uint256 claimContractAmount = (investment * 25) / 100; USDT.safeTransferFrom(msg.sender, claimsContract, claimContractAmount); USDT.safeTransferFrom( msg.sender, fundsWallet, investment - claimContractAmount ); emit InvestedWithUSDT({ by: msg.sender, code: code, amountInUsd: investment, round: round, price: dataRound.price, dopPurchased: toReturn }); } /// @notice Claim dopToken purchased in a round /// @param round The round in which user want to claim function claimTokens( uint8 round ) external notBlacklisted(msg.sender) canClaim { uint amountClaim = claims[msg.sender][round]; _checkValue(amountClaim); delete claims[msg.sender][round]; dopToken.safeTransferFrom(dopWallet, msg.sender, amountClaim); emit Claimed({by: msg.sender, amount: amountClaim, round: round}); } /// @notice Users will claim their tokens when invested in more than one round, only when claimEnable /// @param roundsBatch The roundsBatch is multiple rounds in which user purchased function claimTokensBatch( uint8[] calldata roundsBatch ) external notBlacklisted(msg.sender) canClaim { uint256 totalAmount; for (uint256 i = 0; i < roundsBatch.length; i = uncheckedInc(i)) { uint256 amount = claims[msg.sender][roundsBatch[i]]; if (amount > 0) { delete claims[msg.sender][roundsBatch[i]]; totalAmount += amount; } } if (totalAmount > 0) { dopToken.safeTransferFrom(dopWallet, msg.sender, totalAmount); emit ClaimedBatch({ by: msg.sender, amount: totalAmount, rounds: roundsBatch }); } } /// @notice The chainlink inherited function, gives ETH/USD live price function getLatestPriceEth() public view returns (uint256) { ( , /*uint80 roundID*/ int price /*uint256 startedAt*/ /*uint80 answeredInRound*/, , , ) = /*uint256 timeStamp*/ PRICE_FEED.latestRoundData(); return uint256(price); // returns value 8 decimals } /// @notice Returns total rounds created /// @return The Round count function getRoundCount() external view returns (uint8) { return _roundIndex; } /// @notice The helper function which verifies signature, signed by signerWallet, reverts if invalidSignature function _verifyCode( string memory code, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal view { bytes32 encodedMessageHash = keccak256( abi.encodePacked(msg.sender, code, deadline) ); if ( signerWallet != ECDSA.recover( ECDSA.toEthSignedMessageHash(encodedMessageHash), v, r, s ) ) { revert InvalidSignature(); } } /// @notice Checks value, if zero then reverts function _checkValue(uint256 value) internal pure { if (value == 0) { revert ValueZero(); } } function _verifyInRound(uint8 round) internal view { RoundData memory dataRound = rounds[round]; if (block.timestamp < dataRound.startTime) { revert RoundNotStarted(); } if (block.timestamp >= dataRound.endTime) { revert RoundEnded(); } } /// @notice checks the validity of startTime, endTime and price function _verifyRound( uint256 startTime, uint256 endTime, uint256 price ) internal view { if (startTime < block.timestamp) { revert InvalidStartTime(); } if (endTime <= startTime) { revert InvalidEndTime(); } if (price == 0) { revert PriceInvalid(); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface AggregatorV3Interface { function decimals() external view returns (uint8); function description() external view returns (string memory); function version() external view returns (uint256); function getRoundData(uint80 _roundId) external view returns ( uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound ); function latestRoundData() external view returns ( uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound ); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.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.9.3) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/IERC20Permit.sol"; import "../../../utils/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 Address for address; /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value)); } /** * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value)); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval * to be set to zero before setting it to a non-zero value, such as USDT. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0)); _callOptionalReturn(token, approvalCall); } } /** * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`. * Revert on invalid signature. */ function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). * * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false // and not revert is the subcall reverts. (bool success, bytes memory returndata) = address(token).call(data); return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ 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 * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV // Deprecated in v4.8 } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. /// @solidity memory-safe-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32 message) { // 32 is the length in bytes of hash, // enforced by the type signature above /// @solidity memory-safe-assembly assembly { mstore(0x00, "\x19Ethereum Signed Message:\n32") mstore(0x1c, hash) message := keccak256(0x00, 0x3c) } } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 data) { /// @solidity memory-safe-assembly assembly { let ptr := mload(0x40) mstore(ptr, "\x19\x01") mstore(add(ptr, 0x02), domainSeparator) mstore(add(ptr, 0x22), structHash) data := keccak256(ptr, 0x42) } } /** * @dev Returns an Ethereum Signed Data with intended validator, created from a * `validator` and `data` according to the version 0 of EIP-191. * * See {recover}. */ function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x00", validator, data)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1, "Math: mulDiv overflow"); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.0; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; import "./math/SignedMath.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toString(int256 value) internal pure returns (string memory) { return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value)))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return keccak256(bytes(a)) == keccak256(bytes(b)); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.19; abstract contract Utils { /// @notice A helper function to work with unchecked iterators in loops. function uncheckedInc(uint256 i) internal pure returns (uint256 j) { unchecked { j = i + 1; } } }
{ "optimizer": { "enabled": true, "runs": 1000000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract AggregatorV3Interface","name":"pricefeed","type":"address"},{"internalType":"address","name":"fundsWalletAddress","type":"address"},{"internalType":"address","name":"signerAddress","type":"address"},{"internalType":"address","name":"dopAddress","type":"address"},{"internalType":"address","name":"claimsContractAddress","type":"address"},{"internalType":"contract IERC20","name":"usdt","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"Blacklisted","type":"error"},{"inputs":[],"name":"BuyNotEnable","type":"error"},{"inputs":[],"name":"ClaimNotEnable","type":"error"},{"inputs":[],"name":"DeadlineExpired","type":"error"},{"inputs":[],"name":"EndTimeIncorrect","type":"error"},{"inputs":[],"name":"IdenticalValue","type":"error"},{"inputs":[],"name":"InvalidEndTime","type":"error"},{"inputs":[],"name":"InvalidSignature","type":"error"},{"inputs":[],"name":"InvalidStartTime","type":"error"},{"inputs":[],"name":"PriceGreaterThanNextRound","type":"error"},{"inputs":[],"name":"PriceInvalid","type":"error"},{"inputs":[],"name":"PriceLessThanOldRound","type":"error"},{"inputs":[],"name":"RoundEnded","type":"error"},{"inputs":[],"name":"RoundIncorrect","type":"error"},{"inputs":[],"name":"RoundNotStarted","type":"error"},{"inputs":[],"name":"StartTimeIncorrect","type":"error"},{"inputs":[],"name":"UnexpectedPriceDifference","type":"error"},{"inputs":[],"name":"ValueZero","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"which","type":"address"},{"indexed":false,"internalType":"bool","name":"accessNow","type":"bool"}],"name":"BlacklistUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"oldAccess","type":"bool"},{"indexed":false,"internalType":"bool","name":"newAccess","type":"bool"}],"name":"BuyEnableUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"oldAccess","type":"bool"},{"indexed":false,"internalType":"bool","name":"newAccess","type":"bool"}],"name":"ClaimEnableUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"by","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"uint8","name":"round","type":"uint8"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"by","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"uint8[]","name":"rounds","type":"uint8[]"}],"name":"ClaimedBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldDopAddress","type":"address"},{"indexed":false,"internalType":"address","name":"newDopAddress","type":"address"}],"name":"DopTokenUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldAddress","type":"address"},{"indexed":false,"internalType":"address","name":"newAddress","type":"address"}],"name":"DopWalletUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldAddress","type":"address"},{"indexed":false,"internalType":"address","name":"newAddress","type":"address"}],"name":"FundsWalletUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"by","type":"address"},{"indexed":false,"internalType":"string","name":"code","type":"string"},{"indexed":false,"internalType":"uint256","name":"amountInvestedEth","type":"uint256"},{"indexed":true,"internalType":"uint8","name":"round","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"dopPurchased","type":"uint256"}],"name":"InvestedWithEth","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"by","type":"address"},{"indexed":false,"internalType":"string","name":"code","type":"string"},{"indexed":false,"internalType":"uint256","name":"amountInUsd","type":"uint256"},{"indexed":true,"internalType":"uint8","name":"round","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"dopPurchased","type":"uint256"}],"name":"InvestedWithUSDT","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"newRound","type":"uint8"},{"components":[{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"}],"indexed":false,"internalType":"struct PreSaleDop.RoundData","name":"roundData","type":"tuple"}],"name":"RoundCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"round","type":"uint8"},{"components":[{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"}],"indexed":false,"internalType":"struct PreSaleDop.RoundData","name":"roundData","type":"tuple"}],"name":"RoundUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldSigner","type":"address"},{"indexed":false,"internalType":"address","name":"newSigner","type":"address"}],"name":"SignerUpdated","type":"event"},{"inputs":[],"name":"USDT","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"blacklistAddress","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"buyEnable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newDopWallet","type":"address"}],"name":"changeDopWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newFundsWallet","type":"address"}],"name":"changeFundsWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newSigner","type":"address"}],"name":"changeSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimEnable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"round","type":"uint8"}],"name":"claimTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8[]","name":"roundsBatch","type":"uint8[]"}],"name":"claimTokensBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint8","name":"","type":"uint8"}],"name":"claims","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimsContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"}],"name":"createNewRound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"dopToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dopWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"enabled","type":"bool"}],"name":"enableBuy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"enabled","type":"bool"}],"name":"enableClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"fundsWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLatestPriceEth","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRoundCount","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"code","type":"string"},{"internalType":"uint8","name":"round","type":"uint8"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint256","name":"minAmountDop","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"purchaseWithEth","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"investment","type":"uint256"},{"internalType":"string","name":"code","type":"string"},{"internalType":"uint8","name":"round","type":"uint8"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"purchaseWithUsdt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"","type":"uint8"}],"name":"rounds","outputs":[{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"signerWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"which","type":"address"},{"internalType":"bool","name":"access","type":"bool"}],"name":"updateBlackListedUser","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"newDopAddress","type":"address"}],"name":"updateDopToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"round","type":"uint8"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"}],"name":"updateRound","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60c06040523480156200001157600080fd5b506040516200321e3803806200321e8339810160408190526200003491620001a3565b6200003f336200013a565b6001600160a01b03861615806200005d57506001600160a01b038516155b806200007057506001600160a01b038416155b806200008357506001600160a01b038316155b806200009657506001600160a01b038216155b80620000a957506001600160a01b038116155b15620000c85760405163d92e233d60e01b815260040160405180910390fd5b6001600160a01b039586166080526000805460ff60a81b1916600160a81b179055600480549587166001600160a01b0319968716179055600180549487169486169490941790935560028054928616928516929092179091556003805491851691909316179091551660a05262000237565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0381168114620001a057600080fd5b50565b60008060008060008060c08789031215620001bd57600080fd5b8651620001ca816200018a565b6020880151909650620001dd816200018a565b6040880151909550620001f0816200018a565b606088015190945062000203816200018a565b608088015190935062000216816200018a565b60a088015190925062000229816200018a565b809150509295509295509295565b60805160a051612fb36200026b600039600081816105d2015281816114ac015261151701526000610a6f0152612fb36000f3fe6080604052600436106101c25760003560e01c80636de7da78116100f7578063a2ea22f111610095578063cc518abf11610064578063cc518abf146105f4578063e09590d114610621578063f2fde38b14610641578063f3290d751461066157600080fd5b8063a2ea22f11461056d578063aad2b7231461058d578063b90d63ec146105ad578063c54e44eb146105c057600080fd5b80637fcb0972116100d15780637fcb0972146104d5578063809a62d3146105025780638da5cb5b14610522578063a25b5e4c1461054d57600080fd5b80636de7da7814610463578063715018a6146104a05780637d6f0d5f146104b557600080fd5b80633d389faf116101645780635d7984d31161013e5780635d7984d31461039f5780635f118704146103f6578063648b5ab21461041657806364f0d35e1461043657600080fd5b80633d389faf1461030857806341e7e3411461034b578063533687af1461036b57600080fd5b80632194f3a2116101a05780632194f3a2146102605780632a2530261461028d578063328ea1ec146102ad5780633b79fdd9146102f357600080fd5b806301242427146101c75780630ccf06641461021e578063207e8b9d14610240575b600080fd5b3480156101d357600080fd5b506005546101f49073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561022a57600080fd5b5061023e61023936600461289e565b610691565b005b34801561024c57600080fd5b5061023e61025b3660046128e4565b61078d565b34801561026c57600080fd5b506004546101f49073ffffffffffffffffffffffffffffffffffffffff1681565b34801561029957600080fd5b5061023e6102a8366004612901565b6108d2565b3480156102b957600080fd5b506102e56102c8366004612943565b600760209081526000928352604080842090915290825290205481565b604051908152602001610215565b3480156102ff57600080fd5b506102e5610a6a565b34801561031457600080fd5b5060005461033b907501000000000000000000000000000000000000000000900460ff1681565b6040519015158152602001610215565b34801561035757600080fd5b5061023e61036636600461289e565b610b07565b34801561037757600080fd5b5060005461033b90760100000000000000000000000000000000000000000000900460ff1681565b3480156103ab57600080fd5b506103db6103ba366004612978565b60066020526000908152604090208054600182015460029092015490919083565b60408051938452602084019290925290820152606001610215565b34801561040257600080fd5b5061023e610411366004612978565b610c01565b34801561042257600080fd5b5061023e6104313660046128e4565b610d52565b34801561044257600080fd5b506001546101f49073ffffffffffffffffffffffffffffffffffffffff1681565b34801561046f57600080fd5b5060005474010000000000000000000000000000000000000000900460ff1660405160ff9091168152602001610215565b3480156104ac57600080fd5b5061023e610e97565b3480156104c157600080fd5b5061023e6104d03660046128e4565b610eab565b3480156104e157600080fd5b506003546101f49073ffffffffffffffffffffffffffffffffffffffff1681565b34801561050e57600080fd5b5061023e61051d366004612993565b610ff0565b34801561052e57600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff166101f4565b34801561055957600080fd5b5061023e610568366004612aa6565b6112e7565b34801561057957600080fd5b5061023e610588366004612b2b565b6115a8565b34801561059957600080fd5b5061023e6105a83660046128e4565b61178f565b61023e6105bb366004612ba0565b6118d4565b3480156105cc57600080fd5b506101f47f000000000000000000000000000000000000000000000000000000000000000081565b34801561060057600080fd5b506002546101f49073ffffffffffffffffffffffffffffffffffffffff1681565b34801561062d57600080fd5b5061023e61063c366004612c09565b611b3a565b34801561064d57600080fd5b5061023e61065c3660046128e4565b611c9e565b34801561066d57600080fd5b5061033b61067c3660046128e4565b60086020526000908152604090205460ff1681565b610699611d5a565b801515600060169054906101000a900460ff161515036106e5576040517f2620eb3a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000546040805176010000000000000000000000000000000000000000000090920460ff161515825282151560208301527f6f1c946b833286a0aba42ffc9cab5cbb6de914c64ac164cb47dd33534e26f9cc910160405180910390a160008054911515760100000000000000000000000000000000000000000000027fffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffff909216919091179055565b8073ffffffffffffffffffffffffffffffffffffffff81166107db576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6107e3611d5a565b60055473ffffffffffffffffffffffffffffffffffffffff9081169083168103610839576040517f2620eb3a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff8084168252851660208201527f10076993ce6c5a7e2ae49154ff27323add63992358222c5ebba675b28691dcd7910160405180910390a15050600580547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6108da611d5a565b6000805474010000000000000000000000000000000000000000900460ff1680825260066020908152604080842081516060810183528154815260018201549381019390935260020154908201529190819060149061093890612c71565b91906101000a81548160ff021916908360ff16021790559050816040015183101561098f576040517f434c92c900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81602001518510156109cd576040517fb290253c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6109d8858585611ddb565b6040805160608082018352878252602080830188815283850188815260ff871660008181526006855287902086518155835160018201558251600290910155865190815285519381019390935290519482019490945292519083015292507f82c64385b05bba0b58f605c87d41ed3492fff6cf35c7a983ad3c4a9e24dc581b9060800160405180910390a15050505050565b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015610ad8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610afc9190612caa565b509195945050505050565b610b0f611d5a565b801515600060159054906101000a900460ff16151503610b5b576040517f2620eb3a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005460408051750100000000000000000000000000000000000000000090920460ff161515825282151560208301527fe557486689c0bf71dde8cb27e7e87ed23badcf92ea724f4a0368676720d416f6910160405180910390a1600080549115157501000000000000000000000000000000000000000000027fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff909216919091179055565b3360008181526008602052604090205460ff1615610c4b576040517f09550c7700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600054760100000000000000000000000000000000000000000000900460ff16610ca1576040517f55c2816500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33600090815260076020908152604080832060ff86168452909152902054610cc881611e8d565b33600081815260076020908152604080832060ff88168452909152812055600254600554610d139273ffffffffffffffffffffffffffffffffffffffff918216929091169084611ec7565b60405181815260ff84169033907f9438113cc7e5bebd0090746e5cda6373d5db7140b62ada8c68067df26d5d49a79060200160405180910390a3505050565b8073ffffffffffffffffffffffffffffffffffffffff8116610da0576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610da8611d5a565b60025473ffffffffffffffffffffffffffffffffffffffff9081169083168103610dfe576040517f2620eb3a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff8084168252851660208201527f445140bbf7687e3ded463ffa17db847fcd77210c567e166de0ab6e85c9aeed37910160405180910390a15050600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b610e9f611d5a565b610ea96000611f5c565b565b8073ffffffffffffffffffffffffffffffffffffffff8116610ef9576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610f01611d5a565b60045473ffffffffffffffffffffffffffffffffffffffff9081169083168103610f57576040517f2620eb3a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff8084168252851660208201527fe22b566ac7db56412e2e041c88a7fd3151151ad6c6647e954f9bdc054bcb780e910160405180910390a15050600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b610ff8611d5a565b60ff84161580611028575060005460ff740100000000000000000000000000000000000000009091048116908516115b1561105f576040517fa32e9ace00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060068161106f600188612cfa565b60ff1660ff168152602001908152602001600020604051806060016040529081600082015481526020016001820154815260200160028201548152505090506000600660008760016110c19190612d19565b60ff1660ff16815260200190815260200160002060405180606001604052908160008201548152602001600182015481526020016002820154815250509050816020015185101561113e576040517f51a30ffc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005460ff87811674010000000000000000000000000000000000000000909204161480159061116e5750805184115b156111a5576040517f8466de6b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81604001518310156111e3576040517f434c92c900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005460ff8781167401000000000000000000000000000000000000000090920416148015906112165750806040015183115b1561124d576040517fecdcda1900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611258858585611ddb565b6040805160608082018352878252602080830188815283850188815260ff8c16600081815260068552879020955180875592516001870181905591516002909601869055865190815292830191909152938101939093528201527f5b749a8258eb62926ad7cccbca0c4bc7c3a00a309a02ecd79087469c8629dc1e9060800160405180910390a1505050505050565b3360008181526008602052604090205460ff1615611331576040517f09550c7700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000547501000000000000000000000000000000000000000000900460ff16611386576040517f46b57c6f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b844211156113c0576040517f1ab7da6b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6113c986611fd1565b6113d288611e8d565b6113df8786868686612087565b60ff86166000908152600660209081526040808320815160608101835281548152600182015493810193909352600201549082018190529091906114306c0c9f2c9cd04674edea400000008c612d32565b61143a9190612d49565b33600090815260076020908152604080832060ff8d16845290915281208054929350839290919061146c908490612d84565b909155506000905060646114818c6019612d32565b61148b9190612d49565b6003549091506114d79073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000081169133911684611ec7565b60045461153f90339073ffffffffffffffffffffffffffffffffffffffff16611500848f612d97565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016929190611ec7565b8860ff163373ffffffffffffffffffffffffffffffffffffffff167f52eae7555991d6542d8dc7cda11585c12a91276550f457356fb0db8fbd0d48998c8e8760400151876040516115939493929190612e18565b60405180910390a35050505050505050505050565b3360008181526008602052604090205460ff16156115f2576040517f09550c7700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600054760100000000000000000000000000000000000000000000900460ff16611648576040517f55c2816500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805b8381101561170a573360009081526007602052604081208187878581811061167657611676612e47565b905060200201602081019061168b9190612978565b60ff1681526020810191909152604001600020549050801561170157336000908152600760205260408120908787858181106116c9576116c9612e47565b90506020020160208101906116de9190612978565b60ff16815260208101919091526040016000908120556116fe8184612d84565b92505b5060010161164c565b5080156117895760025460055461173c9173ffffffffffffffffffffffffffffffffffffffff91821691163384611ec7565b838360405161174c929190612e76565b6040519081900381208282529033907f64eb07d3c470826d9e24939980d923d84660ecd505c5284d0637b6593d90d0119060200160405180910390a35b50505050565b8073ffffffffffffffffffffffffffffffffffffffff81166117dd576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6117e5611d5a565b60015473ffffffffffffffffffffffffffffffffffffffff908116908316810361183b576040517f2620eb3a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff8084168252851660208201527f2d025324f0a785e8c12d0a0d91a9caa49df4ef20ff87e0df7213a1d4f3157beb910160405180910390a15050600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b3360008181526008602052604090205460ff161561191e576040517f09550c7700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000547501000000000000000000000000000000000000000000900460ff16611973576040517f46b57c6f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b854211156119ad576040517f1ab7da6b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6119b687611fd1565b6119bf34611e8d565b6119cc8887868686612087565b60ff871660009081526006602052604081206002015490816402540be4006119f2610a6a565b6119fc9034612d32565b611a069190612d32565b611a109190612d49565b905086811015611a4c576040517fbde8209300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33600090815260076020908152604080832060ff8d16845290915281208054839290611a79908490612d84565b90915550600090506064611a8e346019612d32565b611a989190612d49565b600354909150611abe9073ffffffffffffffffffffffffffffffffffffffff1682612154565b611aea611acb8234612d97565b60045473ffffffffffffffffffffffffffffffffffffffff1690612154565b8960ff163373ffffffffffffffffffffffffffffffffffffffff167f64e9068972d4660baf2e7e92cf33310de8ed0d28bff7318ac9430c2df6c5f8648d3487876040516115939493929190612e18565b8173ffffffffffffffffffffffffffffffffffffffff8116611b88576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611b90611d5a565b73ffffffffffffffffffffffffffffffffffffffff831660009081526008602052604090205460ff1682151581151503611bf6576040517f2620eb3a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff8616815284151560208201527f6a12b3df6cba4203bd7fd06b816789f87de8c594299aed5717ae070fac781bac910160405180910390a1505073ffffffffffffffffffffffffffffffffffffffff91909116600090815260086020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b611ca6611d5a565b73ffffffffffffffffffffffffffffffffffffffff8116611d4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b611d5781611f5c565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314610ea9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611d45565b42831015611e15576040517fb290253c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b828211611e4e576040517f38af65f700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600003611e88576040517f2013535a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b80600003611d57576040517f589f306800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526117899085906122ae565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60ff81166000908152600660209081526040918290208251606081018452815480825260018301549382019390935260029091015492810192909252421015612046576040517f8e9c6e1c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80602001514210612083576040517f6b5fd31b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b600033868660405160200161209e93929190612eb0565b6040516020818303038152906040528051906020012090506120f86120f0827f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b8585856123bd565b60015473ffffffffffffffffffffffffffffffffffffffff90811691161461214c576040517f8baa579f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050505050565b804710156121be576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401611d45565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d8060008114612218576040519150601f19603f3d011682016040523d82523d6000602084013e61221d565b606091505b5050905080611e88576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401611d45565b6000612310826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166123e79092919063ffffffff16565b90508051600014806123315750808060200190518101906123319190612f02565b611e88576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401611d45565b60008060006123ce878787876123f6565b915091506123db816124e5565b5090505b949350505050565b60606123df8484600085612698565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561242d57506000905060036124dc565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612481573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff81166124d5576000600192509250506124dc565b9150600090505b94509492505050565b60008160048111156124f9576124f9612f1f565b036125015750565b600181600481111561251557612515612f1f565b0361257c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401611d45565b600281600481111561259057612590612f1f565b036125f7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401611d45565b600381600481111561260b5761260b612f1f565b03611d57576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401611d45565b60608247101561272a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401611d45565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516127539190612f4e565b60006040518083038185875af1925050503d8060008114612790576040519150601f19603f3d011682016040523d82523d6000602084013e612795565b606091505b50915091506127a6878383876127b1565b979650505050505050565b606083156128475782516000036128405773ffffffffffffffffffffffffffffffffffffffff85163b612840576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401611d45565b50816123df565b6123df838381511561285c5781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d459190612f6a565b8015158114611d5757600080fd5b6000602082840312156128b057600080fd5b81356128bb81612890565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff81168114611d5757600080fd5b6000602082840312156128f657600080fd5b81356128bb816128c2565b60008060006060848603121561291657600080fd5b505081359360208301359350604090920135919050565b803560ff8116811461293e57600080fd5b919050565b6000806040838503121561295657600080fd5b8235612961816128c2565b915061296f6020840161292d565b90509250929050565b60006020828403121561298a57600080fd5b6128bb8261292d565b600080600080608085870312156129a957600080fd5b6129b28561292d565b966020860135965060408601359560600135945092505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112612a0c57600080fd5b813567ffffffffffffffff80821115612a2757612a276129cc565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715612a6d57612a6d6129cc565b81604052838152866020858801011115612a8657600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600080600060e0888a031215612ac157600080fd5b87359650602088013567ffffffffffffffff811115612adf57600080fd5b612aeb8a828b016129fb565b965050612afa6040890161292d565b945060608801359350612b0f6080890161292d565b925060a0880135915060c0880135905092959891949750929550565b60008060208385031215612b3e57600080fd5b823567ffffffffffffffff80821115612b5657600080fd5b818501915085601f830112612b6a57600080fd5b813581811115612b7957600080fd5b8660208260051b8501011115612b8e57600080fd5b60209290920196919550909350505050565b600080600080600080600060e0888a031215612bbb57600080fd5b873567ffffffffffffffff811115612bd257600080fd5b612bde8a828b016129fb565b975050612bed6020890161292d565b95506040880135945060608801359350612b0f6080890161292d565b60008060408385031215612c1c57600080fd5b8235612c27816128c2565b91506020830135612c3781612890565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600060ff821660ff8103612c8757612c87612c42565b60010192915050565b805169ffffffffffffffffffff8116811461293e57600080fd5b600080600080600060a08688031215612cc257600080fd5b612ccb86612c90565b9450602086015193506040860151925060608601519150612cee60808701612c90565b90509295509295909350565b60ff8281168282160390811115612d1357612d13612c42565b92915050565b60ff8181168382160190811115612d1357612d13612c42565b8082028115828204841417612d1357612d13612c42565b600082612d7f577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b80820180821115612d1357612d13612c42565b81810381811115612d1357612d13612c42565b60005b83811015612dc5578181015183820152602001612dad565b50506000910152565b60008151808452612de6816020860160208601612daa565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b608081526000612e2b6080830187612dce565b6020830195909552506040810192909252606090910152919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008184825b85811015612ea55760ff612e8f8361292d565b1683526020928301929190910190600101612e7c565b509095945050505050565b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008460601b16815260008351612eed816014850160208801612daa565b60149201918201929092526034019392505050565b600060208284031215612f1457600080fd5b81516128bb81612890565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60008251612f60818460208701612daa565b9190910192915050565b6020815260006128bb6020830184612dce56fea26469706673582212205e6d16462148388fc385e086123f50c87b88b439a91fd85834fbf3a95b003f6f64736f6c634300081300330000000000000000000000005f4ec3df9cbd43714fe2740f5e3616155c5b8419000000000000000000000000a22bac86e8f721875c6be26c1fc0b021442f7279000000000000000000000000ec38df358d2cb3557cb6cb9ebdb43a35891f4826000000000000000000000000347114dea137a6eddfba91bc07a238c719eb505d00000000000000000000000008669b18fe3a661400ac8dddf837e90861bff5b6000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7
Deployed Bytecode
0x6080604052600436106101c25760003560e01c80636de7da78116100f7578063a2ea22f111610095578063cc518abf11610064578063cc518abf146105f4578063e09590d114610621578063f2fde38b14610641578063f3290d751461066157600080fd5b8063a2ea22f11461056d578063aad2b7231461058d578063b90d63ec146105ad578063c54e44eb146105c057600080fd5b80637fcb0972116100d15780637fcb0972146104d5578063809a62d3146105025780638da5cb5b14610522578063a25b5e4c1461054d57600080fd5b80636de7da7814610463578063715018a6146104a05780637d6f0d5f146104b557600080fd5b80633d389faf116101645780635d7984d31161013e5780635d7984d31461039f5780635f118704146103f6578063648b5ab21461041657806364f0d35e1461043657600080fd5b80633d389faf1461030857806341e7e3411461034b578063533687af1461036b57600080fd5b80632194f3a2116101a05780632194f3a2146102605780632a2530261461028d578063328ea1ec146102ad5780633b79fdd9146102f357600080fd5b806301242427146101c75780630ccf06641461021e578063207e8b9d14610240575b600080fd5b3480156101d357600080fd5b506005546101f49073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561022a57600080fd5b5061023e61023936600461289e565b610691565b005b34801561024c57600080fd5b5061023e61025b3660046128e4565b61078d565b34801561026c57600080fd5b506004546101f49073ffffffffffffffffffffffffffffffffffffffff1681565b34801561029957600080fd5b5061023e6102a8366004612901565b6108d2565b3480156102b957600080fd5b506102e56102c8366004612943565b600760209081526000928352604080842090915290825290205481565b604051908152602001610215565b3480156102ff57600080fd5b506102e5610a6a565b34801561031457600080fd5b5060005461033b907501000000000000000000000000000000000000000000900460ff1681565b6040519015158152602001610215565b34801561035757600080fd5b5061023e61036636600461289e565b610b07565b34801561037757600080fd5b5060005461033b90760100000000000000000000000000000000000000000000900460ff1681565b3480156103ab57600080fd5b506103db6103ba366004612978565b60066020526000908152604090208054600182015460029092015490919083565b60408051938452602084019290925290820152606001610215565b34801561040257600080fd5b5061023e610411366004612978565b610c01565b34801561042257600080fd5b5061023e6104313660046128e4565b610d52565b34801561044257600080fd5b506001546101f49073ffffffffffffffffffffffffffffffffffffffff1681565b34801561046f57600080fd5b5060005474010000000000000000000000000000000000000000900460ff1660405160ff9091168152602001610215565b3480156104ac57600080fd5b5061023e610e97565b3480156104c157600080fd5b5061023e6104d03660046128e4565b610eab565b3480156104e157600080fd5b506003546101f49073ffffffffffffffffffffffffffffffffffffffff1681565b34801561050e57600080fd5b5061023e61051d366004612993565b610ff0565b34801561052e57600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff166101f4565b34801561055957600080fd5b5061023e610568366004612aa6565b6112e7565b34801561057957600080fd5b5061023e610588366004612b2b565b6115a8565b34801561059957600080fd5b5061023e6105a83660046128e4565b61178f565b61023e6105bb366004612ba0565b6118d4565b3480156105cc57600080fd5b506101f47f000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec781565b34801561060057600080fd5b506002546101f49073ffffffffffffffffffffffffffffffffffffffff1681565b34801561062d57600080fd5b5061023e61063c366004612c09565b611b3a565b34801561064d57600080fd5b5061023e61065c3660046128e4565b611c9e565b34801561066d57600080fd5b5061033b61067c3660046128e4565b60086020526000908152604090205460ff1681565b610699611d5a565b801515600060169054906101000a900460ff161515036106e5576040517f2620eb3a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000546040805176010000000000000000000000000000000000000000000090920460ff161515825282151560208301527f6f1c946b833286a0aba42ffc9cab5cbb6de914c64ac164cb47dd33534e26f9cc910160405180910390a160008054911515760100000000000000000000000000000000000000000000027fffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffff909216919091179055565b8073ffffffffffffffffffffffffffffffffffffffff81166107db576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6107e3611d5a565b60055473ffffffffffffffffffffffffffffffffffffffff9081169083168103610839576040517f2620eb3a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff8084168252851660208201527f10076993ce6c5a7e2ae49154ff27323add63992358222c5ebba675b28691dcd7910160405180910390a15050600580547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6108da611d5a565b6000805474010000000000000000000000000000000000000000900460ff1680825260066020908152604080842081516060810183528154815260018201549381019390935260020154908201529190819060149061093890612c71565b91906101000a81548160ff021916908360ff16021790559050816040015183101561098f576040517f434c92c900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81602001518510156109cd576040517fb290253c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6109d8858585611ddb565b6040805160608082018352878252602080830188815283850188815260ff871660008181526006855287902086518155835160018201558251600290910155865190815285519381019390935290519482019490945292519083015292507f82c64385b05bba0b58f605c87d41ed3492fff6cf35c7a983ad3c4a9e24dc581b9060800160405180910390a15050505050565b6000807f0000000000000000000000005f4ec3df9cbd43714fe2740f5e3616155c5b841973ffffffffffffffffffffffffffffffffffffffff1663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015610ad8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610afc9190612caa565b509195945050505050565b610b0f611d5a565b801515600060159054906101000a900460ff16151503610b5b576040517f2620eb3a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005460408051750100000000000000000000000000000000000000000090920460ff161515825282151560208301527fe557486689c0bf71dde8cb27e7e87ed23badcf92ea724f4a0368676720d416f6910160405180910390a1600080549115157501000000000000000000000000000000000000000000027fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff909216919091179055565b3360008181526008602052604090205460ff1615610c4b576040517f09550c7700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600054760100000000000000000000000000000000000000000000900460ff16610ca1576040517f55c2816500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33600090815260076020908152604080832060ff86168452909152902054610cc881611e8d565b33600081815260076020908152604080832060ff88168452909152812055600254600554610d139273ffffffffffffffffffffffffffffffffffffffff918216929091169084611ec7565b60405181815260ff84169033907f9438113cc7e5bebd0090746e5cda6373d5db7140b62ada8c68067df26d5d49a79060200160405180910390a3505050565b8073ffffffffffffffffffffffffffffffffffffffff8116610da0576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610da8611d5a565b60025473ffffffffffffffffffffffffffffffffffffffff9081169083168103610dfe576040517f2620eb3a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff8084168252851660208201527f445140bbf7687e3ded463ffa17db847fcd77210c567e166de0ab6e85c9aeed37910160405180910390a15050600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b610e9f611d5a565b610ea96000611f5c565b565b8073ffffffffffffffffffffffffffffffffffffffff8116610ef9576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610f01611d5a565b60045473ffffffffffffffffffffffffffffffffffffffff9081169083168103610f57576040517f2620eb3a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff8084168252851660208201527fe22b566ac7db56412e2e041c88a7fd3151151ad6c6647e954f9bdc054bcb780e910160405180910390a15050600480547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b610ff8611d5a565b60ff84161580611028575060005460ff740100000000000000000000000000000000000000009091048116908516115b1561105f576040517fa32e9ace00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060068161106f600188612cfa565b60ff1660ff168152602001908152602001600020604051806060016040529081600082015481526020016001820154815260200160028201548152505090506000600660008760016110c19190612d19565b60ff1660ff16815260200190815260200160002060405180606001604052908160008201548152602001600182015481526020016002820154815250509050816020015185101561113e576040517f51a30ffc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005460ff87811674010000000000000000000000000000000000000000909204161480159061116e5750805184115b156111a5576040517f8466de6b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81604001518310156111e3576040517f434c92c900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005460ff8781167401000000000000000000000000000000000000000090920416148015906112165750806040015183115b1561124d576040517fecdcda1900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611258858585611ddb565b6040805160608082018352878252602080830188815283850188815260ff8c16600081815260068552879020955180875592516001870181905591516002909601869055865190815292830191909152938101939093528201527f5b749a8258eb62926ad7cccbca0c4bc7c3a00a309a02ecd79087469c8629dc1e9060800160405180910390a1505050505050565b3360008181526008602052604090205460ff1615611331576040517f09550c7700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000547501000000000000000000000000000000000000000000900460ff16611386576040517f46b57c6f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b844211156113c0576040517f1ab7da6b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6113c986611fd1565b6113d288611e8d565b6113df8786868686612087565b60ff86166000908152600660209081526040808320815160608101835281548152600182015493810193909352600201549082018190529091906114306c0c9f2c9cd04674edea400000008c612d32565b61143a9190612d49565b33600090815260076020908152604080832060ff8d16845290915281208054929350839290919061146c908490612d84565b909155506000905060646114818c6019612d32565b61148b9190612d49565b6003549091506114d79073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec781169133911684611ec7565b60045461153f90339073ffffffffffffffffffffffffffffffffffffffff16611500848f612d97565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec716929190611ec7565b8860ff163373ffffffffffffffffffffffffffffffffffffffff167f52eae7555991d6542d8dc7cda11585c12a91276550f457356fb0db8fbd0d48998c8e8760400151876040516115939493929190612e18565b60405180910390a35050505050505050505050565b3360008181526008602052604090205460ff16156115f2576040517f09550c7700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600054760100000000000000000000000000000000000000000000900460ff16611648576040517f55c2816500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805b8381101561170a573360009081526007602052604081208187878581811061167657611676612e47565b905060200201602081019061168b9190612978565b60ff1681526020810191909152604001600020549050801561170157336000908152600760205260408120908787858181106116c9576116c9612e47565b90506020020160208101906116de9190612978565b60ff16815260208101919091526040016000908120556116fe8184612d84565b92505b5060010161164c565b5080156117895760025460055461173c9173ffffffffffffffffffffffffffffffffffffffff91821691163384611ec7565b838360405161174c929190612e76565b6040519081900381208282529033907f64eb07d3c470826d9e24939980d923d84660ecd505c5284d0637b6593d90d0119060200160405180910390a35b50505050565b8073ffffffffffffffffffffffffffffffffffffffff81166117dd576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6117e5611d5a565b60015473ffffffffffffffffffffffffffffffffffffffff908116908316810361183b576040517f2620eb3a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff8084168252851660208201527f2d025324f0a785e8c12d0a0d91a9caa49df4ef20ff87e0df7213a1d4f3157beb910160405180910390a15050600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b3360008181526008602052604090205460ff161561191e576040517f09550c7700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000547501000000000000000000000000000000000000000000900460ff16611973576040517f46b57c6f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b854211156119ad576040517f1ab7da6b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6119b687611fd1565b6119bf34611e8d565b6119cc8887868686612087565b60ff871660009081526006602052604081206002015490816402540be4006119f2610a6a565b6119fc9034612d32565b611a069190612d32565b611a109190612d49565b905086811015611a4c576040517fbde8209300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33600090815260076020908152604080832060ff8d16845290915281208054839290611a79908490612d84565b90915550600090506064611a8e346019612d32565b611a989190612d49565b600354909150611abe9073ffffffffffffffffffffffffffffffffffffffff1682612154565b611aea611acb8234612d97565b60045473ffffffffffffffffffffffffffffffffffffffff1690612154565b8960ff163373ffffffffffffffffffffffffffffffffffffffff167f64e9068972d4660baf2e7e92cf33310de8ed0d28bff7318ac9430c2df6c5f8648d3487876040516115939493929190612e18565b8173ffffffffffffffffffffffffffffffffffffffff8116611b88576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611b90611d5a565b73ffffffffffffffffffffffffffffffffffffffff831660009081526008602052604090205460ff1682151581151503611bf6576040517f2620eb3a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff8616815284151560208201527f6a12b3df6cba4203bd7fd06b816789f87de8c594299aed5717ae070fac781bac910160405180910390a1505073ffffffffffffffffffffffffffffffffffffffff91909116600090815260086020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b611ca6611d5a565b73ffffffffffffffffffffffffffffffffffffffff8116611d4e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b611d5781611f5c565b50565b60005473ffffffffffffffffffffffffffffffffffffffff163314610ea9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611d45565b42831015611e15576040517fb290253c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b828211611e4e576040517f38af65f700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80600003611e88576040517f2013535a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b80600003611d57576040517f589f306800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526117899085906122ae565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60ff81166000908152600660209081526040918290208251606081018452815480825260018301549382019390935260029091015492810192909252421015612046576040517f8e9c6e1c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80602001514210612083576040517f6b5fd31b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b600033868660405160200161209e93929190612eb0565b6040516020818303038152906040528051906020012090506120f86120f0827f19457468657265756d205369676e6564204d6573736167653a0a3332000000006000908152601c91909152603c902090565b8585856123bd565b60015473ffffffffffffffffffffffffffffffffffffffff90811691161461214c576040517f8baa579f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050505050565b804710156121be576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401611d45565b60008273ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d8060008114612218576040519150601f19603f3d011682016040523d82523d6000602084013e61221d565b606091505b5050905080611e88576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401611d45565b6000612310826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166123e79092919063ffffffff16565b90508051600014806123315750808060200190518101906123319190612f02565b611e88576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401611d45565b60008060006123ce878787876123f6565b915091506123db816124e5565b5090505b949350505050565b60606123df8484600085612698565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561242d57506000905060036124dc565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612481573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff81166124d5576000600192509250506124dc565b9150600090505b94509492505050565b60008160048111156124f9576124f9612f1f565b036125015750565b600181600481111561251557612515612f1f565b0361257c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401611d45565b600281600481111561259057612590612f1f565b036125f7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401611d45565b600381600481111561260b5761260b612f1f565b03611d57576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401611d45565b60608247101561272a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401611d45565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516127539190612f4e565b60006040518083038185875af1925050503d8060008114612790576040519150601f19603f3d011682016040523d82523d6000602084013e612795565b606091505b50915091506127a6878383876127b1565b979650505050505050565b606083156128475782516000036128405773ffffffffffffffffffffffffffffffffffffffff85163b612840576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401611d45565b50816123df565b6123df838381511561285c5781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d459190612f6a565b8015158114611d5757600080fd5b6000602082840312156128b057600080fd5b81356128bb81612890565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff81168114611d5757600080fd5b6000602082840312156128f657600080fd5b81356128bb816128c2565b60008060006060848603121561291657600080fd5b505081359360208301359350604090920135919050565b803560ff8116811461293e57600080fd5b919050565b6000806040838503121561295657600080fd5b8235612961816128c2565b915061296f6020840161292d565b90509250929050565b60006020828403121561298a57600080fd5b6128bb8261292d565b600080600080608085870312156129a957600080fd5b6129b28561292d565b966020860135965060408601359560600135945092505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112612a0c57600080fd5b813567ffffffffffffffff80821115612a2757612a276129cc565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715612a6d57612a6d6129cc565b81604052838152866020858801011115612a8657600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600080600060e0888a031215612ac157600080fd5b87359650602088013567ffffffffffffffff811115612adf57600080fd5b612aeb8a828b016129fb565b965050612afa6040890161292d565b945060608801359350612b0f6080890161292d565b925060a0880135915060c0880135905092959891949750929550565b60008060208385031215612b3e57600080fd5b823567ffffffffffffffff80821115612b5657600080fd5b818501915085601f830112612b6a57600080fd5b813581811115612b7957600080fd5b8660208260051b8501011115612b8e57600080fd5b60209290920196919550909350505050565b600080600080600080600060e0888a031215612bbb57600080fd5b873567ffffffffffffffff811115612bd257600080fd5b612bde8a828b016129fb565b975050612bed6020890161292d565b95506040880135945060608801359350612b0f6080890161292d565b60008060408385031215612c1c57600080fd5b8235612c27816128c2565b91506020830135612c3781612890565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600060ff821660ff8103612c8757612c87612c42565b60010192915050565b805169ffffffffffffffffffff8116811461293e57600080fd5b600080600080600060a08688031215612cc257600080fd5b612ccb86612c90565b9450602086015193506040860151925060608601519150612cee60808701612c90565b90509295509295909350565b60ff8281168282160390811115612d1357612d13612c42565b92915050565b60ff8181168382160190811115612d1357612d13612c42565b8082028115828204841417612d1357612d13612c42565b600082612d7f577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b80820180821115612d1357612d13612c42565b81810381811115612d1357612d13612c42565b60005b83811015612dc5578181015183820152602001612dad565b50506000910152565b60008151808452612de6816020860160208601612daa565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b608081526000612e2b6080830187612dce565b6020830195909552506040810192909252606090910152919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008184825b85811015612ea55760ff612e8f8361292d565b1683526020928301929190910190600101612e7c565b509095945050505050565b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008460601b16815260008351612eed816014850160208801612daa565b60149201918201929092526034019392505050565b600060208284031215612f1457600080fd5b81516128bb81612890565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60008251612f60818460208701612daa565b9190910192915050565b6020815260006128bb6020830184612dce56fea26469706673582212205e6d16462148388fc385e086123f50c87b88b439a91fd85834fbf3a95b003f6f64736f6c63430008130033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000005f4ec3df9cbd43714fe2740f5e3616155c5b8419000000000000000000000000a22bac86e8f721875c6be26c1fc0b021442f7279000000000000000000000000ec38df358d2cb3557cb6cb9ebdb43a35891f4826000000000000000000000000347114dea137a6eddfba91bc07a238c719eb505d00000000000000000000000008669b18fe3a661400ac8dddf837e90861bff5b6000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7
-----Decoded View---------------
Arg [0] : pricefeed (address): 0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419
Arg [1] : fundsWalletAddress (address): 0xA22baC86E8F721875C6BE26C1Fc0B021442f7279
Arg [2] : signerAddress (address): 0xeC38Df358d2CB3557Cb6Cb9ebdB43a35891F4826
Arg [3] : dopAddress (address): 0x347114deA137a6EDdFBa91bc07A238c719Eb505D
Arg [4] : claimsContractAddress (address): 0x08669B18fe3A661400ac8dddF837e90861BFf5B6
Arg [5] : usdt (address): 0xdAC17F958D2ee523a2206206994597C13D831ec7
-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 0000000000000000000000005f4ec3df9cbd43714fe2740f5e3616155c5b8419
Arg [1] : 000000000000000000000000a22bac86e8f721875c6be26c1fc0b021442f7279
Arg [2] : 000000000000000000000000ec38df358d2cb3557cb6cb9ebdb43a35891f4826
Arg [3] : 000000000000000000000000347114dea137a6eddfba91bc07a238c719eb505d
Arg [4] : 00000000000000000000000008669b18fe3a661400ac8dddf837e90861bff5b6
Arg [5] : 000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7
Loading...
Loading
Loading...
Loading
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.