Contract Overview
My Name Tag:
Not Available, login to update
[ Download CSV Export ]
Latest 1 internal transaction
Parent Txn Hash | Block | From | To | Value | |||
---|---|---|---|---|---|---|---|
0xb55557d9348a4197f72379402e471a29e5dbc830593aad193717446ad6b78ff8 | 57914350 | 4 days 7 hrs ago | 0x42a80b5aed23b195635e4430920d6561ca07617b | Contract Creation | 0 FTM |
[ Download CSV Export ]
Contract Name:
PearlChefV2
Compiler Version
v0.8.13+commit.abaa5c0e
Contract Source Code (Solidity)
/** *Submitted for verification at FtmScan.com on 2023-03-19 */ // Sources flattened with hardhat v2.12.7 https://hardhat.org // File contracts/staking/PearlsChef.sol /** *Submitted for verification at Etherscan.io on 2023-03-03 */ /* * ABDK Math 64.64 Smart Contract Library. Copyright © 2019 by ABDK Consulting. * Author: Mikhail Vladimirov <[email protected]> */ pragma solidity ^0.8.0; /** * 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: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } } // File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Context.sol // 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). * vision * 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; } } // File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; /** * @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); } } // File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/math/SafeMath.sol // OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } } // File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/structs/EnumerableSet.sol // OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol) // This file was procedurally generated from scripts/generate/templates/EnumerableSet.js. pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure * unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an * array of EnumerableSet. * ==== */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * 明日は明日の風が吹く * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastValue; // Update the index for the moved value set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { bytes32[] memory store = _values(set._inner); bytes32[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values in the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } } // File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Address.sol // OpenZeppelin Contracts (last updated v4.7.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); } } } // File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/extensions/draft-IERC20Permit.sol // 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); } // File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/IERC20.sol // 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); } // File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/utils/SafeERC20.sol // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; /** * @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" ); } } } // File: contracts/pearlsChef.sol pragma solidity ^0.8.0; interface IUniswapPair { event Sync(uint112 reserve0, uint112 reserve1); function sync() external; } interface IPearlsToken { function mint(address to, uint256 amount) external; function rebase( uint256 epoch, uint256 indexDelta, bool positive ) external returns (uint256); function totalSupply() external view returns (uint256); function transferUnderlying(address to, uint256 value) external returns (bool); function fragmentToPearls(uint256 value) external view returns (uint256); function pearlsToFragment(uint256 pearls) external view returns (uint256); function balanceOfUnderlying(address who) external view returns (uint256); } interface IUniswapV2Router { function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract PearlChefV2 is Ownable, ReentrancyGuard { 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 `lastRewardTime`) 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 second. uint256 lastRewardTime; // Last block time that Rewards distribution occurs. uint256 accRewardPerShare; // Accumulated Rewards per share. } // PEARLS IPearlsToken public pearls; // Uniswap V2 Router IUniswapV2Router public router; // PEARLS tokens reward per second. uint256 public rewardPerSecond; // Compound ratio which is 0.00001% (will be used to decrease supply) uint256 public compoundRatio_MAX = 1e12; uint256 public compoundRatio = 833333333333; uint256 public lastRebaseTimestamp; uint256 public rebaseInterval_MAX = 600; // 10 mins uint256 public rebaseInterval = 1; // 1 second by default // 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; // Total allocation points. Must be the sum of all allocation points in all pools. uint256 public totalAllocPoint = 0; // The block time when PEARLS mining starts. uint256 public startTime; // Events event Deposit(address indexed user, uint256 indexed pid, uint256 amount); event Withdraw(address indexed user, uint256 indexed pid, uint256 amount); event RewardPaid(address indexed user, uint256 indexed pid, uint256 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 lastRewardTime, uint256 lpSupply, uint256 accRewardPerShare ); event LogSetLockDuration(uint256 indexed pid, uint256 lockDuration); modifier needsRebase() { if (block.timestamp - lastRebaseTimestamp >= rebaseInterval) { pearls.rebase(block.timestamp, compound(1e18, compoundRatio, block.timestamp - lastRebaseTimestamp) - 1e18, false); lastRebaseTimestamp = block.timestamp; } _; } function setRebaseInterval(uint256 _rebaseInterval) public onlyOwner { require(_rebaseInterval <= rebaseInterval_MAX, "exceeds max interval"); rebaseInterval = _rebaseInterval; } function setCompoundRatio(uint256 _compoundRatio) public onlyOwner { require(_compoundRatio <= compoundRatio_MAX, "exceeds max ratio"); compoundRatio = _compoundRatio; } function pow(int128 x, uint256 n) public pure returns (int128 r) { r = ABDKMath64x64.fromUInt(1); while (n > 0) { if (n % 2 == 1) { r = ABDKMath64x64.mul(r, x); n -= 1; } else { x = ABDKMath64x64.mul(x, x); n /= 2; } } } function compound( uint256 principal, uint256 ratio, uint256 n ) public pure returns (uint256) { return ABDKMath64x64.mulu( pow( ABDKMath64x64.add( ABDKMath64x64.fromUInt(1), ABDKMath64x64.divu(ratio, 10**18) ), n ), principal ); } constructor( IPearlsToken _pearls, IUniswapV2Router _router, uint256 _rewardPerSecond, uint256 _startTime ) Ownable() ReentrancyGuard() { pearls = _pearls; router = _router; rewardPerSecond = _rewardPerSecond; startTime = _startTime; lastRebaseTimestamp = _startTime; } function poolLength() external view returns (uint256) { return poolInfo.length; } function setLockDuration(uint256 _pid, uint256 _lockDuration) external onlyOwner { lockDurations[_pid] = _lockDuration; emit LogSetLockDuration(_pid, _lockDuration); } 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 lastRewardTime = block.timestamp > startTime ? block.timestamp : startTime; totalAllocPoint = totalAllocPoint + _allocPoint; poolInfo.push( PoolInfo({ lpToken: _lpToken, allocPoint: _allocPoint, lastRewardTime: lastRewardTime, accRewardPerShare: 0 }) ); emit LogPoolAddition(poolInfo.length - 1, _allocPoint, _lpToken); } // Update the given pool's pearls 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 Pearls on frontend. function pendingReward(uint256 _pid, address _user) external 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(pearls)) { lpSupply = pearls.balanceOfUnderlying(address(this)); } if (block.timestamp > pool.lastRewardTime && lpSupply != 0) { uint256 pearlsReward = ((block.timestamp - pool.lastRewardTime) * rewardPerSecond * pool.allocPoint) / totalAllocPoint; accRewardPerShare += (pearlsReward * 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() public { 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) public { PoolInfo storage pool = poolInfo[_pid]; if (block.timestamp <= pool.lastRewardTime) { return; } uint256 lpSupply = pool.lpToken.balanceOf(address(this)); if (address(pool.lpToken) == address(pearls)) { lpSupply = pearls.balanceOfUnderlying(address(this)); } if (lpSupply == 0) { pool.lastRewardTime = block.timestamp; return; } uint256 pearlsReward = ((block.timestamp - pool.lastRewardTime) * rewardPerSecond * pool.allocPoint) / totalAllocPoint; pool.accRewardPerShare += (pearlsReward * 1e12) / lpSupply; pool.lastRewardTime = block.timestamp; emit LogUpdatePool( _pid, pool.lastRewardTime, lpSupply, pool.accRewardPerShare ); } // Deposit tokens to PearlsChef for PEARLS allocation. function deposit( uint256 _pid, uint256 _amount, address _account ) external nonReentrant { require( msg.sender == _account || msg.sender == address(this), "not allowed" ); require(_amount > 0, "invalid amount"); PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][_account]; user.lockEndedTimestamp = block.timestamp + lockDurations[_pid]; updatePool(_pid); queueRewards(_pid, _account); pool.lpToken.safeTransferFrom(_account, address(this), _amount); emit Deposit(_account, _pid, _amount); if (address(pool.lpToken) == address(pearls)) { _amount = pearls.fragmentToPearls(_amount); } user.amount += _amount; user.rewardDebt = (user.amount * pool.accRewardPerShare) / 1e12; } // Withdraw tokens from pearlsChef. function withdraw(uint256 _pid, uint256 _amount) external { require(_amount > 0, "invalid amount"); PoolInfo storage pool = poolInfo[_pid]; UserInfo storage user = userInfo[_pid][msg.sender]; require(user.lockEndedTimestamp <= block.timestamp, "still locked"); require(user.amount >= _amount, "invalid amount"); updatePool(_pid); queueRewards(_pid, msg.sender); user.amount -= _amount; user.rewardDebt = (user.amount * pool.accRewardPerShare) / 1e12; if (address(pool.lpToken) == address(pearls)) { _amount = pearls.pearlsToFragment(_amount); } pool.lpToken.safeTransfer(address(msg.sender), _amount); emit Withdraw(msg.sender, _pid, _amount); this.claim(_pid, msg.sender); } // Claim pearls from pearlsChef function claim(uint256 _pid, address _account) external needsRebase() nonReentrant returns (uint256) { require( msg.sender == _account || msg.sender == address(this), "not allowed" ); updatePool(_pid); queueRewards(_pid, _account); uint256 pending = userRewards[_pid][_account]; require(pending > 0, "no pending rewards"); 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); pearls.mint(_account, pending); emit RewardPaid(_account, _pid, pending); return pending; } // Compound smol function compoundSmol() external { uint256 rewards = this.claim(1, msg.sender); this.deposit(1, rewards, msg.sender); } // Compound big function compoundBig( uint256 _amountTokenDesired, uint256 _amountTokenMin, uint256 _amountETHMin ) external payable { this.claim(0, msg.sender); IERC20(address(pearls)).safeTransferFrom( msg.sender, address(this), _amountTokenDesired ); IERC20(address(pearls)).approve(address(router), _amountTokenDesired); (uint256 token, , uint256 liq) = router.addLiquidityETH{value: msg.value}( address(pearls), _amountTokenDesired, _amountTokenMin, _amountETHMin, msg.sender, block.timestamp ); this.deposit(0, liq, msg.sender); IERC20(address(pearls)).safeTransfer( msg.sender, _amountTokenDesired - token ); } // 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; } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract IPearlsToken","name":"_pearls","type":"address"},{"internalType":"contract IUniswapV2Router","name":"_router","type":"address"},{"internalType":"uint256","name":"_rewardPerSecond","type":"uint256"},{"internalType":"uint256","name":"_startTime","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"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":"lastRewardTime","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":false,"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":false,"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":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_account","type":"address"}],"name":"claim","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"principal","type":"uint256"},{"internalType":"uint256","name":"ratio","type":"uint256"},{"internalType":"uint256","name":"n","type":"uint256"}],"name":"compound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amountTokenDesired","type":"uint256"},{"internalType":"uint256","name":"_amountTokenMin","type":"uint256"},{"internalType":"uint256","name":"_amountETHMin","type":"uint256"}],"name":"compoundBig","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"compoundRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"compoundRatio_MAX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"compoundSmol","outputs":[],"stateMutability":"nonpayable","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":[],"name":"lastRebaseTimestamp","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":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pearls","outputs":[{"internalType":"contract IPearlsToken","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":"lastRewardTime","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":[{"internalType":"int128","name":"x","type":"int128"},{"internalType":"uint256","name":"n","type":"uint256"}],"name":"pow","outputs":[{"internalType":"int128","name":"r","type":"int128"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"rebaseInterval","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rebaseInterval_MAX","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":"router","outputs":[{"internalType":"contract IUniswapV2Router","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":"_compoundRatio","type":"uint256"}],"name":"setCompoundRatio","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":"uint256","name":"_rebaseInterval","type":"uint256"}],"name":"setRebaseInterval","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTime","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":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"updatePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewardPerSecond","type":"uint256"}],"name":"updateRewardPerSecond","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":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405264e8d4a5100060055564c206898d5560065561025860085560016009556000600e553480156200003357600080fd5b506040516200263438038062002634833981016040819052620000569162000112565b6200006133620000a9565b60018055600280546001600160a01b039586166001600160a01b0319918216179091556003805494909516931692909217909255600491909155600f8190556007556200015f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146200010f57600080fd5b50565b600080600080608085870312156200012957600080fd5b84516200013681620000f9565b60208601519094506200014981620000f9565b6040860151606090960151949790965092505050565b6124c5806200016f6000396000f3fe60806040526004361061017e5760003560e01c8063081e3eda14610183578063126796dd146101a75780631526fe27146101c957806317caf6f1146102135780631eaaa0451461022957806332298be1146102495780634004c8e71461027657806342f83cce14610296578063441a3e70146102a957806351eb05a6146102c9578063538fb492146102e9578063630b5ba1146102fe57806364482f791461031357806370e7406414610333578063715018a61461034957806378e979251461035e578063802c2e951461037457806389edeb741461038a5780638da5cb5b146103a05780638dbdbe6d146103c25780638f10369a146103e257806393f1a40b146103f857806398969e821461044e578063ae581bc21461046e578063b86a2fd7146104a1578063d295ea70146104b7578063d3a6063a146104cd578063ddd5e1b2146104ed578063de3d047c1461050d578063ef037fb91461052d578063f2fde38b1461054d578063f3c85eba1461056d578063f887ea401461058d575b600080fd5b34801561018f57600080fd5b50600a545b6040519081526020015b60405180910390f35b3480156101b357600080fd5b506101c76101c236600461205c565b6105ad565b005b3480156101d557600080fd5b506101e96101e436600461207e565b610606565b604080516001600160a01b039095168552602085019390935291830152606082015260800161019e565b34801561021f57600080fd5b50610194600e5481565b34801561023557600080fd5b506101c76102443660046120ba565b61064a565b34801561025557600080fd5b5061019461026436600461207e565b600d6020526000908152604090205481565b34801561028257600080fd5b506101c761029136600461207e565b6107bf565b6101c76102a43660046120fc565b61080a565b3480156102b557600080fd5b506101c76102c436600461205c565b610a29565b3480156102d557600080fd5b506101c76102e436600461207e565b610c81565b3480156102f557600080fd5b506101c7610e84565b34801561030a57600080fd5b506101c7610f49565b34801561031f57600080fd5b506101c761032e366004612128565b610f74565b34801561033f57600080fd5b5061019460085481565b34801561035557600080fd5b506101c7611035565b34801561036a57600080fd5b50610194600f5481565b34801561038057600080fd5b5061019460055481565b34801561039657600080fd5b5061019460095481565b3480156103ac57600080fd5b506103b5611049565b60405161019e9190612156565b3480156103ce57600080fd5b506101c76103dd36600461216a565b611058565b3480156103ee57600080fd5b5061019460045481565b34801561040457600080fd5b5061043f610413366004612198565b600b60209081526000928352604080842090915290825290208054600182015460029092015490919083565b60405161019e939291906121c8565b34801561045a57600080fd5b50610194610469366004612198565b611255565b34801561047a57600080fd5b5061048e6104893660046121de565b611480565b604051600f9190910b815260200161019e565b3480156104ad57600080fd5b5061019460075481565b3480156104c357600080fd5b5061019460065481565b3480156104d957600080fd5b506002546103b5906001600160a01b031681565b3480156104f957600080fd5b50610194610508366004612198565b6114dc565b34801561051957600080fd5b506101c761052836600461207e565b6117f6565b34801561053957600080fd5b506101c761054836600461207e565b611849565b34801561055957600080fd5b506101c7610568366004612210565b61189f565b34801561057957600080fd5b506101946105883660046120fc565b611918565b34801561059957600080fd5b506003546103b5906001600160a01b031681565b6105b5611958565b6000828152600d6020526040908190208290555182907f6e4fdd86ed4186281f108d19169264f10ab9a86531113410b92c1cfc19971b59906105fa9084815260200190565b60405180910390a25050565b600a818154811061061657600080fd5b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169350919084565b610652611958565b801561066057610660610f49565b6000600f54421161067357600f54610675565b425b905083600e546106859190612243565b600e55604080516080810182526001600160a01b0385811680835260208301888152938301858152600060608501818152600a8054600180820183559382905296517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a8600490980297880180546001600160a01b031916919097161790955595517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a986015590517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2aa85015593517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2ab909301929092555490916107869161225b565b6040518681527f4710feb78e3bce8d2e3ca2989a8eb2f8bcd32a6a55b4535942c180fc4d2e29529060200160405180910390a350505050565b6107c7611958565b6107cf610f49565b60048190556040518181527fde89cb17ac7f58f94792b3e91e086ed85403819c24ceea882491f960ccb1a2789060200160405180910390a150565b604051636eeaf0d960e11b8152309063ddd5e1b290610830906000903390600401612272565b6020604051808303816000875af115801561084f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108739190612289565b5060025461088c906001600160a01b03163330866119b7565b60025460035460405163095ea7b360e01b81526001600160a01b039283169263095ea7b3926108c29291169087906004016122a2565b6020604051808303816000875af11580156108e1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061090591906122bb565b5060035460025460405163f305d71960e01b81526001600160a01b0391821660048201526024810186905260448101859052606481018490523360848201524260a48201526000928392169063f305d71990349060c40160606040518083038185885af115801561097a573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061099f91906122d8565b604051638dbdbe6d60e01b815292945092503091638dbdbe6d91506109cd9060009085903390600401612306565b600060405180830381600087803b1580156109e757600080fd5b505af11580156109fb573d6000803e3d6000fd5b50505050610a22338387610a0f919061225b565b6002546001600160a01b03169190611a28565b5050505050565b60008111610a525760405162461bcd60e51b8152600401610a4990612325565b60405180910390fd5b6000600a8381548110610a6757610a6761234d565b60009182526020808320868452600b825260408085203386529092529220600281015460049092029092019250421015610ad25760405162461bcd60e51b815260206004820152600c60248201526b1cdd1a5b1b081b1bd8dad95960a21b6044820152606401610a49565b8054831115610af35760405162461bcd60e51b8152600401610a4990612325565b610afc84610c81565b610b068433611a47565b82816000016000828254610b1a919061225b565b90915550506003820154815464e8d4a5100091610b3691612363565b610b409190612398565b600182015560025482546001600160a01b03918216911603610bcc576002546040516306912fe760e21b8152600481018590526001600160a01b0390911690631a44bf9c90602401602060405180830381865afa158015610ba5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bc99190612289565b92505b8154610be2906001600160a01b03163385611a28565b604051838152849033907ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689060200160405180910390a3604051636eeaf0d960e11b8152309063ddd5e1b290610c3e9087903390600401612272565b6020604051808303816000875af1158015610c5d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a229190612289565b6000600a8281548110610c9657610c9661234d565b9060005260206000209060040201905080600201544211610cb5575050565b80546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610ce5903090600401612156565b602060405180830381865afa158015610d02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d269190612289565b60025483549192506001600160a01b03908116911603610db457600254604051633af9e66960e01b81526001600160a01b0390911690633af9e66990610d70903090600401612156565b602060405180830381865afa158015610d8d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610db19190612289565b90505b80600003610dc757504260029091015550565b6000600e548360010154600454856002015442610de4919061225b565b610dee9190612363565b610df89190612363565b610e029190612398565b905081610e148264e8d4a51000612363565b610e1e9190612398565b836003016000828254610e319190612243565b90915550504260028401819055600384015460405186927fcb7325664a4a3b7c7223eefc492a97ca4fdf94d46884621e5a8fae5a04b2b9d292610e76928791906121c8565b60405180910390a250505050565b604051636eeaf0d960e11b8152600090309063ddd5e1b290610ead906001903390600401612272565b6020604051808303816000875af1158015610ecc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ef09190612289565b604051638dbdbe6d60e01b81529091503090638dbdbe6d90610f1b9060019085903390600401612306565b600060405180830381600087803b158015610f3557600080fd5b505af1158015610a22573d6000803e3d6000fd5b600a5460005b81811015610f7057610f6081610c81565b610f69816123ac565b9050610f4f565b5050565b610f7c611958565b8015610f8a57610f8a610f49565b81600a8481548110610f9e57610f9e61234d565b906000526020600020906004020160010154600e54610fbd919061225b565b610fc79190612243565b600e8190555081600a8481548110610fe157610fe161234d565b906000526020600020906004020160010181905550827f942cc7e17a17c164bd977f32ab8c54265d5b9d481e4e352bf874f1e568874e7c8360405161102891815260200190565b60405180910390a2505050565b61103d611958565b6110476000611b27565b565b6000546001600160a01b031690565b611060611b77565b336001600160a01b038216148061107657503330145b6110925760405162461bcd60e51b8152600401610a49906123c5565b600082116110b25760405162461bcd60e51b8152600401610a4990612325565b6000600a84815481106110c7576110c761234d565b60009182526020808320878452600b825260408085206001600160a01b03881686528352808520898652600d909352909320546004909202909201925061110e9042612243565b600282015561111c85610c81565b6111268584611a47565b815461113d906001600160a01b03168430876119b7565b84836001600160a01b03167f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a158660405161117991815260200190565b60405180910390a360025482546001600160a01b0391821691160361120857600254604051630c50c9b760e11b8152600481018690526001600160a01b03909116906318a1936e90602401602060405180830381865afa1580156111e1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112059190612289565b93505b8381600001600082825461121c9190612243565b90915550506003820154815464e8d4a510009161123891612363565b6112429190612398565b600191820155805550505050565b505050565b600080600a848154811061126b5761126b61234d565b60009182526020808320878452600b825260408085206001600160a01b038981168752935280852060049485029092016003810154815492516370a0823160e01b815291975092959294929391909116916370a08231916112ce91309101612156565b602060405180830381865afa1580156112eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061130f9190612289565b60025485549192506001600160a01b0390811691160361139d57600254604051633af9e66960e01b81526001600160a01b0390911690633af9e66990611359903090600401612156565b602060405180830381865afa158015611376573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061139a9190612289565b90505b8360020154421180156113af57508015155b15611419576000600e5485600101546004548760020154426113d1919061225b565b6113db9190612363565b6113e59190612363565b6113ef9190612398565b9050816114018264e8d4a51000612363565b61140b9190612398565b6114159084612243565b9250505b6001830154835464e8d4a5100090611432908590612363565b61143c9190612398565b6000898152600c602090815260408083206001600160a01b038c1684529091529020546114699190612243565b611473919061225b565b9450505050505b92915050565b600061148c6001611bd0565b90505b811561147a576114a06002836123ea565b6001036114c5576114b18184611bed565b90506114be60018361225b565b915061148f565b6114cf8384611bed565b92506114be600283612398565b6000600954600754426114ef919061225b565b106115aa576002546006546007546001600160a01b0390921691637af548c1914291670de0b6b3a76400009161152c91839190610588908661225b565b611536919061225b565b6040516001600160e01b031960e085901b16815260048101929092526024820152600060448201526064016020604051808303816000875af1158015611580573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a49190612289565b50426007555b6115b2611b77565b336001600160a01b03831614806115c857503330145b6115e45760405162461bcd60e51b8152600401610a49906123c5565b6115ed83610c81565b6115f78383611a47565b6000838152600c602090815260408083206001600160a01b03861684529091529020548061165c5760405162461bcd60e51b81526020600482015260126024820152716e6f2070656e64696e67207265776172647360701b6044820152606401610a49565b6000848152600b602090815260408083206001600160a01b03871684528252808320878452600d909252909120546116949042612243565b60028201556000858152600c602090815260408083206001600160a01b0388168452909152812055600a805464e8d4a510009190879081106116d8576116d861234d565b6000918252602080832060036004909302019190910154888352600b825260408084206001600160a01b038a1685529092529120546117179190612363565b6117219190612398565b6000868152600b602090815260408083206001600160a01b03808a1685529252918290206001019290925560025490516340c10f1960e01b81529116906340c10f199061177490879086906004016122a2565b600060405180830381600087803b15801561178e57600080fd5b505af11580156117a2573d6000803e3d6000fd5b5050505084846001600160a01b03167fd6f2c8500df5b44f11e9e48b91ff9f1b9d81bc496d55570c2b1b75bf65243f51846040516117e291815260200190565b60405180910390a350905061147a60018055565b6117fe611958565b6005548111156118445760405162461bcd60e51b815260206004820152601160248201527065786365656473206d617820726174696f60781b6044820152606401610a49565b600655565b611851611958565b60085481111561189a5760405162461bcd60e51b8152602060048201526014602482015273195e18d959591cc81b585e081a5b9d195c9d985b60621b6044820152606401610a49565b600955565b6118a7611958565b6001600160a01b03811661190c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a49565b61191581611b27565b50565b600061195061194a61194461192d6001611bd0565b61193f87670de0b6b3a7640000611c2b565b611c65565b84611480565b85611c98565b949350505050565b33611961611049565b6001600160a01b0316146110475760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a49565b6040516001600160a01b0380851660248301528316604482015260648101829052611a229085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611d03565b50505050565b6112508363a9059cbb60e01b84846040516024016119eb9291906122a2565b6000828152600b602090815260408083206001600160a01b03851684528252808320815160608101835281548152600182015493810184905260029091015491810191909152600a80549193929164e8d4a51000919087908110611aad57611aad61234d565b9060005260206000209060040201600301548460000151611ace9190612363565b611ad89190612398565b611ae2919061225b565b90508015611a22576000848152600c602090815260408083206001600160a01b038716845290915281208054839290611b1c908490612243565b909155505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600260015403611bc95760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a49565b6002600155565b600060016001603f1b03821115611be657600080fd5b5060401b90565b6000600f83810b9083900b0260401d60016001607f1b03198112801590611c1b575060016001607f1b038113155b611c2457600080fd5b9392505050565b600081600003611c3a57600080fd5b6000611c468484611dd5565b905060016001607f1b036001600160801b0382161115611c2457600080fd5b6000600f83810b9083900b0160016001607f1b03198112801590611c1b575060016001607f1b03811315611c2457600080fd5b600081600003611caa5750600061147a565b600083600f0b1215611cbb57600080fd5b600f83900b6001600160801b038316810260401c90608084901c026001600160c01b03811115611cea57600080fd5b60401b8119811115611cfb57600080fd5b019392505050565b6000611d58826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611f399092919063ffffffff16565b8051909150156112505780806020019051810190611d7691906122bb565b6112505760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610a49565b600081600003611de457600080fd5b60006001600160c01b038411611e0f5782604085901b81611e0757611e07612382565b049050611f25565b60c084811c600160201b8110611e27576020918201911c5b620100008110611e39576010918201911c5b6101008110611e4a576008918201911c5b60108110611e5a576004918201911c5b60048110611e6a576002918201911c5b60028110611e79576001820191505b60bf820360018603901c6001018260ff0387901b81611e9a57611e9a612382565b0492506001600160801b03831115611eb157600080fd5b608085901c83026001600160801b038616840260c088901c604089901b82811015611edd576001820391505b608084901b92900382811015611ef4576001820391505b829003608084901c8214611f0a57611f0a6123fe565b888181611f1957611f19612382565b04870196505050505050505b6001600160801b03811115611c2457600080fd5b6060611950848460008585600080866001600160a01b03168587604051611f609190612440565b60006040518083038185875af1925050503d8060008114611f9d576040519150601f19603f3d011682016040523d82523d6000602084013e611fa2565b606091505b5091509150611fb387838387611fbe565b979650505050505050565b6060831561202d578251600003612026576001600160a01b0385163b6120265760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a49565b5081611950565b61195083838151156120425781518083602001fd5b8060405162461bcd60e51b8152600401610a49919061245c565b6000806040838503121561206f57600080fd5b50508035926020909101359150565b60006020828403121561209057600080fd5b5035919050565b6001600160a01b038116811461191557600080fd5b801515811461191557600080fd5b6000806000606084860312156120cf57600080fd5b8335925060208401356120e181612097565b915060408401356120f1816120ac565b809150509250925092565b60008060006060848603121561211157600080fd5b505081359360208301359350604090920135919050565b60008060006060848603121561213d57600080fd5b833592506020840135915060408401356120f1816120ac565b6001600160a01b0391909116815260200190565b60008060006060848603121561217f57600080fd5b833592506020840135915060408401356120f181612097565b600080604083850312156121ab57600080fd5b8235915060208301356121bd81612097565b809150509250929050565b9283526020830191909152604082015260600190565b600080604083850312156121f157600080fd5b823580600f0b811461220257600080fd5b946020939093013593505050565b60006020828403121561222257600080fd5b8135611c2481612097565b634e487b7160e01b600052601160045260246000fd5b600082198211156122565761225661222d565b500190565b60008282101561226d5761226d61222d565b500390565b9182526001600160a01b0316602082015260400190565b60006020828403121561229b57600080fd5b5051919050565b6001600160a01b03929092168252602082015260400190565b6000602082840312156122cd57600080fd5b8151611c24816120ac565b6000806000606084860312156122ed57600080fd5b8351925060208401519150604084015190509250925092565b92835260208301919091526001600160a01b0316604082015260600190565b6020808252600e908201526d1a5b9d985b1a5908185b5bdd5b9d60921b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b600081600019048311821515161561237d5761237d61222d565b500290565b634e487b7160e01b600052601260045260246000fd5b6000826123a7576123a7612382565b500490565b6000600182016123be576123be61222d565b5060010190565b6020808252600b908201526a1b9bdd08185b1b1bddd95960aa1b604082015260600190565b6000826123f9576123f9612382565b500690565b634e487b7160e01b600052600160045260246000fd5b60005b8381101561242f578181015183820152602001612417565b83811115611a225750506000910152565b60008251612452818460208701612414565b9190910192915050565b602081526000825180602084015261247b816040850160208701612414565b601f01601f1916919091016040019291505056fea264697066735822122064509b13e7f307a88fd291bb83c8ef66a3179918f7ef6b6b583f12fbd4b4762e64736f6c634300080d0033000000000000000000000000e63e0e297c7e8e8bac32666c137d0b2914acbcb0000000000000000000000000f491e7b69e4244ad4002bc14e878a34207e38c2900000000000000000000000000000000000000000000b077128c188a23b4000000000000000000000000000000000000000000000000000000000000641754f7
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000e63e0e297c7e8e8bac32666c137d0b2914acbcb0000000000000000000000000f491e7b69e4244ad4002bc14e878a34207e38c2900000000000000000000000000000000000000000000b077128c188a23b4000000000000000000000000000000000000000000000000000000000000641754f7
-----Decoded View---------------
Arg [0] : _pearls (address): 0xe63e0e297c7e8e8bac32666c137d0b2914acbcb0
Arg [1] : _router (address): 0xf491e7b69e4244ad4002bc14e878a34207e38c29
Arg [2] : _rewardPerSecond (uint256): 833333000000000000000000
Arg [3] : _startTime (uint256): 1679250679
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000e63e0e297c7e8e8bac32666c137d0b2914acbcb0
Arg [1] : 000000000000000000000000f491e7b69e4244ad4002bc14e878a34207e38c29
Arg [2] : 00000000000000000000000000000000000000000000b077128c188a23b40000
Arg [3] : 00000000000000000000000000000000000000000000000000000000641754f7
Deployed ByteCode Sourcemap
81644:13422:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;86552:95;;;;;;;;;;-1:-1:-1;86624:8:0;:15;86552:95;;;160:25:1;;;148:2;133:18;86552:95:0;;;;;;;;86655:213;;;;;;;;;;-1:-1:-1;86655:213:0;;;;;:::i;:::-;;:::i;:::-;;83348:26;;;;;;;;;;-1:-1:-1;83348:26:0;;;;;:::i;:::-;;:::i;:::-;;;;-1:-1:-1;;;;;898:32:1;;;880:51;;962:2;947:18;;940:34;;;;990:18;;;983:34;1048:2;1033:18;;1026:34;867:3;852:19;83348:26:0;634:432:1;83765:34:0;;;;;;;;;;;;;;;;87254:696;;;;;;;;;;-1:-1:-1;87254:696:0;;;;;:::i;:::-;;:::i;83622:48::-;;;;;;;;;;-1:-1:-1;83622:48:0;;;;;:::i;:::-;;;;;;;;;;;;;;86876:209;;;;;;;;;;-1:-1:-1;86876:209:0;;;;;:::i;:::-;;:::i;93793:862::-;;;;;;:::i;:::-;;:::i;91795:829::-;;;;;;;;;;-1:-1:-1;91795:829:0;;;;;:::i;:::-;;:::i;89834:928::-;;;;;;;;;;-1:-1:-1;89834:928:0;;;;;:::i;:::-;;:::i;93622:142::-;;;;;;;;;;;;;:::i;89578:180::-;;;;;;;;;;;;;:::i;88048:418::-;;;;;;;;;;-1:-1:-1;88048:418:0;;;;;:::i;:::-;;:::i;83199:39::-;;;;;;;;;;;;;;;;37569:103;;;;;;;;;;;;;:::i;83856:24::-;;;;;;;;;;;;;;;;83062:39;;;;;;;;;;;;;;;;83256:33;;;;;;;;;;;;;;;;36921:87;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;90830:916::-;;;;;;;;;;-1:-1:-1;90830:916:0;;;;;:::i;:::-;;:::i;82950:30::-;;;;;;;;;;;;;;;;83408:64;;;;;;;;;;-1:-1:-1;83408:64:0;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;88531:964::-;;;;;;;;;;-1:-1:-1;88531:964:0;;;;;:::i;:::-;;:::i;85342:359::-;;;;;;;;;;-1:-1:-1;85342:359:0;;;;;:::i;:::-;;:::i;:::-;;;4296:2:1;4285:22;;;;4267:41;;4255:2;4240:18;85342:359:0;4123:191:1;83158:34:0;;;;;;;;;;;;;;;;83108:43;;;;;;;;;;;;;;;;82813:26;;;;;;;;;;-1:-1:-1;82813:26:0;;;;-1:-1:-1;;;;;82813:26:0;;;92669:923;;;;;;;;;;-1:-1:-1;92669:923:0;;;;;:::i;:::-;;:::i;85142:192::-;;;;;;;;;;-1:-1:-1;85142:192:0;;;;;:::i;:::-;;:::i;84933:201::-;;;;;;;;;;-1:-1:-1;84933:201:0;;;;;:::i;:::-;;:::i;37827:238::-;;;;;;;;;;-1:-1:-1;37827:238:0;;;;;:::i;:::-;;:::i;85709:467::-;;;;;;;;;;-1:-1:-1;85709:467:0;;;;;:::i;:::-;;:::i;82872:30::-;;;;;;;;;;-1:-1:-1;82872:30:0;;;;-1:-1:-1;;;;;82872:30:0;;;86655:213;36807:13;:11;:13::i;:::-;86770:19:::1;::::0;;;:13:::1;:19;::::0;;;;;;:35;;;86821:39;86784:4;;86821:39:::1;::::0;::::1;::::0;86792:13;160:25:1;;148:2;133:18;;14:177;86821:39:0::1;;;;;;;;86655:213:::0;;:::o;83348:26::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;83348:26:0;;;;-1:-1:-1;83348:26:0;;;:::o;87254:696::-;36807:13;:11;:13::i;:::-;87391:11:::1;87387:61;;;87419:17;:15;:17::i;:::-;87458:22;87501:9;;87483:15;:27;:83;;87557:9;;87483:83;;;87526:15;87483:83;87458:108;;87613:11;87595:15;;:29;;;;:::i;:::-;87577:15;:47:::0;87663:191:::1;::::0;;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;87663:191:0;;::::1;::::0;;;::::1;::::0;::::1;::::0;;;;;;;;;-1:-1:-1;87663:191:0;;;;;;87635:8:::1;:230:::0;;::::1;::::0;;::::1;::::0;;;;;;;;;-1:-1:-1;87635:230:0;;::::1;::::0;;::::1;::::0;;-1:-1:-1;;;;;;87635:230:0::1;::::0;;;::::1;;::::0;;;;;;;;;;;;;;;;;;;;;;;;;87899:15;87663:191;;87899:19:::1;::::0;::::1;:::i;:::-;87883:59;::::0;160:25:1;;;87883:59:0::1;::::0;148:2:1;133:18;87883:59:0::1;;;;;;;87376:574;87254:696:::0;;;:::o;86876:209::-;36807:13;:11;:13::i;:::-;86963:17:::1;:15;:17::i;:::-;86991:15;:34:::0;;;87041:36:::1;::::0;160:25:1;;;87041:36:0::1;::::0;148:2:1;133:18;87041:36:0::1;;;;;;;86876:209:::0;:::o;93793:862::-;93953:25;;-1:-1:-1;;;93953:25:0;;:4;;:10;;:25;;93964:1;;93967:10;;93953:25;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;94004:6:0;;93989:138;;-1:-1:-1;;;;;94004:6:0;94044:10;94077:4;94097:19;93989:40;:138::i;:::-;94153:6;;94178;;94138:69;;-1:-1:-1;;;94138:69:0;;-1:-1:-1;;;;;94153:6:0;;;;94138:31;;:69;;94178:6;;;94187:19;;94138:69;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;94251:6:0;;94314;;94251:228;;-1:-1:-1;;;94251:228:0;;-1:-1:-1;;;;;94314:6:0;;;94251:228;;;6766:34:1;6816:18;;;6809:34;;;6859:18;;;6852:34;;;6902:18;;;6895:34;;;94428:10:0;6945:19:1;;;6938:44;94453:15:0;6998:19:1;;;6991:35;94219:13:0;;;;94251:6;;:22;;94281:9;;6700:19:1;;94251:228:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;94490:32;;-1:-1:-1;;;94490:32:0;;94218:261;;-1:-1:-1;94218:261:0;-1:-1:-1;94490:4:0;;:12;;-1:-1:-1;94490:32:0;;94503:1;;94218:261;;94511:10;;94490:32;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;94533:114;94584:10;94631:5;94609:19;:27;;;;:::i;:::-;94548:6;;-1:-1:-1;;;;;94548:6:0;;94533:114;:36;:114::i;:::-;93942:713;;93793:862;;;:::o;91795:829::-;91882:1;91872:7;:11;91864:38;;;;-1:-1:-1;;;91864:38:0;;;;;;;:::i;:::-;;;;;;;;;91915:21;91939:8;91948:4;91939:14;;;;;;;;:::i;:::-;;;;;;;;;91988;;;:8;:14;;;;;;92003:10;91988:26;;;;;;;92033:23;;;;91939:14;;;;;;;;-1:-1:-1;92060:15:0;-1:-1:-1;92033:42:0;92025:67;;;;-1:-1:-1;;;92025:67:0;;8383:2:1;92025:67:0;;;8365:21:1;8422:2;8402:18;;;8395:30;-1:-1:-1;;;8441:18:1;;;8434:42;8493:18;;92025:67:0;8181:336:1;92025:67:0;92111:11;;:22;-1:-1:-1;92111:22:0;92103:49;;;;-1:-1:-1;;;92103:49:0;;;;;;;:::i;:::-;92165:16;92176:4;92165:10;:16::i;:::-;92192:30;92205:4;92211:10;92192:12;:30::i;:::-;92250:7;92235:4;:11;;;:22;;;;;;;:::i;:::-;;;;-1:-1:-1;;92301:22:0;;;;92287:11;;92327:4;;92287:36;;;:::i;:::-;92286:45;;;;:::i;:::-;92268:15;;;:63;92379:6;;92354:12;;-1:-1:-1;;;;;92379:6:0;;;92354:12;;92346:40;92342:115;;92413:6;;:32;;-1:-1:-1;;;92413:32:0;;;;;160:25:1;;;-1:-1:-1;;;;;92413:6:0;;;;:23;;133:18:1;;92413:32:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;92403:42;;92342:115;92467:12;;:55;;-1:-1:-1;;;;;92467:12:0;92501:10;92514:7;92467:25;:55::i;:::-;92540:35;;160:25:1;;;92561:4:0;;92549:10;;92540:35;;148:2:1;133:18;92540:35:0;;;;;;;92588:28;;-1:-1:-1;;;92588:28:0;;:4;;:10;;:28;;92599:4;;92605:10;;92588:28;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;89834:928::-;89886:21;89910:8;89919:4;89910:14;;;;;;;;:::i;:::-;;;;;;;;;;;89886:38;;89958:4;:19;;;89939:15;:38;89935:77;;89994:7;89834:928;:::o;89935:77::-;90041:12;;:37;;-1:-1:-1;;;90041:37:0;;90022:16;;-1:-1:-1;;;;;90041:12:0;;:22;;:37;;90072:4;;90041:37;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;90126:6;;90101:12;;90022:56;;-1:-1:-1;;;;;;90126:6:0;;;90101:12;;90093:40;90089:125;;90161:6;;:41;;-1:-1:-1;;;90161:41:0;;-1:-1:-1;;;;;90161:6:0;;;;:26;;:41;;90196:4;;90161:41;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;90150:52;;90089:125;90228:8;90240:1;90228:13;90224:104;;-1:-1:-1;90280:15:0;90258:19;;;;:37;-1:-1:-1;89834:928:0:o;90224:104::-;90338:20;90467:15;;90448:4;:15;;;90417;;90381:4;:19;;;90363:15;:37;;;;:::i;:::-;90362:70;;;;:::i;:::-;:101;;;;:::i;:::-;90361:121;;;;:::i;:::-;90338:144;-1:-1:-1;90543:8:0;90520:19;90338:144;90535:4;90520:19;:::i;:::-;90519:32;;;;:::i;:::-;90493:4;:22;;;:58;;;;;;;:::i;:::-;;;;-1:-1:-1;;90584:15:0;90562:19;;;:37;;;90721:22;;;;90617:137;;90645:4;;90617:137;;;;90698:8;;90721:22;90617:137;:::i;:::-;;;;;;;;89875:887;;;89834:928;:::o;93622:142::-;93684:25;;-1:-1:-1;;;93684:25:0;;93666:15;;93684:4;;:10;;:25;;93695:1;;93698:10;;93684:25;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;93720:36;;-1:-1:-1;;;93720:36:0;;93666:43;;-1:-1:-1;93720:4:0;;:12;;:36;;93733:1;;93666:43;;93745:10;;93720:36;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;89578:180;89640:8;:15;89623:14;89666:85;89694:6;89688:3;:12;89666:85;;;89724:15;89735:3;89724:10;:15::i;:::-;89702:5;;;:::i;:::-;;;89666:85;;;;89612:146;89578:180::o;88048:418::-;36807:13;:11;:13::i;:::-;88182:11:::1;88178:61;;;88210:17;:15;:17::i;:::-;88352:11;88311:8;88320:4;88311:14;;;;;;;;:::i;:::-;;;;;;;;;;;:25;;;88280:15;;:56;;;;:::i;:::-;:83;;;;:::i;:::-;88249:15;:114;;;;88402:11;88374:8;88383:4;88374:14;;;;;;;;:::i;:::-;;;;;;;;;;;:25;;:39;;;;88440:4;88429:29;88446:11;88429:29;;;;160:25:1::0;;148:2;133:18;;14:177;88429:29:0::1;;;;;;;;88048:418:::0;;;:::o;37569:103::-;36807:13;:11;:13::i;:::-;37634:30:::1;37661:1;37634:18;:30::i;:::-;37569:103::o:0;36921:87::-;36967:7;36994:6;-1:-1:-1;;;;;36994:6:0;;36921:87::o;90830:916::-;34064:21;:19;:21::i;:::-;90985:10:::1;-1:-1:-1::0;;;;;90985:22:0;::::1;;::::0;:53:::1;;-1:-1:-1::0;91011:10:0::1;91033:4;91011:27;90985:53;90963:114;;;;-1:-1:-1::0;;;90963:114:0::1;;;;;;;:::i;:::-;91106:1;91096:7;:11;91088:38;;;;-1:-1:-1::0;;;91088:38:0::1;;;;;;;:::i;:::-;91139:21;91163:8;91172:4;91163:14;;;;;;;;:::i;:::-;;::::0;;;::::1;::::0;;;91212;;;:8:::1;:14:::0;;;;;;-1:-1:-1;;;;;91212:24:0;::::1;::::0;;;;;;;91291:19;;;:13:::1;:19:::0;;;;;;;91163:14:::1;::::0;;::::1;::::0;;::::1;::::0;-1:-1:-1;91273:37:0::1;::::0;:15:::1;:37;:::i;:::-;91247:23;::::0;::::1;:63:::0;91321:16:::1;91332:4:::0;91321:10:::1;:16::i;:::-;91348:28;91361:4;91367:8;91348:12;:28::i;:::-;91389:12:::0;;:63:::1;::::0;-1:-1:-1;;;;;91389:12:0::1;91419:8:::0;91437:4:::1;91444:7:::0;91389:29:::1;:63::i;:::-;91488:4;91478:8;-1:-1:-1::0;;;;;91470:32:0::1;;91494:7;91470:32;;;;160:25:1::0;;148:2;133:18;;14:177;91470:32:0::1;;;;;;;;91552:6;::::0;91527:12;;-1:-1:-1;;;;;91552:6:0;;::::1;91527:12:::0;::::1;91519:40:::0;91515:115:::1;;91586:6;::::0;:32:::1;::::0;-1:-1:-1;;;91586:32:0;;::::1;::::0;::::1;160:25:1::0;;;-1:-1:-1;;;;;91586:6:0;;::::1;::::0;:23:::1;::::0;133:18:1;;91586:32:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;91576:42;;91515:115;91657:7;91642:4;:11;;;:22;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;91708:22:0::1;::::0;::::1;::::0;91694:11;;91734:4:::1;::::0;91694:36:::1;::::0;::::1;:::i;:::-;91693:45;;;;:::i;:::-;91675:15;::::0;;::::1;:63:::0;34624:22;;-1:-1:-1;90830:916:0;;;:::o;34108:20::-;90830:916;;;:::o;88531:964::-;88633:7;88658:21;88682:8;88691:4;88682:14;;;;;;;;:::i;:::-;;;;;;;;;88731;;;:8;:14;;;;;;-1:-1:-1;;;;;88731:21:0;;;;;;;;;;88682:14;;;;;;;88791:22;;;;88843:12;;:37;;-1:-1:-1;;;88843:37:0;;88682:14;;-1:-1:-1;88731:21:0;;88791:22;;88682:14;;88843:12;;;;;:22;;:37;;88874:4;;88843:37;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;88928:6;;88903:12;;88824:56;;-1:-1:-1;;;;;;88928:6:0;;;88903:12;;88895:40;88891:125;;88963:6;;:41;;-1:-1:-1;;;88963:41:0;;-1:-1:-1;;;;;88963:6:0;;;;:26;;:41;;88998:4;;88963:41;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;88952:52;;88891:125;89048:4;:19;;;89030:15;:37;:54;;;;-1:-1:-1;89071:13:0;;;89030:54;89026:307;;;89101:20;89238:15;;89219:4;:15;;;89184;;89144:4;:19;;;89126:15;:37;;;;:::i;:::-;89125:74;;;;:::i;:::-;:109;;;;:::i;:::-;89124:129;;;;:::i;:::-;89101:152;-1:-1:-1;89313:8:0;89290:19;89101:152;89305:4;89290:19;:::i;:::-;89289:32;;;;:::i;:::-;89268:53;;;;:::i;:::-;;;89086:247;89026:307;89472:15;;;;89404:11;;89452:4;;89404:31;;89418:17;;89404:31;:::i;:::-;89403:53;;;;:::i;:::-;89363:17;;;;:11;:17;;;;;;;;-1:-1:-1;;;;;89363:24:0;;;;;;;;;;:93;;;;:::i;:::-;:124;;;;:::i;:::-;89343:144;;;;;;88531:964;;;;;:::o;85342:359::-;85397:8;85422:25;85445:1;85422:22;:25::i;:::-;85418:29;;85458:236;85465:5;;85458:236;;85491:5;85495:1;85491;:5;:::i;:::-;85500:1;85491:10;85487:196;;85526:23;85544:1;85547;85526:17;:23::i;:::-;85522:27;-1:-1:-1;85568:6:0;85573:1;85568:6;;:::i;:::-;;;85458:236;;85487:196;85619:23;85637:1;85640;85619:17;:23::i;:::-;85615:27;-1:-1:-1;85661:6:0;85666:1;85661:6;;:::i;92669:923::-;92797:7;84697:14;;84674:19;;84656:15;:37;;;;:::i;:::-;:55;84652:254;;84728:6;;84774:13;;84807:19;;-1:-1:-1;;;;;84728:6:0;;;;:13;;84742:15;;84830:4;;84759:68;;84830:4;;84774:13;84789:37;;84742:15;84789:37;:::i;84759:68::-;:75;;;;:::i;:::-;84728:114;;-1:-1:-1;;;;;;84728:114:0;;;;;;;;;;10669:25:1;;;;10710:18;;;10703:34;84836:5:0;10753:18:1;;;10746:50;10642:18;;84728:114:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;84879:15:0;84857:19;:37;84652:254;34064:21:::1;:19;:21::i;:::-;92844:10:::2;-1:-1:-1::0;;;;;92844:22:0;::::2;;::::0;:53:::2;;-1:-1:-1::0;92870:10:0::2;92892:4;92870:27;92844:53;92822:114;;;;-1:-1:-1::0;;;92822:114:0::2;;;;;;;:::i;:::-;92947:16;92958:4;92947:10;:16::i;:::-;92974:28;92987:4;92993:8;92974:12;:28::i;:::-;93015:15;93033:17:::0;;;:11:::2;:17;::::0;;;;;;;-1:-1:-1;;;;;93033:27:0;::::2;::::0;;;;;;;;93079:11;93071:42:::2;;;::::0;-1:-1:-1;;;93071:42:0;;11009:2:1;93071:42:0::2;::::0;::::2;10991:21:1::0;11048:2;11028:18;;;11021:30;-1:-1:-1;;;11067:18:1;;;11060:48;11125:18;;93071:42:0::2;10807:342:1::0;93071:42:0::2;93126:21;93150:14:::0;;;:8:::2;:14;::::0;;;;;;;-1:-1:-1;;;;;93150:24:0;::::2;::::0;;;;;;;93229:19;;;:13:::2;:19:::0;;;;;;;93211:37:::2;::::0;:15:::2;:37;:::i;:::-;93185:23;::::0;::::2;:63:::0;93291:1:::2;93261:17:::0;;;:11:::2;:17;::::0;;;;;;;-1:-1:-1;;;;;93261:27:0;::::2;::::0;;;;;;;:31;93406:8:::2;:14:::0;;93456:4:::2;::::0;93406:8;93273:4;;93406:14;::::2;;;;;:::i;:::-;;::::0;;;::::2;::::0;;;:32:::2;:14;::::0;;::::2;;:32:::0;;;::::2;::::0;93355:14;;;:8:::2;:14:::0;;;;;;-1:-1:-1;;;;;93355:24:0;::::2;::::0;;;;;;;:31;:83:::2;::::0;93406:32;93355:83:::2;:::i;:::-;93354:107;;;;:::i;:::-;93303:14;::::0;;;:8:::2;:14;::::0;;;;;;;-1:-1:-1;;;;;93303:24:0;;::::2;::::0;;;;;;;;:35:::2;;:158:::0;;;;93474:6:::2;::::0;:30;;-1:-1:-1;;;93474:30:0;;:6;::::2;::::0;:11:::2;::::0;:30:::2;::::0;93318:8;;93496:7;;93474:30:::2;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::2;;;;;;;;;;;;::::0;::::2;;;;;;;;;93543:4;93533:8;-1:-1:-1::0;;;;;93522:35:0::2;;93549:7;93522:35;;;;160:25:1::0;;148:2;133:18;;14:177;93522:35:0::2;;;;;;;;-1:-1:-1::0;93577:7:0;-1:-1:-1;34108:20:0::1;33502:1:::0;34624:22;;34441:213;85142:192;36807:13;:11;:13::i;:::-;85246:17:::1;;85228:14;:35;;85220:65;;;::::0;-1:-1:-1;;;85220:65:0;;11356:2:1;85220:65:0::1;::::0;::::1;11338:21:1::0;11395:2;11375:18;;;11368:30;-1:-1:-1;;;11414:18:1;;;11407:47;11471:18;;85220:65:0::1;11154:341:1::0;85220:65:0::1;85296:13;:30:::0;85142:192::o;84933:201::-;36807:13;:11;:13::i;:::-;85040:18:::1;;85021:15;:37;;85013:70;;;::::0;-1:-1:-1;;;85013:70:0;;11702:2:1;85013:70:0::1;::::0;::::1;11684:21:1::0;11741:2;11721:18;;;11714:30;-1:-1:-1;;;11760:18:1;;;11753:50;11820:18;;85013:70:0::1;11500:344:1::0;85013:70:0::1;85094:14;:32:::0;84933:201::o;37827:238::-;36807:13;:11;:13::i;:::-;-1:-1:-1;;;;;37930:22:0;::::1;37908:110;;;::::0;-1:-1:-1;;;37908:110:0;;12051:2:1;37908:110:0::1;::::0;::::1;12033:21:1::0;12090:2;12070:18;;;12063:30;12129:34;12109:18;;;12102:62;-1:-1:-1;;;12180:18:1;;;12173:36;12226:19;;37908:110:0::1;11849:402:1::0;37908:110:0::1;38029:28;38048:8;38029:18;:28::i;:::-;37827:238:::0;:::o;85709:467::-;85827:7;85867:301;85904:221;85930:152;85974:25;85997:1;85974:22;:25::i;:::-;86026:33;86045:5;86052:6;86026:18;:33::i;:::-;85930:17;:152::i;:::-;86105:1;85904:3;:221::i;:::-;86144:9;85867:18;:301::i;:::-;85847:321;85709:467;-1:-1:-1;;;;85709:467:0:o;37086:132::-;35478:10;37150:7;:5;:7::i;:::-;-1:-1:-1;;;;;37150:23:0;;37142:68;;;;-1:-1:-1;;;37142:68:0;;12458:2:1;37142:68:0;;;12440:21:1;;;12477:18;;;12470:30;12536:34;12516:18;;;12509:62;12588:18;;37142:68:0;12256:356:1;76368:285:0;76566:68;;-1:-1:-1;;;;;12875:15:1;;;76566:68:0;;;12857:34:1;12927:15;;12907:18;;;12900:43;12959:18;;;12952:34;;;76512:133:0;;76546:5;;-1:-1:-1;;;76589:27:0;12792:18:1;;76566:68:0;;;;-1:-1:-1;;76566:68:0;;;;;;;;;;;;;;-1:-1:-1;;;;;76566:68:0;-1:-1:-1;;;;;;76566:68:0;;;;;;;;;;76512:19;:133::i;:::-;76368:285;;;;:::o;76112:248::-;76229:123;76263:5;76306:23;;;76331:2;76335:5;76283:58;;;;;;;;;:::i;94712:351::-;94786:20;94809:14;;;:8;:14;;;;;;;;-1:-1:-1;;;;;94809:24:0;;;;;;;;;94786:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;94877:8;:14;;94786:47;;:20;:47;94927:4;;94877:8;94818:4;;94877:14;;;;;;:::i;:::-;;;;;;;;;;;:32;;;94863:4;:11;;;:46;;;;:::i;:::-;94862:70;;;;:::i;:::-;:101;;;;:::i;:::-;94844:119;-1:-1:-1;94978:11:0;;94974:82;;95006:17;;;;:11;:17;;;;;;;;-1:-1:-1;;;;;95006:27:0;;;;;;;;;:38;;95037:7;;95006:17;:38;;95037:7;;95006:38;:::i;:::-;;;;-1:-1:-1;;94775:288:0;;94712:351;;:::o;38225:191::-;38299:16;38318:6;;-1:-1:-1;;;;;38335:17:0;;;-1:-1:-1;;;;;;38335:17:0;;;;;;38368:40;;38318:6;;;;;;;38368:40;;38299:16;38368:40;38288:128;38225:191;:::o;34144:289::-;33546:1;34274:7;;:19;34266:63;;;;-1:-1:-1;;;34266:63:0;;13199:2:1;34266:63:0;;;13181:21:1;13238:2;13218:18;;;13211:30;13277:33;13257:18;;;13250:61;13328:18;;34266:63:0;12997:355:1;34266:63:0;33546:1;34407:7;:18;34144:289::o;2256:192::-;2308:6;-1:-1:-1;;;;;2360:1:0;:23;;2352:32;;;;;;-1:-1:-1;2425:2:0;2420:7;;2256:192::o;5004:258::-;5060:6;5121:13;:9;;;:13;;;;;5139:2;5120:21;-1:-1:-1;;;;;;5164:19:0;;;;;:42;;-1:-1:-1;;;;;;5187:19:0;;;5164:42;5156:51;;;;;;5236:6;5004:258;-1:-1:-1;;;5004:258:0:o;10214:268::-;10273:6;10325:1;10330;10325:6;10317:15;;;;;;10347:14;10364:11;10370:1;10373;10364:5;:11::i;:::-;10347:28;-1:-1:-1;;;;;;;;;;;10398:28:0;;;;10390:37;;;;;4014:250;4070:6;4130:13;:9;;;:13;;;;;-1:-1:-1;;;;;;4166:19:0;;;;;:42;;-1:-1:-1;;;;;;4189:19:0;;;4158:51;;;;;7373:665;7431:7;7480:1;7485;7480:6;7476:20;;-1:-1:-1;7495:1:0;7488:8;;7476:20;7526:1;7521;:6;;;;7513:15;;;;;;7567:9;;;;-1:-1:-1;;;;;7598:38:0;;7559:78;;7642:2;7558:86;;7699:3;7694:8;;;7672:31;-1:-1:-1;;;;;7728:56:0;;;7720:65;;;;;;7807:2;7800:9;7879:96;;7852:123;;;7826:164;;;;;;8012:7;;7373:665;-1:-1:-1;;;7373:665:0:o;79610:802::-;80034:23;80060:106;80102:4;80060:106;;;;;;;;;;;;;;;;;80068:5;-1:-1:-1;;;;;80060:27:0;;;:106;;;;;:::i;:::-;80181:17;;80034:132;;-1:-1:-1;80181:21:0;80177:228;;80296:10;80285:30;;;;;;;;;;;;:::i;:::-;80259:134;;;;-1:-1:-1;;;80259:134:0;;13559:2:1;80259:134:0;;;13541:21:1;13598:2;13578:18;;;13571:30;13637:34;13617:18;;;13610:62;-1:-1:-1;;;13688:18:1;;;13681:40;13738:19;;80259:134:0;13357:406:1;28123:1861:0;28182:7;28235:1;28240;28235:6;28227:15;;;;;;28259:14;-1:-1:-1;;;;;28294:1:0;:55;28290:1569;;28389:1;28383:2;28378:1;:7;;28377:13;;;;;:::i;:::-;;28368:22;;28290:1569;;;28443:3;28478:8;;;-1:-1:-1;;;28509:17:0;;28505:107;;28558:2;28583:9;;;;28551;28505:107;28640:7;28634:2;:13;28630:103;;28679:2;28704:9;;;;28672;28630:103;28761:5;28755:2;:11;28751:99;;28798:1;28822:8;;;;28791;28751:99;28878:4;28872:2;:10;28868:98;;28914:1;28938:8;;;;28907;28868:98;28994:3;28988:2;:9;28984:97;;29029:1;29053:8;;;;29022;28984:97;29109:3;29103:2;:9;29099:23;;29121:1;29114:8;;;;29099:23;29224:3;29218;:9;29211:1;29207;:5;29206:22;;29232:1;29205:28;29196:3;29190;:9;29184:1;:16;;29183:51;;;;;:::i;:::-;;29174:60;;-1:-1:-1;;;;;29261:6:0;:44;;29253:53;;;;;;29355:3;29350:8;;;29340:19;;-1:-1:-1;;;;;29401:38:0;;29391:49;;29479:3;29474:8;;;29519:2;29514:7;;;29546;;;29542:20;;;29561:1;29555:7;;;;29542:20;29656:3;29650:9;;;;29581:8;;29682:7;;;29678:20;;;29697:1;29691:7;;;;29678:20;29717:8;;;29802:3;29796:9;;;29790:15;;29783:23;;;;:::i;:::-;29842:1;29837:2;:6;;;;;:::i;:::-;;29827:16;;;;28410:1449;;;;;;28290:1569;-1:-1:-1;;;;;29883:6:0;:44;;29875:53;;;;;63827:229;63964:12;63996:52;64018:6;64026:4;64032:1;64035:12;63964;65368;65382:23;65409:6;-1:-1:-1;;;;;65409:11:0;65428:5;65449:4;65409:55;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;65367:97;;;;65495:152;65540:6;65565:7;65591:10;65620:12;65495:26;:152::i;:::-;65475:172;65043:612;-1:-1:-1;;;;;;;65043:612:0:o;68178:644::-;68363:12;68392:7;68388:427;;;68420:10;:17;68441:1;68420:22;68416:290;;-1:-1:-1;;;;;61172:19:0;;;68630:60;;;;-1:-1:-1;;;68630:60:0;;15051:2:1;68630:60:0;;;15033:21:1;15090:2;15070:18;;;15063:30;15129:31;15109:18;;;15102:59;15178:18;;68630:60:0;14849:353:1;68630:60:0;-1:-1:-1;68727:10:0;68720:17;;68388:427;68770:33;68778:10;68790:12;69548:17;;:21;69544:388;;69780:10;69774:17;69837:15;69824:10;69820:2;69816:19;69809:44;69544:388;69907:12;69900:20;;-1:-1:-1;;;69900:20:0;;;;;;;;:::i;196:248:1:-;264:6;272;325:2;313:9;304:7;300:23;296:32;293:52;;;341:1;338;331:12;293:52;-1:-1:-1;;364:23:1;;;434:2;419:18;;;406:32;;-1:-1:-1;196:248:1:o;449:180::-;508:6;561:2;549:9;540:7;536:23;532:32;529:52;;;577:1;574;567:12;529:52;-1:-1:-1;600:23:1;;449:180;-1:-1:-1;449:180:1:o;1071:139::-;-1:-1:-1;;;;;1154:31:1;;1144:42;;1134:70;;1200:1;1197;1190:12;1215:118;1301:5;1294:13;1287:21;1280:5;1277:32;1267:60;;1323:1;1320;1313:12;1338:473;1427:6;1435;1443;1496:2;1484:9;1475:7;1471:23;1467:32;1464:52;;;1512:1;1509;1502:12;1464:52;1548:9;1535:23;1525:33;;1608:2;1597:9;1593:18;1580:32;1621:39;1654:5;1621:39;:::i;:::-;1679:5;-1:-1:-1;1736:2:1;1721:18;;1708:32;1749:30;1708:32;1749:30;:::i;:::-;1798:7;1788:17;;;1338:473;;;;;:::o;1816:316::-;1893:6;1901;1909;1962:2;1950:9;1941:7;1937:23;1933:32;1930:52;;;1978:1;1975;1968:12;1930:52;-1:-1:-1;;2001:23:1;;;2071:2;2056:18;;2043:32;;-1:-1:-1;2122:2:1;2107:18;;;2094:32;;1816:316;-1:-1:-1;1816:316:1:o;2137:377::-;2211:6;2219;2227;2280:2;2268:9;2259:7;2255:23;2251:32;2248:52;;;2296:1;2293;2286:12;2248:52;2332:9;2319:23;2309:33;;2389:2;2378:9;2374:18;2361:32;2351:42;;2443:2;2432:9;2428:18;2415:32;2456:28;2478:5;2456:28;:::i;2519:203::-;-1:-1:-1;;;;;2683:32:1;;;;2665:51;;2653:2;2638:18;;2519:203::o;2727:391::-;2804:6;2812;2820;2873:2;2861:9;2852:7;2848:23;2844:32;2841:52;;;2889:1;2886;2879:12;2841:52;2925:9;2912:23;2902:33;;2982:2;2971:9;2967:18;2954:32;2944:42;;3036:2;3025:9;3021:18;3008:32;3049:39;3082:5;3049:39;:::i;3123:323::-;3191:6;3199;3252:2;3240:9;3231:7;3227:23;3223:32;3220:52;;;3268:1;3265;3258:12;3220:52;3304:9;3291:23;3281:33;;3364:2;3353:9;3349:18;3336:32;3377:39;3410:5;3377:39;:::i;:::-;3435:5;3425:15;;;3123:323;;;;;:::o;3451:319::-;3653:25;;;3709:2;3694:18;;3687:34;;;;3752:2;3737:18;;3730:34;3641:2;3626:18;;3451:319::o;3775:343::-;3842:6;3850;3903:2;3891:9;3882:7;3878:23;3874:32;3871:52;;;3919:1;3916;3909:12;3871:52;3958:9;3945:23;4012:5;4008:2;3997:21;3990:5;3987:32;3977:60;;4033:1;4030;4023:12;3977:60;4056:5;4108:2;4093:18;;;;4080:32;;-1:-1:-1;;;3775:343:1:o;4548:255::-;4607:6;4660:2;4648:9;4639:7;4635:23;4631:32;4628:52;;;4676:1;4673;4666:12;4628:52;4715:9;4702:23;4734:39;4767:5;4734:39;:::i;5041:127::-;5102:10;5097:3;5093:20;5090:1;5083:31;5133:4;5130:1;5123:15;5157:4;5154:1;5147:15;5173:128;5213:3;5244:1;5240:6;5237:1;5234:13;5231:39;;;5250:18;;:::i;:::-;-1:-1:-1;5286:9:1;;5173:128::o;5306:125::-;5346:4;5374:1;5371;5368:8;5365:34;;;5379:18;;:::i;:::-;-1:-1:-1;5416:9:1;;5306:125::o;5436:282::-;5618:25;;;-1:-1:-1;;;;;5679:32:1;5674:2;5659:18;;5652:60;5606:2;5591:18;;5436:282::o;5723:184::-;5793:6;5846:2;5834:9;5825:7;5821:23;5817:32;5814:52;;;5862:1;5859;5852:12;5814:52;-1:-1:-1;5885:16:1;;5723:184;-1:-1:-1;5723:184:1:o;5912:274::-;-1:-1:-1;;;;;6104:32:1;;;;6086:51;;6168:2;6153:18;;6146:34;6074:2;6059:18;;5912:274::o;6191:245::-;6258:6;6311:2;6299:9;6290:7;6286:23;6282:32;6279:52;;;6327:1;6324;6317:12;6279:52;6359:9;6353:16;6378:28;6400:5;6378:28;:::i;7037:306::-;7125:6;7133;7141;7194:2;7182:9;7173:7;7169:23;7165:32;7162:52;;;7210:1;7207;7200:12;7162:52;7239:9;7233:16;7223:26;;7289:2;7278:9;7274:18;7268:25;7258:35;;7333:2;7322:9;7318:18;7312:25;7302:35;;7037:306;;;;;:::o;7348:353::-;7558:25;;;7614:2;7599:18;;7592:34;;;;-1:-1:-1;;;;;7662:32:1;7657:2;7642:18;;7635:60;7546:2;7531:18;;7348:353::o;7706:338::-;7908:2;7890:21;;;7947:2;7927:18;;;7920:30;-1:-1:-1;;;7981:2:1;7966:18;;7959:44;8035:2;8020:18;;7706:338::o;8049:127::-;8110:10;8105:3;8101:20;8098:1;8091:31;8141:4;8138:1;8131:15;8165:4;8162:1;8155:15;8522:168;8562:7;8628:1;8624;8620:6;8616:14;8613:1;8610:21;8605:1;8598:9;8591:17;8587:45;8584:71;;;8635:18;;:::i;:::-;-1:-1:-1;8675:9:1;;8522:168::o;8695:127::-;8756:10;8751:3;8747:20;8744:1;8737:31;8787:4;8784:1;8777:15;8811:4;8808:1;8801:15;8827:120;8867:1;8893;8883:35;;8898:18;;:::i;:::-;-1:-1:-1;8932:9:1;;8827:120::o;9876:135::-;9915:3;9936:17;;;9933:43;;9956:18;;:::i;:::-;-1:-1:-1;10003:1:1;9992:13;;9876:135::o;10016:335::-;10218:2;10200:21;;;10257:2;10237:18;;;10230:30;-1:-1:-1;;;10291:2:1;10276:18;;10269:41;10342:2;10327:18;;10016:335::o;10356:112::-;10388:1;10414;10404:35;;10419:18;;:::i;:::-;-1:-1:-1;10453:9:1;;10356:112::o;13768:127::-;13829:10;13824:3;13820:20;13817:1;13810:31;13860:4;13857:1;13850:15;13884:4;13881:1;13874:15;14307:258;14379:1;14389:113;14403:6;14400:1;14397:13;14389:113;;;14479:11;;;14473:18;14460:11;;;14453:39;14425:2;14418:10;14389:113;;;14520:6;14517:1;14514:13;14511:48;;;-1:-1:-1;;14555:1:1;14537:16;;14530:27;14307:258::o;14570:274::-;14699:3;14737:6;14731:13;14753:53;14799:6;14794:3;14787:4;14779:6;14775:17;14753:53;:::i;:::-;14822:16;;;;;14570:274;-1:-1:-1;;14570:274:1:o;15207:383::-;15356:2;15345:9;15338:21;15319:4;15388:6;15382:13;15431:6;15426:2;15415:9;15411:18;15404:34;15447:66;15506:6;15501:2;15490:9;15486:18;15481:2;15473:6;15469:15;15447:66;:::i;:::-;15574:2;15553:15;-1:-1:-1;;15549:29:1;15534:45;;;;15581:2;15530:54;;15207:383;-1:-1:-1;;15207:383:1:o
Swarm Source
ipfs://64509b13e7f307a88fd291bb83c8ef66a3179918f7ef6b6b583f12fbd4b4762e
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|
Validator ID :
0 FTM
Amount Staked
0
Amount Delegated
0
Staking Total
0
Staking Start Epoch
0
Staking Start Time
0
Proof of Importance
0
Origination Score
0
Validation Score
0
Active
0
Online
0
Downtime
0 s
Address | Amount | claimed Rewards | Created On Epoch | Created On |
---|
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.