Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
- Contract name:
- IDO
- Optimization enabled
- true
- Compiler version
- v0.8.7+commit.e28d00a7
- Optimization runs
- 200
- EVM Version
- default
- Verified at
- 2024-09-26T15:32:15.828403Z
Contract source code
// SPDX-License-Identifier: No License (None)
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 {
address internal _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
/* constructor () {
_owner = msg.sender;
emit OwnershipTransferred(address(0), msg.sender);
}
*/
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(owner() == msg.sender, "Ownable: caller is not the owner");
_;
}
/**
* @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");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
}
/**
* @dev Interface of the ERC223 standard as defined in the EIP.
*/
interface IERC223 {
/**
* @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 `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
function transfer(address recipient, uint256 amount, bytes calldata data) 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 `sender` to `recipient` 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 sender, address recipient, uint256 amount) external returns (bool);
/**
* @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 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() {
// 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;
_;
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
}
interface IPriceFeed {
function getPrice(address token) external view returns(uint256);
}
contract IDO is Ownable, ReentrancyGuard {
struct Round {
uint256 soyToSell; // amount of SOY sell in this round
uint256 usdCollected; // USD value received in this round
uint256 hardCap; // maximum amount of USD that can be collected by this round
uint256 softCap; // minimum amount of USD to collect
uint256 start; // timestamp when auction start
uint256 end; // timestamp when auction end
}
struct Bet {
uint256 usdValue; // contributed usd in this round
uint256 soyAmount; // amount locked SOY
uint256 lockedUntil; // locked until
}
//mapping(uint256 => mapping(address => AcceptedToken)) public totalBets; // auction => token address => AcceptedToken
mapping(uint256 => mapping(address => Bet)) public bets; // round ID => user address => Bet
mapping(uint256 => Round) public auctionRound; // round ID => Round
mapping(address => bool) public allowedToken; // token accepted for payment
bool public isPaused;
address constant public SoyToken = address(0x9FaE2529863bD691B4A7171bDfCf33C7ebB10a65);
uint256 constant public RATIO = 1017233603000000000; // 1.017233603
address constant public priceFeed = address(0x9bFc3046ea26f8B09D3E85bd22AEc96C80D957e3); // price feed contract
address payable public bank; // receiver of bets tokens
uint256 public totalSoyToSell; // total amount of Soy to sell
uint256 public totalSoySold; // total amount of sold Soy including Soy in active auction.
uint256 public auctionRounds; // number of auction rounds
uint256 public currentRoundId; // current auction round (round starts from 1)
//uint256 public soyPerAuctionPeriod;
uint256 public roundDuration; // auction round duration (in seconds).
uint256 public lockPeriod; // period while tokens will be locked
uint256 public lockPercentage; // percentage of bought tokens that will be locked
uint256 public minPricePercentage; // percentage of previous auction price assign to min price
uint256 public maxPricePercentage; // maxPrice = lastRoundSoyPrice * maxPricePercentage / 100
uint256 public lastRoundSoyPrice; // previous auction price
uint256 public maxExtendRounds; // maximum number of rounds to extend tha auction
uint256 public burntAmount;
event RoundEnds(uint256 indexed roundID, uint256 soySold, uint256 usdCollected);
event Rescue(address _token, uint256 _amount);
event SetBank(address _bank);
event UserBet(uint256 indexed roundID, address indexed user, address indexed token, uint256 usdValue, uint256 tokenAmount);
modifier notPaused() {
require(!isPaused, "Paused");
_;
}
function initialize() external {
require(_owner == address(0), "Already initialized");
_owner = msg.sender;
emit OwnershipTransferred(address(0), msg.sender);
lockPeriod = 365 days; // period while tokens will be locked
minPricePercentage = 90; // percentage of previous auction price assign to min price
maxExtendRounds = 3; // maximum number of rounds to extend the auction
/*// weekly auction
roundDuration = 7 days; // auction round duration (in seconds).
maxPricePercentage = 500; // maxPrice = lastRoundSoyPrice * maxPricePercentage / 100
lockPercentage = 70; // 50% of Soy will be locked
auctionRounds = 26; // number of auction rounds
*/
// daily auction
roundDuration = 1 days; // auction round duration (in seconds).
maxPricePercentage = 160; // maxPrice = lastRoundSoyPrice * maxPricePercentage / 100
lockPercentage = 50; // 50% of Soy will be locked
auctionRounds = 180; // number of auction rounds
}
function setPause(bool state) external onlyOwner {
isPaused = state;
}
function setBank(address payable _bank) onlyOwner external
{
require(_bank != address(0), "Zero address not allowed");
bank = _bank;
emit SetBank(_bank);
}
function setLastRoundSoyPrice(uint256 val) external onlyOwner {
lastRoundSoyPrice = val;
}
function setMinPricePercentage(uint256 val) external onlyOwner {
minPricePercentage = val;
}
function setMaxPricePercentage(uint256 val) external onlyOwner {
maxPricePercentage = val;
}
function setLockPercentage(uint256 val) external onlyOwner {
lockPercentage = val;
}
function setLockPeriod(uint256 val) external onlyOwner {
lockPeriod = val;
}
function setRoundDuration(uint256 val) external onlyOwner {
roundDuration = val;
}
function setMaxExtendRounds(uint256 val) external onlyOwner {
maxExtendRounds = val;
}
function setAuctionRounds(uint256 val) external onlyOwner {
require(val >= currentRoundId);
auctionRounds = val;
}
function setAllowedToken(address token, bool state) external onlyOwner {
require(token != address(0));
allowedToken[token] = state;
}
// set amount to sell at current round
function setRoundSellAmount(uint256 amount) external onlyOwner {
uint256 currentAmount = auctionRound[currentRoundId].soyToSell;
totalSoySold = totalSoySold + amount - currentAmount;
require(totalSoyToSell >= totalSoySold, "Wrong amount");
auctionRound[currentRoundId].soyToSell = amount;
auctionRound[currentRoundId].hardCap = amount * lastRoundSoyPrice * maxPricePercentage / 10**20; // 100 * 10**18
auctionRound[currentRoundId].softCap = amount * lastRoundSoyPrice * minPricePercentage / 10**20; // 100 * 10**18
}
function auctionStart(uint256 startTime, uint256 soyPrice) external onlyOwner {
require(currentRoundId == 0, "Only start once");
require(totalSoyToSell != 0, "No SOY to sell");
lastRoundSoyPrice = soyPrice;
auctionRound[0].soyToSell = 29491750873668297408771; // auctionRound[0] * RATIO / 10**18 == 30 000 SOY for first day in daily auction.
startRound(startTime);
}
function claim() external {
claimBehalf(msg.sender, 1, currentRoundId);
}
function claimBehalf(address user) public {
claimBehalf(user, 1, currentRoundId);
}
// claim SOY tokens from numbers of auction rounds (fromRound to toRound). toRound is excluded.
function claimBehalf(address user, uint256 fromRound, uint256 toRound) public nonReentrant {
require(fromRound < toRound && toRound <= currentRoundId, "Incorrect rounds parameters");
uint256 soyToClaim;
uint256 _lockPercentage = lockPercentage;
uint256 _lockPeriod = lockPeriod;
for (uint256 i = fromRound; i<toRound; i++) {
uint256 usdValue = bets[i][user].usdValue;
if (usdValue != 0) { // user contributed in this round
if (bets[i][user].lockedUntil == 0) { // receive token from round
uint256 total = auctionRound[i].soyToSell * usdValue / auctionRound[i].usdCollected;
uint256 locked = total * _lockPercentage / 100;
soyToClaim += (total - locked);
bets[i][user].soyAmount = locked;
bets[i][user].lockedUntil = auctionRound[i].end + _lockPeriod;
bets[i][user].usdValue = 0;
}
}
// Check if can claim locked tokens
uint256 soyAmount = bets[i][user].soyAmount;
if (soyAmount != 0 && bets[i][user].lockedUntil < block.timestamp) {
uint256 initialAmount = soyAmount * 100 / _lockPercentage;
uint256 bonus = initialAmount * 25 / 100; // 25% bonus
soyToClaim += (soyAmount + bonus);
bets[i][user].soyAmount = 0;
}
}
IERC223(SoyToken).transfer(user, soyToClaim);
}
// return amount of SOY tokens that user may claim and amount that locked
function getTokenToClaim(address user) external view returns(uint256 soyToClaim, uint256 soyLocked) {
uint256 toRound = currentRoundId;
uint256 _lockPercentage = lockPercentage;
uint256 _lockPeriod = lockPeriod;
for (uint256 i = 1; i < toRound; i++) {
uint256 usdValue = bets[i][user].usdValue;
if (usdValue != 0) { // user contributed in this round
uint256 lockedUntil = bets[i][user].lockedUntil;
uint256 locked;
if (lockedUntil == 0) { // receive token from round
uint256 total = auctionRound[i].soyToSell * usdValue / auctionRound[i].usdCollected;
locked = total * _lockPercentage / 100;
soyToClaim += (total - locked);
lockedUntil = auctionRound[i].end + _lockPeriod;
}
if (lockedUntil < block.timestamp) {
soyToClaim += bets[i][user].soyAmount;
soyToClaim += locked; // in case of user do first claim in 1 year after auction end.
} else {
soyLocked += bets[i][user].soyAmount;
soyLocked += locked;
}
} else if (bets[i][user].soyAmount != 0){
if (bets[i][user].lockedUntil < block.timestamp) {
soyToClaim += bets[i][user].soyAmount;
} else {
soyLocked += bets[i][user].soyAmount;
}
}
}
}
// Returns arrays of locked SOY, unlock timestamp, SOY price (in USD with 18 decimals). Array index 0 = round 1 and so on.
// And total amount of SOY that user may claim and amount of SOY that is locked.
function getUserDetail(address user) external view
returns(uint256[] memory lockedSoy, uint256[] memory lockedDate, uint256[] memory soyPrice, uint256 soyToClaim, uint256 soyLocked)
{
uint256 currentRound = currentRoundId;
lockedSoy = new uint256[](currentRound-1);
lockedDate = new uint256[](currentRound-1);
soyPrice = new uint256[](currentRound-1);
uint256 _lockPercentage = lockPercentage;
uint256 _lockPeriod = lockPeriod;
for (uint256 i = 1; i < currentRound; i++) {
uint256 usdValue = bets[i][user].usdValue;
if (usdValue != 0) { // user contributed in this round
uint256 lockedUntil = bets[i][user].lockedUntil;
uint256 locked;
if (lockedUntil == 0) { // receive token from round
uint256 total = auctionRound[i].soyToSell * usdValue / auctionRound[i].usdCollected;
locked = total * _lockPercentage / 100;
soyToClaim += (total - locked);
lockedUntil = auctionRound[i].end + _lockPeriod;
lockedDate[i-1] = lockedUntil;
lockedSoy[i-1] = locked;
soyPrice[i-1] = auctionRound[i].usdCollected * 10**18 / auctionRound[i].soyToSell;
}
if (lockedUntil < block.timestamp) {
soyToClaim += bets[i][user].soyAmount;
soyToClaim += locked; // in case of user do first claim in 1 year after auction end.
} else {
soyLocked += bets[i][user].soyAmount;
soyLocked += locked;
}
} else if (bets[i][user].soyAmount != 0){
lockedDate[i-1] = bets[i][user].lockedUntil;
lockedSoy[i-1] = bets[i][user].soyAmount;
soyPrice[i-1] = auctionRound[i].usdCollected * 10**18 / auctionRound[i].soyToSell;
if (lockedDate[i-1] < block.timestamp) {
soyToClaim += lockedSoy[i-1];
} else {
soyLocked += lockedSoy[i-1];
}
}
}
}
// returns USD value collected in the current round and total USD value collected during the auction
function getCollectedUSD() external view returns(uint256 currentRoundUSD, uint256 totalUSD) {
uint256 currentRound = currentRoundId;
currentRoundUSD = auctionRound[currentRound].usdCollected;
for (uint i=1; i<=currentRound; i++) {
totalUSD = auctionRound[i].usdCollected;
}
}
// returns USD value collected in the round
function getCollectedUSD(uint256 round) external view returns(uint256) {
return auctionRound[round].usdCollected;
}
// Bet with ERC223 token
function tokenReceived(address _from, uint _value, bytes calldata _data) external {
if (msg.sender == SoyToken && _from == owner()) {
totalSoyToSell += _value;
return;
}
require(allowedToken[msg.sender], "Token isn't allowed");
userBet(_from, msg.sender, _value); // user, token, amount
}
receive() external payable {
makeBet(address(1), msg.value);
}
// make bet to Auction
function makeBet(address token, uint256 amount) public payable {
require(allowedToken[token], "Token isn't allowed");
if (token == address(1)) {
require(amount == msg.value, "Incorrect CLO amount");
} else {
require(msg.value == 0, "Only token");
IERC223(token).transferFrom(msg.sender, address(this), amount);
}
userBet(msg.sender, token, amount);
}
function userBet(address user, address token, uint256 amount) internal notPaused nonReentrant {
if (checkRound()) // if last round finished - return money to sender.
{
transferTo(token, amount, user);
return;
}
uint256 roundID = currentRoundId;
uint256 price = getPrice(token);
Round storage round = auctionRound[roundID];
Bet storage bet = bets[roundID][user];
uint256 totalUSD = round.usdCollected + (amount * price / 10**18);
if (totalUSD >= round.hardCap) {
uint256 rest = totalUSD - round.hardCap; // rest of USD
rest = rest * 10**18 / price; // rest in token
if (rest > amount) rest = amount; // this condition shouldn't be true but added to be safe.
round.usdCollected = round.hardCap;
amount = amount - rest; // amount of token that bet in this round
endRound(block.timestamp);
if (rest != 0) transferTo(token, rest, user); // return rest to the user
} else {
round.usdCollected = totalUSD;
}
uint256 usdValue = amount * price / 10**18;
bet.usdValue += usdValue; // update user's bet
transferTo(token, amount, bank); // transfer token to the bank address
emit UserBet(roundID, user, token, usdValue, amount);
}
function startRound(uint256 startTime) internal {
currentRoundId++;
require(currentRoundId <= auctionRounds, "All rounds completed");
Round storage round = auctionRound[currentRoundId];
round.start = startTime;
round.end = startTime + roundDuration;
// calculate amount of Soy to sell per round.
uint256 soyToSell;
if (roundDuration == 1 days) {
soyToSell = auctionRound[currentRoundId - 1].soyToSell * RATIO / 10**18;
if ((totalSoyToSell - totalSoySold) < soyToSell) {
soyToSell = totalSoyToSell - totalSoySold; // if left less Soy then we need due to calculation - sell all available Soy
}
} else {
uint256 roundsLeft = auctionRounds + 1 - currentRoundId;
soyToSell = (totalSoyToSell - totalSoySold) / roundsLeft;
}
round.soyToSell = soyToSell;
totalSoySold += soyToSell;
round.hardCap = soyToSell * lastRoundSoyPrice * maxPricePercentage / 10**20; // 100 * 10**18
round.softCap = soyToSell * lastRoundSoyPrice * minPricePercentage / 10**20; // 100 * 10**18
}
// return true if last auction round finished
function endRound(uint256 endTime) internal returns(bool isLastRoundEnd) {
Round storage round = auctionRound[currentRoundId];
lastRoundSoyPrice = round.usdCollected * 10**18 / round.soyToSell;
emit RoundEnds(currentRoundId, round.soyToSell, round.usdCollected);
if (currentRoundId == auctionRounds) { // last round
currentRoundId++;
isLastRoundEnd = true;
} else {
startRound(endTime); // start new round when previous round ends
}
}
// return true if last auction round finished
function checkRound() internal returns(bool isLastRoundEnd) {
Round storage round = auctionRound[currentRoundId];
require(round.start <= block.timestamp, "Auction is not started yet");
require(currentRoundId <= auctionRounds, "Auction is finished");
require(round.soyToSell != 0, "No SOY to sell");
if (round.end <= block.timestamp) { // auction round finished.
if (round.usdCollected < round.softCap) {
// extend auction on next round duration if min threshold was not reached
uint256 duration = (block.timestamp - round.start) / roundDuration;
if (duration < maxExtendRounds) {
round.end = round.start + ((duration+1)*roundDuration);
} else {
round.end = round.start + (maxExtendRounds * roundDuration);
isLastRoundEnd = endRound(round.end);
}
} else {
isLastRoundEnd = endRound(round.end);
}
}
}
function transferTo(address token, uint256 amount, address receiver) internal {
if (token == address(1)) { // transfer CLO
payable(receiver).transfer(amount);
} else {
IERC223(token).transfer(receiver, amount);
}
}
// get price of token from price feed contract (price in USD with 18 decimals)
function getPrice(address token) internal view returns(uint256 price) {
return IPriceFeed(priceFeed).getPrice(token);
}
function rescueTokens(address _token) onlyOwner external {
uint256 amount;
if (_token == SoyToken) {
amount = totalSoyToSell-totalSoySold;
totalSoyToSell = totalSoySold;
} else {
amount = IERC223(_token).balanceOf(address(this));
}
IERC223(_token).transfer(msg.sender, amount);
emit Rescue(_token, amount);
}
function burn(uint256 amount) onlyOwner external {
require(currentRoundId > auctionRounds, "Auction is not finished");
uint256 amountAvailable = totalSoyToSell - totalSoySold - burntAmount;
require(amountAvailable != 0, "No Soy to burn");
if (amount > amountAvailable) amount = amountAvailable;
burntAmount += amount;
IERC223(SoyToken).transfer(address(0xdEad000000000000000000000000000000000000), amount);
}
}
Contract ABI
[{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"Rescue","inputs":[{"type":"address","name":"_token","internalType":"address","indexed":false},{"type":"uint256","name":"_amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"RoundEnds","inputs":[{"type":"uint256","name":"roundID","internalType":"uint256","indexed":true},{"type":"uint256","name":"soySold","internalType":"uint256","indexed":false},{"type":"uint256","name":"usdCollected","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"SetBank","inputs":[{"type":"address","name":"_bank","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"UserBet","inputs":[{"type":"uint256","name":"roundID","internalType":"uint256","indexed":true},{"type":"address","name":"user","internalType":"address","indexed":true},{"type":"address","name":"token","internalType":"address","indexed":true},{"type":"uint256","name":"usdValue","internalType":"uint256","indexed":false},{"type":"uint256","name":"tokenAmount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"RATIO","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"SoyToken","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"allowedToken","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"soyToSell","internalType":"uint256"},{"type":"uint256","name":"usdCollected","internalType":"uint256"},{"type":"uint256","name":"hardCap","internalType":"uint256"},{"type":"uint256","name":"softCap","internalType":"uint256"},{"type":"uint256","name":"start","internalType":"uint256"},{"type":"uint256","name":"end","internalType":"uint256"}],"name":"auctionRound","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"auctionRounds","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"auctionStart","inputs":[{"type":"uint256","name":"startTime","internalType":"uint256"},{"type":"uint256","name":"soyPrice","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address payable"}],"name":"bank","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"usdValue","internalType":"uint256"},{"type":"uint256","name":"soyAmount","internalType":"uint256"},{"type":"uint256","name":"lockedUntil","internalType":"uint256"}],"name":"bets","inputs":[{"type":"uint256","name":"","internalType":"uint256"},{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"burn","inputs":[{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"burntAmount","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"claim","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"claimBehalf","inputs":[{"type":"address","name":"user","internalType":"address"},{"type":"uint256","name":"fromRound","internalType":"uint256"},{"type":"uint256","name":"toRound","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"claimBehalf","inputs":[{"type":"address","name":"user","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"currentRoundId","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getCollectedUSD","inputs":[{"type":"uint256","name":"round","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"currentRoundUSD","internalType":"uint256"},{"type":"uint256","name":"totalUSD","internalType":"uint256"}],"name":"getCollectedUSD","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"soyToClaim","internalType":"uint256"},{"type":"uint256","name":"soyLocked","internalType":"uint256"}],"name":"getTokenToClaim","inputs":[{"type":"address","name":"user","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256[]","name":"lockedSoy","internalType":"uint256[]"},{"type":"uint256[]","name":"lockedDate","internalType":"uint256[]"},{"type":"uint256[]","name":"soyPrice","internalType":"uint256[]"},{"type":"uint256","name":"soyToClaim","internalType":"uint256"},{"type":"uint256","name":"soyLocked","internalType":"uint256"}],"name":"getUserDetail","inputs":[{"type":"address","name":"user","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"initialize","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isPaused","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"lastRoundSoyPrice","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"lockPercentage","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"lockPeriod","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"makeBet","inputs":[{"type":"address","name":"token","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"maxExtendRounds","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"maxPricePercentage","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"minPricePercentage","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"priceFeed","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"rescueTokens","inputs":[{"type":"address","name":"_token","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"roundDuration","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setAllowedToken","inputs":[{"type":"address","name":"token","internalType":"address"},{"type":"bool","name":"state","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setAuctionRounds","inputs":[{"type":"uint256","name":"val","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setBank","inputs":[{"type":"address","name":"_bank","internalType":"address payable"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setLastRoundSoyPrice","inputs":[{"type":"uint256","name":"val","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setLockPercentage","inputs":[{"type":"uint256","name":"val","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setLockPeriod","inputs":[{"type":"uint256","name":"val","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setMaxExtendRounds","inputs":[{"type":"uint256","name":"val","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setMaxPricePercentage","inputs":[{"type":"uint256","name":"val","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setMinPricePercentage","inputs":[{"type":"uint256","name":"val","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setPause","inputs":[{"type":"bool","name":"state","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setRoundDuration","inputs":[{"type":"uint256","name":"val","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setRoundSellAmount","inputs":[{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"tokenReceived","inputs":[{"type":"address","name":"_from","internalType":"address"},{"type":"uint256","name":"_value","internalType":"uint256"},{"type":"bytes","name":"_data","internalType":"bytes"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalSoySold","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalSoyToSell","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"receive","stateMutability":"payable"}]
Contract Creation Code
0x608060405234801561001057600080fd5b5060018055612e3c806100246000396000f3fe60806040526004361061028b5760003560e01c8063601ce32d1161015a5780639cbe5efd116100c1578063c59cb9f41161007a578063c59cb9f414610828578063debb114314610848578063f2fde38b1461085e578063f644b3bb1461087e578063f7cb789a146108dc578063fe1cdb23146108f257600080fd5b80639cbe5efd1461071e5780639f3713b714610734578063a85f4e811461074a578063ab286934146107ce578063b187bd26146107ee578063bedb86fb1461080857600080fd5b80638129fc1c116101135780638129fc1c14610676578063889014961461068b5780638943ec02146106ab5780638aaa2284146106cb5780638c7a529f146106eb5780638da5cb5b1461070057600080fd5b8063601ce32d14610593578063741bef1a146105a9578063756742f8146105d157806376cdb03b14610611578063779972da146106365780637cd428421461065657600080fd5b806336c92c3f116101fe5780634e71d92d116101b75780634e71d92d146104cc5780634ef6aa71146104e15780635113aea91461052157806351bddee81461054157806359e741d2146105575780635f26e73e1461057357600080fd5b806336c92c3f146104125780633b50261f146104325780633fd8b02f1461044557806342966c681461045b578063443e52041461047b5780634a48c84b1461049b57600080fd5b80631cd27551116102505780631cd275511461034157806320f634b5146103575780632155e43e1461038c578063226125a8146103ac5780632fc10aaf146103cc578063356442b9146103fc57600080fd5b8062ae3bf8146102a2578063073caa3c146102c257806307f003c3146102e2578063090d23b91461030b57806311a9dd3b1461032b57600080fd5b3661029d5761029b600134610908565b005b600080fd5b3480156102ae57600080fd5b5061029b6102bd366004612a5e565b610a9a565b3480156102ce57600080fd5b5061029b6102dd366004612b70565b610c58565b3480156102ee57600080fd5b506102f860115481565b6040519081526020015b60405180910390f35b34801561031757600080fd5b5061029b610326366004612a5e565b611031565b34801561033757600080fd5b506102f8600d5481565b34801561034d57600080fd5b506102f860065481565b34801561036357600080fd5b50610377610372366004612a5e565b61111c565b60408051928352602083019190915201610302565b34801561039857600080fd5b5061029b6103a7366004612bdf565b611374565b3480156103b857600080fd5b5061029b6103c7366004612bdf565b6113b2565b3480156103d857600080fd5b506102f86103e7366004612bdf565b60009081526003602052604090206001015490565b34801561040857600080fd5b506102f8600c5481565b34801561041e57600080fd5b5061029b61042d366004612bdf565b6113f0565b61029b610440366004612abb565b610908565b34801561045157600080fd5b506102f8600b5481565b34801561046757600080fd5b5061029b610476366004612bdf565b61142e565b34801561048757600080fd5b5061029b610496366004612bdf565b6115d1565b3480156104a757600080fd5b506104bb6104b6366004612a5e565b61160f565b604051610302959493929190612c93565b3480156104d857600080fd5b5061029b611b65565b3480156104ed57600080fd5b50610509739fae2529863bd691b4a7171bdfcf33c7ebb10a6581565b6040516001600160a01b039091168152602001610302565b34801561052d57600080fd5b5061029b61053c366004612bdf565b611b75565b34801561054d57600080fd5b506102f8600e5481565b34801561056357600080fd5b506102f8670e1df0928867de0081565b34801561057f57600080fd5b5061029b61058e366004612bdf565b611cc2565b34801561059f57600080fd5b506102f8600f5481565b3480156105b557600080fd5b50610509739bfc3046ea26f8b09d3e85bd22aec96c80d957e381565b3480156105dd57600080fd5b506106016105ec366004612a5e565b60046020526000908152604090205460ff1681565b6040519015158152602001610302565b34801561061d57600080fd5b506005546105099061010090046001600160a01b031681565b34801561064257600080fd5b5061029b610651366004612bdf565b611d0f565b34801561066257600080fd5b5061029b610671366004612bdf565b611d4d565b34801561068257600080fd5b5061029b611d8b565b34801561069757600080fd5b5061029b6106a6366004612a5e565b611e43565b3480156106b757600080fd5b5061029b6106c6366004612ae7565b611e54565b3480156106d757600080fd5b5061029b6106e6366004612a82565b611f0c565b3480156106f757600080fd5b50610377611f83565b34801561070c57600080fd5b506000546001600160a01b0316610509565b34801561072a57600080fd5b506102f860095481565b34801561074057600080fd5b506102f860075481565b34801561075657600080fd5b506107a1610765366004612bdf565b60036020528060005260406000206000915090508060000154908060010154908060020154908060030154908060040154908060050154905086565b604080519687526020870195909552938501929092526060840152608083015260a082015260c001610302565b3480156107da57600080fd5b5061029b6107e9366004612c36565b611fd0565b3480156107fa57600080fd5b506005546106019060ff1681565b34801561081457600080fd5b5061029b610823366004612ba5565b6120cf565b34801561083457600080fd5b5061029b610843366004612bdf565b61211b565b34801561085457600080fd5b506102f860085481565b34801561086a57600080fd5b5061029b610879366004612a5e565b612159565b34801561088a57600080fd5b506108c1610899366004612c11565b6002602081815260009384526040808520909152918352912080546001820154919092015483565b60408051938452602084019290925290820152606001610302565b3480156108e857600080fd5b506102f8600a5481565b3480156108fe57600080fd5b506102f860105481565b6001600160a01b03821660009081526004602052604090205460ff1661096b5760405162461bcd60e51b8152602060048201526013602482015272151bdad95b881a5cdb89dd08185b1b1bddd959606a1b60448201526064015b60405180910390fd5b6001600160a01b038216600114156109c8573481146109c35760405162461bcd60e51b8152602060048201526014602482015273125b98dbdc9c9958dd0810d313c8185b5bdd5b9d60621b6044820152606401610962565b610a8b565b3415610a035760405162461bcd60e51b815260206004820152600a60248201526927b7363c903a37b5b2b760b11b6044820152606401610962565b6040516323b872dd60e01b8152336004820152306024820152604481018290526001600160a01b038316906323b872dd90606401602060405180830381600087803b158015610a5157600080fd5b505af1158015610a65573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a899190612bc2565b505b610a96338383612252565b5050565b33610aad6000546001600160a01b031690565b6001600160a01b031614610ad35760405162461bcd60e51b815260040161096290612ce1565b60006001600160a01b038216739fae2529863bd691b4a7171bdfcf33c7ebb10a651415610b1757600754600654610b0a9190612d6f565b6007546006559050610b91565b6040516370a0823160e01b81523060048201526001600160a01b038316906370a082319060240160206040518083038186803b158015610b5657600080fd5b505afa158015610b6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b8e9190612bf8565b90505b60405163a9059cbb60e01b8152336004820152602481018290526001600160a01b0383169063a9059cbb90604401602060405180830381600087803b158015610bd957600080fd5b505af1158015610bed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c119190612bc2565b50604080516001600160a01b0384168152602081018390527f542fa6bfee3b4746210fbdd1d83f9e49b65adde3639f8d8f165dd18347938af2910160405180910390a15050565b60026001541415610cab5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610962565b60026001558082108015610cc157506009548111155b610d0d5760405162461bcd60e51b815260206004820152601b60248201527f496e636f727265637420726f756e647320706172616d657465727300000000006044820152606401610962565b600c54600b5460009190845b84811015610f8f5760008181526002602090815260408083206001600160a01b038b1684529091529020548015610e905760008281526002602081815260408084206001600160a01b038d1685529091529091200154610e9057600082815260036020526040812060018101549054610d93908490612d50565b610d9d9190612d2e565b905060006064610dad8784612d50565b610db79190612d2e565b9050610dc38183612d6f565b610dcd9088612d16565b60008581526002602090815260408083206001600160a01b038f16845282528083206001018590558783526003909152902060050154909750610e11908690612d16565b6002600086815260200190815260200160002060008c6001600160a01b03166001600160a01b031681526020019081526020016000206002018190555060006002600086815260200190815260200160002060008c6001600160a01b03166001600160a01b031681526020019081526020016000206000018190555050505b60008281526002602090815260408083206001600160a01b038c1684529091529020600101548015801590610ee8575060008381526002602081815260408084206001600160a01b038e168552909152909120015442115b15610f7a57600085610efb836064612d50565b610f059190612d2e565b905060006064610f16836019612d50565b610f209190612d2e565b9050610f2c8184612d16565b610f369089612d16565b975060006002600087815260200190815260200160002060008d6001600160a01b03166001600160a01b031681526020019081526020016000206001018190555050505b50508080610f8790612d86565b915050610d19565b5060405163a9059cbb60e01b81526001600160a01b038716600482015260248101849052739fae2529863bd691b4a7171bdfcf33c7ebb10a659063a9059cbb90604401602060405180830381600087803b158015610fec57600080fd5b505af1158015611000573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110249190612bc2565b5050600180555050505050565b336110446000546001600160a01b031690565b6001600160a01b03161461106a5760405162461bcd60e51b815260040161096290612ce1565b6001600160a01b0381166110c05760405162461bcd60e51b815260206004820152601860248201527f5a65726f2061646472657373206e6f7420616c6c6f77656400000000000000006044820152606401610962565b60058054610100600160a81b0319166101006001600160a01b038416908102919091179091556040519081527f10f5824683d64a0712038f2244e046b174a1cc57fbb8556bfda5ffb2612440679060200160405180910390a150565b600954600c54600b546000928392909160015b8381101561136b5760008181526002602090815260408083206001600160a01b038b16845290915290205480156112975760008281526002602081815260408084206001600160a01b038d168552909152822001549081611206576000848152600360205260408120600181015490546111aa908690612d50565b6111b49190612d2e565b905060646111c28883612d50565b6111cc9190612d2e565b91506111d88282612d6f565b6111e2908b612d16565b600086815260036020526040902060050154909a50611202908790612d16565b9250505b428210156112515760008481526002602090815260408083206001600160a01b038e16845290915290206001015461123e908a612d16565b985061124a818a612d16565b9850611290565b60008481526002602090815260408083206001600160a01b038e1684529091529020600101546112819089612d16565b975061128d8189612d16565b97505b5050611358565b60008281526002602090815260408083206001600160a01b038c168452909152902060010154156113585760008281526002602081815260408084206001600160a01b038d16855290915290912001544211156113255760008281526002602090815260408083206001600160a01b038c16845290915290206001015461131e9088612d16565b9650611358565b60008281526002602090815260408083206001600160a01b038c1684529091529020600101546113559087612d16565b95505b508061136381612d86565b91505061112f565b50505050915091565b336113876000546001600160a01b031690565b6001600160a01b0316146113ad5760405162461bcd60e51b815260040161096290612ce1565b600e55565b336113c56000546001600160a01b031690565b6001600160a01b0316146113eb5760405162461bcd60e51b815260040161096290612ce1565b600c55565b336114036000546001600160a01b031690565b6001600160a01b0316146114295760405162461bcd60e51b815260040161096290612ce1565b600a55565b336114416000546001600160a01b031690565b6001600160a01b0316146114675760405162461bcd60e51b815260040161096290612ce1565b600854600954116114ba5760405162461bcd60e51b815260206004820152601760248201527f41756374696f6e206973206e6f742066696e69736865640000000000000000006044820152606401610962565b60006011546007546006546114cf9190612d6f565b6114d99190612d6f565b9050806115195760405162461bcd60e51b815260206004820152600e60248201526d27379029b7bc903a3790313ab93760911b6044820152606401610962565b80821115611525578091505b81601160008282546115379190612d16565b909155505060405163a9059cbb60e01b815261dead60901b600482015260248101839052739fae2529863bd691b4a7171bdfcf33c7ebb10a659063a9059cbb90604401602060405180830381600087803b15801561159457600080fd5b505af11580156115a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115cc9190612bc2565b505050565b336115e46000546001600160a01b031690565b6001600160a01b03161461160a5760405162461bcd60e51b815260040161096290612ce1565b600f55565b60608060606000806000600954905060018161162b9190612d6f565b67ffffffffffffffff81111561164357611643612dcd565b60405190808252806020026020018201604052801561166c578160200160208202803683370190505b50955061167a600182612d6f565b67ffffffffffffffff81111561169257611692612dcd565b6040519080825280602002602001820160405280156116bb578160200160208202803683370190505b5094506116c9600182612d6f565b67ffffffffffffffff8111156116e1576116e1612dcd565b60405190808252806020026020018201604052801561170a578160200160208202803683370190505b50600c54600b549195509060015b83811015611b585760008181526002602090815260408083206001600160a01b038e16845290915290205480156119775760006002600084815260200190815260200160002060008d6001600160a01b03166001600160a01b03168152602001908152602001600020600201549050600081600014156118bc576000848152600360205260408120600181015490546117b2908690612d50565b6117bc9190612d2e565b905060646117ca8883612d50565b6117d49190612d2e565b91506117e08282612d6f565b6117ea908b612d16565b600086815260036020526040902060050154909a5061180a908790612d16565b9250828c611819600188612d6f565b8151811061182957611829612db7565b6020908102919091010152818d611841600188612d6f565b8151811061185157611851612db7565b6020908102919091018101919091526000868152600390915260409020805460019091015461188890670de0b6b3a7640000612d50565b6118929190612d2e565b8b61189e600188612d6f565b815181106118ae576118ae612db7565b602002602001018181525050505b4282101561191c576002600085815260200190815260200160002060008e6001600160a01b03166001600160a01b0316815260200190815260200160002060010154896119099190612d16565b9850611915818a612d16565b9850611970565b6002600085815260200190815260200160002060008e6001600160a01b03166001600160a01b0316815260200190815260200160002060010154886119619190612d16565b975061196d8189612d16565b97505b5050611b45565b60008281526002602090815260408083206001600160a01b038f16845290915290206001015415611b45576002600083815260200190815260200160002060008c6001600160a01b03166001600160a01b0316815260200190815260200160002060020154896001846119ea9190612d6f565b815181106119fa576119fa612db7565b60209081029190910181019190915260008381526002825260408082206001600160a01b038f16835290925220600190810154908b90611a3a9085612d6f565b81518110611a4a57611a4a612db7565b60209081029190910181019190915260008381526003909152604090208054600190910154611a8190670de0b6b3a7640000612d50565b611a8b9190612d2e565b88611a97600185612d6f565b81518110611aa757611aa7612db7565b60209081029190910101524289611abf600185612d6f565b81518110611acf57611acf612db7565b60200260200101511015611b135789611ae9600184612d6f565b81518110611af957611af9612db7565b602002602001015187611b0c9190612d16565b9650611b45565b89611b1f600184612d6f565b81518110611b2f57611b2f612db7565b602002602001015186611b429190612d16565b95505b5080611b5081612d86565b915050611718565b5050505091939590929450565b611b73336001600954610c58565b565b33611b886000546001600160a01b031690565b6001600160a01b031614611bae5760405162461bcd60e51b815260040161096290612ce1565b6009546000908152600360205260409020546007548190611bd0908490612d16565b611bda9190612d6f565b60078190556006541015611c1f5760405162461bcd60e51b815260206004820152600c60248201526b15dc9bdb99c8185b5bdd5b9d60a21b6044820152606401610962565b6009546000908152600360205260409020829055600e54600f5468056bc75e2d631000009190611c4f9085612d50565b611c599190612d50565b611c639190612d2e565b600954600090815260036020526040902060020155600d54600f5468056bc75e2d631000009190611c949085612d50565b611c9e9190612d50565b611ca89190612d2e565b600954600090815260036020819052604090912001555050565b33611cd56000546001600160a01b031690565b6001600160a01b031614611cfb5760405162461bcd60e51b815260040161096290612ce1565b600954811015611d0a57600080fd5b600855565b33611d226000546001600160a01b031690565b6001600160a01b031614611d485760405162461bcd60e51b815260040161096290612ce1565b600b55565b33611d606000546001600160a01b031690565b6001600160a01b031614611d865760405162461bcd60e51b815260040161096290612ce1565b601055565b6000546001600160a01b031615611dda5760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b6044820152606401610962565b600080546001600160a01b0319163390811782556040519091907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a36301e13380600b55605a600d55600360105562015180600a5560a0600e556032600c5560b4600855565b611e51816001600954610c58565b50565b33739fae2529863bd691b4a7171bdfcf33c7ebb10a65148015611e8457506000546001600160a01b038581169116145b15611ea6578260066000828254611e9b9190612d16565b90915550611f069050565b3360009081526004602052604090205460ff16611efb5760405162461bcd60e51b8152602060048201526013602482015272151bdad95b881a5cdb89dd08185b1b1bddd959606a1b6044820152606401610962565b611f06843385612252565b50505050565b33611f1f6000546001600160a01b031690565b6001600160a01b031614611f455760405162461bcd60e51b815260040161096290612ce1565b6001600160a01b038216611f5857600080fd5b6001600160a01b03919091166000908152600460205260409020805460ff1916911515919091179055565b600954600081815260036020526040812060019081015492905b818111611fca57600081815260036020526040902060010154925080611fc281612d86565b915050611f9d565b50509091565b33611fe36000546001600160a01b031690565b6001600160a01b0316146120095760405162461bcd60e51b815260040161096290612ce1565b6009541561204b5760405162461bcd60e51b815260206004820152600f60248201526e4f6e6c79207374617274206f6e636560881b6044820152606401610962565b60065461208b5760405162461bcd60e51b815260206004820152600e60248201526d139bc814d3d6481d1bc81cd95b1b60921b6044820152606401610962565b600f81905560008052600360205269063ec042bd9bc2fbc1037f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff55610a96826124b4565b336120e26000546001600160a01b031690565b6001600160a01b0316146121085760405162461bcd60e51b815260040161096290612ce1565b6005805460ff1916911515919091179055565b3361212e6000546001600160a01b031690565b6001600160a01b0316146121545760405162461bcd60e51b815260040161096290612ce1565b600d55565b3361216c6000546001600160a01b031690565b6001600160a01b0316146121925760405162461bcd60e51b815260040161096290612ce1565b6001600160a01b0381166121f75760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610962565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60055460ff161561228e5760405162461bcd60e51b815260206004820152600660248201526514185d5cd95960d21b6044820152606401610962565b600260015414156122e15760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610962565b60026001556122ee612698565b15612303576122fe828285612847565b6124ab565b600954600061231184612911565b6000838152600360209081526040808320600283528184206001600160a01b038b16855290925282209293509190670de0b6b3a76400006123528588612d50565b61235c9190612d2e565b836001015461236b9190612d16565b9050826002015481106123ed57600083600201548261238a9190612d6f565b90508461239f82670de0b6b3a7640000612d50565b6123a99190612d2e565b9050868111156123b65750855b600284015460018501556123ca8188612d6f565b96506123d5426129a5565b5080156123e7576123e788828b612847565b506123f5565b600183018190555b6000670de0b6b3a764000061240a8689612d50565b6124149190612d2e565b90508083600001600082825461242a9190612d16565b909155505060055461244d908990899061010090046001600160a01b0316612847565b876001600160a01b0316896001600160a01b0316877f6474f1bb997bda2619fcace4051842a3232e75c34ea64c058221f1718e2aa990848b60405161249c929190918252602082015260400190565b60405180910390a45050505050505b50506001805550565b600980549060006124c483612d86565b919050555060085460095411156125145760405162461bcd60e51b8152602060048201526014602482015273105b1b081c9bdd5b991cc818dbdb5c1b195d195960621b6044820152606401610962565b600954600090815260036020526040902060048101829055600a546125399083612d16565b6005820155600a546000906201518014156125ca57670de0b6b3a7640000670e1df0928867de006003600060016009546125739190612d6f565b81526020019081526020016000206000015461258f9190612d50565b6125999190612d2e565b9050806007546006546125ac9190612d6f565b10156125c5576007546006546125c29190612d6f565b90505b612609565b600060095460085460016125de9190612d16565b6125e89190612d6f565b9050806007546006546125fb9190612d6f565b6126059190612d2e565b9150505b80825560078054829190600090612621908490612d16565b9091555050600e54600f5468056bc75e2d6310000091906126429084612d50565b61264c9190612d50565b6126569190612d2e565b6002830155600d54600f5468056bc75e2d6310000091906126779084612d50565b6126819190612d50565b61268b9190612d2e565b8260030181905550505050565b600954600090815260036020526040812060048101544210156126fd5760405162461bcd60e51b815260206004820152601a60248201527f41756374696f6e206973206e6f742073746172746564207965740000000000006044820152606401610962565b60085460095411156127475760405162461bcd60e51b8152602060048201526013602482015272105d58dd1a5bdb881a5cc8199a5b9a5cda1959606a1b6044820152606401610962565b80546127865760405162461bcd60e51b815260206004820152600e60248201526d139bc814d3d6481d1bc81cd95b1b60921b6044820152606401610962565b4281600501541161284357806003015481600101541015612833576000600a548260040154426127b69190612d6f565b6127c09190612d2e565b90506010548110156127fd57600a546127da826001612d16565b6127e49190612d50565b82600401546127f39190612d16565b6005830155505090565b600a5460105461280d9190612d50565b826004015461281c9190612d16565b6005830181905561282c906129a5565b9250505090565b61284081600501546129a5565b91505b5090565b6001600160a01b0383166001141561288f576040516001600160a01b0382169083156108fc029084906000818181858888f19350505050158015611f06573d6000803e3d6000fd5b60405163a9059cbb60e01b81526001600160a01b0382811660048301526024820184905284169063a9059cbb90604401602060405180830381600087803b1580156128d957600080fd5b505af11580156128ed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f069190612bc2565b6040516341976e0960e01b81526001600160a01b0382166004820152600090739bfc3046ea26f8b09d3e85bd22aec96c80d957e3906341976e099060240160206040518083038186803b15801561296757600080fd5b505afa15801561297b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061299f9190612bf8565b92915050565b6009546000908152600360205260408120805460018201546129cf90670de0b6b3a7640000612d50565b6129d99190612d2e565b600f55600954815460018301546040517fda434ed10dd96aabd2bd460ecb942c9ff048dc71c68baf0a5e94e8ddbeb603b892612a1d92908252602082015260400190565b60405180910390a26008546009541415612a4f5760098054906000612a4183612d86565b919050555060019150612a58565b612a58836124b4565b50919050565b600060208284031215612a7057600080fd5b8135612a7b81612de3565b9392505050565b60008060408385031215612a9557600080fd5b8235612aa081612de3565b91506020830135612ab081612df8565b809150509250929050565b60008060408385031215612ace57600080fd5b8235612ad981612de3565b946020939093013593505050565b60008060008060608587031215612afd57600080fd5b8435612b0881612de3565b935060208501359250604085013567ffffffffffffffff80821115612b2c57600080fd5b818701915087601f830112612b4057600080fd5b813581811115612b4f57600080fd5b886020828501011115612b6157600080fd5b95989497505060200194505050565b600080600060608486031215612b8557600080fd5b8335612b9081612de3565b95602085013595506040909401359392505050565b600060208284031215612bb757600080fd5b8135612a7b81612df8565b600060208284031215612bd457600080fd5b8151612a7b81612df8565b600060208284031215612bf157600080fd5b5035919050565b600060208284031215612c0a57600080fd5b5051919050565b60008060408385031215612c2457600080fd5b823591506020830135612ab081612de3565b60008060408385031215612c4957600080fd5b50508035926020909101359150565b600081518084526020808501945080840160005b83811015612c8857815187529582019590820190600101612c6c565b509495945050505050565b60a081526000612ca660a0830188612c58565b8281036020840152612cb88188612c58565b90508281036040840152612ccc8187612c58565b60608401959095525050608001529392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115612d2957612d29612da1565b500190565b600082612d4b57634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615612d6a57612d6a612da1565b500290565b600082821015612d8157612d81612da1565b500390565b6000600019821415612d9a57612d9a612da1565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114611e5157600080fd5b8015158114611e5157600080fdfea264697066735822122021f9a157c1d0d180af060f955937afd8a2ab0f7d3893f9737790a0b43e1c229964736f6c63430008070033
Deployed ByteCode
0x60806040526004361061028b5760003560e01c8063601ce32d1161015a5780639cbe5efd116100c1578063c59cb9f41161007a578063c59cb9f414610828578063debb114314610848578063f2fde38b1461085e578063f644b3bb1461087e578063f7cb789a146108dc578063fe1cdb23146108f257600080fd5b80639cbe5efd1461071e5780639f3713b714610734578063a85f4e811461074a578063ab286934146107ce578063b187bd26146107ee578063bedb86fb1461080857600080fd5b80638129fc1c116101135780638129fc1c14610676578063889014961461068b5780638943ec02146106ab5780638aaa2284146106cb5780638c7a529f146106eb5780638da5cb5b1461070057600080fd5b8063601ce32d14610593578063741bef1a146105a9578063756742f8146105d157806376cdb03b14610611578063779972da146106365780637cd428421461065657600080fd5b806336c92c3f116101fe5780634e71d92d116101b75780634e71d92d146104cc5780634ef6aa71146104e15780635113aea91461052157806351bddee81461054157806359e741d2146105575780635f26e73e1461057357600080fd5b806336c92c3f146104125780633b50261f146104325780633fd8b02f1461044557806342966c681461045b578063443e52041461047b5780634a48c84b1461049b57600080fd5b80631cd27551116102505780631cd275511461034157806320f634b5146103575780632155e43e1461038c578063226125a8146103ac5780632fc10aaf146103cc578063356442b9146103fc57600080fd5b8062ae3bf8146102a2578063073caa3c146102c257806307f003c3146102e2578063090d23b91461030b57806311a9dd3b1461032b57600080fd5b3661029d5761029b600134610908565b005b600080fd5b3480156102ae57600080fd5b5061029b6102bd366004612a5e565b610a9a565b3480156102ce57600080fd5b5061029b6102dd366004612b70565b610c58565b3480156102ee57600080fd5b506102f860115481565b6040519081526020015b60405180910390f35b34801561031757600080fd5b5061029b610326366004612a5e565b611031565b34801561033757600080fd5b506102f8600d5481565b34801561034d57600080fd5b506102f860065481565b34801561036357600080fd5b50610377610372366004612a5e565b61111c565b60408051928352602083019190915201610302565b34801561039857600080fd5b5061029b6103a7366004612bdf565b611374565b3480156103b857600080fd5b5061029b6103c7366004612bdf565b6113b2565b3480156103d857600080fd5b506102f86103e7366004612bdf565b60009081526003602052604090206001015490565b34801561040857600080fd5b506102f8600c5481565b34801561041e57600080fd5b5061029b61042d366004612bdf565b6113f0565b61029b610440366004612abb565b610908565b34801561045157600080fd5b506102f8600b5481565b34801561046757600080fd5b5061029b610476366004612bdf565b61142e565b34801561048757600080fd5b5061029b610496366004612bdf565b6115d1565b3480156104a757600080fd5b506104bb6104b6366004612a5e565b61160f565b604051610302959493929190612c93565b3480156104d857600080fd5b5061029b611b65565b3480156104ed57600080fd5b50610509739fae2529863bd691b4a7171bdfcf33c7ebb10a6581565b6040516001600160a01b039091168152602001610302565b34801561052d57600080fd5b5061029b61053c366004612bdf565b611b75565b34801561054d57600080fd5b506102f8600e5481565b34801561056357600080fd5b506102f8670e1df0928867de0081565b34801561057f57600080fd5b5061029b61058e366004612bdf565b611cc2565b34801561059f57600080fd5b506102f8600f5481565b3480156105b557600080fd5b50610509739bfc3046ea26f8b09d3e85bd22aec96c80d957e381565b3480156105dd57600080fd5b506106016105ec366004612a5e565b60046020526000908152604090205460ff1681565b6040519015158152602001610302565b34801561061d57600080fd5b506005546105099061010090046001600160a01b031681565b34801561064257600080fd5b5061029b610651366004612bdf565b611d0f565b34801561066257600080fd5b5061029b610671366004612bdf565b611d4d565b34801561068257600080fd5b5061029b611d8b565b34801561069757600080fd5b5061029b6106a6366004612a5e565b611e43565b3480156106b757600080fd5b5061029b6106c6366004612ae7565b611e54565b3480156106d757600080fd5b5061029b6106e6366004612a82565b611f0c565b3480156106f757600080fd5b50610377611f83565b34801561070c57600080fd5b506000546001600160a01b0316610509565b34801561072a57600080fd5b506102f860095481565b34801561074057600080fd5b506102f860075481565b34801561075657600080fd5b506107a1610765366004612bdf565b60036020528060005260406000206000915090508060000154908060010154908060020154908060030154908060040154908060050154905086565b604080519687526020870195909552938501929092526060840152608083015260a082015260c001610302565b3480156107da57600080fd5b5061029b6107e9366004612c36565b611fd0565b3480156107fa57600080fd5b506005546106019060ff1681565b34801561081457600080fd5b5061029b610823366004612ba5565b6120cf565b34801561083457600080fd5b5061029b610843366004612bdf565b61211b565b34801561085457600080fd5b506102f860085481565b34801561086a57600080fd5b5061029b610879366004612a5e565b612159565b34801561088a57600080fd5b506108c1610899366004612c11565b6002602081815260009384526040808520909152918352912080546001820154919092015483565b60408051938452602084019290925290820152606001610302565b3480156108e857600080fd5b506102f8600a5481565b3480156108fe57600080fd5b506102f860105481565b6001600160a01b03821660009081526004602052604090205460ff1661096b5760405162461bcd60e51b8152602060048201526013602482015272151bdad95b881a5cdb89dd08185b1b1bddd959606a1b60448201526064015b60405180910390fd5b6001600160a01b038216600114156109c8573481146109c35760405162461bcd60e51b8152602060048201526014602482015273125b98dbdc9c9958dd0810d313c8185b5bdd5b9d60621b6044820152606401610962565b610a8b565b3415610a035760405162461bcd60e51b815260206004820152600a60248201526927b7363c903a37b5b2b760b11b6044820152606401610962565b6040516323b872dd60e01b8152336004820152306024820152604481018290526001600160a01b038316906323b872dd90606401602060405180830381600087803b158015610a5157600080fd5b505af1158015610a65573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a899190612bc2565b505b610a96338383612252565b5050565b33610aad6000546001600160a01b031690565b6001600160a01b031614610ad35760405162461bcd60e51b815260040161096290612ce1565b60006001600160a01b038216739fae2529863bd691b4a7171bdfcf33c7ebb10a651415610b1757600754600654610b0a9190612d6f565b6007546006559050610b91565b6040516370a0823160e01b81523060048201526001600160a01b038316906370a082319060240160206040518083038186803b158015610b5657600080fd5b505afa158015610b6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b8e9190612bf8565b90505b60405163a9059cbb60e01b8152336004820152602481018290526001600160a01b0383169063a9059cbb90604401602060405180830381600087803b158015610bd957600080fd5b505af1158015610bed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c119190612bc2565b50604080516001600160a01b0384168152602081018390527f542fa6bfee3b4746210fbdd1d83f9e49b65adde3639f8d8f165dd18347938af2910160405180910390a15050565b60026001541415610cab5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610962565b60026001558082108015610cc157506009548111155b610d0d5760405162461bcd60e51b815260206004820152601b60248201527f496e636f727265637420726f756e647320706172616d657465727300000000006044820152606401610962565b600c54600b5460009190845b84811015610f8f5760008181526002602090815260408083206001600160a01b038b1684529091529020548015610e905760008281526002602081815260408084206001600160a01b038d1685529091529091200154610e9057600082815260036020526040812060018101549054610d93908490612d50565b610d9d9190612d2e565b905060006064610dad8784612d50565b610db79190612d2e565b9050610dc38183612d6f565b610dcd9088612d16565b60008581526002602090815260408083206001600160a01b038f16845282528083206001018590558783526003909152902060050154909750610e11908690612d16565b6002600086815260200190815260200160002060008c6001600160a01b03166001600160a01b031681526020019081526020016000206002018190555060006002600086815260200190815260200160002060008c6001600160a01b03166001600160a01b031681526020019081526020016000206000018190555050505b60008281526002602090815260408083206001600160a01b038c1684529091529020600101548015801590610ee8575060008381526002602081815260408084206001600160a01b038e168552909152909120015442115b15610f7a57600085610efb836064612d50565b610f059190612d2e565b905060006064610f16836019612d50565b610f209190612d2e565b9050610f2c8184612d16565b610f369089612d16565b975060006002600087815260200190815260200160002060008d6001600160a01b03166001600160a01b031681526020019081526020016000206001018190555050505b50508080610f8790612d86565b915050610d19565b5060405163a9059cbb60e01b81526001600160a01b038716600482015260248101849052739fae2529863bd691b4a7171bdfcf33c7ebb10a659063a9059cbb90604401602060405180830381600087803b158015610fec57600080fd5b505af1158015611000573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110249190612bc2565b5050600180555050505050565b336110446000546001600160a01b031690565b6001600160a01b03161461106a5760405162461bcd60e51b815260040161096290612ce1565b6001600160a01b0381166110c05760405162461bcd60e51b815260206004820152601860248201527f5a65726f2061646472657373206e6f7420616c6c6f77656400000000000000006044820152606401610962565b60058054610100600160a81b0319166101006001600160a01b038416908102919091179091556040519081527f10f5824683d64a0712038f2244e046b174a1cc57fbb8556bfda5ffb2612440679060200160405180910390a150565b600954600c54600b546000928392909160015b8381101561136b5760008181526002602090815260408083206001600160a01b038b16845290915290205480156112975760008281526002602081815260408084206001600160a01b038d168552909152822001549081611206576000848152600360205260408120600181015490546111aa908690612d50565b6111b49190612d2e565b905060646111c28883612d50565b6111cc9190612d2e565b91506111d88282612d6f565b6111e2908b612d16565b600086815260036020526040902060050154909a50611202908790612d16565b9250505b428210156112515760008481526002602090815260408083206001600160a01b038e16845290915290206001015461123e908a612d16565b985061124a818a612d16565b9850611290565b60008481526002602090815260408083206001600160a01b038e1684529091529020600101546112819089612d16565b975061128d8189612d16565b97505b5050611358565b60008281526002602090815260408083206001600160a01b038c168452909152902060010154156113585760008281526002602081815260408084206001600160a01b038d16855290915290912001544211156113255760008281526002602090815260408083206001600160a01b038c16845290915290206001015461131e9088612d16565b9650611358565b60008281526002602090815260408083206001600160a01b038c1684529091529020600101546113559087612d16565b95505b508061136381612d86565b91505061112f565b50505050915091565b336113876000546001600160a01b031690565b6001600160a01b0316146113ad5760405162461bcd60e51b815260040161096290612ce1565b600e55565b336113c56000546001600160a01b031690565b6001600160a01b0316146113eb5760405162461bcd60e51b815260040161096290612ce1565b600c55565b336114036000546001600160a01b031690565b6001600160a01b0316146114295760405162461bcd60e51b815260040161096290612ce1565b600a55565b336114416000546001600160a01b031690565b6001600160a01b0316146114675760405162461bcd60e51b815260040161096290612ce1565b600854600954116114ba5760405162461bcd60e51b815260206004820152601760248201527f41756374696f6e206973206e6f742066696e69736865640000000000000000006044820152606401610962565b60006011546007546006546114cf9190612d6f565b6114d99190612d6f565b9050806115195760405162461bcd60e51b815260206004820152600e60248201526d27379029b7bc903a3790313ab93760911b6044820152606401610962565b80821115611525578091505b81601160008282546115379190612d16565b909155505060405163a9059cbb60e01b815261dead60901b600482015260248101839052739fae2529863bd691b4a7171bdfcf33c7ebb10a659063a9059cbb90604401602060405180830381600087803b15801561159457600080fd5b505af11580156115a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115cc9190612bc2565b505050565b336115e46000546001600160a01b031690565b6001600160a01b03161461160a5760405162461bcd60e51b815260040161096290612ce1565b600f55565b60608060606000806000600954905060018161162b9190612d6f565b67ffffffffffffffff81111561164357611643612dcd565b60405190808252806020026020018201604052801561166c578160200160208202803683370190505b50955061167a600182612d6f565b67ffffffffffffffff81111561169257611692612dcd565b6040519080825280602002602001820160405280156116bb578160200160208202803683370190505b5094506116c9600182612d6f565b67ffffffffffffffff8111156116e1576116e1612dcd565b60405190808252806020026020018201604052801561170a578160200160208202803683370190505b50600c54600b549195509060015b83811015611b585760008181526002602090815260408083206001600160a01b038e16845290915290205480156119775760006002600084815260200190815260200160002060008d6001600160a01b03166001600160a01b03168152602001908152602001600020600201549050600081600014156118bc576000848152600360205260408120600181015490546117b2908690612d50565b6117bc9190612d2e565b905060646117ca8883612d50565b6117d49190612d2e565b91506117e08282612d6f565b6117ea908b612d16565b600086815260036020526040902060050154909a5061180a908790612d16565b9250828c611819600188612d6f565b8151811061182957611829612db7565b6020908102919091010152818d611841600188612d6f565b8151811061185157611851612db7565b6020908102919091018101919091526000868152600390915260409020805460019091015461188890670de0b6b3a7640000612d50565b6118929190612d2e565b8b61189e600188612d6f565b815181106118ae576118ae612db7565b602002602001018181525050505b4282101561191c576002600085815260200190815260200160002060008e6001600160a01b03166001600160a01b0316815260200190815260200160002060010154896119099190612d16565b9850611915818a612d16565b9850611970565b6002600085815260200190815260200160002060008e6001600160a01b03166001600160a01b0316815260200190815260200160002060010154886119619190612d16565b975061196d8189612d16565b97505b5050611b45565b60008281526002602090815260408083206001600160a01b038f16845290915290206001015415611b45576002600083815260200190815260200160002060008c6001600160a01b03166001600160a01b0316815260200190815260200160002060020154896001846119ea9190612d6f565b815181106119fa576119fa612db7565b60209081029190910181019190915260008381526002825260408082206001600160a01b038f16835290925220600190810154908b90611a3a9085612d6f565b81518110611a4a57611a4a612db7565b60209081029190910181019190915260008381526003909152604090208054600190910154611a8190670de0b6b3a7640000612d50565b611a8b9190612d2e565b88611a97600185612d6f565b81518110611aa757611aa7612db7565b60209081029190910101524289611abf600185612d6f565b81518110611acf57611acf612db7565b60200260200101511015611b135789611ae9600184612d6f565b81518110611af957611af9612db7565b602002602001015187611b0c9190612d16565b9650611b45565b89611b1f600184612d6f565b81518110611b2f57611b2f612db7565b602002602001015186611b429190612d16565b95505b5080611b5081612d86565b915050611718565b5050505091939590929450565b611b73336001600954610c58565b565b33611b886000546001600160a01b031690565b6001600160a01b031614611bae5760405162461bcd60e51b815260040161096290612ce1565b6009546000908152600360205260409020546007548190611bd0908490612d16565b611bda9190612d6f565b60078190556006541015611c1f5760405162461bcd60e51b815260206004820152600c60248201526b15dc9bdb99c8185b5bdd5b9d60a21b6044820152606401610962565b6009546000908152600360205260409020829055600e54600f5468056bc75e2d631000009190611c4f9085612d50565b611c599190612d50565b611c639190612d2e565b600954600090815260036020526040902060020155600d54600f5468056bc75e2d631000009190611c949085612d50565b611c9e9190612d50565b611ca89190612d2e565b600954600090815260036020819052604090912001555050565b33611cd56000546001600160a01b031690565b6001600160a01b031614611cfb5760405162461bcd60e51b815260040161096290612ce1565b600954811015611d0a57600080fd5b600855565b33611d226000546001600160a01b031690565b6001600160a01b031614611d485760405162461bcd60e51b815260040161096290612ce1565b600b55565b33611d606000546001600160a01b031690565b6001600160a01b031614611d865760405162461bcd60e51b815260040161096290612ce1565b601055565b6000546001600160a01b031615611dda5760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b6044820152606401610962565b600080546001600160a01b0319163390811782556040519091907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a36301e13380600b55605a600d55600360105562015180600a5560a0600e556032600c5560b4600855565b611e51816001600954610c58565b50565b33739fae2529863bd691b4a7171bdfcf33c7ebb10a65148015611e8457506000546001600160a01b038581169116145b15611ea6578260066000828254611e9b9190612d16565b90915550611f069050565b3360009081526004602052604090205460ff16611efb5760405162461bcd60e51b8152602060048201526013602482015272151bdad95b881a5cdb89dd08185b1b1bddd959606a1b6044820152606401610962565b611f06843385612252565b50505050565b33611f1f6000546001600160a01b031690565b6001600160a01b031614611f455760405162461bcd60e51b815260040161096290612ce1565b6001600160a01b038216611f5857600080fd5b6001600160a01b03919091166000908152600460205260409020805460ff1916911515919091179055565b600954600081815260036020526040812060019081015492905b818111611fca57600081815260036020526040902060010154925080611fc281612d86565b915050611f9d565b50509091565b33611fe36000546001600160a01b031690565b6001600160a01b0316146120095760405162461bcd60e51b815260040161096290612ce1565b6009541561204b5760405162461bcd60e51b815260206004820152600f60248201526e4f6e6c79207374617274206f6e636560881b6044820152606401610962565b60065461208b5760405162461bcd60e51b815260206004820152600e60248201526d139bc814d3d6481d1bc81cd95b1b60921b6044820152606401610962565b600f81905560008052600360205269063ec042bd9bc2fbc1037f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff55610a96826124b4565b336120e26000546001600160a01b031690565b6001600160a01b0316146121085760405162461bcd60e51b815260040161096290612ce1565b6005805460ff1916911515919091179055565b3361212e6000546001600160a01b031690565b6001600160a01b0316146121545760405162461bcd60e51b815260040161096290612ce1565b600d55565b3361216c6000546001600160a01b031690565b6001600160a01b0316146121925760405162461bcd60e51b815260040161096290612ce1565b6001600160a01b0381166121f75760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610962565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60055460ff161561228e5760405162461bcd60e51b815260206004820152600660248201526514185d5cd95960d21b6044820152606401610962565b600260015414156122e15760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610962565b60026001556122ee612698565b15612303576122fe828285612847565b6124ab565b600954600061231184612911565b6000838152600360209081526040808320600283528184206001600160a01b038b16855290925282209293509190670de0b6b3a76400006123528588612d50565b61235c9190612d2e565b836001015461236b9190612d16565b9050826002015481106123ed57600083600201548261238a9190612d6f565b90508461239f82670de0b6b3a7640000612d50565b6123a99190612d2e565b9050868111156123b65750855b600284015460018501556123ca8188612d6f565b96506123d5426129a5565b5080156123e7576123e788828b612847565b506123f5565b600183018190555b6000670de0b6b3a764000061240a8689612d50565b6124149190612d2e565b90508083600001600082825461242a9190612d16565b909155505060055461244d908990899061010090046001600160a01b0316612847565b876001600160a01b0316896001600160a01b0316877f6474f1bb997bda2619fcace4051842a3232e75c34ea64c058221f1718e2aa990848b60405161249c929190918252602082015260400190565b60405180910390a45050505050505b50506001805550565b600980549060006124c483612d86565b919050555060085460095411156125145760405162461bcd60e51b8152602060048201526014602482015273105b1b081c9bdd5b991cc818dbdb5c1b195d195960621b6044820152606401610962565b600954600090815260036020526040902060048101829055600a546125399083612d16565b6005820155600a546000906201518014156125ca57670de0b6b3a7640000670e1df0928867de006003600060016009546125739190612d6f565b81526020019081526020016000206000015461258f9190612d50565b6125999190612d2e565b9050806007546006546125ac9190612d6f565b10156125c5576007546006546125c29190612d6f565b90505b612609565b600060095460085460016125de9190612d16565b6125e89190612d6f565b9050806007546006546125fb9190612d6f565b6126059190612d2e565b9150505b80825560078054829190600090612621908490612d16565b9091555050600e54600f5468056bc75e2d6310000091906126429084612d50565b61264c9190612d50565b6126569190612d2e565b6002830155600d54600f5468056bc75e2d6310000091906126779084612d50565b6126819190612d50565b61268b9190612d2e565b8260030181905550505050565b600954600090815260036020526040812060048101544210156126fd5760405162461bcd60e51b815260206004820152601a60248201527f41756374696f6e206973206e6f742073746172746564207965740000000000006044820152606401610962565b60085460095411156127475760405162461bcd60e51b8152602060048201526013602482015272105d58dd1a5bdb881a5cc8199a5b9a5cda1959606a1b6044820152606401610962565b80546127865760405162461bcd60e51b815260206004820152600e60248201526d139bc814d3d6481d1bc81cd95b1b60921b6044820152606401610962565b4281600501541161284357806003015481600101541015612833576000600a548260040154426127b69190612d6f565b6127c09190612d2e565b90506010548110156127fd57600a546127da826001612d16565b6127e49190612d50565b82600401546127f39190612d16565b6005830155505090565b600a5460105461280d9190612d50565b826004015461281c9190612d16565b6005830181905561282c906129a5565b9250505090565b61284081600501546129a5565b91505b5090565b6001600160a01b0383166001141561288f576040516001600160a01b0382169083156108fc029084906000818181858888f19350505050158015611f06573d6000803e3d6000fd5b60405163a9059cbb60e01b81526001600160a01b0382811660048301526024820184905284169063a9059cbb90604401602060405180830381600087803b1580156128d957600080fd5b505af11580156128ed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f069190612bc2565b6040516341976e0960e01b81526001600160a01b0382166004820152600090739bfc3046ea26f8b09d3e85bd22aec96c80d957e3906341976e099060240160206040518083038186803b15801561296757600080fd5b505afa15801561297b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061299f9190612bf8565b92915050565b6009546000908152600360205260408120805460018201546129cf90670de0b6b3a7640000612d50565b6129d99190612d2e565b600f55600954815460018301546040517fda434ed10dd96aabd2bd460ecb942c9ff048dc71c68baf0a5e94e8ddbeb603b892612a1d92908252602082015260400190565b60405180910390a26008546009541415612a4f5760098054906000612a4183612d86565b919050555060019150612a58565b612a58836124b4565b50919050565b600060208284031215612a7057600080fd5b8135612a7b81612de3565b9392505050565b60008060408385031215612a9557600080fd5b8235612aa081612de3565b91506020830135612ab081612df8565b809150509250929050565b60008060408385031215612ace57600080fd5b8235612ad981612de3565b946020939093013593505050565b60008060008060608587031215612afd57600080fd5b8435612b0881612de3565b935060208501359250604085013567ffffffffffffffff80821115612b2c57600080fd5b818701915087601f830112612b4057600080fd5b813581811115612b4f57600080fd5b886020828501011115612b6157600080fd5b95989497505060200194505050565b600080600060608486031215612b8557600080fd5b8335612b9081612de3565b95602085013595506040909401359392505050565b600060208284031215612bb757600080fd5b8135612a7b81612df8565b600060208284031215612bd457600080fd5b8151612a7b81612df8565b600060208284031215612bf157600080fd5b5035919050565b600060208284031215612c0a57600080fd5b5051919050565b60008060408385031215612c2457600080fd5b823591506020830135612ab081612de3565b60008060408385031215612c4957600080fd5b50508035926020909101359150565b600081518084526020808501945080840160005b83811015612c8857815187529582019590820190600101612c6c565b509495945050505050565b60a081526000612ca660a0830188612c58565b8281036020840152612cb88188612c58565b90508281036040840152612ccc8187612c58565b60608401959095525050608001529392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115612d2957612d29612da1565b500190565b600082612d4b57634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615612d6a57612d6a612da1565b500290565b600082821015612d8157612d81612da1565b500390565b6000600019821415612d9a57612d9a612da1565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114611e5157600080fd5b8015158114611e5157600080fdfea264697066735822122021f9a157c1d0d180af060f955937afd8a2ab0f7d3893f9737790a0b43e1c229964736f6c63430008070033