More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 9,866 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
Value | ||||
---|---|---|---|---|---|---|---|---|---|
Make Scramble | 19884523 | 46 hrs ago | IN | 0 ETH | 0.00143885 | ||||
Upgrade Scramble... | 19870087 | 3 days ago | IN | 0 ETH | 0.00031653 | ||||
Upgrade Scramble... | 19870084 | 3 days ago | IN | 0 ETH | 0.00030228 | ||||
Upgrade Scramble... | 19870083 | 3 days ago | IN | 0 ETH | 0.00030634 | ||||
Upgrade Scramble... | 19870082 | 3 days ago | IN | 0 ETH | 0.00031598 | ||||
Upgrade Scramble... | 19870080 | 3 days ago | IN | 0 ETH | 0.0003285 | ||||
Upgrade Scramble... | 19870079 | 3 days ago | IN | 0 ETH | 0.00030174 | ||||
Upgrade Scramble... | 19870078 | 3 days ago | IN | 0 ETH | 0.00028622 | ||||
Upgrade Scramble... | 19870076 | 3 days ago | IN | 0 ETH | 0.00025858 | ||||
Make Scramble | 19870068 | 3 days ago | IN | 0 ETH | 0.00181611 | ||||
Make Scramble | 19869400 | 4 days ago | IN | 0 ETH | 0.00185069 | ||||
Upgrade Scramble... | 19776038 | 17 days ago | IN | 0 ETH | 0.0002796 | ||||
Upgrade Scramble... | 19776038 | 17 days ago | IN | 0 ETH | 0.00034545 | ||||
Upgrade Scramble... | 19776037 | 17 days ago | IN | 0 ETH | 0.00035322 | ||||
Upgrade Scramble... | 19776037 | 17 days ago | IN | 0 ETH | 0.00035322 | ||||
Upgrade Scramble... | 19776034 | 17 days ago | IN | 0 ETH | 0.00033198 | ||||
Upgrade Scramble... | 19776033 | 17 days ago | IN | 0 ETH | 0.00031648 | ||||
Upgrade Scramble... | 19776033 | 17 days ago | IN | 0 ETH | 0.00031648 | ||||
Upgrade Scramble... | 19776033 | 17 days ago | IN | 0 ETH | 0.00031648 | ||||
Upgrade Scramble... | 19776032 | 17 days ago | IN | 0 ETH | 0.00028143 | ||||
Make Scramble | 19776030 | 17 days ago | IN | 0 ETH | 0.00228069 | ||||
Upgrade Scramble... | 19745031 | 21 days ago | IN | 0 ETH | 0.00014376 | ||||
Upgrade Scramble... | 19745030 | 21 days ago | IN | 0 ETH | 0.00018767 | ||||
Upgrade Scramble... | 19745030 | 21 days ago | IN | 0 ETH | 0.00018767 | ||||
Upgrade Scramble... | 19742762 | 21 days ago | IN | 0 ETH | 0.00016995 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
ScrambleChef
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "../interfaces/IUniswapV2Router02.sol"; import "../interfaces/IScramble.sol"; import "../interfaces/IFullProtec.sol"; import "../interfaces/IWhite.sol"; import "interfaces/IUniswapV2Pair.sol"; /* * ABDK Math 64.64 Smart Contract Library. Copyright © 2019 by ABDK Consulting. * Author: Mikhail Vladimirov <[email protected]> */ pragma solidity 0.8.19; /** * Smart contract library of mathematical functions operating with signed * 64.64-bit fixed point numbers. Signed 64.64-bit fixed point number is * basically a simple fraction whose numerator is signed 128-bit integer and * denominator is 2^64. As long as denominator is always the same, there is no * need to store it, thus in Solidity signed 64.64-bit fixed point numbers are * represented by int128 type holding only the numerator. */ library ABDKMath64x64 { /* * Minimum value signed 64.64-bit fixed point number may have. */ int128 private constant MIN_64x64 = -0x80000000000000000000000000000000; /* * Maximum value signed 64.64-bit fixed point number may have. */ int128 private constant MAX_64x64 = 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; /** * Convert signed 256-bit integer number into signed 64.64-bit fixed point * number. Revert on overflow. * * @param x signed 256-bit integer number * @return signed 64.64-bit fixed point number */ function fromInt(int256 x) internal pure returns (int128) { unchecked { require(x >= -0x8000000000000000 && x <= 0x7FFFFFFFFFFFFFFF); return int128(x << 64); } } /** * Convert signed 64.64 fixed point number into signed 64-bit integer number * rounding down. * * @param x signed 64.64-bit fixed point number * @return signed 64-bit integer number */ function toInt(int128 x) internal pure returns (int64) { unchecked { return int64(x >> 64); } } /** * Convert unsigned 256-bit integer number into signed 64.64-bit fixed point * number. Revert on overflow. * * @param x unsigned 256-bit integer number * @return signed 64.64-bit fixed point number */ function fromUInt(uint256 x) internal pure returns (int128) { unchecked { require(x <= 0x7FFFFFFFFFFFFFFF); return int128(int256(x << 64)); } } /** * Convert signed 64.64 fixed point number into unsigned 64-bit integer * number rounding down. Revert on underflow. * * @param x signed 64.64-bit fixed point number * @return unsigned 64-bit integer number */ function toUInt(int128 x) internal pure returns (uint64) { unchecked { require(x >= 0); return uint64(uint128(x >> 64)); } } /** * Convert signed 128.128 fixed point number into signed 64.64-bit fixed point * number rounding down. Revert on overflow. * * @param x signed 128.128-bin fixed point number * @return signed 64.64-bit fixed point number */ function from128x128(int256 x) internal pure returns (int128) { unchecked { int256 result = x >> 64; require(result >= MIN_64x64 && result <= MAX_64x64); return int128(result); } } /** * Convert signed 64.64 fixed point number into signed 128.128 fixed point * number. * * @param x signed 64.64-bit fixed point number * @return signed 128.128 fixed point number */ function to128x128(int128 x) internal pure returns (int256) { unchecked { return int256(x) << 64; } } /** * Calculate x + y. Revert on overflow. * The * @param x signed 64.64-bit fixed point number * @param y signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function add(int128 x, int128 y) internal pure returns (int128) { unchecked { int256 result = int256(x) + y; require(result >= MIN_64x64 && result <= MAX_64x64); return int128(result); } } /** * Calculate x - y. Revert on overflow. * * @param x signed 64.64-bit fixed point number * @param y signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function sub(int128 x, int128 y) internal pure returns (int128) { unchecked { int256 result = int256(x) - y; require(result >= MIN_64x64 && result <= MAX_64x64); return int128(result); } } /** * Calculate x * y rounding down. Revert on overflow. * * @param x signed 64.64-bit fixed point number * @param y signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function mul(int128 x, int128 y) internal pure returns (int128) { unchecked { int256 result = (int256(x) * y) >> 64; require(result >= MIN_64x64 && result <= MAX_64x64); return int128(result); } } /** * Calculate x * y rounding towards zero, where x is signed 64.64 fixed point * number and y is signed 256-bit integer number. Revert on overflow. * * @param x signed 64.64 fixed point number * @param y signed 256-bit integer number * @return signed 256-bit integer number */ function muli(int128 x, int256 y) internal pure returns (int256) { unchecked { if (x == MIN_64x64) { require( y >= -0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF && y <= 0x1000000000000000000000000000000000000000000000000 ); return -y << 63; } else { bool negativeResult = false; if (x < 0) { x = -x; negativeResult = true; } if (y < 0) { y = -y; // We rely on overflow behavior here negativeResult = !negativeResult; } uint256 absoluteResult = mulu(x, uint256(y)); if (negativeResult) { require(absoluteResult <= 0x8000000000000000000000000000000000000000000000000000000000000000); return -int256(absoluteResult); // We rely on overflow behavior here } else { require(absoluteResult <= 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF); return int256(absoluteResult); } } } } /** * Calculate x * y rounding down, where x is signed 64.64 fixed point number * and y is unsigned 256-bit integer number. Revert on overflow. * beginning * @param x signed 64.64 fixed point number * @param y unsigned 256-bit integer number * @return unsigned 256-bit integer number */ function mulu(int128 x, uint256 y) internal pure returns (uint256) { unchecked { if (y == 0) return 0; require(x >= 0); uint256 lo = (uint256(int256(x)) * (y & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)) >> 64; uint256 hi = uint256(int256(x)) * (y >> 128); require(hi <= 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF); hi <<= 64; require(hi <= 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF - lo); return hi + lo; } } /** * Calculate x / y rounding towards zero. Revert on overflow or when y is * zero. * * @param x signed 64.64-bit fixed point number * @param y signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function div(int128 x, int128 y) internal pure returns (int128) { unchecked { require(y != 0); int256 result = (int256(x) << 64) / y; require(result >= MIN_64x64 && result <= MAX_64x64); return int128(result); } } /** * Calculate x / y rounding towards zero, where x and y are signed 256-bit * integer numbers. Revert on overflow or when y is zero. * * @param x signed 256-bit integer number * @param y signed 256-bit integer number * @return signed 64.64-bit fixed point number */ function divi(int256 x, int256 y) internal pure returns (int128) { unchecked { require(y != 0); bool negativeResult = false; if (x < 0) { x = -x; // We rely on overflow behavior here negativeResult = true; } if (y < 0) { y = -y; // We rely on overflow behavior here negativeResult = !negativeResult; } uint128 absoluteResult = divuu(uint256(x), uint256(y)); if (negativeResult) { require(absoluteResult <= 0x80000000000000000000000000000000); return -int128(absoluteResult); // We rely on overflow behavior here } else { require(absoluteResult <= 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF); return int128(absoluteResult); // We rely on overflow behavior here } } } /** * Calculate x / y rounding towards zero, where x and y are unsigned 256-bit * integer numbers. Revert on overflow or when y is zero. * * @param x unsigned 256-bit integer number * @param y unsigned 256-bit integer number * @return signed 64.64-bit fixed point number */ function divu(uint256 x, uint256 y) internal pure returns (int128) { unchecked { require(y != 0); uint128 result = divuu(x, y); require(result <= uint128(MAX_64x64)); return int128(result); } } /** * Calculate -x. Revert on overflow. * * @param x signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function neg(int128 x) internal pure returns (int128) { unchecked { require(x != MIN_64x64); return -x; } } /** * Calculate |x|. Revert on overflow. * * @param x signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function abs(int128 x) internal pure returns (int128) { unchecked { require(x != MIN_64x64); return x < 0 ? -x : x; } } /** * Calculate 1 / x rounding towards zero. Revert on overflow or when x is * zero. * * @param x signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function inv(int128 x) internal pure returns (int128) { unchecked { require(x != 0); int256 result = int256(0x100000000000000000000000000000000) / x; require(result >= MIN_64x64 && result <= MAX_64x64); return int128(result); } } /** * Calculate arithmetics average of x and y, i.e. (x + y) / 2 rounding down. * * @param x signed 64.64-bit fixed point number * @param y signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function avg(int128 x, int128 y) internal pure returns (int128) { unchecked { return int128((int256(x) + int256(y)) >> 1); } } /** * Calculate geometric average of x and y, i.e. sqrt (x * y) rounding down. * Revert on overflow or in case x * y is negative. * * @param x signed 64.64-bit fixed point number * @param y signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function gavg(int128 x, int128 y) internal pure returns (int128) { unchecked { int256 m = int256(x) * int256(y); require(m >= 0); require(m < 0x4000000000000000000000000000000000000000000000000000000000000000); return int128(sqrtu(uint256(m))); } } /** * Calculate x^y assuming 0^0 is 1, where x is signed 64.64 fixed point number * and y is unsigned 256-bit integer number. Revert on overflow. * * @param x signed 64.64-bit fixed point number * @param y uint256 value * @return signed 64.64-bit fixed point number */ function pow(int128 x, uint256 y) internal pure returns (int128) { unchecked { bool negative = x < 0 && y & 1 == 1; uint256 absX = uint128(x < 0 ? -x : x); uint256 absResult; absResult = 0x100000000000000000000000000000000; if (absX <= 0x10000000000000000) { absX <<= 63; while (y != 0) { if (y & 0x1 != 0) { absResult = (absResult * absX) >> 127; } absX = (absX * absX) >> 127; if (y & 0x2 != 0) { absResult = (absResult * absX) >> 127; } absX = (absX * absX) >> 127; if (y & 0x4 != 0) { absResult = (absResult * absX) >> 127; } absX = (absX * absX) >> 127; if (y & 0x8 != 0) { absResult = (absResult * absX) >> 127; } absX = (absX * absX) >> 127; y >>= 4; } absResult >>= 64; } else { uint256 absXShift = 63; if (absX < 0x1000000000000000000000000) { absX <<= 32; absXShift -= 32; } if (absX < 0x10000000000000000000000000000) { absX <<= 16; absXShift -= 16; } if (absX < 0x1000000000000000000000000000000) { absX <<= 8; absXShift -= 8; } if (absX < 0x10000000000000000000000000000000) { absX <<= 4; absXShift -= 4; } if (absX < 0x40000000000000000000000000000000) { absX <<= 2; absXShift -= 2; } if (absX < 0x80000000000000000000000000000000) { absX <<= 1; absXShift -= 1; } uint256 resultShift = 0; while (y != 0) { require(absXShift < 64); if (y & 0x1 != 0) { absResult = (absResult * absX) >> 127; resultShift += absXShift; if (absResult > 0x100000000000000000000000000000000) { absResult >>= 1; resultShift += 1; } } absX = (absX * absX) >> 127; absXShift <<= 1; if (absX >= 0x100000000000000000000000000000000) { absX >>= 1; absXShift += 1; } y >>= 1; } require(resultShift < 64); absResult >>= 64 - resultShift; } int256 result = negative ? -int256(absResult) : int256(absResult); require(result >= MIN_64x64 && result <= MAX_64x64); return int128(result); } } /** * Calculate sqrt (x) rounding down. Revert if x < 0. * of * @param x signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function sqrt(int128 x) internal pure returns (int128) { unchecked { require(x >= 0); return int128(sqrtu(uint256(int256(x)) << 64)); } } /** * Calculate binary logarithm of x. Revert if x <= 0. * * @param x signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function log_2(int128 x) internal pure returns (int128) { unchecked { require(x > 0); int256 msb = 0; int256 xc = x; if (xc >= 0x10000000000000000) { xc >>= 64; msb += 64; } if (xc >= 0x100000000) { xc >>= 32; msb += 32; } if (xc >= 0x10000) { xc >>= 16; msb += 16; } if (xc >= 0x100) { xc >>= 8; msb += 8; } if (xc >= 0x10) { xc >>= 4; msb += 4; } if (xc >= 0x4) { xc >>= 2; msb += 2; } if (xc >= 0x2) msb += 1; // No need to shift xc anymore int256 result = (msb - 64) << 64; uint256 ux = uint256(int256(x)) << uint256(127 - msb); for (int256 bit = 0x8000000000000000; bit > 0; bit >>= 1) { ux *= ux; uint256 b = ux >> 255; ux >>= 127 + b; result += bit * int256(b); } return int128(result); } } /** * Calculate natural logarithm of x. Revert if x <= 0. * * @param x signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function ln(int128 x) internal pure returns (int128) { unchecked { require(x > 0); return int128(int256((uint256(int256(log_2(x))) * 0xB17217F7D1CF79ABC9E3B39803F2F6AF) >> 128)); } } /** * Calculate binary exponent of x. Revert on overflow. * * @param x signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function exp_2(int128 x) internal pure returns (int128) { unchecked { require(x < 0x400000000000000000); // Overflow if (x < -0x400000000000000000) return 0; // Underflow uint256 result = 0x80000000000000000000000000000000; if (x & 0x8000000000000000 > 0) { result = (result * 0x16A09E667F3BCC908B2FB1366EA957D3E) >> 128; } if (x & 0x4000000000000000 > 0) { result = (result * 0x1306FE0A31B7152DE8D5A46305C85EDEC) >> 128; } if (x & 0x2000000000000000 > 0) { result = (result * 0x1172B83C7D517ADCDF7C8C50EB14A791F) >> 128; } if (x & 0x1000000000000000 > 0) { result = (result * 0x10B5586CF9890F6298B92B71842A98363) >> 128; } if (x & 0x800000000000000 > 0) { result = (result * 0x1059B0D31585743AE7C548EB68CA417FD) >> 128; } if (x & 0x400000000000000 > 0) { result = (result * 0x102C9A3E778060EE6F7CACA4F7A29BDE8) >> 128; } if (x & 0x200000000000000 > 0) { result = (result * 0x10163DA9FB33356D84A66AE336DCDFA3F) >> 128; } if (x & 0x100000000000000 > 0) { result = (result * 0x100B1AFA5ABCBED6129AB13EC11DC9543) >> 128; } if (x & 0x80000000000000 > 0) { result = (result * 0x10058C86DA1C09EA1FF19D294CF2F679B) >> 128; } if (x & 0x40000000000000 > 0) { result = (result * 0x1002C605E2E8CEC506D21BFC89A23A00F) >> 128; } if (x & 0x20000000000000 > 0) { result = (result * 0x100162F3904051FA128BCA9C55C31E5DF) >> 128; } if (x & 0x10000000000000 > 0) { result = (result * 0x1000B175EFFDC76BA38E31671CA939725) >> 128; } if (x & 0x8000000000000 > 0) { result = (result * 0x100058BA01FB9F96D6CACD4B180917C3D) >> 128; } if (x & 0x4000000000000 > 0) { result = (result * 0x10002C5CC37DA9491D0985C348C68E7B3) >> 128; } if (x & 0x2000000000000 > 0) { result = (result * 0x1000162E525EE054754457D5995292026) >> 128; } if (x & 0x1000000000000 > 0) { result = (result * 0x10000B17255775C040618BF4A4ADE83FC) >> 128; } if (x & 0x800000000000 > 0) { result = (result * 0x1000058B91B5BC9AE2EED81E9B7D4CFAB) >> 128; } if (x & 0x400000000000 > 0) { result = (result * 0x100002C5C89D5EC6CA4D7C8ACC017B7C9) >> 128; } if (x & 0x200000000000 > 0) { result = (result * 0x10000162E43F4F831060E02D839A9D16D) >> 128; } if (x & 0x100000000000 > 0) { result = (result * 0x100000B1721BCFC99D9F890EA06911763) >> 128; } if (x & 0x80000000000 > 0) { result = (result * 0x10000058B90CF1E6D97F9CA14DBCC1628) >> 128; } if (x & 0x40000000000 > 0) { result = (result * 0x1000002C5C863B73F016468F6BAC5CA2B) >> 128; } if (x & 0x20000000000 > 0) { result = (result * 0x100000162E430E5A18F6119E3C02282A5) >> 128; } if (x & 0x10000000000 > 0) { result = (result * 0x1000000B1721835514B86E6D96EFD1BFE) >> 128; } if (x & 0x8000000000 > 0) { result = (result * 0x100000058B90C0B48C6BE5DF846C5B2EF) >> 128; } if (x & 0x4000000000 > 0) { result = (result * 0x10000002C5C8601CC6B9E94213C72737A) >> 128; } if (x & 0x2000000000 > 0) { result = (result * 0x1000000162E42FFF037DF38AA2B219F06) >> 128; } if (x & 0x1000000000 > 0) { result = (result * 0x10000000B17217FBA9C739AA5819F44F9) >> 128; } if (x & 0x800000000 > 0) { result = (result * 0x1000000058B90BFCDEE5ACD3C1CEDC823) >> 128; } if (x & 0x400000000 > 0) { result = (result * 0x100000002C5C85FE31F35A6A30DA1BE50) >> 128; } if (x & 0x200000000 > 0) { result = (result * 0x10000000162E42FF0999CE3541B9FFFCF) >> 128; } if (x & 0x100000000 > 0) { result = (result * 0x100000000B17217F80F4EF5AADDA45554) >> 128; } if (x & 0x80000000 > 0) { result = (result * 0x10000000058B90BFBF8479BD5A81B51AD) >> 128; } if (x & 0x40000000 > 0) { result = (result * 0x1000000002C5C85FDF84BD62AE30A74CC) >> 128; } if (x & 0x20000000 > 0) { result = (result * 0x100000000162E42FEFB2FED257559BDAA) >> 128; } if (x & 0x10000000 > 0) { result = (result * 0x1000000000B17217F7D5A7716BBA4A9AE) >> 128; } if (x & 0x8000000 > 0) { result = (result * 0x100000000058B90BFBE9DDBAC5E109CCE) >> 128; } if (x & 0x4000000 > 0) { result = (result * 0x10000000002C5C85FDF4B15DE6F17EB0D) >> 128; } if (x & 0x2000000 > 0) { result = (result * 0x1000000000162E42FEFA494F1478FDE05) >> 128; } if (x & 0x1000000 > 0) { result = (result * 0x10000000000B17217F7D20CF927C8E94C) >> 128; } if (x & 0x800000 > 0) { result = (result * 0x1000000000058B90BFBE8F71CB4E4B33D) >> 128; } if (x & 0x400000 > 0) { result = (result * 0x100000000002C5C85FDF477B662B26945) >> 128; } if (x & 0x200000 > 0) { result = (result * 0x10000000000162E42FEFA3AE53369388C) >> 128; } if (x & 0x100000 > 0) { result = (result * 0x100000000000B17217F7D1D351A389D40) >> 128; } if (x & 0x80000 > 0) { result = (result * 0x10000000000058B90BFBE8E8B2D3D4EDE) >> 128; } if (x & 0x40000 > 0) { result = (result * 0x1000000000002C5C85FDF4741BEA6E77E) >> 128; } if (x & 0x20000 > 0) { result = (result * 0x100000000000162E42FEFA39FE95583C2) >> 128; } if (x & 0x10000 > 0) { result = (result * 0x1000000000000B17217F7D1CFB72B45E1) >> 128; } if (x & 0x8000 > 0) { result = (result * 0x100000000000058B90BFBE8E7CC35C3F0) >> 128; } if (x & 0x4000 > 0) { result = (result * 0x10000000000002C5C85FDF473E242EA38) >> 128; } if (x & 0x2000 > 0) { result = (result * 0x1000000000000162E42FEFA39F02B772C) >> 128; } if (x & 0x1000 > 0) { result = (result * 0x10000000000000B17217F7D1CF7D83C1A) >> 128; } if (x & 0x800 > 0) { result = (result * 0x1000000000000058B90BFBE8E7BDCBE2E) >> 128; } if (x & 0x400 > 0) { result = (result * 0x100000000000002C5C85FDF473DEA871F) >> 128; } if (x & 0x200 > 0) { result = (result * 0x10000000000000162E42FEFA39EF44D91) >> 128; } if (x & 0x100 > 0) { result = (result * 0x100000000000000B17217F7D1CF79E949) >> 128; } if (x & 0x80 > 0) { result = (result * 0x10000000000000058B90BFBE8E7BCE544) >> 128; } if (x & 0x40 > 0) { result = (result * 0x1000000000000002C5C85FDF473DE6ECA) >> 128; } if (x & 0x20 > 0) { result = (result * 0x100000000000000162E42FEFA39EF366F) >> 128; } if (x & 0x10 > 0) { result = (result * 0x1000000000000000B17217F7D1CF79AFA) >> 128; } if (x & 0x8 > 0) { result = (result * 0x100000000000000058B90BFBE8E7BCD6D) >> 128; } if (x & 0x4 > 0) { result = (result * 0x10000000000000002C5C85FDF473DE6B2) >> 128; } if (x & 0x2 > 0) { result = (result * 0x1000000000000000162E42FEFA39EF358) >> 128; } if (x & 0x1 > 0) { result = (result * 0x10000000000000000B17217F7D1CF79AB) >> 128; } result >>= uint256(int256(63 - (x >> 64))); require(result <= uint256(int256(MAX_64x64))); return int128(int256(result)); } } /** * Calculate natural exponent of x. Revert on overflow. * his * @param x signed 64.64-bit fixed point number * @return signed 64.64-bit fixed point number */ function exp(int128 x) internal pure returns (int128) { unchecked { require(x < 0x400000000000000000); // Overflow if (x < -0x400000000000000000) return 0; // Underflow return exp_2(int128((int256(x) * 0x171547652B82FE1777D0FFDA0D23A7D12) >> 128)); } } /** * Calculate x / y rounding towards zero, where x and y are unsigned 256-bit * integer numbers. Revert on overflow or when y is zero. * * @param x unsigned 256-bit integer number * @param y unsigned 256-bit integer number * @return unsigned 64.64-bit fixed point number */ function divuu(uint256 x, uint256 y) private pure returns (uint128) { unchecked { require(y != 0); uint256 result; if (x <= 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) { result = (x << 64) / y; } else { uint256 msb = 192; uint256 xc = x >> 192; if (xc >= 0x100000000) { xc >>= 32; msb += 32; } if (xc >= 0x10000) { xc >>= 16; msb += 16; } if (xc >= 0x100) { xc >>= 8; msb += 8; } if (xc >= 0x10) { xc >>= 4; msb += 4; } if (xc >= 0x4) { xc >>= 2; msb += 2; } if (xc >= 0x2) msb += 1; // No need to shift xc anymore result = (x << (255 - msb)) / (((y - 1) >> (msb - 191)) + 1); require(result <= 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF); uint256 hi = result * (y >> 128); uint256 lo = result * (y & 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF); uint256 xh = x >> 192; uint256 xl = x << 64; if (xl < lo) xh -= 1; xl -= lo; // We rely on overflow behavior here lo = hi << 128; if (xl < lo) xh -= 1; xl -= lo; // We rely on overflow behavior here assert(xh == hi >> 128); result += xl / y; } require(result <= 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF); return uint128(result); } } /** * Calculate sqrt (x) rounding down, where x is unsigned 256-bit integer * number. * * @param x unsigned 256-bit integer number * @return unsigned 128-bit integer number */ function sqrtu(uint256 x) private pure returns (uint128) { unchecked { if (x == 0) { return 0; } else { uint256 xx = x; uint256 r = 1; if (xx >= 0x100000000000000000000000000000000) { xx >>= 128; r <<= 64; } if (xx >= 0x10000000000000000) { xx >>= 64; r <<= 32; } if (xx >= 0x100000000) { xx >>= 32; r <<= 16; } if (xx >= 0x10000) { xx >>= 16; r <<= 8; } if (xx >= 0x100) { xx >>= 8; r <<= 4; } if (xx >= 0x10) { xx >>= 4; r <<= 2; } if (xx >= 0x8) { r <<= 1; } r = (r + x / r) >> 1; r = (r + x / r) >> 1; r = (r + x / r) >> 1; r = (r + x / r) >> 1; r = (r + x / r) >> 1; r = (r + x / r) >> 1; r = (r + x / r) >> 1; // Seven iterations should be enough uint256 r1 = x / r; return uint128(r < r1 ? r : r1); } } } } // File: contracts/ScrambleChef.sol import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; pragma solidity 0.8.19; contract ScrambleChef is Ownable { using SafeERC20 for IERC20; using Address for address; struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 rewardDebt; // Reward debt. See explanation below. uint256 lockEndedTimestamp; } // // pending reward = (user.amount * pool.accRewardPerShare) - user.rewardDebt // // Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens: // 1. The pool's `accRewardPerShare` (and `lastRewardTimestamp`) gets updated. // 2. User receives the pending reward sent to his/her address. // 3. User's `amount` gets updated. // 4. User's `rewardDebt` gets updated. struct PoolInfo { IERC20 lpToken; // Address of LP token contract. uint256 allocPoint; // How many allocation points assigned to this pool. Rewards to distribute per block. uint256 lastRewardTimestamp; // Last block number that Rewards distribution occurs. uint256 accRewardPerShare; // Accumulated Rewards per share. } // SCRAMBLE IScramble public scramble; // SCRAMBLE LP address IUniswapV2Pair public scrambleLp; // WHITE pool IFullProtec public fullProtec; // WHITE token IWhite public white; // SCRAMBLE tokens reward per block. uint256 public rewardPerSecond; // We cap daily debase rate to -50% so things don't go out of control uint256 public dailyDebaseRateHardCap = 50e18; // Rebase start time uint256 public lastTimestamp; // Info of each pool. PoolInfo[] public poolInfo; // Info of each user. mapping(uint256 => mapping(address => UserInfo)) public userInfo; // user's withdrawable rewards mapping(uint256 => mapping(address => uint256)) private userRewards; // Lock duration in seconds mapping(uint256 => uint256) public lockDurations; // user's accumulated xp mapping(address => uint256) public xpAccumulated; // tracks block when user last made scramble mapping(address => uint256) public lastClaimedBlock; // Total allocation points. Must be the sum of all allocation points in all pools. uint256 public totalAllocPoint = 0; // The block number when SCRAMBLE mining starts. uint256 public startTimestamp; mapping(uint256 => uint256) public totalStakedInPool; // Events event Deposit(address indexed user, uint256 indexed pid, uint256 indexed amount); event Withdraw(address indexed user, uint256 indexed pid, uint256 indexed amount); event RewardPaid(address indexed user, uint256 indexed pid, uint256 indexed amount); event LogRewardPerSecond(uint256 amount); event LogPoolAddition(uint256 indexed pid, uint256 allocPoint, IERC20 indexed lpToken); event LogSetPool(uint256 indexed pid, uint256 allocPoint); event LogUpdatePool(uint256 indexed pid, uint256 lastRewardTimestamp, uint256 lpSupply, uint256 accRewardPerShare); event LogSetLockDuration(uint256 indexed pid, uint256 lockDuration); constructor() { scramble = IScramble(0x63b420fb3294BA1d300CE5D3ba4BBCA0F4fe5e3b); white = IWhite(0x7a38aFa395666799b3DbFe22C0d1467feC931Bb0); fullProtec = IFullProtec(0x400aFbc1bBa6E8fF4462D161f7DC24e4873D4eBB); scrambleLp = IUniswapV2Pair(0xeD7985385bF434F0815AA9C90450945aEE02d733); rewardPerSecond = 10e18; startTimestamp = block.timestamp; lastTimestamp = block.timestamp; } function poolLength() external view returns (uint256) { return poolInfo.length; } // Set the lock duration for a pool // The lock duration is the number of seconds the user's tokens will be locked // after staking. The user will not be able to unstake until the lock // duration has passed. function setLockDuration(uint256 _pid, uint256 _lockDuration) external onlyOwner { lockDurations[_pid] = _lockDuration; emit LogSetLockDuration(_pid, _lockDuration); } // Update the rewards per second // This is the amount of reward token that is distributed to each user // per second. function updateRewardPerSecond(uint256 _rewardPerSecond) external onlyOwner { massUpdatePools(); rewardPerSecond = _rewardPerSecond; emit LogRewardPerSecond(_rewardPerSecond); } // Add a new lp to the pool. Can only be called by the owner. // XXX DO NOT add the same LP token more than once. Rewards will be messed up if you do. function add(uint256 _allocPoint, IERC20 _lpToken, bool _withUpdate) external onlyOwner { if (_withUpdate) { massUpdatePools(); } uint256 lastRewardTimestamp = block.timestamp > startTimestamp ? block.timestamp : startTimestamp; totalAllocPoint = totalAllocPoint + _allocPoint; poolInfo.push( PoolInfo({ lpToken: _lpToken, allocPoint: _allocPoint, lastRewardTimestamp: lastRewardTimestamp, accRewardPerShare: 0 }) ); emit LogPoolAddition(poolInfo.length - 1, _allocPoint, _lpToken); } // Update the given pool's SCRAMBLE allocation point. Can only be called by the owner. function set(uint256 _pid, uint256 _allocPoint, bool _withUpdate) external onlyOwner { if (_withUpdate) { massUpdatePools(); } totalAllocPoint = totalAllocPoint - poolInfo[_pid].allocPoint + _allocPoint; poolInfo[_pid].allocPoint = _allocPoint; emit LogSetPool(_pid, _allocPoint); } // View function to see pending Scramble on frontend. function pendingReward(uint256 _pid, address _user) public view returns (uint256) { PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][_user]; uint256 accRewardPerShare = pool.accRewardPerShare; uint256 lpSupply = pool.lpToken.balanceOf(address(this)); if (address(pool.lpToken) == address(scramble)) { lpSupply = scramble.balanceOfUnderlying(address(this)); } if (block.timestamp > pool.lastRewardTimestamp && lpSupply != 0) { uint256 scrambleReward = ((block.timestamp - pool.lastRewardTimestamp) * rewardPerSecond * pool.allocPoint) / totalAllocPoint; accRewardPerShare += (scrambleReward * 1e12) / lpSupply; } return userRewards[_pid][_user] + (user.amount * accRewardPerShare) / 1e12 - user.rewardDebt; } // Update reward vairables for all pools. Be careful of gas spending! function massUpdatePools() internal { uint256 length = poolInfo.length; for (uint256 pid = 0; pid < length; ++pid) { updatePool(pid); } } // Update reward variables of the given pool to be up-to-date. function updatePool(uint256 _pid) internal { PoolInfo storage pool = poolInfo[_pid]; if (block.timestamp <= pool.lastRewardTimestamp) { return; } uint256 lpSupply = pool.lpToken.balanceOf(address(this)); if (lpSupply == 0) { pool.lastRewardTimestamp = block.timestamp; return; } uint256 scrambleReward = ((block.timestamp - pool.lastRewardTimestamp) * rewardPerSecond * pool.allocPoint) / totalAllocPoint; pool.accRewardPerShare += (scrambleReward * 1e12) / lpSupply; pool.lastRewardTimestamp = block.timestamp; emit LogUpdatePool(_pid, pool.lastRewardTimestamp, lpSupply, pool.accRewardPerShare); } // Deposit tokens to ScrambleChef for SCRAMBLE allocation. function deposit(uint256 _pid, uint256 _amount, address _account) external { if (_pid == 0) { require(msg.sender == address(fullProtec), "Not allowed"); } else { require( msg.sender == _account || msg.sender == address(this) || msg.sender == address(fullProtec), "You can't deposit for someone else" ); } require(_amount > 0, "Deposit amount can't be zero"); PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][_account]; user.lockEndedTimestamp = block.timestamp + lockDurations[_pid]; updatePool(_pid); queueRewards(_pid, _account); if (address(pool.lpToken) == address(white)) { pool.lpToken.safeTransferFrom(address(fullProtec), address(this), _amount); totalStakedInPool[_pid] += _amount; } else { pool.lpToken.safeTransferFrom(_account, address(this), _amount); totalStakedInPool[_pid] += _amount; } emit Deposit(_account, _pid, _amount); user.amount += _amount; user.rewardDebt = (user.amount * pool.accRewardPerShare) / 1e12; } // Withdraw tokens from ScrambleChef. function withdraw(uint256 _pid, uint256 _amount, address _account) external { if (_pid == 0) { require(msg.sender == address(fullProtec), "Not allowed"); } else { require( msg.sender == _account || msg.sender == address(this) || msg.sender == address(fullProtec), "You can't withdraw for someone else" ); } require(_amount > 0, "Withdraw amount can't be zero"); PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][_account]; require(user.lockEndedTimestamp <= block.timestamp, "Still locked"); require(user.amount >= _amount, "You can't withdraw that much"); updatePool(_pid); queueRewards(_pid, _account); user.amount -= _amount; user.rewardDebt = (user.amount * pool.accRewardPerShare) / 1e12; if (address(pool.lpToken) == address(white)) { pool.lpToken.safeTransfer(address(fullProtec), _amount); totalStakedInPool[_pid] -= _amount; // _amount = scramble.scrambleToFragment(_amount); } else { pool.lpToken.safeTransfer(address(_account), _amount); totalStakedInPool[_pid] -= _amount; } emit Withdraw(_account, _pid, _amount); } function makeScramble(address _account) external { require(msg.sender == _account || msg.sender == address(this), "You can't claim for someone else"); uint256 stakedPool0 = userInfo[0][_account].amount; uint256 stakedPool1 = userInfo[1][_account].amount; if (stakedPool0 == 0 && stakedPool1 == 0) { require(stakedPool0 > 0 && stakedPool1 > 0, "Can't make scramble without WHITE or YOLK"); } // upgrades logic if (lastClaimedBlock[_account] == 0) { lastClaimedBlock[_account] = block.number - 1000; } xpAccumulated[_account] += getPendingXp(_account); xpAccumulated[_account] += getPendingBonusXp(_account); lastClaimedBlock[_account] = block.number; uint256 bonusRewards = 0; // claim from upgrades if (getPendingBonusRewards(_account) > 0) { bonusRewards = getPendingBonusRewards(_account); } // claim both pools claim(0, _account); claim(1, _account); if (bonusRewards > 0) { scramble.mint(_account, bonusRewards); } } function claim(uint256 _pid, address _account) internal returns (uint256) { require(msg.sender == _account || msg.sender == address(this), "You can't claim for someone else"); updatePool(_pid); queueRewards(_pid, _account); uint256 pending = userRewards[_pid][_account]; if (pending > 0) { UserInfo storage user = userInfo[_pid][_account]; user.lockEndedTimestamp = block.timestamp + lockDurations[_pid]; userRewards[_pid][_account] = 0; userInfo[_pid][_account].rewardDebt = (userInfo[_pid][_account].amount * poolInfo[_pid].accRewardPerShare) / (1e12); if (lastTimestamp != block.timestamp) { uint256 secs = block.timestamp - lastTimestamp; if (block.timestamp - lastTimestamp > 1 days) { secs = 1 days; } lastTimestamp = block.timestamp; scramble.rebase(block.timestamp, getDebaseRate() * secs, false); scrambleLp.sync(); } scramble.mint(_account, pending); emit RewardPaid(_account, _pid, pending); return pending; } else { return 0; } } // Queue rewards - increase pending rewards function queueRewards(uint256 _pid, address _account) internal { UserInfo memory user = userInfo[_pid][_account]; uint256 pending = (user.amount * poolInfo[_pid].accRewardPerShare) / (1e12) - user.rewardDebt; if (pending > 0) { userRewards[_pid][_account] += pending; } } function getDebaseRate() public view returns (uint256) { if (fullProtec.getPercentSupplyStaked() >= dailyDebaseRateHardCap) { return (dailyDebaseRateHardCap * 1e16) / 1e18 / 86400; } else { return (fullProtec.getPercentSupplyStaked() * 1e16) / 1e18 / 86400; } } function setDailyDebaseRateHardCap(uint256 _dailyDebaseRateHardCap) public onlyOwner { dailyDebaseRateHardCap = _dailyDebaseRateHardCap; } function setWhiteVaultAddress(address _fullProtec) public onlyOwner { fullProtec = IFullProtec(_fullProtec); } function emergencyWithdraw(address lpToken, uint amount) public onlyOwner { IERC20(lpToken).transfer(owner(), amount); } /* Upgrades */ mapping(address => uint256) public claimMultiplierLevel; mapping(address => uint256) public xpMultiplierLevel; function upgradeScrambleMultiplier(address _account) public { require(msg.sender == _account || msg.sender == address(this), "You can't upgrade for someone else"); uint256 upgradePrice = getClaimMultiplierUpgradePrice(_account); require(xpAccumulated[_account] >= upgradePrice, "Not enough XP"); xpAccumulated[_account] -= upgradePrice; claimMultiplierLevel[_account] += 1; } function upgradeXpMultiplier(address _account) public { require(msg.sender == _account || msg.sender == address(this), "You can't upgrade for someone else"); uint256 upgradePrice = getXpMultiplierUpgradePrice(_account); require(xpAccumulated[_account] >= upgradePrice, "Not enough XP"); xpAccumulated[_account] -= upgradePrice; xpMultiplierLevel[_account] += 1; } function getClaimMultiplierUpgradePrice(address _account) public view returns (uint256) { return claimMultiplierLevel[_account] * 1000 + 1000; } function getXpMultiplierUpgradePrice(address _account) public view returns (uint256) { return xpMultiplierLevel[_account] * 1000 + 1000; } function getPendingBonusRewards(address _account) public view returns (uint256) { uint256 pending0 = pendingReward(0, _account); uint256 pending1 = pendingReward(1, _account); uint256 total = pending0 + pending1; uint256 bonus = (total * claimMultiplierLevel[_account] * 10) / 100; return bonus; } function getPendingXp(address _account) public view returns (uint256) { uint256 _lastClaimedBlock; if (lastClaimedBlock[_account] == 0) { _lastClaimedBlock = block.number - 1000; } else { _lastClaimedBlock = lastClaimedBlock[_account]; } return block.number - _lastClaimedBlock; } function getPendingBonusXp(address _account) public view returns (uint256) { return (getPendingXp(_account) * (xpMultiplierLevel[_account] * 10)) / 100; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.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 anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _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.8.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-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; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _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)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } 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"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } 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"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
pragma solidity >=0.6.2; import './IUniswapV2Router01.sol'; interface IUniswapV2Router02 is IUniswapV2Router01 { function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; }
pragma solidity 0.8.19; import "../interfaces/IUniswapV2Pair.sol"; interface IScramble { function mint(address to, uint256 amount) external; function balanceOf(address account) external view returns (uint256); function totalSupply() external view returns (uint256); function transferUnderlying(address to, uint256 value) external returns (bool); function fragmentToScramble(uint256 value) external view returns (uint256); function scrambleToFragment(uint256 scramble) external view returns (uint256); function balanceOfUnderlying(address who) external view returns (uint256); function burn(uint256 amount) external; function grantRole(bytes32 role, address account) external; function revokeRole(bytes32 role, address account) external; function INIT_SUPPLY() external view returns (uint); function MINTER_ROLE() external view returns (bytes32); function REBASER_ROLE() external view returns (bytes32); function setPair(address _router, bool _bool) external; function setFees(uint256 _fees) external; function setMarketingAddress(address _marketing) external; function approve(address spender, uint256 amount) external returns (bool); function transfer(address, uint) external returns (bool); function rebase( uint256 epoch, uint256 indexDelta, bool positive ) external returns (uint256); function setExcludedFromReflections(address, bool) external; function uniswapV2Pair() external returns (IUniswapV2Pair); function owner() external returns (address); function reflectionsReceiver() external returns (address); function tradingOpen() external returns (bool); function setMaxWallet(uint) external; function openTrading() external; function manualSwap() external; function transferFrom(address from, address to, uint256 amount) external returns (bool); }
pragma solidity >=0.6.2; // import "lib/forge-std/src/interfaces/IERC20.sol"; interface IFullProtec { function getPercentSupplyStaked() external view returns (uint256); function setChef(address) external; }
pragma solidity 0.8.19; interface IWhite { function mint(address to, uint256 amount) external; function balanceOf(address account) external view returns (uint256); function totalSupply() external view returns (uint256); function burn(uint256 amount) external; function approve(address spender, uint256 amount) external returns (bool); function transfer(address, uint) external returns (bool); function transferOwnership(address) external; }
pragma solidity >=0.5.0; interface IUniswapV2Pair { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; event Mint(address indexed sender, uint amount0, uint amount1); event Burn(address indexed sender, uint amount0, uint amount1, address indexed to); event Swap( address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint); function factory() external view returns (address); function token0() external view returns (address); function token1() external view returns (address); function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); function price0CumulativeLast() external view returns (uint); function price1CumulativeLast() external view returns (uint); function kLast() external view returns (uint); function mint(address to) external returns (uint liquidity); function burn(address to) external returns (uint amount0, uint amount1); function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; function skim(address to) external; function sync() external; function initialize(address, address) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; import "./IERC20.sol"; import "./extensions/IERC20Metadata.sol"; import "../../utils/Context.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, allowance(owner, spender) + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { address owner = _msgSender(); uint256 currentAllowance = allowance(owner, spender); require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(owner, spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `from` to `to`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer( address from, address to, uint256 amount ) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by // decrementing then incrementing. _balances[to] += amount; } emit Transfer(from, to, amount); _afterTokenTransfer(from, to, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; unchecked { // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above. _balances[account] += amount; } emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; // Overflow not possible: amount <= accountBalance <= totalSupply. _totalSupply -= amount; } emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Updates `owner` s allowance for `spender` based on spent `amount`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { require(currentAllowance >= amount, "ERC20: insufficient allowance"); unchecked { _approve(owner, spender, currentAllowance - amount); } } } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} }
// 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.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-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.8.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 * ==== * * [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://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (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); } } }
pragma solidity >=0.6.2; interface IUniswapV2Router01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
{ "remappings": [ "forge-std/=lib/forge-std/src/", "@openzeppelin/=lib/openzeppelin-contracts/", "ds-test/=lib/forge-std/lib/ds-test/src/", "openzeppelin-contracts/=lib/openzeppelin-contracts/" ], "optimizer": { "enabled": true, "runs": 200 }, "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":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"allocPoint","type":"uint256"},{"indexed":true,"internalType":"contract IERC20","name":"lpToken","type":"address"}],"name":"LogPoolAddition","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"LogRewardPerSecond","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lockDuration","type":"uint256"}],"name":"LogSetLockDuration","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"allocPoint","type":"uint256"}],"name":"LogSetPool","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lastRewardTimestamp","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lpSupply","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"accRewardPerShare","type":"uint256"}],"name":"LogUpdatePool","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":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"contract IERC20","name":"_lpToken","type":"address"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimMultiplierLevel","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dailyDebaseRateHardCap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_account","type":"address"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"lpToken","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"fullProtec","outputs":[{"internalType":"contract IFullProtec","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"getClaimMultiplierUpgradePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDebaseRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"getPendingBonusRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"getPendingBonusXp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"getPendingXp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"getXpMultiplierUpgradePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lastClaimedBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"lockDurations","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"makeScramble","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IERC20","name":"lpToken","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardTimestamp","type":"uint256"},{"internalType":"uint256","name":"accRewardPerShare","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardPerSecond","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"scramble","outputs":[{"internalType":"contract IScramble","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"scrambleLp","outputs":[{"internalType":"contract IUniswapV2Pair","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_dailyDebaseRateHardCap","type":"uint256"}],"name":"setDailyDebaseRateHardCap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_lockDuration","type":"uint256"}],"name":"setLockDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_fullProtec","type":"address"}],"name":"setWhiteVaultAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAllocPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"totalStakedInPool","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewardPerSecond","type":"uint256"}],"name":"updateRewardPerSecond","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"upgradeScrambleMultiplier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"upgradeXpMultiplier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"},{"internalType":"uint256","name":"lockEndedTimestamp","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"white","outputs":[{"internalType":"contract IWhite","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_account","type":"address"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"xpAccumulated","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"xpMultiplierLevel","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040526802b5e3af16b18800006006556000600e5534801561002257600080fd5b5061002c336100ca565b600180546001600160a01b03199081167363b420fb3294ba1d300ce5d3ba4bbca0f4fe5e3b17909155600480548216737a38afa395666799b3dbfe22c0d1467fec931bb017905560038054821673400afbc1bba6e8ff4462d161f7dc24e4873d4ebb1790556002805490911673ed7985385bf434f0815aa9c90450945aee02d733179055678ac7230489e8000060055542600f81905560075561011a565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b612677806101296000396000f3fe608060405234801561001057600080fd5b50600436106102485760003560e01c80636e08e3611161013b578063b317ee05116100b8578063e46fdefc1161007c578063e46fdefc14610571578063e6fd48bc14610584578063efa71b991461058d578063f0250681146105ad578063f2fde38b146105c057600080fd5b8063b317ee0514610505578063c19e82d514610518578063c401f6f814610538578063cb8fe02c1461054b578063e18bf1221461055e57600080fd5b80638f10369a116100ff5780638f10369a1461046e57806393f1a40b1461047757806395ccea67146104cc57806398969e82146104df578063a0811074146104f257600080fd5b80636e08e361146103fb578063715018a61461041b578063816c1f54146104235780638da5cb5b146104365780638dbdbe6d1461045b57600080fd5b806330451659116101c95780634c6398d21161018d5780634c6398d2146103825780634ee509e4146103a25780634f4eb6c6146103b557806364482f79146103d55780636c0ffd8c146103e857600080fd5b806330451659146103215780633176b4e21461032957806332298be11461033c5780634004c8e71461035c5780634af42d871461036f57600080fd5b806317caf6f11161021057806317caf6f1146102d657806319d8ac61146102df5780631eaaa045146102e85780632edd9670146102fb578063303b6d251461030e57600080fd5b8063034f99d41461024d578063081e3eda146102695780630ad58d2f14610271578063126796dd146102865780631526fe2714610299575b600080fd5b61025660065481565b6040519081526020015b60405180910390f35b600854610256565b61028461027f366004612352565b6105d3565b005b61028461029436600461238b565b610901565b6102ac6102a73660046123ad565b61095a565b604080516001600160a01b0390951685526020850193909352918301526060820152608001610260565b610256600e5481565b61025660075481565b6102846102f63660046123d4565b61099e565b61025661030936600461240b565b610b13565b61028461031c36600461240b565b610b73565b610256610b9d565b61025661033736600461240b565b610ce4565b61025661034a3660046123ad565b600b6020526000908152604090205481565b61028461036a3660046123ad565b610d1b565b61025661037d36600461240b565b610d66565b6102566103903660046123ad565b60106020526000908152604090205481565b6102566103b036600461240b565b610daa565b6102566103c336600461240b565b60126020526000908152604090205481565b6102846103e3366004612428565b610dcf565b6102846103f636600461240b565b610e90565b61025661040936600461240b565b60116020526000908152604090205481565b610284610f87565b61025661043136600461240b565b610f9b565b6000546001600160a01b03165b6040516001600160a01b039091168152602001610260565b610284610469366004612352565b61100f565b61025660055481565b6104b1610485366004612456565b600960209081526000928352604080842090915290825290208054600182015460029092015490919083565b60408051938452602084019290925290820152606001610260565b6102846104da366004612486565b6112c0565b6102566104ed366004612456565b61135f565b600454610443906001600160a01b031681565b61028461051336600461240b565b61157f565b61025661052636600461240b565b600d6020526000908152604090205481565b600354610443906001600160a01b031681565b600154610443906001600160a01b031681565b600254610443906001600160a01b031681565b61028461057f3660046123ad565b611837565b610256600f5481565b61025661059b36600461240b565b600c6020526000908152604090205481565b6102846105bb36600461240b565b611844565b6102846105ce36600461240b565b611932565b8260000361062d576003546001600160a01b031633146106285760405162461bcd60e51b815260206004820152600b60248201526a139bdd08185b1b1bddd95960aa1b60448201526064015b60405180910390fd5b6106b0565b336001600160a01b038216148061064357503330145b8061065857506003546001600160a01b031633145b6106b05760405162461bcd60e51b815260206004820152602360248201527f596f752063616e277420776974686472617720666f7220736f6d656f6e6520656044820152626c736560e81b606482015260840161061f565b600082116107005760405162461bcd60e51b815260206004820152601d60248201527f576974686472617720616d6f756e742063616e2774206265207a65726f000000604482015260640161061f565b600060088481548110610715576107156124b2565b600091825260208083208784526009825260408085206001600160a01b038816865290925292206002810154600490920290920192504210156107895760405162461bcd60e51b815260206004820152600c60248201526b14dd1a5b1b081b1bd8dad95960a21b604482015260640161061f565b80548411156107da5760405162461bcd60e51b815260206004820152601c60248201527f596f752063616e27742077697468647261772074686174206d75636800000000604482015260640161061f565b6107e3856119ab565b6107ed8584611b22565b8381600001600082825461080191906124de565b90915550506003820154815464e8d4a510009161081d916124f1565b6108279190612508565b600182015560045482546001600160a01b0391821691160361088857600354825461085f916001600160a01b03918216911686611c02565b6000858152601060205260408120805486929061087d9084906124de565b909155506108c29050565b815461089e906001600160a01b03168486611c02565b600085815260106020526040812080548692906108bc9084906124de565b90915550505b8385846001600160a01b03167ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b56860405160405180910390a45050505050565b610909611c65565b6000828152600b6020526040908190208290555182907f6e4fdd86ed4186281f108d19169264f10ab9a86531113410b92c1cfc19971b599061094e9084815260200190565b60405180910390a25050565b6008818154811061096a57600080fd5b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169350919084565b6109a6611c65565b80156109b4576109b4611cbf565b6000600f5442116109c757600f546109c9565b425b905083600e546109d9919061252a565b600e55604080516080810182526001600160a01b038581168083526020830188815293830185815260006060850181815260088054600180820183559382905296517ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee3600490980297880180546001600160a01b031916919097161790955595517ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee486015590517ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee585015593517ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee690930192909255549091610ada916124de565b6040518681527f4710feb78e3bce8d2e3ca2989a8eb2f8bcd32a6a55b4535942c180fc4d2e29529060200160405180910390a350505050565b6001600160a01b0381166000908152600d602052604081205481908103610b4757610b406103e8436124de565b9050610b62565b506001600160a01b0382166000908152600d60205260409020545b610b6c81436124de565b9392505050565b610b7b611c65565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b600654600354604080516319f0555b60e21b81529051600093926001600160a01b0316916367c1556c9160048083019260209291908290030181865afa158015610beb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c0f919061253d565b10610c4f5762015180670de0b6b3a7640000600654662386f26fc10000610c3691906124f1565b610c409190612508565b610c4a9190612508565b905090565b62015180670de0b6b3a7640000600360009054906101000a90046001600160a01b03166001600160a01b03166367c1556c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610caf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cd3919061253d565b610c3690662386f26fc100006124f1565b6001600160a01b038116600090815260116020526040812054610d09906103e86124f1565b610d15906103e861252a565b92915050565b610d23611c65565b610d2b611cbf565b60058190556040518181527fde89cb17ac7f58f94792b3e91e086ed85403819c24ceea882491f960ccb1a2789060200160405180910390a150565b6001600160a01b038116600090815260126020526040812054606490610d8d90600a6124f1565b610d9684610b13565b610da091906124f1565b610d159190612508565b6001600160a01b038116600090815260126020526040812054610d09906103e86124f1565b610dd7611c65565b8015610de557610de5611cbf565b8160088481548110610df957610df96124b2565b906000526020600020906004020160010154600e54610e1891906124de565b610e22919061252a565b600e819055508160088481548110610e3c57610e3c6124b2565b906000526020600020906004020160010181905550827f942cc7e17a17c164bd977f32ab8c54265d5b9d481e4e352bf874f1e568874e7c83604051610e8391815260200190565b60405180910390a2505050565b336001600160a01b0382161480610ea657503330145b610ec25760405162461bcd60e51b815260040161061f90612556565b6000610ecd82610daa565b6001600160a01b0383166000908152600c6020526040902054909150811115610f285760405162461bcd60e51b815260206004820152600d60248201526c04e6f7420656e6f75676820585609c1b604482015260640161061f565b6001600160a01b0382166000908152600c602052604081208054839290610f509084906124de565b90915550506001600160a01b0382166000908152601260205260408120805460019290610f7e90849061252a565b90915550505050565b610f8f611c65565b610f996000611cea565b565b600080610fa960008461135f565b90506000610fb860018561135f565b90506000610fc6828461252a565b6001600160a01b03861660009081526011602052604081205491925090606490610ff090846124f1565b610ffb90600a6124f1565b6110059190612508565b9695505050505050565b82600003611064576003546001600160a01b0316331461105f5760405162461bcd60e51b815260206004820152600b60248201526a139bdd08185b1b1bddd95960aa1b604482015260640161061f565b6110e6565b336001600160a01b038216148061107a57503330145b8061108f57506003546001600160a01b031633145b6110e65760405162461bcd60e51b815260206004820152602260248201527f596f752063616e2774206465706f73697420666f7220736f6d656f6e6520656c604482015261736560f01b606482015260840161061f565b600082116111365760405162461bcd60e51b815260206004820152601c60248201527f4465706f73697420616d6f756e742063616e2774206265207a65726f00000000604482015260640161061f565b60006008848154811061114b5761114b6124b2565b600091825260208083208784526009825260408085206001600160a01b03881686528352808520898652600b9093529093205460049092029092019250611192904261252a565b60028201556111a0856119ab565b6111aa8584611b22565b60045482546001600160a01b039182169116036112075760035482546111de916001600160a01b0391821691163087611d3a565b600085815260106020526040812080548692906111fc90849061252a565b909155506112429050565b815461121e906001600160a01b0316843087611d3a565b6000858152601060205260408120805486929061123c90849061252a565b90915550505b8385846001600160a01b03167f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a1560405160405180910390a48381600001600082825461128e919061252a565b90915550506003820154815464e8d4a51000916112aa916124f1565b6112b49190612508565b60019091015550505050565b6112c8611c65565b816001600160a01b031663a9059cbb6112e96000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018490526044016020604051808303816000875af1158015611336573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061135a9190612598565b505050565b60008060088481548110611375576113756124b2565b600091825260208083208784526009825260408085206001600160a01b038981168752935280852060049485029092016003810154815492516370a0823160e01b8152309681019690965290965091949193919216906370a0823190602401602060405180830381865afa1580156113f1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611415919061253d565b60015485549192506001600160a01b0390811691160361149e57600154604051633af9e66960e01b81523060048201526001600160a01b0390911690633af9e66990602401602060405180830381865afa158015611477573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061149b919061253d565b90505b8360020154421180156114b057508015155b1561151a576000600e5485600101546005548760020154426114d291906124de565b6114dc91906124f1565b6114e691906124f1565b6114f09190612508565b9050816115028264e8d4a510006124f1565b61150c9190612508565b611516908461252a565b9250505b6001830154835464e8d4a51000906115339085906124f1565b61153d9190612508565b6000898152600a602090815260408083206001600160a01b038c16845290915290205461156a919061252a565b61157491906124de565b979650505050505050565b336001600160a01b038216148061159557503330145b6115e15760405162461bcd60e51b815260206004820181905260248201527f596f752063616e277420636c61696d20666f7220736f6d656f6e6520656c7365604482015260640161061f565b6001600160a01b03811660009081527fec8156718a8372b1db44bb411437d0870f3e3790d4a08526d024ce1b0b668f6b60209081526040808320547f92e85d02570a8092d09a6e3a57665bc3815a2699a4074001bf1ccabf660f5a369092529091205481158015611650575080155b156116c3576000821180156116655750600081115b6116c35760405162461bcd60e51b815260206004820152602960248201527f43616e2774206d616b6520736372616d626c6520776974686f7574205748495460448201526845206f7220594f4c4b60b81b606482015260840161061f565b6001600160a01b0383166000908152600d60205260408120549003611708576116ee6103e8436124de565b6001600160a01b0384166000908152600d60205260409020555b61171183610b13565b6001600160a01b0384166000908152600c60205260408120805490919061173990849061252a565b90915550611748905083610d66565b6001600160a01b0384166000908152600c60205260408120805490919061177090849061252a565b90915550506001600160a01b0383166000908152600d602052604081204390558061179a85610f9b565b11156117ac576117a984610f9b565b90505b6117b7600085611d72565b506117c3600185611d72565b508015611831576001546040516340c10f1960e01b81526001600160a01b03868116600483015260248201849052909116906340c10f1990604401600060405180830381600087803b15801561181857600080fd5b505af115801561182c573d6000803e3d6000fd5b505050505b50505050565b61183f611c65565b600655565b336001600160a01b038216148061185a57503330145b6118765760405162461bcd60e51b815260040161061f90612556565b600061188182610ce4565b6001600160a01b0383166000908152600c60205260409020549091508111156118dc5760405162461bcd60e51b815260206004820152600d60248201526c04e6f7420656e6f75676820585609c1b604482015260640161061f565b6001600160a01b0382166000908152600c6020526040812080548392906119049084906124de565b90915550506001600160a01b0382166000908152601160205260408120805460019290610f7e90849061252a565b61193a611c65565b6001600160a01b03811661199f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161061f565b6119a881611cea565b50565b6000600882815481106119c0576119c06124b2565b90600052602060002090600402019050806002015442116119df575050565b80546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015611a27573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a4b919061253d565b905080600003611a6057504260029091015550565b6000600e548360010154600554856002015442611a7d91906124de565b611a8791906124f1565b611a9191906124f1565b611a9b9190612508565b905081611aad8264e8d4a510006124f1565b611ab79190612508565b836003016000828254611aca919061252a565b909155505042600284018190556003840154604080519283526020830185905282015284907fcb7325664a4a3b7c7223eefc492a97ca4fdf94d46884621e5a8fae5a04b2b9d29060600160405180910390a250505050565b60008281526009602090815260408083206001600160a01b03851684528252808320815160608101835281548152600182015493810184905260029091015491810191909152600880549193929164e8d4a51000919087908110611b8857611b886124b2565b9060005260206000209060040201600301548460000151611ba991906124f1565b611bb39190612508565b611bbd91906124de565b90508015611831576000848152600a602090815260408083206001600160a01b038716845290915281208054839290611bf790849061252a565b909155505050505050565b6040516001600160a01b03831660248201526044810182905261135a90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526120eb565b6000546001600160a01b03163314610f995760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161061f565b60085460005b81811015611ce657611cd6816119ab565b611cdf816125b5565b9050611cc5565b5050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b03808516602483015283166044820152606481018290526118319085906323b872dd60e01b90608401611c2e565b6000336001600160a01b0383161480611d8a57503330145b611dd65760405162461bcd60e51b815260206004820181905260248201527f596f752063616e277420636c61696d20666f7220736f6d656f6e6520656c7365604482015260640161061f565b611ddf836119ab565b611de98383611b22565b6000838152600a602090815260408083206001600160a01b038616845290915290205480156120e15760008481526009602090815260408083206001600160a01b03871684528252808320878452600b90925290912054611e4a904261252a565b60028201556000858152600a602090815260408083206001600160a01b03881684529091528120556008805464e8d4a51000919087908110611e8e57611e8e6124b2565b60009182526020808320600360049093020191909101548883526009825260408084206001600160a01b038a168552909252912054611ecd91906124f1565b611ed79190612508565b60008681526009602090815260408083206001600160a01b0389168452909152902060010155600754421461203b57600060075442611f1691906124de565b90506201518060075442611f2a91906124de565b1115611f365750620151805b4260078190556001546001600160a01b031690637af548c19083611f58610b9d565b611f6291906124f1565b6040516001600160e01b031960e085901b16815260048101929092526024820152600060448201526064016020604051808303816000875af1158015611fac573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fd0919061253d565b50600260009054906101000a90046001600160a01b03166001600160a01b031663fff6cae96040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561202157600080fd5b505af1158015612035573d6000803e3d6000fd5b50505050505b6001546040516340c10f1960e01b81526001600160a01b03868116600483015260248201859052909116906340c10f1990604401600060405180830381600087803b15801561208957600080fd5b505af115801561209d573d6000803e3d6000fd5b505050508185856001600160a01b03167fd6f2c8500df5b44f11e9e48b91ff9f1b9d81bc496d55570c2b1b75bf65243f5160405160405180910390a4509050610d15565b6000915050610d15565b6000612140826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166121bd9092919063ffffffff16565b80519091501561135a578080602001905181019061215e9190612598565b61135a5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161061f565b60606121cc84846000856121d4565b949350505050565b6060824710156122355760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161061f565b600080866001600160a01b0316858760405161225191906125f2565b60006040518083038185875af1925050503d806000811461228e576040519150601f19603f3d011682016040523d82523d6000602084013e612293565b606091505b5091509150611574878383876060831561230e578251600003612307576001600160a01b0385163b6123075760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161061f565b50816121cc565b6121cc83838151156123235781518083602001fd5b8060405162461bcd60e51b815260040161061f919061260e565b6001600160a01b03811681146119a857600080fd5b60008060006060848603121561236757600080fd5b833592506020840135915060408401356123808161233d565b809150509250925092565b6000806040838503121561239e57600080fd5b50508035926020909101359150565b6000602082840312156123bf57600080fd5b5035919050565b80151581146119a857600080fd5b6000806000606084860312156123e957600080fd5b8335925060208401356123fb8161233d565b91506040840135612380816123c6565b60006020828403121561241d57600080fd5b8135610b6c8161233d565b60008060006060848603121561243d57600080fd5b83359250602084013591506040840135612380816123c6565b6000806040838503121561246957600080fd5b82359150602083013561247b8161233d565b809150509250929050565b6000806040838503121561249957600080fd5b82356124a48161233d565b946020939093013593505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115610d1557610d156124c8565b8082028115828204841417610d1557610d156124c8565b60008261252557634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115610d1557610d156124c8565b60006020828403121561254f57600080fd5b5051919050565b60208082526022908201527f596f752063616e2774207570677261646520666f7220736f6d656f6e6520656c604082015261736560f01b606082015260800190565b6000602082840312156125aa57600080fd5b8151610b6c816123c6565b6000600182016125c7576125c76124c8565b5060010190565b60005b838110156125e95781810151838201526020016125d1565b50506000910152565b600082516126048184602087016125ce565b9190910192915050565b602081526000825180602084015261262d8160408501602087016125ce565b601f01601f1916919091016040019291505056fea2646970667358221220e350df631b3de62551516670abbda291122295310bfdac26a239bd6b1cab369a64736f6c63430008130033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102485760003560e01c80636e08e3611161013b578063b317ee05116100b8578063e46fdefc1161007c578063e46fdefc14610571578063e6fd48bc14610584578063efa71b991461058d578063f0250681146105ad578063f2fde38b146105c057600080fd5b8063b317ee0514610505578063c19e82d514610518578063c401f6f814610538578063cb8fe02c1461054b578063e18bf1221461055e57600080fd5b80638f10369a116100ff5780638f10369a1461046e57806393f1a40b1461047757806395ccea67146104cc57806398969e82146104df578063a0811074146104f257600080fd5b80636e08e361146103fb578063715018a61461041b578063816c1f54146104235780638da5cb5b146104365780638dbdbe6d1461045b57600080fd5b806330451659116101c95780634c6398d21161018d5780634c6398d2146103825780634ee509e4146103a25780634f4eb6c6146103b557806364482f79146103d55780636c0ffd8c146103e857600080fd5b806330451659146103215780633176b4e21461032957806332298be11461033c5780634004c8e71461035c5780634af42d871461036f57600080fd5b806317caf6f11161021057806317caf6f1146102d657806319d8ac61146102df5780631eaaa045146102e85780632edd9670146102fb578063303b6d251461030e57600080fd5b8063034f99d41461024d578063081e3eda146102695780630ad58d2f14610271578063126796dd146102865780631526fe2714610299575b600080fd5b61025660065481565b6040519081526020015b60405180910390f35b600854610256565b61028461027f366004612352565b6105d3565b005b61028461029436600461238b565b610901565b6102ac6102a73660046123ad565b61095a565b604080516001600160a01b0390951685526020850193909352918301526060820152608001610260565b610256600e5481565b61025660075481565b6102846102f63660046123d4565b61099e565b61025661030936600461240b565b610b13565b61028461031c36600461240b565b610b73565b610256610b9d565b61025661033736600461240b565b610ce4565b61025661034a3660046123ad565b600b6020526000908152604090205481565b61028461036a3660046123ad565b610d1b565b61025661037d36600461240b565b610d66565b6102566103903660046123ad565b60106020526000908152604090205481565b6102566103b036600461240b565b610daa565b6102566103c336600461240b565b60126020526000908152604090205481565b6102846103e3366004612428565b610dcf565b6102846103f636600461240b565b610e90565b61025661040936600461240b565b60116020526000908152604090205481565b610284610f87565b61025661043136600461240b565b610f9b565b6000546001600160a01b03165b6040516001600160a01b039091168152602001610260565b610284610469366004612352565b61100f565b61025660055481565b6104b1610485366004612456565b600960209081526000928352604080842090915290825290208054600182015460029092015490919083565b60408051938452602084019290925290820152606001610260565b6102846104da366004612486565b6112c0565b6102566104ed366004612456565b61135f565b600454610443906001600160a01b031681565b61028461051336600461240b565b61157f565b61025661052636600461240b565b600d6020526000908152604090205481565b600354610443906001600160a01b031681565b600154610443906001600160a01b031681565b600254610443906001600160a01b031681565b61028461057f3660046123ad565b611837565b610256600f5481565b61025661059b36600461240b565b600c6020526000908152604090205481565b6102846105bb36600461240b565b611844565b6102846105ce36600461240b565b611932565b8260000361062d576003546001600160a01b031633146106285760405162461bcd60e51b815260206004820152600b60248201526a139bdd08185b1b1bddd95960aa1b60448201526064015b60405180910390fd5b6106b0565b336001600160a01b038216148061064357503330145b8061065857506003546001600160a01b031633145b6106b05760405162461bcd60e51b815260206004820152602360248201527f596f752063616e277420776974686472617720666f7220736f6d656f6e6520656044820152626c736560e81b606482015260840161061f565b600082116107005760405162461bcd60e51b815260206004820152601d60248201527f576974686472617720616d6f756e742063616e2774206265207a65726f000000604482015260640161061f565b600060088481548110610715576107156124b2565b600091825260208083208784526009825260408085206001600160a01b038816865290925292206002810154600490920290920192504210156107895760405162461bcd60e51b815260206004820152600c60248201526b14dd1a5b1b081b1bd8dad95960a21b604482015260640161061f565b80548411156107da5760405162461bcd60e51b815260206004820152601c60248201527f596f752063616e27742077697468647261772074686174206d75636800000000604482015260640161061f565b6107e3856119ab565b6107ed8584611b22565b8381600001600082825461080191906124de565b90915550506003820154815464e8d4a510009161081d916124f1565b6108279190612508565b600182015560045482546001600160a01b0391821691160361088857600354825461085f916001600160a01b03918216911686611c02565b6000858152601060205260408120805486929061087d9084906124de565b909155506108c29050565b815461089e906001600160a01b03168486611c02565b600085815260106020526040812080548692906108bc9084906124de565b90915550505b8385846001600160a01b03167ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b56860405160405180910390a45050505050565b610909611c65565b6000828152600b6020526040908190208290555182907f6e4fdd86ed4186281f108d19169264f10ab9a86531113410b92c1cfc19971b599061094e9084815260200190565b60405180910390a25050565b6008818154811061096a57600080fd5b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169350919084565b6109a6611c65565b80156109b4576109b4611cbf565b6000600f5442116109c757600f546109c9565b425b905083600e546109d9919061252a565b600e55604080516080810182526001600160a01b038581168083526020830188815293830185815260006060850181815260088054600180820183559382905296517ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee3600490980297880180546001600160a01b031916919097161790955595517ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee486015590517ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee585015593517ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee690930192909255549091610ada916124de565b6040518681527f4710feb78e3bce8d2e3ca2989a8eb2f8bcd32a6a55b4535942c180fc4d2e29529060200160405180910390a350505050565b6001600160a01b0381166000908152600d602052604081205481908103610b4757610b406103e8436124de565b9050610b62565b506001600160a01b0382166000908152600d60205260409020545b610b6c81436124de565b9392505050565b610b7b611c65565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b600654600354604080516319f0555b60e21b81529051600093926001600160a01b0316916367c1556c9160048083019260209291908290030181865afa158015610beb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c0f919061253d565b10610c4f5762015180670de0b6b3a7640000600654662386f26fc10000610c3691906124f1565b610c409190612508565b610c4a9190612508565b905090565b62015180670de0b6b3a7640000600360009054906101000a90046001600160a01b03166001600160a01b03166367c1556c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610caf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cd3919061253d565b610c3690662386f26fc100006124f1565b6001600160a01b038116600090815260116020526040812054610d09906103e86124f1565b610d15906103e861252a565b92915050565b610d23611c65565b610d2b611cbf565b60058190556040518181527fde89cb17ac7f58f94792b3e91e086ed85403819c24ceea882491f960ccb1a2789060200160405180910390a150565b6001600160a01b038116600090815260126020526040812054606490610d8d90600a6124f1565b610d9684610b13565b610da091906124f1565b610d159190612508565b6001600160a01b038116600090815260126020526040812054610d09906103e86124f1565b610dd7611c65565b8015610de557610de5611cbf565b8160088481548110610df957610df96124b2565b906000526020600020906004020160010154600e54610e1891906124de565b610e22919061252a565b600e819055508160088481548110610e3c57610e3c6124b2565b906000526020600020906004020160010181905550827f942cc7e17a17c164bd977f32ab8c54265d5b9d481e4e352bf874f1e568874e7c83604051610e8391815260200190565b60405180910390a2505050565b336001600160a01b0382161480610ea657503330145b610ec25760405162461bcd60e51b815260040161061f90612556565b6000610ecd82610daa565b6001600160a01b0383166000908152600c6020526040902054909150811115610f285760405162461bcd60e51b815260206004820152600d60248201526c04e6f7420656e6f75676820585609c1b604482015260640161061f565b6001600160a01b0382166000908152600c602052604081208054839290610f509084906124de565b90915550506001600160a01b0382166000908152601260205260408120805460019290610f7e90849061252a565b90915550505050565b610f8f611c65565b610f996000611cea565b565b600080610fa960008461135f565b90506000610fb860018561135f565b90506000610fc6828461252a565b6001600160a01b03861660009081526011602052604081205491925090606490610ff090846124f1565b610ffb90600a6124f1565b6110059190612508565b9695505050505050565b82600003611064576003546001600160a01b0316331461105f5760405162461bcd60e51b815260206004820152600b60248201526a139bdd08185b1b1bddd95960aa1b604482015260640161061f565b6110e6565b336001600160a01b038216148061107a57503330145b8061108f57506003546001600160a01b031633145b6110e65760405162461bcd60e51b815260206004820152602260248201527f596f752063616e2774206465706f73697420666f7220736f6d656f6e6520656c604482015261736560f01b606482015260840161061f565b600082116111365760405162461bcd60e51b815260206004820152601c60248201527f4465706f73697420616d6f756e742063616e2774206265207a65726f00000000604482015260640161061f565b60006008848154811061114b5761114b6124b2565b600091825260208083208784526009825260408085206001600160a01b03881686528352808520898652600b9093529093205460049092029092019250611192904261252a565b60028201556111a0856119ab565b6111aa8584611b22565b60045482546001600160a01b039182169116036112075760035482546111de916001600160a01b0391821691163087611d3a565b600085815260106020526040812080548692906111fc90849061252a565b909155506112429050565b815461121e906001600160a01b0316843087611d3a565b6000858152601060205260408120805486929061123c90849061252a565b90915550505b8385846001600160a01b03167f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a1560405160405180910390a48381600001600082825461128e919061252a565b90915550506003820154815464e8d4a51000916112aa916124f1565b6112b49190612508565b60019091015550505050565b6112c8611c65565b816001600160a01b031663a9059cbb6112e96000546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018490526044016020604051808303816000875af1158015611336573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061135a9190612598565b505050565b60008060088481548110611375576113756124b2565b600091825260208083208784526009825260408085206001600160a01b038981168752935280852060049485029092016003810154815492516370a0823160e01b8152309681019690965290965091949193919216906370a0823190602401602060405180830381865afa1580156113f1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611415919061253d565b60015485549192506001600160a01b0390811691160361149e57600154604051633af9e66960e01b81523060048201526001600160a01b0390911690633af9e66990602401602060405180830381865afa158015611477573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061149b919061253d565b90505b8360020154421180156114b057508015155b1561151a576000600e5485600101546005548760020154426114d291906124de565b6114dc91906124f1565b6114e691906124f1565b6114f09190612508565b9050816115028264e8d4a510006124f1565b61150c9190612508565b611516908461252a565b9250505b6001830154835464e8d4a51000906115339085906124f1565b61153d9190612508565b6000898152600a602090815260408083206001600160a01b038c16845290915290205461156a919061252a565b61157491906124de565b979650505050505050565b336001600160a01b038216148061159557503330145b6115e15760405162461bcd60e51b815260206004820181905260248201527f596f752063616e277420636c61696d20666f7220736f6d656f6e6520656c7365604482015260640161061f565b6001600160a01b03811660009081527fec8156718a8372b1db44bb411437d0870f3e3790d4a08526d024ce1b0b668f6b60209081526040808320547f92e85d02570a8092d09a6e3a57665bc3815a2699a4074001bf1ccabf660f5a369092529091205481158015611650575080155b156116c3576000821180156116655750600081115b6116c35760405162461bcd60e51b815260206004820152602960248201527f43616e2774206d616b6520736372616d626c6520776974686f7574205748495460448201526845206f7220594f4c4b60b81b606482015260840161061f565b6001600160a01b0383166000908152600d60205260408120549003611708576116ee6103e8436124de565b6001600160a01b0384166000908152600d60205260409020555b61171183610b13565b6001600160a01b0384166000908152600c60205260408120805490919061173990849061252a565b90915550611748905083610d66565b6001600160a01b0384166000908152600c60205260408120805490919061177090849061252a565b90915550506001600160a01b0383166000908152600d602052604081204390558061179a85610f9b565b11156117ac576117a984610f9b565b90505b6117b7600085611d72565b506117c3600185611d72565b508015611831576001546040516340c10f1960e01b81526001600160a01b03868116600483015260248201849052909116906340c10f1990604401600060405180830381600087803b15801561181857600080fd5b505af115801561182c573d6000803e3d6000fd5b505050505b50505050565b61183f611c65565b600655565b336001600160a01b038216148061185a57503330145b6118765760405162461bcd60e51b815260040161061f90612556565b600061188182610ce4565b6001600160a01b0383166000908152600c60205260409020549091508111156118dc5760405162461bcd60e51b815260206004820152600d60248201526c04e6f7420656e6f75676820585609c1b604482015260640161061f565b6001600160a01b0382166000908152600c6020526040812080548392906119049084906124de565b90915550506001600160a01b0382166000908152601160205260408120805460019290610f7e90849061252a565b61193a611c65565b6001600160a01b03811661199f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161061f565b6119a881611cea565b50565b6000600882815481106119c0576119c06124b2565b90600052602060002090600402019050806002015442116119df575050565b80546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015611a27573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a4b919061253d565b905080600003611a6057504260029091015550565b6000600e548360010154600554856002015442611a7d91906124de565b611a8791906124f1565b611a9191906124f1565b611a9b9190612508565b905081611aad8264e8d4a510006124f1565b611ab79190612508565b836003016000828254611aca919061252a565b909155505042600284018190556003840154604080519283526020830185905282015284907fcb7325664a4a3b7c7223eefc492a97ca4fdf94d46884621e5a8fae5a04b2b9d29060600160405180910390a250505050565b60008281526009602090815260408083206001600160a01b03851684528252808320815160608101835281548152600182015493810184905260029091015491810191909152600880549193929164e8d4a51000919087908110611b8857611b886124b2565b9060005260206000209060040201600301548460000151611ba991906124f1565b611bb39190612508565b611bbd91906124de565b90508015611831576000848152600a602090815260408083206001600160a01b038716845290915281208054839290611bf790849061252a565b909155505050505050565b6040516001600160a01b03831660248201526044810182905261135a90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526120eb565b6000546001600160a01b03163314610f995760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161061f565b60085460005b81811015611ce657611cd6816119ab565b611cdf816125b5565b9050611cc5565b5050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b03808516602483015283166044820152606481018290526118319085906323b872dd60e01b90608401611c2e565b6000336001600160a01b0383161480611d8a57503330145b611dd65760405162461bcd60e51b815260206004820181905260248201527f596f752063616e277420636c61696d20666f7220736f6d656f6e6520656c7365604482015260640161061f565b611ddf836119ab565b611de98383611b22565b6000838152600a602090815260408083206001600160a01b038616845290915290205480156120e15760008481526009602090815260408083206001600160a01b03871684528252808320878452600b90925290912054611e4a904261252a565b60028201556000858152600a602090815260408083206001600160a01b03881684529091528120556008805464e8d4a51000919087908110611e8e57611e8e6124b2565b60009182526020808320600360049093020191909101548883526009825260408084206001600160a01b038a168552909252912054611ecd91906124f1565b611ed79190612508565b60008681526009602090815260408083206001600160a01b0389168452909152902060010155600754421461203b57600060075442611f1691906124de565b90506201518060075442611f2a91906124de565b1115611f365750620151805b4260078190556001546001600160a01b031690637af548c19083611f58610b9d565b611f6291906124f1565b6040516001600160e01b031960e085901b16815260048101929092526024820152600060448201526064016020604051808303816000875af1158015611fac573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fd0919061253d565b50600260009054906101000a90046001600160a01b03166001600160a01b031663fff6cae96040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561202157600080fd5b505af1158015612035573d6000803e3d6000fd5b50505050505b6001546040516340c10f1960e01b81526001600160a01b03868116600483015260248201859052909116906340c10f1990604401600060405180830381600087803b15801561208957600080fd5b505af115801561209d573d6000803e3d6000fd5b505050508185856001600160a01b03167fd6f2c8500df5b44f11e9e48b91ff9f1b9d81bc496d55570c2b1b75bf65243f5160405160405180910390a4509050610d15565b6000915050610d15565b6000612140826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166121bd9092919063ffffffff16565b80519091501561135a578080602001905181019061215e9190612598565b61135a5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161061f565b60606121cc84846000856121d4565b949350505050565b6060824710156122355760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161061f565b600080866001600160a01b0316858760405161225191906125f2565b60006040518083038185875af1925050503d806000811461228e576040519150601f19603f3d011682016040523d82523d6000602084013e612293565b606091505b5091509150611574878383876060831561230e578251600003612307576001600160a01b0385163b6123075760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161061f565b50816121cc565b6121cc83838151156123235781518083602001fd5b8060405162461bcd60e51b815260040161061f919061260e565b6001600160a01b03811681146119a857600080fd5b60008060006060848603121561236757600080fd5b833592506020840135915060408401356123808161233d565b809150509250925092565b6000806040838503121561239e57600080fd5b50508035926020909101359150565b6000602082840312156123bf57600080fd5b5035919050565b80151581146119a857600080fd5b6000806000606084860312156123e957600080fd5b8335925060208401356123fb8161233d565b91506040840135612380816123c6565b60006020828403121561241d57600080fd5b8135610b6c8161233d565b60008060006060848603121561243d57600080fd5b83359250602084013591506040840135612380816123c6565b6000806040838503121561246957600080fd5b82359150602083013561247b8161233d565b809150509250929050565b6000806040838503121561249957600080fd5b82356124a48161233d565b946020939093013593505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115610d1557610d156124c8565b8082028115828204841417610d1557610d156124c8565b60008261252557634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115610d1557610d156124c8565b60006020828403121561254f57600080fd5b5051919050565b60208082526022908201527f596f752063616e2774207570677261646520666f7220736f6d656f6e6520656c604082015261736560f01b606082015260800190565b6000602082840312156125aa57600080fd5b8151610b6c816123c6565b6000600182016125c7576125c76124c8565b5060010190565b60005b838110156125e95781810151838201526020016125d1565b50506000910152565b600082516126048184602087016125ce565b9190910192915050565b602081526000825180602084015261262d8160408501602087016125ce565b601f01601f1916919091016040019291505056fea2646970667358221220e350df631b3de62551516670abbda291122295310bfdac26a239bd6b1cab369a64736f6c63430008130033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 25 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ 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.