Source Code
Latest 9 from a total of 9 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Rescue Tokens | 55997501 | 660 days ago | IN | 0 POL | 0.01701097 | ||||
| Buy Back | 52454543 | 752 days ago | IN | 0 POL | 0.00851582 | ||||
| Transfer | 52454516 | 752 days ago | IN | 75 POL | 0.00068071 | ||||
| Buy Back | 50803916 | 795 days ago | IN | 0 POL | 0.02606555 | ||||
| Set Swap Setting... | 50803902 | 795 days ago | IN | 0 POL | 0.00845402 | ||||
| Set Swap Setting... | 50803573 | 795 days ago | IN | 0 POL | 0.0074261 | ||||
| Transfer | 44890530 | 944 days ago | IN | 100 POL | 0.00197525 | ||||
| Transfer Ownersh... | 44505305 | 954 days ago | IN | 0 POL | 0.00477758 | ||||
| Initialize | 44505244 | 954 days ago | IN | 0 POL | 0.03687302 |
Latest 25 internal transactions (View All)
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 52454543 | 752 days ago | 82.55663803 POL | ||||
| 50803916 | 795 days ago | 226.13276075 POL | ||||
| 50711580 | 797 days ago | 0.05 POL | ||||
| 50108537 | 812 days ago | 1.55 POL | ||||
| 49896901 | 817 days ago | 1.55 POL | ||||
| 49896879 | 817 days ago | 1.55 POL | ||||
| 49896853 | 817 days ago | 1.55 POL | ||||
| 49896567 | 817 days ago | 1.55 POL | ||||
| 49896561 | 817 days ago | 1.55 POL | ||||
| 49896533 | 817 days ago | 1.55 POL | ||||
| 49896516 | 817 days ago | 1.55 POL | ||||
| 49630555 | 824 days ago | 1.55 POL | ||||
| 49630364 | 824 days ago | 1.55 POL | ||||
| 49630350 | 824 days ago | 1.55 POL | ||||
| 49499984 | 827 days ago | 1.55 POL | ||||
| 49462770 | 828 days ago | 1.55 POL | ||||
| 49462720 | 828 days ago | 1.55 POL | ||||
| 49460390 | 828 days ago | 1.55 POL | ||||
| 49460368 | 828 days ago | 1.55 POL | ||||
| 49397904 | 830 days ago | 0.0024925 POL | ||||
| 49397904 | 830 days ago | 0.0024925 POL | ||||
| 49397904 | 830 days ago | 0.0125 POL | ||||
| 49382274 | 830 days ago | 1.55 POL | ||||
| 49382268 | 830 days ago | 1.55 POL | ||||
| 49382223 | 830 days ago | 1.55 POL |
Cross-Chain Transactions
Loading...
Loading
Contract Name:
BrewlabsTreasuryV5
Compiler Version
v0.8.14+commit.80d49f37
Optimization Enabled:
Yes with 100 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @author Brewlabs
* This treasury contract has been developed by brewlabs.info
*/
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {IERC20, SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "./libs/IUniFactory.sol";
import "./libs/IUniRouter02.sol";
interface IStaking {
function performanceFee() external view returns (uint256);
function setServiceInfo(address _addr, uint256 _fee) external;
}
interface IFarm {
function setBuyBackWallet(address _addr) external;
}
contract BrewlabsTreasuryV5 is Ownable {
using SafeERC20 for IERC20;
bool private isInitialized;
uint256 private constant TIME_UNIT = 1 days;
uint256 private constant PERCENT_PRECISION = 10000;
IERC20 public token;
address public dividendToken;
address public pair;
address private constant USDC = 0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174;
uint256 public period = 30; // 30 days
uint256 public withdrawalLimit = 500; // 5% of total supply
uint256 public liquidityWithdrawalLimit = 2000; // 20% of LP supply
uint256 public buybackRate = 9500; // 95%
uint256 public addLiquidityRate = 9400; // 94%
uint256 public stakingRate = 1500; // 15%
uint256 private startTime;
uint256 private sumWithdrawals = 0;
uint256 private sumLiquidityWithdrawals = 0;
address public uniRouterAddress;
address[] public maticToTokenPath;
address[] public maticToDividendPath;
address[] public dividendToTokenPath;
uint256 public slippageFactor = 8300; // 17%
uint256 public constant slippageFactorUL = 9950;
event Initialized(
address token,
address dividendToken,
address router,
address[] maticToTokenPath,
address[] maticToDividendPath,
address[] dividendToTokenPath
);
event TokenBuyBack(uint256 amountETH, uint256 amountToken);
event TokenBuyBackFromDividend(uint256 amount, uint256 amountToken);
event LiquidityAdded(uint256 amountETH, uint256 amountToken, uint256 liquidity);
event LiquidityWithdrawn(uint256 amount);
event Withdrawn(uint256 amount);
event Harvested(address account, uint256 amount);
event Swapped(address token, uint256 amountETH, uint256 amountToken);
event MaticHarvested(address to, uint256 amount);
event EmergencyWithdrawn();
event AdminTokenRecovered(address tokenRecovered, uint256 amount);
event UsdcHarvested(address to, uint256[] amounts);
event SetSwapConfig(
address router,
uint256 slipPage,
address[] maticToTokenPath,
address[] maticToDividendPath,
address[] dividendToTokenPath
);
event TransferBuyBackWallet(address staking, address wallet);
event AddLiquidityRateUpdated(uint256 percent);
event BuybackRateUpdated(uint256 percent);
event SetStakingRateUpdated(uint256 percent);
event PeriodUpdated(uint256 duration);
event LiquidityWithdrawLimitUpdated(uint256 percent);
event WithdrawLimitUpdated(uint256 percent);
constructor() {}
/**
* @notice Initialize the contract
* @param _token: token address
* @param _dividendToken: reflection token address
* @param _uniRouter: uniswap router address for swap tokens
* @param _maticToTokenPath: swap path to buy Token
* @param _maticToDividendPath: swap path to buy dividend token
* @param _dividendToTokenPath: swap path to buy Token with dividend token
*/
function initialize(
IERC20 _token,
address _dividendToken,
address _uniRouter,
address[] memory _maticToTokenPath,
address[] memory _maticToDividendPath,
address[] memory _dividendToTokenPath
) external onlyOwner {
require(!isInitialized, "Already initialized");
require(_uniRouter != address(0x0), "invalid address");
require(address(_token) != address(0x0), "invalid token address");
// Make this contract initialized
isInitialized = true;
token = _token;
dividendToken = _dividendToken;
pair = IUniV2Factory(IUniRouter02(_uniRouter).factory()).getPair(_maticToTokenPath[0], address(token));
uniRouterAddress = _uniRouter;
maticToTokenPath = _maticToTokenPath;
maticToDividendPath = _maticToDividendPath;
dividendToTokenPath = _dividendToTokenPath;
emit Initialized(
address(_token), _dividendToken, _uniRouter, _maticToTokenPath, _maticToDividendPath, _dividendToTokenPath
);
}
/**
* @notice Buy token from MATIC
*/
function buyBack() external onlyOwner {
uint256 ethAmt = address(this).balance;
ethAmt = (ethAmt * buybackRate) / PERCENT_PRECISION;
if (ethAmt > 0) {
uint256 _tokenAmt = _safeSwapEth(ethAmt, maticToTokenPath, address(this));
emit TokenBuyBack(ethAmt, _tokenAmt);
}
}
/**
* @notice Buy token from MATIC and transfer token to staking pool
*/
function buyBackStakeMATIC(address _staking) external onlyOwner {
uint256 ethAmt = address(this).balance;
ethAmt = (ethAmt * buybackRate) / PERCENT_PRECISION;
if (ethAmt > 0) {
uint256 _tokenAmt = _safeSwapEth(ethAmt, maticToTokenPath, address(this));
emit TokenBuyBack(ethAmt, _tokenAmt);
token.safeTransfer(_staking, _tokenAmt * stakingRate / PERCENT_PRECISION);
}
}
/**
* @notice Buy token from reflections and transfer token to staking pool
*/
function buyBackStakeDividend(address _staking) external onlyOwner {
if (dividendToken == address(0x0)) return;
uint256 reflections = IERC20(dividendToken).balanceOf(address(this));
if (reflections > 0) {
uint256 _tokenAmt = _safeSwap(reflections, dividendToTokenPath, address(this));
emit TokenBuyBackFromDividend(reflections, _tokenAmt);
token.safeTransfer(_staking, _tokenAmt * stakingRate / PERCENT_PRECISION);
}
}
/**
* @notice Buy token from reflections
*/
function buyBackFromDividend() external onlyOwner {
if (dividendToken == address(0x0)) return;
uint256 reflections = IERC20(dividendToken).balanceOf(address(this));
if (reflections > 0) {
uint256 _tokenAmt = _safeSwap(reflections, dividendToTokenPath, address(this));
emit TokenBuyBackFromDividend(reflections, _tokenAmt);
}
}
/**
* @notice Add liquidity
*/
function addLiquidity() external onlyOwner {
uint256 ethAmt = address(this).balance;
ethAmt = (ethAmt * addLiquidityRate) / PERCENT_PRECISION / 2;
if (ethAmt > 0) {
uint256 _tokenAmt = _safeSwapEth(ethAmt, maticToTokenPath, address(this));
emit TokenBuyBack(ethAmt, _tokenAmt);
(uint256 amountToken, uint256 amountETH, uint256 liquidity) =
_addLiquidityEth(address(token), ethAmt, _tokenAmt, address(this));
emit LiquidityAdded(amountETH, amountToken, liquidity);
}
}
/**
* @notice Swap and harvest reflection for token
* @param _to: receiver address
*/
function harvest(address _to) external onlyOwner {
uint256 ethAmt = address(this).balance;
ethAmt = (ethAmt * buybackRate) / PERCENT_PRECISION;
if (dividendToken == address(0x0)) {
if (ethAmt > 0) {
payable(_to).transfer(ethAmt);
emit Harvested(_to, ethAmt);
}
} else {
if (ethAmt > 0) {
uint256 _tokenAmt = _safeSwapEth(ethAmt, maticToDividendPath, address(this));
emit Swapped(dividendToken, ethAmt, _tokenAmt);
}
uint256 tokenAmt = IERC20(dividendToken).balanceOf(address(this));
if (tokenAmt > 0) {
IERC20(dividendToken).transfer(_to, tokenAmt);
emit Harvested(_to, tokenAmt);
}
}
}
function harvestMATIC(address _to) external onlyOwner {
require(_to != address(0x0), "invalid address");
uint256 ethAmt = address(this).balance;
payable(_to).transfer(ethAmt);
emit MaticHarvested(_to, ethAmt);
}
function harvestUSDC(address _to) external onlyOwner {
require(_to != address(0x0), "invalid address");
uint256 ethAmt = address(this).balance;
ethAmt = (ethAmt * buybackRate) / PERCENT_PRECISION;
if (ethAmt == 0) return;
address[] memory path = new address[](2);
path[0] = IUniRouter02(uniRouterAddress).WETH();
path[1] = USDC;
uint256[] memory amounts =
IUniRouter02(uniRouterAddress).swapExactETHForTokens{value: ethAmt}(0, path, _to, block.timestamp + 600);
emit UsdcHarvested(_to, amounts);
}
/**
* @notice Withdraw token as much as maximum 5% of total supply
* @param _amount: amount to withdraw
*/
function withdraw(uint256 _amount) external onlyOwner {
uint256 tokenAmt = token.balanceOf(address(this));
require(_amount > 0 && _amount <= tokenAmt, "Invalid Amount");
if (block.timestamp - startTime > period * TIME_UNIT) {
startTime = block.timestamp;
sumWithdrawals = 0;
}
uint256 limit = (withdrawalLimit * (token.totalSupply())) / PERCENT_PRECISION;
require(sumWithdrawals + _amount <= limit, "exceed maximum withdrawal limit for 30 days");
token.safeTransfer(msg.sender, _amount);
emit Withdrawn(_amount);
}
/**
* @notice Withdraw liquidity
* @param _amount: amount to withdraw
*/
function withdrawLiquidity(uint256 _amount) external onlyOwner {
uint256 tokenAmt = IERC20(pair).balanceOf(address(this));
require(_amount > 0 && _amount <= tokenAmt, "Invalid Amount");
if (block.timestamp - startTime > period * TIME_UNIT) {
startTime = block.timestamp;
sumLiquidityWithdrawals = 0;
}
uint256 limit = (liquidityWithdrawalLimit * (IERC20(pair).totalSupply())) / PERCENT_PRECISION;
require(sumLiquidityWithdrawals + _amount <= limit, "exceed maximum LP withdrawal limit for 30 days");
IERC20(pair).safeTransfer(msg.sender, _amount);
emit LiquidityWithdrawn(_amount);
}
/**
* @notice Withdraw tokens
* @dev Needs to be for emergency.
*/
function emergencyWithdraw() external onlyOwner {
uint256 tokenAmt = token.balanceOf(address(this));
if (tokenAmt > 0) {
token.transfer(msg.sender, tokenAmt);
}
tokenAmt = IERC20(pair).balanceOf(address(this));
if (tokenAmt > 0) {
IERC20(pair).transfer(msg.sender, tokenAmt);
}
uint256 ethAmt = address(this).balance;
if (ethAmt > 0) {
payable(msg.sender).transfer(ethAmt);
}
emit EmergencyWithdrawn();
}
/**
* @notice Set duration for withdraw limit
* @param _period: duration
*/
function setWithdrawalLimitPeriod(uint256 _period) external onlyOwner {
require(_period >= 10, "small period");
period = _period;
emit PeriodUpdated(_period);
}
/**
* @notice Set liquidity withdraw limit
* @param _percent: percentage of LP supply in point
*/
function setLiquidityWithdrawalLimit(uint256 _percent) external onlyOwner {
require(_percent < PERCENT_PRECISION, "Invalid percentage");
liquidityWithdrawalLimit = _percent;
emit LiquidityWithdrawLimitUpdated(_percent);
}
/**
* @notice Set withdraw limit
* @param _percent: percentage of total supply in point
*/
function setWithdrawalLimit(uint256 _percent) external onlyOwner {
require(_percent < PERCENT_PRECISION, "Invalid percentage");
withdrawalLimit = _percent;
emit WithdrawLimitUpdated(_percent);
}
/**
* @notice Set buyback rate
* @param _percent: percentage in point
*/
function setBuybackRate(uint256 _percent) external onlyOwner {
require(_percent < PERCENT_PRECISION, "Invalid percentage");
buybackRate = _percent;
emit BuybackRateUpdated(_percent);
}
/**
* @notice Set addliquidy rate
* @param _percent: percentage in point
*/
function setAddLiquidityRate(uint256 _percent) external onlyOwner {
require(_percent < PERCENT_PRECISION, "Invalid percentage");
addLiquidityRate = _percent;
emit AddLiquidityRateUpdated(_percent);
}
/**
* @notice Set percentage to transfer tokens
* @param _percent: percentage in point
*/
function setStakingRate(uint256 _percent) external onlyOwner {
require(_percent < PERCENT_PRECISION, "Invalid percentage");
stakingRate = _percent;
emit SetStakingRateUpdated(_percent);
}
/**
* @notice Set buyback wallet of farm contract
* @param _uniRouter: dex router address
* @param _slipPage: slip page for swap
* @param _maticToTokenPath: matic-token swap path
* @param _maticToDividendPath: matic-token swap path
* @param _dividendToTokenPath: matic-token swap path
*/
function setSwapSettings(
address _uniRouter,
uint256 _slipPage,
address[] memory _maticToTokenPath,
address[] memory _maticToDividendPath,
address[] memory _dividendToTokenPath
) external onlyOwner {
require(_uniRouter != address(0x0), "invalid address");
require(_slipPage <= slippageFactorUL, "_slippage too high");
uniRouterAddress = _uniRouter;
slippageFactor = _slipPage;
maticToTokenPath = _maticToTokenPath;
maticToDividendPath = _maticToDividendPath;
dividendToTokenPath = _dividendToTokenPath;
pair = IUniV2Factory(IUniRouter02(_uniRouter).factory()).getPair(_maticToTokenPath[0], address(token));
emit SetSwapConfig(_uniRouter, _slipPage, _maticToTokenPath, _maticToDividendPath, _dividendToTokenPath);
}
/**
* @notice set buyback wallet of farm contract
* @param _farm: farm contract address
* @param _addr: buyback wallet address
*/
function setFarmServiceInfo(address _farm, address _addr) external onlyOwner {
require(_farm != address(0x0) && _addr != address(0x0), "Invalid Address");
IFarm(_farm).setBuyBackWallet(_addr);
emit TransferBuyBackWallet(_farm, _addr);
}
/**
* @notice set buyback wallet of staking contract
* @param _staking: staking contract address
* @param _addr: buyback wallet address
*/
function setStakingServiceInfo(address _staking, address _addr) external onlyOwner {
require(_staking != address(0x0) && _addr != address(0x0), "Invalid Address");
uint256 _fee = IStaking(_staking).performanceFee();
IStaking(_staking).setServiceInfo(_addr, _fee);
emit TransferBuyBackWallet(_staking, _addr);
}
/**
* @notice It allows the admin to recover wrong tokens sent to the contract
* @param _token: the address of the token to withdraw
* @dev This function is only callable by admin.
*/
function rescueTokens(address _token) external onlyOwner {
require(
_token != address(token) && _token != dividendToken && _token != pair,
"Cannot be token & dividend token, pair"
);
uint256 _tokenAmount;
if (_token == address(0x0)) {
_tokenAmount = address(this).balance;
payable(msg.sender).transfer(_tokenAmount);
} else {
_tokenAmount = IERC20(_token).balanceOf(address(this));
IERC20(_token).safeTransfer(msg.sender, _tokenAmount);
}
emit AdminTokenRecovered(_token, _tokenAmount);
}
/**
* @notice get token from ETH via swap.
* @param _amountIn: eth amount to swap
* @param _path: swap path
* @param _to: receiver address
*/
function _safeSwapEth(uint256 _amountIn, address[] memory _path, address _to) internal returns (uint256) {
uint256[] memory amounts = IUniRouter02(uniRouterAddress).getAmountsOut(_amountIn, _path);
uint256 amountOut = amounts[amounts.length - 1];
address _token = _path[_path.length - 1];
uint256 beforeAmt = IERC20(_token).balanceOf(address(this));
IUniRouter02(uniRouterAddress).swapExactETHForTokensSupportingFeeOnTransferTokens{value: _amountIn}(
(amountOut * slippageFactor) / PERCENT_PRECISION, _path, _to, block.timestamp + 600
);
uint256 afterAmt = IERC20(_token).balanceOf(address(this));
return afterAmt - beforeAmt;
}
/**
* @notice swap token based on path.
* @param _amountIn: token amount to swap
* @param _path: swap path
* @param _to: receiver address
*/
function _safeSwap(uint256 _amountIn, address[] memory _path, address _to) internal returns (uint256) {
uint256[] memory amounts = IUniRouter02(uniRouterAddress).getAmountsOut(_amountIn, _path);
uint256 amountOut = amounts[amounts.length - 1];
IERC20(_path[0]).safeApprove(uniRouterAddress, _amountIn);
address _token = _path[_path.length - 1];
uint256 beforeAmt = IERC20(_token).balanceOf(address(this));
IUniRouter02(uniRouterAddress).swapExactTokensForTokensSupportingFeeOnTransferTokens(
_amountIn, (amountOut * slippageFactor) / PERCENT_PRECISION, _path, _to, block.timestamp + 600
);
uint256 afterAmt = IERC20(_token).balanceOf(address(this));
return afterAmt - beforeAmt;
}
/**
* @notice add token-MATIC liquidity.
* @param _token: token address
* @param _ethAmt: eth amount to add liquidity
* @param _tokenAmt: token amount to add liquidity
* @param _to: receiver address
*/
function _addLiquidityEth(address _token, uint256 _ethAmt, uint256 _tokenAmt, address _to)
internal
returns (uint256 amountToken, uint256 amountETH, uint256 liquidity)
{
IERC20(_token).safeIncreaseAllowance(uniRouterAddress, _tokenAmt);
(amountToken, amountETH, liquidity) = IUniRouter02(uniRouterAddress).addLiquidityETH{value: _ethAmt}(
address(_token), _tokenAmt, 0, 0, _to, block.timestamp + 600
);
IERC20(_token).safeApprove(uniRouterAddress, uint256(0));
}
receive() external payable {}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
*
* Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
* presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
* need to send a transaction, and thus is not required to hold Ether at all.
*/
interface IERC20Permit {
/**
* @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
* given ``owner``'s signed approval.
*
* IMPORTANT: The same issues {IERC20-approve} has related to transaction
* ordering also apply here.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `deadline` must be a timestamp in the future.
* - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
* over the EIP712-formatted function arguments.
* - the signature must use ``owner``'s current nonce (see {nonces}).
*
* For more information on the signature format, see the
* https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
* section].
*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
/**
* @dev Returns the current nonce for `owner`. This value must be
* included whenever a signature is generated for {permit}.
*
* Every successful call to {permit} increases ``owner``'s nonce by one. This
* prevents a signature from being used multiple times.
*/
function nonces(address owner) external view returns (uint256);
/**
* @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
*/
// solhint-disable-next-line func-name-mixedcase
function DOMAIN_SEPARATOR() external view returns (bytes32);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 amount
) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.sol";
import "../../../utils/Address.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using Address for address;
function safeTransfer(
IERC20 token,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(
IERC20 token,
address from,
address to,
uint256 value
) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(
IERC20 token,
address spender,
uint256 value
) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
require(
(value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
function safeIncreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
uint256 newAllowance = token.allowance(address(this), spender) + value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function safeDecreaseAllowance(
IERC20 token,
address spender,
uint256 value
) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
uint256 newAllowance = oldAllowance - value;
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
}
function safePermit(
IERC20Permit token,
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) internal {
uint256 nonceBefore = token.nonces(owner);
token.permit(owner, spender, value, deadline, v, r, s);
uint256 nonceAfter = token.nonces(owner);
require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
// the target address contains contract code and also asserts for success in the low-level call.
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
if (returndata.length > 0) {
// Return data is optional
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IUniV2Factory {
function getPair(address tokenA, address tokenB) external view returns (address);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IUniRouter01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint256 amountADesired,
uint256 amountBDesired,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) external returns (uint256 amountA, uint256 amountB, uint256 liquidity);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity);
function removeLiquidity(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETH(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountToken, uint256 amountETH);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETHWithPermit(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountToken, uint256 amountETH);
function swapExactTokensForTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapTokensForExactTokens(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactETHForTokens(uint256 amountOutMin, address[] calldata path, address to, uint256 deadline)
external
payable
returns (uint256[] memory amounts);
function swapTokensForExactETH(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactTokensForETH(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapETHForExactTokens(uint256 amountOut, address[] calldata path, address to, uint256 deadline)
external
payable
returns (uint256[] memory amounts);
function quote(uint256 amountA, uint256 reserveA, uint256 reserveB) external pure returns (uint256 amountB);
function getAmountOut(uint256 amountIn, uint256 reserveIn, uint256 reserveOut)
external
pure
returns (uint256 amountOut);
function getAmountIn(uint256 amountOut, uint256 reserveIn, uint256 reserveOut)
external
pure
returns (uint256 amountIn);
function getAmountsOut(uint256 amountIn, address[] calldata path)
external
view
returns (uint256[] memory amounts);
function getAmountsIn(uint256 amountOut, address[] calldata path)
external
view
returns (uint256[] memory amounts);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./IUniRouter01.sol";
interface IUniRouter02 is IUniRouter01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountETH);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}{
"optimizer": {
"enabled": true,
"runs": 100
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"metadata": {
"useLiteralContent": true
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"percent","type":"uint256"}],"name":"AddLiquidityRateUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"tokenRecovered","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"AdminTokenRecovered","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"percent","type":"uint256"}],"name":"BuybackRateUpdated","type":"event"},{"anonymous":false,"inputs":[],"name":"EmergencyWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Harvested","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"dividendToken","type":"address"},{"indexed":false,"internalType":"address","name":"router","type":"address"},{"indexed":false,"internalType":"address[]","name":"maticToTokenPath","type":"address[]"},{"indexed":false,"internalType":"address[]","name":"maticToDividendPath","type":"address[]"},{"indexed":false,"internalType":"address[]","name":"dividendToTokenPath","type":"address[]"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amountETH","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountToken","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"liquidity","type":"uint256"}],"name":"LiquidityAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"percent","type":"uint256"}],"name":"LiquidityWithdrawLimitUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"LiquidityWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"MaticHarvested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"duration","type":"uint256"}],"name":"PeriodUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"percent","type":"uint256"}],"name":"SetStakingRateUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"router","type":"address"},{"indexed":false,"internalType":"uint256","name":"slipPage","type":"uint256"},{"indexed":false,"internalType":"address[]","name":"maticToTokenPath","type":"address[]"},{"indexed":false,"internalType":"address[]","name":"maticToDividendPath","type":"address[]"},{"indexed":false,"internalType":"address[]","name":"dividendToTokenPath","type":"address[]"}],"name":"SetSwapConfig","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountETH","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountToken","type":"uint256"}],"name":"Swapped","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amountETH","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountToken","type":"uint256"}],"name":"TokenBuyBack","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountToken","type":"uint256"}],"name":"TokenBuyBackFromDividend","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"staking","type":"address"},{"indexed":false,"internalType":"address","name":"wallet","type":"address"}],"name":"TransferBuyBackWallet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"UsdcHarvested","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"percent","type":"uint256"}],"name":"WithdrawLimitUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdrawn","type":"event"},{"inputs":[],"name":"addLiquidity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"addLiquidityRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"buyBack","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"buyBackFromDividend","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_staking","type":"address"}],"name":"buyBackStakeDividend","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_staking","type":"address"}],"name":"buyBackStakeMATIC","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"buybackRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"dividendToTokenPath","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dividendToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"}],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"}],"name":"harvestMATIC","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"}],"name":"harvestUSDC","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"address","name":"_dividendToken","type":"address"},{"internalType":"address","name":"_uniRouter","type":"address"},{"internalType":"address[]","name":"_maticToTokenPath","type":"address[]"},{"internalType":"address[]","name":"_maticToDividendPath","type":"address[]"},{"internalType":"address[]","name":"_dividendToTokenPath","type":"address[]"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"liquidityWithdrawalLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"maticToDividendPath","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"maticToTokenPath","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pair","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"period","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"rescueTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percent","type":"uint256"}],"name":"setAddLiquidityRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percent","type":"uint256"}],"name":"setBuybackRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_farm","type":"address"},{"internalType":"address","name":"_addr","type":"address"}],"name":"setFarmServiceInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percent","type":"uint256"}],"name":"setLiquidityWithdrawalLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percent","type":"uint256"}],"name":"setStakingRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_staking","type":"address"},{"internalType":"address","name":"_addr","type":"address"}],"name":"setStakingServiceInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_uniRouter","type":"address"},{"internalType":"uint256","name":"_slipPage","type":"uint256"},{"internalType":"address[]","name":"_maticToTokenPath","type":"address[]"},{"internalType":"address[]","name":"_maticToDividendPath","type":"address[]"},{"internalType":"address[]","name":"_dividendToTokenPath","type":"address[]"}],"name":"setSwapSettings","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percent","type":"uint256"}],"name":"setWithdrawalLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_period","type":"uint256"}],"name":"setWithdrawalLimitPeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"slippageFactor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"slippageFactorUL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"uniRouterAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawLiquidity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawalLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
6080604052601e6004556101f46005556107d060065561251c6007556124b86008556105dc6009556000600b556000600c5561206c6011553480156200004457600080fd5b50620000503362000056565b620000a6565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61372480620000b66000396000f3fe60806040526004361061023e5760003560e01c80636e10f4761161012e578063c63a6ad2116100ab578063ef78d4fd1161006f578063ef78d4fd14610661578063f2fde38b14610677578063f76024c414610697578063fc0c546a146106ad578063ffbd3b1f146106cd57600080fd5b8063c63a6ad2146105e1578063db26eace146105f7578063db2e21bc14610617578063e8078d941461062c578063e8669da61461064157600080fd5b80638d583550116100f25780638d583550146105625780638da5cb5b14610578578063a8aa1b3114610596578063acdf4f18146105b6578063b74cd242146105cb57600080fd5b80636e10f476146104d7578063715018a6146104f75780637ddfe78d1461050c57806382db9c9c146105225780638a3175251461054257600080fd5b80632e1a7d4d116101bc5780634f64d758116101805780634f64d758146104375780635a0768ce14610457578063630f6f8b14610477578063661b993614610497578063693a090b146104b757600080fd5b80632e1a7d4d146103a2578063365247fc146103c25780633c4666cf146103e25780633ca68190146104025780634d2e6d2a1461042257600080fd5b8063107ee89311610203578063107ee893146102f557806313b36023146103225780631582358e146103425780631a884b0e14610362578063227e23b31461038257600080fd5b8062ae3bf81461024a578063045af2581461026c5780630a861f2a146102955780630daa6c0d146102b55780630e5c011e146102d557600080fd5b3661024557005b600080fd5b34801561025657600080fd5b5061026a610265366004612f2e565b6106e3565b005b34801561027857600080fd5b5061028260085481565b6040519081526020015b60405180910390f35b3480156102a157600080fd5b5061026a6102b0366004612f52565b610897565b3480156102c157600080fd5b5061026a6102d0366004612f6b565b610ac6565b3480156102e157600080fd5b5061026a6102f0366004612f2e565b610b99565b34801561030157600080fd5b50610315610310366004612f52565b610e28565b60405161028c9190612fa4565b34801561032e57600080fd5b5061026a61033d366004612f2e565b610e52565b34801561034e57600080fd5b50600254610315906001600160a01b031681565b34801561036e57600080fd5b5061031561037d366004612f52565b610eea565b34801561038e57600080fd5b5061026a61039d366004612f52565b610efa565b3480156103ae57600080fd5b5061026a6103bd366004612f52565b610f5f565b3480156103ce57600080fd5b5061026a6103dd366004612f2e565b611182565b3480156103ee57600080fd5b5061026a6103fd366004613097565b61139e565b34801561040e57600080fd5b5061026a61041d366004612f52565b61165d565b34801561042e57600080fd5b5061026a6116bb565b34801561044357600080fd5b5061026a610452366004612f2e565b6117f0565b34801561046357600080fd5b5061026a610472366004612f52565b611957565b34801561048357600080fd5b5061026a610492366004613156565b6119b5565b3480156104a357600080fd5b506103156104b2366004612f52565b611bea565b3480156104c357600080fd5b50600d54610315906001600160a01b031681565b3480156104e357600080fd5b5061026a6104f2366004612f52565b611bfa565b34801561050357600080fd5b5061026a611c58565b34801561051857600080fd5b5061028260055481565b34801561052e57600080fd5b5061026a61053d366004612f2e565b611c6a565b34801561054e57600080fd5b5061026a61055d366004612f6b565b611d23565b34801561056e57600080fd5b5061028260065481565b34801561058457600080fd5b506000546001600160a01b0316610315565b3480156105a257600080fd5b50600354610315906001600160a01b031681565b3480156105c257600080fd5b5061026a611e5f565b3480156105d757600080fd5b506102826126de81565b3480156105ed57600080fd5b5061028260095481565b34801561060357600080fd5b5061026a610612366004612f52565b611f18565b34801561062357600080fd5b5061026a611f95565b34801561063857600080fd5b5061026a6121e1565b34801561064d57600080fd5b5061026a61065c366004612f52565b61230f565b34801561066d57600080fd5b5061028260045481565b34801561068357600080fd5b5061026a610692366004612f2e565b61236d565b3480156106a357600080fd5b5061028260075481565b3480156106b957600080fd5b50600154610315906001600160a01b031681565b3480156106d957600080fd5b5061028260115481565b6106eb6123e3565b6001546001600160a01b0382811691161480159061071757506002546001600160a01b03828116911614155b801561073157506003546001600160a01b03828116911614155b6107915760405162461bcd60e51b815260206004820152602660248201527f43616e6e6f7420626520746f6b656e2026206469766964656e6420746f6b656e60448201526516103830b4b960d11b60648201526084015b60405180910390fd5b60006001600160a01b0382166107d757506040514790339082156108fc029083906000818181858888f193505050501580156107d1573d6000803e3d6000fd5b5061085a565b6040516370a0823160e01b81526001600160a01b038316906370a0823190610803903090600401612fa4565b602060405180830381865afa158015610820573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061084491906131fb565b905061085a6001600160a01b038316338361243d565b7f74f5dcd55c394cb1c6d3b9da22c2464bcc46c38cc3865bd629ed75823249b40b828260405161088b929190613214565b60405180910390a15050565b61089f6123e3565b6003546040516370a0823160e01b81526000916001600160a01b0316906370a08231906108d0903090600401612fa4565b602060405180830381865afa1580156108ed573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061091191906131fb565b90506000821180156109235750808211155b61093f5760405162461bcd60e51b81526004016107889061322d565b62015180600454610950919061326b565b600a5461095d904261328a565b111561096d5742600a556000600c555b6000612710600360009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109e991906131fb565b6006546109f6919061326b565b610a0091906132a1565b90508083600c54610a1191906132c3565b1115610a765760405162461bcd60e51b815260206004820152602e60248201527f657863656564206d6178696d756d204c50207769746864726177616c206c696d60448201526d697420666f72203330206461797360901b6064820152608401610788565b600354610a8d906001600160a01b0316338561243d565b6040518381527f73ce532f480864bd2fccd1bcdbb4c8151f02cd9450c4f3e5b834ef74503abdb2906020015b60405180910390a1505050565b610ace6123e3565b6001600160a01b03821615801590610aee57506001600160a01b03811615155b610b0a5760405162461bcd60e51b8152600401610788906132db565b60405163523205c160e11b81526001600160a01b0383169063a4640b8290610b36908490600401612fa4565b600060405180830381600087803b158015610b5057600080fd5b505af1158015610b64573d6000803e3d6000fd5b505050507f7f78141a3bd83bf938eb2a367b5b7e1a1056d8128b3f1809535eed46891c9033828260405161088b929190613304565b610ba16123e3565b600754479061271090610bb4908361326b565b610bbe91906132a1565b6002549091506001600160a01b0316610c43578015610c3f576040516001600160a01b0383169082156108fc029083906000818181858888f19350505050158015610c0d573d6000803e3d6000fd5b507f121c5042302bae5fc561fbc64368f297ca60a880878e1e3a7f7e9380377260bf828260405161088b929190613214565b5050565b8015610d02576000610cb082600f805480602002602001604051908101604052809291908181526020018280548015610ca557602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610c87575b505050505030612493565b600254604080516001600160a01b0390921682526020820185905281018290529091507f3a9a9f34f5831e9c8ecb66ab3aa308b2ff31eaca434615f6c9cadc656a9af71c9060600160405180910390a1505b6002546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610d33903090600401612fa4565b602060405180830381865afa158015610d50573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d7491906131fb565b90508015610e235760025460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb90610dae9086908590600401613214565b6020604051808303816000875af1158015610dcd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df1919061331e565b507f121c5042302bae5fc561fbc64368f297ca60a880878e1e3a7f7e9380377260bf8382604051610ab9929190613214565b505050565b60108181548110610e3857600080fd5b6000918252602090912001546001600160a01b0316905081565b610e5a6123e3565b6001600160a01b038116610e805760405162461bcd60e51b815260040161078890613340565b60405147906001600160a01b0383169082156108fc029083906000818181858888f19350505050158015610eb8573d6000803e3d6000fd5b507fc529a24a5c61165911add1dd5d2f43960a11d85b1420b7a5d7b9f8dab636a9dd828260405161088b929190613214565b600e8181548110610e3857600080fd5b610f026123e3565b6127108110610f235760405162461bcd60e51b815260040161078890613369565b60098190556040518181527f56083659539418b67c37504a0b7d5fb4dafbe36b22abbc6286bdb65db2de4873906020015b60405180910390a150565b610f676123e3565b6001546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610f98903090600401612fa4565b602060405180830381865afa158015610fb5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fd991906131fb565b9050600082118015610feb5750808211155b6110075760405162461bcd60e51b81526004016107889061322d565b62015180600454611018919061326b565b600a54611025904261328a565b11156110355742600a556000600b555b6000612710600160009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561108d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110b191906131fb565b6005546110be919061326b565b6110c891906132a1565b90508083600b546110d991906132c3565b111561113b5760405162461bcd60e51b815260206004820152602b60248201527f657863656564206d6178696d756d207769746864726177616c206c696d69742060448201526a666f72203330206461797360a81b6064820152608401610788565b600154611152906001600160a01b0316338561243d565b6040518381527f430648de173157e069201c943adb2d4e340e7cf5b27b1b09c9cb852f03d63b5690602001610ab9565b61118a6123e3565b6001600160a01b0381166111b05760405162461bcd60e51b815260040161078890613340565b6007544790612710906111c3908361326b565b6111cd91906132a1565b9050806000036111db575050565b6040805160028082526060820183526000926020830190803683375050600d54604080516315ab88c960e31b815290519394506001600160a01b039091169263ad5c4648925060048083019260209291908290030181865afa158015611245573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112699190613395565b8160008151811061127c5761127c6133b2565b60200260200101906001600160a01b031690816001600160a01b031681525050732791bca1f2de4661ed88a30c99a7a9449aa84174816001815181106112c4576112c46133b2565b6001600160a01b039283166020918202929092010152600d5460009116637ff36ab5848385886112f6426102586132c3565b6040518663ffffffff1660e01b8152600401611315949392919061340c565b60006040518083038185885af1158015611333573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f1916820160405261135c9190810190613441565b90507f8b20b26dcda038ac2feab95f28f3dd32b371cce650645b63e301421e62386ea0848260405161138f9291906134c7565b60405180910390a15050505b50565b6113a66123e3565b600054600160a01b900460ff16156113f65760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b6044820152606401610788565b6001600160a01b03841661141c5760405162461bcd60e51b815260040161078890613340565b6001600160a01b03861661146a5760405162461bcd60e51b8152602060048201526015602482015274696e76616c696420746f6b656e206164647265737360581b6044820152606401610788565b6000805460ff60a01b1916600160a01b179055600180546001600160a01b038089166001600160a01b0319928316179092556002805488841692169190911790556040805163c45a015560e01b815290519186169163c45a0155916004808201926020929091908290030181865afa1580156114ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061150e9190613395565b6001600160a01b031663e6a439058460008151811061152f5761152f6133b2565b60209081029190910101516001546040516001600160e01b031960e085901b16815261156892916001600160a01b031690600401613304565b602060405180830381865afa158015611585573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a99190613395565b600380546001600160a01b03199081166001600160a01b0393841617909155600d805490911691861691909117905582516115eb90600e906020860190612e9f565b5081516115ff90600f906020850190612e9f565b508051611613906010906020840190612e9f565b507f4ae045405af58409ab59a9b3af6c2424441a8d0cc7f0d58d675d19073dec75e386868686868660405161164d9695949392919061351d565b60405180910390a1505050505050565b6116656123e3565b61271081106116865760405162461bcd60e51b815260040161078890613369565b60088190556040518181527f71e39bccc2e27c18ea159b9a4fbc08961b9d9583ea143ae3e5021cf6aefb613c90602001610f54565b6116c36123e3565b6002546001600160a01b0316156117ee576002546040516370a0823160e01b81526000916001600160a01b0316906370a0823190611705903090600401612fa4565b602060405180830381865afa158015611722573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061174691906131fb565b9050801561139b5760006117b58260108054806020026020016040519081016040528092919081815260200182805480156117aa57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161178c575b5050505050306126f1565b60408051848152602081018390529192507fb578101e5d792c57de69a936b880873b1c2e9f776134e5a89f463decc7963e1c910161088b565b565b6117f86123e3565b6002546001600160a01b03161561139b576002546040516370a0823160e01b81526000916001600160a01b0316906370a082319061183a903090600401612fa4565b602060405180830381865afa158015611857573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061187b91906131fb565b90508015610c3f5760006118e88260108054806020026020016040519081016040528092919081815260200182805480156117aa576020028201919060005260206000209081546001600160a01b0316815260019091019060200180831161178c575050505050306126f1565b60408051848152602081018390529192507fb578101e5d792c57de69a936b880873b1c2e9f776134e5a89f463decc7963e1c91015b60405180910390a1610e23836127106009548461193a919061326b565b61194491906132a1565b6001546001600160a01b0316919061243d565b61195f6123e3565b61271081106119805760405162461bcd60e51b815260040161078890613369565b60058190556040518181527f0969f79b044617688492c7c9b226129947037ca88c450002a7561ed78aa549ac90602001610f54565b6119bd6123e3565b6001600160a01b0385166119e35760405162461bcd60e51b815260040161078890613340565b6126de841115611a2a5760405162461bcd60e51b81526020600482015260126024820152710bee6d8d2e0e0c2ceca40e8dede40d0d2ced60731b6044820152606401610788565b600d80546001600160a01b0319166001600160a01b03871617905560118490558251611a5d90600e906020860190612e9f565b508151611a7190600f906020850190612e9f565b508051611a85906010906020840190612e9f565b50846001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015611ac4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ae89190613395565b6001600160a01b031663e6a4390584600081518110611b0957611b096133b2565b60209081029190910101516001546040516001600160e01b031960e085901b168152611b4292916001600160a01b031690600401613304565b602060405180830381865afa158015611b5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b839190613395565b600380546001600160a01b0319166001600160a01b03929092169190911790556040517fac823b586c853c1953e323c1189297cec5b2cb4b1316ac35ccf979e1969dbc0f90611bdb9087908790879087908790613577565b60405180910390a15050505050565b600f8181548110610e3857600080fd5b611c026123e3565b6127108110611c235760405162461bcd60e51b815260040161078890613369565b60078190556040518181527fcc694eb069971c6c91f6c905b0f66a7a6322a90a42f3904b7508e7b9336a7dfe90602001610f54565b611c606123e3565b6117ee6000612943565b611c726123e3565b600754479061271090611c85908361326b565b611c8f91906132a1565b90508015610c3f576000611cfc82600e805480602002602001604051908101604052809291908181526020018280548015610ca5576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311610c8757505050505030612493565b60408051848152602081018390529192506000805160206136cf833981519152910161191d565b611d2b6123e3565b6001600160a01b03821615801590611d4b57506001600160a01b03811615155b611d675760405162461bcd60e51b8152600401610788906132db565b6000826001600160a01b031663877887826040518163ffffffff1660e01b8152600401602060405180830381865afa158015611da7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dcb91906131fb565b604051631036c32960e31b81529091506001600160a01b038416906381b6194890611dfc9085908590600401613214565b600060405180830381600087803b158015611e1657600080fd5b505af1158015611e2a573d6000803e3d6000fd5b505050507f7f78141a3bd83bf938eb2a367b5b7e1a1056d8128b3f1809535eed46891c90338383604051610ab9929190613304565b611e676123e3565b600754479061271090611e7a908361326b565b611e8491906132a1565b9050801561139b576000611ef182600e805480602002602001604051908101604052809291908181526020018280548015610ca5576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311610c8757505050505030612493565b60408051848152602081018390529192506000805160206136cf833981519152910161088b565b611f206123e3565b600a811015611f605760405162461bcd60e51b815260206004820152600c60248201526b1cdb585b1b081c195c9a5bd960a21b6044820152606401610788565b60048190556040518181527f989f99d0a575dfaf67701aef35b8654442a4705a4bce243d8f81e1bb2bc4a63f90602001610f54565b611f9d6123e3565b6001546040516370a0823160e01b81526000916001600160a01b0316906370a0823190611fce903090600401612fa4565b602060405180830381865afa158015611feb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061200f91906131fb565b9050801561208e5760015460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb906120499033908590600401613214565b6020604051808303816000875af1158015612068573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061208c919061331e565b505b6003546040516370a0823160e01b81526001600160a01b03909116906370a08231906120be903090600401612fa4565b602060405180830381865afa1580156120db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120ff91906131fb565b9050801561217e5760035460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb906121399033908590600401613214565b6020604051808303816000875af1158015612158573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061217c919061331e565b505b4780156121b457604051339082156108fc029083906000818181858888f193505050501580156121b2573d6000803e3d6000fd5b505b6040517fcd310f174a338d5afb2b17ebca2bda872a317a1e5ec53f6277803b93e8644eb990600090a15050565b6121e96123e3565b6008544790600290612710906121ff908461326b565b61220991906132a1565b61221391906132a1565b9050801561139b57600061228082600e805480602002602001604051908101604052809291908181526020018280548015610ca5576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311610c8757505050505030612493565b60408051848152602081018390529192506000805160206136cf833981519152910160405180910390a1600154600090819081906122c9906001600160a01b0316868630612993565b604080518381526020810185905290810182905292955090935091507fd7f28048575eead8851d024ead087913957dfb4fd1a02b4d1573f5352a5a2be390606001611bdb565b6123176123e3565b61271081106123385760405162461bcd60e51b815260040161078890613369565b60068190556040518181527f0eeb4417a0dd5e563056eaf6d3024509bedf001cfac9394bb02f37e3414fa34b90602001610f54565b6123756123e3565b6001600160a01b0381166123da5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610788565b61139b81612943565b6000546001600160a01b031633146117ee5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610788565b610e238363a9059cbb60e01b848460405160240161245c929190613214565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612a97565b600d5460405163d06ca61f60e01b815260009182916001600160a01b039091169063d06ca61f906124ca90889088906004016135d0565b600060405180830381865afa1580156124e7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261250f9190810190613441565b905060008160018351612522919061328a565b81518110612532576125326133b2565b602002602001015190506000856001875161254d919061328a565b8151811061255d5761255d6133b2565b602002602001015190506000816001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016125959190612fa4565b602060405180830381865afa1580156125b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125d691906131fb565b600d546011549192506001600160a01b03169063b6f9de95908a90612710906125ff908861326b565b61260991906132a1565b8a8a612617426102586132c3565b6040518663ffffffff1660e01b8152600401612636949392919061340c565b6000604051808303818588803b15801561264f57600080fd5b505af1158015612663573d6000803e3d6000fd5b50506040516370a0823160e01b8152600093506001600160a01b03861692506370a082319150612697903090600401612fa4565b602060405180830381865afa1580156126b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126d891906131fb565b90506126e4828261328a565b9998505050505050505050565b600d5460405163d06ca61f60e01b815260009182916001600160a01b039091169063d06ca61f9061272890889088906004016135d0565b600060405180830381865afa158015612745573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261276d9190810190613441565b905060008160018351612780919061328a565b81518110612790576127906133b2565b602002602001015190506127e7600d60009054906101000a90046001600160a01b031687876000815181106127c7576127c76133b2565b60200260200101516001600160a01b0316612b699092919063ffffffff16565b600085600187516127f8919061328a565b81518110612808576128086133b2565b602002602001015190506000816001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016128409190612fa4565b602060405180830381865afa15801561285d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061288191906131fb565b600d546011549192506001600160a01b031690635c11d795908a90612710906128aa908861326b565b6128b491906132a1565b8a8a6128c2426102586132c3565b6040518663ffffffff1660e01b81526004016128e29594939291906135e9565b600060405180830381600087803b1580156128fc57600080fd5b505af1158015612910573d6000803e3d6000fd5b50506040516370a0823160e01b8152600092506001600160a01b03851691506370a0823190612697903090600401612fa4565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600d54600090819081906129b4906001600160a01b03898116911687612c6c565b600d546001600160a01b031663f305d7198789886000808a6129d8426102586132c3565b60405160e089901b6001600160e01b03191681526001600160a01b039687166004820152602481019590955260448501939093526064840191909152909216608482015260a481019190915260c40160606040518083038185885af1158015612a45573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190612a6a9190613625565b600d549295509093509150612a8d906001600160a01b0389811691166000612b69565b9450945094915050565b6000612aec826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612d0f9092919063ffffffff16565b805190915015610e235780806020019051810190612b0a919061331e565b610e235760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610788565b801580612be25750604051636eb1769f60e11b81526001600160a01b0384169063dd62ed3e90612b9f9030908690600401613304565b602060405180830381865afa158015612bbc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612be091906131fb565b155b612c4d5760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b6064820152608401610788565b610e238363095ea7b360e01b848460405160240161245c929190613214565b600081846001600160a01b031663dd62ed3e30866040518363ffffffff1660e01b8152600401612c9d929190613304565b602060405180830381865afa158015612cba573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612cde91906131fb565b612ce891906132c3565b9050612d098463095ea7b360e01b858460405160240161245c929190613214565b50505050565b6060612d1e8484600085612d26565b949350505050565b606082471015612d875760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610788565b600080866001600160a01b03168587604051612da3919061367f565b60006040518083038185875af1925050503d8060008114612de0576040519150601f19603f3d011682016040523d82523d6000602084013e612de5565b606091505b5091509150612df687838387612e01565b979650505050505050565b60608315612e70578251600003612e69576001600160a01b0385163b612e695760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610788565b5081612d1e565b612d1e8383815115612e855781518083602001fd5b8060405162461bcd60e51b8152600401610788919061369b565b828054828255906000526020600020908101928215612ef4579160200282015b82811115612ef457825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190612ebf565b50612f00929150612f04565b5090565b5b80821115612f005760008155600101612f05565b6001600160a01b038116811461139b57600080fd5b600060208284031215612f4057600080fd5b8135612f4b81612f19565b9392505050565b600060208284031215612f6457600080fd5b5035919050565b60008060408385031215612f7e57600080fd5b8235612f8981612f19565b91506020830135612f9981612f19565b809150509250929050565b6001600160a01b0391909116815260200190565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612ff757612ff7612fb8565b604052919050565b600067ffffffffffffffff82111561301957613019612fb8565b5060051b60200190565b600082601f83011261303457600080fd5b8135602061304961304483612fff565b612fce565b82815260059290921b8401810191818101908684111561306857600080fd5b8286015b8481101561308c57803561307f81612f19565b835291830191830161306c565b509695505050505050565b60008060008060008060c087890312156130b057600080fd5b86356130bb81612f19565b955060208701356130cb81612f19565b945060408701356130db81612f19565b9350606087013567ffffffffffffffff808211156130f857600080fd5b6131048a838b01613023565b9450608089013591508082111561311a57600080fd5b6131268a838b01613023565b935060a089013591508082111561313c57600080fd5b5061314989828a01613023565b9150509295509295509295565b600080600080600060a0868803121561316e57600080fd5b853561317981612f19565b945060208601359350604086013567ffffffffffffffff8082111561319d57600080fd5b6131a989838a01613023565b945060608801359150808211156131bf57600080fd5b6131cb89838a01613023565b935060808801359150808211156131e157600080fd5b506131ee88828901613023565b9150509295509295909350565b60006020828403121561320d57600080fd5b5051919050565b6001600160a01b03929092168252602082015260400190565b6020808252600e908201526d125b9d985b1a5908105b5bdd5b9d60921b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561328557613285613255565b500290565b60008282101561329c5761329c613255565b500390565b6000826132be57634e487b7160e01b600052601260045260246000fd5b500490565b600082198211156132d6576132d6613255565b500190565b6020808252600f908201526e496e76616c6964204164647265737360881b604082015260600190565b6001600160a01b0392831681529116602082015260400190565b60006020828403121561333057600080fd5b81518015158114612f4b57600080fd5b6020808252600f908201526e696e76616c6964206164647265737360881b604082015260600190565b602080825260129082015271496e76616c69642070657263656e7461676560701b604082015260600190565b6000602082840312156133a757600080fd5b8151612f4b81612f19565b634e487b7160e01b600052603260045260246000fd5b600081518084526020808501945080840160005b838110156134015781516001600160a01b0316875295820195908201906001016133dc565b509495945050505050565b84815260806020820152600061342560808301866133c8565b6001600160a01b03949094166040830152506060015292915050565b6000602080838503121561345457600080fd5b825167ffffffffffffffff81111561346b57600080fd5b8301601f8101851361347c57600080fd5b805161348a61304482612fff565b81815260059190911b820183019083810190878311156134a957600080fd5b928401925b82841015612df6578351825292840192908401906134ae565b6001600160a01b038316815260406020808301829052835191830182905260009184820191906060850190845b81811015613510578451835293830193918301916001016134f4565b5090979650505050505050565b6001600160a01b03878116825286811660208301528516604082015260c060608201819052600090613551908301866133c8565b828103608084015261356381866133c8565b905082810360a08401526126e481856133c8565b60018060a01b038616815284602082015260a06040820152600061359e60a08301866133c8565b82810360608401526135b081866133c8565b905082810360808401526135c481856133c8565b98975050505050505050565b828152604060208201526000612d1e60408301846133c8565b85815284602082015260a06040820152600061360860a08301866133c8565b6001600160a01b0394909416606083015250608001529392505050565b60008060006060848603121561363a57600080fd5b8351925060208401519150604084015190509250925092565b60005b8381101561366e578181015183820152602001613656565b83811115612d095750506000910152565b60008251613691818460208701613653565b9190910192915050565b60208152600082518060208401526136ba816040850160208701613653565b601f01601f1916919091016040019291505056fe5af76d43c73e649d671103b29a6b93de2a53abb35bf2600ac3d04b13d413072da264697066735822122033efd6c9d64a72e09351cf4cdf3844883040eb182d0d1592685c757fd4a2d75264736f6c634300080e0033
Deployed Bytecode
0x60806040526004361061023e5760003560e01c80636e10f4761161012e578063c63a6ad2116100ab578063ef78d4fd1161006f578063ef78d4fd14610661578063f2fde38b14610677578063f76024c414610697578063fc0c546a146106ad578063ffbd3b1f146106cd57600080fd5b8063c63a6ad2146105e1578063db26eace146105f7578063db2e21bc14610617578063e8078d941461062c578063e8669da61461064157600080fd5b80638d583550116100f25780638d583550146105625780638da5cb5b14610578578063a8aa1b3114610596578063acdf4f18146105b6578063b74cd242146105cb57600080fd5b80636e10f476146104d7578063715018a6146104f75780637ddfe78d1461050c57806382db9c9c146105225780638a3175251461054257600080fd5b80632e1a7d4d116101bc5780634f64d758116101805780634f64d758146104375780635a0768ce14610457578063630f6f8b14610477578063661b993614610497578063693a090b146104b757600080fd5b80632e1a7d4d146103a2578063365247fc146103c25780633c4666cf146103e25780633ca68190146104025780634d2e6d2a1461042257600080fd5b8063107ee89311610203578063107ee893146102f557806313b36023146103225780631582358e146103425780631a884b0e14610362578063227e23b31461038257600080fd5b8062ae3bf81461024a578063045af2581461026c5780630a861f2a146102955780630daa6c0d146102b55780630e5c011e146102d557600080fd5b3661024557005b600080fd5b34801561025657600080fd5b5061026a610265366004612f2e565b6106e3565b005b34801561027857600080fd5b5061028260085481565b6040519081526020015b60405180910390f35b3480156102a157600080fd5b5061026a6102b0366004612f52565b610897565b3480156102c157600080fd5b5061026a6102d0366004612f6b565b610ac6565b3480156102e157600080fd5b5061026a6102f0366004612f2e565b610b99565b34801561030157600080fd5b50610315610310366004612f52565b610e28565b60405161028c9190612fa4565b34801561032e57600080fd5b5061026a61033d366004612f2e565b610e52565b34801561034e57600080fd5b50600254610315906001600160a01b031681565b34801561036e57600080fd5b5061031561037d366004612f52565b610eea565b34801561038e57600080fd5b5061026a61039d366004612f52565b610efa565b3480156103ae57600080fd5b5061026a6103bd366004612f52565b610f5f565b3480156103ce57600080fd5b5061026a6103dd366004612f2e565b611182565b3480156103ee57600080fd5b5061026a6103fd366004613097565b61139e565b34801561040e57600080fd5b5061026a61041d366004612f52565b61165d565b34801561042e57600080fd5b5061026a6116bb565b34801561044357600080fd5b5061026a610452366004612f2e565b6117f0565b34801561046357600080fd5b5061026a610472366004612f52565b611957565b34801561048357600080fd5b5061026a610492366004613156565b6119b5565b3480156104a357600080fd5b506103156104b2366004612f52565b611bea565b3480156104c357600080fd5b50600d54610315906001600160a01b031681565b3480156104e357600080fd5b5061026a6104f2366004612f52565b611bfa565b34801561050357600080fd5b5061026a611c58565b34801561051857600080fd5b5061028260055481565b34801561052e57600080fd5b5061026a61053d366004612f2e565b611c6a565b34801561054e57600080fd5b5061026a61055d366004612f6b565b611d23565b34801561056e57600080fd5b5061028260065481565b34801561058457600080fd5b506000546001600160a01b0316610315565b3480156105a257600080fd5b50600354610315906001600160a01b031681565b3480156105c257600080fd5b5061026a611e5f565b3480156105d757600080fd5b506102826126de81565b3480156105ed57600080fd5b5061028260095481565b34801561060357600080fd5b5061026a610612366004612f52565b611f18565b34801561062357600080fd5b5061026a611f95565b34801561063857600080fd5b5061026a6121e1565b34801561064d57600080fd5b5061026a61065c366004612f52565b61230f565b34801561066d57600080fd5b5061028260045481565b34801561068357600080fd5b5061026a610692366004612f2e565b61236d565b3480156106a357600080fd5b5061028260075481565b3480156106b957600080fd5b50600154610315906001600160a01b031681565b3480156106d957600080fd5b5061028260115481565b6106eb6123e3565b6001546001600160a01b0382811691161480159061071757506002546001600160a01b03828116911614155b801561073157506003546001600160a01b03828116911614155b6107915760405162461bcd60e51b815260206004820152602660248201527f43616e6e6f7420626520746f6b656e2026206469766964656e6420746f6b656e60448201526516103830b4b960d11b60648201526084015b60405180910390fd5b60006001600160a01b0382166107d757506040514790339082156108fc029083906000818181858888f193505050501580156107d1573d6000803e3d6000fd5b5061085a565b6040516370a0823160e01b81526001600160a01b038316906370a0823190610803903090600401612fa4565b602060405180830381865afa158015610820573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061084491906131fb565b905061085a6001600160a01b038316338361243d565b7f74f5dcd55c394cb1c6d3b9da22c2464bcc46c38cc3865bd629ed75823249b40b828260405161088b929190613214565b60405180910390a15050565b61089f6123e3565b6003546040516370a0823160e01b81526000916001600160a01b0316906370a08231906108d0903090600401612fa4565b602060405180830381865afa1580156108ed573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061091191906131fb565b90506000821180156109235750808211155b61093f5760405162461bcd60e51b81526004016107889061322d565b62015180600454610950919061326b565b600a5461095d904261328a565b111561096d5742600a556000600c555b6000612710600360009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109e991906131fb565b6006546109f6919061326b565b610a0091906132a1565b90508083600c54610a1191906132c3565b1115610a765760405162461bcd60e51b815260206004820152602e60248201527f657863656564206d6178696d756d204c50207769746864726177616c206c696d60448201526d697420666f72203330206461797360901b6064820152608401610788565b600354610a8d906001600160a01b0316338561243d565b6040518381527f73ce532f480864bd2fccd1bcdbb4c8151f02cd9450c4f3e5b834ef74503abdb2906020015b60405180910390a1505050565b610ace6123e3565b6001600160a01b03821615801590610aee57506001600160a01b03811615155b610b0a5760405162461bcd60e51b8152600401610788906132db565b60405163523205c160e11b81526001600160a01b0383169063a4640b8290610b36908490600401612fa4565b600060405180830381600087803b158015610b5057600080fd5b505af1158015610b64573d6000803e3d6000fd5b505050507f7f78141a3bd83bf938eb2a367b5b7e1a1056d8128b3f1809535eed46891c9033828260405161088b929190613304565b610ba16123e3565b600754479061271090610bb4908361326b565b610bbe91906132a1565b6002549091506001600160a01b0316610c43578015610c3f576040516001600160a01b0383169082156108fc029083906000818181858888f19350505050158015610c0d573d6000803e3d6000fd5b507f121c5042302bae5fc561fbc64368f297ca60a880878e1e3a7f7e9380377260bf828260405161088b929190613214565b5050565b8015610d02576000610cb082600f805480602002602001604051908101604052809291908181526020018280548015610ca557602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610c87575b505050505030612493565b600254604080516001600160a01b0390921682526020820185905281018290529091507f3a9a9f34f5831e9c8ecb66ab3aa308b2ff31eaca434615f6c9cadc656a9af71c9060600160405180910390a1505b6002546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610d33903090600401612fa4565b602060405180830381865afa158015610d50573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d7491906131fb565b90508015610e235760025460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb90610dae9086908590600401613214565b6020604051808303816000875af1158015610dcd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df1919061331e565b507f121c5042302bae5fc561fbc64368f297ca60a880878e1e3a7f7e9380377260bf8382604051610ab9929190613214565b505050565b60108181548110610e3857600080fd5b6000918252602090912001546001600160a01b0316905081565b610e5a6123e3565b6001600160a01b038116610e805760405162461bcd60e51b815260040161078890613340565b60405147906001600160a01b0383169082156108fc029083906000818181858888f19350505050158015610eb8573d6000803e3d6000fd5b507fc529a24a5c61165911add1dd5d2f43960a11d85b1420b7a5d7b9f8dab636a9dd828260405161088b929190613214565b600e8181548110610e3857600080fd5b610f026123e3565b6127108110610f235760405162461bcd60e51b815260040161078890613369565b60098190556040518181527f56083659539418b67c37504a0b7d5fb4dafbe36b22abbc6286bdb65db2de4873906020015b60405180910390a150565b610f676123e3565b6001546040516370a0823160e01b81526000916001600160a01b0316906370a0823190610f98903090600401612fa4565b602060405180830381865afa158015610fb5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fd991906131fb565b9050600082118015610feb5750808211155b6110075760405162461bcd60e51b81526004016107889061322d565b62015180600454611018919061326b565b600a54611025904261328a565b11156110355742600a556000600b555b6000612710600160009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561108d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110b191906131fb565b6005546110be919061326b565b6110c891906132a1565b90508083600b546110d991906132c3565b111561113b5760405162461bcd60e51b815260206004820152602b60248201527f657863656564206d6178696d756d207769746864726177616c206c696d69742060448201526a666f72203330206461797360a81b6064820152608401610788565b600154611152906001600160a01b0316338561243d565b6040518381527f430648de173157e069201c943adb2d4e340e7cf5b27b1b09c9cb852f03d63b5690602001610ab9565b61118a6123e3565b6001600160a01b0381166111b05760405162461bcd60e51b815260040161078890613340565b6007544790612710906111c3908361326b565b6111cd91906132a1565b9050806000036111db575050565b6040805160028082526060820183526000926020830190803683375050600d54604080516315ab88c960e31b815290519394506001600160a01b039091169263ad5c4648925060048083019260209291908290030181865afa158015611245573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112699190613395565b8160008151811061127c5761127c6133b2565b60200260200101906001600160a01b031690816001600160a01b031681525050732791bca1f2de4661ed88a30c99a7a9449aa84174816001815181106112c4576112c46133b2565b6001600160a01b039283166020918202929092010152600d5460009116637ff36ab5848385886112f6426102586132c3565b6040518663ffffffff1660e01b8152600401611315949392919061340c565b60006040518083038185885af1158015611333573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f1916820160405261135c9190810190613441565b90507f8b20b26dcda038ac2feab95f28f3dd32b371cce650645b63e301421e62386ea0848260405161138f9291906134c7565b60405180910390a15050505b50565b6113a66123e3565b600054600160a01b900460ff16156113f65760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b6044820152606401610788565b6001600160a01b03841661141c5760405162461bcd60e51b815260040161078890613340565b6001600160a01b03861661146a5760405162461bcd60e51b8152602060048201526015602482015274696e76616c696420746f6b656e206164647265737360581b6044820152606401610788565b6000805460ff60a01b1916600160a01b179055600180546001600160a01b038089166001600160a01b0319928316179092556002805488841692169190911790556040805163c45a015560e01b815290519186169163c45a0155916004808201926020929091908290030181865afa1580156114ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061150e9190613395565b6001600160a01b031663e6a439058460008151811061152f5761152f6133b2565b60209081029190910101516001546040516001600160e01b031960e085901b16815261156892916001600160a01b031690600401613304565b602060405180830381865afa158015611585573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a99190613395565b600380546001600160a01b03199081166001600160a01b0393841617909155600d805490911691861691909117905582516115eb90600e906020860190612e9f565b5081516115ff90600f906020850190612e9f565b508051611613906010906020840190612e9f565b507f4ae045405af58409ab59a9b3af6c2424441a8d0cc7f0d58d675d19073dec75e386868686868660405161164d9695949392919061351d565b60405180910390a1505050505050565b6116656123e3565b61271081106116865760405162461bcd60e51b815260040161078890613369565b60088190556040518181527f71e39bccc2e27c18ea159b9a4fbc08961b9d9583ea143ae3e5021cf6aefb613c90602001610f54565b6116c36123e3565b6002546001600160a01b0316156117ee576002546040516370a0823160e01b81526000916001600160a01b0316906370a0823190611705903090600401612fa4565b602060405180830381865afa158015611722573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061174691906131fb565b9050801561139b5760006117b58260108054806020026020016040519081016040528092919081815260200182805480156117aa57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161178c575b5050505050306126f1565b60408051848152602081018390529192507fb578101e5d792c57de69a936b880873b1c2e9f776134e5a89f463decc7963e1c910161088b565b565b6117f86123e3565b6002546001600160a01b03161561139b576002546040516370a0823160e01b81526000916001600160a01b0316906370a082319061183a903090600401612fa4565b602060405180830381865afa158015611857573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061187b91906131fb565b90508015610c3f5760006118e88260108054806020026020016040519081016040528092919081815260200182805480156117aa576020028201919060005260206000209081546001600160a01b0316815260019091019060200180831161178c575050505050306126f1565b60408051848152602081018390529192507fb578101e5d792c57de69a936b880873b1c2e9f776134e5a89f463decc7963e1c91015b60405180910390a1610e23836127106009548461193a919061326b565b61194491906132a1565b6001546001600160a01b0316919061243d565b61195f6123e3565b61271081106119805760405162461bcd60e51b815260040161078890613369565b60058190556040518181527f0969f79b044617688492c7c9b226129947037ca88c450002a7561ed78aa549ac90602001610f54565b6119bd6123e3565b6001600160a01b0385166119e35760405162461bcd60e51b815260040161078890613340565b6126de841115611a2a5760405162461bcd60e51b81526020600482015260126024820152710bee6d8d2e0e0c2ceca40e8dede40d0d2ced60731b6044820152606401610788565b600d80546001600160a01b0319166001600160a01b03871617905560118490558251611a5d90600e906020860190612e9f565b508151611a7190600f906020850190612e9f565b508051611a85906010906020840190612e9f565b50846001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015611ac4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ae89190613395565b6001600160a01b031663e6a4390584600081518110611b0957611b096133b2565b60209081029190910101516001546040516001600160e01b031960e085901b168152611b4292916001600160a01b031690600401613304565b602060405180830381865afa158015611b5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b839190613395565b600380546001600160a01b0319166001600160a01b03929092169190911790556040517fac823b586c853c1953e323c1189297cec5b2cb4b1316ac35ccf979e1969dbc0f90611bdb9087908790879087908790613577565b60405180910390a15050505050565b600f8181548110610e3857600080fd5b611c026123e3565b6127108110611c235760405162461bcd60e51b815260040161078890613369565b60078190556040518181527fcc694eb069971c6c91f6c905b0f66a7a6322a90a42f3904b7508e7b9336a7dfe90602001610f54565b611c606123e3565b6117ee6000612943565b611c726123e3565b600754479061271090611c85908361326b565b611c8f91906132a1565b90508015610c3f576000611cfc82600e805480602002602001604051908101604052809291908181526020018280548015610ca5576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311610c8757505050505030612493565b60408051848152602081018390529192506000805160206136cf833981519152910161191d565b611d2b6123e3565b6001600160a01b03821615801590611d4b57506001600160a01b03811615155b611d675760405162461bcd60e51b8152600401610788906132db565b6000826001600160a01b031663877887826040518163ffffffff1660e01b8152600401602060405180830381865afa158015611da7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dcb91906131fb565b604051631036c32960e31b81529091506001600160a01b038416906381b6194890611dfc9085908590600401613214565b600060405180830381600087803b158015611e1657600080fd5b505af1158015611e2a573d6000803e3d6000fd5b505050507f7f78141a3bd83bf938eb2a367b5b7e1a1056d8128b3f1809535eed46891c90338383604051610ab9929190613304565b611e676123e3565b600754479061271090611e7a908361326b565b611e8491906132a1565b9050801561139b576000611ef182600e805480602002602001604051908101604052809291908181526020018280548015610ca5576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311610c8757505050505030612493565b60408051848152602081018390529192506000805160206136cf833981519152910161088b565b611f206123e3565b600a811015611f605760405162461bcd60e51b815260206004820152600c60248201526b1cdb585b1b081c195c9a5bd960a21b6044820152606401610788565b60048190556040518181527f989f99d0a575dfaf67701aef35b8654442a4705a4bce243d8f81e1bb2bc4a63f90602001610f54565b611f9d6123e3565b6001546040516370a0823160e01b81526000916001600160a01b0316906370a0823190611fce903090600401612fa4565b602060405180830381865afa158015611feb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061200f91906131fb565b9050801561208e5760015460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb906120499033908590600401613214565b6020604051808303816000875af1158015612068573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061208c919061331e565b505b6003546040516370a0823160e01b81526001600160a01b03909116906370a08231906120be903090600401612fa4565b602060405180830381865afa1580156120db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120ff91906131fb565b9050801561217e5760035460405163a9059cbb60e01b81526001600160a01b039091169063a9059cbb906121399033908590600401613214565b6020604051808303816000875af1158015612158573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061217c919061331e565b505b4780156121b457604051339082156108fc029083906000818181858888f193505050501580156121b2573d6000803e3d6000fd5b505b6040517fcd310f174a338d5afb2b17ebca2bda872a317a1e5ec53f6277803b93e8644eb990600090a15050565b6121e96123e3565b6008544790600290612710906121ff908461326b565b61220991906132a1565b61221391906132a1565b9050801561139b57600061228082600e805480602002602001604051908101604052809291908181526020018280548015610ca5576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311610c8757505050505030612493565b60408051848152602081018390529192506000805160206136cf833981519152910160405180910390a1600154600090819081906122c9906001600160a01b0316868630612993565b604080518381526020810185905290810182905292955090935091507fd7f28048575eead8851d024ead087913957dfb4fd1a02b4d1573f5352a5a2be390606001611bdb565b6123176123e3565b61271081106123385760405162461bcd60e51b815260040161078890613369565b60068190556040518181527f0eeb4417a0dd5e563056eaf6d3024509bedf001cfac9394bb02f37e3414fa34b90602001610f54565b6123756123e3565b6001600160a01b0381166123da5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610788565b61139b81612943565b6000546001600160a01b031633146117ee5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610788565b610e238363a9059cbb60e01b848460405160240161245c929190613214565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612a97565b600d5460405163d06ca61f60e01b815260009182916001600160a01b039091169063d06ca61f906124ca90889088906004016135d0565b600060405180830381865afa1580156124e7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261250f9190810190613441565b905060008160018351612522919061328a565b81518110612532576125326133b2565b602002602001015190506000856001875161254d919061328a565b8151811061255d5761255d6133b2565b602002602001015190506000816001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016125959190612fa4565b602060405180830381865afa1580156125b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125d691906131fb565b600d546011549192506001600160a01b03169063b6f9de95908a90612710906125ff908861326b565b61260991906132a1565b8a8a612617426102586132c3565b6040518663ffffffff1660e01b8152600401612636949392919061340c565b6000604051808303818588803b15801561264f57600080fd5b505af1158015612663573d6000803e3d6000fd5b50506040516370a0823160e01b8152600093506001600160a01b03861692506370a082319150612697903090600401612fa4565b602060405180830381865afa1580156126b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126d891906131fb565b90506126e4828261328a565b9998505050505050505050565b600d5460405163d06ca61f60e01b815260009182916001600160a01b039091169063d06ca61f9061272890889088906004016135d0565b600060405180830381865afa158015612745573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261276d9190810190613441565b905060008160018351612780919061328a565b81518110612790576127906133b2565b602002602001015190506127e7600d60009054906101000a90046001600160a01b031687876000815181106127c7576127c76133b2565b60200260200101516001600160a01b0316612b699092919063ffffffff16565b600085600187516127f8919061328a565b81518110612808576128086133b2565b602002602001015190506000816001600160a01b03166370a08231306040518263ffffffff1660e01b81526004016128409190612fa4565b602060405180830381865afa15801561285d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061288191906131fb565b600d546011549192506001600160a01b031690635c11d795908a90612710906128aa908861326b565b6128b491906132a1565b8a8a6128c2426102586132c3565b6040518663ffffffff1660e01b81526004016128e29594939291906135e9565b600060405180830381600087803b1580156128fc57600080fd5b505af1158015612910573d6000803e3d6000fd5b50506040516370a0823160e01b8152600092506001600160a01b03851691506370a0823190612697903090600401612fa4565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600d54600090819081906129b4906001600160a01b03898116911687612c6c565b600d546001600160a01b031663f305d7198789886000808a6129d8426102586132c3565b60405160e089901b6001600160e01b03191681526001600160a01b039687166004820152602481019590955260448501939093526064840191909152909216608482015260a481019190915260c40160606040518083038185885af1158015612a45573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190612a6a9190613625565b600d549295509093509150612a8d906001600160a01b0389811691166000612b69565b9450945094915050565b6000612aec826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612d0f9092919063ffffffff16565b805190915015610e235780806020019051810190612b0a919061331e565b610e235760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610788565b801580612be25750604051636eb1769f60e11b81526001600160a01b0384169063dd62ed3e90612b9f9030908690600401613304565b602060405180830381865afa158015612bbc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612be091906131fb565b155b612c4d5760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b6064820152608401610788565b610e238363095ea7b360e01b848460405160240161245c929190613214565b600081846001600160a01b031663dd62ed3e30866040518363ffffffff1660e01b8152600401612c9d929190613304565b602060405180830381865afa158015612cba573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612cde91906131fb565b612ce891906132c3565b9050612d098463095ea7b360e01b858460405160240161245c929190613214565b50505050565b6060612d1e8484600085612d26565b949350505050565b606082471015612d875760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610788565b600080866001600160a01b03168587604051612da3919061367f565b60006040518083038185875af1925050503d8060008114612de0576040519150601f19603f3d011682016040523d82523d6000602084013e612de5565b606091505b5091509150612df687838387612e01565b979650505050505050565b60608315612e70578251600003612e69576001600160a01b0385163b612e695760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610788565b5081612d1e565b612d1e8383815115612e855781518083602001fd5b8060405162461bcd60e51b8152600401610788919061369b565b828054828255906000526020600020908101928215612ef4579160200282015b82811115612ef457825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190612ebf565b50612f00929150612f04565b5090565b5b80821115612f005760008155600101612f05565b6001600160a01b038116811461139b57600080fd5b600060208284031215612f4057600080fd5b8135612f4b81612f19565b9392505050565b600060208284031215612f6457600080fd5b5035919050565b60008060408385031215612f7e57600080fd5b8235612f8981612f19565b91506020830135612f9981612f19565b809150509250929050565b6001600160a01b0391909116815260200190565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612ff757612ff7612fb8565b604052919050565b600067ffffffffffffffff82111561301957613019612fb8565b5060051b60200190565b600082601f83011261303457600080fd5b8135602061304961304483612fff565b612fce565b82815260059290921b8401810191818101908684111561306857600080fd5b8286015b8481101561308c57803561307f81612f19565b835291830191830161306c565b509695505050505050565b60008060008060008060c087890312156130b057600080fd5b86356130bb81612f19565b955060208701356130cb81612f19565b945060408701356130db81612f19565b9350606087013567ffffffffffffffff808211156130f857600080fd5b6131048a838b01613023565b9450608089013591508082111561311a57600080fd5b6131268a838b01613023565b935060a089013591508082111561313c57600080fd5b5061314989828a01613023565b9150509295509295509295565b600080600080600060a0868803121561316e57600080fd5b853561317981612f19565b945060208601359350604086013567ffffffffffffffff8082111561319d57600080fd5b6131a989838a01613023565b945060608801359150808211156131bf57600080fd5b6131cb89838a01613023565b935060808801359150808211156131e157600080fd5b506131ee88828901613023565b9150509295509295909350565b60006020828403121561320d57600080fd5b5051919050565b6001600160a01b03929092168252602082015260400190565b6020808252600e908201526d125b9d985b1a5908105b5bdd5b9d60921b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561328557613285613255565b500290565b60008282101561329c5761329c613255565b500390565b6000826132be57634e487b7160e01b600052601260045260246000fd5b500490565b600082198211156132d6576132d6613255565b500190565b6020808252600f908201526e496e76616c6964204164647265737360881b604082015260600190565b6001600160a01b0392831681529116602082015260400190565b60006020828403121561333057600080fd5b81518015158114612f4b57600080fd5b6020808252600f908201526e696e76616c6964206164647265737360881b604082015260600190565b602080825260129082015271496e76616c69642070657263656e7461676560701b604082015260600190565b6000602082840312156133a757600080fd5b8151612f4b81612f19565b634e487b7160e01b600052603260045260246000fd5b600081518084526020808501945080840160005b838110156134015781516001600160a01b0316875295820195908201906001016133dc565b509495945050505050565b84815260806020820152600061342560808301866133c8565b6001600160a01b03949094166040830152506060015292915050565b6000602080838503121561345457600080fd5b825167ffffffffffffffff81111561346b57600080fd5b8301601f8101851361347c57600080fd5b805161348a61304482612fff565b81815260059190911b820183019083810190878311156134a957600080fd5b928401925b82841015612df6578351825292840192908401906134ae565b6001600160a01b038316815260406020808301829052835191830182905260009184820191906060850190845b81811015613510578451835293830193918301916001016134f4565b5090979650505050505050565b6001600160a01b03878116825286811660208301528516604082015260c060608201819052600090613551908301866133c8565b828103608084015261356381866133c8565b905082810360a08401526126e481856133c8565b60018060a01b038616815284602082015260a06040820152600061359e60a08301866133c8565b82810360608401526135b081866133c8565b905082810360808401526135c481856133c8565b98975050505050505050565b828152604060208201526000612d1e60408301846133c8565b85815284602082015260a06040820152600061360860a08301866133c8565b6001600160a01b0394909416606083015250608001529392505050565b60008060006060848603121561363a57600080fd5b8351925060208401519150604084015190509250925092565b60005b8381101561366e578181015183820152602001613656565b83811115612d095750506000910152565b60008251613691818460208701613653565b9190910192915050565b60208152600082518060208401526136ba816040850160208701613653565b601f01601f1916919091016040019291505056fe5af76d43c73e649d671103b29a6b93de2a53abb35bf2600ac3d04b13d413072da264697066735822122033efd6c9d64a72e09351cf4cdf3844883040eb182d0d1592685c757fd4a2d75264736f6c634300080e0033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.