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:18.402107Z
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) {
soyToClaim += soyAmount;
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
0x608060405234801561001057600080fd5b5060018055612de2806100246000396000f3fe60806040526004361061028b5760003560e01c8063601ce32d1161015a5780639cbe5efd116100c1578063c59cb9f41161007a578063c59cb9f414610828578063debb114314610848578063f2fde38b1461085e578063f644b3bb1461087e578063f7cb789a146108dc578063fe1cdb23146108f257600080fd5b80639cbe5efd1461071e5780639f3713b714610734578063a85f4e811461074a578063ab286934146107ce578063b187bd26146107ee578063bedb86fb1461080857600080fd5b80638129fc1c116101135780638129fc1c14610676578063889014961461068b5780638943ec02146106ab5780638aaa2284146106cb5780638c7a529f146106eb5780638da5cb5b1461070057600080fd5b8063601ce32d14610593578063741bef1a146105a9578063756742f8146105d157806376cdb03b14610611578063779972da146106365780637cd428421461065657600080fd5b806336c92c3f116101fe5780634e71d92d116101b75780634e71d92d146104cc5780634ef6aa71146104e15780635113aea91461052157806351bddee81461054157806359e741d2146105575780635f26e73e1461057357600080fd5b806336c92c3f146104125780633b50261f146104325780633fd8b02f1461044557806342966c681461045b578063443e52041461047b5780634a48c84b1461049b57600080fd5b80631cd27551116102505780631cd275511461034157806320f634b5146103575780632155e43e1461038c578063226125a8146103ac5780632fc10aaf146103cc578063356442b9146103fc57600080fd5b8062ae3bf8146102a2578063073caa3c146102c257806307f003c3146102e2578063090d23b91461030b57806311a9dd3b1461032b57600080fd5b3661029d5761029b600134610908565b005b600080fd5b3480156102ae57600080fd5b5061029b6102bd366004612a04565b610a9a565b3480156102ce57600080fd5b5061029b6102dd366004612b16565b610c58565b3480156102ee57600080fd5b506102f860115481565b6040519081526020015b60405180910390f35b34801561031757600080fd5b5061029b610326366004612a04565b610fd7565b34801561033757600080fd5b506102f8600d5481565b34801561034d57600080fd5b506102f860065481565b34801561036357600080fd5b50610377610372366004612a04565b6110c2565b60408051928352602083019190915201610302565b34801561039857600080fd5b5061029b6103a7366004612b85565b61131a565b3480156103b857600080fd5b5061029b6103c7366004612b85565b611358565b3480156103d857600080fd5b506102f86103e7366004612b85565b60009081526003602052604090206001015490565b34801561040857600080fd5b506102f8600c5481565b34801561041e57600080fd5b5061029b61042d366004612b85565b611396565b61029b610440366004612a61565b610908565b34801561045157600080fd5b506102f8600b5481565b34801561046757600080fd5b5061029b610476366004612b85565b6113d4565b34801561048757600080fd5b5061029b610496366004612b85565b611577565b3480156104a757600080fd5b506104bb6104b6366004612a04565b6115b5565b604051610302959493929190612c39565b3480156104d857600080fd5b5061029b611b0b565b3480156104ed57600080fd5b50610509739fae2529863bd691b4a7171bdfcf33c7ebb10a6581565b6040516001600160a01b039091168152602001610302565b34801561052d57600080fd5b5061029b61053c366004612b85565b611b1b565b34801561054d57600080fd5b506102f8600e5481565b34801561056357600080fd5b506102f8670e1df0928867de0081565b34801561057f57600080fd5b5061029b61058e366004612b85565b611c68565b34801561059f57600080fd5b506102f8600f5481565b3480156105b557600080fd5b50610509739bfc3046ea26f8b09d3e85bd22aec96c80d957e381565b3480156105dd57600080fd5b506106016105ec366004612a04565b60046020526000908152604090205460ff1681565b6040519015158152602001610302565b34801561061d57600080fd5b506005546105099061010090046001600160a01b031681565b34801561064257600080fd5b5061029b610651366004612b85565b611cb5565b34801561066257600080fd5b5061029b610671366004612b85565b611cf3565b34801561068257600080fd5b5061029b611d31565b34801561069757600080fd5b5061029b6106a6366004612a04565b611de9565b3480156106b757600080fd5b5061029b6106c6366004612a8d565b611dfa565b3480156106d757600080fd5b5061029b6106e6366004612a28565b611eb2565b3480156106f757600080fd5b50610377611f29565b34801561070c57600080fd5b506000546001600160a01b0316610509565b34801561072a57600080fd5b506102f860095481565b34801561074057600080fd5b506102f860075481565b34801561075657600080fd5b506107a1610765366004612b85565b60036020528060005260406000206000915090508060000154908060010154908060020154908060030154908060040154908060050154905086565b604080519687526020870195909552938501929092526060840152608083015260a082015260c001610302565b3480156107da57600080fd5b5061029b6107e9366004612bdc565b611f76565b3480156107fa57600080fd5b506005546106019060ff1681565b34801561081457600080fd5b5061029b610823366004612b4b565b612075565b34801561083457600080fd5b5061029b610843366004612b85565b6120c1565b34801561085457600080fd5b506102f860085481565b34801561086a57600080fd5b5061029b610879366004612a04565b6120ff565b34801561088a57600080fd5b506108c1610899366004612bb7565b6002602081815260009384526040808520909152918352912080546001820154919092015483565b60408051938452602084019290925290820152606001610302565b3480156108e857600080fd5b506102f8600a5481565b3480156108fe57600080fd5b506102f860105481565b6001600160a01b03821660009081526004602052604090205460ff1661096b5760405162461bcd60e51b8152602060048201526013602482015272151bdad95b881a5cdb89dd08185b1b1bddd959606a1b60448201526064015b60405180910390fd5b6001600160a01b038216600114156109c8573481146109c35760405162461bcd60e51b8152602060048201526014602482015273125b98dbdc9c9958dd0810d313c8185b5bdd5b9d60621b6044820152606401610962565b610a8b565b3415610a035760405162461bcd60e51b815260206004820152600a60248201526927b7363c903a37b5b2b760b11b6044820152606401610962565b6040516323b872dd60e01b8152336004820152306024820152604481018290526001600160a01b038316906323b872dd90606401602060405180830381600087803b158015610a5157600080fd5b505af1158015610a65573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a899190612b68565b505b610a963383836121f8565b5050565b33610aad6000546001600160a01b031690565b6001600160a01b031614610ad35760405162461bcd60e51b815260040161096290612c87565b60006001600160a01b038216739fae2529863bd691b4a7171bdfcf33c7ebb10a651415610b1757600754600654610b0a9190612d15565b6007546006559050610b91565b6040516370a0823160e01b81523060048201526001600160a01b038316906370a082319060240160206040518083038186803b158015610b5657600080fd5b505afa158015610b6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b8e9190612b9e565b90505b60405163a9059cbb60e01b8152336004820152602481018290526001600160a01b0383169063a9059cbb90604401602060405180830381600087803b158015610bd957600080fd5b505af1158015610bed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c119190612b68565b50604080516001600160a01b0384168152602081018390527f542fa6bfee3b4746210fbdd1d83f9e49b65adde3639f8d8f165dd18347938af2910160405180910390a15050565b60026001541415610cab5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610962565b60026001558082108015610cc157506009548111155b610d0d5760405162461bcd60e51b815260206004820152601b60248201527f496e636f727265637420726f756e647320706172616d657465727300000000006044820152606401610962565b600c54600b5460009190845b84811015610f355760008181526002602090815260408083206001600160a01b038b1684529091529020548015610e905760008281526002602081815260408084206001600160a01b038d1685529091529091200154610e9057600082815260036020526040812060018101549054610d93908490612cf6565b610d9d9190612cd4565b905060006064610dad8784612cf6565b610db79190612cd4565b9050610dc38183612d15565b610dcd9088612cbc565b60008581526002602090815260408083206001600160a01b038f16845282528083206001018590558783526003909152902060050154909750610e11908690612cbc565b6002600086815260200190815260200160002060008c6001600160a01b03166001600160a01b031681526020019081526020016000206002018190555060006002600086815260200190815260200160002060008c6001600160a01b03166001600160a01b031681526020019081526020016000206000018190555050505b60008281526002602090815260408083206001600160a01b038c1684529091529020600101548015801590610ee8575060008381526002602081815260408084206001600160a01b038e168552909152909120015442115b15610f2057610ef78187612cbc565b60008481526002602090815260408083206001600160a01b038e16845290915281206001015595505b50508080610f2d90612d2c565b915050610d19565b5060405163a9059cbb60e01b81526001600160a01b038716600482015260248101849052739fae2529863bd691b4a7171bdfcf33c7ebb10a659063a9059cbb90604401602060405180830381600087803b158015610f9257600080fd5b505af1158015610fa6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fca9190612b68565b5050600180555050505050565b33610fea6000546001600160a01b031690565b6001600160a01b0316146110105760405162461bcd60e51b815260040161096290612c87565b6001600160a01b0381166110665760405162461bcd60e51b815260206004820152601860248201527f5a65726f2061646472657373206e6f7420616c6c6f77656400000000000000006044820152606401610962565b60058054610100600160a81b0319166101006001600160a01b038416908102919091179091556040519081527f10f5824683d64a0712038f2244e046b174a1cc57fbb8556bfda5ffb2612440679060200160405180910390a150565b600954600c54600b546000928392909160015b838110156113115760008181526002602090815260408083206001600160a01b038b168452909152902054801561123d5760008281526002602081815260408084206001600160a01b038d1685529091528220015490816111ac57600084815260036020526040812060018101549054611150908690612cf6565b61115a9190612cd4565b905060646111688883612cf6565b6111729190612cd4565b915061117e8282612d15565b611188908b612cbc565b600086815260036020526040902060050154909a506111a8908790612cbc565b9250505b428210156111f75760008481526002602090815260408083206001600160a01b038e1684529091529020600101546111e4908a612cbc565b98506111f0818a612cbc565b9850611236565b60008481526002602090815260408083206001600160a01b038e1684529091529020600101546112279089612cbc565b97506112338189612cbc565b97505b50506112fe565b60008281526002602090815260408083206001600160a01b038c168452909152902060010154156112fe5760008281526002602081815260408084206001600160a01b038d16855290915290912001544211156112cb5760008281526002602090815260408083206001600160a01b038c1684529091529020600101546112c49088612cbc565b96506112fe565b60008281526002602090815260408083206001600160a01b038c1684529091529020600101546112fb9087612cbc565b95505b508061130981612d2c565b9150506110d5565b50505050915091565b3361132d6000546001600160a01b031690565b6001600160a01b0316146113535760405162461bcd60e51b815260040161096290612c87565b600e55565b3361136b6000546001600160a01b031690565b6001600160a01b0316146113915760405162461bcd60e51b815260040161096290612c87565b600c55565b336113a96000546001600160a01b031690565b6001600160a01b0316146113cf5760405162461bcd60e51b815260040161096290612c87565b600a55565b336113e76000546001600160a01b031690565b6001600160a01b03161461140d5760405162461bcd60e51b815260040161096290612c87565b600854600954116114605760405162461bcd60e51b815260206004820152601760248201527f41756374696f6e206973206e6f742066696e69736865640000000000000000006044820152606401610962565b60006011546007546006546114759190612d15565b61147f9190612d15565b9050806114bf5760405162461bcd60e51b815260206004820152600e60248201526d27379029b7bc903a3790313ab93760911b6044820152606401610962565b808211156114cb578091505b81601160008282546114dd9190612cbc565b909155505060405163a9059cbb60e01b815261dead60901b600482015260248101839052739fae2529863bd691b4a7171bdfcf33c7ebb10a659063a9059cbb90604401602060405180830381600087803b15801561153a57600080fd5b505af115801561154e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115729190612b68565b505050565b3361158a6000546001600160a01b031690565b6001600160a01b0316146115b05760405162461bcd60e51b815260040161096290612c87565b600f55565b6060806060600080600060095490506001816115d19190612d15565b67ffffffffffffffff8111156115e9576115e9612d73565b604051908082528060200260200182016040528015611612578160200160208202803683370190505b509550611620600182612d15565b67ffffffffffffffff81111561163857611638612d73565b604051908082528060200260200182016040528015611661578160200160208202803683370190505b50945061166f600182612d15565b67ffffffffffffffff81111561168757611687612d73565b6040519080825280602002602001820160405280156116b0578160200160208202803683370190505b50600c54600b549195509060015b83811015611afe5760008181526002602090815260408083206001600160a01b038e168452909152902054801561191d5760006002600084815260200190815260200160002060008d6001600160a01b03166001600160a01b031681526020019081526020016000206002015490506000816000141561186257600084815260036020526040812060018101549054611758908690612cf6565b6117629190612cd4565b905060646117708883612cf6565b61177a9190612cd4565b91506117868282612d15565b611790908b612cbc565b600086815260036020526040902060050154909a506117b0908790612cbc565b9250828c6117bf600188612d15565b815181106117cf576117cf612d5d565b6020908102919091010152818d6117e7600188612d15565b815181106117f7576117f7612d5d565b6020908102919091018101919091526000868152600390915260409020805460019091015461182e90670de0b6b3a7640000612cf6565b6118389190612cd4565b8b611844600188612d15565b8151811061185457611854612d5d565b602002602001018181525050505b428210156118c2576002600085815260200190815260200160002060008e6001600160a01b03166001600160a01b0316815260200190815260200160002060010154896118af9190612cbc565b98506118bb818a612cbc565b9850611916565b6002600085815260200190815260200160002060008e6001600160a01b03166001600160a01b0316815260200190815260200160002060010154886119079190612cbc565b97506119138189612cbc565b97505b5050611aeb565b60008281526002602090815260408083206001600160a01b038f16845290915290206001015415611aeb576002600083815260200190815260200160002060008c6001600160a01b03166001600160a01b0316815260200190815260200160002060020154896001846119909190612d15565b815181106119a0576119a0612d5d565b60209081029190910181019190915260008381526002825260408082206001600160a01b038f16835290925220600190810154908b906119e09085612d15565b815181106119f0576119f0612d5d565b60209081029190910181019190915260008381526003909152604090208054600190910154611a2790670de0b6b3a7640000612cf6565b611a319190612cd4565b88611a3d600185612d15565b81518110611a4d57611a4d612d5d565b60209081029190910101524289611a65600185612d15565b81518110611a7557611a75612d5d565b60200260200101511015611ab95789611a8f600184612d15565b81518110611a9f57611a9f612d5d565b602002602001015187611ab29190612cbc565b9650611aeb565b89611ac5600184612d15565b81518110611ad557611ad5612d5d565b602002602001015186611ae89190612cbc565b95505b5080611af681612d2c565b9150506116be565b5050505091939590929450565b611b19336001600954610c58565b565b33611b2e6000546001600160a01b031690565b6001600160a01b031614611b545760405162461bcd60e51b815260040161096290612c87565b6009546000908152600360205260409020546007548190611b76908490612cbc565b611b809190612d15565b60078190556006541015611bc55760405162461bcd60e51b815260206004820152600c60248201526b15dc9bdb99c8185b5bdd5b9d60a21b6044820152606401610962565b6009546000908152600360205260409020829055600e54600f5468056bc75e2d631000009190611bf59085612cf6565b611bff9190612cf6565b611c099190612cd4565b600954600090815260036020526040902060020155600d54600f5468056bc75e2d631000009190611c3a9085612cf6565b611c449190612cf6565b611c4e9190612cd4565b600954600090815260036020819052604090912001555050565b33611c7b6000546001600160a01b031690565b6001600160a01b031614611ca15760405162461bcd60e51b815260040161096290612c87565b600954811015611cb057600080fd5b600855565b33611cc86000546001600160a01b031690565b6001600160a01b031614611cee5760405162461bcd60e51b815260040161096290612c87565b600b55565b33611d066000546001600160a01b031690565b6001600160a01b031614611d2c5760405162461bcd60e51b815260040161096290612c87565b601055565b6000546001600160a01b031615611d805760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b6044820152606401610962565b600080546001600160a01b0319163390811782556040519091907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a36301e13380600b55605a600d55600360105562015180600a5560a0600e556032600c5560b4600855565b611df7816001600954610c58565b50565b33739fae2529863bd691b4a7171bdfcf33c7ebb10a65148015611e2a57506000546001600160a01b038581169116145b15611e4c578260066000828254611e419190612cbc565b90915550611eac9050565b3360009081526004602052604090205460ff16611ea15760405162461bcd60e51b8152602060048201526013602482015272151bdad95b881a5cdb89dd08185b1b1bddd959606a1b6044820152606401610962565b611eac8433856121f8565b50505050565b33611ec56000546001600160a01b031690565b6001600160a01b031614611eeb5760405162461bcd60e51b815260040161096290612c87565b6001600160a01b038216611efe57600080fd5b6001600160a01b03919091166000908152600460205260409020805460ff1916911515919091179055565b600954600081815260036020526040812060019081015492905b818111611f7057600081815260036020526040902060010154925080611f6881612d2c565b915050611f43565b50509091565b33611f896000546001600160a01b031690565b6001600160a01b031614611faf5760405162461bcd60e51b815260040161096290612c87565b60095415611ff15760405162461bcd60e51b815260206004820152600f60248201526e4f6e6c79207374617274206f6e636560881b6044820152606401610962565b6006546120315760405162461bcd60e51b815260206004820152600e60248201526d139bc814d3d6481d1bc81cd95b1b60921b6044820152606401610962565b600f81905560008052600360205269063ec042bd9bc2fbc1037f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff55610a968261245a565b336120886000546001600160a01b031690565b6001600160a01b0316146120ae5760405162461bcd60e51b815260040161096290612c87565b6005805460ff1916911515919091179055565b336120d46000546001600160a01b031690565b6001600160a01b0316146120fa5760405162461bcd60e51b815260040161096290612c87565b600d55565b336121126000546001600160a01b031690565b6001600160a01b0316146121385760405162461bcd60e51b815260040161096290612c87565b6001600160a01b03811661219d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610962565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60055460ff16156122345760405162461bcd60e51b815260206004820152600660248201526514185d5cd95960d21b6044820152606401610962565b600260015414156122875760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610962565b600260015561229461263e565b156122a9576122a48282856127ed565b612451565b60095460006122b7846128b7565b6000838152600360209081526040808320600283528184206001600160a01b038b16855290925282209293509190670de0b6b3a76400006122f88588612cf6565b6123029190612cd4565b83600101546123119190612cbc565b9050826002015481106123935760008360020154826123309190612d15565b90508461234582670de0b6b3a7640000612cf6565b61234f9190612cd4565b90508681111561235c5750855b600284015460018501556123708188612d15565b965061237b4261294b565b50801561238d5761238d88828b6127ed565b5061239b565b600183018190555b6000670de0b6b3a76400006123b08689612cf6565b6123ba9190612cd4565b9050808360000160008282546123d09190612cbc565b90915550506005546123f3908990899061010090046001600160a01b03166127ed565b876001600160a01b0316896001600160a01b0316877f6474f1bb997bda2619fcace4051842a3232e75c34ea64c058221f1718e2aa990848b604051612442929190918252602082015260400190565b60405180910390a45050505050505b50506001805550565b6009805490600061246a83612d2c565b919050555060085460095411156124ba5760405162461bcd60e51b8152602060048201526014602482015273105b1b081c9bdd5b991cc818dbdb5c1b195d195960621b6044820152606401610962565b600954600090815260036020526040902060048101829055600a546124df9083612cbc565b6005820155600a5460009062015180141561257057670de0b6b3a7640000670e1df0928867de006003600060016009546125199190612d15565b8152602001908152602001600020600001546125359190612cf6565b61253f9190612cd4565b9050806007546006546125529190612d15565b101561256b576007546006546125689190612d15565b90505b6125af565b600060095460085460016125849190612cbc565b61258e9190612d15565b9050806007546006546125a19190612d15565b6125ab9190612cd4565b9150505b808255600780548291906000906125c7908490612cbc565b9091555050600e54600f5468056bc75e2d6310000091906125e89084612cf6565b6125f29190612cf6565b6125fc9190612cd4565b6002830155600d54600f5468056bc75e2d63100000919061261d9084612cf6565b6126279190612cf6565b6126319190612cd4565b8260030181905550505050565b600954600090815260036020526040812060048101544210156126a35760405162461bcd60e51b815260206004820152601a60248201527f41756374696f6e206973206e6f742073746172746564207965740000000000006044820152606401610962565b60085460095411156126ed5760405162461bcd60e51b8152602060048201526013602482015272105d58dd1a5bdb881a5cc8199a5b9a5cda1959606a1b6044820152606401610962565b805461272c5760405162461bcd60e51b815260206004820152600e60248201526d139bc814d3d6481d1bc81cd95b1b60921b6044820152606401610962565b428160050154116127e9578060030154816001015410156127d9576000600a5482600401544261275c9190612d15565b6127669190612cd4565b90506010548110156127a357600a54612780826001612cbc565b61278a9190612cf6565b82600401546127999190612cbc565b6005830155505090565b600a546010546127b39190612cf6565b82600401546127c29190612cbc565b600583018190556127d29061294b565b9250505090565b6127e6816005015461294b565b91505b5090565b6001600160a01b03831660011415612835576040516001600160a01b0382169083156108fc029084906000818181858888f19350505050158015611eac573d6000803e3d6000fd5b60405163a9059cbb60e01b81526001600160a01b0382811660048301526024820184905284169063a9059cbb90604401602060405180830381600087803b15801561287f57600080fd5b505af1158015612893573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611eac9190612b68565b6040516341976e0960e01b81526001600160a01b0382166004820152600090739bfc3046ea26f8b09d3e85bd22aec96c80d957e3906341976e099060240160206040518083038186803b15801561290d57600080fd5b505afa158015612921573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129459190612b9e565b92915050565b60095460009081526003602052604081208054600182015461297590670de0b6b3a7640000612cf6565b61297f9190612cd4565b600f55600954815460018301546040517fda434ed10dd96aabd2bd460ecb942c9ff048dc71c68baf0a5e94e8ddbeb603b8926129c392908252602082015260400190565b60405180910390a260085460095414156129f557600980549060006129e783612d2c565b9190505550600191506129fe565b6129fe8361245a565b50919050565b600060208284031215612a1657600080fd5b8135612a2181612d89565b9392505050565b60008060408385031215612a3b57600080fd5b8235612a4681612d89565b91506020830135612a5681612d9e565b809150509250929050565b60008060408385031215612a7457600080fd5b8235612a7f81612d89565b946020939093013593505050565b60008060008060608587031215612aa357600080fd5b8435612aae81612d89565b935060208501359250604085013567ffffffffffffffff80821115612ad257600080fd5b818701915087601f830112612ae657600080fd5b813581811115612af557600080fd5b886020828501011115612b0757600080fd5b95989497505060200194505050565b600080600060608486031215612b2b57600080fd5b8335612b3681612d89565b95602085013595506040909401359392505050565b600060208284031215612b5d57600080fd5b8135612a2181612d9e565b600060208284031215612b7a57600080fd5b8151612a2181612d9e565b600060208284031215612b9757600080fd5b5035919050565b600060208284031215612bb057600080fd5b5051919050565b60008060408385031215612bca57600080fd5b823591506020830135612a5681612d89565b60008060408385031215612bef57600080fd5b50508035926020909101359150565b600081518084526020808501945080840160005b83811015612c2e57815187529582019590820190600101612c12565b509495945050505050565b60a081526000612c4c60a0830188612bfe565b8281036020840152612c5e8188612bfe565b90508281036040840152612c728187612bfe565b60608401959095525050608001529392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115612ccf57612ccf612d47565b500190565b600082612cf157634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615612d1057612d10612d47565b500290565b600082821015612d2757612d27612d47565b500390565b6000600019821415612d4057612d40612d47565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114611df757600080fd5b8015158114611df757600080fdfea2646970667358221220dd23175d98d300c3dc4c9c38c7f6a2a887172b2cceabeb81a956fd7cd84ea08764736f6c63430008070033
Deployed ByteCode
0x60806040526004361061028b5760003560e01c8063601ce32d1161015a5780639cbe5efd116100c1578063c59cb9f41161007a578063c59cb9f414610828578063debb114314610848578063f2fde38b1461085e578063f644b3bb1461087e578063f7cb789a146108dc578063fe1cdb23146108f257600080fd5b80639cbe5efd1461071e5780639f3713b714610734578063a85f4e811461074a578063ab286934146107ce578063b187bd26146107ee578063bedb86fb1461080857600080fd5b80638129fc1c116101135780638129fc1c14610676578063889014961461068b5780638943ec02146106ab5780638aaa2284146106cb5780638c7a529f146106eb5780638da5cb5b1461070057600080fd5b8063601ce32d14610593578063741bef1a146105a9578063756742f8146105d157806376cdb03b14610611578063779972da146106365780637cd428421461065657600080fd5b806336c92c3f116101fe5780634e71d92d116101b75780634e71d92d146104cc5780634ef6aa71146104e15780635113aea91461052157806351bddee81461054157806359e741d2146105575780635f26e73e1461057357600080fd5b806336c92c3f146104125780633b50261f146104325780633fd8b02f1461044557806342966c681461045b578063443e52041461047b5780634a48c84b1461049b57600080fd5b80631cd27551116102505780631cd275511461034157806320f634b5146103575780632155e43e1461038c578063226125a8146103ac5780632fc10aaf146103cc578063356442b9146103fc57600080fd5b8062ae3bf8146102a2578063073caa3c146102c257806307f003c3146102e2578063090d23b91461030b57806311a9dd3b1461032b57600080fd5b3661029d5761029b600134610908565b005b600080fd5b3480156102ae57600080fd5b5061029b6102bd366004612a04565b610a9a565b3480156102ce57600080fd5b5061029b6102dd366004612b16565b610c58565b3480156102ee57600080fd5b506102f860115481565b6040519081526020015b60405180910390f35b34801561031757600080fd5b5061029b610326366004612a04565b610fd7565b34801561033757600080fd5b506102f8600d5481565b34801561034d57600080fd5b506102f860065481565b34801561036357600080fd5b50610377610372366004612a04565b6110c2565b60408051928352602083019190915201610302565b34801561039857600080fd5b5061029b6103a7366004612b85565b61131a565b3480156103b857600080fd5b5061029b6103c7366004612b85565b611358565b3480156103d857600080fd5b506102f86103e7366004612b85565b60009081526003602052604090206001015490565b34801561040857600080fd5b506102f8600c5481565b34801561041e57600080fd5b5061029b61042d366004612b85565b611396565b61029b610440366004612a61565b610908565b34801561045157600080fd5b506102f8600b5481565b34801561046757600080fd5b5061029b610476366004612b85565b6113d4565b34801561048757600080fd5b5061029b610496366004612b85565b611577565b3480156104a757600080fd5b506104bb6104b6366004612a04565b6115b5565b604051610302959493929190612c39565b3480156104d857600080fd5b5061029b611b0b565b3480156104ed57600080fd5b50610509739fae2529863bd691b4a7171bdfcf33c7ebb10a6581565b6040516001600160a01b039091168152602001610302565b34801561052d57600080fd5b5061029b61053c366004612b85565b611b1b565b34801561054d57600080fd5b506102f8600e5481565b34801561056357600080fd5b506102f8670e1df0928867de0081565b34801561057f57600080fd5b5061029b61058e366004612b85565b611c68565b34801561059f57600080fd5b506102f8600f5481565b3480156105b557600080fd5b50610509739bfc3046ea26f8b09d3e85bd22aec96c80d957e381565b3480156105dd57600080fd5b506106016105ec366004612a04565b60046020526000908152604090205460ff1681565b6040519015158152602001610302565b34801561061d57600080fd5b506005546105099061010090046001600160a01b031681565b34801561064257600080fd5b5061029b610651366004612b85565b611cb5565b34801561066257600080fd5b5061029b610671366004612b85565b611cf3565b34801561068257600080fd5b5061029b611d31565b34801561069757600080fd5b5061029b6106a6366004612a04565b611de9565b3480156106b757600080fd5b5061029b6106c6366004612a8d565b611dfa565b3480156106d757600080fd5b5061029b6106e6366004612a28565b611eb2565b3480156106f757600080fd5b50610377611f29565b34801561070c57600080fd5b506000546001600160a01b0316610509565b34801561072a57600080fd5b506102f860095481565b34801561074057600080fd5b506102f860075481565b34801561075657600080fd5b506107a1610765366004612b85565b60036020528060005260406000206000915090508060000154908060010154908060020154908060030154908060040154908060050154905086565b604080519687526020870195909552938501929092526060840152608083015260a082015260c001610302565b3480156107da57600080fd5b5061029b6107e9366004612bdc565b611f76565b3480156107fa57600080fd5b506005546106019060ff1681565b34801561081457600080fd5b5061029b610823366004612b4b565b612075565b34801561083457600080fd5b5061029b610843366004612b85565b6120c1565b34801561085457600080fd5b506102f860085481565b34801561086a57600080fd5b5061029b610879366004612a04565b6120ff565b34801561088a57600080fd5b506108c1610899366004612bb7565b6002602081815260009384526040808520909152918352912080546001820154919092015483565b60408051938452602084019290925290820152606001610302565b3480156108e857600080fd5b506102f8600a5481565b3480156108fe57600080fd5b506102f860105481565b6001600160a01b03821660009081526004602052604090205460ff1661096b5760405162461bcd60e51b8152602060048201526013602482015272151bdad95b881a5cdb89dd08185b1b1bddd959606a1b60448201526064015b60405180910390fd5b6001600160a01b038216600114156109c8573481146109c35760405162461bcd60e51b8152602060048201526014602482015273125b98dbdc9c9958dd0810d313c8185b5bdd5b9d60621b6044820152606401610962565b610a8b565b3415610a035760405162461bcd60e51b815260206004820152600a60248201526927b7363c903a37b5b2b760b11b6044820152606401610962565b6040516323b872dd60e01b8152336004820152306024820152604481018290526001600160a01b038316906323b872dd90606401602060405180830381600087803b158015610a5157600080fd5b505af1158015610a65573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a899190612b68565b505b610a963383836121f8565b5050565b33610aad6000546001600160a01b031690565b6001600160a01b031614610ad35760405162461bcd60e51b815260040161096290612c87565b60006001600160a01b038216739fae2529863bd691b4a7171bdfcf33c7ebb10a651415610b1757600754600654610b0a9190612d15565b6007546006559050610b91565b6040516370a0823160e01b81523060048201526001600160a01b038316906370a082319060240160206040518083038186803b158015610b5657600080fd5b505afa158015610b6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b8e9190612b9e565b90505b60405163a9059cbb60e01b8152336004820152602481018290526001600160a01b0383169063a9059cbb90604401602060405180830381600087803b158015610bd957600080fd5b505af1158015610bed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c119190612b68565b50604080516001600160a01b0384168152602081018390527f542fa6bfee3b4746210fbdd1d83f9e49b65adde3639f8d8f165dd18347938af2910160405180910390a15050565b60026001541415610cab5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610962565b60026001558082108015610cc157506009548111155b610d0d5760405162461bcd60e51b815260206004820152601b60248201527f496e636f727265637420726f756e647320706172616d657465727300000000006044820152606401610962565b600c54600b5460009190845b84811015610f355760008181526002602090815260408083206001600160a01b038b1684529091529020548015610e905760008281526002602081815260408084206001600160a01b038d1685529091529091200154610e9057600082815260036020526040812060018101549054610d93908490612cf6565b610d9d9190612cd4565b905060006064610dad8784612cf6565b610db79190612cd4565b9050610dc38183612d15565b610dcd9088612cbc565b60008581526002602090815260408083206001600160a01b038f16845282528083206001018590558783526003909152902060050154909750610e11908690612cbc565b6002600086815260200190815260200160002060008c6001600160a01b03166001600160a01b031681526020019081526020016000206002018190555060006002600086815260200190815260200160002060008c6001600160a01b03166001600160a01b031681526020019081526020016000206000018190555050505b60008281526002602090815260408083206001600160a01b038c1684529091529020600101548015801590610ee8575060008381526002602081815260408084206001600160a01b038e168552909152909120015442115b15610f2057610ef78187612cbc565b60008481526002602090815260408083206001600160a01b038e16845290915281206001015595505b50508080610f2d90612d2c565b915050610d19565b5060405163a9059cbb60e01b81526001600160a01b038716600482015260248101849052739fae2529863bd691b4a7171bdfcf33c7ebb10a659063a9059cbb90604401602060405180830381600087803b158015610f9257600080fd5b505af1158015610fa6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fca9190612b68565b5050600180555050505050565b33610fea6000546001600160a01b031690565b6001600160a01b0316146110105760405162461bcd60e51b815260040161096290612c87565b6001600160a01b0381166110665760405162461bcd60e51b815260206004820152601860248201527f5a65726f2061646472657373206e6f7420616c6c6f77656400000000000000006044820152606401610962565b60058054610100600160a81b0319166101006001600160a01b038416908102919091179091556040519081527f10f5824683d64a0712038f2244e046b174a1cc57fbb8556bfda5ffb2612440679060200160405180910390a150565b600954600c54600b546000928392909160015b838110156113115760008181526002602090815260408083206001600160a01b038b168452909152902054801561123d5760008281526002602081815260408084206001600160a01b038d1685529091528220015490816111ac57600084815260036020526040812060018101549054611150908690612cf6565b61115a9190612cd4565b905060646111688883612cf6565b6111729190612cd4565b915061117e8282612d15565b611188908b612cbc565b600086815260036020526040902060050154909a506111a8908790612cbc565b9250505b428210156111f75760008481526002602090815260408083206001600160a01b038e1684529091529020600101546111e4908a612cbc565b98506111f0818a612cbc565b9850611236565b60008481526002602090815260408083206001600160a01b038e1684529091529020600101546112279089612cbc565b97506112338189612cbc565b97505b50506112fe565b60008281526002602090815260408083206001600160a01b038c168452909152902060010154156112fe5760008281526002602081815260408084206001600160a01b038d16855290915290912001544211156112cb5760008281526002602090815260408083206001600160a01b038c1684529091529020600101546112c49088612cbc565b96506112fe565b60008281526002602090815260408083206001600160a01b038c1684529091529020600101546112fb9087612cbc565b95505b508061130981612d2c565b9150506110d5565b50505050915091565b3361132d6000546001600160a01b031690565b6001600160a01b0316146113535760405162461bcd60e51b815260040161096290612c87565b600e55565b3361136b6000546001600160a01b031690565b6001600160a01b0316146113915760405162461bcd60e51b815260040161096290612c87565b600c55565b336113a96000546001600160a01b031690565b6001600160a01b0316146113cf5760405162461bcd60e51b815260040161096290612c87565b600a55565b336113e76000546001600160a01b031690565b6001600160a01b03161461140d5760405162461bcd60e51b815260040161096290612c87565b600854600954116114605760405162461bcd60e51b815260206004820152601760248201527f41756374696f6e206973206e6f742066696e69736865640000000000000000006044820152606401610962565b60006011546007546006546114759190612d15565b61147f9190612d15565b9050806114bf5760405162461bcd60e51b815260206004820152600e60248201526d27379029b7bc903a3790313ab93760911b6044820152606401610962565b808211156114cb578091505b81601160008282546114dd9190612cbc565b909155505060405163a9059cbb60e01b815261dead60901b600482015260248101839052739fae2529863bd691b4a7171bdfcf33c7ebb10a659063a9059cbb90604401602060405180830381600087803b15801561153a57600080fd5b505af115801561154e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115729190612b68565b505050565b3361158a6000546001600160a01b031690565b6001600160a01b0316146115b05760405162461bcd60e51b815260040161096290612c87565b600f55565b6060806060600080600060095490506001816115d19190612d15565b67ffffffffffffffff8111156115e9576115e9612d73565b604051908082528060200260200182016040528015611612578160200160208202803683370190505b509550611620600182612d15565b67ffffffffffffffff81111561163857611638612d73565b604051908082528060200260200182016040528015611661578160200160208202803683370190505b50945061166f600182612d15565b67ffffffffffffffff81111561168757611687612d73565b6040519080825280602002602001820160405280156116b0578160200160208202803683370190505b50600c54600b549195509060015b83811015611afe5760008181526002602090815260408083206001600160a01b038e168452909152902054801561191d5760006002600084815260200190815260200160002060008d6001600160a01b03166001600160a01b031681526020019081526020016000206002015490506000816000141561186257600084815260036020526040812060018101549054611758908690612cf6565b6117629190612cd4565b905060646117708883612cf6565b61177a9190612cd4565b91506117868282612d15565b611790908b612cbc565b600086815260036020526040902060050154909a506117b0908790612cbc565b9250828c6117bf600188612d15565b815181106117cf576117cf612d5d565b6020908102919091010152818d6117e7600188612d15565b815181106117f7576117f7612d5d565b6020908102919091018101919091526000868152600390915260409020805460019091015461182e90670de0b6b3a7640000612cf6565b6118389190612cd4565b8b611844600188612d15565b8151811061185457611854612d5d565b602002602001018181525050505b428210156118c2576002600085815260200190815260200160002060008e6001600160a01b03166001600160a01b0316815260200190815260200160002060010154896118af9190612cbc565b98506118bb818a612cbc565b9850611916565b6002600085815260200190815260200160002060008e6001600160a01b03166001600160a01b0316815260200190815260200160002060010154886119079190612cbc565b97506119138189612cbc565b97505b5050611aeb565b60008281526002602090815260408083206001600160a01b038f16845290915290206001015415611aeb576002600083815260200190815260200160002060008c6001600160a01b03166001600160a01b0316815260200190815260200160002060020154896001846119909190612d15565b815181106119a0576119a0612d5d565b60209081029190910181019190915260008381526002825260408082206001600160a01b038f16835290925220600190810154908b906119e09085612d15565b815181106119f0576119f0612d5d565b60209081029190910181019190915260008381526003909152604090208054600190910154611a2790670de0b6b3a7640000612cf6565b611a319190612cd4565b88611a3d600185612d15565b81518110611a4d57611a4d612d5d565b60209081029190910101524289611a65600185612d15565b81518110611a7557611a75612d5d565b60200260200101511015611ab95789611a8f600184612d15565b81518110611a9f57611a9f612d5d565b602002602001015187611ab29190612cbc565b9650611aeb565b89611ac5600184612d15565b81518110611ad557611ad5612d5d565b602002602001015186611ae89190612cbc565b95505b5080611af681612d2c565b9150506116be565b5050505091939590929450565b611b19336001600954610c58565b565b33611b2e6000546001600160a01b031690565b6001600160a01b031614611b545760405162461bcd60e51b815260040161096290612c87565b6009546000908152600360205260409020546007548190611b76908490612cbc565b611b809190612d15565b60078190556006541015611bc55760405162461bcd60e51b815260206004820152600c60248201526b15dc9bdb99c8185b5bdd5b9d60a21b6044820152606401610962565b6009546000908152600360205260409020829055600e54600f5468056bc75e2d631000009190611bf59085612cf6565b611bff9190612cf6565b611c099190612cd4565b600954600090815260036020526040902060020155600d54600f5468056bc75e2d631000009190611c3a9085612cf6565b611c449190612cf6565b611c4e9190612cd4565b600954600090815260036020819052604090912001555050565b33611c7b6000546001600160a01b031690565b6001600160a01b031614611ca15760405162461bcd60e51b815260040161096290612c87565b600954811015611cb057600080fd5b600855565b33611cc86000546001600160a01b031690565b6001600160a01b031614611cee5760405162461bcd60e51b815260040161096290612c87565b600b55565b33611d066000546001600160a01b031690565b6001600160a01b031614611d2c5760405162461bcd60e51b815260040161096290612c87565b601055565b6000546001600160a01b031615611d805760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b6044820152606401610962565b600080546001600160a01b0319163390811782556040519091907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a36301e13380600b55605a600d55600360105562015180600a5560a0600e556032600c5560b4600855565b611df7816001600954610c58565b50565b33739fae2529863bd691b4a7171bdfcf33c7ebb10a65148015611e2a57506000546001600160a01b038581169116145b15611e4c578260066000828254611e419190612cbc565b90915550611eac9050565b3360009081526004602052604090205460ff16611ea15760405162461bcd60e51b8152602060048201526013602482015272151bdad95b881a5cdb89dd08185b1b1bddd959606a1b6044820152606401610962565b611eac8433856121f8565b50505050565b33611ec56000546001600160a01b031690565b6001600160a01b031614611eeb5760405162461bcd60e51b815260040161096290612c87565b6001600160a01b038216611efe57600080fd5b6001600160a01b03919091166000908152600460205260409020805460ff1916911515919091179055565b600954600081815260036020526040812060019081015492905b818111611f7057600081815260036020526040902060010154925080611f6881612d2c565b915050611f43565b50509091565b33611f896000546001600160a01b031690565b6001600160a01b031614611faf5760405162461bcd60e51b815260040161096290612c87565b60095415611ff15760405162461bcd60e51b815260206004820152600f60248201526e4f6e6c79207374617274206f6e636560881b6044820152606401610962565b6006546120315760405162461bcd60e51b815260206004820152600e60248201526d139bc814d3d6481d1bc81cd95b1b60921b6044820152606401610962565b600f81905560008052600360205269063ec042bd9bc2fbc1037f3617319a054d772f909f7c479a2cebe5066e836a939412e32403c99029b92eff55610a968261245a565b336120886000546001600160a01b031690565b6001600160a01b0316146120ae5760405162461bcd60e51b815260040161096290612c87565b6005805460ff1916911515919091179055565b336120d46000546001600160a01b031690565b6001600160a01b0316146120fa5760405162461bcd60e51b815260040161096290612c87565b600d55565b336121126000546001600160a01b031690565b6001600160a01b0316146121385760405162461bcd60e51b815260040161096290612c87565b6001600160a01b03811661219d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610962565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60055460ff16156122345760405162461bcd60e51b815260206004820152600660248201526514185d5cd95960d21b6044820152606401610962565b600260015414156122875760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610962565b600260015561229461263e565b156122a9576122a48282856127ed565b612451565b60095460006122b7846128b7565b6000838152600360209081526040808320600283528184206001600160a01b038b16855290925282209293509190670de0b6b3a76400006122f88588612cf6565b6123029190612cd4565b83600101546123119190612cbc565b9050826002015481106123935760008360020154826123309190612d15565b90508461234582670de0b6b3a7640000612cf6565b61234f9190612cd4565b90508681111561235c5750855b600284015460018501556123708188612d15565b965061237b4261294b565b50801561238d5761238d88828b6127ed565b5061239b565b600183018190555b6000670de0b6b3a76400006123b08689612cf6565b6123ba9190612cd4565b9050808360000160008282546123d09190612cbc565b90915550506005546123f3908990899061010090046001600160a01b03166127ed565b876001600160a01b0316896001600160a01b0316877f6474f1bb997bda2619fcace4051842a3232e75c34ea64c058221f1718e2aa990848b604051612442929190918252602082015260400190565b60405180910390a45050505050505b50506001805550565b6009805490600061246a83612d2c565b919050555060085460095411156124ba5760405162461bcd60e51b8152602060048201526014602482015273105b1b081c9bdd5b991cc818dbdb5c1b195d195960621b6044820152606401610962565b600954600090815260036020526040902060048101829055600a546124df9083612cbc565b6005820155600a5460009062015180141561257057670de0b6b3a7640000670e1df0928867de006003600060016009546125199190612d15565b8152602001908152602001600020600001546125359190612cf6565b61253f9190612cd4565b9050806007546006546125529190612d15565b101561256b576007546006546125689190612d15565b90505b6125af565b600060095460085460016125849190612cbc565b61258e9190612d15565b9050806007546006546125a19190612d15565b6125ab9190612cd4565b9150505b808255600780548291906000906125c7908490612cbc565b9091555050600e54600f5468056bc75e2d6310000091906125e89084612cf6565b6125f29190612cf6565b6125fc9190612cd4565b6002830155600d54600f5468056bc75e2d63100000919061261d9084612cf6565b6126279190612cf6565b6126319190612cd4565b8260030181905550505050565b600954600090815260036020526040812060048101544210156126a35760405162461bcd60e51b815260206004820152601a60248201527f41756374696f6e206973206e6f742073746172746564207965740000000000006044820152606401610962565b60085460095411156126ed5760405162461bcd60e51b8152602060048201526013602482015272105d58dd1a5bdb881a5cc8199a5b9a5cda1959606a1b6044820152606401610962565b805461272c5760405162461bcd60e51b815260206004820152600e60248201526d139bc814d3d6481d1bc81cd95b1b60921b6044820152606401610962565b428160050154116127e9578060030154816001015410156127d9576000600a5482600401544261275c9190612d15565b6127669190612cd4565b90506010548110156127a357600a54612780826001612cbc565b61278a9190612cf6565b82600401546127999190612cbc565b6005830155505090565b600a546010546127b39190612cf6565b82600401546127c29190612cbc565b600583018190556127d29061294b565b9250505090565b6127e6816005015461294b565b91505b5090565b6001600160a01b03831660011415612835576040516001600160a01b0382169083156108fc029084906000818181858888f19350505050158015611eac573d6000803e3d6000fd5b60405163a9059cbb60e01b81526001600160a01b0382811660048301526024820184905284169063a9059cbb90604401602060405180830381600087803b15801561287f57600080fd5b505af1158015612893573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611eac9190612b68565b6040516341976e0960e01b81526001600160a01b0382166004820152600090739bfc3046ea26f8b09d3e85bd22aec96c80d957e3906341976e099060240160206040518083038186803b15801561290d57600080fd5b505afa158015612921573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129459190612b9e565b92915050565b60095460009081526003602052604081208054600182015461297590670de0b6b3a7640000612cf6565b61297f9190612cd4565b600f55600954815460018301546040517fda434ed10dd96aabd2bd460ecb942c9ff048dc71c68baf0a5e94e8ddbeb603b8926129c392908252602082015260400190565b60405180910390a260085460095414156129f557600980549060006129e783612d2c565b9190505550600191506129fe565b6129fe8361245a565b50919050565b600060208284031215612a1657600080fd5b8135612a2181612d89565b9392505050565b60008060408385031215612a3b57600080fd5b8235612a4681612d89565b91506020830135612a5681612d9e565b809150509250929050565b60008060408385031215612a7457600080fd5b8235612a7f81612d89565b946020939093013593505050565b60008060008060608587031215612aa357600080fd5b8435612aae81612d89565b935060208501359250604085013567ffffffffffffffff80821115612ad257600080fd5b818701915087601f830112612ae657600080fd5b813581811115612af557600080fd5b886020828501011115612b0757600080fd5b95989497505060200194505050565b600080600060608486031215612b2b57600080fd5b8335612b3681612d89565b95602085013595506040909401359392505050565b600060208284031215612b5d57600080fd5b8135612a2181612d9e565b600060208284031215612b7a57600080fd5b8151612a2181612d9e565b600060208284031215612b9757600080fd5b5035919050565b600060208284031215612bb057600080fd5b5051919050565b60008060408385031215612bca57600080fd5b823591506020830135612a5681612d89565b60008060408385031215612bef57600080fd5b50508035926020909101359150565b600081518084526020808501945080840160005b83811015612c2e57815187529582019590820190600101612c12565b509495945050505050565b60a081526000612c4c60a0830188612bfe565b8281036020840152612c5e8188612bfe565b90508281036040840152612c728187612bfe565b60608401959095525050608001529392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115612ccf57612ccf612d47565b500190565b600082612cf157634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615612d1057612d10612d47565b500290565b600082821015612d2757612d27612d47565b500390565b6000600019821415612d4057612d40612d47565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114611df757600080fd5b8015158114611df757600080fdfea2646970667358221220dd23175d98d300c3dc4c9c38c7f6a2a887172b2cceabeb81a956fd7cd84ea08764736f6c63430008070033