Overview
ETH Balance
0 ETH
ETH Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 4 from a total of 4 transactions
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
127700317 | 37 days ago | 0.000004114300054 ETH | ||||
127700317 | 37 days ago | 0.000004114300054 ETH | ||||
127700317 | 37 days ago | 0.000004114300054 ETH | ||||
127700317 | 37 days ago | 0.000090514601204 ETH | ||||
127699318 | 37 days ago | 0.000004114474559 ETH | ||||
127699318 | 37 days ago | 0.000004114474559 ETH | ||||
127699318 | 37 days ago | 0.000004114474559 ETH | ||||
127699318 | 37 days ago | 0.0000905184403 ETH | ||||
127699303 | 37 days ago | 0.000004114501404 ETH | ||||
127699303 | 37 days ago | 0.000004114501404 ETH | ||||
127699303 | 37 days ago | 0.000004114501404 ETH | ||||
127699303 | 37 days ago | 0.000090519030888 ETH | ||||
127699303 | 37 days ago | 0.000004114501404 ETH | ||||
127699303 | 37 days ago | 0.000004114501404 ETH | ||||
127699303 | 37 days ago | 0.000004114501404 ETH | ||||
127699303 | 37 days ago | 0.000090519030888 ETH | ||||
127699303 | 37 days ago | 0.000000650242474 ETH | ||||
127699303 | 37 days ago | 0.000000650242474 ETH | ||||
127699303 | 37 days ago | 0.000000650242474 ETH | ||||
127699303 | 37 days ago | 0.000130048494967 ETH | ||||
127699227 | 37 days ago | 0.00000413097034 ETH | ||||
127699227 | 37 days ago | 0.00000413097034 ETH | ||||
127699227 | 37 days ago | 0.00000413097034 ETH | ||||
127699227 | 37 days ago | 0.000090881347495 ETH | ||||
111685777 | 407 days ago | 0.000067040010733 ETH |
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x76D7832d...a46194750 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
Employer
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 2000000 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./ITimeToken.sol"; import "@openzeppelin/contracts/utils/math/Math.sol"; /** * @title TIME Token Employer contract * @dev Smart contract used to model the first Use Case for TIME Token - The Employer. It pays some interest over the native cryptocurrency deposited from investors **/ contract Employer { using Math for uint256; bool private _isOperationLocked; address public constant DEVELOPER_ADDRESS = 0x731591207791A93fB0Ec481186fb086E16A7d6D0; address public immutable TIME_TOKEN_ADDRESS; uint256 public constant D = 10**18; uint256 public constant FACTOR = 10**18; uint256 public immutable FIRST_BLOCK; uint256 public immutable ONE_YEAR; uint256 public availableNative; uint256 public currentDepositedNative; uint256 public totalAnticipatedTime; uint256 public totalBurnedTime; uint256 public totalDepositedNative; uint256 public totalDepositedTime; uint256 public totalEarnedNative; uint256 public totalTimeSaved; mapping (address => bool) public anticipationEnabled; mapping (address => uint256) public deposited; mapping (address => uint256) public earned; mapping (address => uint256) public lastBlock; mapping (address => uint256) public remainingTime; constructor(address timeTokenAddress_) { FIRST_BLOCK = block.number; TIME_TOKEN_ADDRESS = timeTokenAddress_; ONE_YEAR = ITimeToken(timeTokenAddress_).TIME_BASE_LIQUIDITY().mulDiv(52, 1); } /** * @dev Implement security to avoid reentrancy attacks **/ modifier nonReentrant() { require(!_isOperationLocked, "Operation is locked"); _isOperationLocked = true; _; _isOperationLocked = false; } /** * @dev Update the blocks from caller (msg.sender), contract address, and burn TIME tokens accordingly. It also extracts ETH from TIME contract, compounds and transfer earnings to depositants **/ modifier update(bool mustCompound) { if (lastBlock[address(this)] == 0 && block.number != 0) lastBlock[address(this)] = block.number; if ((lastBlock[msg.sender] == 0 && block.number != 0) || remainingTime[msg.sender] == 0) lastBlock[msg.sender] = block.number; uint256 timeToBurn = (block.number - lastBlock[address(this)]).mulDiv(D, 1); uint256 timeToBurnDepositant = (block.number - lastBlock[msg.sender]).mulDiv(D, 1); earned[msg.sender] += queryEarnings(msg.sender); _; if (mustCompound) _compoundDepositantEarnings(msg.sender); else _transferDepositantEarnings(msg.sender); ITimeToken timeToken = ITimeToken(TIME_TOKEN_ADDRESS); _earnInterestAndAllocate(timeToken); if (timeToBurn > remainingTime[address(this)]) timeToBurn = remainingTime[address(this)]; if (timeToBurnDepositant > remainingTime[msg.sender]) timeToBurnDepositant = remainingTime[msg.sender]; if (timeToBurn > 0) _burnTime(timeToken, address(this), timeToBurn); if (timeToBurnDepositant > 0) _burnTime(timeToken, msg.sender, timeToBurnDepositant); lastBlock[address(this)] = block.number; lastBlock[msg.sender] = block.number; } fallback() external payable { require(msg.data.length == 0); } receive() external payable { if (msg.sender != TIME_TOKEN_ADDRESS) { require(msg.value > 0, "Please deposit some amount"); availableNative += msg.value; } } /** * @dev Common function to anticipate gains earned from investments from deposited amount * @param timeAmount TIME token amount used to anticipate the earnings in terms of blocks **/ function _anticipateEarnings(uint256 timeAmount) private { earned[msg.sender] += queryAnticipatedEarnings(msg.sender, timeAmount); totalAnticipatedTime += timeAmount; remainingTime[address(this)] += timeAmount; } /** * @dev Burn TIME according to the amount set from selected depositant * @param timeToken The instance of TIME Token contract * @param depositant Address of depositant account * @param amount Amount to be burned **/ function _burnTime(ITimeToken timeToken, address depositant, uint256 amount) private { if (amount > timeToken.balanceOf(address(this))) amount = timeToken.balanceOf(address(this)); try timeToken.burn(amount) { totalBurnedTime += amount; remainingTime[depositant] -= amount; } catch { revert("Unable to burn TIME"); } } /** * @dev Claim the withdrawable amount earned from the TIME Community Pool * @param timeToken The instance of TIME Token contract * @return earnings The amount earned from TIME Token Community Pool **/ function _claimEarningsFromTime(ITimeToken timeToken) private returns (uint256 earnings) { uint256 currentBalance = address(this).balance; if (timeToken.withdrawableShareBalance(address(this)) > 0) { try timeToken.withdrawShare() { earnings = (address(this).balance - currentBalance); _payComission(earnings / 2); earnings /= 2; return earnings; } catch { return earnings; } } else { return earnings; } } /** * @dev Compound earned amount from selected depositant * @param depositant Address of depositant account **/ function _compoundDepositantEarnings(address depositant) private { if (earned[depositant] > 0) { require(availableNative >= earned[depositant], "Not enough amount to transfer"); availableNative -= earned[depositant]; deposited[depositant] += earned[depositant]; currentDepositedNative += earned[depositant]; earned[depositant] = 0; } } /** * @dev Claim earnings from TIME contract and buy 10% of them in TIME tokens * @param timeToken The instance of TIME Token contract **/ function _earnInterestAndAllocate(ITimeToken timeToken) private { uint256 earnedNative = _claimEarningsFromTime(timeToken); totalEarnedNative += earnedNative; _saveTime(timeToken, earnedNative / 10); availableNative += (earnedNative - (earnedNative / 10)); } /** * @notice Called when need to pay comission for miner (block.coinbase) and developer * @param comissionAmount The total comission amount in ETH which will be paid **/ function _payComission(uint256 comissionAmount) private { if (comissionAmount > 0) { uint256 share = comissionAmount / 4; _saveTime(ITimeToken(TIME_TOKEN_ADDRESS), share); payable(DEVELOPER_ADDRESS).transfer(share); availableNative += share; totalEarnedNative += share; if (block.coinbase == address(0)) payable(DEVELOPER_ADDRESS).transfer(share); else payable(block.coinbase).transfer(share); } } /** * @dev Buy (save) TIME tokens from the TIME Token contract and update the amount to be burned * @param timeToken The instance of TIME Token contract * @param amountToSave Amount to be bought **/ function _saveTime(ITimeToken timeToken, uint256 amountToSave) private { if (amountToSave > 0) { require(address(this).balance >= amountToSave, "Not enough amount to save TIME"); uint256 currentTime = timeToken.balanceOf(address(this)); try timeToken.saveTime{value: amountToSave}() { uint256 timeSaved = (timeToken.balanceOf(address(this)) - currentTime); remainingTime[address(this)] += timeSaved; totalTimeSaved += timeSaved; } catch { revert("Not able to save TIME"); } } } /** * @dev Withdraw all available earnings to the depositant address * @param depositant Address of depositant account **/ function _transferDepositantEarnings(address depositant) private { if (earned[depositant] > 0) { require(availableNative >= earned[depositant], "Not enough amount to transfer"); availableNative -= earned[depositant]; payable(depositant).transfer(earned[depositant]); earned[depositant] = 0; } } /** * @dev Withdraw all deposited amount to the depositant address and transfer the deposited TIME from depositant to the Employer account **/ function _withdraw() private { require(deposited[msg.sender] > 0, "Depositant does not have any amount to withdraw"); require(currentDepositedNative >= deposited[msg.sender], "Not enough in contract to withdraw"); remainingTime[address(this)] += remainingTime[msg.sender]; remainingTime[msg.sender] = 0; currentDepositedNative -= deposited[msg.sender]; payable(msg.sender).transfer(deposited[msg.sender]); deposited[msg.sender] = 0; } /** * @dev Deposit only TIME in order to anticipate interest over previous deposited ETH * @notice Pre-condition: the depositant must have previous deposited ETH and also should approve (allow to spend) the TIME tokens to deposit. Anticipation is mandatory in this case * @param timeAmount The amount in TIME an investor should deposit to anticipate **/ function anticipate(uint256 timeAmount) public payable nonReentrant update(false) { require(deposited[msg.sender] > 0, "Depositant does not have any amount to anticipate"); require(timeAmount > 0, "Please deposit some TIME amount"); ITimeToken timeToken = ITimeToken(TIME_TOKEN_ADDRESS); require(timeToken.allowance(msg.sender, address(this)) >= timeAmount, "Should allow TIME to be spent"); try timeToken.transferFrom(msg.sender, address(this), timeAmount) { totalDepositedTime += timeAmount; _anticipateEarnings(timeAmount); } catch { revert("Problem when transferring TIME"); } } /** * @dev Calculate the anticipation fee an investor needs to pay in order to anticipate TIME Tokens in the Employer contract * @return fee The fee amount calculated **/ function anticipationFee() public view returns (uint256) { return ITimeToken(TIME_TOKEN_ADDRESS).fee().mulDiv(11, 1); } /** * @dev Compound available earnings into the depositant account * @notice Pre-condition: the depositant should approve (allow to spend) the TIME tokens to deposit. Also, if they want to anticipate yield, they must enabled anticipation before the function call * @param timeAmount (Optional. Can be zero) The amount of TIME Tokens an investor wants to continue receiveing or anticipating earnings * @param mustAnticipateTime Informs whether an investor wants to anticipate earnings to be compounded **/ function compound(uint256 timeAmount, bool mustAnticipateTime) public nonReentrant update(true) { require(deposited[msg.sender] > 0, "Depositant does not have any amount to compound"); if (mustAnticipateTime) require(anticipationEnabled[msg.sender], "Depositant is not enabled to anticipate TIME"); if (timeAmount > 0) { ITimeToken timeToken = ITimeToken(TIME_TOKEN_ADDRESS); require(timeToken.allowance(msg.sender, address(this)) >= timeAmount, "Should allow TIME to be spent"); try timeToken.transferFrom(msg.sender, address(this), timeAmount) { totalDepositedTime += timeAmount; if (mustAnticipateTime) { _anticipateEarnings(timeAmount); } else { remainingTime[msg.sender] += timeAmount; } } catch { revert("Problem when transferring TIME"); } } } /** * @dev Deposit ETH and TIME in order to earn interest over them * @notice Pre-condition: the depositant should approve (allow to spend) the TIME tokens to deposit. Also, if they want to anticipate yield, they must enabled anticipation before the function call * @param timeAmount The amount in TIME an investor should deposit * @param mustAnticipateTime Informs if the depositant wants to anticipate the yield or not **/ function deposit(uint256 timeAmount, bool mustAnticipateTime) public payable nonReentrant update(false) { require(msg.value > 0, "Please deposit some amount"); require(timeAmount > 0, "Please deposit some TIME amount"); if (mustAnticipateTime) require(anticipationEnabled[msg.sender], "Depositant is not enabled to anticipate TIME"); ITimeToken timeToken = ITimeToken(TIME_TOKEN_ADDRESS); require(timeToken.allowance(msg.sender, address(this)) >= timeAmount, "Should allow TIME to be spent"); uint256 comission = msg.value / 50; uint256 depositAmount = msg.value - comission; deposited[msg.sender] += depositAmount; currentDepositedNative += depositAmount; totalDepositedNative += msg.value; try timeToken.transferFrom(msg.sender, address(this), timeAmount) { totalDepositedTime += timeAmount; if (mustAnticipateTime) { _anticipateEarnings(timeAmount); } else { remainingTime[msg.sender] += timeAmount; } _payComission(comission); } catch { revert("Problem when transferring TIME"); } } /** * @dev Public call for earning interest for Employer (if it has any to receive) **/ function earn() public nonReentrant { _earnInterestAndAllocate(ITimeToken(TIME_TOKEN_ADDRESS)); } /** * @dev Enable an investor to anticipate yields using TIME tokens **/ function enableAnticipation() public payable nonReentrant update(false) { require(!anticipationEnabled[msg.sender], "Address is already enabled for TIME anticipation"); uint256 fee = ITimeToken(TIME_TOKEN_ADDRESS).fee().mulDiv(10, 1); require(msg.value >= fee, "Please provide the enough fee amount to enable TIME anticipation"); uint256 comission = fee / 5; _payComission(comission); totalEarnedNative += msg.value; availableNative += (msg.value - comission); anticipationEnabled[msg.sender] = true; } /** * @dev Inform the current Return Of Investment the Employer contract is giving * @return roi The current amount returned to investors **/ function getCurrentROI() public view returns (uint256) { if (availableNative == 0) return 0; if (currentDepositedNative == 0) return 10**50; return availableNative.mulDiv(FACTOR, currentDepositedNative); } /** * @dev Inform the current Return Of Investment per Block the Employer contract is giving * @return roi The current amount per block returned to investors **/ function getCurrentROIPerBlock() public view returns (uint256) { return getCurrentROI().mulDiv(FACTOR, ONE_YEAR); } /** * @dev Inform the historical Return Of Investment the Employer contract is giving * @return roi The historical amount returned to investors **/ function getROI() public view returns (uint256) { if (totalEarnedNative == 0) return 0; if (totalDepositedNative == 0) return 10**50; return totalEarnedNative.mulDiv(FACTOR, totalDepositedNative); } /** * @dev Inform the historical Return Of Investment per Block the Employer contract is giving * @return roi The historical amount per block returned to investors **/ function getROIPerBlock() public view returns (uint256) { return getROI().mulDiv(FACTOR, ONE_YEAR); } /** * @dev Inform the earnings an investor can anticipate (without waiting for a given time) according to the informed TIME amount * @param depositant Address of the depositant account * @param anticipatedTime Amount of TIME informed by a depositant as anticipation * @return earnings Amount a depositant can anticipate **/ function queryAnticipatedEarnings(address depositant, uint256 anticipatedTime) public view returns (uint256) { return (availableNative.mulDiv(anticipatedTime, 1)).mulDiv(deposited[depositant], ONE_YEAR.mulDiv(currentDepositedNative, 1) + 1); } /** * @dev Inform the earnings an investor can currently receive * @param depositant Address of the depositant account * @return earnings Amount a depositant can receive **/ function queryEarnings(address depositant) public view returns (uint256) { uint256 numberOfBlocks = (block.number - lastBlock[depositant]).mulDiv(D, 1); if (numberOfBlocks <= remainingTime[depositant]) { return (availableNative.mulDiv(numberOfBlocks, 1)).mulDiv(deposited[depositant], ONE_YEAR.mulDiv(currentDepositedNative, 1) + 1); } else { return (availableNative.mulDiv(remainingTime[depositant], 1)).mulDiv(deposited[depositant], ONE_YEAR.mulDiv(currentDepositedNative, 1) + 1); } } /** * @dev Withdraw earnings (only) of a depositant (msg.sender) * @notice All functions are in modifiers. It only checks if the depositant has earning something **/ function withdrawEarnings() public nonReentrant update(false) { require(earned[msg.sender] > 0, "Depositant does not have any earnings to withdraw"); } /** * @dev Withdraw all deposited values of a depositant (msg.sender) **/ function withdrawDeposit() public nonReentrant update(false) { _withdraw(); } /** * @dev Withdraw all deposited values of a depositant (msg.sender) without any check for earnings (emergency) **/ function withdrawDepositEmergency() public nonReentrant { _withdraw(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface ITimeToken { function DEVELOPER_ADDRESS() external returns (address); function BASE_FEE() external returns (uint256); function COMISSION_RATE() external returns (uint256); function SHARE_RATE() external returns (uint256); function TIME_BASE_LIQUIDITY() external returns (uint256); function TIME_BASE_FEE() external returns (uint256); function TOLERANCE() external returns (uint256); function dividendPerToken() external returns (uint256); function firstBlock() external returns (uint256); function liquidityFactorNative() external returns (uint256); function liquidityFactorTime() external returns (uint256); function numberOfHolders() external returns (uint256); function numberOfMiners() external returns (uint256); function sharedBalance() external returns (uint256); function poolBalance() external returns (uint256); function totalMinted() external returns (uint256); function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function burn(uint256 amount) external; function transfer(address to, uint256 amount) external returns (bool success); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function decreaseAllowance(address spender, uint256 subtractedValue) external returns (bool); function increaseAllowance(address spender, uint256 addedValue) external returns (bool); function transferFrom( address from, address to, uint256 amount ) external returns (bool success); function averageMiningRate() external view returns (uint256); function donateEth() external payable; function enableMining() external payable; function enableMiningWithTimeToken() external; function fee() external view returns (uint256); function feeInTime() external view returns (uint256); function mining() external; function saveTime() external payable returns (bool success); function spendTime(uint256 timeAmount) external returns (bool success); function swapPriceNative(uint256 amountNative) external view returns (uint256); function swapPriceTimeInverse(uint256 amountTime) external view returns (uint256); function accountShareBalance(address account) external view returns (uint256); function withdrawableShareBalance(address account) external view returns (uint256); function withdrawShare() external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.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) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 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. It 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)`. // We also know that `k`, the position of the most significant bit, is such that `msb(a) = 2**k`. // This gives `2**k < a <= 2**(k+1)` → `2**(k/2) <= sqrt(a) < 2 ** (k/2+1)`. // Using an algorithm similar to the msb conmputation, we are able to compute `result = 2**(k/2)` which is a // good first aproximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1; uint256 x = a; if (x >> 128 > 0) { x >>= 128; result <<= 64; } if (x >> 64 > 0) { x >>= 64; result <<= 32; } if (x >> 32 > 0) { x >>= 32; result <<= 16; } if (x >> 16 > 0) { x >>= 16; result <<= 8; } if (x >> 8 > 0) { x >>= 8; result <<= 4; } if (x >> 4 > 0) { x >>= 4; result <<= 2; } if (x >> 2 > 0) { result <<= 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) { uint256 result = sqrt(a); if (rounding == Rounding.Up && result * result < a) { result += 1; } return result; } }
{ "remappings": [ "@ensdomains/=node_modules/@ensdomains/", "@openzeppelin/=node_modules/@openzeppelin/", "ds-test/=lib/forge-std/lib/ds-test/src/", "eth-gas-reporter/=node_modules/eth-gas-reporter/", "forge-std/=lib/forge-std/src/", "hardhat/=node_modules/hardhat/", "lib/forge-std:ds-test/=lib/forge-std/lib/ds-test/src/" ], "optimizer": { "enabled": true, "runs": 2000000 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "paris", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"timeTokenAddress_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"D","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEVELOPER_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FACTOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FIRST_BLOCK","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ONE_YEAR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TIME_TOKEN_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"timeAmount","type":"uint256"}],"name":"anticipate","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"anticipationEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"anticipationFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"availableNative","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"timeAmount","type":"uint256"},{"internalType":"bool","name":"mustAnticipateTime","type":"bool"}],"name":"compound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentDepositedNative","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"timeAmount","type":"uint256"},{"internalType":"bool","name":"mustAnticipateTime","type":"bool"}],"name":"deposit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"deposited","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"earn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"earned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"enableAnticipation","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"getCurrentROI","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentROIPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getROI","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getROIPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"depositant","type":"address"},{"internalType":"uint256","name":"anticipatedTime","type":"uint256"}],"name":"queryAnticipatedEarnings","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"depositant","type":"address"}],"name":"queryEarnings","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"remainingTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAnticipatedTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalBurnedTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalDepositedNative","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalDepositedTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalEarnedNative","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalTimeSaved","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawDeposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawDepositEmergency","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawEarnings","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Deployed Bytecode
0x60806040526004361061021c5760003560e01c80638576ea3a1161011d578063b841a3e8116100b0578063cebca0601161007f578063d3bff50c11610064578063d3bff50c146106ae578063d90bb24c146106ce578063e6f2a029146106e4576102e7565b8063cebca06014610684578063d389800f14610699576102e7565b8063b841a3e8146105fa578063bd94319c14610610578063bfde682c14610644578063cb13cddb14610657576102e7565b80639a408321116100ec5780639a408321146105a7578063aa436105146105ba578063aefb79f9146105d0578063b73c6ce9146105e5576102e7565b80638576ea3a1461050e5780638d88f48d1461054e57806393b8840e14610564578063952ca92c1461057a576102e7565b806335815b95116101b0578063454e66c81161017f57806350a8242b1161016457806350a8242b146104b9578063561acaf0146104d95780637d523aad146104e1576102e7565b8063454e66c814610457578063456ca60c146104a4576102e7565b806335815b9514610348578063377d90881461040c57806337de6e20146104215780634306cc3f14610437576102e7565b806316d3bfbb116101ec57806316d3bfbb14610379578063249b16de146103ad578063269d7b05146103e157806332f23fe1146103f6576102e7565b80628cc262146102f25780630d814d04146103325780630f529ba214610348578063117df08814610364576102e7565b366102e7573373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000c22bb3200426c5856dd73c9f281922611c4a920a16146102e557600034116102cd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f506c65617365206465706f73697420736f6d6520616d6f756e7400000000000060448201526064015b60405180910390fd5b34600160008282546102df919061360b565b90915550505b005b36156102e557600080fd5b3480156102fe57600080fd5b5061031f61030d366004613647565b600b6020526000908152604090205481565b6040519081526020015b60405180910390f35b34801561033e57600080fd5b5061031f60065481565b34801561035457600080fd5b5061031f670de0b6b3a764000081565b34801561037057600080fd5b506102e56106f9565b34801561038557600080fd5b5061031f7f0000000000000000000000000000000000000000002b036da601a044b400000081565b3480156103b957600080fd5b5061031f7f00000000000000000000000000000000000000000000000000000000066b57e781565b3480156103ed57600080fd5b5061031f6109ac565b34801561040257600080fd5b5061031f60025481565b34801561041857600080fd5b5061031f610a00565b34801561042d57600080fd5b5061031f60085481565b34801561044357600080fd5b5061031f610452366004613647565b610a98565b34801561046357600080fd5b5061047f73731591207791a93fb0ec481186fb086e16a7d6d081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610329565b3480156104b057600080fd5b5061031f610c27565b3480156104c557600080fd5b506102e56104d4366004613670565b610c5e565b6102e56112d9565b3480156104ed57600080fd5b5061031f6104fc366004613647565b600d6020526000908152604090205481565b34801561051a57600080fd5b5061053e610529366004613647565b60096020526000908152604090205460ff1681565b6040519015158152602001610329565b34801561055a57600080fd5b5061031f60075481565b34801561057057600080fd5b5061031f60045481565b34801561058657600080fd5b5061031f610595366004613647565b600c6020526000908152604090205481565b6102e56105b5366004613670565b6116b8565b3480156105c657600080fd5b5061031f60035481565b3480156105dc57600080fd5b5061031f611ce7565b3480156105f157600080fd5b506102e5611d36565b34801561060657600080fd5b5061031f60015481565b34801561061c57600080fd5b5061047f7f000000000000000000000000c22bb3200426c5856dd73c9f281922611c4a920a81565b6102e56106523660046136a0565b611f70565b34801561066357600080fd5b5061031f610672366004613647565b600a6020526000908152604090205481565b34801561069057600080fd5b5061031f612576565b3480156106a557600080fd5b506102e56125ad565b3480156106ba57600080fd5b5061031f6106c93660046136b9565b612698565b3480156106da57600080fd5b5061031f60055481565b3480156106f057600080fd5b506102e5612716565b60005460ff1615610766576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4f7065726174696f6e206973206c6f636b65640000000000000000000000000060448201526064016102c4565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001178155308152600c60205260408120541580156107aa57504315155b156107c257306000908152600c602052604090204390555b336000908152600c60205260409020541580156107de57504315155b806107f65750336000908152600d6020526040902054155b1561080e57336000908152600c602052604090204390555b306000908152600c602052604081205461084090670de0b6b3a76400009060019061083990436136e3565b91906127b6565b336000908152600c60205260408120549192509061086f90670de0b6b3a76400009060019061083990436136e3565b905061087a33610a98565b336000908152600b60205260408120805490919061089990849061360b565b909155506108a79050612882565b82156108bb576108b633612a6b565b6108c4565b6108c433612c13565b7f000000000000000000000000c22bb3200426c5856dd73c9f281922611c4a920a6108ee81612d82565b306000908152600d602052604090205483111561091857306000908152600d602052604090205492505b336000908152600d602052604090205482111561094257336000908152600d602052604090205491505b821561095357610953813085612dea565b811561096457610964813384612dea565b5050306000908152600c602052604080822043908190553383529082205580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555050565b60006007546000036109be5750600090565b6005546000036109e2575074446c3b15f9926687d2c40534fdb56400000000000090565b6005546007546109fb91670de0b6b3a7640000906127b6565b905090565b60006109fb600b60017f000000000000000000000000c22bb3200426c5856dd73c9f281922611c4a920a73ffffffffffffffffffffffffffffffffffffffff1663ddca3f436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a74573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061083991906136f6565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600c60205260408120548190610adb90670de0b6b3a76400009060019061083990436136e3565b73ffffffffffffffffffffffffffffffffffffffff84166000908152600d60205260409020549091508111610b865773ffffffffffffffffffffffffffffffffffffffff83166000908152600a6020526040902054600254610b7f9190610b65907f0000000000000000000000000000000000000000002b036da601a044b40000009060016127b6565b610b7090600161360b565b600180546108399186906127b6565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600a6020526040902054600254610b7f9190610be1907f0000000000000000000000000000000000000000002b036da601a044b40000009060016127b6565b610bec90600161360b565b73ffffffffffffffffffffffffffffffffffffffff86166000908152600d6020526040902054600180546108399290916127b6565b50919050565b60006109fb670de0b6b3a76400007f0000000000000000000000000000000000000000002b036da601a044b40000006108396109ac565b60005460ff1615610ccb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4f7065726174696f6e206973206c6f636b65640000000000000000000000000060448201526064016102c4565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660019081178255308252600c602052604090912054158015610d1257504315155b15610d2a57306000908152600c602052604090204390555b336000908152600c6020526040902054158015610d4657504315155b80610d5e5750336000908152600d6020526040902054155b15610d7657336000908152600c602052604090204390555b306000908152600c6020526040812054610da190670de0b6b3a76400009060019061083990436136e3565b336000908152600c602052604081205491925090610dd090670de0b6b3a76400009060019061083990436136e3565b9050610ddb33610a98565b336000908152600b602052604081208054909190610dfa90849061360b565b9091555050336000908152600a6020526040902054610e9b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4465706f736974616e7420646f6573206e6f74206861766520616e7920616d6f60448201527f756e7420746f20636f6d706f756e64000000000000000000000000000000000060648201526084016102c4565b8315610f40573360009081526009602052604090205460ff16610f40576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f4465706f736974616e74206973206e6f7420656e61626c656420746f20616e7460448201527f696369706174652054494d45000000000000000000000000000000000000000060648201526084016102c4565b84156111d2576040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081523360048201523060248201527f000000000000000000000000c22bb3200426c5856dd73c9f281922611c4a920a90869073ffffffffffffffffffffffffffffffffffffffff83169063dd62ed3e90604401602060405180830381865afa158015610fda573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ffe91906136f6565b1015611066576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f53686f756c6420616c6c6f772054494d4520746f206265207370656e7400000060448201526064016102c4565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000081523360048201523060248201526044810187905273ffffffffffffffffffffffffffffffffffffffff8216906323b872dd906064016020604051808303816000875af1925050508015611119575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526111169181019061370f565b60015b61117f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f50726f626c656d207768656e207472616e7366657272696e672054494d45000060448201526064016102c4565b508560066000828254611192919061360b565b909155505084156111ab576111a686613046565b6111d0565b336000908152600d6020526040812080548892906111ca90849061360b565b90915550505b505b82156111e6576111e133612a6b565b6111ef565b6111ef33612c13565b7f000000000000000000000000c22bb3200426c5856dd73c9f281922611c4a920a61121981612d82565b306000908152600d602052604090205483111561124357306000908152600d602052604090205492505b336000908152600d602052604090205482111561126d57336000908152600d602052604090205491505b821561127e5761127e813085612dea565b811561128f5761128f813384612dea565b5050306000908152600c602052604080822043908190553383529082205580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905550505050565b60005460ff1615611346576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4f7065726174696f6e206973206c6f636b65640000000000000000000000000060448201526064016102c4565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001178155308152600c602052604081205415801561138a57504315155b156113a257306000908152600c602052604090204390555b336000908152600c60205260409020541580156113be57504315155b806113d65750336000908152600d6020526040902054155b156113ee57336000908152600c602052604090204390555b306000908152600c602052604081205461141990670de0b6b3a76400009060019061083990436136e3565b336000908152600c60205260408120549192509061144890670de0b6b3a76400009060019061083990436136e3565b905061145333610a98565b336000908152600b60205260408120805490919061147290849061360b565b90915550503360009081526009602052604090205460ff1615611517576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f4164647265737320697320616c726561647920656e61626c656420666f72205460448201527f494d4520616e74696369706174696f6e0000000000000000000000000000000060648201526084016102c4565b600061158b600a60017f000000000000000000000000c22bb3200426c5856dd73c9f281922611c4a920a73ffffffffffffffffffffffffffffffffffffffff1663ddca3f436040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a74573d6000803e3d6000fd5b90508034101561161f57604080517f08c379a00000000000000000000000000000000000000000000000000000000081526020600482015260248101919091527f506c656173652070726f766964652074686520656e6f7567682066656520616d60448201527f6f756e7420746f20656e61626c652054494d4520616e74696369706174696f6e60648201526084016102c4565b600061162c60058361375b565b9050611637816130b4565b3460076000828254611649919061360b565b90915550611659905081346136e3565b6001600082825461166a919061360b565b909155505033600090815260096020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055505082156108bb576108b633612a6b565b60005460ff1615611725576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4f7065726174696f6e206973206c6f636b65640000000000000000000000000060448201526064016102c4565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001178155308152600c602052604081205415801561176957504315155b1561178157306000908152600c602052604090204390555b336000908152600c602052604090205415801561179d57504315155b806117b55750336000908152600d6020526040902054155b156117cd57336000908152600c602052604090204390555b306000908152600c60205260408120546117f890670de0b6b3a76400009060019061083990436136e3565b336000908152600c60205260408120549192509061182790670de0b6b3a76400009060019061083990436136e3565b905061183233610a98565b336000908152600b60205260408120805490919061185190849061360b565b9091555050346118bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f506c65617365206465706f73697420736f6d6520616d6f756e7400000000000060448201526064016102c4565b60008511611927576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f506c65617365206465706f73697420736f6d652054494d4520616d6f756e740060448201526064016102c4565b83156119cc573360009081526009602052604090205460ff166119cc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f4465706f736974616e74206973206e6f7420656e61626c656420746f20616e7460448201527f696369706174652054494d45000000000000000000000000000000000000000060648201526084016102c4565b6040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081523360048201523060248201527f000000000000000000000000c22bb3200426c5856dd73c9f281922611c4a920a90869073ffffffffffffffffffffffffffffffffffffffff83169063dd62ed3e90604401602060405180830381865afa158015611a60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a8491906136f6565b1015611aec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f53686f756c6420616c6c6f772054494d4520746f206265207370656e7400000060448201526064016102c4565b6000611af960323461375b565b90506000611b0782346136e3565b336000908152600a6020526040812080549293508392909190611b2b90849061360b565b925050819055508060026000828254611b44919061360b565b925050819055503460056000828254611b5d919061360b565b90915550506040517f23b872dd0000000000000000000000000000000000000000000000000000000081523360048201523060248201526044810189905273ffffffffffffffffffffffffffffffffffffffff8416906323b872dd906064016020604051808303816000875af1925050508015611c15575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252611c129181019061370f565b60015b611c7b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f50726f626c656d207768656e207472616e7366657272696e672054494d45000060448201526064016102c4565b508760066000828254611c8e919061360b565b90915550508615611ca757611ca288613046565b611ccc565b336000908152600d6020526040812080548a9290611cc690849061360b565b90915550505b611cd5826130b4565b50505082156111e6576111e133612a6b565b6000600154600003611cf95750600090565b600254600003611d1d575074446c3b15f9926687d2c40534fdb56400000000000090565b6002546001546109fb91670de0b6b3a7640000906127b6565b60005460ff1615611da3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4f7065726174696f6e206973206c6f636b65640000000000000000000000000060448201526064016102c4565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001178155308152600c6020526040812054158015611de757504315155b15611dff57306000908152600c602052604090204390555b336000908152600c6020526040902054158015611e1b57504315155b80611e335750336000908152600d6020526040902054155b15611e4b57336000908152600c602052604090204390555b306000908152600c6020526040812054611e7690670de0b6b3a76400009060019061083990436136e3565b336000908152600c602052604081205491925090611ea590670de0b6b3a76400009060019061083990436136e3565b9050611eb033610a98565b336000908152600b602052604081208054909190611ecf90849061360b565b9091555050336000908152600b60205260409020546108a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f4465706f736974616e7420646f6573206e6f74206861766520616e792065617260448201527f6e696e677320746f20776974686472617700000000000000000000000000000060648201526084016102c4565b60005460ff1615611fdd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4f7065726174696f6e206973206c6f636b65640000000000000000000000000060448201526064016102c4565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001178155308152600c602052604081205415801561202157504315155b1561203957306000908152600c602052604090204390555b336000908152600c602052604090205415801561205557504315155b8061206d5750336000908152600d6020526040902054155b1561208557336000908152600c602052604090204390555b306000908152600c60205260408120546120b090670de0b6b3a76400009060019061083990436136e3565b336000908152600c6020526040812054919250906120df90670de0b6b3a76400009060019061083990436136e3565b90506120ea33610a98565b336000908152600b60205260408120805490919061210990849061360b565b9091555050336000908152600a60205260409020546121aa576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f4465706f736974616e7420646f6573206e6f74206861766520616e7920616d6f60448201527f756e7420746f20616e746963697061746500000000000000000000000000000060648201526084016102c4565b60008411612214576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f506c65617365206465706f73697420736f6d652054494d4520616d6f756e740060448201526064016102c4565b6040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081523360048201523060248201527f000000000000000000000000c22bb3200426c5856dd73c9f281922611c4a920a90859073ffffffffffffffffffffffffffffffffffffffff83169063dd62ed3e90604401602060405180830381865afa1580156122a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122cc91906136f6565b1015612334576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f53686f756c6420616c6c6f772054494d4520746f206265207370656e7400000060448201526064016102c4565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000081523360048201523060248201526044810186905273ffffffffffffffffffffffffffffffffffffffff8216906323b872dd906064016020604051808303816000875af19250505080156123e7575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526123e49181019061370f565b60015b61244d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f50726f626c656d207768656e207472616e7366657272696e672054494d45000060448201526064016102c4565b508460066000828254612460919061360b565b9091555061246f905085613046565b5082156124845761247f33612a6b565b61248d565b61248d33612c13565b7f000000000000000000000000c22bb3200426c5856dd73c9f281922611c4a920a6124b781612d82565b306000908152600d60205260409020548311156124e157306000908152600d602052604090205492505b336000908152600d602052604090205482111561250b57336000908152600d602052604090205491505b821561251c5761251c813085612dea565b811561252d5761252d813384612dea565b5050306000908152600c602052604080822043908190553383529082205580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055505050565b60006109fb670de0b6b3a76400007f0000000000000000000000000000000000000000002b036da601a044b4000000610839611ce7565b60005460ff161561261a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4f7065726174696f6e206973206c6f636b65640000000000000000000000000060448201526064016102c4565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905561266e7f000000000000000000000000c22bb3200426c5856dd73c9f281922611c4a920a612d82565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600a602052604081205460025461270d91906126f3907f0000000000000000000000000000000000000000002b036da601a044b40000009060016127b6565b6126fe90600161360b565b600180546108399187906127b6565b90505b92915050565b60005460ff1615612783576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4f7065726174696f6e206973206c6f636b65640000000000000000000000000060448201526064016102c4565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905561266e612882565b600080807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8587098587029250828110838203039150508060000361280e578382816128045761280461372c565b0492505050610b7f565b80841161281a57600080fd5b600084868809600260036001881981018916988990049182028318808302840302808302840302808302840302808302840302808302840302918202909203026000889003889004909101858311909403939093029303949094049190911702949350505050565b336000908152600a602052604090205461291e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f4465706f736974616e7420646f6573206e6f74206861766520616e7920616d6f60448201527f756e7420746f207769746864726177000000000000000000000000000000000060648201526084016102c4565b336000908152600a602052604090205460025410156129bf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f4e6f7420656e6f75676820696e20636f6e747261637420746f2077697468647260448201527f617700000000000000000000000000000000000000000000000000000000000060648201526084016102c4565b336000908152600d6020526040808220543083529082208054919290916129e790849061360b565b9091555050336000908152600d60209081526040808320839055600a9091528120546002805491929091612a1c9084906136e3565b9091555050336000818152600a602052604080822054905181156108fc0292818181858888f19350505050158015612a58573d6000803e3d6000fd5b50336000908152600a6020526040812055565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600b602052604090205415612c105773ffffffffffffffffffffffffffffffffffffffff81166000908152600b60205260409020546001541015612b27576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4e6f7420656e6f75676820616d6f756e7420746f207472616e7366657200000060448201526064016102c4565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600b60205260408120546001805491929091612b609084906136e3565b909155505073ffffffffffffffffffffffffffffffffffffffff81166000908152600b6020908152604080832054600a9092528220805491929091612ba690849061360b565b909155505073ffffffffffffffffffffffffffffffffffffffff81166000908152600b60205260408120546002805491929091612be490849061360b565b909155505073ffffffffffffffffffffffffffffffffffffffff81166000908152600b60205260408120555b50565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600b602052604090205415612c105773ffffffffffffffffffffffffffffffffffffffff81166000908152600b60205260409020546001541015612ccf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f4e6f7420656e6f75676820616d6f756e7420746f207472616e7366657200000060448201526064016102c4565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600b60205260408120546001805491929091612d089084906136e3565b909155505073ffffffffffffffffffffffffffffffffffffffff81166000818152600b602052604080822054905181156108fc0292818181858888f19350505050158015612d5a573d6000803e3d6000fd5b5073ffffffffffffffffffffffffffffffffffffffff166000908152600b6020526040812055565b6000612d8d826131dd565b90508060076000828254612da1919061360b565b90915550612dbb905082612db6600a8461375b565b613305565b612dc6600a8261375b565b612dd090826136e3565b60016000828254612de1919061360b565b90915550505050565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8416906370a0823190602401602060405180830381865afa158015612e54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e7891906136f6565b811115612f10576040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff8416906370a0823190602401602060405180830381865afa158015612ee9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f0d91906136f6565b90505b6040517f42966c680000000000000000000000000000000000000000000000000000000081526004810182905273ffffffffffffffffffffffffffffffffffffffff8416906342966c6890602401600060405180830381600087803b158015612f7857600080fd5b505af1925050508015612f89575060015b612fef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f556e61626c6520746f206275726e2054494d450000000000000000000000000060448201526064016102c4565b8060046000828254613001919061360b565b909155505073ffffffffffffffffffffffffffffffffffffffff82166000908152600d60205260408120805483929061303b9084906136e3565b90915550505b505050565b6130503382612698565b336000908152600b60205260408120805490919061306f90849061360b565b925050819055508060036000828254613088919061360b565b9091555050306000908152600d6020526040812080548392906130ac90849061360b565b909155505050565b8015612c105760006130c760048361375b565b90506130f37f000000000000000000000000c22bb3200426c5856dd73c9f281922611c4a920a82613305565b60405173731591207791a93fb0ec481186fb086e16a7d6d09082156108fc029083906000818181858888f19350505050158015613134573d6000803e3d6000fd5b508060016000828254613147919061360b565b925050819055508060076000828254613160919061360b565b909155504190506131ac5760405173731591207791a93fb0ec481186fb086e16a7d6d09082156108fc029083906000818181858888f19350505050158015613041573d6000803e3d6000fd5b604051419082156108fc029083906000818181858888f19350505050158015613041573d6000803e3d6000fd5b5050565b6040517f901362bd0000000000000000000000000000000000000000000000000000000081523060048201526000904790829073ffffffffffffffffffffffffffffffffffffffff85169063901362bd90602401602060405180830381865afa15801561324e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061327291906136f6565b1115610c21578273ffffffffffffffffffffffffffffffffffffffff1663243496716040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156132c057600080fd5b505af19250505080156132d1575060015b6132db5750919050565b6132e581476136e3565b91506132fa6132f560028461375b565b6130b4565b610b7f60028361375b565b80156131d95780471015613375576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f4e6f7420656e6f75676820616d6f756e7420746f20736176652054494d45000060448201526064016102c4565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8416906370a0823190602401602060405180830381865afa1580156133e2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061340691906136f6565b90508273ffffffffffffffffffffffffffffffffffffffff166310e7b9f2836040518263ffffffff1660e01b815260040160206040518083038185885af193505050508015613490575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820190925261348d9181019061370f565b60015b6134f6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4e6f742061626c6520746f20736176652054494d45000000000000000000000060448201526064016102c4565b506040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152600090829073ffffffffffffffffffffffffffffffffffffffff8616906370a0823190602401602060405180830381865afa158015613566573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061358a91906136f6565b61359491906136e3565b306000908152600d60205260408120805492935083929091906135b890849061360b565b9250508190555080600860008282546135d1919061360b565b909155505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b80820180821115612710576127106135dc565b803573ffffffffffffffffffffffffffffffffffffffff8116811461364257600080fd5b919050565b60006020828403121561365957600080fd5b61270d8261361e565b8015158114612c1057600080fd5b6000806040838503121561368357600080fd5b82359150602083013561369581613662565b809150509250929050565b6000602082840312156136b257600080fd5b5035919050565b600080604083850312156136cc57600080fd5b6136d58361361e565b946020939093013593505050565b81810381811115612710576127106135dc565b60006020828403121561370857600080fd5b5051919050565b60006020828403121561372157600080fd5b8151610b7f81613662565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082613791577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b50049056fea2646970667358221220bd2adf574273132e52857b1853318250f751de8644cedab7cd3832cbd9fce89664736f6c63430008130033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ 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.