Source Code
Latest 25 from a total of 839 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Withdraw | 11804070 | 1872 days ago | IN | 0 ETH | 0.02880863 | ||||
| Deposit | 11672890 | 1892 days ago | IN | 0 ETH | 0.0041855 | ||||
| Mass Update Pool... | 11622683 | 1900 days ago | IN | 0 ETH | 0.01512192 | ||||
| Withdraw | 11592637 | 1904 days ago | IN | 0 ETH | 0.00908453 | ||||
| Deposit | 11535974 | 1913 days ago | IN | 0 ETH | 0.00296245 | ||||
| Update Rewards P... | 11493606 | 1919 days ago | IN | 0 ETH | 0.01201075 | ||||
| Deposit | 11492294 | 1920 days ago | IN | 0 ETH | 0.00218436 | ||||
| Withdraw | 11492289 | 1920 days ago | IN | 0 ETH | 0.00459068 | ||||
| Redeem | 11473035 | 1923 days ago | IN | 0 ETH | 0.00995449 | ||||
| Deposit | 11472292 | 1923 days ago | IN | 0 ETH | 0.03550053 | ||||
| Deposit | 11447722 | 1926 days ago | IN | 0 ETH | 0.00262528 | ||||
| Withdraw | 11440757 | 1928 days ago | IN | 0 ETH | 0.00311469 | ||||
| Deposit | 11426753 | 1930 days ago | IN | 0 ETH | 0.0029066 | ||||
| Redeem | 11422381 | 1930 days ago | IN | 0 ETH | 0.00383958 | ||||
| Withdraw | 11422362 | 1930 days ago | IN | 0 ETH | 0.0030987 | ||||
| Redeem | 11422275 | 1930 days ago | IN | 0 ETH | 0.00534269 | ||||
| Redeem | 11422275 | 1930 days ago | IN | 0 ETH | 0.00408269 | ||||
| Redeem | 11422266 | 1930 days ago | IN | 0 ETH | 0.00534269 | ||||
| Redeem | 11421683 | 1930 days ago | IN | 0 ETH | 0.00668372 | ||||
| Deposit | 11415213 | 1931 days ago | IN | 0 ETH | 0.01128904 | ||||
| Withdraw | 11413108 | 1932 days ago | IN | 0 ETH | 0.0102793 | ||||
| Deposit | 11407179 | 1933 days ago | IN | 0 ETH | 0.00236275 | ||||
| Redeem | 11401993 | 1933 days ago | IN | 0 ETH | 0.00319965 | ||||
| Withdraw | 11401334 | 1934 days ago | IN | 0 ETH | 0.00231627 | ||||
| Deposit | 11396273 | 1934 days ago | IN | 0 ETH | 0.00364447 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
MasterRancher
Compiler Version
v0.6.12+commit.27d51765
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: SEE LICENSE FILE
pragma solidity 0.6.12;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/utils/EnumerableSet.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./AlpacaToken.sol";
import "./unipool/interfaces/IStakingRewards.sol";
interface IMigratorRancher {
// Perform LP token migration from legacy UniswapV2 to AlpacaSwap's omnipool
// LP tokens are nullified to 0 during migration so no additional deposit will
// be allowed after domestication. Only deposit of ALP is allowed.
// Migrator should have full access to the caller's LP token.
// Return the new LP token address.
//
// Migrator must have allowance access to UniswapV2 LP tokens. In the world of AlpacaSwap,
// all Uniswaps are wild Alpacas that need to be domesticated. Once the liquidity farming
// period is over, we domesticate those pools and establish alpaca ranch.
function domesticate(IERC20 orig)
external
returns (
bool result,
uint256 index,
uint256 lpSupply
);
function establishRanch() external returns (IERC20 alp);
function retrieveShares(uint256 index) external returns (uint256 shares);
function establishTokenSetting() external;
function liquidateNonalpaca(address token) external;
function startRanch(
address _feeTo,
uint256 _feeToPct,
address _exitFeeTo,
uint256 _exitFee,
address _payOutToken,
address _controller
) external;
}
// MasterRancher is the master of the alpaca farm.
//
// Note that it's ownable and the owner wields tremendous power. The ownership
// will be transferred to a governance smart contract once PACA is sufficiently
// distributed and the community can show to govern itself.
//
// Enjoy!
contract MasterRancher is Ownable {
using SafeMath for uint256;
using SafeERC20 for IERC20;
// Info of each user.
struct UserInfo {
uint256 amount; // How many LP tokens the user has provided.
uint256 rewardDebt; // Reward debt. See explanation below.
//
// We do some fancy math here. Basically, any point in time, the amount of PACAs
// entitled to a user but is pending to be distributed is:
//
// pending reward = (user.amount * pool.accPacaPerShare) - user.rewardDebt
//
// Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens:
// 1. The pool's `accPacaPerShare` (and `lastRewardBlock`) gets updated.
// 2. User receives the pending reward sent to his/her address.
// 3. User's `amount` gets updated.
// 4. User's `rewardDebt` gets updated.
}
// Info of each pool.
struct PoolInfo {
IERC20 lpToken; // Address of LP token contract.
uint256 allocPoint; // How many allocation points assigned to this pool. PACAs to distribute per block.
uint256 lastRewardBlock; // Last block number that PACAs distribution occurs.
uint256 accPacaPerShare; // Accumulated PACAs per share, times 1e12. See below.
uint256 index;
uint256 lpSupply;
address stakingPool; // UNI staking pool. If none is available, set to address(0). MUST be address(0) for ALPs.
}
// The PACA TOKEN!
AlpacaToken public paca;
// Dev address.
address public devaddr;
// Dev share of PACA
uint256 public devPctInv = 12;
// UNI address for collecting rewards
address public uniaddr;
// Block number when bonus PACA period ends.
uint256 public bonusEndBlock;
// PACA tokens created per block.
uint256 public pacaPerBlock;
// Bonus muliplier for early alpaca farmers
uint256 public bonusMultiplier = 10;
// The migrator contract. It has a lot of power. Can only be set through governance (owner).
IMigratorRancher public migrator;
// ALP LP token
IERC20 alp;
// Info of each pool.
PoolInfo[] public poolInfo;
// Withdraw lock
bool public withdrawLock;
// Info of each user that stakes LP tokens.
mapping(uint256 => mapping(address => UserInfo)) public userInfo;
// Total allocation poitns. Must be the sum of all allocation points in all pools.
uint256 public totalAllocPoint = 0;
// The block number when PACA mining starts.
uint256 public startBlock;
bool public ranchEstablished;
bool public operationPaused;
uint256 public ranchPid;
event Deposit(address indexed user, uint256 indexed pid, uint256 amount);
event Withdraw(address indexed user, uint256 indexed pid, uint256 amount);
event Redeem(address indexed user, uint256 indexed pid, uint256 amount);
event EmergencyWithdraw(
address indexed user,
uint256 indexed pid,
uint256 amount
);
event RewardPerBlockUpdated(uint256 blockNum, uint256 amount);
event RanchFinalized(uint256 ranchPid);
event MintedPACA(uint256 blockNum, uint256 amount);
constructor(
AlpacaToken _paca,
address _devaddr,
uint256 _pacaPerBlock,
uint256 _startBlock,
uint256 _bonusEndBlock,
bool _withdrawLock
) public {
paca = _paca;
devaddr = _devaddr;
pacaPerBlock = _pacaPerBlock;
bonusEndBlock = _bonusEndBlock;
startBlock = _startBlock;
withdrawLock = _withdrawLock;
}
function poolLength() external view returns (uint256) {
return poolInfo.length;
}
// Add a new lp to the pool. Can only be called by the owner.
// XXX DO NOT add the same LP token more than once. Rewards will be messed up if you do.
// MUST ADD TOKENS THAT WILL BE PART OF THE OMNIPOOL, MIGRATOR WILL NOT CHECK FOR SHITCOIN
// Keeping it open after ranch est allows us to migrate to a new CRP if something blows up
function add(
uint256 _allocPoint,
IERC20 _lpToken,
bool _withUpdate,
address _stakingPool
) public onlyOwner {
if (_withUpdate) {
massUpdatePools();
}
uint256 lastRewardBlock = block.number > startBlock
? block.number
: startBlock;
totalAllocPoint = totalAllocPoint.add(_allocPoint);
poolInfo.push(
PoolInfo({
lpToken: _lpToken,
allocPoint: _allocPoint,
lastRewardBlock: lastRewardBlock,
accPacaPerShare: 0,
index: 5000, //just a random number for now
lpSupply: 0,
stakingPool: _stakingPool
})
);
// Approve MAX amount upfront for staking in UNI pool
if (_stakingPool != address(0)) {
_lpToken.safeApprove(_stakingPool, uint(-1));
}
}
// Maintain backwards compatability with add() that does not have stakingPool param
// Defaults to stakingPool = address(0), i.e. no staking will be done
function add(
uint256 _allocPoint,
IERC20 _lpToken,
bool _withUpdate
) public onlyOwner {
add(_allocPoint, _lpToken, _withUpdate, address(0));
}
// Update the given pool's PACA allocation point. Can only be called by the owner.
function set(
uint256 _pid,
uint256 _allocPoint,
bool _withUpdate
) public onlyOwner {
require(ranchEstablished == false, "dont touch my alpaca");
if (_withUpdate) {
massUpdatePools();
}
totalAllocPoint = totalAllocPoint.sub(poolInfo[_pid].allocPoint).add(
_allocPoint
);
poolInfo[_pid].allocPoint = _allocPoint;
}
function updateRewardsPerBlock(uint256 rewardPerBlock) public onlyOwner {
massUpdatePools();
pacaPerBlock = rewardPerBlock;
emit RewardPerBlockUpdated(block.number, pacaPerBlock);
}
//
// Update reward variables for all pools. Be careful of gas spending!
function finalizeShares() public onlyOwner {
require(operationPaused == true, "pause operation first");
uint256 length = poolInfo.length;
uint256 legacyTotalAllocPoint = totalAllocPoint;
totalAllocPoint = 0;
for (uint256 pid = 0; pid < length; ++pid) {
PoolInfo storage pool = poolInfo[pid];
uint256 pacaReward;
if (block.number <= pool.lastRewardBlock) {
continue;
}
uint256 multiplier = getMultiplier(
pool.lastRewardBlock,
block.number
);
//we need to do last round of reward updates because migration is an async operation
if (pool.lpSupply == 0) {
pool.lastRewardBlock = block.number;
continue;
}
pacaReward = multiplier.mul(pacaPerBlock).mul(pool.allocPoint).div(
legacyTotalAllocPoint
);
// Calculate split of reward between dev and pool holders
uint256 devReward = pacaReward.div(devPctInv);
uint256 poolReward = pacaReward.sub(devReward);
paca.mint(devaddr, devReward);
paca.mint(address(this), poolReward);
pool.accPacaPerShare = pool.accPacaPerShare.add(poolReward.mul(1e12).div(pool.lpSupply));
// After migration, each pool will maintain shares in the ALP until they are redeemed via redeem
// allocPoint is updated to shares
pool.allocPoint = migrator.retrieveShares(pool.index);
totalAllocPoint = totalAllocPoint.add(pool.allocPoint);
//update last reward block to the current block. there might be slippage
//during ranch establishment which is OK.
pool.lastRewardBlock = block.number;
}
}
// Set the migrator contract. Can only be called by the owner.
function setMigrator(IMigratorRancher _migrator) public onlyOwner {
migrator = _migrator;
}
function requestToMint(uint256 _amount) external returns (uint256) {
require(msg.sender == address(migrator), "wut?");
require(operationPaused == true, "pause the contract first");
require(ranchEstablished == false, "dont touch my alpaca");
paca.mint(address(migrator), _amount);
emit MintedPACA(block.number, _amount);
return _amount;
}
// The migration process is an async operation for AlpacaSwap so only can be called by the owner.
// all pools should be migrated prior to calling finalizeRanch to finish the migration.
// pauseOperation -> call migrate on all pools -> finalize ranch -> boom!
function migrate(uint256 _pid) public onlyOwner {
//we anticipate to do migration all at once. Pause all other operations.
require(operationPaused == true, "pause the contract first");
require(ranchEstablished == false, "dont touch my alpaca");
require(address(migrator) != address(0), "migrate: no migrator");
bool result = false;
uint256 index;
uint256 lp;
PoolInfo storage pool = poolInfo[_pid];
IERC20 lpToken = pool.lpToken;
// unstake any LP tokens earning UNI
if (pool.stakingPool != address(0)) {
IStakingRewards usp = IStakingRewards(pool.stakingPool);
usp.exit();
}
uint256 bal = lpToken.balanceOf(address(this));
lpToken.safeApprove(address(migrator), bal);
(result, index, lp) = migrator.domesticate(lpToken);
require(result == true, "alpacas ran away");
pool.lpToken = IERC20(0);
pool.index = index;
pool.lpSupply = lp;
}
// set UNI address
function setUNI(address _uniAddress) public onlyOwner {
uniaddr = _uniAddress;
}
// send UNI to the glue factory
function liquidateUNI() public onlyOwner {
IERC20 uniToken = IERC20(uniaddr);
uint bal = uniToken.balanceOf(address(this));
uniToken.safeTransfer(address(migrator), bal);
migrator.liquidateNonalpaca(uniaddr);
}
function pauseOperation() public onlyOwner {
require(address(migrator) != address(0), "migrate: no migrator");
require(ranchEstablished == false, "dont touch my alpaca");
//from the moment this function is invoked, all deposit/withdraws are disabled.
//It is expected that the ranch must be formed shortly.
operationPaused = true;
}
function establishTokenSetting() external onlyOwner {
require(address(migrator) != address(0), "migrate: no migrator");
require(ranchEstablished == false, "dont touch my alpaca");
require(operationPaused == true, "pause the contract first");
migrator.establishTokenSetting();
}
function establishRanch() external onlyOwner {
require(address(migrator) != address(0), "migrate: no migrator");
require(ranchEstablished == false, "dont touch my alpaca");
require(operationPaused == true, "pause the contract first");
//only should be called AFTER all swaps are migrated, its not reversible once the ranch is established
//call
alp = migrator.establishRanch();
}
function finalizeRanch(
address _feeTo,
uint256 _feeToPct,
address _exitFeeTo,
uint256 _exitFee,
address _payOutToken
) external onlyOwner {
require(address(migrator) != address(0), "migrate: no migrator");
require(ranchEstablished == false, "dont touch my alpaca");
require(operationPaused == true, "pause the contract first");
finalizeShares();
uint256 lastRewardBlock = block.number > startBlock
? block.number
: startBlock;
// Add AlpacaPool to the list of pools to allow people to deposit their ALPs to earn PACA
poolInfo.push(
PoolInfo({
lpToken: alp,
allocPoint: 0,
lastRewardBlock: lastRewardBlock,
accPacaPerShare: 0,
index: 5000, //random number.
lpSupply: 0,
stakingPool: address(0)
})
);
ranchPid = poolInfo.length - 1;
migrator.startRanch(
_feeTo,
_feeToPct,
_exitFeeTo,
_exitFee,
_payOutToken,
devaddr
);
ranchEstablished = true;
operationPaused = false;
// withdraws are always opened after migration
withdrawLock = false;
emit RanchFinalized(ranchPid);
}
// Return reward multiplier over the given _from to _to block.
function getMultiplier(uint256 _from, uint256 _to)
public
view
returns (uint256)
{
if (_to <= bonusEndBlock) {
return _to.sub(_from).mul(bonusMultiplier);
} else if (_from >= bonusEndBlock) {
return _to.sub(_from);
} else {
return
bonusEndBlock.sub(_from).mul(bonusMultiplier).add(
_to.sub(bonusEndBlock)
);
}
}
// View function to see pending PACAs on frontend.
function pendingPaca(uint256 _pid, address _user)
external
view
returns (uint256)
{
require(operationPaused == false, "establishing ranch, relax");
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][_user];
uint256 accPacaPerShare = pool.accPacaPerShare;
uint256 lpSupply;
if (ranchEstablished == true) {
if (_pid == ranchPid) {
lpSupply = pool.allocPoint;
} else {
lpSupply = pool.lpSupply;
}
} else {
lpSupply = pool.lpToken.balanceOf(address(this));
// also account for staked LP tokens
if (pool.stakingPool != address(0)) {
IStakingRewards usp = IStakingRewards(pool.stakingPool);
lpSupply = lpSupply.add(usp.balanceOf(address(this)));
}
}
if (block.number > pool.lastRewardBlock && lpSupply != 0) {
uint256 multiplier = getMultiplier(
pool.lastRewardBlock,
block.number
);
uint256 pacaReward = multiplier
.mul(pacaPerBlock)
.mul(pool.allocPoint)
.div(totalAllocPoint);
uint256 devReward = pacaReward.div(devPctInv);
uint256 poolReward = pacaReward.sub(devReward);
accPacaPerShare = accPacaPerShare.add(
poolReward.mul(1e12).div(lpSupply)
);
}
return user.amount.mul(accPacaPerShare).div(1e12).sub(user.rewardDebt);
}
// Update reward variables for all pools. Be careful of gas spending!
function massUpdatePools() public {
require(operationPaused == false, "establishing ranch, relax");
uint256 length = poolInfo.length;
for (uint256 pid = 0; pid < length; ++pid) {
updatePool(pid);
}
}
// Update reward variables of the given pool to be up-to-date.
function updatePool(uint256 _pid) public {
require(
operationPaused == false || msg.sender == owner(),
"establishing ranch, relax"
);
PoolInfo storage pool = poolInfo[_pid];
uint256 lpSupply;
if (block.number <= pool.lastRewardBlock) {
return;
}
if (ranchEstablished == true) {
if (_pid == ranchPid) {
lpSupply = totalAllocPoint;
} else {
lpSupply = pool.lpSupply;
}
} else {
lpSupply = pool.lpToken.balanceOf(address(this));
// also account for staked LP tokens
if (pool.stakingPool != address(0)) {
IStakingRewards usp = IStakingRewards(pool.stakingPool);
lpSupply = lpSupply.add(usp.balanceOf(address(this)));
}
}
if (lpSupply == 0) {
pool.lastRewardBlock = block.number;
return;
}
uint256 multiplier = getMultiplier(pool.lastRewardBlock, block.number);
uint256 pacaReward = multiplier
.mul(pacaPerBlock)
.mul(pool.allocPoint)
.div(totalAllocPoint);
// Divvy up the PACA reward between pool and devs
// Fix Chef's bad math
// dev + pool = total
// pct = dev / (dev + pool)
// dev = pool / (1/pct - 1)
// dev = pct * total
// pool = total * (1 - pct)
// paca.mint(devaddr, pacaReward.div(9));
// paca.mint(address(this), pacaReward);
// uint256 devPctInv = 11;
uint256 devReward = pacaReward.div(devPctInv);
uint256 poolReward = pacaReward.sub(devReward);
paca.mint(devaddr, devReward);
paca.mint(address(this), poolReward);
// pool.accPacaPerShare = pool.accPacaPerShare.add(pacaReward.mul(1e12).div(lpSupply));
pool.accPacaPerShare = pool.accPacaPerShare.add(poolReward.mul(1e12).div(lpSupply));
pool.lastRewardBlock = block.number;
}
// Deposit LP tokens to MasterRanch for PACA allocation.
function deposit(uint256 _pid, uint256 _amount) public {
require(operationPaused == false, "establishing ranch, relax");
require(_pid < poolInfo.length, "learn how array works");
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][msg.sender];
updatePool(_pid);
if (user.amount > 0) {
uint256 pending = user
.amount
.mul(pool.accPacaPerShare)
.div(1e12)
.sub(user.rewardDebt);
if (pending > 0) {
safePacaTransfer(msg.sender, pending);
}
}
if (_amount > 0) {
// if they try to deposit pools beside ALP past migration this won't work and will be reverted
// since pool.lpToken is set to IERC20(0) in migrate()
pool.lpToken.safeTransferFrom(
address(msg.sender),
address(this),
_amount
);
user.amount = user.amount.add(_amount);
// stake _amount to UNI pool to earn $$
if (pool.stakingPool != address(0)) {
IStakingRewards usp = IStakingRewards(pool.stakingPool);
usp.stake(_amount);
}
}
user.rewardDebt = user.amount.mul(pool.accPacaPerShare).div(1e12);
// If depositing ALP shares to earn PACA after migration
if (ranchEstablished == true) {
totalAllocPoint = totalAllocPoint.add(_amount);
pool.allocPoint = pool.allocPoint.add(_amount);
}
emit Deposit(msg.sender, _pid, _amount);
}
// Withdraw LP tokens from MasterRancher.
function withdraw(uint256 _pid, uint256 _amount) public {
// If someone wants to withdraw before, they give up their PACA and use emergencyWithdraw()
require(operationPaused == false, "establishing ranch, relax");
if (ranchEstablished == true) {
require(_pid == ranchPid, "use redemption for legacy withdrawal");
}
if (_amount > 0) {
require(!withdrawLock, "withdrawals not allowed, pls wait for migration");
}
// if (ranchEstablished == false && _amount > 0) {
// require(false, "wait until migration");
// }
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][msg.sender];
require(user.amount >= _amount, "withdraw: not good");
updatePool(_pid);
uint256 pending = user.amount.mul(pool.accPacaPerShare).div(1e12).sub(
user.rewardDebt
);
if (pending > 0) {
safePacaTransfer(msg.sender, pending);
}
if (_amount > 0) {
// unstake _amount from UNI pool
if (pool.stakingPool != address(0)) {
IStakingRewards usp = IStakingRewards(pool.stakingPool);
// ensure we don't try to withdraw more than is actually staked (e.g. after an emergency unstake)
uint256 stakedBalance = usp.balanceOf(address(this));
uint256 unstakeAmount = _amount;
if (stakedBalance < _amount) {
unstakeAmount = stakedBalance;
}
usp.withdraw(unstakeAmount);
}
user.amount = user.amount.sub(_amount);
pool.lpToken.safeTransfer(address(msg.sender), _amount);
}
if (ranchEstablished == true) {
pool.allocPoint = pool.allocPoint.sub(user.amount);
totalAllocPoint = totalAllocPoint.sub(user.amount);
}
user.rewardDebt = user.amount.mul(pool.accPacaPerShare).div(1e12);
emit Withdraw(msg.sender, _pid, _amount);
}
// Function for Uniswap LP depositers to redeem AlpacaPool LP tokens
function redeem(uint256 _pid) public {
require(operationPaused == false, "establishing ranch, relax");
require(ranchEstablished == true, "use withdraw");
require(_pid != ranchPid, "use withdraw");
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][msg.sender];
require(user.amount > 0, "lol wut?");
updatePool(_pid);
uint256 pending = user.amount.mul(pool.accPacaPerShare).div(1e12).sub(
user.rewardDebt
);
if (pending > 0) {
safePacaTransfer(msg.sender, pending);
}
//based on user amount we send back ALP LP tokens.
uint256 sharesToTransfer = pool.allocPoint.mul(user.amount).div(
pool.lpSupply
);
pool.allocPoint = pool.allocPoint.sub(sharesToTransfer);
totalAllocPoint = totalAllocPoint.sub(sharesToTransfer);
poolInfo[ranchPid].lpToken.safeTransfer(
address(msg.sender),
sharesToTransfer
);
user.rewardDebt = 0;
pool.lpSupply = pool.lpSupply.sub(user.amount);
user.amount = 0;
emit Redeem(msg.sender, _pid, user.amount);
}
// Withdraw without caring about rewards. EMERGENCY ONLY.
// Or if you are a rat and want to withdraw before the migration
function emergencyWithdraw(uint256 _pid) public {
require(!withdrawLock, "withdrawals not allowed, change via governance");
PoolInfo storage pool = poolInfo[_pid];
UserInfo storage user = userInfo[_pid][msg.sender];
pool.lpToken.safeTransfer(address(msg.sender), user.amount);
emit EmergencyWithdraw(msg.sender, _pid, user.amount);
user.amount = 0;
user.rewardDebt = 0;
}
// Unlock contract for withdrawals in an emergency
function emergencySetWithdrawLock(bool _withdrawLock) public {
require(msg.sender == devaddr, "dev: wut?");
require(ranchEstablished == false, "withdraw must be unlocked after migration");
withdrawLock = _withdrawLock;
}
// Unstake all UNI staking pools so the LP tokens can be withdrawn in an emergency
function emergencyUnstake() public {
require(msg.sender == devaddr, "dev: wut?");
uint256 length = poolInfo.length;
for (uint256 pid = 0; pid < length; ++pid) {
PoolInfo storage pool = poolInfo[pid];
// exit (withdraw all) from UNI pool
if (pool.stakingPool != address(0)) {
IStakingRewards usp = IStakingRewards(pool.stakingPool);
usp.exit();
}
}
}
// Safe PACA transfer function, just in case if rounding error causes pool to not have enough PACAs.
function safePacaTransfer(address _to, uint256 _amount) internal {
uint256 pacaBal = paca.balanceOf(address(this));
if (_amount > pacaBal) {
paca.transfer(_to, pacaBal);
} else {
paca.transfer(_to, _amount);
}
}
// Update dev address by the previous dev.
function dev(address _devaddr) public {
require(msg.sender == devaddr, "dev: wut?");
devaddr = _devaddr;
}
function devPctInvUpdate(uint256 _devPctInv) public onlyOwner {
devPctInv = _devPctInv;
}
function bonusMultiplierUpdate(uint256 _bonusMultiplier) public onlyOwner {
bonusMultiplier = _bonusMultiplier;
}
}//SPDX-License-Identifier: SEE LICENSE FILE
pragma solidity 0.6.12;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
// AlpacaToken with Governance.
contract AlpacaToken is ERC20("AlpacaToken", "PACA"), Ownable {
/// @notice Creates `_amount` token to `_to`. Must only be called by the owner (MasterChef).
function mint(address _to, uint256 _amount) public onlyOwner {
_mint(_to, _amount);
_moveDelegates(address(0), _delegates[_to], _amount);
}
// Modified from Sushi with delegate issues fixed, basicially just Compound
// https://github.com/compound-finance/compound-protocol/blob/master/contracts/Governance/Comp.sol
/// @dev A record of each accounts delegate
mapping (address => address) internal _delegates;
/// @notice A checkpoint for marking number of votes from a given block
struct Checkpoint {
uint32 fromBlock;
uint256 votes;
}
/// @notice A record of votes checkpoints for each account, by index
mapping (address => mapping (uint32 => Checkpoint)) public checkpoints;
/// @notice The number of checkpoints for each account
mapping (address => uint32) public numCheckpoints;
/// @notice The EIP-712 typehash for the contract's domain
bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)");
/// @notice The EIP-712 typehash for the delegation struct used by the contract
bytes32 public constant DELEGATION_TYPEHASH = keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)");
/// @notice A record of states for signing / validating signatures
mapping (address => uint) public nonces;
/// @notice An event thats emitted when an account changes its delegate
event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);
/// @notice An event thats emitted when a delegate account's vote balance changes
event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance);
/**
* @dev modified from OpenZeppelin to move delegates when tokens are transferred
*/
function transfer(
address recipient,
uint256 amount
)
public
override
returns (bool)
{
_moveDelegates(_delegates[msg.sender], _delegates[recipient], amount);
_transfer(msg.sender, recipient, amount);
return true;
}
/**
* @dev modified from OpenZeppelin to move delegates when tokens are transferred
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
)
public
override
returns (bool)
{
_moveDelegates(_delegates[sender], _delegates[recipient], amount);
_transfer(sender, recipient, amount);
_approve(sender, msg.sender, allowance(sender, msg.sender).sub(amount, "ERC20: transfer amount exceeds allowance"));
return true;
}
/**
* @notice Delegate votes from `msg.sender` to `delegatee`
* @param delegator The address to get delegatee for
*/
function delegates(address delegator)
external
view
returns (address)
{
return _delegates[delegator];
}
/**
* @notice Delegate votes from `msg.sender` to `delegatee`
* @param delegatee The address to delegate votes to
*/
function delegate(address delegatee) external {
return _delegate(msg.sender, delegatee);
}
/**
* @notice Delegates votes from signatory to `delegatee`
* @param delegatee The address to delegate votes to
* @param nonce The contract state required to match the signature
* @param expiry The time at which to expire the signature
* @param v The recovery byte of the signature
* @param r Half of the ECDSA signature pair
* @param s Half of the ECDSA signature pair
*/
function delegateBySig(
address delegatee,
uint nonce,
uint expiry,
uint8 v,
bytes32 r,
bytes32 s
)
external
{
bytes32 domainSeparator = keccak256(
abi.encode(
DOMAIN_TYPEHASH,
keccak256(bytes(name())),
getChainId(),
address(this)
)
);
bytes32 structHash = keccak256(
abi.encode(
DELEGATION_TYPEHASH,
delegatee,
nonce,
expiry
)
);
bytes32 digest = keccak256(
abi.encodePacked(
"\x19\x01",
domainSeparator,
structHash
)
);
address signatory = ecrecover(digest, v, r, s);
require(signatory != address(0), "SUSHI::delegateBySig: invalid signature");
require(nonce == nonces[signatory]++, "SUSHI::delegateBySig: invalid nonce");
require(now <= expiry, "SUSHI::delegateBySig: signature expired");
return _delegate(signatory, delegatee);
}
/**
* @notice Gets the current votes balance for `account`
* @param account The address to get votes balance
* @return The number of current votes for `account`
*/
function getCurrentVotes(address account)
external
view
returns (uint256)
{
uint32 nCheckpoints = numCheckpoints[account];
return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;
}
/**
* @notice Determine the prior number of votes for an account as of a block number
* @dev Block number must be a finalized block or else this function will revert to prevent misinformation.
* @param account The address of the account to check
* @param blockNumber The block number to get the vote balance at
* @return The number of votes the account had as of the given block
*/
function getPriorVotes(address account, uint blockNumber)
external
view
returns (uint256)
{
require(blockNumber < block.number, "SUSHI::getPriorVotes: not yet determined");
uint32 nCheckpoints = numCheckpoints[account];
if (nCheckpoints == 0) {
return 0;
}
// First check most recent balance
if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {
return checkpoints[account][nCheckpoints - 1].votes;
}
// Next check implicit zero balance
if (checkpoints[account][0].fromBlock > blockNumber) {
return 0;
}
uint32 lower = 0;
uint32 upper = nCheckpoints - 1;
while (upper > lower) {
uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow
Checkpoint memory cp = checkpoints[account][center];
if (cp.fromBlock == blockNumber) {
return cp.votes;
} else if (cp.fromBlock < blockNumber) {
lower = center;
} else {
upper = center - 1;
}
}
return checkpoints[account][lower].votes;
}
function _delegate(address delegator, address delegatee)
internal
{
address currentDelegate = _delegates[delegator];
uint256 delegatorBalance = balanceOf(delegator); // balance of underlying SUSHIs (not scaled);
_delegates[delegator] = delegatee;
emit DelegateChanged(delegator, currentDelegate, delegatee);
_moveDelegates(currentDelegate, delegatee, delegatorBalance);
}
function _moveDelegates(address srcRep, address dstRep, uint256 amount) internal {
if (srcRep != dstRep && amount > 0) {
if (srcRep != address(0)) {
// decrease old representative
uint32 srcRepNum = numCheckpoints[srcRep];
uint256 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;
uint256 srcRepNew = srcRepOld.sub(amount);
_writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);
}
if (dstRep != address(0)) {
// increase new representative
uint32 dstRepNum = numCheckpoints[dstRep];
uint256 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;
uint256 dstRepNew = dstRepOld.add(amount);
_writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);
}
}
}
function _writeCheckpoint(
address delegatee,
uint32 nCheckpoints,
uint256 oldVotes,
uint256 newVotes
)
internal
{
uint32 blockNumber = safe32(block.number, "SUSHI::_writeCheckpoint: block number exceeds 32 bits");
if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) {
checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;
} else {
checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes);
numCheckpoints[delegatee] = nCheckpoints + 1;
}
emit DelegateVotesChanged(delegatee, oldVotes, newVotes);
}
function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {
require(n < 2**32, errorMessage);
return uint32(n);
}
function getChainId() internal pure returns (uint) {
uint256 chainId;
assembly { chainId := chainid() }
return chainId;
}
}//SPDX-License-Identifier: SEE LICENSE FILE
pragma solidity >=0.4.24;
interface IStakingRewards {
// Views
function lastTimeRewardApplicable() external view returns (uint256);
function rewardPerToken() external view returns (uint256);
function earned(address account) external view returns (uint256);
function getRewardForDuration() external view returns (uint256);
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
// Mutative
function stake(uint256 amount) external;
function withdraw(uint256 amount) external;
function getReward() external;
function exit() external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.6.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 GSN 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 payable) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes memory) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
import "../GSN/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.
*/
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 () internal {
address msgSender = _msgSender();
_owner = msgSender;
emit OwnershipTransferred(address(0), msgSender);
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(_owner == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = 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");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming languages.
* `SafeMath` restores this intuition by reverting the transaction when an
* operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return sub(a, b, "SafeMath: subtraction overflow");
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
uint256 c = a - b;
return c;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) {
return 0;
}
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return div(a, b, "SafeMath: division by zero");
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return mod(a, b, "SafeMath: modulo by zero");
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
import "../../GSN/Context.sol";
import "./IERC20.sol";
import "../../math/SafeMath.sol";
import "../../utils/Address.sol";
/**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
* https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* We have followed general OpenZeppelin guidelines: functions revert instead
* of returning `false` on failure. This behavior is nonetheless conventional
* and does not conflict with the expectations of ERC20 applications.
*
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}.
*/
contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
using Address for address;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values for {name} and {symbol}, initializes {decimals} with
* a default value of 18.
*
* To select a different value for {decimals}, use {_setupDecimals}.
*
* All three of these values are immutable: they can only be set once during
* construction.
*/
constructor (string memory name, string memory symbol) public {
_name = name;
_symbol = symbol;
_decimals = 18;
}
/**
* @dev Returns the name of the token.
*/
function name() public view returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view returns (string memory) {
return _symbol;
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is
* called.
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view returns (uint8) {
return _decimals;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view override returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view override returns (uint256) {
return _balances[account];
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20};
*
* Requirements:
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
* - the caller must have allowance for ``sender``'s tokens of at least
* `amount`.
*/
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
return true;
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
return true;
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
return true;
}
/**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
* - `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
*/
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
_balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
_balances[recipient] = _balances[recipient].add(amount);
emit Transfer(sender, recipient, amount);
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements
*
* - `to` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);
emit Transfer(address(0), account, amount);
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
_balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
_totalSupply = _totalSupply.sub(amount);
emit Transfer(account, address(0), amount);
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(address owner, address spender, uint256 amount) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
/**
* @dev Sets {decimals} to a value other than the default one of 18.
*
* WARNING: This function should only be called from the constructor. Most
* applications that interact with token contracts will not expect
* {decimals} to ever change, and may work incorrectly if it does.
*/
function _setupDecimals(uint8 decimals_) internal {
_decimals = decimals_;
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be to transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
import "./IERC20.sol";
import "../../math/SafeMath.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 SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(IERC20 token, address spender, uint256 value) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
// solhint-disable-next-line max-line-length
require((value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 newAllowance = token.allowance(address(this), spender).add(value);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
// the target address contains contract code and also asserts for success in the low-level call.
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
if (returndata.length > 0) { // Return data is optional
// solhint-disable-next-line max-line-length
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.6.2;
/**
* @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
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies in extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
// solhint-disable-next-line no-inline-assembly
assembly { size := extcodesize(account) }
return size > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(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 functionCall(target, data, "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");
return _functionCallWithValue(target, data, value, errorMessage);
}
function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
require(isContract(target), "Address: call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.call{ value: weiValue }(data);
if (success) {
return returndata;
} else {
// 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
// solhint-disable-next-line no-inline-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
/**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the ordering.
*
* ```
* contract Example {
* // Add the library methods
* using EnumerableSet for EnumerableSet.AddressSet;
*
* // Declare a set state variable
* EnumerableSet.AddressSet private mySet;
* }
* ```
*
* As of v3.0.0, only sets of type `address` (`AddressSet`) and `uint256`
* (`UintSet`) are supported.
*/
library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just wrappers around the
// underlying Set.
// This means that we can only create new EnumerableSets for types that fit
// in bytes32.
struct Set {
// Storage of set values
bytes32[] _values;
// Position of the value in the `values` array, plus 1 because index 0
// means a value is not in the set.
mapping (bytes32 => uint256) _indexes;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function _add(Set storage set, bytes32 value) private returns (bool) {
if (!_contains(set, value)) {
set._values.push(value);
// The value is stored at length-1, but we add 1 to all indexes
// and use 0 as a sentinel value
set._indexes[value] = set._values.length;
return true;
} else {
return false;
}
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function _remove(Set storage set, bytes32 value) private returns (bool) {
// We read and store the value's index to prevent multiple reads from the same storage slot
uint256 valueIndex = set._indexes[value];
if (valueIndex != 0) { // Equivalent to contains(set, value)
// To delete an element from the _values array in O(1), we swap the element to delete with the last one in
// the array, and then remove the last element (sometimes called as 'swap and pop').
// This modifies the order of the array, as noted in {at}.
uint256 toDeleteIndex = valueIndex - 1;
uint256 lastIndex = set._values.length - 1;
// When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs
// so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.
bytes32 lastvalue = set._values[lastIndex];
// Move the last value to the index where the value to delete is
set._values[toDeleteIndex] = lastvalue;
// Update the index for the moved value
set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based
// Delete the slot where the moved value was stored
set._values.pop();
// Delete the index for the deleted slot
delete set._indexes[value];
return true;
} else {
return false;
}
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function _contains(Set storage set, bytes32 value) private view returns (bool) {
return set._indexes[value] != 0;
}
/**
* @dev Returns the number of values on the set. O(1).
*/
function _length(Set storage set) private view returns (uint256) {
return set._values.length;
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function _at(Set storage set, uint256 index) private view returns (bytes32) {
require(set._values.length > index, "EnumerableSet: index out of bounds");
return set._values[index];
}
// AddressSet
struct AddressSet {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(AddressSet storage set, address value) internal returns (bool) {
return _add(set._inner, bytes32(uint256(value)));
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(AddressSet storage set, address value) internal returns (bool) {
return _remove(set._inner, bytes32(uint256(value)));
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(AddressSet storage set, address value) internal view returns (bool) {
return _contains(set._inner, bytes32(uint256(value)));
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(AddressSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(AddressSet storage set, uint256 index) internal view returns (address) {
return address(uint256(_at(set._inner, index)));
}
// UintSet
struct UintSet {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(UintSet storage set, uint256 value) internal returns (bool) {
return _add(set._inner, bytes32(value));
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(UintSet storage set, uint256 value) internal returns (bool) {
return _remove(set._inner, bytes32(value));
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(UintSet storage set, uint256 value) internal view returns (bool) {
return _contains(set._inner, bytes32(value));
}
/**
* @dev Returns the number of values on the set. O(1).
*/
function length(UintSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(UintSet storage set, uint256 index) internal view returns (uint256) {
return uint256(_at(set._inner, index));
}
}{
"remappings": [],
"optimizer": {
"enabled": true,
"runs": 200
},
"evmVersion": "istanbul",
"libraries": {
"": {}
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"contract AlpacaToken","name":"_paca","type":"address"},{"internalType":"address","name":"_devaddr","type":"address"},{"internalType":"uint256","name":"_pacaPerBlock","type":"uint256"},{"internalType":"uint256","name":"_startBlock","type":"uint256"},{"internalType":"uint256","name":"_bonusEndBlock","type":"uint256"},{"internalType":"bool","name":"_withdrawLock","type":"bool"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"blockNum","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"MintedPACA","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"ranchPid","type":"uint256"}],"name":"RanchFinalized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Redeem","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"blockNum","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardPerBlockUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"contract IERC20","name":"_lpToken","type":"address"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"contract IERC20","name":"_lpToken","type":"address"},{"internalType":"bool","name":"_withUpdate","type":"bool"},{"internalType":"address","name":"_stakingPool","type":"address"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"bonusEndBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bonusMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_bonusMultiplier","type":"uint256"}],"name":"bonusMultiplierUpdate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_devaddr","type":"address"}],"name":"dev","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"devPctInv","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_devPctInv","type":"uint256"}],"name":"devPctInvUpdate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"devaddr","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_withdrawLock","type":"bool"}],"name":"emergencySetWithdrawLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyUnstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"establishRanch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"establishTokenSetting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeTo","type":"address"},{"internalType":"uint256","name":"_feeToPct","type":"uint256"},{"internalType":"address","name":"_exitFeeTo","type":"address"},{"internalType":"uint256","name":"_exitFee","type":"uint256"},{"internalType":"address","name":"_payOutToken","type":"address"}],"name":"finalizeRanch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"finalizeShares","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_from","type":"uint256"},{"internalType":"uint256","name":"_to","type":"uint256"}],"name":"getMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"liquidateUNI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"migrate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"migrator","outputs":[{"internalType":"contract IMigratorRancher","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operationPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paca","outputs":[{"internalType":"contract AlpacaToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pacaPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pauseOperation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingPaca","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IERC20","name":"lpToken","type":"address"},{"internalType":"uint256","name":"allocPoint","type":"uint256"},{"internalType":"uint256","name":"lastRewardBlock","type":"uint256"},{"internalType":"uint256","name":"accPacaPerShare","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"uint256","name":"lpSupply","type":"uint256"},{"internalType":"address","name":"stakingPool","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ranchEstablished","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ranchPid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"redeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"requestToMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_allocPoint","type":"uint256"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IMigratorRancher","name":"_migrator","type":"address"}],"name":"setMigrator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_uniAddress","type":"address"}],"name":"setUNI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAllocPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"uniaddr","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"updatePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"rewardPerBlock","type":"uint256"}],"name":"updateRewardsPerBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawLock","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]Contract Creation Code
6080604052600c600355600a6007556000600d553480156200002057600080fd5b5060405162003f2138038062003f21833981810160405260c08110156200004657600080fd5b508051602082015160408301516060840151608085015160a09095015193949293919290916000620000776200011b565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180546001600160a01b03199081166001600160a01b0398891617909155600280549091169590961694909417909455600691909155600592909255600e91909155600b805460ff19169115159190911790556200011f565b3390565b613df2806200012f6000396000f3fe608060405234801561001057600080fd5b50600436106102955760003560e01c8063630b5ba111610167578063a8b973a1116100ce578063e1fc8d7911610087578063e1fc8d79146106e9578063e2bbb158146106f1578063eb6e915014610714578063ec1d1b9e1461071c578063ee1381f114610739578063f2fde38b1461074157610295565b8063a8b973a1146106a4578063c9d07020146106ac578063cfa19251146106b4578063d1c7f7c6146106bc578063d49e77cd146106c4578063db006a75146106cc57610295565b80638d88a90e116101205780638d88a90e146105c35780638da5cb5b146105e95780638dbb1e3a146105f1578063928348851461061457806393f1a40b146106335780639ad6d37a1461067857610295565b8063630b5ba11461055b57806364482f7914610563578063715018a61461058e5780637589cf2f146105965780637cd07e471461059e5780637d637f87146105a657610295565b8063246215721161020b57806351eb05a6116101c457806351eb05a6146104a15780635312ea8e146104be5780635970f70b146104db5780635b26c34c146104f85780635c388ca6146105155780635f70edcf1461051d57610295565b8063246215721461040f578063250687de146104175780632f8ea39a14610433578063441a3e7014610459578063454b06081461047c57806348cd4cb11461049957610295565b806317caf6f11161025d57806317caf6f1146103795780631a6188b0146103815780631aed6553146103a55780631eaaa045146103ad57806323cf3118146103e15780632405ae6d1461040757610295565b8063081e3eda1461029a578063105d292f146102b4578063124418cf146102fa5780631526fe27146103025780631646689b14610371575b600080fd5b6102a2610767565b60408051918252519081900360200190f35b6102f8600480360360a08110156102ca57600080fd5b506001600160a01b03813581169160208101359160408201358116916060810135916080909101351661076d565b005b6102a2610b40565b61031f6004803603602081101561031857600080fd5b5035610b46565b60405180886001600160a01b03168152602001878152602001868152602001858152602001848152602001838152602001826001600160a01b0316815260200197505050505050505060405180910390f35b6102a2610b9e565b6102a2610ba4565b610389610baa565b604080516001600160a01b039092168252519081900360200190f35b6102a2610bb9565b6102f8600480360360608110156103c357600080fd5b508035906001600160a01b0360208201351690604001351515610bbf565b6102f8600480360360208110156103f757600080fd5b50356001600160a01b0316610c29565b6102f8610ca3565b6102f8610e03565b61041f610fb8565b604080519115158252519081900360200190f35b6102f86004803603602081101561044957600080fd5b50356001600160a01b0316610fc1565b6102f86004803603604081101561046f57600080fd5b508035906020013561103b565b6102f86004803603602081101561049257600080fd5b50356113b5565b6102a2611735565b6102f8600480360360208110156104b757600080fd5b503561173b565b6102f8600480360360208110156104d457600080fd5b5035611ab6565b6102f8600480360360208110156104f157600080fd5b5035611b93565b6102f86004803603602081101561050e57600080fd5b5035611bf0565b61041f611c93565b6102f86004803603608081101561053357600080fd5b508035906001600160a01b036020820135811691604081013515159160609091013516611c9c565b6102f8611ed1565b6102f86004803603606081101561057957600080fd5b50803590602081013590604001351515611f3f565b6102f861205f565b6102f8612101565b6103896121fb565b6102a2600480360360208110156105bc57600080fd5b503561220a565b6102f8600480360360208110156105d957600080fd5b50356001600160a01b03166123a3565b610389612410565b6102a26004803603604081101561060757600080fd5b508035906020013561241f565b6102f86004803603602081101561062a57600080fd5b5035151561248e565b61065f6004803603604081101561064957600080fd5b50803590602001356001600160a01b031661252e565b6040805192835260208301919091528051918290030190f35b6102a26004803603604081101561068e57600080fd5b50803590602001356001600160a01b0316612552565b6102a26127cd565b6102f86127d3565b6102f86128df565b61041f612ac7565b610389612ad5565b6102f8600480360360208110156106e257600080fd5b5035612ae4565b6102f8612d60565b6102f86004803603604081101561070757600080fd5b5080359060200135613086565b6103896132e4565b6102f86004803603602081101561073257600080fd5b50356132f3565b6102a2613350565b6102f86004803603602081101561075757600080fd5b50356001600160a01b0316613356565b600a5490565b61077561344e565b6000546001600160a01b039081169116146107c5576040805162461bcd60e51b81526020600482018190526024820152600080516020613ce0833981519152604482015290519081900360640190fd5b6008546001600160a01b0316610819576040805162461bcd60e51b815260206004820152601460248201527336b4b3b930ba329d1037379036b4b3b930ba37b960611b604482015290519081900360640190fd5b600f5460ff1615610868576040805162461bcd60e51b8152602060048201526014602482015273646f6e7420746f756368206d7920616c7061636160601b604482015290519081900360640190fd5b600f5460ff6101009091041615156001146108b8576040805162461bcd60e51b81526020600482015260186024820152600080516020613c52833981519152604482015290519081900360640190fd5b6108c0612d60565b6000600e5443116108d357600e546108d5565b435b6040805160e0810182526009546001600160a01b039081168252600060208301818152838501868152606085018381526113886080870190815260a0870185815260c08801868152600a805460018101825581895299516007909a027fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a8810180549b8b166001600160a01b03199c8d1617905596517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a988015594517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2aa87015592517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2ab86015590517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2ac850155517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2ad840155517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2ae9092018054928516929095169190911790935591546000190160105560085460025484516367cceffb60e11b81528c84166004820152602481018c90528a84166044820152606481018a9052888416608482015290831660a48201529351949550169263cf99dff69260c480820193929182900301818387803b158015610acd57600080fd5b505af1158015610ae1573d6000803e3d6000fd5b5050600f805461ff001960ff1991821660011716909155600b80549091169055505060105460408051918252517fb5c0e9b8c3684083d3276f32d051379a05b44655b00d712af8db8b834add0db99181900360200190a1505050505050565b60105481565b600a8181548110610b5357fe5b600091825260209091206007909102018054600182015460028301546003840154600485015460058601546006909601546001600160a01b0395861697509395929491939092911687565b60065481565b600d5481565b6001546001600160a01b031681565b60055481565b610bc761344e565b6000546001600160a01b03908116911614610c17576040805162461bcd60e51b81526020600482018190526024820152600080516020613ce0833981519152604482015290519081900360640190fd5b610c248383836000611c9c565b505050565b610c3161344e565b6000546001600160a01b03908116911614610c81576040805162461bcd60e51b81526020600482018190526024820152600080516020613ce0833981519152604482015290519081900360640190fd5b600880546001600160a01b0319166001600160a01b0392909216919091179055565b610cab61344e565b6000546001600160a01b03908116911614610cfb576040805162461bcd60e51b81526020600482018190526024820152600080516020613ce0833981519152604482015290519081900360640190fd5b60048054604080516370a0823160e01b81523093810193909352516001600160a01b039091169160009183916370a08231916024808301926020929190829003018186803b158015610d4c57600080fd5b505afa158015610d60573d6000803e3d6000fd5b505050506040513d6020811015610d7657600080fd5b5051600854909150610d95906001600160a01b03848116911683613452565b600854600480546040805163247ccd9760e21b81526001600160a01b0392831693810193909352519216916391f3365c9160248082019260009290919082900301818387803b158015610de757600080fd5b505af1158015610dfb573d6000803e3d6000fd5b505050505050565b610e0b61344e565b6000546001600160a01b03908116911614610e5b576040805162461bcd60e51b81526020600482018190526024820152600080516020613ce0833981519152604482015290519081900360640190fd5b6008546001600160a01b0316610eaf576040805162461bcd60e51b815260206004820152601460248201527336b4b3b930ba329d1037379036b4b3b930ba37b960611b604482015290519081900360640190fd5b600f5460ff1615610efe576040805162461bcd60e51b8152602060048201526014602482015273646f6e7420746f756368206d7920616c7061636160601b604482015290519081900360640190fd5b600f5460ff610100909104161515600114610f4e576040805162461bcd60e51b81526020600482015260186024820152600080516020613c52833981519152604482015290519081900360640190fd5b600860009054906101000a90046001600160a01b03166001600160a01b031663246215726040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610f9e57600080fd5b505af1158015610fb2573d6000803e3d6000fd5b50505050565b600f5460ff1681565b610fc961344e565b6000546001600160a01b03908116911614611019576040805162461bcd60e51b81526020600482018190526024820152600080516020613ce0833981519152604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b600f54610100900460ff1615611086576040805162461bcd60e51b81526020600482015260196024820152600080516020613c32833981519152604482015290519081900360640190fd5b600f5460ff161515600114156110d65760105482146110d65760405162461bcd60e51b8152600401808060200182810382526024815260200180613c726024913960400191505060405180910390fd5b801561111e57600b5460ff161561111e5760405162461bcd60e51b815260040180806020018281038252602f815260200180613d8e602f913960400191505060405180910390fd5b6000600a838154811061112d57fe5b60009182526020808320868452600c8252604080852033865290925292208054600790920290920192508311156111a0576040805162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b604482015290519081900360640190fd5b6111a98461173b565b60006111e382600101546111dd64e8d4a510006111d7876003015487600001546134a490919063ffffffff16565b90613504565b90613546565b905080156111f5576111f53382613588565b83156113205760068301546001600160a01b0316156112fc576006830154604080516370a0823160e01b815230600482015290516001600160a01b039092169160009183916370a0823191602480820192602092909190829003018186803b15801561126057600080fd5b505afa158015611274573d6000803e3d6000fd5b505050506040513d602081101561128a57600080fd5b50519050858082101561129a5750805b826001600160a01b0316632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156112e057600080fd5b505af11580156112f4573d6000803e3d6000fd5b505050505050505b81546113089085613546565b82558254611320906001600160a01b03163386613452565b600f5460ff16151560011415611357578154600184015461134091613546565b60018401558154600d5461135391613546565b600d555b600383015482546113729164e8d4a51000916111d7916134a4565b6001830155604080518581529051869133917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a35050505050565b6113bd61344e565b6000546001600160a01b0390811691161461140d576040805162461bcd60e51b81526020600482018190526024820152600080516020613ce0833981519152604482015290519081900360640190fd5b600f5460ff61010090910416151560011461145d576040805162461bcd60e51b81526020600482015260186024820152600080516020613c52833981519152604482015290519081900360640190fd5b600f5460ff16156114ac576040805162461bcd60e51b8152602060048201526014602482015273646f6e7420746f756368206d7920616c7061636160601b604482015290519081900360640190fd5b6008546001600160a01b0316611500576040805162461bcd60e51b815260206004820152601460248201527336b4b3b930ba329d1037379036b4b3b930ba37b960611b604482015290519081900360640190fd5b600080806000600a858154811061151357fe5b60009182526020909120600790910201805460068201549192506001600160a01b039081169116156115a2576006820154604080516374fd6c7760e11b815290516001600160a01b0390921691829163e9fad8ee91600480830192600092919082900301818387803b15801561158857600080fd5b505af115801561159c573d6000803e3d6000fd5b50505050505b6000816001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156115f157600080fd5b505afa158015611605573d6000803e3d6000fd5b505050506040513d602081101561161b57600080fd5b505160085490915061163a906001600160a01b03848116911683613711565b600854604080516356e0cf0560e11b81526001600160a01b0385811660048301529151919092169163adc19e0a9160248083019260609291908290030181600087803b15801561168957600080fd5b505af115801561169d573d6000803e3d6000fd5b505050506040513d60608110156116b357600080fd5b50805160208201516040909201519097509095509350600186151514611713576040805162461bcd60e51b815260206004820152601060248201526f616c70616361732072616e206177617960801b604482015290519081900360640190fd5b505080546001600160a01b031916815560048101929092556005909101555050565b600e5481565b600f54610100900460ff16158061176a5750611755612410565b6001600160a01b0316336001600160a01b0316145b6117a9576040805162461bcd60e51b81526020600482015260196024820152600080516020613c32833981519152604482015290519081900360640190fd5b6000600a82815481106117b857fe5b906000526020600020906007020190506000816002015443116117dc575050611ab3565b600f5460ff1615156001141561180b576010548314156117ff5750600d54611806565b5060058101545b611921565b8154604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561185557600080fd5b505afa158015611869573d6000803e3d6000fd5b505050506040513d602081101561187f57600080fd5b505160068301549091506001600160a01b031615611921576006820154604080516370a0823160e01b815230600482015290516001600160a01b039092169161191d9183916370a0823191602480820192602092909190829003018186803b1580156118ea57600080fd5b505afa1580156118fe573d6000803e3d6000fd5b505050506040513d602081101561191457600080fd5b50518390613824565b9150505b80611933575043600290910155611ab3565b600061194383600201544361241f565b90506000611970600d546111d7866001015461196a600654876134a490919063ffffffff16565b906134a4565b905060006119896003548361350490919063ffffffff16565b905060006119978383613546565b600154600254604080516340c10f1960e01b81526001600160a01b0392831660048201526024810187905290519394509116916340c10f199160448082019260009290919082900301818387803b1580156119f157600080fd5b505af1158015611a05573d6000803e3d6000fd5b5050600154604080516340c10f1960e01b81523060048201526024810186905290516001600160a01b0390921693506340c10f19925060448082019260009290919082900301818387803b158015611a5c57600080fd5b505af1158015611a70573d6000803e3d6000fd5b50505050611a9e611a93866111d764e8d4a51000856134a490919063ffffffff16565b600388015490613824565b60038701555050436002909401939093555050505b50565b600b5460ff1615611af85760405162461bcd60e51b815260040180806020018281038252602e815260200180613d00602e913960400191505060405180910390fd5b6000600a8281548110611b0757fe5b60009182526020808320858452600c82526040808520338087529352909320805460079093029093018054909450611b4c926001600160a01b03919091169190613452565b80546040805191825251849133917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959181900360200190a360008082556001909101555050565b611b9b61344e565b6000546001600160a01b03908116911614611beb576040805162461bcd60e51b81526020600482018190526024820152600080516020613ce0833981519152604482015290519081900360640190fd5b600355565b611bf861344e565b6000546001600160a01b03908116911614611c48576040805162461bcd60e51b81526020600482018190526024820152600080516020613ce0833981519152604482015290519081900360640190fd5b611c50611ed1565b6006819055604080514381526020810183905281517f842e6f2b482c6f39924c8be7b71d40631362ef78f833f0371ceb2649edc5fb10929181900390910190a150565b600b5460ff1681565b611ca461344e565b6000546001600160a01b03908116911614611cf4576040805162461bcd60e51b81526020600482018190526024820152600080516020613ce0833981519152604482015290519081900360640190fd5b8115611d0257611d02611ed1565b6000600e544311611d1557600e54611d17565b435b600d54909150611d279086613824565b600d556040805160e0810182526001600160a01b038087168252602082018881529282018481526000606084018181526113886080860190815260a0860183815289861660c08801818152600a80546001810182559652975160079095027fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a8810180549689166001600160a01b031997881617905598517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a98a015594517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2aa89015591517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2ab880155517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2ac870155517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2ad86015592517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2ae909401805494909216939092169290921790915515611eca57611eca6001600160a01b03851683600019613711565b5050505050565b600f54610100900460ff1615611f1c576040805162461bcd60e51b81526020600482015260196024820152600080516020613c32833981519152604482015290519081900360640190fd5b600a5460005b81811015611f3b57611f338161173b565b600101611f22565b5050565b611f4761344e565b6000546001600160a01b03908116911614611f97576040805162461bcd60e51b81526020600482018190526024820152600080516020613ce0833981519152604482015290519081900360640190fd5b600f5460ff1615611fe6576040805162461bcd60e51b8152602060048201526014602482015273646f6e7420746f756368206d7920616c7061636160601b604482015290519081900360640190fd5b8015611ff457611ff4611ed1565b6120318261202b600a868154811061200857fe5b906000526020600020906007020160010154600d5461354690919063ffffffff16565b90613824565b600d8190555081600a848154811061204557fe5b906000526020600020906007020160010181905550505050565b61206761344e565b6000546001600160a01b039081169116146120b7576040805162461bcd60e51b81526020600482018190526024820152600080516020613ce0833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6002546001600160a01b0316331461214c576040805162461bcd60e51b81526020600482015260096024820152686465763a207775743f60b81b604482015290519081900360640190fd5b600a5460005b81811015611f3b576000600a828154811061216957fe5b6000918252602090912060079091020160068101549091506001600160a01b0316156121f2576006810154604080516374fd6c7760e11b815290516001600160a01b0390921691829163e9fad8ee91600480830192600092919082900301818387803b1580156121d857600080fd5b505af11580156121ec573d6000803e3d6000fd5b50505050505b50600101612152565b6008546001600160a01b031681565b6008546000906001600160a01b03163314612255576040805162461bcd60e51b815260206004808301919091526024820152637775743f60e01b604482015290519081900360640190fd5b600f5460ff6101009091041615156001146122a5576040805162461bcd60e51b81526020600482015260186024820152600080516020613c52833981519152604482015290519081900360640190fd5b600f5460ff16156122f4576040805162461bcd60e51b8152602060048201526014602482015273646f6e7420746f756368206d7920616c7061636160601b604482015290519081900360640190fd5b600154600854604080516340c10f1960e01b81526001600160a01b03928316600482015260248101869052905191909216916340c10f1991604480830192600092919082900301818387803b15801561234c57600080fd5b505af1158015612360573d6000803e3d6000fd5b5050604080514381526020810186905281517ff8ab2e781c83447747c716c9506f15d0ac14638db1e7f2fd4b8a0798ddc988869450908190039091019150a15090565b6002546001600160a01b031633146123ee576040805162461bcd60e51b81526020600482015260096024820152686465763a207775743f60b81b604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031690565b600060055482116124425760075461243b9061196a8486613546565b9050612488565b60055483106124555761243b8284613546565b61243b61246d6005548461354690919063ffffffff16565b61202b60075461196a8760055461354690919063ffffffff16565b92915050565b6002546001600160a01b031633146124d9576040805162461bcd60e51b81526020600482015260096024820152686465763a207775743f60b81b604482015290519081900360640190fd5b600f5460ff161561251b5760405162461bcd60e51b8152600401808060200182810382526029815260200180613cb76029913960400191505060405180910390fd5b600b805460ff1916911515919091179055565b600c6020908152600092835260408084209091529082529020805460019091015482565b600f54600090610100900460ff16156125a0576040805162461bcd60e51b81526020600482015260196024820152600080516020613c32833981519152604482015290519081900360640190fd5b6000600a84815481106125af57fe5b60009182526020808320878452600c825260408085206001600160a01b0389168652909252908320600792909202016003810154600f54919450919290600160ff9091161515141561261c5760105487141561261057506001830154612617565b5060058301545b6126ff565b8354604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561266657600080fd5b505afa15801561267a573d6000803e3d6000fd5b505050506040513d602081101561269057600080fd5b505160068501549091506001600160a01b0316156126ff576006840154604080516370a0823160e01b815230600482015290516001600160a01b03909216916126fb9183916370a0823191602480820192602092909190829003018186803b1580156118ea57600080fd5b9150505b83600201544311801561271157508015155b1561279a57600061272685600201544361241f565b9050600061274d600d546111d7886001015461196a600654876134a490919063ffffffff16565b905060006127666003548361350490919063ffffffff16565b905060006127748383613546565b905061279361278c866111d78464e8d4a510006134a4565b8790613824565b9550505050505b6127c283600101546111dd64e8d4a510006111d78688600001546134a490919063ffffffff16565b979650505050505050565b60075481565b6127db61344e565b6000546001600160a01b0390811691161461282b576040805162461bcd60e51b81526020600482018190526024820152600080516020613ce0833981519152604482015290519081900360640190fd5b6008546001600160a01b031661287f576040805162461bcd60e51b815260206004820152601460248201527336b4b3b930ba329d1037379036b4b3b930ba37b960611b604482015290519081900360640190fd5b600f5460ff16156128ce576040805162461bcd60e51b8152602060048201526014602482015273646f6e7420746f756368206d7920616c7061636160601b604482015290519081900360640190fd5b600f805461ff001916610100179055565b6128e761344e565b6000546001600160a01b03908116911614612937576040805162461bcd60e51b81526020600482018190526024820152600080516020613ce0833981519152604482015290519081900360640190fd5b6008546001600160a01b031661298b576040805162461bcd60e51b815260206004820152601460248201527336b4b3b930ba329d1037379036b4b3b930ba37b960611b604482015290519081900360640190fd5b600f5460ff16156129da576040805162461bcd60e51b8152602060048201526014602482015273646f6e7420746f756368206d7920616c7061636160601b604482015290519081900360640190fd5b600f5460ff610100909104161515600114612a2a576040805162461bcd60e51b81526020600482015260186024820152600080516020613c52833981519152604482015290519081900360640190fd5b600860009054906101000a90046001600160a01b03166001600160a01b031663cfa192516040518163ffffffff1660e01b8152600401602060405180830381600087803b158015612a7a57600080fd5b505af1158015612a8e573d6000803e3d6000fd5b505050506040513d6020811015612aa457600080fd5b5051600980546001600160a01b0319166001600160a01b03909216919091179055565b600f54610100900460ff1681565b6002546001600160a01b031681565b600f54610100900460ff1615612b2f576040805162461bcd60e51b81526020600482015260196024820152600080516020613c32833981519152604482015290519081900360640190fd5b600f5460ff161515600114612b7a576040805162461bcd60e51b815260206004820152600c60248201526b75736520776974686472617760a01b604482015290519081900360640190fd5b601054811415612bc0576040805162461bcd60e51b815260206004820152600c60248201526b75736520776974686472617760a01b604482015290519081900360640190fd5b6000600a8281548110612bcf57fe5b60009182526020808320858452600c825260408085203386529092529220805460079092029092019250612c35576040805162461bcd60e51b81526020600482015260086024820152676c6f6c207775743f60c01b604482015290519081900360640190fd5b612c3e8361173b565b6000612c6c82600101546111dd64e8d4a510006111d7876003015487600001546134a490919063ffffffff16565b90508015612c7e57612c7e3382613588565b6000612ca384600501546111d7856000015487600101546134a490919063ffffffff16565b6001850154909150612cb59082613546565b6001850155600d54612cc79082613546565b600d81905550612d023382600a60105481548110612ce157fe5b60009182526020909120600790910201546001600160a01b03169190613452565b6000600184015582546005850154612d1991613546565b600585015560008084556040805191825251869133917fe5b754fb1abb7f01b499791d0b820ae3b6af3424ac1c59768edb53f4ec31a9299181900360200190a35050505050565b612d6861344e565b6000546001600160a01b03908116911614612db8576040805162461bcd60e51b81526020600482018190526024820152600080516020613ce0833981519152604482015290519081900360640190fd5b600f5460ff610100909104161515600114612e12576040805162461bcd60e51b81526020600482015260156024820152741c185d5cd9481bdc195c985d1a5bdb88199a5c9cdd605a1b604482015290519081900360640190fd5b600a54600d8054600091829055905b82811015610c24576000600a8281548110612e3857fe5b90600052602060002090600702019050600081600201544311612e5c57505061307e565b6000612e6c83600201544361241f565b9050826005015460001415612e895750504360029091015561307e565b612eaa856111d7856001015461196a600654866134a490919063ffffffff16565b91506000612ec36003548461350490919063ffffffff16565b90506000612ed18483613546565b600154600254604080516340c10f1960e01b81526001600160a01b0392831660048201526024810187905290519394509116916340c10f199160448082019260009290919082900301818387803b158015612f2b57600080fd5b505af1158015612f3f573d6000803e3d6000fd5b5050600154604080516340c10f1960e01b81523060048201526024810186905290516001600160a01b0390921693506340c10f19925060448082019260009290919082900301818387803b158015612f9657600080fd5b505af1158015612faa573d6000803e3d6000fd5b5050506005860154612fd59150612fca906111d78464e8d4a510006134a4565b600387015490613824565b600386015560085460048087015460408051635391edbd60e11b815292830191909152516001600160a01b039092169163a723db7a916024808201926020929091908290030181600087803b15801561302d57600080fd5b505af1158015613041573d6000803e3d6000fd5b505050506040513d602081101561305757600080fd5b505160018601819055600d5461306c91613824565b600d5550504360029093019290925550505b600101612e21565b600f54610100900460ff16156130d1576040805162461bcd60e51b81526020600482015260196024820152600080516020613c32833981519152604482015290519081900360640190fd5b600a54821061311f576040805162461bcd60e51b81526020600482015260156024820152746c6561726e20686f7720617272617920776f726b7360581b604482015290519081900360640190fd5b6000600a838154811061312e57fe5b60009182526020808320868452600c8252604080852033865290925292206007909102909101915061315f8461173b565b8054156131a857600061319482600101546111dd64e8d4a510006111d7876003015487600001546134a490919063ffffffff16565b905080156131a6576131a63382613588565b505b82156132505781546131c5906001600160a01b031633308661387e565b80546131d19084613824565b815560068201546001600160a01b0316156132505760068201546040805163534a7e1d60e11b81526004810186905290516001600160a01b0390921691829163a694fc3a91602480830192600092919082900301818387803b15801561323657600080fd5b505af115801561324a573d6000803e3d6000fd5b50505050505b6003820154815461326b9164e8d4a51000916111d7916134a4565b600180830191909155600f5460ff16151514156132a757600d5461328f9084613824565b600d5560018201546132a19084613824565b60018301555b604080518481529051859133917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a350505050565b6004546001600160a01b031681565b6132fb61344e565b6000546001600160a01b0390811691161461334b576040805162461bcd60e51b81526020600482018190526024820152600080516020613ce0833981519152604482015290519081900360640190fd5b600755565b60035481565b61335e61344e565b6000546001600160a01b039081169116146133ae576040805162461bcd60e51b81526020600482018190526024820152600080516020613ce0833981519152604482015290519081900360640190fd5b6001600160a01b0381166133f35760405162461bcd60e51b8152600401808060200182810382526026815260200180613c0c6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610c249084906138d4565b6000826134b357506000612488565b828202828482816134c057fe5b04146134fd5760405162461bcd60e51b8152600401808060200182810382526021815260200180613c966021913960400191505060405180910390fd5b9392505050565b60006134fd83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250613985565b60006134fd83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250613a27565b600154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156135d357600080fd5b505afa1580156135e7573d6000803e3d6000fd5b505050506040513d60208110156135fd57600080fd5b5051905080821115613691576001546040805163a9059cbb60e01b81526001600160a01b038681166004830152602482018590529151919092169163a9059cbb9160448083019260209291908290030181600087803b15801561365f57600080fd5b505af1158015613673573d6000803e3d6000fd5b505050506040513d602081101561368957600080fd5b50610c249050565b6001546040805163a9059cbb60e01b81526001600160a01b038681166004830152602482018690529151919092169163a9059cbb9160448083019260209291908290030181600087803b1580156136e757600080fd5b505af11580156136fb573d6000803e3d6000fd5b505050506040513d6020811015611eca57600080fd5b801580613797575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b15801561376957600080fd5b505afa15801561377d573d6000803e3d6000fd5b505050506040513d602081101561379357600080fd5b5051155b6137d25760405162461bcd60e51b8152600401808060200182810382526036815260200180613d586036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052610c249084906138d4565b6000828201838110156134fd576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052610fb29085905b6060613929826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316613a819092919063ffffffff16565b805190915015610c245780806020019051602081101561394857600080fd5b5051610c245760405162461bcd60e51b815260040180806020018281038252602a815260200180613d2e602a913960400191505060405180910390fd5b60008183613a115760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156139d65781810151838201526020016139be565b50505050905090810190601f168015613a035780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581613a1d57fe5b0495945050505050565b60008184841115613a795760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156139d65781810151838201526020016139be565b505050900390565b6060613a908484600085613a98565b949350505050565b6060613aa385613c05565b613af4576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310613b335780518252601f199092019160209182019101613b14565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613b95576040519150601f19603f3d011682016040523d82523d6000602084013e613b9a565b606091505b50915091508115613bae579150613a909050565b805115613bbe5780518082602001fd5b60405162461bcd60e51b81526020600482018181528651602484015286518793919283926044019190850190808383600083156139d65781810151838201526020016139be565b3b15159056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737365737461626c697368696e672072616e63682c2072656c61780000000000000070617573652074686520636f6e7472616374206669727374000000000000000075736520726564656d7074696f6e20666f72206c6567616379207769746864726177616c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f777769746864726177206d75737420626520756e6c6f636b6564206166746572206d6967726174696f6e4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65727769746864726177616c73206e6f7420616c6c6f7765642c206368616e67652076696120676f7665726e616e63655361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e63657769746864726177616c73206e6f7420616c6c6f7765642c20706c73207761697420666f72206d6967726174696f6ea26469706673582212203d4bcb1b230ef573f77ad5c060be17b49732315aaa17c5d79abfe558ed83516864736f6c634300060c0033000000000000000000000000580b2ebfb318613f89ec7668e79fae45dbdbe4bf000000000000000000000000c00dd48adb5042bcc8ac9ada56699d7369fb28450000000000000000000000000000000000000000000000056bc75e2d631000000000000000000000000000000000000000000000000000000000000000aaedd00000000000000000000000000000000000000000000000000000000000acc2900000000000000000000000000000000000000000000000000000000000000001
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102955760003560e01c8063630b5ba111610167578063a8b973a1116100ce578063e1fc8d7911610087578063e1fc8d79146106e9578063e2bbb158146106f1578063eb6e915014610714578063ec1d1b9e1461071c578063ee1381f114610739578063f2fde38b1461074157610295565b8063a8b973a1146106a4578063c9d07020146106ac578063cfa19251146106b4578063d1c7f7c6146106bc578063d49e77cd146106c4578063db006a75146106cc57610295565b80638d88a90e116101205780638d88a90e146105c35780638da5cb5b146105e95780638dbb1e3a146105f1578063928348851461061457806393f1a40b146106335780639ad6d37a1461067857610295565b8063630b5ba11461055b57806364482f7914610563578063715018a61461058e5780637589cf2f146105965780637cd07e471461059e5780637d637f87146105a657610295565b8063246215721161020b57806351eb05a6116101c457806351eb05a6146104a15780635312ea8e146104be5780635970f70b146104db5780635b26c34c146104f85780635c388ca6146105155780635f70edcf1461051d57610295565b8063246215721461040f578063250687de146104175780632f8ea39a14610433578063441a3e7014610459578063454b06081461047c57806348cd4cb11461049957610295565b806317caf6f11161025d57806317caf6f1146103795780631a6188b0146103815780631aed6553146103a55780631eaaa045146103ad57806323cf3118146103e15780632405ae6d1461040757610295565b8063081e3eda1461029a578063105d292f146102b4578063124418cf146102fa5780631526fe27146103025780631646689b14610371575b600080fd5b6102a2610767565b60408051918252519081900360200190f35b6102f8600480360360a08110156102ca57600080fd5b506001600160a01b03813581169160208101359160408201358116916060810135916080909101351661076d565b005b6102a2610b40565b61031f6004803603602081101561031857600080fd5b5035610b46565b60405180886001600160a01b03168152602001878152602001868152602001858152602001848152602001838152602001826001600160a01b0316815260200197505050505050505060405180910390f35b6102a2610b9e565b6102a2610ba4565b610389610baa565b604080516001600160a01b039092168252519081900360200190f35b6102a2610bb9565b6102f8600480360360608110156103c357600080fd5b508035906001600160a01b0360208201351690604001351515610bbf565b6102f8600480360360208110156103f757600080fd5b50356001600160a01b0316610c29565b6102f8610ca3565b6102f8610e03565b61041f610fb8565b604080519115158252519081900360200190f35b6102f86004803603602081101561044957600080fd5b50356001600160a01b0316610fc1565b6102f86004803603604081101561046f57600080fd5b508035906020013561103b565b6102f86004803603602081101561049257600080fd5b50356113b5565b6102a2611735565b6102f8600480360360208110156104b757600080fd5b503561173b565b6102f8600480360360208110156104d457600080fd5b5035611ab6565b6102f8600480360360208110156104f157600080fd5b5035611b93565b6102f86004803603602081101561050e57600080fd5b5035611bf0565b61041f611c93565b6102f86004803603608081101561053357600080fd5b508035906001600160a01b036020820135811691604081013515159160609091013516611c9c565b6102f8611ed1565b6102f86004803603606081101561057957600080fd5b50803590602081013590604001351515611f3f565b6102f861205f565b6102f8612101565b6103896121fb565b6102a2600480360360208110156105bc57600080fd5b503561220a565b6102f8600480360360208110156105d957600080fd5b50356001600160a01b03166123a3565b610389612410565b6102a26004803603604081101561060757600080fd5b508035906020013561241f565b6102f86004803603602081101561062a57600080fd5b5035151561248e565b61065f6004803603604081101561064957600080fd5b50803590602001356001600160a01b031661252e565b6040805192835260208301919091528051918290030190f35b6102a26004803603604081101561068e57600080fd5b50803590602001356001600160a01b0316612552565b6102a26127cd565b6102f86127d3565b6102f86128df565b61041f612ac7565b610389612ad5565b6102f8600480360360208110156106e257600080fd5b5035612ae4565b6102f8612d60565b6102f86004803603604081101561070757600080fd5b5080359060200135613086565b6103896132e4565b6102f86004803603602081101561073257600080fd5b50356132f3565b6102a2613350565b6102f86004803603602081101561075757600080fd5b50356001600160a01b0316613356565b600a5490565b61077561344e565b6000546001600160a01b039081169116146107c5576040805162461bcd60e51b81526020600482018190526024820152600080516020613ce0833981519152604482015290519081900360640190fd5b6008546001600160a01b0316610819576040805162461bcd60e51b815260206004820152601460248201527336b4b3b930ba329d1037379036b4b3b930ba37b960611b604482015290519081900360640190fd5b600f5460ff1615610868576040805162461bcd60e51b8152602060048201526014602482015273646f6e7420746f756368206d7920616c7061636160601b604482015290519081900360640190fd5b600f5460ff6101009091041615156001146108b8576040805162461bcd60e51b81526020600482015260186024820152600080516020613c52833981519152604482015290519081900360640190fd5b6108c0612d60565b6000600e5443116108d357600e546108d5565b435b6040805160e0810182526009546001600160a01b039081168252600060208301818152838501868152606085018381526113886080870190815260a0870185815260c08801868152600a805460018101825581895299516007909a027fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a8810180549b8b166001600160a01b03199c8d1617905596517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a988015594517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2aa87015592517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2ab86015590517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2ac850155517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2ad840155517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2ae9092018054928516929095169190911790935591546000190160105560085460025484516367cceffb60e11b81528c84166004820152602481018c90528a84166044820152606481018a9052888416608482015290831660a48201529351949550169263cf99dff69260c480820193929182900301818387803b158015610acd57600080fd5b505af1158015610ae1573d6000803e3d6000fd5b5050600f805461ff001960ff1991821660011716909155600b80549091169055505060105460408051918252517fb5c0e9b8c3684083d3276f32d051379a05b44655b00d712af8db8b834add0db99181900360200190a1505050505050565b60105481565b600a8181548110610b5357fe5b600091825260209091206007909102018054600182015460028301546003840154600485015460058601546006909601546001600160a01b0395861697509395929491939092911687565b60065481565b600d5481565b6001546001600160a01b031681565b60055481565b610bc761344e565b6000546001600160a01b03908116911614610c17576040805162461bcd60e51b81526020600482018190526024820152600080516020613ce0833981519152604482015290519081900360640190fd5b610c248383836000611c9c565b505050565b610c3161344e565b6000546001600160a01b03908116911614610c81576040805162461bcd60e51b81526020600482018190526024820152600080516020613ce0833981519152604482015290519081900360640190fd5b600880546001600160a01b0319166001600160a01b0392909216919091179055565b610cab61344e565b6000546001600160a01b03908116911614610cfb576040805162461bcd60e51b81526020600482018190526024820152600080516020613ce0833981519152604482015290519081900360640190fd5b60048054604080516370a0823160e01b81523093810193909352516001600160a01b039091169160009183916370a08231916024808301926020929190829003018186803b158015610d4c57600080fd5b505afa158015610d60573d6000803e3d6000fd5b505050506040513d6020811015610d7657600080fd5b5051600854909150610d95906001600160a01b03848116911683613452565b600854600480546040805163247ccd9760e21b81526001600160a01b0392831693810193909352519216916391f3365c9160248082019260009290919082900301818387803b158015610de757600080fd5b505af1158015610dfb573d6000803e3d6000fd5b505050505050565b610e0b61344e565b6000546001600160a01b03908116911614610e5b576040805162461bcd60e51b81526020600482018190526024820152600080516020613ce0833981519152604482015290519081900360640190fd5b6008546001600160a01b0316610eaf576040805162461bcd60e51b815260206004820152601460248201527336b4b3b930ba329d1037379036b4b3b930ba37b960611b604482015290519081900360640190fd5b600f5460ff1615610efe576040805162461bcd60e51b8152602060048201526014602482015273646f6e7420746f756368206d7920616c7061636160601b604482015290519081900360640190fd5b600f5460ff610100909104161515600114610f4e576040805162461bcd60e51b81526020600482015260186024820152600080516020613c52833981519152604482015290519081900360640190fd5b600860009054906101000a90046001600160a01b03166001600160a01b031663246215726040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610f9e57600080fd5b505af1158015610fb2573d6000803e3d6000fd5b50505050565b600f5460ff1681565b610fc961344e565b6000546001600160a01b03908116911614611019576040805162461bcd60e51b81526020600482018190526024820152600080516020613ce0833981519152604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b600f54610100900460ff1615611086576040805162461bcd60e51b81526020600482015260196024820152600080516020613c32833981519152604482015290519081900360640190fd5b600f5460ff161515600114156110d65760105482146110d65760405162461bcd60e51b8152600401808060200182810382526024815260200180613c726024913960400191505060405180910390fd5b801561111e57600b5460ff161561111e5760405162461bcd60e51b815260040180806020018281038252602f815260200180613d8e602f913960400191505060405180910390fd5b6000600a838154811061112d57fe5b60009182526020808320868452600c8252604080852033865290925292208054600790920290920192508311156111a0576040805162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b604482015290519081900360640190fd5b6111a98461173b565b60006111e382600101546111dd64e8d4a510006111d7876003015487600001546134a490919063ffffffff16565b90613504565b90613546565b905080156111f5576111f53382613588565b83156113205760068301546001600160a01b0316156112fc576006830154604080516370a0823160e01b815230600482015290516001600160a01b039092169160009183916370a0823191602480820192602092909190829003018186803b15801561126057600080fd5b505afa158015611274573d6000803e3d6000fd5b505050506040513d602081101561128a57600080fd5b50519050858082101561129a5750805b826001600160a01b0316632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156112e057600080fd5b505af11580156112f4573d6000803e3d6000fd5b505050505050505b81546113089085613546565b82558254611320906001600160a01b03163386613452565b600f5460ff16151560011415611357578154600184015461134091613546565b60018401558154600d5461135391613546565b600d555b600383015482546113729164e8d4a51000916111d7916134a4565b6001830155604080518581529051869133917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b5689181900360200190a35050505050565b6113bd61344e565b6000546001600160a01b0390811691161461140d576040805162461bcd60e51b81526020600482018190526024820152600080516020613ce0833981519152604482015290519081900360640190fd5b600f5460ff61010090910416151560011461145d576040805162461bcd60e51b81526020600482015260186024820152600080516020613c52833981519152604482015290519081900360640190fd5b600f5460ff16156114ac576040805162461bcd60e51b8152602060048201526014602482015273646f6e7420746f756368206d7920616c7061636160601b604482015290519081900360640190fd5b6008546001600160a01b0316611500576040805162461bcd60e51b815260206004820152601460248201527336b4b3b930ba329d1037379036b4b3b930ba37b960611b604482015290519081900360640190fd5b600080806000600a858154811061151357fe5b60009182526020909120600790910201805460068201549192506001600160a01b039081169116156115a2576006820154604080516374fd6c7760e11b815290516001600160a01b0390921691829163e9fad8ee91600480830192600092919082900301818387803b15801561158857600080fd5b505af115801561159c573d6000803e3d6000fd5b50505050505b6000816001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156115f157600080fd5b505afa158015611605573d6000803e3d6000fd5b505050506040513d602081101561161b57600080fd5b505160085490915061163a906001600160a01b03848116911683613711565b600854604080516356e0cf0560e11b81526001600160a01b0385811660048301529151919092169163adc19e0a9160248083019260609291908290030181600087803b15801561168957600080fd5b505af115801561169d573d6000803e3d6000fd5b505050506040513d60608110156116b357600080fd5b50805160208201516040909201519097509095509350600186151514611713576040805162461bcd60e51b815260206004820152601060248201526f616c70616361732072616e206177617960801b604482015290519081900360640190fd5b505080546001600160a01b031916815560048101929092556005909101555050565b600e5481565b600f54610100900460ff16158061176a5750611755612410565b6001600160a01b0316336001600160a01b0316145b6117a9576040805162461bcd60e51b81526020600482015260196024820152600080516020613c32833981519152604482015290519081900360640190fd5b6000600a82815481106117b857fe5b906000526020600020906007020190506000816002015443116117dc575050611ab3565b600f5460ff1615156001141561180b576010548314156117ff5750600d54611806565b5060058101545b611921565b8154604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561185557600080fd5b505afa158015611869573d6000803e3d6000fd5b505050506040513d602081101561187f57600080fd5b505160068301549091506001600160a01b031615611921576006820154604080516370a0823160e01b815230600482015290516001600160a01b039092169161191d9183916370a0823191602480820192602092909190829003018186803b1580156118ea57600080fd5b505afa1580156118fe573d6000803e3d6000fd5b505050506040513d602081101561191457600080fd5b50518390613824565b9150505b80611933575043600290910155611ab3565b600061194383600201544361241f565b90506000611970600d546111d7866001015461196a600654876134a490919063ffffffff16565b906134a4565b905060006119896003548361350490919063ffffffff16565b905060006119978383613546565b600154600254604080516340c10f1960e01b81526001600160a01b0392831660048201526024810187905290519394509116916340c10f199160448082019260009290919082900301818387803b1580156119f157600080fd5b505af1158015611a05573d6000803e3d6000fd5b5050600154604080516340c10f1960e01b81523060048201526024810186905290516001600160a01b0390921693506340c10f19925060448082019260009290919082900301818387803b158015611a5c57600080fd5b505af1158015611a70573d6000803e3d6000fd5b50505050611a9e611a93866111d764e8d4a51000856134a490919063ffffffff16565b600388015490613824565b60038701555050436002909401939093555050505b50565b600b5460ff1615611af85760405162461bcd60e51b815260040180806020018281038252602e815260200180613d00602e913960400191505060405180910390fd5b6000600a8281548110611b0757fe5b60009182526020808320858452600c82526040808520338087529352909320805460079093029093018054909450611b4c926001600160a01b03919091169190613452565b80546040805191825251849133917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae05959181900360200190a360008082556001909101555050565b611b9b61344e565b6000546001600160a01b03908116911614611beb576040805162461bcd60e51b81526020600482018190526024820152600080516020613ce0833981519152604482015290519081900360640190fd5b600355565b611bf861344e565b6000546001600160a01b03908116911614611c48576040805162461bcd60e51b81526020600482018190526024820152600080516020613ce0833981519152604482015290519081900360640190fd5b611c50611ed1565b6006819055604080514381526020810183905281517f842e6f2b482c6f39924c8be7b71d40631362ef78f833f0371ceb2649edc5fb10929181900390910190a150565b600b5460ff1681565b611ca461344e565b6000546001600160a01b03908116911614611cf4576040805162461bcd60e51b81526020600482018190526024820152600080516020613ce0833981519152604482015290519081900360640190fd5b8115611d0257611d02611ed1565b6000600e544311611d1557600e54611d17565b435b600d54909150611d279086613824565b600d556040805160e0810182526001600160a01b038087168252602082018881529282018481526000606084018181526113886080860190815260a0860183815289861660c08801818152600a80546001810182559652975160079095027fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a8810180549689166001600160a01b031997881617905598517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a98a015594517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2aa89015591517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2ab880155517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2ac870155517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2ad86015592517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2ae909401805494909216939092169290921790915515611eca57611eca6001600160a01b03851683600019613711565b5050505050565b600f54610100900460ff1615611f1c576040805162461bcd60e51b81526020600482015260196024820152600080516020613c32833981519152604482015290519081900360640190fd5b600a5460005b81811015611f3b57611f338161173b565b600101611f22565b5050565b611f4761344e565b6000546001600160a01b03908116911614611f97576040805162461bcd60e51b81526020600482018190526024820152600080516020613ce0833981519152604482015290519081900360640190fd5b600f5460ff1615611fe6576040805162461bcd60e51b8152602060048201526014602482015273646f6e7420746f756368206d7920616c7061636160601b604482015290519081900360640190fd5b8015611ff457611ff4611ed1565b6120318261202b600a868154811061200857fe5b906000526020600020906007020160010154600d5461354690919063ffffffff16565b90613824565b600d8190555081600a848154811061204557fe5b906000526020600020906007020160010181905550505050565b61206761344e565b6000546001600160a01b039081169116146120b7576040805162461bcd60e51b81526020600482018190526024820152600080516020613ce0833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6002546001600160a01b0316331461214c576040805162461bcd60e51b81526020600482015260096024820152686465763a207775743f60b81b604482015290519081900360640190fd5b600a5460005b81811015611f3b576000600a828154811061216957fe5b6000918252602090912060079091020160068101549091506001600160a01b0316156121f2576006810154604080516374fd6c7760e11b815290516001600160a01b0390921691829163e9fad8ee91600480830192600092919082900301818387803b1580156121d857600080fd5b505af11580156121ec573d6000803e3d6000fd5b50505050505b50600101612152565b6008546001600160a01b031681565b6008546000906001600160a01b03163314612255576040805162461bcd60e51b815260206004808301919091526024820152637775743f60e01b604482015290519081900360640190fd5b600f5460ff6101009091041615156001146122a5576040805162461bcd60e51b81526020600482015260186024820152600080516020613c52833981519152604482015290519081900360640190fd5b600f5460ff16156122f4576040805162461bcd60e51b8152602060048201526014602482015273646f6e7420746f756368206d7920616c7061636160601b604482015290519081900360640190fd5b600154600854604080516340c10f1960e01b81526001600160a01b03928316600482015260248101869052905191909216916340c10f1991604480830192600092919082900301818387803b15801561234c57600080fd5b505af1158015612360573d6000803e3d6000fd5b5050604080514381526020810186905281517ff8ab2e781c83447747c716c9506f15d0ac14638db1e7f2fd4b8a0798ddc988869450908190039091019150a15090565b6002546001600160a01b031633146123ee576040805162461bcd60e51b81526020600482015260096024820152686465763a207775743f60b81b604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031690565b600060055482116124425760075461243b9061196a8486613546565b9050612488565b60055483106124555761243b8284613546565b61243b61246d6005548461354690919063ffffffff16565b61202b60075461196a8760055461354690919063ffffffff16565b92915050565b6002546001600160a01b031633146124d9576040805162461bcd60e51b81526020600482015260096024820152686465763a207775743f60b81b604482015290519081900360640190fd5b600f5460ff161561251b5760405162461bcd60e51b8152600401808060200182810382526029815260200180613cb76029913960400191505060405180910390fd5b600b805460ff1916911515919091179055565b600c6020908152600092835260408084209091529082529020805460019091015482565b600f54600090610100900460ff16156125a0576040805162461bcd60e51b81526020600482015260196024820152600080516020613c32833981519152604482015290519081900360640190fd5b6000600a84815481106125af57fe5b60009182526020808320878452600c825260408085206001600160a01b0389168652909252908320600792909202016003810154600f54919450919290600160ff9091161515141561261c5760105487141561261057506001830154612617565b5060058301545b6126ff565b8354604080516370a0823160e01b815230600482015290516001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561266657600080fd5b505afa15801561267a573d6000803e3d6000fd5b505050506040513d602081101561269057600080fd5b505160068501549091506001600160a01b0316156126ff576006840154604080516370a0823160e01b815230600482015290516001600160a01b03909216916126fb9183916370a0823191602480820192602092909190829003018186803b1580156118ea57600080fd5b9150505b83600201544311801561271157508015155b1561279a57600061272685600201544361241f565b9050600061274d600d546111d7886001015461196a600654876134a490919063ffffffff16565b905060006127666003548361350490919063ffffffff16565b905060006127748383613546565b905061279361278c866111d78464e8d4a510006134a4565b8790613824565b9550505050505b6127c283600101546111dd64e8d4a510006111d78688600001546134a490919063ffffffff16565b979650505050505050565b60075481565b6127db61344e565b6000546001600160a01b0390811691161461282b576040805162461bcd60e51b81526020600482018190526024820152600080516020613ce0833981519152604482015290519081900360640190fd5b6008546001600160a01b031661287f576040805162461bcd60e51b815260206004820152601460248201527336b4b3b930ba329d1037379036b4b3b930ba37b960611b604482015290519081900360640190fd5b600f5460ff16156128ce576040805162461bcd60e51b8152602060048201526014602482015273646f6e7420746f756368206d7920616c7061636160601b604482015290519081900360640190fd5b600f805461ff001916610100179055565b6128e761344e565b6000546001600160a01b03908116911614612937576040805162461bcd60e51b81526020600482018190526024820152600080516020613ce0833981519152604482015290519081900360640190fd5b6008546001600160a01b031661298b576040805162461bcd60e51b815260206004820152601460248201527336b4b3b930ba329d1037379036b4b3b930ba37b960611b604482015290519081900360640190fd5b600f5460ff16156129da576040805162461bcd60e51b8152602060048201526014602482015273646f6e7420746f756368206d7920616c7061636160601b604482015290519081900360640190fd5b600f5460ff610100909104161515600114612a2a576040805162461bcd60e51b81526020600482015260186024820152600080516020613c52833981519152604482015290519081900360640190fd5b600860009054906101000a90046001600160a01b03166001600160a01b031663cfa192516040518163ffffffff1660e01b8152600401602060405180830381600087803b158015612a7a57600080fd5b505af1158015612a8e573d6000803e3d6000fd5b505050506040513d6020811015612aa457600080fd5b5051600980546001600160a01b0319166001600160a01b03909216919091179055565b600f54610100900460ff1681565b6002546001600160a01b031681565b600f54610100900460ff1615612b2f576040805162461bcd60e51b81526020600482015260196024820152600080516020613c32833981519152604482015290519081900360640190fd5b600f5460ff161515600114612b7a576040805162461bcd60e51b815260206004820152600c60248201526b75736520776974686472617760a01b604482015290519081900360640190fd5b601054811415612bc0576040805162461bcd60e51b815260206004820152600c60248201526b75736520776974686472617760a01b604482015290519081900360640190fd5b6000600a8281548110612bcf57fe5b60009182526020808320858452600c825260408085203386529092529220805460079092029092019250612c35576040805162461bcd60e51b81526020600482015260086024820152676c6f6c207775743f60c01b604482015290519081900360640190fd5b612c3e8361173b565b6000612c6c82600101546111dd64e8d4a510006111d7876003015487600001546134a490919063ffffffff16565b90508015612c7e57612c7e3382613588565b6000612ca384600501546111d7856000015487600101546134a490919063ffffffff16565b6001850154909150612cb59082613546565b6001850155600d54612cc79082613546565b600d81905550612d023382600a60105481548110612ce157fe5b60009182526020909120600790910201546001600160a01b03169190613452565b6000600184015582546005850154612d1991613546565b600585015560008084556040805191825251869133917fe5b754fb1abb7f01b499791d0b820ae3b6af3424ac1c59768edb53f4ec31a9299181900360200190a35050505050565b612d6861344e565b6000546001600160a01b03908116911614612db8576040805162461bcd60e51b81526020600482018190526024820152600080516020613ce0833981519152604482015290519081900360640190fd5b600f5460ff610100909104161515600114612e12576040805162461bcd60e51b81526020600482015260156024820152741c185d5cd9481bdc195c985d1a5bdb88199a5c9cdd605a1b604482015290519081900360640190fd5b600a54600d8054600091829055905b82811015610c24576000600a8281548110612e3857fe5b90600052602060002090600702019050600081600201544311612e5c57505061307e565b6000612e6c83600201544361241f565b9050826005015460001415612e895750504360029091015561307e565b612eaa856111d7856001015461196a600654866134a490919063ffffffff16565b91506000612ec36003548461350490919063ffffffff16565b90506000612ed18483613546565b600154600254604080516340c10f1960e01b81526001600160a01b0392831660048201526024810187905290519394509116916340c10f199160448082019260009290919082900301818387803b158015612f2b57600080fd5b505af1158015612f3f573d6000803e3d6000fd5b5050600154604080516340c10f1960e01b81523060048201526024810186905290516001600160a01b0390921693506340c10f19925060448082019260009290919082900301818387803b158015612f9657600080fd5b505af1158015612faa573d6000803e3d6000fd5b5050506005860154612fd59150612fca906111d78464e8d4a510006134a4565b600387015490613824565b600386015560085460048087015460408051635391edbd60e11b815292830191909152516001600160a01b039092169163a723db7a916024808201926020929091908290030181600087803b15801561302d57600080fd5b505af1158015613041573d6000803e3d6000fd5b505050506040513d602081101561305757600080fd5b505160018601819055600d5461306c91613824565b600d5550504360029093019290925550505b600101612e21565b600f54610100900460ff16156130d1576040805162461bcd60e51b81526020600482015260196024820152600080516020613c32833981519152604482015290519081900360640190fd5b600a54821061311f576040805162461bcd60e51b81526020600482015260156024820152746c6561726e20686f7720617272617920776f726b7360581b604482015290519081900360640190fd5b6000600a838154811061312e57fe5b60009182526020808320868452600c8252604080852033865290925292206007909102909101915061315f8461173b565b8054156131a857600061319482600101546111dd64e8d4a510006111d7876003015487600001546134a490919063ffffffff16565b905080156131a6576131a63382613588565b505b82156132505781546131c5906001600160a01b031633308661387e565b80546131d19084613824565b815560068201546001600160a01b0316156132505760068201546040805163534a7e1d60e11b81526004810186905290516001600160a01b0390921691829163a694fc3a91602480830192600092919082900301818387803b15801561323657600080fd5b505af115801561324a573d6000803e3d6000fd5b50505050505b6003820154815461326b9164e8d4a51000916111d7916134a4565b600180830191909155600f5460ff16151514156132a757600d5461328f9084613824565b600d5560018201546132a19084613824565b60018301555b604080518481529051859133917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a159181900360200190a350505050565b6004546001600160a01b031681565b6132fb61344e565b6000546001600160a01b0390811691161461334b576040805162461bcd60e51b81526020600482018190526024820152600080516020613ce0833981519152604482015290519081900360640190fd5b600755565b60035481565b61335e61344e565b6000546001600160a01b039081169116146133ae576040805162461bcd60e51b81526020600482018190526024820152600080516020613ce0833981519152604482015290519081900360640190fd5b6001600160a01b0381166133f35760405162461bcd60e51b8152600401808060200182810382526026815260200180613c0c6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b3390565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610c249084906138d4565b6000826134b357506000612488565b828202828482816134c057fe5b04146134fd5760405162461bcd60e51b8152600401808060200182810382526021815260200180613c966021913960400191505060405180910390fd5b9392505050565b60006134fd83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250613985565b60006134fd83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250613a27565b600154604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b1580156135d357600080fd5b505afa1580156135e7573d6000803e3d6000fd5b505050506040513d60208110156135fd57600080fd5b5051905080821115613691576001546040805163a9059cbb60e01b81526001600160a01b038681166004830152602482018590529151919092169163a9059cbb9160448083019260209291908290030181600087803b15801561365f57600080fd5b505af1158015613673573d6000803e3d6000fd5b505050506040513d602081101561368957600080fd5b50610c249050565b6001546040805163a9059cbb60e01b81526001600160a01b038681166004830152602482018690529151919092169163a9059cbb9160448083019260209291908290030181600087803b1580156136e757600080fd5b505af11580156136fb573d6000803e3d6000fd5b505050506040513d6020811015611eca57600080fd5b801580613797575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b15801561376957600080fd5b505afa15801561377d573d6000803e3d6000fd5b505050506040513d602081101561379357600080fd5b5051155b6137d25760405162461bcd60e51b8152600401808060200182810382526036815260200180613d586036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b179052610c249084906138d4565b6000828201838110156134fd576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052610fb29085905b6060613929826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316613a819092919063ffffffff16565b805190915015610c245780806020019051602081101561394857600080fd5b5051610c245760405162461bcd60e51b815260040180806020018281038252602a815260200180613d2e602a913960400191505060405180910390fd5b60008183613a115760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156139d65781810151838201526020016139be565b50505050905090810190601f168015613a035780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581613a1d57fe5b0495945050505050565b60008184841115613a795760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156139d65781810151838201526020016139be565b505050900390565b6060613a908484600085613a98565b949350505050565b6060613aa385613c05565b613af4576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310613b335780518252601f199092019160209182019101613b14565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114613b95576040519150601f19603f3d011682016040523d82523d6000602084013e613b9a565b606091505b50915091508115613bae579150613a909050565b805115613bbe5780518082602001fd5b60405162461bcd60e51b81526020600482018181528651602484015286518793919283926044019190850190808383600083156139d65781810151838201526020016139be565b3b15159056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737365737461626c697368696e672072616e63682c2072656c61780000000000000070617573652074686520636f6e7472616374206669727374000000000000000075736520726564656d7074696f6e20666f72206c6567616379207769746864726177616c536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f777769746864726177206d75737420626520756e6c6f636b6564206166746572206d6967726174696f6e4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65727769746864726177616c73206e6f7420616c6c6f7765642c206368616e67652076696120676f7665726e616e63655361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e63657769746864726177616c73206e6f7420616c6c6f7765642c20706c73207761697420666f72206d6967726174696f6ea26469706673582212203d4bcb1b230ef573f77ad5c060be17b49732315aaa17c5d79abfe558ed83516864736f6c634300060c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000580b2ebfb318613f89ec7668e79fae45dbdbe4bf000000000000000000000000c00dd48adb5042bcc8ac9ada56699d7369fb28450000000000000000000000000000000000000000000000056bc75e2d631000000000000000000000000000000000000000000000000000000000000000aaedd00000000000000000000000000000000000000000000000000000000000acc2900000000000000000000000000000000000000000000000000000000000000001
-----Decoded View---------------
Arg [0] : _paca (address): 0x580b2EBfb318613F89eC7668e79Fae45DbDBE4bf
Arg [1] : _devaddr (address): 0xc00Dd48adB5042Bcc8AC9aDA56699d7369fB2845
Arg [2] : _pacaPerBlock (uint256): 100000000000000000000
Arg [3] : _startBlock (uint256): 11202000
Arg [4] : _bonusEndBlock (uint256): 11322000
Arg [5] : _withdrawLock (bool): True
-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 000000000000000000000000580b2ebfb318613f89ec7668e79fae45dbdbe4bf
Arg [1] : 000000000000000000000000c00dd48adb5042bcc8ac9ada56699d7369fb2845
Arg [2] : 0000000000000000000000000000000000000000000000056bc75e2d63100000
Arg [3] : 0000000000000000000000000000000000000000000000000000000000aaedd0
Arg [4] : 0000000000000000000000000000000000000000000000000000000000acc290
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000001
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.