Source Code
Latest 25 from a total of 19,441 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Claim | 23610779 | 126 days ago | IN | 0 ETH | 0.00003055 | ||||
| Withdraw | 21364661 | 439 days ago | IN | 0 ETH | 0.00114333 | ||||
| Deposit | 19047413 | 764 days ago | IN | 0 ETH | 0.00220572 | ||||
| Withdraw | 18308549 | 867 days ago | IN | 0 ETH | 0.00055793 | ||||
| Deposit | 18301390 | 868 days ago | IN | 0 ETH | 0.00045255 | ||||
| Deposit | 18301304 | 868 days ago | IN | 0 ETH | 0.00104052 | ||||
| Withdraw | 18120673 | 893 days ago | IN | 0 ETH | 0.00057222 | ||||
| Deposit | 17979985 | 913 days ago | IN | 0 ETH | 0.00385723 | ||||
| Withdraw | 17954642 | 917 days ago | IN | 0 ETH | 0.00141259 | ||||
| Deposit | 17865529 | 929 days ago | IN | 0 ETH | 0.0028336 | ||||
| Claim | 17775020 | 942 days ago | IN | 0 ETH | 0.00133208 | ||||
| Claim | 17775018 | 942 days ago | IN | 0 ETH | 0.00126452 | ||||
| Claim | 17596234 | 967 days ago | IN | 0 ETH | 0.00155258 | ||||
| Withdraw | 17583931 | 969 days ago | IN | 0 ETH | 0.00160992 | ||||
| Deposit | 17583660 | 969 days ago | IN | 0 ETH | 0.00247856 | ||||
| Withdraw | 17583578 | 969 days ago | IN | 0 ETH | 0.00112446 | ||||
| Deposit | 17583524 | 969 days ago | IN | 0 ETH | 0.0013901 | ||||
| Deposit | 17583439 | 969 days ago | IN | 0 ETH | 0.00202271 | ||||
| Withdraw | 17583436 | 969 days ago | IN | 0 ETH | 0.00119021 | ||||
| Deposit | 17583331 | 969 days ago | IN | 0 ETH | 0.00204372 | ||||
| Withdraw | 17547451 | 974 days ago | IN | 0 ETH | 0.00092809 | ||||
| Deposit | 17547426 | 974 days ago | IN | 0 ETH | 0.00191048 | ||||
| Withdraw | 17491476 | 982 days ago | IN | 0 ETH | 0.00050589 | ||||
| Claim | 17424817 | 991 days ago | IN | 0 ETH | 0.00143803 | ||||
| Deposit | 17390561 | 996 days ago | IN | 0 ETH | 0.00379241 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
EggChef
Compiler Version
v0.8.9+commit.e5eed63a
Contract Source Code (Solidity)
/**
*Submitted for verification at Etherscan.io on 2023-02-05
*/
// SPDX-License-Identifier: MIT
/*
* ABDK Math 64.64 Smart Contract Library. Copyright © 2019 by ABDK Consulting.
* Author: Mikhail Vladimirov <mikhail.vladimirov@gmail.com>
*/
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.
*
* @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.
*
* @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.
*
* @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.
*
* @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).
*
* 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/EggChef.sol
pragma solidity ^0.8.0;
interface IUniswapPair {
event Sync(uint112 reserve0, uint112 reserve1);
function sync() external;
}
interface IEggsToken {
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 fragmentToEggs(uint256 value) external view returns (uint256);
function eggsToFragment(uint256 eggs) external view returns (uint256);
function balanceOfUnderlying(address who) external view returns (uint256);
}
contract EggChef 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 `lastRewardBlock`) gets updated.
// 2. User receives the pending reward sent to his/her address.
// 3. User's `amount` gets updated.
// 4. User's `rewardDebt` gets updated.
}
struct PoolInfo {
IERC20 lpToken; // Address of LP token contract.
uint256 allocPoint; // How many allocation points assigned to this pool. Rewards to distribute per block.
uint256 lastRewardBlock; // Last block number that Rewards distribution occurs.
uint256 accRewardPerShare; // Accumulated Rewards per share.
}
// EGGS
IEggsToken public eggs;
// EGGS LP address
IUniswapPair public eggsLp;
// EGGS tokens reward per block.
uint256 public rewardPerBlock;
// Compound ratio which is 0.001% (will be used to decrease supply)
uint256 public compoundRatio = 1e13;
// Start rebase from first Ethereum PoS block
uint256 public lastBlock;
// 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 number when EGGS mining starts.
uint256 public startBlock;
// 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 LogRewardPerBlock(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 lastRewardBlock,
uint256 lpSupply,
uint256 accRewardPerShare
);
event LogSetLockDuration(uint256 indexed pid, uint256 lockDuration);
constructor(
IEggsToken _eggs,
IUniswapPair _eggsLp,
uint256 _rewardPerBlock,
uint256 _startBlock
) Ownable() ReentrancyGuard() {
eggs = _eggs;
eggsLp = _eggsLp;
rewardPerBlock = _rewardPerBlock;
startBlock = _startBlock;
lastBlock = _startBlock;
}
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
);
}
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 updateRewardPerBlock(uint256 _rewardPerBlock) external onlyOwner {
massUpdatePools();
rewardPerBlock = _rewardPerBlock;
emit LogRewardPerBlock(_rewardPerBlock);
}
// 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 lastRewardBlock = block.number > startBlock
? block.number
: startBlock;
totalAllocPoint = totalAllocPoint + _allocPoint;
poolInfo.push(
PoolInfo({
lpToken: _lpToken,
allocPoint: _allocPoint,
lastRewardBlock: lastRewardBlock,
accRewardPerShare: 0
})
);
emit LogPoolAddition(poolInfo.length - 1, _allocPoint, _lpToken);
}
// Update the given pool's EGGS 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 Eggs 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(eggs)) {
lpSupply = eggs.balanceOfUnderlying(address(this));
}
if (block.number > pool.lastRewardBlock && lpSupply != 0) {
uint256 eggsReward = ((block.number - pool.lastRewardBlock) *
rewardPerBlock *
pool.allocPoint) / totalAllocPoint;
accRewardPerShare += (eggsReward * 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.number <= pool.lastRewardBlock) {
return;
}
uint256 lpSupply = pool.lpToken.balanceOf(address(this));
if (address(pool.lpToken) == address(eggs)) {
lpSupply = eggs.balanceOfUnderlying(address(this));
}
if (lpSupply == 0) {
pool.lastRewardBlock = block.number;
return;
}
uint256 eggsReward = ((block.number - pool.lastRewardBlock) *
rewardPerBlock *
pool.allocPoint) / totalAllocPoint;
pool.accRewardPerShare += (eggsReward * 1e12) / lpSupply;
pool.lastRewardBlock = block.number;
emit LogUpdatePool(
_pid,
pool.lastRewardBlock,
lpSupply,
pool.accRewardPerShare
);
}
// Deposit tokens to EggsChef for EGGS allocation.
function deposit(uint256 _pid, uint256 _amount) external nonReentrant {
require(_amount > 0, "invalid amount");
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][msg.sender];
user.lockEndedTimestamp = block.timestamp + lockDurations[_pid];
updatePool(_pid);
queueRewards(_pid, msg.sender);
pool.lpToken.safeTransferFrom(
address(msg.sender),
address(this),
_amount
);
emit Deposit(msg.sender, _pid, _amount);
if (address(pool.lpToken) == address(eggs)) {
_amount = eggs.fragmentToEggs(_amount);
}
user.amount += _amount;
user.rewardDebt = (user.amount * pool.accRewardPerShare) / 1e12;
}
// Withdraw tokens from EggChef.
function withdraw(uint256 _pid, uint256 _amount) external nonReentrant {
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(eggs)) {
_amount = eggs.eggsToFragment(_amount);
}
pool.lpToken.safeTransfer(address(msg.sender), _amount);
emit Withdraw(msg.sender, _pid, _amount);
}
// Claim EGGS from EggChef
function claim(uint256 _pid, address _account) external nonReentrant {
updatePool(_pid);
queueRewards(_pid, _account);
uint256 pending = userRewards[_pid][_account];
require(pending > 0, "no pending rewards");
UserInfo storage user = userInfo[_pid][msg.sender];
user.lockEndedTimestamp = block.timestamp + lockDurations[_pid];
userRewards[_pid][_account] = 0;
userInfo[_pid][_account].rewardDebt =
(userInfo[_pid][_account].amount *
poolInfo[_pid].accRewardPerShare) /
(1e12);
eggs.mint(_account, pending);
if (lastBlock != block.number) {
eggs.rebase(
block.number,
compound(1e18, compoundRatio, block.number - lastBlock) - 1e18,
false
);
lastBlock = block.number;
eggsLp.sync();
}
emit RewardPaid(_account, _pid, pending);
}
// 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
Contract ABI
API[{"inputs":[{"internalType":"contract IEggsToken","name":"_eggs","type":"address"},{"internalType":"contract IUniswapPair","name":"_eggsLp","type":"address"},{"internalType":"uint256","name":"_rewardPerBlock","type":"uint256"},{"internalType":"uint256","name":"_startBlock","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":"LogRewardPerBlock","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":"lastRewardBlock","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":[],"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":[],"name":"compoundRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"eggs","outputs":[{"internalType":"contract IEggsToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"eggsLp","outputs":[{"internalType":"contract IUniswapPair","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastBlock","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":[{"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":"lastRewardBlock","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":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"_pid","type":"uint256"},{"internalType":"uint256","name":"_lockDuration","type":"uint256"}],"name":"setLockDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startBlock","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":"_rewardPerBlock","type":"uint256"}],"name":"updateRewardPerBlock","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
60806040526509184e72a0006005556000600b553480156200002057600080fd5b5060405162001f8538038062001f858339810160408190526200004391620000ff565b6200004e3362000096565b60018055600280546001600160a01b039586166001600160a01b0319918216179091556003805494909516931692909217909255600491909155600c8190556006556200014c565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0381168114620000fc57600080fd5b50565b600080600080608085870312156200011657600080fd5b84516200012381620000e6565b60208601519094506200013681620000e6565b6040860151606090960151949790965092505050565b611e29806200015c6000396000f3fe608060405234801561001057600080fd5b506004361061018e5760003560e01c8063806b984f116100de578063ae581bc211610097578063e2bbb15811610071578063e2bbb15814610391578063e33f76cf146103a4578063f2fde38b146103b7578063f3c85eba146103ca57600080fd5b8063ae581bc21461034f578063d295ea7014610375578063ddd5e1b21461037e57600080fd5b8063806b984f1461029d5780638ae39cac146102a65780638da5cb5b146102af57806393f1a40b146102d457806398969e82146103295780639fdff7031461033c57600080fd5b806332298be11161014b57806351eb05a61161012557806351eb05a614610267578063630b5ba11461027a57806364482f7914610282578063715018a61461029557600080fd5b806332298be11461022b578063441a3e701461024b57806348cd4cb11461025e57600080fd5b806301f8a97614610193578063081e3eda146101a8578063126796dd146101bf5780631526fe27146101d257806317caf6f11461020f5780631eaaa04514610218575b600080fd5b6101a66101a1366004611ab8565b6103dd565b005b6007545b6040519081526020015b60405180910390f35b6101a66101cd366004611ad1565b610428565b6101e56101e0366004611ab8565b610481565b604080516001600160a01b03909516855260208501939093529183015260608201526080016101b6565b6101ac600b5481565b6101a6610226366004611b16565b6104c5565b6101ac610239366004611ab8565b600a6020526000908152604090205481565b6101a6610259366004611ad1565b61063a565b6101ac600c5481565b6101a6610275366004611ab8565b610852565b6101a6610a6c565b6101a6610290366004611b58565b610a93565b6101a6610b54565b6101ac60065481565b6101ac60045481565b6000546001600160a01b03165b6040516001600160a01b0390911681526020016101b6565b61030e6102e2366004611b86565b600860209081526000928352604080842090915290825290208054600182015460029092015490919083565b604080519384526020840192909252908201526060016101b6565b6101ac610337366004611b86565b610b68565b6003546102bc906001600160a01b031681565b61036261035d366004611bb6565b610da9565b604051600f9190910b81526020016101b6565b6101ac60055481565b6101a661038c366004611b86565b610e06565b6101a661039f366004611ad1565b611139565b6002546102bc906001600160a01b031681565b6101a66103c5366004611be8565b6112f8565b6101ac6103d8366004611c05565b611371565b6103e56113b1565b6103ed610a6c565b60048190556040518181527f4e91b3ffa2cd4d03d69ce17f42b0023d0316960080c578857b6f05470d96cdab9060200160405180910390a150565b6104306113b1565b6000828152600a6020526040908190208290555182907f6e4fdd86ed4186281f108d19169264f10ab9a86531113410b92c1cfc19971b59906104759084815260200190565b60405180910390a25050565b6007818154811061049157600080fd5b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169350919084565b6104cd6113b1565b80156104db576104db610a6c565b6000600c5443116104ee57600c546104f0565b435b905083600b546105009190611c47565b600b55604080516080810182526001600160a01b038581168083526020830188815293830185815260006060850181815260078054600180820183559382905296517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688600490980297880180546001600160a01b031916919097161790955595517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68986015590517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a85015593517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68b9093019290925554909161060191611c5f565b6040518681527f4710feb78e3bce8d2e3ca2989a8eb2f8bcd32a6a55b4535942c180fc4d2e29529060200160405180910390a350505050565b61064261140b565b6000811161066b5760405162461bcd60e51b815260040161066290611c76565b60405180910390fd5b60006007838154811061068057610680611c9e565b6000918252602080832086845260088252604080852033865290925292206002810154600490920290920192504210156106eb5760405162461bcd60e51b815260206004820152600c60248201526b1cdd1a5b1b081b1bd8dad95960a21b6044820152606401610662565b805483111561070c5760405162461bcd60e51b815260040161066290611c76565b61071584610852565b61071f8433611465565b828160000160008282546107339190611c5f565b90915550506003820154815464e8d4a510009161074f91611cb4565b6107599190611ce9565b600182015560025482546001600160a01b03908116911614156107f557600254604051631116a97760e11b8152600481018590526001600160a01b039091169063222d52ee9060240160206040518083038186803b1580156107ba57600080fd5b505afa1580156107ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f29190611cfd565b92505b815461080b906001600160a01b03163385611546565b604051838152849033907ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568906020015b60405180910390a3505061084e60018055565b5050565b60006007828154811061086757610867611c9e565b9060005260206000209060040201905080600201544311610886575050565b80546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b1580156108c957600080fd5b505afa1580156108dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109019190611cfd565b60025483549192506001600160a01b039182169116141561099a57600254604051633af9e66960e01b81523060048201526001600160a01b0390911690633af9e6699060240160206040518083038186803b15801561095f57600080fd5b505afa158015610973573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109979190611cfd565b90505b806109aa57504360029091015550565b6000600b5483600101546004548560020154436109c79190611c5f565b6109d19190611cb4565b6109db9190611cb4565b6109e59190611ce9565b9050816109f78264e8d4a51000611cb4565b610a019190611ce9565b836003016000828254610a149190611c47565b909155505043600284018190556003840154604080519283526020830185905282015284907fcb7325664a4a3b7c7223eefc492a97ca4fdf94d46884621e5a8fae5a04b2b9d29060600160405180910390a250505050565b60075460005b8181101561084e57610a8381610852565b610a8c81611d16565b9050610a72565b610a9b6113b1565b8015610aa957610aa9610a6c565b8160078481548110610abd57610abd611c9e565b906000526020600020906004020160010154600b54610adc9190611c5f565b610ae69190611c47565b600b819055508160078481548110610b0057610b00611c9e565b906000526020600020906004020160010181905550827f942cc7e17a17c164bd977f32ab8c54265d5b9d481e4e352bf874f1e568874e7c83604051610b4791815260200190565b60405180910390a2505050565b610b5c6113b1565b610b6660006115ae565b565b60008060078481548110610b7e57610b7e611c9e565b600091825260208083208784526008825260408085206001600160a01b038981168752935280852060049485029092016003810154815492516370a0823160e01b8152309681019690965290965091949193919216906370a082319060240160206040518083038186803b158015610bf557600080fd5b505afa158015610c09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c2d9190611cfd565b60025485549192506001600160a01b0391821691161415610cc657600254604051633af9e66960e01b81523060048201526001600160a01b0390911690633af9e6699060240160206040518083038186803b158015610c8b57600080fd5b505afa158015610c9f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cc39190611cfd565b90505b836002015443118015610cd857508015155b15610d42576000600b548560010154600454876002015443610cfa9190611c5f565b610d049190611cb4565b610d0e9190611cb4565b610d189190611ce9565b905081610d2a8264e8d4a51000611cb4565b610d349190611ce9565b610d3e9084611c47565b9250505b6001830154835464e8d4a5100090610d5b908590611cb4565b610d659190611ce9565b60008981526009602090815260408083206001600160a01b038c168452909152902054610d929190611c47565b610d9c9190611c5f565b9450505050505b92915050565b6000610db560016115fe565b90505b8115610da357610dc9600283611d31565b60011415610def57610ddb818461161c565b9050610de8600183611c5f565b9150610db8565b610df9838461161c565b9250610de8600283611ce9565b610e0e61140b565b610e1782610852565b610e218282611465565b60008281526009602090815260408083206001600160a01b038516845290915290205480610e865760405162461bcd60e51b81526020600482015260126024820152716e6f2070656e64696e67207265776172647360701b6044820152606401610662565b60008381526008602090815260408083203384528252808320868452600a90925290912054610eb59042611c47565b600282015560008481526009602090815260408083206001600160a01b03871684529091528120556007805464e8d4a51000919086908110610ef957610ef9611c9e565b60009182526020808320600360049093020191909101548783526008825260408084206001600160a01b0389168552909252912054610f389190611cb4565b610f429190611ce9565b60008581526008602090815260408083206001600160a01b0388811680865291909352928190206001019390935560025492516340c10f1960e01b815260048101929092526024820185905291909116906340c10f1990604401600060405180830381600087803b158015610fb657600080fd5b505af1158015610fca573d6000803e3d6000fd5b5050505043600654146110fd576002546005546006546001600160a01b0390921691637af548c1914391670de0b6b3a76400009161100f918391906103d89086611c5f565b6110199190611c5f565b6040516001600160e01b031960e085901b1681526004810192909252602482015260006044820152606401602060405180830381600087803b15801561105e57600080fd5b505af1158015611072573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110969190611cfd565b50436006556003546040805160016209351760e01b0319815290516001600160a01b039092169163fff6cae99160048082019260009290919082900301818387803b1580156110e457600080fd5b505af11580156110f8573d6000803e3d6000fd5b505050505b83836001600160a01b03167fd6f2c8500df5b44f11e9e48b91ff9f1b9d81bc496d55570c2b1b75bf65243f518460405161083b91815260200190565b61114161140b565b600081116111615760405162461bcd60e51b815260040161066290611c76565b60006007838154811061117657611176611c9e565b600091825260208083208684526008825260408085203386528352808520888652600a90935290932054600490920290920192506111b49042611c47565b60028201556111c284610852565b6111cc8433611465565b81546111e3906001600160a01b031633308661165a565b604051838152849033907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159060200160405180910390a360025482546001600160a01b03908116911614156112b15760025460405163f455cb3b60e01b8152600481018590526001600160a01b039091169063f455cb3b9060240160206040518083038186803b15801561127657600080fd5b505afa15801561128a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112ae9190611cfd565b92505b828160000160008282546112c59190611c47565b90915550506003820154815464e8d4a51000916112e191611cb4565b6112eb9190611ce9565b6001918201558055505050565b6113006113b1565b6001600160a01b0381166113655760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610662565b61136e816115ae565b50565b60006113a96113a361139d61138660016115fe565b61139887670de0b6b3a7640000611692565b6116c9565b84610da9565b856116fc565b949350505050565b6000546001600160a01b03163314610b665760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610662565b6002600154141561145e5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610662565b6002600155565b60008281526008602090815260408083206001600160a01b03851684528252808320815160608101835281548152600182015493810184905260029091015491810191909152600780549193929164e8d4a510009190879081106114cb576114cb611c9e565b90600052602060002090600402016003015484600001516114ec9190611cb4565b6114f69190611ce9565b6115009190611c5f565b905080156115405760008481526009602090815260408083206001600160a01b03871684529091528120805483929061153a908490611c47565b90915550505b50505050565b6040516001600160a01b0383166024820152604481018290526115a990849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611764565b505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000677fffffffffffffff82111561161557600080fd5b5060401b90565b6000600f83810b9083900b0260401d60016001607f1b0319811280159061164a575060016001607f1b038113155b61165357600080fd5b9392505050565b6040516001600160a01b03808516602483015283166044820152606481018290526115409085906323b872dd60e01b90608401611572565b60008161169e57600080fd5b60006116aa8484611836565b905060016001607f1b036001600160801b038216111561165357600080fd5b6000600f83810b9083900b0160016001607f1b0319811280159061164a575060016001607f1b0381131561165357600080fd5b60008161170b57506000610da3565b600083600f0b121561171c57600080fd5b600f83900b6001600160801b038316810260401c90608084901c026001600160c01b0381111561174b57600080fd5b60401b811981111561175c57600080fd5b019392505050565b60006117b9826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166119989092919063ffffffff16565b8051909150156115a957808060200190518101906117d79190611d45565b6115a95760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610662565b60008161184257600080fd5b60006001600160c01b03841161186d5782604085901b8161186557611865611cd3565b049050611984565b60c084811c6401000000008110611886576020918201911c5b620100008110611898576010918201911c5b61010081106118a9576008918201911c5b601081106118b9576004918201911c5b600481106118c9576002918201911c5b600281106118d8576001820191505b60bf820360018603901c6001018260ff0387901b816118f9576118f9611cd3565b0492506001600160801b0383111561191057600080fd5b608085901c83026001600160801b038616840260c088901c604089901b8281101561193c576001820391505b608084901b92900382811015611953576001820391505b829003608084901c821461196957611969611d62565b88818161197857611978611cd3565b04870196505050505050505b6001600160801b0381111561165357600080fd5b60606113a9848460008585600080866001600160a01b031685876040516119bf9190611da4565b60006040518083038185875af1925050503d80600081146119fc576040519150601f19603f3d011682016040523d82523d6000602084013e611a01565b606091505b5091509150611a1287838387611a1d565b979650505050505050565b60608315611a89578251611a82576001600160a01b0385163b611a825760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610662565b50816113a9565b6113a98383815115611a9e5781518083602001fd5b8060405162461bcd60e51b81526004016106629190611dc0565b600060208284031215611aca57600080fd5b5035919050565b60008060408385031215611ae457600080fd5b50508035926020909101359150565b6001600160a01b038116811461136e57600080fd5b801515811461136e57600080fd5b600080600060608486031215611b2b57600080fd5b833592506020840135611b3d81611af3565b91506040840135611b4d81611b08565b809150509250925092565b600080600060608486031215611b6d57600080fd5b83359250602084013591506040840135611b4d81611b08565b60008060408385031215611b9957600080fd5b823591506020830135611bab81611af3565b809150509250929050565b60008060408385031215611bc957600080fd5b823580600f0b8114611bda57600080fd5b946020939093013593505050565b600060208284031215611bfa57600080fd5b813561165381611af3565b600080600060608486031215611c1a57600080fd5b505081359360208301359350604090920135919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611c5a57611c5a611c31565b500190565b600082821015611c7157611c71611c31565b500390565b6020808252600e908201526d1a5b9d985b1a5908185b5bdd5b9d60921b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000816000190483118215151615611cce57611cce611c31565b500290565b634e487b7160e01b600052601260045260246000fd5b600082611cf857611cf8611cd3565b500490565b600060208284031215611d0f57600080fd5b5051919050565b6000600019821415611d2a57611d2a611c31565b5060010190565b600082611d4057611d40611cd3565b500690565b600060208284031215611d5757600080fd5b815161165381611b08565b634e487b7160e01b600052600160045260246000fd5b60005b83811015611d93578181015183820152602001611d7b565b838111156115405750506000910152565b60008251611db6818460208701611d78565b9190910192915050565b6020815260008251806020840152611ddf816040850160208701611d78565b601f01601f1916919091016040019291505056fea26469706673582212209190ceddc947ab18e129c4bb8c64e2e926196d54b66cf9e6661a5b4f484a097364736f6c634300080900330000000000000000000000002e516ba5bf3b7ee47fb99b09eadb60bde80a82e0000000000000000000000000c54ba7aabe7164ca2aa092900060fe2ba6eccd8b000000000000000000000000000000000000000000084595161401484a0000000000000000000000000000000000000000000000000000000000000000fcde3b
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061018e5760003560e01c8063806b984f116100de578063ae581bc211610097578063e2bbb15811610071578063e2bbb15814610391578063e33f76cf146103a4578063f2fde38b146103b7578063f3c85eba146103ca57600080fd5b8063ae581bc21461034f578063d295ea7014610375578063ddd5e1b21461037e57600080fd5b8063806b984f1461029d5780638ae39cac146102a65780638da5cb5b146102af57806393f1a40b146102d457806398969e82146103295780639fdff7031461033c57600080fd5b806332298be11161014b57806351eb05a61161012557806351eb05a614610267578063630b5ba11461027a57806364482f7914610282578063715018a61461029557600080fd5b806332298be11461022b578063441a3e701461024b57806348cd4cb11461025e57600080fd5b806301f8a97614610193578063081e3eda146101a8578063126796dd146101bf5780631526fe27146101d257806317caf6f11461020f5780631eaaa04514610218575b600080fd5b6101a66101a1366004611ab8565b6103dd565b005b6007545b6040519081526020015b60405180910390f35b6101a66101cd366004611ad1565b610428565b6101e56101e0366004611ab8565b610481565b604080516001600160a01b03909516855260208501939093529183015260608201526080016101b6565b6101ac600b5481565b6101a6610226366004611b16565b6104c5565b6101ac610239366004611ab8565b600a6020526000908152604090205481565b6101a6610259366004611ad1565b61063a565b6101ac600c5481565b6101a6610275366004611ab8565b610852565b6101a6610a6c565b6101a6610290366004611b58565b610a93565b6101a6610b54565b6101ac60065481565b6101ac60045481565b6000546001600160a01b03165b6040516001600160a01b0390911681526020016101b6565b61030e6102e2366004611b86565b600860209081526000928352604080842090915290825290208054600182015460029092015490919083565b604080519384526020840192909252908201526060016101b6565b6101ac610337366004611b86565b610b68565b6003546102bc906001600160a01b031681565b61036261035d366004611bb6565b610da9565b604051600f9190910b81526020016101b6565b6101ac60055481565b6101a661038c366004611b86565b610e06565b6101a661039f366004611ad1565b611139565b6002546102bc906001600160a01b031681565b6101a66103c5366004611be8565b6112f8565b6101ac6103d8366004611c05565b611371565b6103e56113b1565b6103ed610a6c565b60048190556040518181527f4e91b3ffa2cd4d03d69ce17f42b0023d0316960080c578857b6f05470d96cdab9060200160405180910390a150565b6104306113b1565b6000828152600a6020526040908190208290555182907f6e4fdd86ed4186281f108d19169264f10ab9a86531113410b92c1cfc19971b59906104759084815260200190565b60405180910390a25050565b6007818154811061049157600080fd5b600091825260209091206004909102018054600182015460028301546003909301546001600160a01b039092169350919084565b6104cd6113b1565b80156104db576104db610a6c565b6000600c5443116104ee57600c546104f0565b435b905083600b546105009190611c47565b600b55604080516080810182526001600160a01b038581168083526020830188815293830185815260006060850181815260078054600180820183559382905296517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688600490980297880180546001600160a01b031916919097161790955595517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68986015590517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68a85015593517fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68b9093019290925554909161060191611c5f565b6040518681527f4710feb78e3bce8d2e3ca2989a8eb2f8bcd32a6a55b4535942c180fc4d2e29529060200160405180910390a350505050565b61064261140b565b6000811161066b5760405162461bcd60e51b815260040161066290611c76565b60405180910390fd5b60006007838154811061068057610680611c9e565b6000918252602080832086845260088252604080852033865290925292206002810154600490920290920192504210156106eb5760405162461bcd60e51b815260206004820152600c60248201526b1cdd1a5b1b081b1bd8dad95960a21b6044820152606401610662565b805483111561070c5760405162461bcd60e51b815260040161066290611c76565b61071584610852565b61071f8433611465565b828160000160008282546107339190611c5f565b90915550506003820154815464e8d4a510009161074f91611cb4565b6107599190611ce9565b600182015560025482546001600160a01b03908116911614156107f557600254604051631116a97760e11b8152600481018590526001600160a01b039091169063222d52ee9060240160206040518083038186803b1580156107ba57600080fd5b505afa1580156107ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f29190611cfd565b92505b815461080b906001600160a01b03163385611546565b604051838152849033907ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568906020015b60405180910390a3505061084e60018055565b5050565b60006007828154811061086757610867611c9e565b9060005260206000209060040201905080600201544311610886575050565b80546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b1580156108c957600080fd5b505afa1580156108dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109019190611cfd565b60025483549192506001600160a01b039182169116141561099a57600254604051633af9e66960e01b81523060048201526001600160a01b0390911690633af9e6699060240160206040518083038186803b15801561095f57600080fd5b505afa158015610973573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109979190611cfd565b90505b806109aa57504360029091015550565b6000600b5483600101546004548560020154436109c79190611c5f565b6109d19190611cb4565b6109db9190611cb4565b6109e59190611ce9565b9050816109f78264e8d4a51000611cb4565b610a019190611ce9565b836003016000828254610a149190611c47565b909155505043600284018190556003840154604080519283526020830185905282015284907fcb7325664a4a3b7c7223eefc492a97ca4fdf94d46884621e5a8fae5a04b2b9d29060600160405180910390a250505050565b60075460005b8181101561084e57610a8381610852565b610a8c81611d16565b9050610a72565b610a9b6113b1565b8015610aa957610aa9610a6c565b8160078481548110610abd57610abd611c9e565b906000526020600020906004020160010154600b54610adc9190611c5f565b610ae69190611c47565b600b819055508160078481548110610b0057610b00611c9e565b906000526020600020906004020160010181905550827f942cc7e17a17c164bd977f32ab8c54265d5b9d481e4e352bf874f1e568874e7c83604051610b4791815260200190565b60405180910390a2505050565b610b5c6113b1565b610b6660006115ae565b565b60008060078481548110610b7e57610b7e611c9e565b600091825260208083208784526008825260408085206001600160a01b038981168752935280852060049485029092016003810154815492516370a0823160e01b8152309681019690965290965091949193919216906370a082319060240160206040518083038186803b158015610bf557600080fd5b505afa158015610c09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c2d9190611cfd565b60025485549192506001600160a01b0391821691161415610cc657600254604051633af9e66960e01b81523060048201526001600160a01b0390911690633af9e6699060240160206040518083038186803b158015610c8b57600080fd5b505afa158015610c9f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cc39190611cfd565b90505b836002015443118015610cd857508015155b15610d42576000600b548560010154600454876002015443610cfa9190611c5f565b610d049190611cb4565b610d0e9190611cb4565b610d189190611ce9565b905081610d2a8264e8d4a51000611cb4565b610d349190611ce9565b610d3e9084611c47565b9250505b6001830154835464e8d4a5100090610d5b908590611cb4565b610d659190611ce9565b60008981526009602090815260408083206001600160a01b038c168452909152902054610d929190611c47565b610d9c9190611c5f565b9450505050505b92915050565b6000610db560016115fe565b90505b8115610da357610dc9600283611d31565b60011415610def57610ddb818461161c565b9050610de8600183611c5f565b9150610db8565b610df9838461161c565b9250610de8600283611ce9565b610e0e61140b565b610e1782610852565b610e218282611465565b60008281526009602090815260408083206001600160a01b038516845290915290205480610e865760405162461bcd60e51b81526020600482015260126024820152716e6f2070656e64696e67207265776172647360701b6044820152606401610662565b60008381526008602090815260408083203384528252808320868452600a90925290912054610eb59042611c47565b600282015560008481526009602090815260408083206001600160a01b03871684529091528120556007805464e8d4a51000919086908110610ef957610ef9611c9e565b60009182526020808320600360049093020191909101548783526008825260408084206001600160a01b0389168552909252912054610f389190611cb4565b610f429190611ce9565b60008581526008602090815260408083206001600160a01b0388811680865291909352928190206001019390935560025492516340c10f1960e01b815260048101929092526024820185905291909116906340c10f1990604401600060405180830381600087803b158015610fb657600080fd5b505af1158015610fca573d6000803e3d6000fd5b5050505043600654146110fd576002546005546006546001600160a01b0390921691637af548c1914391670de0b6b3a76400009161100f918391906103d89086611c5f565b6110199190611c5f565b6040516001600160e01b031960e085901b1681526004810192909252602482015260006044820152606401602060405180830381600087803b15801561105e57600080fd5b505af1158015611072573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110969190611cfd565b50436006556003546040805160016209351760e01b0319815290516001600160a01b039092169163fff6cae99160048082019260009290919082900301818387803b1580156110e457600080fd5b505af11580156110f8573d6000803e3d6000fd5b505050505b83836001600160a01b03167fd6f2c8500df5b44f11e9e48b91ff9f1b9d81bc496d55570c2b1b75bf65243f518460405161083b91815260200190565b61114161140b565b600081116111615760405162461bcd60e51b815260040161066290611c76565b60006007838154811061117657611176611c9e565b600091825260208083208684526008825260408085203386528352808520888652600a90935290932054600490920290920192506111b49042611c47565b60028201556111c284610852565b6111cc8433611465565b81546111e3906001600160a01b031633308661165a565b604051838152849033907f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159060200160405180910390a360025482546001600160a01b03908116911614156112b15760025460405163f455cb3b60e01b8152600481018590526001600160a01b039091169063f455cb3b9060240160206040518083038186803b15801561127657600080fd5b505afa15801561128a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112ae9190611cfd565b92505b828160000160008282546112c59190611c47565b90915550506003820154815464e8d4a51000916112e191611cb4565b6112eb9190611ce9565b6001918201558055505050565b6113006113b1565b6001600160a01b0381166113655760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610662565b61136e816115ae565b50565b60006113a96113a361139d61138660016115fe565b61139887670de0b6b3a7640000611692565b6116c9565b84610da9565b856116fc565b949350505050565b6000546001600160a01b03163314610b665760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610662565b6002600154141561145e5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610662565b6002600155565b60008281526008602090815260408083206001600160a01b03851684528252808320815160608101835281548152600182015493810184905260029091015491810191909152600780549193929164e8d4a510009190879081106114cb576114cb611c9e565b90600052602060002090600402016003015484600001516114ec9190611cb4565b6114f69190611ce9565b6115009190611c5f565b905080156115405760008481526009602090815260408083206001600160a01b03871684529091528120805483929061153a908490611c47565b90915550505b50505050565b6040516001600160a01b0383166024820152604481018290526115a990849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611764565b505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000677fffffffffffffff82111561161557600080fd5b5060401b90565b6000600f83810b9083900b0260401d60016001607f1b0319811280159061164a575060016001607f1b038113155b61165357600080fd5b9392505050565b6040516001600160a01b03808516602483015283166044820152606481018290526115409085906323b872dd60e01b90608401611572565b60008161169e57600080fd5b60006116aa8484611836565b905060016001607f1b036001600160801b038216111561165357600080fd5b6000600f83810b9083900b0160016001607f1b0319811280159061164a575060016001607f1b0381131561165357600080fd5b60008161170b57506000610da3565b600083600f0b121561171c57600080fd5b600f83900b6001600160801b038316810260401c90608084901c026001600160c01b0381111561174b57600080fd5b60401b811981111561175c57600080fd5b019392505050565b60006117b9826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166119989092919063ffffffff16565b8051909150156115a957808060200190518101906117d79190611d45565b6115a95760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610662565b60008161184257600080fd5b60006001600160c01b03841161186d5782604085901b8161186557611865611cd3565b049050611984565b60c084811c6401000000008110611886576020918201911c5b620100008110611898576010918201911c5b61010081106118a9576008918201911c5b601081106118b9576004918201911c5b600481106118c9576002918201911c5b600281106118d8576001820191505b60bf820360018603901c6001018260ff0387901b816118f9576118f9611cd3565b0492506001600160801b0383111561191057600080fd5b608085901c83026001600160801b038616840260c088901c604089901b8281101561193c576001820391505b608084901b92900382811015611953576001820391505b829003608084901c821461196957611969611d62565b88818161197857611978611cd3565b04870196505050505050505b6001600160801b0381111561165357600080fd5b60606113a9848460008585600080866001600160a01b031685876040516119bf9190611da4565b60006040518083038185875af1925050503d80600081146119fc576040519150601f19603f3d011682016040523d82523d6000602084013e611a01565b606091505b5091509150611a1287838387611a1d565b979650505050505050565b60608315611a89578251611a82576001600160a01b0385163b611a825760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610662565b50816113a9565b6113a98383815115611a9e5781518083602001fd5b8060405162461bcd60e51b81526004016106629190611dc0565b600060208284031215611aca57600080fd5b5035919050565b60008060408385031215611ae457600080fd5b50508035926020909101359150565b6001600160a01b038116811461136e57600080fd5b801515811461136e57600080fd5b600080600060608486031215611b2b57600080fd5b833592506020840135611b3d81611af3565b91506040840135611b4d81611b08565b809150509250925092565b600080600060608486031215611b6d57600080fd5b83359250602084013591506040840135611b4d81611b08565b60008060408385031215611b9957600080fd5b823591506020830135611bab81611af3565b809150509250929050565b60008060408385031215611bc957600080fd5b823580600f0b8114611bda57600080fd5b946020939093013593505050565b600060208284031215611bfa57600080fd5b813561165381611af3565b600080600060608486031215611c1a57600080fd5b505081359360208301359350604090920135919050565b634e487b7160e01b600052601160045260246000fd5b60008219821115611c5a57611c5a611c31565b500190565b600082821015611c7157611c71611c31565b500390565b6020808252600e908201526d1a5b9d985b1a5908185b5bdd5b9d60921b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000816000190483118215151615611cce57611cce611c31565b500290565b634e487b7160e01b600052601260045260246000fd5b600082611cf857611cf8611cd3565b500490565b600060208284031215611d0f57600080fd5b5051919050565b6000600019821415611d2a57611d2a611c31565b5060010190565b600082611d4057611d40611cd3565b500690565b600060208284031215611d5757600080fd5b815161165381611b08565b634e487b7160e01b600052600160045260246000fd5b60005b83811015611d93578181015183820152602001611d7b565b838111156115405750506000910152565b60008251611db6818460208701611d78565b9190910192915050565b6020815260008251806020840152611ddf816040850160208701611d78565b601f01601f1916919091016040019291505056fea26469706673582212209190ceddc947ab18e129c4bb8c64e2e926196d54b66cf9e6661a5b4f484a097364736f6c63430008090033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000002e516ba5bf3b7ee47fb99b09eadb60bde80a82e0000000000000000000000000c54ba7aabe7164ca2aa092900060fe2ba6eccd8b000000000000000000000000000000000000000000084595161401484a0000000000000000000000000000000000000000000000000000000000000000fcde3b
-----Decoded View---------------
Arg [0] : _eggs (address): 0x2e516BA5Bf3b7eE47fb99B09eaDb60BDE80a82e0
Arg [1] : _eggsLp (address): 0xc54Ba7AAbE7164Ca2Aa092900060fE2ba6eCCD8B
Arg [2] : _rewardPerBlock (uint256): 10000000000000000000000000
Arg [3] : _startBlock (uint256): 16571963
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000002e516ba5bf3b7ee47fb99b09eadb60bde80a82e0
Arg [1] : 000000000000000000000000c54ba7aabe7164ca2aa092900060fe2ba6eccd8b
Arg [2] : 000000000000000000000000000000000000000000084595161401484a000000
Arg [3] : 0000000000000000000000000000000000000000000000000000000000fcde3b
Deployed Bytecode Sourcemap
81016:11331:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;85352:203;;;;;;:::i;:::-;;:::i;:::-;;85028:95;85100:8;:15;85028:95;;;345:25:1;;;333:2;318:18;85028:95:0;;;;;;;;85131:213;;;;;;:::i;:::-;;:::i;82568:26::-;;;;;;:::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;82568:26:0;634:432:1;82985:34:0;;;;;;85724:695;;;;;;:::i;:::-;;:::i;82842:48::-;;;;;;:::i;:::-;;;;;;;;;;;;;;90108:795;;;;;;:::i;:::-;;:::i;83076:25::-;;;;;;88286:912;;;;;;:::i;:::-;;:::i;88030:180::-;;;:::i;86515:418::-;;;;;;:::i;:::-;;:::i;37391:103::-;;;:::i;82508:24::-;;;;;;82306:29;;;;;;36743:87;36789:7;36816:6;-1:-1:-1;;;;;36816:6:0;36743:87;;;-1:-1:-1;;;;;2362:32:1;;;2344:51;;2332:2;2317:18;36743:87:0;2198:203:1;82628:64:0;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2936:25:1;;;2992:2;2977:18;;2970:34;;;;3020:18;;;3013:34;2924:2;2909:18;82628:64:0;2734:319:1;86996:951:0;;;;;;:::i;:::-;;:::i;82235:26::-;;;;;-1:-1:-1;;;;;82235:26:0;;;84186:359;;;;;;:::i;:::-;;:::i;:::-;;;3808:2:1;3797:22;;;;3779:41;;3767:2;3752:18;84186:359:0;3635:191:1;82415:35:0;;;;;;90943:993;;;;;;:::i;:::-;;:::i;89262:800::-;;;;;;:::i;:::-;;:::i;82182:22::-;;;;;-1:-1:-1;;;;;82182:22:0;;;37649:238;;;;;;:::i;:::-;;:::i;84553:467::-;;;;;;:::i;:::-;;:::i;85352:203::-;36629:13;:11;:13::i;:::-;85437:17:::1;:15;:17::i;:::-;85465:14;:32:::0;;;85513:34:::1;::::0;345:25:1;;;85513:34:0::1;::::0;333:2:1;318:18;85513:34:0::1;;;;;;;85352:203:::0;:::o;85131:213::-;36629:13;:11;:13::i;:::-;85246:19:::1;::::0;;;:13:::1;:19;::::0;;;;;;:35;;;85297:39;85260:4;;85297:39:::1;::::0;::::1;::::0;85268:13;345:25:1;;333:2;318:18;;199:177;85297:39:0::1;;;;;;;;85131:213:::0;;:::o;82568:26::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;82568:26:0;;;;-1:-1:-1;82568:26:0;;;:::o;85724:695::-;36629:13;:11;:13::i;:::-;85861:11:::1;85857:61;;;85889:17;:15;:17::i;:::-;85928:23;85969:10;;85954:12;:25;:79;;86023:10;;85954:79;;;85995:12;85954:79;85928:105;;86080:11;86062:15;;:29;;;;:::i;:::-;86044:15;:47:::0;86130:193:::1;::::0;;::::1;::::0;::::1;::::0;;-1:-1:-1;;;;;86130:193:0;;::::1;::::0;;;::::1;::::0;::::1;::::0;;;;;;;;;-1:-1:-1;86130:193:0;;;;;;86102:8:::1;:232:::0;;::::1;::::0;;::::1;::::0;;;;;;;;;-1:-1:-1;86102:232:0;;::::1;::::0;;::::1;::::0;;-1:-1:-1;;;;;;86102:232:0::1;::::0;;;::::1;;::::0;;;;;;;;;;;;;;;;;;;;;;;;;86368:15;86130:193;;86368:19:::1;::::0;::::1;:::i;:::-;86352:59;::::0;345:25:1;;;86352:59:0::1;::::0;333:2:1;318:18;86352:59:0::1;;;;;;;85846:573;85724:695:::0;;;:::o;90108:795::-;33893:21;:19;:21::i;:::-;90208:1:::1;90198:7;:11;90190:38;;;;-1:-1:-1::0;;;90190:38:0::1;;;;;;;:::i;:::-;;;;;;;;;90241:21;90265:8;90274:4;90265:14;;;;;;;;:::i;:::-;;::::0;;;::::1;::::0;;;90314;;;:8:::1;:14:::0;;;;;;90329:10:::1;90314:26:::0;;;;;;;90359:23:::1;::::0;::::1;::::0;90265:14:::1;::::0;;::::1;::::0;;::::1;::::0;-1:-1:-1;90386:15:0::1;-1:-1:-1::0;90359:42:0::1;90351:67;;;::::0;-1:-1:-1;;;90351:67:0;;5711:2:1;90351:67:0::1;::::0;::::1;5693:21:1::0;5750:2;5730:18;;;5723:30;-1:-1:-1;;;5769:18:1;;;5762:42;5821:18;;90351:67:0::1;5509:336:1::0;90351:67:0::1;90437:11:::0;;:22;-1:-1:-1;90437:22:0::1;90429:49;;;;-1:-1:-1::0;;;90429:49:0::1;;;;;;;:::i;:::-;90491:16;90502:4;90491:10;:16::i;:::-;90518:30;90531:4;90537:10;90518:12;:30::i;:::-;90576:7;90561:4;:11;;;:22;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;90627:22:0::1;::::0;::::1;::::0;90613:11;;90653:4:::1;::::0;90613:36:::1;::::0;::::1;:::i;:::-;90612:45;;;;:::i;:::-;90594:15;::::0;::::1;:63:::0;90705:4:::1;::::0;90680:12;;-1:-1:-1;;;;;90680:12:0;;::::1;90705:4:::0;::::1;90672:38;90668:109;;;90737:4;::::0;:28:::1;::::0;-1:-1:-1;;;90737:28:0;;::::1;::::0;::::1;345:25:1::0;;;-1:-1:-1;;;;;90737:4:0;;::::1;::::0;:19:::1;::::0;318:18:1;;90737:28:0::1;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;90727:38;;90668:109;90787:12:::0;;:55:::1;::::0;-1:-1:-1;;;;;90787:12:0::1;90821:10;90834:7:::0;90787:25:::1;:55::i;:::-;90860:35;::::0;345:25:1;;;90881:4:0;;90869:10:::1;::::0;90860:35:::1;::::0;333:2:1;318:18;90860:35:0::1;;;;;;;;90179:724;;33937:20:::0;33331:1;34453:22;;34270:213;33937:20;90108:795;;:::o;88286:912::-;88338:21;88362:8;88371:4;88362:14;;;;;;;;:::i;:::-;;;;;;;;;;;88338:38;;88407:4;:20;;;88391:12;:36;88387:75;;88444:7;88286:912;:::o;88387:75::-;88491:12;;:37;;-1:-1:-1;;;88491:37:0;;88522:4;88491:37;;;2344:51:1;88472:16:0;;-1:-1:-1;;;;;88491:12:0;;:22;;2317:18:1;;88491:37:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;88576:4;;88551:12;;88472:56;;-1:-1:-1;;;;;;88551:12:0;;;88576:4;;88543:38;88539:121;;;88609:4;;:39;;-1:-1:-1;;;88609:39:0;;88642:4;88609:39;;;2344:51:1;-1:-1:-1;;;;;88609:4:0;;;;:24;;2317:18:1;;88609:39:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;88598:50;;88539:121;88674:13;88670:102;;-1:-1:-1;88727:12:0;88704:20;;;;:35;-1:-1:-1;88286:912:0:o;88670:102::-;88782:18;88906:15;;88887:4;:15;;;88857:14;;88820:4;:20;;;88805:12;:35;;;;:::i;:::-;88804:67;;;;:::i;:::-;:98;;;;:::i;:::-;88803:118;;;;:::i;:::-;88782:139;-1:-1:-1;88980:8:0;88959:17;88782:139;88972:4;88959:17;:::i;:::-;88958:30;;;;:::i;:::-;88932:4;:22;;;:56;;;;;;;:::i;:::-;;;;-1:-1:-1;;89022:12:0;88999:20;;;:35;;;89157:22;;;;89052:138;;;2936:25:1;;;2992:2;2977:18;;2970:34;;;3020:18;;3013:34;89080:4:0;;89052:138;;2924:2:1;2909:18;89052:138:0;;;;;;;88327:871;;;88286:912;:::o;88030:180::-;88092:8;:15;88075:14;88118:85;88146:6;88140:3;:12;88118:85;;;88176:15;88187:3;88176:10;:15::i;:::-;88154:5;;;:::i;:::-;;;88118:85;;86515:418;36629:13;:11;:13::i;:::-;86649:11:::1;86645:61;;;86677:17;:15;:17::i;:::-;86819:11;86778:8;86787:4;86778:14;;;;;;;;:::i;:::-;;;;;;;;;;;:25;;;86747:15;;:56;;;;:::i;:::-;:83;;;;:::i;:::-;86716:15;:114;;;;86869:11;86841:8;86850:4;86841:14;;;;;;;;:::i;:::-;;;;;;;;;;;:25;;:39;;;;86907:4;86896:29;86913:11;86896:29;;;;345:25:1::0;;333:2;318:18;;199:177;86896:29:0::1;;;;;;;;86515:418:::0;;;:::o;37391:103::-;36629:13;:11;:13::i;:::-;37456:30:::1;37483:1;37456:18;:30::i;:::-;37391:103::o:0;86996:951::-;87098:7;87123:21;87147:8;87156:4;87147:14;;;;;;;;:::i;:::-;;;;;;;;;87196;;;:8;:14;;;;;;-1:-1:-1;;;;;87196:21:0;;;;;;;;;;87147:14;;;;;;;87256:22;;;;87308:12;;:37;;-1:-1:-1;;;87308:37:0;;87339:4;87308:37;;;2344:51:1;;;;87147:14:0;;-1:-1:-1;87196:21:0;;87256:22;;87147:14;;87308:12;;:22;;2317:18:1;;87308:37:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;87393:4;;87368:12;;87289:56;;-1:-1:-1;;;;;;87368:12:0;;;87393:4;;87360:38;87356:121;;;87426:4;;:39;;-1:-1:-1;;;87426:39:0;;87459:4;87426:39;;;2344:51:1;-1:-1:-1;;;;;87426:4:0;;;;:24;;2317:18:1;;87426:39:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;87415:50;;87356:121;87506:4;:20;;;87491:12;:35;:52;;;;-1:-1:-1;87530:13:0;;;87491:52;87487:298;;;87560:18;87692:15;;87673:4;:15;;;87639:14;;87598:4;:20;;;87583:12;:35;;;;:::i;:::-;87582:71;;;;:::i;:::-;:106;;;;:::i;:::-;87581:126;;;;:::i;:::-;87560:147;-1:-1:-1;87765:8:0;87744:17;87560:147;87757:4;87744:17;:::i;:::-;87743:30;;;;:::i;:::-;87722:51;;;;:::i;:::-;;;87545:240;87487:298;87924:15;;;;87856:11;;87904:4;;87856:31;;87870:17;;87856:31;:::i;:::-;87855:53;;;;:::i;:::-;87815:17;;;;:11;:17;;;;;;;;-1:-1:-1;;;;;87815:24:0;;;;;;;;;;:93;;;;:::i;:::-;:124;;;;:::i;:::-;87795:144;;;;;;86996:951;;;;;:::o;84186:359::-;84241:8;84266:25;84289:1;84266:22;:25::i;:::-;84262:29;;84302:236;84309:5;;84302:236;;84335:5;84339:1;84335;:5;:::i;:::-;84344:1;84335:10;84331:196;;;84370:23;84388:1;84391;84370:17;:23::i;:::-;84366:27;-1:-1:-1;84412:6:0;84417:1;84412:6;;:::i;:::-;;;84302:236;;84331:196;84463:23;84481:1;84484;84463:17;:23::i;:::-;84459:27;-1:-1:-1;84505:6:0;84510:1;84505:6;;:::i;90943:993::-;33893:21;:19;:21::i;:::-;91023:16:::1;91034:4;91023:10;:16::i;:::-;91050:28;91063:4;91069:8;91050:12;:28::i;:::-;91091:15;91109:17:::0;;;:11:::1;:17;::::0;;;;;;;-1:-1:-1;;;;;91109:27:0;::::1;::::0;;;;;;;;91155:11;91147:42:::1;;;::::0;-1:-1:-1;;;91147:42:0;;6928:2:1;91147:42:0::1;::::0;::::1;6910:21:1::0;6967:2;6947:18;;;6940:30;-1:-1:-1;;;6986:18:1;;;6979:48;7044:18;;91147:42:0::1;6726:342:1::0;91147:42:0::1;91202:21;91226:14:::0;;;:8:::1;:14;::::0;;;;;;;91241:10:::1;91226:26:::0;;;;;;;91307:19;;;:13:::1;:19:::0;;;;;;;91289:37:::1;::::0;:15:::1;:37;:::i;:::-;91263:23;::::0;::::1;:63:::0;91369:1:::1;91339:17:::0;;;:11:::1;:17;::::0;;;;;;;-1:-1:-1;;;;;91339:27:0;::::1;::::0;;;;;;;:31;91484:8:::1;:14:::0;;91534:4:::1;::::0;91484:8;91351:4;;91484:14;::::1;;;;;:::i;:::-;;::::0;;;::::1;::::0;;;:32:::1;:14;::::0;;::::1;;:32:::0;;;::::1;::::0;91433:14;;;:8:::1;:14:::0;;;;;;-1:-1:-1;;;;;91433:24:0;::::1;::::0;;;;;;;:31;:83:::1;::::0;91484:32;91433:83:::1;:::i;:::-;91432:107;;;;:::i;:::-;91381:14;::::0;;;:8:::1;:14;::::0;;;;;;;-1:-1:-1;;;;;91381:24:0;;::::1;::::0;;;;;;;;;;;:35:::1;;:158:::0;;;;91552:4:::1;::::0;:28;;-1:-1:-1;;;91552:28:0;;::::1;::::0;::::1;7247:51:1::0;;;;7314:18;;;7307:34;;;91552:4:0;;;::::1;::::0;:9:::1;::::0;7220:18:1;;91552:28:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;91608:12;91595:9;;:25;91591:287;;91637:4;::::0;91713:13:::1;::::0;91743:9:::1;::::0;-1:-1:-1;;;;;91637:4:0;;::::1;::::0;:11:::1;::::0;91667:12:::1;::::0;91756:4:::1;::::0;91698:55:::1;::::0;91756:4;;91713:13;91728:24:::1;::::0;91667:12;91728:24:::1;:::i;91698:55::-;:62;;;;:::i;:::-;91637:162;::::0;-1:-1:-1;;;;;;91637:162:0::1;::::0;;;;;;::::1;::::0;::::1;7548:25:1::0;;;;7589:18;;;7582:34;91779:5:0::1;7632:18:1::0;;;7625:50;7521:18;;91637:162:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;91826:12:0::1;91814:9;:24:::0;91853:6:::1;::::0;:13:::1;::::0;;-1:-1:-1;;;;;;91853:13:0;;;;-1:-1:-1;;;;;91853:6:0;;::::1;::::0;:11:::1;::::0;:13:::1;::::0;;::::1;::::0;:6:::1;::::0;:13;;;;;;;;:6;;:13;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;91591:287;91914:4;91904:8;-1:-1:-1::0;;;;;91893:35:0::1;;91920:7;91893:35;;;;345:25:1::0;;333:2;318:18;;199:177;89262:800:0;33893:21;:19;:21::i;:::-;89361:1:::1;89351:7;:11;89343:38;;;;-1:-1:-1::0;;;89343:38:0::1;;;;;;;:::i;:::-;89394:21;89418:8;89427:4;89418:14;;;;;;;;:::i;:::-;;::::0;;;::::1;::::0;;;89467;;;:8:::1;:14:::0;;;;;;89482:10:::1;89467:26:::0;;;;;;;89548:19;;;:13:::1;:19:::0;;;;;;;89418:14:::1;::::0;;::::1;::::0;;::::1;::::0;-1:-1:-1;89530:37:0::1;::::0;:15:::1;:37;:::i;:::-;89504:23;::::0;::::1;:63:::0;89578:16:::1;89589:4:::0;89578:10:::1;:16::i;:::-;89605:30;89618:4;89624:10;89605:12;:30::i;:::-;89648:12:::0;;:124:::1;::::0;-1:-1:-1;;;;;89648:12:0::1;89700:10;89734:4;89754:7:::0;89648:29:::1;:124::i;:::-;89790:34;::::0;345:25:1;;;89810:4:0;;89798:10:::1;::::0;89790:34:::1;::::0;333:2:1;318:18;89790:34:0::1;;;;;;;89874:4;::::0;89849:12;;-1:-1:-1;;;;;89849:12:0;;::::1;89874:4:::0;::::1;89841:38;89837:109;;;89906:4;::::0;:28:::1;::::0;-1:-1:-1;;;89906:28:0;;::::1;::::0;::::1;345:25:1::0;;;-1:-1:-1;;;;;89906:4:0;;::::1;::::0;:19:::1;::::0;318:18:1;;89906:28:0::1;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;89896:38;;89837:109;89973:7;89958:4;:11;;;:22;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;90024:22:0::1;::::0;::::1;::::0;90010:11;;90050:4:::1;::::0;90010:36:::1;::::0;::::1;:::i;:::-;90009:45;;;;:::i;:::-;89991:15;::::0;;::::1;:63:::0;34453:22;;-1:-1:-1;90108:795:0;;:::o;37649:238::-;36629:13;:11;:13::i;:::-;-1:-1:-1;;;;;37752:22:0;::::1;37730:110;;;::::0;-1:-1:-1;;;37730:110:0;;7888:2:1;37730:110:0::1;::::0;::::1;7870:21:1::0;7927:2;7907:18;;;7900:30;7966:34;7946:18;;;7939:62;-1:-1:-1;;;8017:18:1;;;8010:36;8063:19;;37730:110:0::1;7686:402:1::0;37730:110:0::1;37851:28;37870:8;37851:18;:28::i;:::-;37649:238:::0;:::o;84553:467::-;84671:7;84711:301;84748:221;84774:152;84818:25;84841:1;84818:22;:25::i;:::-;84870:33;84889:5;84896:6;84870:18;:33::i;:::-;84774:17;:152::i;:::-;84949:1;84748:3;:221::i;:::-;84988:9;84711:18;:301::i;:::-;84691:321;84553:467;-1:-1:-1;;;;84553:467:0:o;36908:132::-;36789:7;36816:6;-1:-1:-1;;;;;36816:6:0;35300:10;36972:23;36964:68;;;;-1:-1:-1;;;36964:68:0;;8295:2:1;36964:68:0;;;8277:21:1;;;8314:18;;;8307:30;8373:34;8353:18;;;8346:62;8425:18;;36964:68:0;8093:356:1;33973:289:0;33375:1;34103:7;;:19;;34095:63;;;;-1:-1:-1;;;34095:63:0;;8656:2:1;34095:63:0;;;8638:21:1;8695:2;8675:18;;;8668:30;8734:33;8714:18;;;8707:61;8785:18;;34095:63:0;8454:355:1;34095:63:0;33375:1;34236:7;:18;33973:289::o;91993:351::-;92067:20;92090:14;;;:8;:14;;;;;;;;-1:-1:-1;;;;;92090:24:0;;;;;;;;;92067:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;92158:8;:14;;92067:47;;:20;:47;92208:4;;92158:8;92099:4;;92158:14;;;;;;:::i;:::-;;;;;;;;;;;:32;;;92144:4;:11;;;:46;;;;:::i;:::-;92143:70;;;;:::i;:::-;:101;;;;:::i;:::-;92125:119;-1:-1:-1;92259:11:0;;92255:82;;92287:17;;;;:11;:17;;;;;;;;-1:-1:-1;;;;;92287:27:0;;;;;;;;;:38;;92318:7;;92287:17;:38;;92318:7;;92287:38;:::i;:::-;;;;-1:-1:-1;;92255:82:0;92056:288;;91993:351;;:::o;75903:248::-;76074:58;;-1:-1:-1;;;;;7265:32:1;;76074:58:0;;;7247:51:1;7314:18;;;7307:34;;;76020:123:0;;76054:5;;-1:-1:-1;;;76097:23:0;7220:18:1;;76074:58:0;;;;-1:-1:-1;;76074:58:0;;;;;;;;;;;;;;-1:-1:-1;;;;;76074:58:0;-1:-1:-1;;;;;;76074:58:0;;;;;;;;;;76020:19;:123::i;:::-;75903:248;;;:::o;38047:191::-;38121:16;38140:6;;-1:-1:-1;;;;;38157:17:0;;;-1:-1:-1;;;;;;38157:17:0;;;;;;38190:40;;38140:6;;;;;;;38190:40;;38121:16;38190:40;38110:128;38047:191;:::o;2106:192::-;2158:6;2215:18;2210:1;:23;;2202:32;;;;;;-1:-1:-1;2275:2:0;2270:7;;2106:192::o;4850:258::-;4906:6;4967:13;:9;;;:13;;;;;4985:2;4966:21;-1:-1:-1;;;;;;5010:19:0;;;;;:42;;-1:-1:-1;;;;;;5033:19:0;;;5010:42;5002:51;;;;;;5082:6;4850:258;-1:-1:-1;;;4850:258:0:o;76159:285::-;76357:68;;-1:-1:-1;;;;;9072:15:1;;;76357:68:0;;;9054:34:1;9124:15;;9104:18;;;9097:43;9156:18;;;9149:34;;;76303:133:0;;76337:5;;-1:-1:-1;;;76380:27:0;8989:18:1;;76357:68:0;8814:375:1;10050:268:0;10109:6;10161;10153:15;;;;;;10183:14;10200:11;10206:1;10209;10200:5;:11::i;:::-;10183:28;-1:-1:-1;;;;;;;;;;;10234:28:0;;;;10226:37;;;;;3860:250;3916:6;3976:13;:9;;;:13;;;;;-1:-1:-1;;;;;;4012:19:0;;;;;:42;;-1:-1:-1;;;;;;4035:19:0;;;4004:51;;;;;7209:665;7267:7;7316:6;7312:20;;-1:-1:-1;7331:1:0;7324:8;;7312:20;7362:1;7357;:6;;;;7349:15;;;;;;7403:9;;;;-1:-1:-1;;;;;7434:38:0;;7395:78;;7478:2;7394:86;;7535:3;7530:8;;;7508:31;-1:-1:-1;;;;;7564:56:0;;;7556:65;;;;;;7643:2;7636:9;7715:96;;7688:123;;;7662:164;;;;;;7848:7;;7209:665;-1:-1:-1;;;7209:665:0:o;79401:802::-;79825:23;79851:106;79893:4;79851:106;;;;;;;;;;;;;;;;;79859:5;-1:-1:-1;;;;;79851:27:0;;;:106;;;;;:::i;:::-;79972:17;;79825:132;;-1:-1:-1;79972:21:0;79968:228;;80087:10;80076:30;;;;;;;;;;;;:::i;:::-;80050:134;;;;-1:-1:-1;;;80050:134:0;;9646:2:1;80050:134:0;;;9628:21:1;9685:2;9665:18;;;9658:30;9724:34;9704:18;;;9697:62;-1:-1:-1;;;9775:18:1;;;9768:40;9825:19;;80050:134:0;9444:406:1;27952:1861:0;28011:7;28064:6;28056:15;;;;;;28088:14;-1:-1:-1;;;;;28123:1:0;:55;28119:1569;;28218:1;28212:2;28207:1;:7;;28206:13;;;;;:::i;:::-;;28197:22;;28119:1569;;;28272:3;28307:8;;;28344:11;28338:17;;28334:107;;28387:2;28412:9;;;;28380;28334:107;28469:7;28463:2;:13;28459:103;;28508:2;28533:9;;;;28501;28459:103;28590:5;28584:2;:11;28580:99;;28627:1;28651:8;;;;28620;28580:99;28707:4;28701:2;:10;28697:98;;28743:1;28767:8;;;;28736;28697:98;28823:3;28817:2;:9;28813:97;;28858:1;28882:8;;;;28851;28813:97;28938:3;28932:2;:9;28928:23;;28950:1;28943:8;;;;28928:23;29053:3;29047;:9;29040:1;29036;:5;29035:22;;29061:1;29034:28;29025:3;29019;:9;29013:1;:16;;29012:51;;;;;:::i;:::-;;29003:60;;-1:-1:-1;;;;;29090:6:0;:44;;29082:53;;;;;;29184:3;29179:8;;;29169:19;;-1:-1:-1;;;;;29230:38:0;;29220:49;;29308:3;29303:8;;;29348:2;29343:7;;;29375;;;29371:20;;;29390:1;29384:7;;;;29371:20;29485:3;29479:9;;;;29410:8;;29511:7;;;29507:20;;;29526:1;29520:7;;;;29507:20;29546:8;;;29631:3;29625:9;;;29619:15;;29612:23;;;;:::i;:::-;29671:1;29666:2;:6;;;;;:::i;:::-;;29656:16;;;;28239:1449;;;;;;28119:1569;-1:-1:-1;;;;;29712:6:0;:44;;29704:53;;;;;63618:229;63755:12;63787:52;63809:6;63817:4;63823:1;63826:12;63755;65159;65173:23;65200:6;-1:-1:-1;;;;;65200:11:0;65219:5;65240:4;65200:55;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;65158:97;;;;65286:152;65331:6;65356:7;65382:10;65411:12;65286:26;:152::i;:::-;65266:172;64834:612;-1:-1:-1;;;;;;;64834:612:0:o;67969:644::-;68154:12;68183:7;68179:427;;;68211:17;;68207:290;;-1:-1:-1;;;;;60963:19:0;;;68421:60;;;;-1:-1:-1;;;68421:60:0;;11138:2:1;68421:60:0;;;11120:21:1;11177:2;11157:18;;;11150:30;11216:31;11196:18;;;11189:59;11265:18;;68421:60:0;10936:353:1;68421:60:0;-1:-1:-1;68518:10:0;68511:17;;68179:427;68561:33;68569:10;68581:12;69339:17;;:21;69335:388;;69571:10;69565:17;69628:15;69615:10;69611:2;69607:19;69600:44;69335:388;69698:12;69691:20;;-1:-1:-1;;;69691:20:0;;;;;;;;:::i;14:180:1:-;73:6;126:2;114:9;105:7;101:23;97:32;94:52;;;142:1;139;132:12;94:52;-1:-1:-1;165:23:1;;14:180;-1:-1:-1;14:180:1:o;381:248::-;449:6;457;510:2;498:9;489:7;485:23;481:32;478:52;;;526:1;523;516:12;478:52;-1:-1:-1;;549:23:1;;;619:2;604:18;;;591:32;;-1:-1:-1;381:248: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:377::-;1890:6;1898;1906;1959:2;1947:9;1938:7;1934:23;1930:32;1927:52;;;1975:1;1972;1965:12;1927:52;2011:9;1998:23;1988:33;;2068:2;2057:9;2053:18;2040:32;2030:42;;2122:2;2111:9;2107:18;2094:32;2135:28;2157:5;2135:28;:::i;2406:323::-;2474:6;2482;2535:2;2523:9;2514:7;2510:23;2506:32;2503:52;;;2551:1;2548;2541:12;2503:52;2587:9;2574:23;2564:33;;2647:2;2636:9;2632:18;2619:32;2660:39;2693:5;2660:39;:::i;:::-;2718:5;2708:15;;;2406:323;;;;;:::o;3287:343::-;3354:6;3362;3415:2;3403:9;3394:7;3390:23;3386:32;3383:52;;;3431:1;3428;3421:12;3383:52;3470:9;3457:23;3524:5;3520:2;3509:21;3502:5;3499:32;3489:60;;3545:1;3542;3535:12;3489:60;3568:5;3620:2;3605:18;;;;3592:32;;-1:-1:-1;;;3287:343:1:o;4058:255::-;4117:6;4170:2;4158:9;4149:7;4145:23;4141:32;4138:52;;;4186:1;4183;4176:12;4138:52;4225:9;4212:23;4244:39;4277:5;4244:39;:::i;4318:316::-;4395:6;4403;4411;4464:2;4452:9;4443:7;4439:23;4435:32;4432:52;;;4480:1;4477;4470:12;4432:52;-1:-1:-1;;4503:23:1;;;4573:2;4558:18;;4545:32;;-1:-1:-1;4624:2:1;4609:18;;;4596:32;;4318:316;-1:-1:-1;4318:316:1:o;4639:127::-;4700:10;4695:3;4691:20;4688:1;4681:31;4731:4;4728:1;4721:15;4755:4;4752:1;4745:15;4771:128;4811:3;4842:1;4838:6;4835:1;4832:13;4829:39;;;4848:18;;:::i;:::-;-1:-1:-1;4884:9:1;;4771:128::o;4904:125::-;4944:4;4972:1;4969;4966:8;4963:34;;;4977:18;;:::i;:::-;-1:-1:-1;5014:9:1;;4904:125::o;5034:338::-;5236:2;5218:21;;;5275:2;5255:18;;;5248:30;-1:-1:-1;;;5309:2:1;5294:18;;5287:44;5363:2;5348:18;;5034:338::o;5377:127::-;5438:10;5433:3;5429:20;5426:1;5419:31;5469:4;5466:1;5459:15;5493:4;5490:1;5483:15;5850:168;5890:7;5956:1;5952;5948:6;5944:14;5941:1;5938:21;5933:1;5926:9;5919:17;5915:45;5912:71;;;5963:18;;:::i;:::-;-1:-1:-1;6003:9:1;;5850:168::o;6023:127::-;6084:10;6079:3;6075:20;6072:1;6065:31;6115:4;6112:1;6105:15;6139:4;6136:1;6129:15;6155:120;6195:1;6221;6211:35;;6226:18;;:::i;:::-;-1:-1:-1;6260:9:1;;6155:120::o;6280:184::-;6350:6;6403:2;6391:9;6382:7;6378:23;6374:32;6371:52;;;6419:1;6416;6409:12;6371:52;-1:-1:-1;6442:16:1;;6280:184;-1:-1:-1;6280:184:1:o;6469:135::-;6508:3;-1:-1:-1;;6529:17:1;;6526:43;;;6549:18;;:::i;:::-;-1:-1:-1;6596:1:1;6585:13;;6469:135::o;6609:112::-;6641:1;6667;6657:35;;6672:18;;:::i;:::-;-1:-1:-1;6706:9:1;;6609:112::o;9194:245::-;9261:6;9314:2;9302:9;9293:7;9289:23;9285:32;9282:52;;;9330:1;9327;9320:12;9282:52;9362:9;9356:16;9381:28;9403:5;9381:28;:::i;9855:127::-;9916:10;9911:3;9907:20;9904:1;9897:31;9947:4;9944:1;9937:15;9971:4;9968:1;9961:15;10394:258;10466:1;10476:113;10490:6;10487:1;10484:13;10476:113;;;10566:11;;;10560:18;10547:11;;;10540:39;10512:2;10505:10;10476:113;;;10607:6;10604:1;10601:13;10598:48;;;-1:-1:-1;;10642:1:1;10624:16;;10617:27;10394:258::o;10657:274::-;10786:3;10824:6;10818:13;10840:53;10886:6;10881:3;10874:4;10866:6;10862:17;10840:53;:::i;:::-;10909:16;;;;;10657:274;-1:-1:-1;;10657:274:1:o;11294:383::-;11443:2;11432:9;11425:21;11406:4;11475:6;11469:13;11518:6;11513:2;11502:9;11498:18;11491:34;11534:66;11593:6;11588:2;11577:9;11573:18;11568:2;11560:6;11556:15;11534:66;:::i;:::-;11661:2;11640:15;-1:-1:-1;;11636:29:1;11621:45;;;;11668:2;11617:54;;11294:383;-1:-1:-1;;11294:383:1:o
Swarm Source
ipfs://9190ceddc947ab18e129c4bb8c64e2e926196d54b66cf9e6661a5b4f484a0973
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.