Transactions
Token Transfers
Tokens
Internal Transactions
Coin Balance History
Logs
Code
Read Contract
Write Contract
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
This contract has been verified via Sourcify.
View contract in Sourcify repository
- Contract name:
- PMINTMining
- Optimization enabled
- true
- Compiler version
- v0.8.19+commit.7dd6d404
- Optimization runs
- 200
- EVM Version
- paris
- Verified at
- 2026-04-29T15:32:27.937743Z
Constructor Arguments
0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000165c3410fc91ef562c50559f7d2289febed552d9000000000000000000000000e2b5e368933aee39ca81abf878e3baa691b99d43
Arg [0] (address) : 0x6b175474e89094c44da98b954eedeac495271d0f
Arg [1] (address) : 0x165c3410fc91ef562c50559f7d2289febed552d9
Arg [2] (address) : 0xe2b5e368933aee39ca81abf878e3baa691b99d43
contracts/1pmining.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
import "https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-contracts/v4.9.3/contracts/token/ERC20/IERC20.sol";
import "https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-contracts/v4.9.3/contracts/token/ERC20/utils/SafeERC20.sol";
import "https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-contracts/v4.9.3/contracts/security/ReentrancyGuard.sol";
import "https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-contracts/v4.9.3/contracts/security/Pausable.sol";
import "https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-contracts/v4.9.3/contracts/access/Ownable.sol";
interface IPMINTToken {
function notifyDividend(uint256 amount) external;
function consumeDividend(address account) external returns (uint256);
function pendingDividend(address account) external view returns (uint256);
function registerPair(address pair) external;
function burn(uint256 amount) external;
function balanceOf(address account) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transfer(address to, uint256 amount) external returns (bool);
}
interface IUniswapV2Router02 {
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 swapExactTokensForTokens(
uint256 amountIn, uint256 amountOutMin,
address[] calldata path, address to, uint256 deadline
) external returns (uint256[] memory amounts);
}
interface IUniswapV2Pair {
function getReserves() external view returns (uint112, uint112, uint32);
function token0() external view returns (address);
}
contract PMINTMining is ReentrancyGuard, Pausable, Ownable {
using SafeERC20 for IERC20;
uint256 public constant INITIAL_RATE = 3;
uint256 public constant LOCK_DURATION = 24 hours;
uint256 public constant MAX_CYCLES = 32;
uint256 public constant INITIAL_CYCLE_EMISSION = 10_500_000 * 1e18;
uint256 public constant MINER_PMINT_SHARE = 85;
uint256 public constant LP_PMINT_SHARE = 15;
uint256 public constant SEED_ALLOCATION = 100_000 * 1e18;
uint256 public constant LP_BPS = 300;
uint256 public constant DIVIDEND_BPS = 300;
uint256 public constant BUYBACK_BPS = 200;
uint256 public constant REFERRAL_BPS = 100;
uint256 public constant TREASURY_BPS = 100;
uint256 public constant MIN_DIVIDEND_CLAIM = 5 * 1e18;
uint256 public constant MIN_BUYBACK = 100 * 1e18;
uint256 public constant BUYBACK_MAX_IMPACT_BPS = 1500;
uint256 public constant FLUSH_COOLDOWN = 10 minutes;
uint256 public constant MAX_FLUSH_AMOUNT = 20_000 * 1e18;
uint256 public constant FLUSH_SLIPPAGE_MIN_BPS = 9500;
uint256 public constant OVERMINT_MULTIPLIER = 2;
uint256 public constant FLUSH_PRICE_TOLERANCE = 10;
IERC20 public immutable pdai;
address public immutable pulseXRouter;
address public immutable treasury;
IPMINTToken public pmint;
address public pairPDAI;
address public pairPLS;
bool public seedAllocated;
uint256 public currentCycle = 1;
uint256 public currentRate = INITIAL_RATE;
uint256 public cycleRemainingMiners;
uint256 public cycleRemainingLP;
uint256 public accumulatedPDAIForLP;
uint256 public buybackAccumulator;
uint256 public dividendReserve;
uint256 public totalOutstandingMinerPDAI;
uint256 public lastFlushTime;
uint256 public lastFlushBlock;
uint256 private _nextCode = 1;
mapping(uint256 => address) public codeToWallet;
mapping(address => uint256) public walletToCode;
mapping(address => address) public referrer;
mapping(address => bool) public hasMined;
struct MinerPosition {
uint256 pdaiToReturn;
uint256 pmintReward;
uint256 unlockTime;
bool claimed;
}
mapping(address => MinerPosition[]) public positions;
event Mined(address indexed miner, uint256 positionId, uint256 pdaiIn, uint256 pmintOut, uint256 unlock);
event Claimed(address indexed miner, uint256 positionId, uint256 pdaiOut, uint256 pmintOut);
event CycleAdvanced(uint256 cycle, uint256 rate);
event LiquidityAdded(uint256 pdaiIn, uint256 pmintIn, uint256 pmintBurned);
event BuybackExecuted(uint256 pdaiIn, uint256 pmintBurned);
event DividendClaimed(address indexed account, uint256 amount);
event CodeGenerated(address indexed wallet, uint256 code);
constructor(address _pdai, address _pulseXRouter, address _treasury) {
require(_pdai != address(0) && _pulseXRouter != address(0) && _treasury != address(0));
pdai = IERC20(_pdai);
pulseXRouter = _pulseXRouter;
treasury = _treasury;
cycleRemainingMiners = (INITIAL_CYCLE_EMISSION * MINER_PMINT_SHARE) / 100;
cycleRemainingLP = (INITIAL_CYCLE_EMISSION * LP_PMINT_SHARE) / 100;
}
function setTokenAddress(address _pmint) external onlyOwner {
require(address(pmint) == address(0) && _pmint != address(0));
pmint = IPMINTToken(_pmint);
}
function allocateSeedPMINT() external onlyOwner {
require(!seedAllocated && address(pmint) != address(0));
seedAllocated = true;
IERC20(address(pmint)).safeTransfer(msg.sender, SEED_ALLOCATION);
}
function setupPairPDAI(address pair) external onlyOwner {
require(pairPDAI == address(0) && pair != address(0) && address(pmint) != address(0));
pairPDAI = pair;
pmint.registerPair(pair);
}
function setupPairPLS(address pair) external onlyOwner {
require(pairPLS == address(0) && pair != address(0) && address(pmint) != address(0));
pairPLS = pair;
pmint.registerPair(pair);
}
function mine(uint256 pdaiAmount, uint256 referralCode)
external nonReentrant whenNotPaused
{
require(address(pmint) != address(0));
require(pdaiAmount > 0);
require(currentCycle <= MAX_CYCLES);
require(cycleRemainingMiners > 0);
if (!hasMined[msg.sender] && referralCode != 0) _setReferrer(msg.sender, referralCode);
if (walletToCode[msg.sender] == 0) {
uint256 code = _nextCode++;
walletToCode[msg.sender] = code;
codeToWallet[code] = msg.sender;
emit CodeGenerated(msg.sender, code);
}
hasMined[msg.sender] = true;
uint256 grossPMINT = pdaiAmount / currentRate;
require(grossPMINT > 0);
uint256 actualPMINT = grossPMINT;
uint256 actualPDAI = pdaiAmount;
if (grossPMINT > cycleRemainingMiners) {
actualPMINT = cycleRemainingMiners;
actualPDAI = actualPMINT * currentRate;
}
uint256 excessPDAI = pdaiAmount - actualPDAI;
uint256 lpPDAI = (actualPDAI * LP_BPS) / 10_000;
uint256 dividendPDAI = (actualPDAI * DIVIDEND_BPS) / 10_000;
uint256 buybackPDAI = (actualPDAI * BUYBACK_BPS) / 10_000;
uint256 referralPDAI = (actualPDAI * REFERRAL_BPS) / 10_000;
uint256 treasuryPDAI = (actualPDAI * TREASURY_BPS) / 10_000;
uint256 pdaiToReturn = actualPDAI - lpPDAI - dividendPDAI - buybackPDAI - referralPDAI - treasuryPDAI;
cycleRemainingMiners -= actualPMINT;
accumulatedPDAIForLP += lpPDAI;
dividendReserve += dividendPDAI;
buybackAccumulator += buybackPDAI;
totalOutstandingMinerPDAI += pdaiToReturn;
uint256 posId = positions[msg.sender].length;
positions[msg.sender].push(MinerPosition({
pdaiToReturn : pdaiToReturn,
pmintReward : actualPMINT,
unlockTime : block.timestamp + LOCK_DURATION,
claimed : false
}));
pdai.safeTransferFrom(msg.sender, address(this), pdaiAmount);
if (excessPDAI > 0) pdai.safeTransfer(msg.sender, excessPDAI);
if (treasuryPDAI > 0) pdai.safeTransfer(treasury, treasuryPDAI);
if (dividendPDAI > 0) pmint.notifyDividend(dividendPDAI);
if (referralPDAI > 0) _distributeReferral(msg.sender, referralPDAI);
emit Mined(msg.sender, posId, actualPDAI, actualPMINT, block.timestamp + LOCK_DURATION);
if (cycleRemainingMiners == 0) _advanceCycle();
}
function claim(uint256 positionId) external nonReentrant {
require(address(pmint) != address(0));
require(positionId < positions[msg.sender].length);
MinerPosition storage pos = positions[msg.sender][positionId];
require(!pos.claimed);
require(block.timestamp >= pos.unlockTime);
pos.claimed = true;
if (pos.pdaiToReturn <= totalOutstandingMinerPDAI)
totalOutstandingMinerPDAI -= pos.pdaiToReturn;
else
totalOutstandingMinerPDAI = 0;
if (pos.pdaiToReturn > 0) pdai.safeTransfer(msg.sender, pos.pdaiToReturn);
if (pos.pmintReward > 0) IERC20(address(pmint)).safeTransfer(msg.sender, pos.pmintReward);
emit Claimed(msg.sender, positionId, pos.pdaiToReturn, pos.pmintReward);
}
function flushLP() external nonReentrant {
require(address(pmint) != address(0));
require(pairPDAI != address(0));
require(accumulatedPDAIForLP > 0);
require(block.number > lastFlushBlock);
require(block.timestamp >= lastFlushTime + FLUSH_COOLDOWN);
require(cycleRemainingLP > 0);
require(isSolvent());
uint256 pmintPerPDAI = _getLivePMINTPerPDAI();
require(pmintPerPDAI * currentRate * FLUSH_PRICE_TOLERANCE >= 1e18);
require(pmintPerPDAI * currentRate <= 1e18 * FLUSH_PRICE_TOLERANCE);
uint256 flushAmount = accumulatedPDAIForLP > MAX_FLUSH_AMOUNT
? MAX_FLUSH_AMOUNT : accumulatedPDAIForLP;
uint256 expectedPmint = (flushAmount * pmintPerPDAI) / 1e18;
uint256 pmintBuffer = expectedPmint * OVERMINT_MULTIPLIER;
if (pmintBuffer > cycleRemainingLP) pmintBuffer = cycleRemainingLP;
require(pmintBuffer > 0);
uint256 pdaiMin = (flushAmount * FLUSH_SLIPPAGE_MIN_BPS) / 10_000;
uint256 pmintMin = (expectedPmint * FLUSH_SLIPPAGE_MIN_BPS) / 10_000;
uint256 pdaiBefore = pdai.balanceOf(address(this));
uint256 pmintBefore = IERC20(address(pmint)).balanceOf(address(this));
lastFlushBlock = block.number;
lastFlushTime = block.timestamp;
IERC20(address(pmint)).approve(pulseXRouter, pmintBuffer);
pdai.approve(pulseXRouter, flushAmount);
try IUniswapV2Router02(pulseXRouter).addLiquidity(
address(pdai), address(pmint),
flushAmount, pmintBuffer,
pdaiMin, pmintMin,
address(this), block.timestamp + 30 minutes
) returns (uint256, uint256, uint256) {
uint256 pdaiConsumed = pdaiBefore - pdai.balanceOf(address(this));
uint256 pmintUsed = pmintBefore - IERC20(address(pmint)).balanceOf(address(this));
uint256 pmintBurned = pmintBuffer > pmintUsed ? pmintBuffer - pmintUsed : 0;
if (pdaiConsumed <= accumulatedPDAIForLP) accumulatedPDAIForLP -= pdaiConsumed;
else accumulatedPDAIForLP = 0;
if (pmintBurned > 0) pmint.burn(pmintBurned);
if (pmintUsed <= cycleRemainingLP) cycleRemainingLP -= pmintUsed;
else cycleRemainingLP = 0;
pdai.approve(pulseXRouter, 0);
IERC20(address(pmint)).approve(pulseXRouter, 0);
emit LiquidityAdded(pdaiConsumed, pmintUsed, pmintBurned);
} catch {
pdai.approve(pulseXRouter, 0);
IERC20(address(pmint)).approve(pulseXRouter, 0);
}
}
function executeBuyback() external nonReentrant {
require(pairPDAI != address(0));
require(buybackAccumulator >= MIN_BUYBACK);
require(isSolvent());
(uint256 reservePDAI, ) = _getPairReservesPDAI();
require(reservePDAI > 0);
uint256 maxBuy = (reservePDAI * BUYBACK_MAX_IMPACT_BPS) / (10_000 - BUYBACK_MAX_IMPACT_BPS);
uint256 buyAmount = buybackAccumulator > maxBuy ? maxBuy : buybackAccumulator;
if (buyAmount < MIN_BUYBACK) return;
address[] memory path = new address[](2);
path[0] = address(pdai);
path[1] = address(pmint);
uint256 pmintBefore = IERC20(address(pmint)).balanceOf(address(this));
pdai.approve(pulseXRouter, buyAmount);
try IUniswapV2Router02(pulseXRouter).swapExactTokensForTokens(
buyAmount, 0, path, address(this), block.timestamp + 30 minutes
) returns (uint256[] memory) {
uint256 pmintReceived = IERC20(address(pmint)).balanceOf(address(this)) - pmintBefore;
buybackAccumulator -= buyAmount;
if (pmintReceived > 0) pmint.burn(pmintReceived);
pdai.approve(pulseXRouter, 0);
emit BuybackExecuted(buyAmount, pmintReceived);
} catch {
pdai.approve(pulseXRouter, 0);
}
}
function claimDividend() external nonReentrant {
uint256 owed = pmint.consumeDividend(msg.sender);
require(owed >= MIN_DIVIDEND_CLAIM);
require(dividendReserve >= owed);
dividendReserve -= owed;
pdai.safeTransfer(msg.sender, owed);
emit DividendClaimed(msg.sender, owed);
}
function isSolvent() public view returns (bool) {
uint256 liabilities = totalOutstandingMinerPDAI + dividendReserve
+ accumulatedPDAIForLP + buybackAccumulator;
return pdai.balanceOf(address(this)) >= liabilities;
}
function getPositionCount(address miner) external view returns (uint256) {
return positions[miner].length;
}
function getPosition(address miner, uint256 id) external view returns (MinerPosition memory) {
return positions[miner][id];
}
function estimatePMINT(uint256 pdaiAmount) external view returns (uint256) {
if (currentRate == 0 || cycleRemainingMiners == 0) return 0;
uint256 gross = pdaiAmount / currentRate;
return gross > cycleRemainingMiners ? cycleRemainingMiners : gross;
}
function pendingDividend(address account) external view returns (uint256) {
return pmint.pendingDividend(account);
}
function _getLivePMINTPerPDAI() internal view returns (uint256) {
(uint256 rPDAI, uint256 rPMINT) = _getPairReservesPDAI();
if (rPDAI == 0) return 1e18 / currentRate;
return (rPMINT * 1e18) / rPDAI;
}
function _getPairReservesPDAI() internal view returns (uint256 rPDAI, uint256 rPMINT) {
if (pairPDAI == address(0)) return (0, 0);
try IUniswapV2Pair(pairPDAI).getReserves() returns (uint112 r0, uint112 r1, uint32) {
address t0;
try IUniswapV2Pair(pairPDAI).token0() returns (address _t0) { t0 = _t0; }
catch { return (0, 0); }
rPDAI = t0 == address(pdai) ? uint256(r0) : uint256(r1);
rPMINT = t0 == address(pdai) ? uint256(r1) : uint256(r0);
} catch { return (0, 0); }
}
function _setReferrer(address miner, uint256 code) internal {
address ref = codeToWallet[code];
if (ref == address(0) || ref == miner || !hasMined[ref]) return;
address check = ref;
for (uint8 i = 0; i < 3; i++) {
if (check == miner) return;
check = referrer[check];
if (check == address(0)) break;
}
referrer[miner] = ref;
}
function _distributeReferral(address miner, uint256 total) internal {
address l1 = referrer[miner];
address l2 = l1 != address(0) ? referrer[l1] : address(0);
address l3 = l2 != address(0) ? referrer[l2] : address(0);
uint256 a1 = (total * 50) / 100;
uint256 a2 = (total * 30) / 100;
_payRef(l1, a1);
_payRef(l2, a2);
_payRef(l3, total - a1 - a2);
}
function _payRef(address to, uint256 amount) internal {
if (amount == 0) return;
pdai.safeTransfer((to != address(0) && hasMined[to]) ? to : treasury, amount);
}
function _advanceCycle() internal {
if (currentCycle >= MAX_CYCLES) return;
currentCycle++;
currentRate *= 2;
uint256 newEmission = INITIAL_CYCLE_EMISSION >> (currentCycle - 1);
uint256 available = IERC20(address(pmint)).balanceOf(address(this));
if (newEmission > available) newEmission = available;
cycleRemainingMiners = (newEmission * MINER_PMINT_SHARE) / 100;
cycleRemainingLP += (newEmission * LP_PMINT_SHARE) / 100;
emit CycleAdvanced(currentCycle, currentRate);
}
function pause() external onlyOwner { _pause(); }
function unpause() external onlyOwner { _unpause(); }
function recoverToken(address token, uint256 amount) external onlyOwner {
require(token != address(pmint) && token != address(pdai));
IERC20(token).safeTransfer(owner(), amount);
}
receive() external payable { revert(); }
}
/v4.9.3/contracts/access/Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling 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);
}
}
/v4.9.3/contracts/utils/Context.sol
// 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;
}
}
/v4.9.3/contracts/security/Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
* This module is used through inheritance. It will make available the
* modifiers `whenNotPaused` and `whenPaused`, which can be applied to
* the functions of your contract. Note that they will not be pausable by
* simply including this module, only once the modifiers are put in place.
*/
abstract contract Pausable is Context {
/**
* @dev Emitted when the pause is triggered by `account`.
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by `account`.
*/
event Unpaused(address account);
bool private _paused;
/**
* @dev Initializes the contract in unpaused state.
*/
constructor() {
_paused = false;
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*
* Requirements:
*
* - The contract must not be paused.
*/
modifier whenNotPaused() {
_requireNotPaused();
_;
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*
* Requirements:
*
* - The contract must be paused.
*/
modifier whenPaused() {
_requirePaused();
_;
}
/**
* @dev Returns true if the contract is paused, and false otherwise.
*/
function paused() public view virtual returns (bool) {
return _paused;
}
/**
* @dev Throws if the contract is paused.
*/
function _requireNotPaused() internal view virtual {
require(!paused(), "Pausable: paused");
}
/**
* @dev Throws if the contract is not paused.
*/
function _requirePaused() internal view virtual {
require(paused(), "Pausable: not paused");
}
/**
* @dev Triggers stopped state.
*
* Requirements:
*
* - The contract must not be paused.
*/
function _pause() internal virtual whenNotPaused {
_paused = true;
emit Paused(_msgSender());
}
/**
* @dev Returns to normal state.
*
* Requirements:
*
* - The contract must be paused.
*/
function _unpause() internal virtual whenPaused {
_paused = false;
emit Unpaused(_msgSender());
}
}
/v4.9.3/contracts/security/ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
// On the first call to nonReentrant, _status will be _NOT_ENTERED
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
}
function _nonReentrantAfter() private {
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
/**
* @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
* `nonReentrant` function in the call stack.
*/
function _reentrancyGuardEntered() internal view returns (bool) {
return _status == _ENTERED;
}
}
/v4.9.3/contracts/utils/Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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
*
* Furthermore, `isContract` will also return true if the target contract within
* the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
* which only has an effect at the end of a transaction.
* ====
*
* [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://consensys.net/diligence/blog/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.8.0/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);
}
}
}
/v4.9.3/contracts/token/ERC20/extensions/IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/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);
}
/v4.9.3/contracts/token/ERC20/utils/SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
import "../extensions/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;
/**
* @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
/**
* @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
* calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
*/
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));
}
/**
* @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 oldAllowance = token.allowance(address(this), spender);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
}
/**
* @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
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");
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
}
}
/**
* @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
* to be set to zero before setting it to a non-zero value, such as USDT.
*/
function forceApprove(IERC20 token, address spender, uint256 value) internal {
bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);
if (!_callOptionalReturnBool(token, approvalCall)) {
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));
_callOptionalReturn(token, approvalCall);
}
}
/**
* @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
* Revert on invalid signature.
*/
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");
require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation 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).
*
* This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
*/
function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
// 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 cannot use {Address-functionCall} here since this should return false
// and not revert is the subcall reverts.
(bool success, bytes memory returndata) = address(token).call(data);
return
success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));
}
}
/v4.9.3/contracts/token/ERC20/IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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);
}
Compiler Settings
{"remappings":[],"optimizer":{"runs":200,"enabled":true},"metadata":{"bytecodeHash":"ipfs"},"libraries":{},"evmVersion":"paris","compilationTarget":{"contracts/1pmining.sol":"PMINTMining"}}
Contract ABI
[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_pdai","internalType":"address"},{"type":"address","name":"_pulseXRouter","internalType":"address"},{"type":"address","name":"_treasury","internalType":"address"}]},{"type":"event","name":"BuybackExecuted","inputs":[{"type":"uint256","name":"pdaiIn","internalType":"uint256","indexed":false},{"type":"uint256","name":"pmintBurned","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Claimed","inputs":[{"type":"address","name":"miner","internalType":"address","indexed":true},{"type":"uint256","name":"positionId","internalType":"uint256","indexed":false},{"type":"uint256","name":"pdaiOut","internalType":"uint256","indexed":false},{"type":"uint256","name":"pmintOut","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"CodeGenerated","inputs":[{"type":"address","name":"wallet","internalType":"address","indexed":true},{"type":"uint256","name":"code","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"CycleAdvanced","inputs":[{"type":"uint256","name":"cycle","internalType":"uint256","indexed":false},{"type":"uint256","name":"rate","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"DividendClaimed","inputs":[{"type":"address","name":"account","internalType":"address","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"LiquidityAdded","inputs":[{"type":"uint256","name":"pdaiIn","internalType":"uint256","indexed":false},{"type":"uint256","name":"pmintIn","internalType":"uint256","indexed":false},{"type":"uint256","name":"pmintBurned","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Mined","inputs":[{"type":"address","name":"miner","internalType":"address","indexed":true},{"type":"uint256","name":"positionId","internalType":"uint256","indexed":false},{"type":"uint256","name":"pdaiIn","internalType":"uint256","indexed":false},{"type":"uint256","name":"pmintOut","internalType":"uint256","indexed":false},{"type":"uint256","name":"unlock","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"Paused","inputs":[{"type":"address","name":"account","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"Unpaused","inputs":[{"type":"address","name":"account","internalType":"address","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"BUYBACK_BPS","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"BUYBACK_MAX_IMPACT_BPS","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"DIVIDEND_BPS","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"FLUSH_COOLDOWN","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"FLUSH_PRICE_TOLERANCE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"FLUSH_SLIPPAGE_MIN_BPS","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"INITIAL_CYCLE_EMISSION","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"INITIAL_RATE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"LOCK_DURATION","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"LP_BPS","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"LP_PMINT_SHARE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"MAX_CYCLES","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"MAX_FLUSH_AMOUNT","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"MINER_PMINT_SHARE","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"MIN_BUYBACK","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"MIN_DIVIDEND_CLAIM","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"OVERMINT_MULTIPLIER","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"REFERRAL_BPS","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"SEED_ALLOCATION","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"TREASURY_BPS","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"accumulatedPDAIForLP","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"allocateSeedPMINT","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"buybackAccumulator","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"claim","inputs":[{"type":"uint256","name":"positionId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"claimDividend","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"codeToWallet","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"currentCycle","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"currentRate","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"cycleRemainingLP","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"cycleRemainingMiners","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"dividendReserve","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"estimatePMINT","inputs":[{"type":"uint256","name":"pdaiAmount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"executeBuyback","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"flushLP","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple","name":"","internalType":"struct PMINTMining.MinerPosition","components":[{"type":"uint256","name":"pdaiToReturn","internalType":"uint256"},{"type":"uint256","name":"pmintReward","internalType":"uint256"},{"type":"uint256","name":"unlockTime","internalType":"uint256"},{"type":"bool","name":"claimed","internalType":"bool"}]}],"name":"getPosition","inputs":[{"type":"address","name":"miner","internalType":"address"},{"type":"uint256","name":"id","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getPositionCount","inputs":[{"type":"address","name":"miner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"hasMined","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isSolvent","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"lastFlushBlock","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"lastFlushTime","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"mine","inputs":[{"type":"uint256","name":"pdaiAmount","internalType":"uint256"},{"type":"uint256","name":"referralCode","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"pairPDAI","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"pairPLS","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"pause","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"paused","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IERC20"}],"name":"pdai","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"pendingDividend","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IPMINTToken"}],"name":"pmint","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"pdaiToReturn","internalType":"uint256"},{"type":"uint256","name":"pmintReward","internalType":"uint256"},{"type":"uint256","name":"unlockTime","internalType":"uint256"},{"type":"bool","name":"claimed","internalType":"bool"}],"name":"positions","inputs":[{"type":"address","name":"","internalType":"address"},{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"pulseXRouter","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"recoverToken","inputs":[{"type":"address","name":"token","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"referrer","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"seedAllocated","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setTokenAddress","inputs":[{"type":"address","name":"_pmint","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setupPairPDAI","inputs":[{"type":"address","name":"pair","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setupPairPLS","inputs":[{"type":"address","name":"pair","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalOutstandingMinerPDAI","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"treasury","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"unpause","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"walletToCode","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"receive","stateMutability":"payable"}]
Contract Creation Code
0x60e0604052600160055560036006556001600f553480156200002057600080fd5b5060405162003b3138038062003b31833981016040819052620000439162000189565b60016000819055805460ff191690556200005d3362000112565b6001600160a01b038316158015906200007e57506001600160a01b03821615155b80156200009357506001600160a01b03811615155b6200009d57600080fd5b6001600160a01b0380841660805282811660a052811660c0526064620000d060556a08af7623fb67bf1a800000620001d3565b620000dc9190620001ff565b6007556064620000f9600f6a08af7623fb67bf1a800000620001d3565b620001059190620001ff565b6008555062000222915050565b600180546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80516001600160a01b03811681146200018457600080fd5b919050565b6000806000606084860312156200019f57600080fd5b620001aa846200016c565b9250620001ba602085016200016c565b9150620001ca604085016200016c565b90509250925092565b8082028115828204841417620001f957634e487b7160e01b600052601160045260246000fd5b92915050565b6000826200021d57634e487b7160e01b600052601260045260246000fd5b500490565b60805160a05160c0516137f8620003396000396000818161075901528181610f5e015261317301526000818161090c0152818161175f015281816118110152818161188c015281816119c801528181611a5f01528181611d0301528181611d9a0152818161208801528181612100015281816121de015261238f01526000818161071001528181610eb701528181610f0201528181610f3c015281816111b00152818161141c01528181611651015281816117e4015281816118b60152818161199b01528181611aeb01528181611cd601528181611f600152818161205b015281816121b1015281816123620152818161246d0152818161274501528181612fa901528181612ffe01526131a301526137f86000f3fe6080604052600436106103bc5760003560e01c80638456cb59116101f2578063bab2f5521161010d578063df0b3667116100a0578063f0fc6bca1161006f578063f0fc6bca14610ada578063f2fde38b14610aef578063f72f97a514610b0f578063f9f8bdb714610b2f57600080fd5b8063df0b36671461080f578063e230264714610a83578063e243ddad14610aa3578063e505b03714610ab957600080fd5b8063cafa77d7116100dc578063cafa77d714610a23578063d562645e14610a38578063dcfd083714610a4d578063deedd49c14610a6357600080fd5b8063bab2f55214610999578063be9f99b9146109af578063c1be6677146109c5578063c500c00614610a0757600080fd5b8063998efd0411610185578063b29a814011610154578063b29a81401461092e578063b4ce468d1461094e578063b8e4f91f1461096e578063b93fdfef1461098357600080fd5b8063998efd04146108b15780639bf66644146108c75780639f865d12146108e4578063aec9b6f4146108fa57600080fd5b80638da5cb5b116101c15780638da5cb5b1461083b5780638e10e77a1461085e578063912a67881461087357806399301fb21461089157600080fd5b80638456cb59146107c45780638d090e72146107d95780638d7036de1461080f5780638d83f29d1461082557600080fd5b8063485d3834116102e25780635e178d37116102755780636e8cddea116102445780636e8cddea14610626578063715018a61461077b57806374f37c331461079057806381e4f383146107a557600080fd5b80635e178d37146106e8578063604d7d23146106fe5780636157a4f21461073257806361d027b31461074757600080fd5b80635bf795f2116102b15780635bf795f2146106905780635c975abb146106a65780635ce23950146106be5780635df81440146106d357600080fd5b8063485d38341461060f5780634c25d197146106265780634dbac7331461063b578063518263a11461065057600080fd5b80632f85dac51161035a5780633a0eaada116103295780633a0eaada1461056f5780633adbb5af1461058f5780633e1c5c0c146105e45780633f4ba83a146105fa57600080fd5b80632f85dac5146104fc5780633429fe881461051a578063379607f51461052f578063392e6f551461054f57600080fd5b80631a40ad9d116103965780631a40ad9d1461044b57806326a4e8d2146104785780632a6b853e146104985780632cf003c2146104ae57600080fd5b80630234b445146103cb578063071e9503146104145780631a17db671461043657600080fd5b366103c657600080fd5b600080fd5b3480156103d757600080fd5b506104016103e63660046133b8565b6001600160a01b031660009081526014602052604090205490565b6040519081526020015b60405180910390f35b34801561042057600080fd5b5061043461042f3660046133d5565b610b45565b005b34801561044257600080fd5b5061040160c881565b34801561045757600080fd5b506104016104663660046133b8565b60116020526000908152604090205481565b34801561048457600080fd5b506104346104933660046133b8565b611078565b3480156104a457600080fd5b50610401600e5481565b3480156104ba57600080fd5b506104e46104c93660046133b8565b6012602052600090815260409020546001600160a01b031681565b6040516001600160a01b03909116815260200161040b565b34801561050857600080fd5b5061040169152d02c7e14af680000081565b34801561052657600080fd5b50610401600a81565b34801561053b57600080fd5b5061043461054a3660046133f7565b6110cc565b34801561055b57600080fd5b506004546104e4906001600160a01b031681565b34801561057b57600080fd5b5061043461058a3660046133b8565b611257565b34801561059b57600080fd5b506105af6105aa366004613410565b611315565b60405161040b919081518152602080830151908201526040808301519082015260609182015115159181019190915260800190565b3480156105f057600080fd5b50610401600c5481565b34801561060657600080fd5b506104346113bb565b34801561061b57600080fd5b506104016201518081565b34801561063257600080fd5b50610401606481565b34801561064757600080fd5b50610401600381565b34801561065c57600080fd5b5061068061066b3660046133b8565b60136020526000908152604090205460ff1681565b604051901515815260200161040b565b34801561069c57600080fd5b5061040161025881565b3480156106b257600080fd5b5060015460ff16610680565b3480156106ca57600080fd5b506106806113cd565b3480156106df57600080fd5b50610401600281565b3480156106f457600080fd5b5061040160085481565b34801561070a57600080fd5b506104e47f000000000000000000000000000000000000000000000000000000000000000081565b34801561073e57600080fd5b5061043461148f565b34801561075357600080fd5b506104e47f000000000000000000000000000000000000000000000000000000000000000081565b34801561078757600080fd5b50610434611e63565b34801561079c57600080fd5b50610401605581565b3480156107b157600080fd5b506104016a08af7623fb67bf1a80000081565b3480156107d057600080fd5b50610434611e75565b3480156107e557600080fd5b506104e46107f43660046133f7565b6010602052600090815260409020546001600160a01b031681565b34801561081b57600080fd5b5061040161012c81565b34801561083157600080fd5b50610401600d5481565b34801561084757600080fd5b5060015461010090046001600160a01b03166104e4565b34801561086a57600080fd5b50610434611e85565b34801561087f57600080fd5b5061040169043c33c193756480000081565b34801561089d57600080fd5b506003546104e4906001600160a01b031681565b3480156108bd57600080fd5b5061040160075481565b3480156108d357600080fd5b5061040168056bc75e2d6310000081565b3480156108f057600080fd5b5061040160095481565b34801561090657600080fd5b506104e47f000000000000000000000000000000000000000000000000000000000000000081565b34801561093a57600080fd5b50610434610949366004613410565b61244a565b34801561095a57600080fd5b506002546104e4906001600160a01b031681565b34801561097a57600080fd5b50610401602081565b34801561098f57600080fd5b506104016105dc81565b3480156109a557600080fd5b5061040160055481565b3480156109bb57600080fd5b50610401600b5481565b3480156109d157600080fd5b506109e56109e0366004613410565b6124d1565b604080519485526020850193909352918301521515606082015260800161040b565b348015610a1357600080fd5b50610401674563918244f4000081565b348015610a2f57600080fd5b5061043461251a565b348015610a4457600080fd5b50610401600f81565b348015610a5957600080fd5b50610401600a5481565b348015610a6f57600080fd5b50610401610a7e3660046133b8565b612583565b348015610a8f57600080fd5b50610434610a9e3660046133b8565b6125f2565b348015610aaf57600080fd5b5061040161251c81565b348015610ac557600080fd5b5060045461068090600160a01b900460ff1681565b348015610ae657600080fd5b50610434612683565b348015610afb57600080fd5b50610434610b0a3660046133b8565b6127ac565b348015610b1b57600080fd5b50610401610b2a3660046133f7565b612827565b348015610b3b57600080fd5b5061040160065481565b610b4d612873565b610b556128cc565b6002546001600160a01b0316610b6a57600080fd5b60008211610b7757600080fd5b60206005541115610b8757600080fd5b600060075411610b9657600080fd5b3360009081526013602052604090205460ff16158015610bb557508015155b15610bc457610bc43382612912565b336000908152601160205260408120549003610c5657600f805460009182610beb83613452565b90915550336000818152601160209081526040808320859055848352601082529182902080546001600160a01b03191684179055905183815292935090917f7ff0c735d0830c7c5290c49820b91c140e7690c667bae47c689cff496157b89d910160405180910390a2505b336000908152601360205260408120805460ff19166001179055600654610c7d908461346b565b905060008111610c8c57600080fd5b60075481908490821115610cb057600754915060065482610cad919061348d565b90505b6000610cbc82876134a4565b90506000612710610ccf61012c8561348d565b610cd9919061346b565b90506000612710610cec61012c8661348d565b610cf6919061346b565b90506000612710610d0860c88761348d565b610d12919061346b565b90506000612710610d2460648861348d565b610d2e919061346b565b90506000612710610d4060648961348d565b610d4a919061346b565b9050600081838587610d5c8a8d6134a4565b610d6691906134a4565b610d7091906134a4565b610d7a91906134a4565b610d8491906134a4565b90508860076000828254610d9891906134a4565b925050819055508560096000828254610db191906134b7565b9250508190555084600b6000828254610dca91906134b7565b9250508190555083600a6000828254610de391906134b7565b9250508190555080600c6000828254610dfc91906134b7565b909155505033600090815260146020908152604091829020805483516080810185528581529283018d9052929091908101610e3a62015180426134b7565b815260200160001515815250908060018154018082558091505060019003906000526020600020906004020160009091909190915060008201518160000155602082015181600101556040820151816002015560608201518160030160006101000a81548160ff0219169083151502179055505050610eef33308f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316612a0e909392919063ffffffff16565b8715610f2957610f296001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016338a612a7f565b8215610f8357610f836001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f000000000000000000000000000000000000000000000000000000000000000085612a7f565b8515610fe85760025460405163b2a52da760e01b8152600481018890526001600160a01b039091169063b2a52da790602401600060405180830381600087803b158015610fcf57600080fd5b505af1158015610fe3573d6000803e3d6000fd5b505050505b8315610ff857610ff83385612aa3565b337fb641e07763e6dadc2d8c70f7c5da177ddbfcef39e0ecb06e7657162b314ba215828b8d61102a62015180426134b7565b60408051948552602085019390935291830152606082015260800160405180910390a260075460000361105f5761105f612b91565b50505050505050505050506110746001600055565b5050565b611080612cfa565b6002546001600160a01b03161580156110a157506001600160a01b03811615155b6110aa57600080fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6110d4612873565b6002546001600160a01b03166110e957600080fd5b33600090815260146020526040902054811061110457600080fd5b336000908152601460205260408120805483908110611125576111256134ca565b60009182526020909120600490910201600381015490915060ff161561114a57600080fd5b806002015442101561115b57600080fd5b60038101805460ff19166001179055600c54815411611193578054600c80546000906111889084906134a4565b909155506111999050565b6000600c555b8054156111d85780546111d8906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016903390612a7f565b600181015415611201576001810154600254611201916001600160a01b03909116903390612a7f565b8054600182015460408051858152602081019390935282015233907f9cdcf2f7714cca3508c7f0110b04a90a80a3a8dd0e35de99689db74d28c5383e9060600160405180910390a2506112546001600055565b50565b61125f612cfa565b6004546001600160a01b031615801561128057506001600160a01b03811615155b801561129657506002546001600160a01b031615155b61129f57600080fd5b600480546001600160a01b0319166001600160a01b03838116918217835560025460405163370c52d160e21b815293840192909252169063dc314b44906024015b600060405180830381600087803b1580156112fa57600080fd5b505af115801561130e573d6000803e3d6000fd5b5050505050565b61134260405180608001604052806000815260200160008152602001600081526020016000151581525090565b6001600160a01b038316600090815260146020526040902080548390811061136c5761136c6134ca565b60009182526020918290206040805160808101825260049093029091018054835260018101549383019390935260028301549082015260039091015460ff161515606082015290505b92915050565b6113c3612cfa565b6113cb612d5a565b565b600080600a54600954600b54600c546113e691906134b7565b6113f091906134b7565b6113fa91906134b7565b6040516370a0823160e01b815230600482015290915081906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015611463573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061148791906134e0565b101591505090565b611497612873565b6002546001600160a01b03166114ac57600080fd5b6003546001600160a01b03166114c157600080fd5b6000600954116114d057600080fd5b600e5443116114de57600080fd5b610258600d546114ee91906134b7565b4210156114fa57600080fd5b60006008541161150957600080fd5b6115116113cd565b61151a57600080fd5b6000611524612dac565b9050670de0b6b3a7640000600a6006548361153f919061348d565b611549919061348d565b101561155457600080fd5b611567600a670de0b6b3a764000061348d565b600654611574908361348d565b111561157f57600080fd5b600069043c33c19375648000006009541161159c576009546115a8565b69043c33c19375648000005b90506000670de0b6b3a76400006115bf848461348d565b6115c9919061346b565b905060006115d860028361348d565b90506008548111156115e957506008545b600081116115f657600080fd5b600061271061160761251c8661348d565b611611919061346b565b9050600061271061162461251c8661348d565b61162e919061346b565b6040516370a0823160e01b81523060048201529091506000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015611698573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116bc91906134e0565b6002546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a0823190602401602060405180830381865afa15801561170a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061172e91906134e0565b43600e5542600d5560025460405163095ea7b360e01b81529192506001600160a01b03169063095ea7b390611789907f00000000000000000000000000000000000000000000000000000000000000009089906004016134f9565b6020604051808303816000875af11580156117a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117cc9190613512565b5060405163095ea7b360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063095ea7b39061183b907f0000000000000000000000000000000000000000000000000000000000000000908b906004016134f9565b6020604051808303816000875af115801561185a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061187e9190613512565b506002546001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081169163e8e33700917f000000000000000000000000000000000000000000000000000000000000000091168a898989306118e8426107086134b7565b60405160e08a901b6001600160e01b03191681526001600160a01b039889166004820152968816602488015260448701959095526064860193909352608485019190915260a484015290921660c482015260e4810191909152610104016060604051808303816000875af1925050508015611980575060408051601f3d908101601f1916820190925261197d91810190613534565b60015b611ad35760405163095ea7b360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063095ea7b3906119f3907f0000000000000000000000000000000000000000000000000000000000000000906000906004016134f9565b6020604051808303816000875af1158015611a12573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a369190613512565b5060025460405163095ea7b360e01b81526001600160a01b039091169063095ea7b390611a8a907f0000000000000000000000000000000000000000000000000000000000000000906000906004016134f9565b6020604051808303816000875af1158015611aa9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611acd9190613512565b50611e51565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015611b3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b5e91906134e0565b611b6890876134a4565b6002546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a0823190602401602060405180830381865afa158015611bb6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bda91906134e0565b611be490876134a4565b90506000818b11611bf6576000611c00565b611c00828c6134a4565b90506009548311611c28578260096000828254611c1d91906134a4565b90915550611c2e9050565b60006009555b8015611c9357600254604051630852cd8d60e31b8152600481018390526001600160a01b03909116906342966c6890602401600060405180830381600087803b158015611c7a57600080fd5b505af1158015611c8e573d6000803e3d6000fd5b505050505b6008548211611cb9578160086000828254611cae91906134a4565b90915550611cbf9050565b60006008555b60405163095ea7b360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063095ea7b390611d2e907f0000000000000000000000000000000000000000000000000000000000000000906000906004016134f9565b6020604051808303816000875af1158015611d4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d719190613512565b5060025460405163095ea7b360e01b81526001600160a01b039091169063095ea7b390611dc5907f0000000000000000000000000000000000000000000000000000000000000000906000906004016134f9565b6020604051808303816000875af1158015611de4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e089190613512565b5060408051848152602081018490529081018290527fd7f28048575eead8851d024ead087913957dfb4fd1a02b4d1573f5352a5a2be39060600160405180910390a15050505050505b50505050505050506113cb6001600055565b611e6b612cfa565b6113cb6000612dfe565b611e7d612cfa565b6113cb612e58565b611e8d612873565b6003546001600160a01b0316611ea257600080fd5b68056bc75e2d63100000600a541015611eba57600080fd5b611ec26113cd565b611ecb57600080fd5b6000611ed5612e93565b50905060008111611ee557600080fd5b6000611ef56105dc6127106134a4565b611f016105dc8461348d565b611f0b919061346b565b9050600081600a5411611f2057600a54611f22565b815b905068056bc75e2d63100000811015611f3d57505050612440565b6040805160028082526060820183526000926020830190803683370190505090507f000000000000000000000000000000000000000000000000000000000000000081600081518110611f9257611f926134ca565b6001600160a01b039283166020918202929092010152600254825191169082906001908110611fc357611fc36134ca565b6001600160a01b0392831660209182029290920101526002546040516370a0823160e01b815230600482015260009291909116906370a0823190602401602060405180830381865afa15801561201d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061204191906134e0565b60405163095ea7b360e01b81529091506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063095ea7b3906120b2907f00000000000000000000000000000000000000000000000000000000000000009087906004016134f9565b6020604051808303816000875af11580156120d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120f59190613512565b506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000166338ed17398460008530612136426107086134b7565b6040518663ffffffff1660e01b8152600401612156959493929190613578565b6000604051808303816000875af192505050801561219657506040513d6000823e601f3d908101601f1916820160405261219391908101906135e9565b60015b6122525760405163095ea7b360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063095ea7b390612209907f0000000000000000000000000000000000000000000000000000000000000000906000906004016134f9565b6020604051808303816000875af1158015612228573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061224c9190613512565b5061243a565b6002546040516370a0823160e01b815230600482015260009184916001600160a01b03909116906370a0823190602401602060405180830381865afa15801561229f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122c391906134e0565b6122cd91906134a4565b905084600a60008282546122e191906134a4565b9091555050801561234b57600254604051630852cd8d60e31b8152600481018390526001600160a01b03909116906342966c6890602401600060405180830381600087803b15801561233257600080fd5b505af1158015612346573d6000803e3d6000fd5b505050505b60405163095ea7b360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063095ea7b3906123ba907f0000000000000000000000000000000000000000000000000000000000000000906000906004016134f9565b6020604051808303816000875af11580156123d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123fd9190613512565b5060408051868152602081018390527f8e8412cac6b961b95ef832e2bac486977bbd29eb9725f9eddd97f3380c31f649910160405180910390a150505b50505050505b6113cb6001600055565b612452612cfa565b6002546001600160a01b038381169116148015906124a257507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614155b6124ab57600080fd5b6001546110749061010090046001600160a01b03166001600160a01b0384169083612a7f565b601460205281600052604060002081815481106124ed57600080fd5b60009182526020909120600490910201805460018201546002830154600390930154919450925060ff1684565b612522612cfa565b600454600160a01b900460ff1615801561254657506002546001600160a01b031615155b61254f57600080fd5b6004805460ff60a01b1916600160a01b1790556002546113cb906001600160a01b03163369152d02c7e14af6800000612a7f565b6002546040516337bb752760e21b81526001600160a01b038381166004830152600092169063deedd49c90602401602060405180830381865afa1580156125ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b591906134e0565b6125fa612cfa565b6003546001600160a01b031615801561261b57506001600160a01b03811615155b801561263157506002546001600160a01b031615155b61263a57600080fd5b600380546001600160a01b0319166001600160a01b0383811691821790925560025460405163370c52d160e21b815260048101929092529091169063dc314b44906024016112e0565b61268b612873565b60025460405163be3408a160e01b81523360048201526000916001600160a01b03169063be3408a1906024016020604051808303816000875af11580156126d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126fa91906134e0565b9050674563918244f4000081101561271157600080fd5b80600b54101561272057600080fd5b80600b600082825461273291906134a4565b9091555061276c90506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163383612a7f565b60405181815233907f5efa67896a23b651b741b525caacba039c00ca7853be3de8eb1f4269e8669c569060200160405180910390a2506113cb6001600055565b6127b4612cfa565b6001600160a01b03811661281e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61125481612dfe565b60006006546000148061283a5750600754155b1561284757506000919050565b600060065483612857919061346b565b90506007548111612868578061286c565b6007545b9392505050565b6002600054036128c55760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401612815565b6002600055565b60015460ff16156113cb5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401612815565b6000818152601060205260409020546001600160a01b03168015806129485750826001600160a01b0316816001600160a01b0316145b8061296c57506001600160a01b03811660009081526013602052604090205460ff16155b1561297657505050565b8060005b60038160ff1610156129dc57846001600160a01b0316826001600160a01b0316036129a6575050505050565b6001600160a01b039182166000908152601260205260409020549091169081156129dc57806129d4816136a7565b91505061297a565b50506001600160a01b03928316600090815260126020526040902080546001600160a01b031916919093161790915550565b6040516001600160a01b0380851660248301528316604482015260648101829052612a799085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152613059565b50505050565b612a9e8363a9059cbb60e01b8484604051602401612a429291906134f9565b505050565b6001600160a01b038083166000908152601260205260408120549091169081612acd576000612ae9565b6001600160a01b03808316600090815260126020526040902054165b905060006001600160a01b038216612b02576000612b1e565b6001600160a01b03808316600090815260126020526040902054165b905060006064612b2f86603261348d565b612b39919061346b565b905060006064612b4a87601e61348d565b612b54919061346b565b9050612b60858361312e565b612b6a848261312e565b612b888382612b79858a6134a4565b612b8391906134a4565b61312e565b50505050505050565b602060055410612b9d57565b60058054906000612bad83613452565b9190505550600260066000828254612bc5919061348d565b9091555050600554600090612bdc906001906134a4565b6002546040516370a0823160e01b81523060048201526a08af7623fb67bf1a80000090921c92506000916001600160a01b03909116906370a0823190602401602060405180830381865afa158015612c38573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c5c91906134e0565b905080821115612c6a578091505b6064612c7760558461348d565b612c81919061346b565b6007556064612c91600f8461348d565b612c9b919061346b565b60086000828254612cac91906134b7565b90915550506005546006546040517f6778731b259e47db8d144adf2d795ce185c588290643733953fdb9a931225de592612cee92908252602082015260400190565b60405180910390a15050565b6001546001600160a01b036101009091041633146113cb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401612815565b612d626131ca565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6000806000612db9612e93565b9150915081600003612de157600654612dda90670de0b6b3a764000061346b565b9250505090565b81612df482670de0b6b3a764000061348d565b612dda919061346b565b600180546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b612e606128cc565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25833612d8f565b60035460009081906001600160a01b0316612eb15750600091829150565b600360009054906101000a90046001600160a01b03166001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa925050508015612f20575060408051601f3d908101601f19168201909252612f1d918101906136e2565b60015b612f2d5750600091829150565b60035460408051630dfe168160e01b815290516000926001600160a01b031691630dfe16819160048083019260209291908290030181865afa925050508015612f93575060408051601f3d908101601f19168201909252612f9091810190613732565b60015b612fa557506000958695509350505050565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b031614612fef57826001600160701b0316612ffa565b836001600160701b03165b95507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b03161461304457836001600160701b031661304f565b826001600160701b03165b9450505050509091565b60006130ae826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166132139092919063ffffffff16565b90508051600014806130cf5750808060200190518101906130cf9190613512565b612a9e5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401612815565b8060000361313a575050565b6110746001600160a01b0383161580159061316d57506001600160a01b03831660009081526013602052604090205460ff165b613197577f0000000000000000000000000000000000000000000000000000000000000000613199565b825b6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169083612a7f565b60015460ff166113cb5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401612815565b6060613222848460008561322a565b949350505050565b60608247101561328b5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401612815565b600080866001600160a01b031685876040516132a79190613773565b60006040518083038185875af1925050503d80600081146132e4576040519150601f19603f3d011682016040523d82523d6000602084013e6132e9565b606091505b50915091506132fa87838387613305565b979650505050505050565b6060831561337457825160000361336d576001600160a01b0385163b61336d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401612815565b5081613222565b61322283838151156133895781518083602001fd5b8060405162461bcd60e51b8152600401612815919061378f565b6001600160a01b038116811461125457600080fd5b6000602082840312156133ca57600080fd5b813561286c816133a3565b600080604083850312156133e857600080fd5b50508035926020909101359150565b60006020828403121561340957600080fd5b5035919050565b6000806040838503121561342357600080fd5b823561342e816133a3565b946020939093013593505050565b634e487b7160e01b600052601160045260246000fd5b6000600182016134645761346461343c565b5060010190565b60008261348857634e487b7160e01b600052601260045260246000fd5b500490565b80820281158282048414176113b5576113b561343c565b818103818111156113b5576113b561343c565b808201808211156113b5576113b561343c565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156134f257600080fd5b5051919050565b6001600160a01b03929092168252602082015260400190565b60006020828403121561352457600080fd5b8151801515811461286c57600080fd5b60008060006060848603121561354957600080fd5b8351925060208401519150604084015190509250925092565b634e487b7160e01b600052604160045260246000fd5b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156135c85784516001600160a01b0316835293830193918301916001016135a3565b50506001600160a01b03969096166060850152505050608001529392505050565b600060208083850312156135fc57600080fd5b825167ffffffffffffffff8082111561361457600080fd5b818501915085601f83011261362857600080fd5b81518181111561363a5761363a613562565b8060051b604051601f19603f8301168101818110858211171561365f5761365f613562565b60405291825284820192508381018501918883111561367d57600080fd5b938501935b8285101561369b57845184529385019392850192613682565b98975050505050505050565b600060ff821660ff81036136bd576136bd61343c565b60010192915050565b80516001600160701b03811681146136dd57600080fd5b919050565b6000806000606084860312156136f757600080fd5b613700846136c6565b925061370e602085016136c6565b9150604084015163ffffffff8116811461372757600080fd5b809150509250925092565b60006020828403121561374457600080fd5b815161286c816133a3565b60005b8381101561376a578181015183820152602001613752565b50506000910152565b6000825161378581846020870161374f565b9190910192915050565b60208152600082518060208401526137ae81604085016020870161374f565b601f01601f1916919091016040019291505056fea2646970667358221220bb55fa3440f9e530e9e05794ff09e39d4f039e989ef8c3c348450adb3beb77ea64736f6c634300081300330000000000000000000000006b175474e89094c44da98b954eedeac495271d0f000000000000000000000000165c3410fc91ef562c50559f7d2289febed552d9000000000000000000000000e2b5e368933aee39ca81abf878e3baa691b99d43
Deployed ByteCode
0x6080604052600436106103bc5760003560e01c80638456cb59116101f2578063bab2f5521161010d578063df0b3667116100a0578063f0fc6bca1161006f578063f0fc6bca14610ada578063f2fde38b14610aef578063f72f97a514610b0f578063f9f8bdb714610b2f57600080fd5b8063df0b36671461080f578063e230264714610a83578063e243ddad14610aa3578063e505b03714610ab957600080fd5b8063cafa77d7116100dc578063cafa77d714610a23578063d562645e14610a38578063dcfd083714610a4d578063deedd49c14610a6357600080fd5b8063bab2f55214610999578063be9f99b9146109af578063c1be6677146109c5578063c500c00614610a0757600080fd5b8063998efd0411610185578063b29a814011610154578063b29a81401461092e578063b4ce468d1461094e578063b8e4f91f1461096e578063b93fdfef1461098357600080fd5b8063998efd04146108b15780639bf66644146108c75780639f865d12146108e4578063aec9b6f4146108fa57600080fd5b80638da5cb5b116101c15780638da5cb5b1461083b5780638e10e77a1461085e578063912a67881461087357806399301fb21461089157600080fd5b80638456cb59146107c45780638d090e72146107d95780638d7036de1461080f5780638d83f29d1461082557600080fd5b8063485d3834116102e25780635e178d37116102755780636e8cddea116102445780636e8cddea14610626578063715018a61461077b57806374f37c331461079057806381e4f383146107a557600080fd5b80635e178d37146106e8578063604d7d23146106fe5780636157a4f21461073257806361d027b31461074757600080fd5b80635bf795f2116102b15780635bf795f2146106905780635c975abb146106a65780635ce23950146106be5780635df81440146106d357600080fd5b8063485d38341461060f5780634c25d197146106265780634dbac7331461063b578063518263a11461065057600080fd5b80632f85dac51161035a5780633a0eaada116103295780633a0eaada1461056f5780633adbb5af1461058f5780633e1c5c0c146105e45780633f4ba83a146105fa57600080fd5b80632f85dac5146104fc5780633429fe881461051a578063379607f51461052f578063392e6f551461054f57600080fd5b80631a40ad9d116103965780631a40ad9d1461044b57806326a4e8d2146104785780632a6b853e146104985780632cf003c2146104ae57600080fd5b80630234b445146103cb578063071e9503146104145780631a17db671461043657600080fd5b366103c657600080fd5b600080fd5b3480156103d757600080fd5b506104016103e63660046133b8565b6001600160a01b031660009081526014602052604090205490565b6040519081526020015b60405180910390f35b34801561042057600080fd5b5061043461042f3660046133d5565b610b45565b005b34801561044257600080fd5b5061040160c881565b34801561045757600080fd5b506104016104663660046133b8565b60116020526000908152604090205481565b34801561048457600080fd5b506104346104933660046133b8565b611078565b3480156104a457600080fd5b50610401600e5481565b3480156104ba57600080fd5b506104e46104c93660046133b8565b6012602052600090815260409020546001600160a01b031681565b6040516001600160a01b03909116815260200161040b565b34801561050857600080fd5b5061040169152d02c7e14af680000081565b34801561052657600080fd5b50610401600a81565b34801561053b57600080fd5b5061043461054a3660046133f7565b6110cc565b34801561055b57600080fd5b506004546104e4906001600160a01b031681565b34801561057b57600080fd5b5061043461058a3660046133b8565b611257565b34801561059b57600080fd5b506105af6105aa366004613410565b611315565b60405161040b919081518152602080830151908201526040808301519082015260609182015115159181019190915260800190565b3480156105f057600080fd5b50610401600c5481565b34801561060657600080fd5b506104346113bb565b34801561061b57600080fd5b506104016201518081565b34801561063257600080fd5b50610401606481565b34801561064757600080fd5b50610401600381565b34801561065c57600080fd5b5061068061066b3660046133b8565b60136020526000908152604090205460ff1681565b604051901515815260200161040b565b34801561069c57600080fd5b5061040161025881565b3480156106b257600080fd5b5060015460ff16610680565b3480156106ca57600080fd5b506106806113cd565b3480156106df57600080fd5b50610401600281565b3480156106f457600080fd5b5061040160085481565b34801561070a57600080fd5b506104e47f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f81565b34801561073e57600080fd5b5061043461148f565b34801561075357600080fd5b506104e47f000000000000000000000000e2b5e368933aee39ca81abf878e3baa691b99d4381565b34801561078757600080fd5b50610434611e63565b34801561079c57600080fd5b50610401605581565b3480156107b157600080fd5b506104016a08af7623fb67bf1a80000081565b3480156107d057600080fd5b50610434611e75565b3480156107e557600080fd5b506104e46107f43660046133f7565b6010602052600090815260409020546001600160a01b031681565b34801561081b57600080fd5b5061040161012c81565b34801561083157600080fd5b50610401600d5481565b34801561084757600080fd5b5060015461010090046001600160a01b03166104e4565b34801561086a57600080fd5b50610434611e85565b34801561087f57600080fd5b5061040169043c33c193756480000081565b34801561089d57600080fd5b506003546104e4906001600160a01b031681565b3480156108bd57600080fd5b5061040160075481565b3480156108d357600080fd5b5061040168056bc75e2d6310000081565b3480156108f057600080fd5b5061040160095481565b34801561090657600080fd5b506104e47f000000000000000000000000165c3410fc91ef562c50559f7d2289febed552d981565b34801561093a57600080fd5b50610434610949366004613410565b61244a565b34801561095a57600080fd5b506002546104e4906001600160a01b031681565b34801561097a57600080fd5b50610401602081565b34801561098f57600080fd5b506104016105dc81565b3480156109a557600080fd5b5061040160055481565b3480156109bb57600080fd5b50610401600b5481565b3480156109d157600080fd5b506109e56109e0366004613410565b6124d1565b604080519485526020850193909352918301521515606082015260800161040b565b348015610a1357600080fd5b50610401674563918244f4000081565b348015610a2f57600080fd5b5061043461251a565b348015610a4457600080fd5b50610401600f81565b348015610a5957600080fd5b50610401600a5481565b348015610a6f57600080fd5b50610401610a7e3660046133b8565b612583565b348015610a8f57600080fd5b50610434610a9e3660046133b8565b6125f2565b348015610aaf57600080fd5b5061040161251c81565b348015610ac557600080fd5b5060045461068090600160a01b900460ff1681565b348015610ae657600080fd5b50610434612683565b348015610afb57600080fd5b50610434610b0a3660046133b8565b6127ac565b348015610b1b57600080fd5b50610401610b2a3660046133f7565b612827565b348015610b3b57600080fd5b5061040160065481565b610b4d612873565b610b556128cc565b6002546001600160a01b0316610b6a57600080fd5b60008211610b7757600080fd5b60206005541115610b8757600080fd5b600060075411610b9657600080fd5b3360009081526013602052604090205460ff16158015610bb557508015155b15610bc457610bc43382612912565b336000908152601160205260408120549003610c5657600f805460009182610beb83613452565b90915550336000818152601160209081526040808320859055848352601082529182902080546001600160a01b03191684179055905183815292935090917f7ff0c735d0830c7c5290c49820b91c140e7690c667bae47c689cff496157b89d910160405180910390a2505b336000908152601360205260408120805460ff19166001179055600654610c7d908461346b565b905060008111610c8c57600080fd5b60075481908490821115610cb057600754915060065482610cad919061348d565b90505b6000610cbc82876134a4565b90506000612710610ccf61012c8561348d565b610cd9919061346b565b90506000612710610cec61012c8661348d565b610cf6919061346b565b90506000612710610d0860c88761348d565b610d12919061346b565b90506000612710610d2460648861348d565b610d2e919061346b565b90506000612710610d4060648961348d565b610d4a919061346b565b9050600081838587610d5c8a8d6134a4565b610d6691906134a4565b610d7091906134a4565b610d7a91906134a4565b610d8491906134a4565b90508860076000828254610d9891906134a4565b925050819055508560096000828254610db191906134b7565b9250508190555084600b6000828254610dca91906134b7565b9250508190555083600a6000828254610de391906134b7565b9250508190555080600c6000828254610dfc91906134b7565b909155505033600090815260146020908152604091829020805483516080810185528581529283018d9052929091908101610e3a62015180426134b7565b815260200160001515815250908060018154018082558091505060019003906000526020600020906004020160009091909190915060008201518160000155602082015181600101556040820151816002015560608201518160030160006101000a81548160ff0219169083151502179055505050610eef33308f7f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f6001600160a01b0316612a0e909392919063ffffffff16565b8715610f2957610f296001600160a01b037f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f16338a612a7f565b8215610f8357610f836001600160a01b037f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f167f000000000000000000000000e2b5e368933aee39ca81abf878e3baa691b99d4385612a7f565b8515610fe85760025460405163b2a52da760e01b8152600481018890526001600160a01b039091169063b2a52da790602401600060405180830381600087803b158015610fcf57600080fd5b505af1158015610fe3573d6000803e3d6000fd5b505050505b8315610ff857610ff83385612aa3565b337fb641e07763e6dadc2d8c70f7c5da177ddbfcef39e0ecb06e7657162b314ba215828b8d61102a62015180426134b7565b60408051948552602085019390935291830152606082015260800160405180910390a260075460000361105f5761105f612b91565b50505050505050505050506110746001600055565b5050565b611080612cfa565b6002546001600160a01b03161580156110a157506001600160a01b03811615155b6110aa57600080fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6110d4612873565b6002546001600160a01b03166110e957600080fd5b33600090815260146020526040902054811061110457600080fd5b336000908152601460205260408120805483908110611125576111256134ca565b60009182526020909120600490910201600381015490915060ff161561114a57600080fd5b806002015442101561115b57600080fd5b60038101805460ff19166001179055600c54815411611193578054600c80546000906111889084906134a4565b909155506111999050565b6000600c555b8054156111d85780546111d8906001600160a01b037f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f16903390612a7f565b600181015415611201576001810154600254611201916001600160a01b03909116903390612a7f565b8054600182015460408051858152602081019390935282015233907f9cdcf2f7714cca3508c7f0110b04a90a80a3a8dd0e35de99689db74d28c5383e9060600160405180910390a2506112546001600055565b50565b61125f612cfa565b6004546001600160a01b031615801561128057506001600160a01b03811615155b801561129657506002546001600160a01b031615155b61129f57600080fd5b600480546001600160a01b0319166001600160a01b03838116918217835560025460405163370c52d160e21b815293840192909252169063dc314b44906024015b600060405180830381600087803b1580156112fa57600080fd5b505af115801561130e573d6000803e3d6000fd5b5050505050565b61134260405180608001604052806000815260200160008152602001600081526020016000151581525090565b6001600160a01b038316600090815260146020526040902080548390811061136c5761136c6134ca565b60009182526020918290206040805160808101825260049093029091018054835260018101549383019390935260028301549082015260039091015460ff161515606082015290505b92915050565b6113c3612cfa565b6113cb612d5a565b565b600080600a54600954600b54600c546113e691906134b7565b6113f091906134b7565b6113fa91906134b7565b6040516370a0823160e01b815230600482015290915081906001600160a01b037f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f16906370a0823190602401602060405180830381865afa158015611463573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061148791906134e0565b101591505090565b611497612873565b6002546001600160a01b03166114ac57600080fd5b6003546001600160a01b03166114c157600080fd5b6000600954116114d057600080fd5b600e5443116114de57600080fd5b610258600d546114ee91906134b7565b4210156114fa57600080fd5b60006008541161150957600080fd5b6115116113cd565b61151a57600080fd5b6000611524612dac565b9050670de0b6b3a7640000600a6006548361153f919061348d565b611549919061348d565b101561155457600080fd5b611567600a670de0b6b3a764000061348d565b600654611574908361348d565b111561157f57600080fd5b600069043c33c19375648000006009541161159c576009546115a8565b69043c33c19375648000005b90506000670de0b6b3a76400006115bf848461348d565b6115c9919061346b565b905060006115d860028361348d565b90506008548111156115e957506008545b600081116115f657600080fd5b600061271061160761251c8661348d565b611611919061346b565b9050600061271061162461251c8661348d565b61162e919061346b565b6040516370a0823160e01b81523060048201529091506000906001600160a01b037f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f16906370a0823190602401602060405180830381865afa158015611698573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116bc91906134e0565b6002546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a0823190602401602060405180830381865afa15801561170a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061172e91906134e0565b43600e5542600d5560025460405163095ea7b360e01b81529192506001600160a01b03169063095ea7b390611789907f000000000000000000000000165c3410fc91ef562c50559f7d2289febed552d99089906004016134f9565b6020604051808303816000875af11580156117a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117cc9190613512565b5060405163095ea7b360e01b81526001600160a01b037f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f169063095ea7b39061183b907f000000000000000000000000165c3410fc91ef562c50559f7d2289febed552d9908b906004016134f9565b6020604051808303816000875af115801561185a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061187e9190613512565b506002546001600160a01b037f000000000000000000000000165c3410fc91ef562c50559f7d2289febed552d981169163e8e33700917f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f91168a898989306118e8426107086134b7565b60405160e08a901b6001600160e01b03191681526001600160a01b039889166004820152968816602488015260448701959095526064860193909352608485019190915260a484015290921660c482015260e4810191909152610104016060604051808303816000875af1925050508015611980575060408051601f3d908101601f1916820190925261197d91810190613534565b60015b611ad35760405163095ea7b360e01b81526001600160a01b037f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f169063095ea7b3906119f3907f000000000000000000000000165c3410fc91ef562c50559f7d2289febed552d9906000906004016134f9565b6020604051808303816000875af1158015611a12573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a369190613512565b5060025460405163095ea7b360e01b81526001600160a01b039091169063095ea7b390611a8a907f000000000000000000000000165c3410fc91ef562c50559f7d2289febed552d9906000906004016134f9565b6020604051808303816000875af1158015611aa9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611acd9190613512565b50611e51565b6040516370a0823160e01b81523060048201526000907f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f6001600160a01b0316906370a0823190602401602060405180830381865afa158015611b3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b5e91906134e0565b611b6890876134a4565b6002546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a0823190602401602060405180830381865afa158015611bb6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bda91906134e0565b611be490876134a4565b90506000818b11611bf6576000611c00565b611c00828c6134a4565b90506009548311611c28578260096000828254611c1d91906134a4565b90915550611c2e9050565b60006009555b8015611c9357600254604051630852cd8d60e31b8152600481018390526001600160a01b03909116906342966c6890602401600060405180830381600087803b158015611c7a57600080fd5b505af1158015611c8e573d6000803e3d6000fd5b505050505b6008548211611cb9578160086000828254611cae91906134a4565b90915550611cbf9050565b60006008555b60405163095ea7b360e01b81526001600160a01b037f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f169063095ea7b390611d2e907f000000000000000000000000165c3410fc91ef562c50559f7d2289febed552d9906000906004016134f9565b6020604051808303816000875af1158015611d4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d719190613512565b5060025460405163095ea7b360e01b81526001600160a01b039091169063095ea7b390611dc5907f000000000000000000000000165c3410fc91ef562c50559f7d2289febed552d9906000906004016134f9565b6020604051808303816000875af1158015611de4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e089190613512565b5060408051848152602081018490529081018290527fd7f28048575eead8851d024ead087913957dfb4fd1a02b4d1573f5352a5a2be39060600160405180910390a15050505050505b50505050505050506113cb6001600055565b611e6b612cfa565b6113cb6000612dfe565b611e7d612cfa565b6113cb612e58565b611e8d612873565b6003546001600160a01b0316611ea257600080fd5b68056bc75e2d63100000600a541015611eba57600080fd5b611ec26113cd565b611ecb57600080fd5b6000611ed5612e93565b50905060008111611ee557600080fd5b6000611ef56105dc6127106134a4565b611f016105dc8461348d565b611f0b919061346b565b9050600081600a5411611f2057600a54611f22565b815b905068056bc75e2d63100000811015611f3d57505050612440565b6040805160028082526060820183526000926020830190803683370190505090507f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f81600081518110611f9257611f926134ca565b6001600160a01b039283166020918202929092010152600254825191169082906001908110611fc357611fc36134ca565b6001600160a01b0392831660209182029290920101526002546040516370a0823160e01b815230600482015260009291909116906370a0823190602401602060405180830381865afa15801561201d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061204191906134e0565b60405163095ea7b360e01b81529091506001600160a01b037f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f169063095ea7b3906120b2907f000000000000000000000000165c3410fc91ef562c50559f7d2289febed552d99087906004016134f9565b6020604051808303816000875af11580156120d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120f59190613512565b506001600160a01b037f000000000000000000000000165c3410fc91ef562c50559f7d2289febed552d9166338ed17398460008530612136426107086134b7565b6040518663ffffffff1660e01b8152600401612156959493929190613578565b6000604051808303816000875af192505050801561219657506040513d6000823e601f3d908101601f1916820160405261219391908101906135e9565b60015b6122525760405163095ea7b360e01b81526001600160a01b037f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f169063095ea7b390612209907f000000000000000000000000165c3410fc91ef562c50559f7d2289febed552d9906000906004016134f9565b6020604051808303816000875af1158015612228573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061224c9190613512565b5061243a565b6002546040516370a0823160e01b815230600482015260009184916001600160a01b03909116906370a0823190602401602060405180830381865afa15801561229f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122c391906134e0565b6122cd91906134a4565b905084600a60008282546122e191906134a4565b9091555050801561234b57600254604051630852cd8d60e31b8152600481018390526001600160a01b03909116906342966c6890602401600060405180830381600087803b15801561233257600080fd5b505af1158015612346573d6000803e3d6000fd5b505050505b60405163095ea7b360e01b81526001600160a01b037f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f169063095ea7b3906123ba907f000000000000000000000000165c3410fc91ef562c50559f7d2289febed552d9906000906004016134f9565b6020604051808303816000875af11580156123d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123fd9190613512565b5060408051868152602081018390527f8e8412cac6b961b95ef832e2bac486977bbd29eb9725f9eddd97f3380c31f649910160405180910390a150505b50505050505b6113cb6001600055565b612452612cfa565b6002546001600160a01b038381169116148015906124a257507f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f6001600160a01b0316826001600160a01b031614155b6124ab57600080fd5b6001546110749061010090046001600160a01b03166001600160a01b0384169083612a7f565b601460205281600052604060002081815481106124ed57600080fd5b60009182526020909120600490910201805460018201546002830154600390930154919450925060ff1684565b612522612cfa565b600454600160a01b900460ff1615801561254657506002546001600160a01b031615155b61254f57600080fd5b6004805460ff60a01b1916600160a01b1790556002546113cb906001600160a01b03163369152d02c7e14af6800000612a7f565b6002546040516337bb752760e21b81526001600160a01b038381166004830152600092169063deedd49c90602401602060405180830381865afa1580156125ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b591906134e0565b6125fa612cfa565b6003546001600160a01b031615801561261b57506001600160a01b03811615155b801561263157506002546001600160a01b031615155b61263a57600080fd5b600380546001600160a01b0319166001600160a01b0383811691821790925560025460405163370c52d160e21b815260048101929092529091169063dc314b44906024016112e0565b61268b612873565b60025460405163be3408a160e01b81523360048201526000916001600160a01b03169063be3408a1906024016020604051808303816000875af11580156126d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126fa91906134e0565b9050674563918244f4000081101561271157600080fd5b80600b54101561272057600080fd5b80600b600082825461273291906134a4565b9091555061276c90506001600160a01b037f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f163383612a7f565b60405181815233907f5efa67896a23b651b741b525caacba039c00ca7853be3de8eb1f4269e8669c569060200160405180910390a2506113cb6001600055565b6127b4612cfa565b6001600160a01b03811661281e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61125481612dfe565b60006006546000148061283a5750600754155b1561284757506000919050565b600060065483612857919061346b565b90506007548111612868578061286c565b6007545b9392505050565b6002600054036128c55760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401612815565b6002600055565b60015460ff16156113cb5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401612815565b6000818152601060205260409020546001600160a01b03168015806129485750826001600160a01b0316816001600160a01b0316145b8061296c57506001600160a01b03811660009081526013602052604090205460ff16155b1561297657505050565b8060005b60038160ff1610156129dc57846001600160a01b0316826001600160a01b0316036129a6575050505050565b6001600160a01b039182166000908152601260205260409020549091169081156129dc57806129d4816136a7565b91505061297a565b50506001600160a01b03928316600090815260126020526040902080546001600160a01b031916919093161790915550565b6040516001600160a01b0380851660248301528316604482015260648101829052612a799085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152613059565b50505050565b612a9e8363a9059cbb60e01b8484604051602401612a429291906134f9565b505050565b6001600160a01b038083166000908152601260205260408120549091169081612acd576000612ae9565b6001600160a01b03808316600090815260126020526040902054165b905060006001600160a01b038216612b02576000612b1e565b6001600160a01b03808316600090815260126020526040902054165b905060006064612b2f86603261348d565b612b39919061346b565b905060006064612b4a87601e61348d565b612b54919061346b565b9050612b60858361312e565b612b6a848261312e565b612b888382612b79858a6134a4565b612b8391906134a4565b61312e565b50505050505050565b602060055410612b9d57565b60058054906000612bad83613452565b9190505550600260066000828254612bc5919061348d565b9091555050600554600090612bdc906001906134a4565b6002546040516370a0823160e01b81523060048201526a08af7623fb67bf1a80000090921c92506000916001600160a01b03909116906370a0823190602401602060405180830381865afa158015612c38573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c5c91906134e0565b905080821115612c6a578091505b6064612c7760558461348d565b612c81919061346b565b6007556064612c91600f8461348d565b612c9b919061346b565b60086000828254612cac91906134b7565b90915550506005546006546040517f6778731b259e47db8d144adf2d795ce185c588290643733953fdb9a931225de592612cee92908252602082015260400190565b60405180910390a15050565b6001546001600160a01b036101009091041633146113cb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401612815565b612d626131ca565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6000806000612db9612e93565b9150915081600003612de157600654612dda90670de0b6b3a764000061346b565b9250505090565b81612df482670de0b6b3a764000061348d565b612dda919061346b565b600180546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b612e606128cc565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25833612d8f565b60035460009081906001600160a01b0316612eb15750600091829150565b600360009054906101000a90046001600160a01b03166001600160a01b0316630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa925050508015612f20575060408051601f3d908101601f19168201909252612f1d918101906136e2565b60015b612f2d5750600091829150565b60035460408051630dfe168160e01b815290516000926001600160a01b031691630dfe16819160048083019260209291908290030181865afa925050508015612f93575060408051601f3d908101601f19168201909252612f9091810190613732565b60015b612fa557506000958695509350505050565b90507f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f6001600160a01b0316816001600160a01b031614612fef57826001600160701b0316612ffa565b836001600160701b03165b95507f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f6001600160a01b0316816001600160a01b03161461304457836001600160701b031661304f565b826001600160701b03165b9450505050509091565b60006130ae826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166132139092919063ffffffff16565b90508051600014806130cf5750808060200190518101906130cf9190613512565b612a9e5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401612815565b8060000361313a575050565b6110746001600160a01b0383161580159061316d57506001600160a01b03831660009081526013602052604090205460ff165b613197577f000000000000000000000000e2b5e368933aee39ca81abf878e3baa691b99d43613199565b825b6001600160a01b037f0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f169083612a7f565b60015460ff166113cb5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401612815565b6060613222848460008561322a565b949350505050565b60608247101561328b5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401612815565b600080866001600160a01b031685876040516132a79190613773565b60006040518083038185875af1925050503d80600081146132e4576040519150601f19603f3d011682016040523d82523d6000602084013e6132e9565b606091505b50915091506132fa87838387613305565b979650505050505050565b6060831561337457825160000361336d576001600160a01b0385163b61336d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401612815565b5081613222565b61322283838151156133895781518083602001fd5b8060405162461bcd60e51b8152600401612815919061378f565b6001600160a01b038116811461125457600080fd5b6000602082840312156133ca57600080fd5b813561286c816133a3565b600080604083850312156133e857600080fd5b50508035926020909101359150565b60006020828403121561340957600080fd5b5035919050565b6000806040838503121561342357600080fd5b823561342e816133a3565b946020939093013593505050565b634e487b7160e01b600052601160045260246000fd5b6000600182016134645761346461343c565b5060010190565b60008261348857634e487b7160e01b600052601260045260246000fd5b500490565b80820281158282048414176113b5576113b561343c565b818103818111156113b5576113b561343c565b808201808211156113b5576113b561343c565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156134f257600080fd5b5051919050565b6001600160a01b03929092168252602082015260400190565b60006020828403121561352457600080fd5b8151801515811461286c57600080fd5b60008060006060848603121561354957600080fd5b8351925060208401519150604084015190509250925092565b634e487b7160e01b600052604160045260246000fd5b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156135c85784516001600160a01b0316835293830193918301916001016135a3565b50506001600160a01b03969096166060850152505050608001529392505050565b600060208083850312156135fc57600080fd5b825167ffffffffffffffff8082111561361457600080fd5b818501915085601f83011261362857600080fd5b81518181111561363a5761363a613562565b8060051b604051601f19603f8301168101818110858211171561365f5761365f613562565b60405291825284820192508381018501918883111561367d57600080fd5b938501935b8285101561369b57845184529385019392850192613682565b98975050505050505050565b600060ff821660ff81036136bd576136bd61343c565b60010192915050565b80516001600160701b03811681146136dd57600080fd5b919050565b6000806000606084860312156136f757600080fd5b613700846136c6565b925061370e602085016136c6565b9150604084015163ffffffff8116811461372757600080fd5b809150509250925092565b60006020828403121561374457600080fd5b815161286c816133a3565b60005b8381101561376a578181015183820152602001613752565b50506000910152565b6000825161378581846020870161374f565b9190910192915050565b60208152600082518060208401526137ae81604085016020870161374f565b601f01601f1916919091016040019291505056fea2646970667358221220bb55fa3440f9e530e9e05794ff09e39d4f039e989ef8c3c348450adb3beb77ea64736f6c63430008130033