Overview
ETH Balance
0 ETH
Eth Value
$0.00Token Holdings
More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 8,106 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw | 20212979 | 14 days ago | IN | 0 ETH | 0.00135582 | ||||
Harvest | 20212975 | 14 days ago | IN | 0 ETH | 0.00116403 | ||||
Withdraw | 19935752 | 53 days ago | IN | 0 ETH | 0.00125785 | ||||
Withdraw | 19905605 | 57 days ago | IN | 0 ETH | 0.00060704 | ||||
Withdraw | 19445993 | 122 days ago | IN | 0 ETH | 0.00580806 | ||||
Withdraw | 19155896 | 162 days ago | IN | 0 ETH | 0.00250216 | ||||
Harvest | 19155891 | 162 days ago | IN | 0 ETH | 0.0021618 | ||||
Withdraw | 19155880 | 162 days ago | IN | 0 ETH | 0.00147635 | ||||
Harvest | 19155872 | 162 days ago | IN | 0 ETH | 0.00131773 | ||||
Withdraw | 19057930 | 176 days ago | IN | 0 ETH | 0.00175521 | ||||
Withdraw | 18935921 | 193 days ago | IN | 0 ETH | 0.00258804 | ||||
Harvest | 18935908 | 193 days ago | IN | 0 ETH | 0.0020567 | ||||
Withdraw | 18894307 | 199 days ago | IN | 0 ETH | 0.00189054 | ||||
Withdraw | 18894296 | 199 days ago | IN | 0 ETH | 0.00266915 | ||||
Withdraw | 18891983 | 199 days ago | IN | 0 ETH | 0.00421196 | ||||
Harvest | 18891957 | 199 days ago | IN | 0 ETH | 0.00285059 | ||||
Harvest | 18891951 | 199 days ago | IN | 0 ETH | 0.00457348 | ||||
Harvest | 18891947 | 199 days ago | IN | 0 ETH | 0.0041095 | ||||
Withdraw | 18778962 | 215 days ago | IN | 0 ETH | 0.00745078 | ||||
Harvest | 18778959 | 215 days ago | IN | 0 ETH | 0.00797119 | ||||
Withdraw | 18552771 | 247 days ago | IN | 0 ETH | 0.00325349 | ||||
Withdraw | 18505793 | 253 days ago | IN | 0 ETH | 0.0043164 | ||||
Withdraw | 18490652 | 256 days ago | IN | 0 ETH | 0.00193931 | ||||
Harvest | 18490008 | 256 days ago | IN | 0 ETH | 0.00141825 | ||||
Withdraw | 18391942 | 269 days ago | IN | 0 ETH | 0.00188179 |
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
16793957 | 494 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Contract Name:
FarmingRange
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 999999 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; // contracts import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; // libraries import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; // interfaces import "@openzeppelin/contracts/interfaces/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol"; import "./interfaces/IFarmingRange.sol"; /** * @title FarmingRange * @notice Farming Range allows users to stake LP Tokens to receive various rewards * @custom:from Contract taken from the alpaca protocol, adapted to version 0.8.17 and modified with more functions * @custom:url https://github.com/alpaca-finance/bsc-alpaca-contract/blob/main/solidity/contracts/6.12/GrazingRange.sol */ contract FarmingRange is IFarmingRange, Ownable, ReentrancyGuard { using SafeERC20 for IERC20; mapping(uint256 => RewardInfo[]) public campaignRewardInfo; CampaignInfo[] public campaignInfo; mapping(uint256 => mapping(address => UserInfo)) public userInfo; uint256 public rewardInfoLimit; address public rewardManager; constructor(address _rewardManager) { rewardInfoLimit = 52; rewardManager = _rewardManager; } /// @inheritdoc IFarmingRange function upgradePrecision() external onlyOwner { uint256 _length = campaignInfo.length; for (uint256 _pid = 0; _pid < _length; ++_pid) { campaignInfo[_pid].accRewardPerShare = campaignInfo[_pid].accRewardPerShare * 1e8; } } /// @inheritdoc IFarmingRange function setRewardManager(address _rewardManager) external onlyOwner { rewardManager = _rewardManager; emit SetRewardManager(_rewardManager); } /// @inheritdoc IFarmingRange function setRewardInfoLimit(uint256 _updatedRewardInfoLimit) external onlyOwner { rewardInfoLimit = _updatedRewardInfoLimit; emit SetRewardInfoLimit(rewardInfoLimit); } /// @inheritdoc IFarmingRange function addCampaignInfo(IERC20 _stakingToken, IERC20 _rewardToken, uint256 _startBlock) external onlyOwner { campaignInfo.push( CampaignInfo({ stakingToken: _stakingToken, rewardToken: _rewardToken, startBlock: _startBlock, lastRewardBlock: _startBlock, accRewardPerShare: 0, totalStaked: 0, totalRewards: 0 }) ); emit AddCampaignInfo(campaignInfo.length - 1, _stakingToken, _rewardToken, _startBlock); } /// @inheritdoc IFarmingRange function addRewardInfo(uint256 _campaignID, uint256 _endBlock, uint256 _rewardPerBlock) public onlyOwner { RewardInfo[] storage rewardInfo = campaignRewardInfo[_campaignID]; CampaignInfo storage campaign = campaignInfo[_campaignID]; require( rewardInfo.length < rewardInfoLimit, "FarmingRange::addRewardInfo::reward info length exceeds the limit" ); require( rewardInfo.length == 0 || rewardInfo[rewardInfo.length - 1].endBlock >= block.number, "FarmingRange::addRewardInfo::reward period ended" ); require( rewardInfo.length == 0 || rewardInfo[rewardInfo.length - 1].endBlock < _endBlock, "FarmingRange::addRewardInfo::bad new endblock" ); uint256 _startBlock = rewardInfo.length == 0 ? campaign.startBlock : rewardInfo[rewardInfo.length - 1].endBlock; uint256 _blockRange = _endBlock - _startBlock; uint256 _totalRewards = _rewardPerBlock * _blockRange; _transferFromWithAllowance(campaign.rewardToken, _totalRewards, _campaignID); campaign.totalRewards = campaign.totalRewards + _totalRewards; rewardInfo.push(RewardInfo({ endBlock: _endBlock, rewardPerBlock: _rewardPerBlock })); emit AddRewardInfo(_campaignID, rewardInfo.length - 1, _endBlock, _rewardPerBlock); } /// @inheritdoc IFarmingRange function addRewardInfoMultiple( uint256 _campaignID, uint256[] calldata _endBlock, uint256[] calldata _rewardPerBlock ) external onlyOwner { require(_endBlock.length == _rewardPerBlock.length, "FarmingRange::addRewardMultiple::wrong parameters length"); for (uint256 _i = 0; _i < _endBlock.length; _i++) { addRewardInfo(_campaignID, _endBlock[_i], _rewardPerBlock[_i]); } } /// @inheritdoc IFarmingRange function updateRewardInfo( uint256 _campaignID, uint256 _rewardIndex, uint256 _endBlock, uint256 _rewardPerBlock ) public onlyOwner { RewardInfo[] storage rewardInfo = campaignRewardInfo[_campaignID]; CampaignInfo storage campaign = campaignInfo[_campaignID]; RewardInfo storage selectedRewardInfo = rewardInfo[_rewardIndex]; uint256 _previousEndBlock = selectedRewardInfo.endBlock; _updateCampaign(_campaignID); require(_previousEndBlock >= block.number, "FarmingRange::updateRewardInfo::reward period ended"); if (_rewardIndex != 0) { require( rewardInfo[_rewardIndex - 1].endBlock < _endBlock, "FarmingRange::updateRewardInfo::bad new endblock" ); } if (rewardInfo.length > _rewardIndex + 1) { require( _endBlock < rewardInfo[_rewardIndex + 1].endBlock, "FarmingRange::updateRewardInfo::reward period end is in next range" ); } (bool _refund, uint256 _diff) = _updateRewardsDiff( _rewardIndex, _endBlock, _rewardPerBlock, rewardInfo, campaign, selectedRewardInfo ); if (!_refund && _diff > 0) { _transferFromWithAllowance(campaign.rewardToken, _diff, _campaignID); } // If _endblock is changed, and if we have another range after the updated one, // we need to update rewardPerBlock to distribute on the next new range or we could run out of tokens if (_endBlock != _previousEndBlock && rewardInfo.length - 1 > _rewardIndex) { RewardInfo storage nextRewardInfo = rewardInfo[_rewardIndex + 1]; uint256 _nextRewardInfoEndBlock = nextRewardInfo.endBlock; uint256 _initialBlockRange = _nextRewardInfoEndBlock - _previousEndBlock; uint256 _nextBlockRange = _nextRewardInfoEndBlock - _endBlock; uint256 _initialNextTotal = _initialBlockRange * nextRewardInfo.rewardPerBlock; nextRewardInfo.rewardPerBlock = (nextRewardInfo.rewardPerBlock * _initialBlockRange) / _nextBlockRange; uint256 _nextTotal = _nextBlockRange * nextRewardInfo.rewardPerBlock; if (_nextTotal < _initialNextTotal) { campaign.rewardToken.safeTransfer(rewardManager, _initialNextTotal - _nextTotal); } } // UPDATE total campaign.totalRewards = _refund ? campaign.totalRewards - _diff : campaign.totalRewards + _diff; selectedRewardInfo.endBlock = _endBlock; selectedRewardInfo.rewardPerBlock = _rewardPerBlock; emit UpdateRewardInfo(_campaignID, _rewardIndex, _endBlock, _rewardPerBlock); } /// @inheritdoc IFarmingRange function updateRewardMultiple( uint256 _campaignID, uint256[] memory _rewardIndex, uint256[] memory _endBlock, uint256[] memory _rewardPerBlock ) public onlyOwner { require( _rewardIndex.length == _endBlock.length && _rewardIndex.length == _rewardPerBlock.length, "FarmingRange::updateRewardMultiple::wrong parameters length" ); for (uint256 _i = 0; _i < _rewardIndex.length; _i++) { updateRewardInfo(_campaignID, _rewardIndex[_i], _endBlock[_i], _rewardPerBlock[_i]); } } /// @inheritdoc IFarmingRange function updateCampaignsRewards( uint256[] calldata _campaignID, uint256[][] calldata _rewardIndex, uint256[][] calldata _endBlock, uint256[][] calldata _rewardPerBlock ) external onlyOwner { require( _campaignID.length == _rewardIndex.length && _rewardIndex.length == _endBlock.length && _rewardIndex.length == _rewardPerBlock.length, "FarmingRange::updateCampaignsRewards::wrong rewardInfo length" ); for (uint256 _i = 0; _i < _campaignID.length; _i++) { updateRewardMultiple(_campaignID[_i], _rewardIndex[_i], _endBlock[_i], _rewardPerBlock[_i]); } } /// @inheritdoc IFarmingRange function removeLastRewardInfo(uint256 _campaignID) external onlyOwner { RewardInfo[] storage rewardInfo = campaignRewardInfo[_campaignID]; CampaignInfo storage campaign = campaignInfo[_campaignID]; uint256 _rewardInfoLength = rewardInfo.length; require(_rewardInfoLength > 0, "FarmingRange::updateCampaignsRewards::no rewardInfoLen"); RewardInfo storage lastRewardInfo = rewardInfo[_rewardInfoLength - 1]; uint256 _lastRewardInfoEndBlock = lastRewardInfo.endBlock; require(_lastRewardInfoEndBlock > block.number, "FarmingRange::removeLastRewardInfo::reward period ended"); _updateCampaign(_campaignID); if (lastRewardInfo.rewardPerBlock != 0) { (bool _refund, uint256 _diff) = _updateRewardsDiff( _rewardInfoLength - 1, block.number > _lastRewardInfoEndBlock ? block.number : _lastRewardInfoEndBlock, 0, rewardInfo, campaign, lastRewardInfo ); if (_refund) { campaign.totalRewards = campaign.totalRewards - _diff; } } rewardInfo.pop(); emit RemoveRewardInfo(_campaignID, _rewardInfoLength - 1); } /// @inheritdoc IFarmingRange function rewardInfoLen(uint256 _campaignID) external view returns (uint256) { return campaignRewardInfo[_campaignID].length; } /// @inheritdoc IFarmingRange function campaignInfoLen() external view returns (uint256) { return campaignInfo.length; } /// @inheritdoc IFarmingRange function currentEndBlock(uint256 _campaignID) external view returns (uint256) { return _endBlockOf(_campaignID, block.number); } /// @inheritdoc IFarmingRange function currentRewardPerBlock(uint256 _campaignID) external view returns (uint256) { return _rewardPerBlockOf(_campaignID, block.number); } /// @inheritdoc IFarmingRange function getMultiplier(uint256 _from, uint256 _to, uint256 _endBlock) public pure returns (uint256) { if ((_from >= _endBlock) || (_from > _to)) { return 0; } if (_to <= _endBlock) { return _to - _from; } return _endBlock - _from; } /// @inheritdoc IFarmingRange function pendingReward(uint256 _campaignID, address _user) external view returns (uint256) { return _pendingReward(_campaignID, userInfo[_campaignID][_user].amount, userInfo[_campaignID][_user].rewardDebt); } /// @inheritdoc IFarmingRange function updateCampaign(uint256 _campaignID) external nonReentrant { _updateCampaign(_campaignID); } /// @inheritdoc IFarmingRange function massUpdateCampaigns() external nonReentrant { uint256 _length = campaignInfo.length; for (uint256 _pid = 0; _pid < _length; ++_pid) { _updateCampaign(_pid); } } /// @inheritdoc IFarmingRange function deposit(uint256 _campaignID, uint256 _amount) public nonReentrant { CampaignInfo storage campaign = campaignInfo[_campaignID]; UserInfo storage user = userInfo[_campaignID][msg.sender]; _updateCampaign(_campaignID); if (user.amount > 0) { uint256 _pending = (user.amount * campaign.accRewardPerShare) / 1e20 - user.rewardDebt; if (_pending > 0) { campaign.rewardToken.safeTransfer(address(msg.sender), _pending); } } if (_amount > 0) { campaign.stakingToken.safeTransferFrom(msg.sender, address(this), _amount); user.amount = user.amount + _amount; campaign.totalStaked = campaign.totalStaked + _amount; } user.rewardDebt = (user.amount * campaign.accRewardPerShare) / (1e20); emit Deposit(msg.sender, _amount, _campaignID); } /// @inheritdoc IFarmingRange function depositWithPermit( uint256 _campaignID, uint256 _amount, bool _approveMax, uint256 _deadline, uint8 _v, bytes32 _r, bytes32 _s ) external { SafeERC20.safePermit( IERC20Permit(address(campaignInfo[_campaignID].stakingToken)), msg.sender, address(this), _approveMax ? type(uint256).max : _amount, _deadline, _v, _r, _s ); deposit(_campaignID, _amount); } /// @inheritdoc IFarmingRange function withdraw(uint256 _campaignID, uint256 _amount) external nonReentrant { _withdraw(_campaignID, _amount); } /// @inheritdoc IFarmingRange function harvest(uint256[] calldata _campaignIDs) external nonReentrant { for (uint256 _i = 0; _i < _campaignIDs.length; ++_i) { _withdraw(_campaignIDs[_i], 0); } } /// @inheritdoc IFarmingRange function emergencyWithdraw(uint256 _campaignID) external nonReentrant { CampaignInfo storage campaign = campaignInfo[_campaignID]; UserInfo storage user = userInfo[_campaignID][msg.sender]; uint256 _amount = user.amount; campaign.totalStaked = campaign.totalStaked - _amount; user.amount = 0; user.rewardDebt = 0; campaign.stakingToken.safeTransfer(msg.sender, _amount); emit EmergencyWithdraw(msg.sender, _amount, _campaignID); } /** * @notice return the endblock of the phase that contains _blockNumber * @param _campaignID the campaign id of the phases to check * @param _blockNumber the block number to check * @return the endblock of the phase that contains _blockNumber */ function _endBlockOf(uint256 _campaignID, uint256 _blockNumber) internal view returns (uint256) { RewardInfo[] memory rewardInfo = campaignRewardInfo[_campaignID]; uint256 _len = rewardInfo.length; if (_len == 0) { return 0; } for (uint256 _i = 0; _i < _len; ++_i) { if (_blockNumber <= rewardInfo[_i].endBlock) return rewardInfo[_i].endBlock; } /// @dev when couldn't find any reward info, it means that _blockNumber exceed endblock /// so return the latest reward info. return rewardInfo[_len - 1].endBlock; } /** * @notice return the rewardPerBlock of the phase that contains _blockNumber * @param _campaignID the campaign id of the phases to check * @param _blockNumber the block number to check * @return the rewardPerBlock of the phase that contains _blockNumber */ function _rewardPerBlockOf(uint256 _campaignID, uint256 _blockNumber) internal view returns (uint256) { RewardInfo[] memory rewardInfo = campaignRewardInfo[_campaignID]; uint256 _len = rewardInfo.length; if (_len == 0) { return 0; } for (uint256 _i = 0; _i < _len; ++_i) { if (_blockNumber <= rewardInfo[_i].endBlock) return rewardInfo[_i].rewardPerBlock; } /// @dev when couldn't find any reward info, it means that timestamp exceed endblock /// so return 0 return 0; } /** * @notice in case of reward update, return reward diff and refund user if needed * @param _rewardIndex the number of the phase to update * @param _endBlock new endblock of the phase * @param _rewardPerBlock new rewardPerBlock of the phase * @param rewardInfo pointer on the array of rewardInfo in storage * @param campaign pointer on the campaign in storage * @param selectedRewardInfo pointer on the selectedRewardInfo in storage * @return refund_ boolean, true if user got refund * @return diff_ the reward difference */ function _updateRewardsDiff( uint256 _rewardIndex, uint256 _endBlock, uint256 _rewardPerBlock, RewardInfo[] storage rewardInfo, CampaignInfo storage campaign, RewardInfo storage selectedRewardInfo ) internal returns (bool refund_, uint256 diff_) { uint256 _previousStartBlock = _rewardIndex == 0 ? campaign.startBlock : rewardInfo[_rewardIndex - 1].endBlock; uint256 _newStartBlock = block.number > _previousStartBlock ? block.number : _previousStartBlock; uint256 _previousBlockRange = selectedRewardInfo.endBlock - _previousStartBlock; uint256 _newBlockRange = _endBlock - _newStartBlock; uint256 _selectedRewardPerBlock = selectedRewardInfo.rewardPerBlock; uint256 _accumulatedRewards = (_newStartBlock - _previousStartBlock) * _selectedRewardPerBlock; uint256 _previousTotalRewards = _selectedRewardPerBlock * _previousBlockRange; uint256 _totalRewards = _rewardPerBlock * _newBlockRange; refund_ = _previousTotalRewards > _totalRewards + _accumulatedRewards; diff_ = refund_ ? _previousTotalRewards - _totalRewards - _accumulatedRewards : _totalRewards + _accumulatedRewards - _previousTotalRewards; if (refund_) { campaign.rewardToken.safeTransfer(rewardManager, diff_); } } /** * @notice transfer tokens from rewardManger to this contract. * @param _rewardToken to reward token to be transfered from the rewwardmanager to this contract * @param _amount qty to be transfered * @param _campaignID id of the campaign so the rewardManager can fetch the rewardToken address to transfer * * @dev in case of fail, not enough allowance is considered to be the reason, so we call resetAllowance(uint256) on * the reward manager (which will reset allowance to uint256.max) and we try again to transfer */ function _transferFromWithAllowance(IERC20 _rewardToken, uint256 _amount, uint256 _campaignID) internal { try _rewardToken.transferFrom(rewardManager, address(this), _amount) {} catch { rewardManager.call(abi.encodeWithSignature("resetAllowance(uint256)", _campaignID)); _rewardToken.safeTransferFrom(rewardManager, address(this), _amount); } } /** * @notice View function to retrieve pending Reward. * @param _campaignID pending reward of campaign id * @param _amount qty of staked token * @param _rewardDebt user info rewardDebt * @return pending rewards */ function _pendingReward(uint256 _campaignID, uint256 _amount, uint256 _rewardDebt) internal view returns (uint256) { CampaignInfo memory _campaign = campaignInfo[_campaignID]; RewardInfo[] memory _rewardInfo = campaignRewardInfo[_campaignID]; uint256 _accRewardPerShare = _campaign.accRewardPerShare; if (block.number > _campaign.lastRewardBlock && _campaign.totalStaked != 0) { uint256 _cursor = _campaign.lastRewardBlock; for (uint256 _i = 0; _i < _rewardInfo.length; ++_i) { uint256 _multiplier = getMultiplier(_cursor, block.number, _rewardInfo[_i].endBlock); if (_multiplier == 0) continue; _cursor = _rewardInfo[_i].endBlock; _accRewardPerShare = _accRewardPerShare + ((_multiplier * _rewardInfo[_i].rewardPerBlock * 1e20) / _campaign.totalStaked); } } return ((_amount * _accRewardPerShare) / 1e20) - _rewardDebt; } /** * @notice Update reward variables of the given campaign to be up-to-date. * @param _campaignID campaign id */ function _updateCampaign(uint256 _campaignID) internal { CampaignInfo storage campaign = campaignInfo[_campaignID]; RewardInfo[] memory _rewardInfo = campaignRewardInfo[_campaignID]; if (block.number <= campaign.lastRewardBlock) { return; } if (campaign.totalStaked == 0) { // if there is no total supply, return and use the campaign's start block as the last reward block // so that ALL reward will be distributed. // however, if the first deposit is out of reward period, last reward block will be its block number // in order to keep the multiplier = 0 if (block.number > _endBlockOf(_campaignID, block.number)) { campaign.lastRewardBlock = block.number; } return; } /// @dev for each reward info for (uint256 _i = 0; _i < _rewardInfo.length; ++_i) { // @dev get multiplier based on current Block and rewardInfo's end block // multiplier will be a range of either (current block - campaign.lastRewardBlock) // or (reward info's endblock - campaign.lastRewardBlock) or 0 uint256 _multiplier = getMultiplier(campaign.lastRewardBlock, block.number, _rewardInfo[_i].endBlock); if (_multiplier == 0) continue; // @dev if currentBlock exceed end block, use end block as the last reward block // so that for the next iteration, previous endBlock will be used as the last reward block if (block.number > _rewardInfo[_i].endBlock) { campaign.lastRewardBlock = _rewardInfo[_i].endBlock; } else { campaign.lastRewardBlock = block.number; } campaign.accRewardPerShare = campaign.accRewardPerShare + ((_multiplier * _rewardInfo[_i].rewardPerBlock * 1e20) / campaign.totalStaked); } } /** * @notice Withdraw staking token in a campaign. Also withdraw the current pending reward * @param _campaignID campaign id * @param _amount amount to withdraw */ function _withdraw(uint256 _campaignID, uint256 _amount) internal { CampaignInfo storage campaign = campaignInfo[_campaignID]; UserInfo storage user = userInfo[_campaignID][msg.sender]; require(user.amount >= _amount, "FarmingRange::withdraw::bad withdraw amount"); _updateCampaign(_campaignID); uint256 _pending = (user.amount * campaign.accRewardPerShare) / 1e20 - user.rewardDebt; if (_pending > 0) { campaign.rewardToken.safeTransfer(msg.sender, _pending); } if (_amount > 0) { user.amount = user.amount - _amount; campaign.stakingToken.safeTransfer(msg.sender, _amount); campaign.totalStaked = campaign.totalStaked - _amount; } user.rewardDebt = (user.amount * campaign.accRewardPerShare) / 1e20; emit Withdraw(msg.sender, _amount, _campaignID); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol) pragma solidity ^0.8.0; import "../token/ERC20/IERC20.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; // interfaces import "@openzeppelin/contracts/interfaces/IERC20.sol"; interface IFarmingRange { /** * @notice Info of each user. * @param amount How many Staking tokens the user has provided. * @param rewardDebt We do some fancy math here. Basically, any point in time, the amount of reward * entitled to a user but is pending to be distributed is: * * pending reward = (user.amount * pool.accRewardPerShare) - user.rewardDebt * * Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens: * 1. The pool's `accRewardPerShare` (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. * * from: https://github.com/jazz-defi/contracts/blob/master/MasterChefV2.sol */ struct UserInfo { uint256 amount; uint256 rewardDebt; } /** * @notice Info of each reward distribution campaign. * @param stakingToken address of Staking token contract. * @param rewardToken address of Reward token contract * @param startBlock start block of the campaign * @param lastRewardBlock last block number that Reward Token distribution occurs. * @param accRewardPerShare accumulated Reward Token per share, times 1e20. * @param totalStaked total staked amount each campaign's stake token, typically, * @param totalRewards total amount of reward to be distributed until the end of the last phase * * @dev each campaign has the same stake token, so no need to track it separetely */ struct CampaignInfo { IERC20 stakingToken; IERC20 rewardToken; uint256 startBlock; uint256 lastRewardBlock; uint256 accRewardPerShare; uint256 totalStaked; uint256 totalRewards; } /** * @notice Info about a reward-phase * @param endBlock block number of the end of the phase * @param rewardPerBlock amount of reward to be distributed per block in this phase */ struct RewardInfo { uint256 endBlock; uint256 rewardPerBlock; } /** * @notice emitted at each deposit * @param user address that deposit its funds * @param amount amount deposited * @param campaign campaingId on which the user has deposited funds */ event Deposit(address indexed user, uint256 amount, uint256 campaign); /** * @notice emitted at each withdraw * @param user address that withdrawn its funds * @param amount amount withdrawn * @param campaign campaingId on which the user has withdrawn funds */ event Withdraw(address indexed user, uint256 amount, uint256 campaign); /** * @notice emitted at each emergency withdraw * @param user address that emergency-withdrawn its funds * @param amount amount emergency-withdrawn * @param campaign campaingId on which the user has emergency-withdrawn funds */ event EmergencyWithdraw(address indexed user, uint256 amount, uint256 campaign); /** * @notice emitted at each campaign added * @param campaignID new campaign id * @param stakingToken token address to be staked in this campaign * @param rewardToken token address of the rewards in this campaign * @param startBlock starting block of this campaign */ event AddCampaignInfo(uint256 indexed campaignID, IERC20 stakingToken, IERC20 rewardToken, uint256 startBlock); /** * @notice emitted at each phase of reward added * @param campaignID campaign id on which rewards were added * @param phase number of the new phase added (latest at the moment of add) * @param endBlock number of the block that the phase stops (phase starts at the endblock of the previous phase's * endblock, and if it's the phase 0, it start at the startBlock of the campaign struct) * @param rewardPerBlock amount of reward distributed per block in this phase */ event AddRewardInfo(uint256 indexed campaignID, uint256 indexed phase, uint256 endBlock, uint256 rewardPerBlock); /** * @notice emitted when a reward phase is updated * @param campaignID campaign id on which the rewards-phase is updated * @param phase id of phase updated * @param endBlock new endblock of the phase * @param rewardPerBlock new rewardPerBlock of the phase */ event UpdateRewardInfo(uint256 indexed campaignID, uint256 indexed phase, uint256 endBlock, uint256 rewardPerBlock); /** * @notice emitted when a reward phase is removed * @param campaignID campaign id on which the rewards-phase is removed * @param phase id of phase removed (only the latest phase can be removed) */ event RemoveRewardInfo(uint256 indexed campaignID, uint256 indexed phase); /** * @notice emitted when the rewardInfoLimit is updated * @param rewardInfoLimit new max phase amount per campaign */ event SetRewardInfoLimit(uint256 rewardInfoLimit); /** * @notice emitted when the rewardManager is changed * @param rewardManager address of the new rewardManager */ event SetRewardManager(address rewardManager); /** * @notice increase precision of accRewardPerShare in all campaign */ function upgradePrecision() external; /** * @notice set the reward manager, responsible for adding rewards * @param _rewardManager address of the reward manager */ function setRewardManager(address _rewardManager) external; /** * @notice set new reward info limit, defining how many phases are allowed * @param _updatedRewardInfoLimit new reward info limit */ function setRewardInfoLimit(uint256 _updatedRewardInfoLimit) external; /** * @notice reward campaign, one campaign represent a pair of staking and reward token, * last reward Block and acc reward Per Share * @param _stakingToken staking token address * @param _rewardToken reward token address * @param _startBlock block number when the campaign will start */ function addCampaignInfo(IERC20 _stakingToken, IERC20 _rewardToken, uint256 _startBlock) external; /** * @notice add a nex reward info, when a new reward info is added, the reward * & its end block will be extended by the newly pushed reward info. * @param _campaignID id of the campaign * @param _endBlock end block of this reward info * @param _rewardPerBlock reward per block to distribute until the end */ function addRewardInfo(uint256 _campaignID, uint256 _endBlock, uint256 _rewardPerBlock) external; /** * @notice add multiple reward Info into a campaign in one tx. * @param _campaignID id of the campaign * @param _endBlock array of end blocks * @param _rewardPerBlock array of reward per block */ function addRewardInfoMultiple( uint256 _campaignID, uint256[] calldata _endBlock, uint256[] calldata _rewardPerBlock ) external; /** * @notice update one campaign reward info for a specified range index. * @param _campaignID id of the campaign * @param _rewardIndex index of the reward info * @param _endBlock end block of this reward info * @param _rewardPerBlock reward per block to distribute until the end */ function updateRewardInfo( uint256 _campaignID, uint256 _rewardIndex, uint256 _endBlock, uint256 _rewardPerBlock ) external; /** * @notice update multiple campaign rewards info for all range index. * @param _campaignID id of the campaign * @param _rewardIndex array of reward info index * @param _endBlock array of end block * @param _rewardPerBlock array of rewardPerBlock */ function updateRewardMultiple( uint256 _campaignID, uint256[] memory _rewardIndex, uint256[] memory _endBlock, uint256[] memory _rewardPerBlock ) external; /** * @notice update multiple campaigns and rewards info for all range index. * @param _campaignID array of campaign id * @param _rewardIndex multi dimensional array of reward info index * @param _endBlock multi dimensional array of end block * @param _rewardPerBlock multi dimensional array of rewardPerBlock */ function updateCampaignsRewards( uint256[] calldata _campaignID, uint256[][] calldata _rewardIndex, uint256[][] calldata _endBlock, uint256[][] calldata _rewardPerBlock ) external; /** * @notice remove last reward info for specified campaign. * @param _campaignID campaign id */ function removeLastRewardInfo(uint256 _campaignID) external; /** * @notice return the entries amount of reward info for one campaign. * @param _campaignID campaign id * @return reward info quantity */ function rewardInfoLen(uint256 _campaignID) external view returns (uint256); /** * @notice return the number of campaigns. * @return campaign quantity */ function campaignInfoLen() external view returns (uint256); /** * @notice return the end block of the current reward info for a given campaign. * @param _campaignID campaign id * @return reward info end block number */ function currentEndBlock(uint256 _campaignID) external view returns (uint256); /** * @notice return the reward per block of the current reward info for a given campaign. * @param _campaignID campaign id * @return current reward per block */ function currentRewardPerBlock(uint256 _campaignID) external view returns (uint256); /** * @notice Return reward multiplier over the given _from to _to block. * Reward multiplier is the amount of blocks between from and to * @param _from start block number * @param _to end block number * @param _endBlock end block number of the reward info * @return block distance */ function getMultiplier(uint256 _from, uint256 _to, uint256 _endBlock) external returns (uint256); /** * @notice View function to retrieve pending Reward. * @param _campaignID pending reward of campaign id * @param _user address to retrieve pending reward * @return current pending reward */ function pendingReward(uint256 _campaignID, address _user) external view returns (uint256); /** * @notice Update reward variables of the given campaign to be up-to-date. * @param _campaignID campaign id */ function updateCampaign(uint256 _campaignID) external; /** * @notice Update reward variables for all campaigns. gas spending is HIGH in this method call, BE CAREFUL. */ function massUpdateCampaigns() external; /** * @notice Deposit staking token in a campaign. * @param _campaignID campaign id * @param _amount amount to deposit */ function deposit(uint256 _campaignID, uint256 _amount) external; /** * @notice Deposit staking token in a campaign with the EIP-2612 signature off chain * @param _campaignID campaign id * @param _amount amount to deposit * @param _approveMax Whether or not the approval amount in the signature is for liquidity or uint(-1). * @param _deadline Unix timestamp after which the transaction will revert. * @param _v The v component of the permit signature. * @param _r The r component of the permit signature. * @param _s The s component of the permit signature. */ function depositWithPermit( uint256 _campaignID, uint256 _amount, bool _approveMax, uint256 _deadline, uint8 _v, bytes32 _r, bytes32 _s ) external; /** * @notice Withdraw staking token in a campaign. Also withdraw the current pending reward * @param _campaignID campaign id * @param _amount amount to withdraw */ function withdraw(uint256 _campaignID, uint256 _amount) external; /** * @notice Harvest campaigns, will claim rewards token of every campaign ids in the array * @param _campaignIDs array of campaign id */ function harvest(uint256[] calldata _campaignIDs) external; /** * @notice Withdraw without caring about rewards. EMERGENCY ONLY. * @param _campaignID campaign id */ function emergencyWithdraw(uint256 _campaignID) external; /** * @notice get Reward info for a campaign ID and index, that is a set of {endBlock, rewardPerBlock} * indexed by campaign ID * @param _campaignID campaign id * @param _rewardIndex index of the reward info * @return endBlock_ end block of this reward info * @return rewardPerBlock_ reward per block to distribute */ function campaignRewardInfo( uint256 _campaignID, uint256 _rewardIndex ) external view returns (uint256 endBlock_, uint256 rewardPerBlock_); /** * @notice get a Campaign Reward info for a campaign ID * @param _campaignID campaign id * @return all params from CampaignInfo struct */ function campaignInfo( uint256 _campaignID ) external view returns (IERC20, IERC20, uint256, uint256, uint256, uint256, uint256); /** * @notice get a User Reward info for a campaign ID and user address * @param _campaignID campaign id * @param _user user address * @return all params from UserInfo struct */ function userInfo(uint256 _campaignID, address _user) external view returns (uint256, uint256); /** * @notice how many reward phases can be set for a campaign * @return rewards phases size limit */ function rewardInfoLimit() external view returns (uint256); /** * @notice get reward Manager address holding rewards to distribute * @return address of reward manager */ function rewardManager() external view returns (address); }
{ "metadata": { "bytecodeHash": "none", "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 999999 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_rewardManager","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"campaignID","type":"uint256"},{"indexed":false,"internalType":"contract IERC20","name":"stakingToken","type":"address"},{"indexed":false,"internalType":"contract IERC20","name":"rewardToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"startBlock","type":"uint256"}],"name":"AddCampaignInfo","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"campaignID","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"phase","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endBlock","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rewardPerBlock","type":"uint256"}],"name":"AddRewardInfo","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"campaign","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"campaign","type":"uint256"}],"name":"EmergencyWithdraw","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":true,"internalType":"uint256","name":"campaignID","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"phase","type":"uint256"}],"name":"RemoveRewardInfo","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"rewardInfoLimit","type":"uint256"}],"name":"SetRewardInfoLimit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"rewardManager","type":"address"}],"name":"SetRewardManager","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"campaignID","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"phase","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endBlock","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rewardPerBlock","type":"uint256"}],"name":"UpdateRewardInfo","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"campaign","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[{"internalType":"contract IERC20","name":"_stakingToken","type":"address"},{"internalType":"contract IERC20","name":"_rewardToken","type":"address"},{"internalType":"uint256","name":"_startBlock","type":"uint256"}],"name":"addCampaignInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_campaignID","type":"uint256"},{"internalType":"uint256","name":"_endBlock","type":"uint256"},{"internalType":"uint256","name":"_rewardPerBlock","type":"uint256"}],"name":"addRewardInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_campaignID","type":"uint256"},{"internalType":"uint256[]","name":"_endBlock","type":"uint256[]"},{"internalType":"uint256[]","name":"_rewardPerBlock","type":"uint256[]"}],"name":"addRewardInfoMultiple","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"campaignInfo","outputs":[{"internalType":"contract IERC20","name":"stakingToken","type":"address"},{"internalType":"contract IERC20","name":"rewardToken","type":"address"},{"internalType":"uint256","name":"startBlock","type":"uint256"},{"internalType":"uint256","name":"lastRewardBlock","type":"uint256"},{"internalType":"uint256","name":"accRewardPerShare","type":"uint256"},{"internalType":"uint256","name":"totalStaked","type":"uint256"},{"internalType":"uint256","name":"totalRewards","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"campaignInfoLen","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"campaignRewardInfo","outputs":[{"internalType":"uint256","name":"endBlock","type":"uint256"},{"internalType":"uint256","name":"rewardPerBlock","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_campaignID","type":"uint256"}],"name":"currentEndBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_campaignID","type":"uint256"}],"name":"currentRewardPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_campaignID","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_campaignID","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bool","name":"_approveMax","type":"bool"},{"internalType":"uint256","name":"_deadline","type":"uint256"},{"internalType":"uint8","name":"_v","type":"uint8"},{"internalType":"bytes32","name":"_r","type":"bytes32"},{"internalType":"bytes32","name":"_s","type":"bytes32"}],"name":"depositWithPermit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_campaignID","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_from","type":"uint256"},{"internalType":"uint256","name":"_to","type":"uint256"},{"internalType":"uint256","name":"_endBlock","type":"uint256"}],"name":"getMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_campaignIDs","type":"uint256[]"}],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"massUpdateCampaigns","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_campaignID","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_campaignID","type":"uint256"}],"name":"removeLastRewardInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_campaignID","type":"uint256"}],"name":"rewardInfoLen","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardInfoLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardManager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_updatedRewardInfoLimit","type":"uint256"}],"name":"setRewardInfoLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardManager","type":"address"}],"name":"setRewardManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_campaignID","type":"uint256"}],"name":"updateCampaign","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_campaignID","type":"uint256[]"},{"internalType":"uint256[][]","name":"_rewardIndex","type":"uint256[][]"},{"internalType":"uint256[][]","name":"_endBlock","type":"uint256[][]"},{"internalType":"uint256[][]","name":"_rewardPerBlock","type":"uint256[][]"}],"name":"updateCampaignsRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_campaignID","type":"uint256"},{"internalType":"uint256","name":"_rewardIndex","type":"uint256"},{"internalType":"uint256","name":"_endBlock","type":"uint256"},{"internalType":"uint256","name":"_rewardPerBlock","type":"uint256"}],"name":"updateRewardInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_campaignID","type":"uint256"},{"internalType":"uint256[]","name":"_rewardIndex","type":"uint256[]"},{"internalType":"uint256[]","name":"_endBlock","type":"uint256[]"},{"internalType":"uint256[]","name":"_rewardPerBlock","type":"uint256[]"}],"name":"updateRewardMultiple","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"upgradePrecision","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":"_campaignID","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b506040516200381f3803806200381f8339810160408190526200003491620000be565b6200003f336200006e565b600180556034600555600680546001600160a01b0319166001600160a01b0392909216919091179055620000f0565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060208284031215620000d157600080fd5b81516001600160a01b0381168114620000e957600080fd5b9392505050565b61371f80620001006000396000f3fe608060405234801561001057600080fd5b50600436106101e45760003560e01c80635d14b06f1161010f5780639a63bc16116100a2578063e2bbb15811610071578063e2bbb1581461049f578063eebdced5146104b2578063f2fde38b146104ba578063fa8f5f19146104cd57600080fd5b80639a63bc1614610406578063bb2238ec14610419578063cdc8c93014610479578063cef7042d1461048c57600080fd5b80638d48aff0116100de5780638d48aff0146103905780638da5cb5b146103a357806393f1a40b146103c157806398969e82146103f357600080fd5b80635d14b06f1461034f578063715018a6146103625780637bafb0291461036a57806380637e891461037d57600080fd5b80633bbda19b11610187578063441a3e7011610156578063441a3e70146103015780634ad7ce80146103145780634ae56bae1461031c5780635312ea8e1461033c57600080fd5b80633bbda19b146102c0578063409e00fc146102d357806341ef1563146102e657806342ee0aba146102ee57600080fd5b8063153ee554116101c3578063153ee554146102725780632ea807c51461028757806330d78fda1461029a57806333824b87146102ad57600080fd5b8062d74850146101e95780630f4ef8a61461020557806310f7a6af1461024a575b600080fd5b6101f260055481565b6040519081526020015b60405180910390f35b6006546102259073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101fc565b61025d610258366004612fa6565b6104e0565b604080519283526020830191909152016101fc565b610285610280366004612fea565b61051c565b005b610285610295366004613007565b61059e565b6102856102a8366004613041565b610960565b6102856102bb3660046130af565b6109e8565b6102856102ce366004613114565b610a25565b6102856102e136600461318e565b610b1c565b610285610d39565b6102856102fc3660046132ac565b610dbe565b61028561030f366004612fa6565b610ee0565b6003546101f2565b6101f261032a3660046130af565b60009081526002602052604090205490565b61028561034a3660046130af565b610efb565b61028561035d36600461333e565b610fd0565b610285611020565b6101f2610378366004613007565b611034565b61028561038b3660046130af565b61107d565b6101f261039e3660046130af565b6112fb565b60005473ffffffffffffffffffffffffffffffffffffffff16610225565b61025d6103cf366004613380565b60046020908152600092835260408084209091529082529020805460019091015482565b6101f2610401366004613380565b61130d565b6101f26104143660046130af565b61134f565b61042c6104273660046130af565b61135b565b6040805173ffffffffffffffffffffffffffffffffffffffff9889168152979096166020880152948601939093526060850191909152608084015260a083015260c082015260e0016101fc565b6102856104873660046133b0565b6113c4565b61028561049a3660046130af565b611856565b6102856104ad366004612fa6565b611870565b6102856119ed565b6102856104c8366004612fea565b611a27565b6102856104db3660046133e2565b611adb565b600260205281600052604060002081815481106104fc57600080fd5b600091825260209091206002909102018054600190910154909250905082565b610524611cd7565b600680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527fc05fa79926cd5600b1cc95c8d9d908b7685d3f058c34ea011f8ae3490968ad30906020015b60405180910390a150565b6105a6611cd7565b600083815260026020526040812060038054919291869081106105cb576105cb6134a6565b9060005260206000209060070201905060055482805490501061069b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f4661726d696e6752616e67653a3a616464526577617264496e666f3a3a72657760448201527f61726420696e666f206c656e677468206578636565647320746865206c696d6960648201527f7400000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b815415806106db57508154439083906106b690600190613504565b815481106106c6576106c66134a6565b90600052602060002090600202016000015410155b610767576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f4661726d696e6752616e67653a3a616464526577617264496e666f3a3a72657760448201527f61726420706572696f6420656e646564000000000000000000000000000000006064820152608401610692565b815415806107a6575081548490839061078290600190613504565b81548110610792576107926134a6565b906000526020600020906002020160000154105b610832576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f4661726d696e6752616e67653a3a616464526577617264496e666f3a3a62616460448201527f206e657720656e64626c6f636b000000000000000000000000000000000000006064820152608401610692565b815460009015610873578254839061084c90600190613504565b8154811061085c5761085c6134a6565b906000526020600020906002020160000154610879565b81600201545b905060006108878287613504565b905060006108958287613517565b60018501549091506108be9073ffffffffffffffffffffffffffffffffffffffff16828a611d58565b8084600601546108ce919061352e565b6006850155604080518082019091528781526020808201888152875460018181018a5560008a815293909320935160029091029093019283555191810191909155855461091b9190613504565b60408051898152602081018990528a917fad90731bd0d97445f5af66088f3adebf343c520c20e033cc42f93b124258cdc2910160405180910390a35050505050505050565b6109d560038881548110610976576109766134a6565b600091825260209091206007909102015473ffffffffffffffffffffffffffffffffffffffff163330886109aa57896109cc565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff5b88888888611f37565b6109df8787611870565b50505050505050565b6109f0611cd7565b60058190556040518181527fb64f58843e750a8bea7135ef396cf0a7790bfc9a8f43f11ac0e0aacc1b5787ba90602001610593565b610a2d611cd7565b828114610abc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603860248201527f4661726d696e6752616e67653a3a6164645265776172644d756c7469706c653a60448201527f3a77726f6e6720706172616d6574657273206c656e67746800000000000000006064820152608401610692565b60005b83811015610b1457610b0286868684818110610add57610add6134a6565b90506020020135858585818110610af657610af66134a6565b9050602002013561059e565b80610b0c81613541565b915050610abf565b505050505050565b610b24611cd7565b6040805160e08101825273ffffffffffffffffffffffffffffffffffffffff8086168252848116602083019081529282018481526060830185815260006080850181815260a0860182815260c08701838152600380546001818101835595829052985160079099027fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b810180549a8a167fffffffffffffffffffffffff00000000000000000000000000000000000000009b8c1617905599517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c8b0180549190991699169890981790965593517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85d88015591517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85e87015590517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85f86015590517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f86085015590517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f8619093019290925554610cdc9190613504565b6040805173ffffffffffffffffffffffffffffffffffffffff8087168252851660208201529081018390527f9b2f18f9a188a5aec4a95ee3164fe234dfbb6117628b2ad1a581939e61c69f4e9060600160405180910390a2505050565b610d41611cd7565b60035460005b81811015610dba5760038181548110610d6257610d626134a6565b9060005260206000209060070201600401546305f5e100610d839190613517565b60038281548110610d9657610d966134a6565b6000918252602090912060046007909202010155610db381613541565b9050610d47565b5050565b610dc6611cd7565b81518351148015610dd8575080518351145b610e64576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603b60248201527f4661726d696e6752616e67653a3a7570646174655265776172644d756c74697060448201527f6c653a3a77726f6e6720706172616d6574657273206c656e67746800000000006064820152608401610692565b60005b8351811015610ed957610ec785858381518110610e8657610e866134a6565b6020026020010151858481518110610ea057610ea06134a6565b6020026020010151858581518110610eba57610eba6134a6565b60200260200101516113c4565b80610ed181613541565b915050610e67565b5050505050565b610ee86121b7565b610ef2828261222a565b610dba60018055565b610f036121b7565b600060038281548110610f1857610f186134a6565b60009182526020808320858452600482526040808520338652909252922080546007929092029092016005810154909350610f54908290613504565b6005840155600080835560018301558254610f869073ffffffffffffffffffffffffffffffffffffffff163383612422565b604080518281526020810186905233917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae0595910160405180910390a2505050610fcd60018055565b50565b610fd86121b7565b60005b8181101561101657611006838383818110610ff857610ff86134a6565b90506020020135600061222a565b61100f81613541565b9050610fdb565b50610dba60018055565b611028611cd7565b61103260006124f6565b565b6000818410158061104457508284115b1561105157506000611076565b818311611069576110628484613504565b9050611076565b6110738483613504565b90505b9392505050565b611085611cd7565b600081815260026020526040812060038054919291849081106110aa576110aa6134a6565b60009182526020909120835460079092020191508061114b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f4661726d696e6752616e67653a3a75706461746543616d706169676e7352657760448201527f617264733a3a6e6f20726577617264496e666f4c656e000000000000000000006064820152608401610692565b600083611159600184613504565b81548110611169576111696134a6565b60009182526020909120600290910201805490915043811161120d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f4661726d696e6752616e67653a3a72656d6f76654c617374526577617264496e60448201527f666f3a3a72657761726420706572696f6420656e6465640000000000000000006064820152608401610692565b6112168661256b565b60018201541561126d5760008061124a611231600187613504565b84431161123e5784611240565b435b60008a8a8961274c565b91509150811561126a578086600601546112649190613504565b60068701555b50505b8480548061127d5761127d613579565b60008281526020812060027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9093019283020181815560019081019190915591556112c89084613504565b60405187907f997b6670781194c0d30c477be41ce4ba9b7f3f12417aa00965b9d9f978251e2390600090a3505050505050565b6000611307824361288a565b92915050565b600082815260046020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915281208054600190910154611076918591612989565b60006113078243612ba3565b6003818154811061136b57600080fd5b6000918252602090912060079091020180546001820154600283015460038401546004850154600586015460069096015473ffffffffffffffffffffffffffffffffffffffff9586169750949093169491939092919087565b6113cc611cd7565b600084815260026020526040812060038054919291879081106113f1576113f16134a6565b906000526020600020906007020190506000828681548110611415576114156134a6565b6000918252602090912060029091020180549091506114338861256b565b438110156114c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603360248201527f4661726d696e6752616e67653a3a757064617465526577617264496e666f3a3a60448201527f72657761726420706572696f6420656e646564000000000000000000000000006064820152608401610692565b86156115855785846114d660018a613504565b815481106114e6576114e66134a6565b90600052602060002090600202016000015410611585576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f4661726d696e6752616e67653a3a757064617465526577617264496e666f3a3a60448201527f626164206e657720656e64626c6f636b000000000000000000000000000000006064820152608401610692565b61159087600161352e565b8454111561167a57836115a488600161352e565b815481106115b4576115b46134a6565b906000526020600020906002020160000154861061167a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f4661726d696e6752616e67653a3a757064617465526577617264496e666f3a3a60448201527f72657761726420706572696f6420656e6420697320696e206e6578742072616e60648201527f6765000000000000000000000000000000000000000000000000000000000000608482015260a401610692565b60008061168b89898989898961274c565b915091508115801561169d5750600081115b156116c85760018501546116c89073ffffffffffffffffffffffffffffffffffffffff16828c611d58565b8288141580156116e55750855489906116e390600190613504565b115b156117d4576000866116f88b600161352e565b81548110611708576117086134a6565b6000918252602082206002909102018054909250906117278683613504565b905060006117358c84613504565b905060008460010154836117499190613517565b90508183866001015461175c9190613517565b61176691906135a8565b6001860181905560009061177a9084613517565b9050818110156117cd576006546117cd9073ffffffffffffffffffffffffffffffffffffffff166117ab8385613504565b60018e015473ffffffffffffffffffffffffffffffffffffffff169190612422565b5050505050505b816117ee578085600601546117e9919061352e565b6117fe565b8085600601546117fe9190613504565b60068601558784556001840187905560408051898152602081018990528a918c917fcd251e3ce758f4da844a7b790619743994a9ce956a4abb78aec611623ae8af5f910160405180910390a350505050505050505050565b61185e6121b7565b6118678161256b565b610fcd60018055565b6118786121b7565b60006003838154811061188d5761188d6134a6565b600091825260208083208684526004825260408085203386529092529220600790910290910191506118be8461256b565b80541561192e576000816001015468056bc75e2d63100000846004015484600001546118ea9190613517565b6118f491906135a8565b6118fe9190613504565b9050801561192c57600183015461192c9073ffffffffffffffffffffffffffffffffffffffff163383612422565b505b821561197d5781546119589073ffffffffffffffffffffffffffffffffffffffff16333086612cc9565b805461196590849061352e565b8155600582015461197790849061352e565b60058301555b6004820154815468056bc75e2d631000009161199891613517565b6119a291906135a8565b6001820155604080518481526020810186905233917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15910160405180910390a25050610dba60018055565b6119f56121b7565b60035460005b81811015611a1c57611a0c8161256b565b611a1581613541565b90506119fb565b505061103260018055565b611a2f611cd7565b73ffffffffffffffffffffffffffffffffffffffff8116611ad2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610692565b610fcd816124f6565b611ae3611cd7565b8685148015611af157508483145b8015611afc57508481145b611b88576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603d60248201527f4661726d696e6752616e67653a3a75706461746543616d706169676e7352657760448201527f617264733a3a77726f6e6720726577617264496e666f206c656e6774680000006064820152608401610692565b60005b87811015611ccc57611cba898983818110611ba857611ba86134a6565b90506020020135888884818110611bc157611bc16134a6565b9050602002810190611bd391906135e3565b808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508a9250899150869050818110611c1957611c196134a6565b9050602002810190611c2b91906135e3565b80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250899250889150879050818110611c7157611c716134a6565b9050602002810190611c8391906135e3565b80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250610dbe92505050565b80611cc481613541565b915050611b8b565b505050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611032576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610692565b6006546040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff918216600482015230602482015260448101849052908416906323b872dd906064016020604051808303816000875af1925050508015611e11575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252611e0e9181019061364b565b60015b611f31576006546040516024810183905273ffffffffffffffffffffffffffffffffffffffff90911690604401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167feee4f11b0000000000000000000000000000000000000000000000000000000017905251611ebf919061368c565b6000604051808303816000865af19150503d8060008114611efc576040519150601f19603f3d011682016040523d82523d6000602084013e611f01565b606091505b5050600654611f2c915073ffffffffffffffffffffffffffffffffffffffff85811691163085612cc9565b505050565b50505050565b6040517f7ecebe0000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8881166004830152600091908a1690637ecebe0090602401602060405180830381865afa158015611fa7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fcb91906136a8565b6040517fd505accf00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8a811660048301528981166024830152604482018990526064820188905260ff8716608483015260a4820186905260c48201859052919250908a169063d505accf9060e401600060405180830381600087803b15801561206557600080fd5b505af1158015612079573d6000803e3d6000fd5b50506040517f7ecebe0000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b81166004830152600093508c169150637ecebe0090602401602060405180830381865afa1580156120ec573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061211091906136a8565b905061211d82600161352e565b81146121ab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f5361666545524332303a207065726d697420646964206e6f742073756363656560448201527f64000000000000000000000000000000000000000000000000000000000000006064820152608401610692565b50505050505050505050565b600260015403612223576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610692565b6002600155565b60006003838154811061223f5761223f6134a6565b6000918252602080832086845260048252604080852033865290925292208054600790920290920192508311156122f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f4661726d696e6752616e67653a3a77697468647261773a3a626164207769746860448201527f6472617720616d6f756e740000000000000000000000000000000000000000006064820152608401610692565b6123018461256b565b6000816001015468056bc75e2d63100000846004015484600001546123269190613517565b61233091906135a8565b61233a9190613504565b905080156123685760018301546123689073ffffffffffffffffffffffffffffffffffffffff163383612422565b83156123b657815461237b908590613504565b825582546123a09073ffffffffffffffffffffffffffffffffffffffff163386612422565b8383600501546123b09190613504565b60058401555b6004830154825468056bc75e2d63100000916123d191613517565b6123db91906135a8565b6001830155604080518581526020810187905233917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568910160405180910390a25050505050565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052611f2c9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612d27565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060038281548110612580576125806134a6565b60009182526020808320858452600282526040808520805482518186028101860190935280835260079095029092019550929091849084015b828210156125ff578382906000526020600020906002020160405180604001604052908160008201548152602001600182015481525050815260200190600101906125b9565b5050505090508160030154431161261557505050565b816005015460000361263d5761262b8343612ba3565b431115611f2c57436003830155505050565b60005b8151811015611f31576000612677846003015443858581518110612666576126666134a6565b602002602001015160000151611034565b905080600003612687575061273c565b828281518110612699576126996134a6565b6020026020010151600001514311156126d4578282815181106126be576126be6134a6565b60209081029190910101515160038501556126db565b4360038501555b83600501548383815181106126f2576126f26134a6565b602002602001015160200151826127099190613517565b61271c9068056bc75e2d63100000613517565b61272691906135a8565b8460040154612735919061352e565b6004850155505b61274581613541565b9050612640565b600080808815612789578561276260018b613504565b81548110612772576127726134a6565b90600052602060002090600202016000015461278f565b84600201545b905060008143116127a057816127a2565b435b905060008286600001546127b69190613504565b905060006127c4838c613504565b60018801549091506000816127d98787613504565b6127e39190613517565b905060006127f18584613517565b905060006127ff858f613517565b905061280b838261352e565b821199508961282e578161281f848361352e565b6128299190613504565b612843565b826128398284613504565b6128439190613504565b985089156128775760065460018d01546128779173ffffffffffffffffffffffffffffffffffffffff91821691168b612422565b5050505050505050965096945050505050565b600082815260026020908152604080832080548251818502810185019093528083528493849084015b828210156128f9578382906000526020600020906002020160405180604001604052908160008201548152602001600182015481525050815260200190600101906128b3565b505082519293505050600081900361291657600092505050611307565b60005b8181101561297d57828181518110612933576129336134a6565b602002602001015160000151851161296d57828181518110612957576129576134a6565b6020026020010151602001519350505050611307565b61297681613541565b9050612919565b50600095945050505050565b6000806003858154811061299f5761299f6134a6565b600091825260208083206040805160e0810182526007909402909101805473ffffffffffffffffffffffffffffffffffffffff908116855260018201541684840152600280820154858401526003820154606086015260048201546080860152600582015460a086015260069091015460c08501528985528252808420805482518185028101850190935280835293955090929091849084015b82821015612a7f57838290600052602060002090600202016040518060400160405290816000820154815260200160018201548152505081526020019060010190612a39565b505050509050600082608001519050826060015143118015612aa4575060a083015115155b15612b6f57606083015160005b8351811015612b6c576000612ad38343878581518110612666576126666134a6565b905080600003612ae35750612b5c565b848281518110612af557612af56134a6565b60200260200101516000015192508560a00151858381518110612b1a57612b1a6134a6565b60200260200101516020015182612b319190613517565b612b449068056bc75e2d63100000613517565b612b4e91906135a8565b612b58908561352e565b9350505b612b6581613541565b9050612ab1565b50505b8468056bc75e2d63100000612b848389613517565b612b8e91906135a8565b612b989190613504565b979650505050505050565b600082815260026020908152604080832080548251818502810185019093528083528493849084015b82821015612c1257838290600052602060002090600202016040518060400160405290816000820154815260200160018201548152505081526020019060010190612bcc565b5050825192935050506000819003612c2f57600092505050611307565b60005b81811015612c9657828181518110612c4c57612c4c6134a6565b6020026020010151600001518511612c8657828181518110612c7057612c706134a6565b6020026020010151600001519350505050611307565b612c8f81613541565b9050612c32565b5081612ca3600183613504565b81518110612cb357612cb36134a6565b6020026020010151600001519250505092915050565b60405173ffffffffffffffffffffffffffffffffffffffff80851660248301528316604482015260648101829052611f319085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401612474565b6000612d89826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612e339092919063ffffffff16565b805190915015611f2c5780806020019051810190612da7919061364b565b611f2c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610692565b60606110738484600085856000808673ffffffffffffffffffffffffffffffffffffffff168587604051612e67919061368c565b60006040518083038185875af1925050503d8060008114612ea4576040519150601f19603f3d011682016040523d82523d6000602084013e612ea9565b606091505b5091509150612eba87838387612ec7565b925050505b949350505050565b60608315612f5d578251600003612f565773ffffffffffffffffffffffffffffffffffffffff85163b612f56576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610692565b5081612ebf565b612ebf8383815115612f725781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161069291906136c1565b60008060408385031215612fb957600080fd5b50508035926020909101359150565b73ffffffffffffffffffffffffffffffffffffffff81168114610fcd57600080fd5b600060208284031215612ffc57600080fd5b813561107681612fc8565b60008060006060848603121561301c57600080fd5b505081359360208301359350604090920135919050565b8015158114610fcd57600080fd5b600080600080600080600060e0888a03121561305c57600080fd5b8735965060208801359550604088013561307581613033565b945060608801359350608088013560ff8116811461309257600080fd5b9699959850939692959460a0840135945060c09093013592915050565b6000602082840312156130c157600080fd5b5035919050565b60008083601f8401126130da57600080fd5b50813567ffffffffffffffff8111156130f257600080fd5b6020830191508360208260051b850101111561310d57600080fd5b9250929050565b60008060008060006060868803121561312c57600080fd5b85359450602086013567ffffffffffffffff8082111561314b57600080fd5b61315789838a016130c8565b9096509450604088013591508082111561317057600080fd5b5061317d888289016130c8565b969995985093965092949392505050565b6000806000606084860312156131a357600080fd5b83356131ae81612fc8565b925060208401356131be81612fc8565b929592945050506040919091013590565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f83011261320f57600080fd5b8135602067ffffffffffffffff8083111561322c5761322c6131cf565b8260051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f8301168101818110848211171561326f5761326f6131cf565b60405293845285810183019383810192508785111561328d57600080fd5b83870191505b84821015612b9857813583529183019190830190613293565b600080600080608085870312156132c257600080fd5b84359350602085013567ffffffffffffffff808211156132e157600080fd5b6132ed888389016131fe565b9450604087013591508082111561330357600080fd5b61330f888389016131fe565b9350606087013591508082111561332557600080fd5b50613332878288016131fe565b91505092959194509250565b6000806020838503121561335157600080fd5b823567ffffffffffffffff81111561336857600080fd5b613374858286016130c8565b90969095509350505050565b6000806040838503121561339357600080fd5b8235915060208301356133a581612fc8565b809150509250929050565b600080600080608085870312156133c657600080fd5b5050823594602084013594506040840135936060013592509050565b6000806000806000806000806080898b0312156133fe57600080fd5b883567ffffffffffffffff8082111561341657600080fd5b6134228c838d016130c8565b909a50985060208b013591508082111561343b57600080fd5b6134478c838d016130c8565b909850965060408b013591508082111561346057600080fd5b61346c8c838d016130c8565b909650945060608b013591508082111561348557600080fd5b506134928b828c016130c8565b999c989b5096995094979396929594505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b81810381811115611307576113076134d5565b8082028115828204841417611307576113076134d5565b80820180821115611307576113076134d5565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613572576135726134d5565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6000826135de577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261361857600080fd5b83018035915067ffffffffffffffff82111561363357600080fd5b6020019150600581901b360382131561310d57600080fd5b60006020828403121561365d57600080fd5b815161107681613033565b60005b8381101561368357818101518382015260200161366b565b50506000910152565b6000825161369e818460208701613668565b9190910192915050565b6000602082840312156136ba57600080fd5b5051919050565b60208152600082518060208401526136e0816040850160208701613668565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea164736f6c6343000811000a00000000000000000000000025c4b95f00a01d3739815f026c52126f44034837
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101e45760003560e01c80635d14b06f1161010f5780639a63bc16116100a2578063e2bbb15811610071578063e2bbb1581461049f578063eebdced5146104b2578063f2fde38b146104ba578063fa8f5f19146104cd57600080fd5b80639a63bc1614610406578063bb2238ec14610419578063cdc8c93014610479578063cef7042d1461048c57600080fd5b80638d48aff0116100de5780638d48aff0146103905780638da5cb5b146103a357806393f1a40b146103c157806398969e82146103f357600080fd5b80635d14b06f1461034f578063715018a6146103625780637bafb0291461036a57806380637e891461037d57600080fd5b80633bbda19b11610187578063441a3e7011610156578063441a3e70146103015780634ad7ce80146103145780634ae56bae1461031c5780635312ea8e1461033c57600080fd5b80633bbda19b146102c0578063409e00fc146102d357806341ef1563146102e657806342ee0aba146102ee57600080fd5b8063153ee554116101c3578063153ee554146102725780632ea807c51461028757806330d78fda1461029a57806333824b87146102ad57600080fd5b8062d74850146101e95780630f4ef8a61461020557806310f7a6af1461024a575b600080fd5b6101f260055481565b6040519081526020015b60405180910390f35b6006546102259073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101fc565b61025d610258366004612fa6565b6104e0565b604080519283526020830191909152016101fc565b610285610280366004612fea565b61051c565b005b610285610295366004613007565b61059e565b6102856102a8366004613041565b610960565b6102856102bb3660046130af565b6109e8565b6102856102ce366004613114565b610a25565b6102856102e136600461318e565b610b1c565b610285610d39565b6102856102fc3660046132ac565b610dbe565b61028561030f366004612fa6565b610ee0565b6003546101f2565b6101f261032a3660046130af565b60009081526002602052604090205490565b61028561034a3660046130af565b610efb565b61028561035d36600461333e565b610fd0565b610285611020565b6101f2610378366004613007565b611034565b61028561038b3660046130af565b61107d565b6101f261039e3660046130af565b6112fb565b60005473ffffffffffffffffffffffffffffffffffffffff16610225565b61025d6103cf366004613380565b60046020908152600092835260408084209091529082529020805460019091015482565b6101f2610401366004613380565b61130d565b6101f26104143660046130af565b61134f565b61042c6104273660046130af565b61135b565b6040805173ffffffffffffffffffffffffffffffffffffffff9889168152979096166020880152948601939093526060850191909152608084015260a083015260c082015260e0016101fc565b6102856104873660046133b0565b6113c4565b61028561049a3660046130af565b611856565b6102856104ad366004612fa6565b611870565b6102856119ed565b6102856104c8366004612fea565b611a27565b6102856104db3660046133e2565b611adb565b600260205281600052604060002081815481106104fc57600080fd5b600091825260209091206002909102018054600190910154909250905082565b610524611cd7565b600680547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527fc05fa79926cd5600b1cc95c8d9d908b7685d3f058c34ea011f8ae3490968ad30906020015b60405180910390a150565b6105a6611cd7565b600083815260026020526040812060038054919291869081106105cb576105cb6134a6565b9060005260206000209060070201905060055482805490501061069b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f4661726d696e6752616e67653a3a616464526577617264496e666f3a3a72657760448201527f61726420696e666f206c656e677468206578636565647320746865206c696d6960648201527f7400000000000000000000000000000000000000000000000000000000000000608482015260a4015b60405180910390fd5b815415806106db57508154439083906106b690600190613504565b815481106106c6576106c66134a6565b90600052602060002090600202016000015410155b610767576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f4661726d696e6752616e67653a3a616464526577617264496e666f3a3a72657760448201527f61726420706572696f6420656e646564000000000000000000000000000000006064820152608401610692565b815415806107a6575081548490839061078290600190613504565b81548110610792576107926134a6565b906000526020600020906002020160000154105b610832576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f4661726d696e6752616e67653a3a616464526577617264496e666f3a3a62616460448201527f206e657720656e64626c6f636b000000000000000000000000000000000000006064820152608401610692565b815460009015610873578254839061084c90600190613504565b8154811061085c5761085c6134a6565b906000526020600020906002020160000154610879565b81600201545b905060006108878287613504565b905060006108958287613517565b60018501549091506108be9073ffffffffffffffffffffffffffffffffffffffff16828a611d58565b8084600601546108ce919061352e565b6006850155604080518082019091528781526020808201888152875460018181018a5560008a815293909320935160029091029093019283555191810191909155855461091b9190613504565b60408051898152602081018990528a917fad90731bd0d97445f5af66088f3adebf343c520c20e033cc42f93b124258cdc2910160405180910390a35050505050505050565b6109d560038881548110610976576109766134a6565b600091825260209091206007909102015473ffffffffffffffffffffffffffffffffffffffff163330886109aa57896109cc565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff5b88888888611f37565b6109df8787611870565b50505050505050565b6109f0611cd7565b60058190556040518181527fb64f58843e750a8bea7135ef396cf0a7790bfc9a8f43f11ac0e0aacc1b5787ba90602001610593565b610a2d611cd7565b828114610abc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603860248201527f4661726d696e6752616e67653a3a6164645265776172644d756c7469706c653a60448201527f3a77726f6e6720706172616d6574657273206c656e67746800000000000000006064820152608401610692565b60005b83811015610b1457610b0286868684818110610add57610add6134a6565b90506020020135858585818110610af657610af66134a6565b9050602002013561059e565b80610b0c81613541565b915050610abf565b505050505050565b610b24611cd7565b6040805160e08101825273ffffffffffffffffffffffffffffffffffffffff8086168252848116602083019081529282018481526060830185815260006080850181815260a0860182815260c08701838152600380546001818101835595829052985160079099027fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b810180549a8a167fffffffffffffffffffffffff00000000000000000000000000000000000000009b8c1617905599517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c8b0180549190991699169890981790965593517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85d88015591517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85e87015590517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85f86015590517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f86085015590517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f8619093019290925554610cdc9190613504565b6040805173ffffffffffffffffffffffffffffffffffffffff8087168252851660208201529081018390527f9b2f18f9a188a5aec4a95ee3164fe234dfbb6117628b2ad1a581939e61c69f4e9060600160405180910390a2505050565b610d41611cd7565b60035460005b81811015610dba5760038181548110610d6257610d626134a6565b9060005260206000209060070201600401546305f5e100610d839190613517565b60038281548110610d9657610d966134a6565b6000918252602090912060046007909202010155610db381613541565b9050610d47565b5050565b610dc6611cd7565b81518351148015610dd8575080518351145b610e64576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603b60248201527f4661726d696e6752616e67653a3a7570646174655265776172644d756c74697060448201527f6c653a3a77726f6e6720706172616d6574657273206c656e67746800000000006064820152608401610692565b60005b8351811015610ed957610ec785858381518110610e8657610e866134a6565b6020026020010151858481518110610ea057610ea06134a6565b6020026020010151858581518110610eba57610eba6134a6565b60200260200101516113c4565b80610ed181613541565b915050610e67565b5050505050565b610ee86121b7565b610ef2828261222a565b610dba60018055565b610f036121b7565b600060038281548110610f1857610f186134a6565b60009182526020808320858452600482526040808520338652909252922080546007929092029092016005810154909350610f54908290613504565b6005840155600080835560018301558254610f869073ffffffffffffffffffffffffffffffffffffffff163383612422565b604080518281526020810186905233917fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae0595910160405180910390a2505050610fcd60018055565b50565b610fd86121b7565b60005b8181101561101657611006838383818110610ff857610ff86134a6565b90506020020135600061222a565b61100f81613541565b9050610fdb565b50610dba60018055565b611028611cd7565b61103260006124f6565b565b6000818410158061104457508284115b1561105157506000611076565b818311611069576110628484613504565b9050611076565b6110738483613504565b90505b9392505050565b611085611cd7565b600081815260026020526040812060038054919291849081106110aa576110aa6134a6565b60009182526020909120835460079092020191508061114b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f4661726d696e6752616e67653a3a75706461746543616d706169676e7352657760448201527f617264733a3a6e6f20726577617264496e666f4c656e000000000000000000006064820152608401610692565b600083611159600184613504565b81548110611169576111696134a6565b60009182526020909120600290910201805490915043811161120d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603760248201527f4661726d696e6752616e67653a3a72656d6f76654c617374526577617264496e60448201527f666f3a3a72657761726420706572696f6420656e6465640000000000000000006064820152608401610692565b6112168661256b565b60018201541561126d5760008061124a611231600187613504565b84431161123e5784611240565b435b60008a8a8961274c565b91509150811561126a578086600601546112649190613504565b60068701555b50505b8480548061127d5761127d613579565b60008281526020812060027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9093019283020181815560019081019190915591556112c89084613504565b60405187907f997b6670781194c0d30c477be41ce4ba9b7f3f12417aa00965b9d9f978251e2390600090a3505050505050565b6000611307824361288a565b92915050565b600082815260046020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915281208054600190910154611076918591612989565b60006113078243612ba3565b6003818154811061136b57600080fd5b6000918252602090912060079091020180546001820154600283015460038401546004850154600586015460069096015473ffffffffffffffffffffffffffffffffffffffff9586169750949093169491939092919087565b6113cc611cd7565b600084815260026020526040812060038054919291879081106113f1576113f16134a6565b906000526020600020906007020190506000828681548110611415576114156134a6565b6000918252602090912060029091020180549091506114338861256b565b438110156114c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603360248201527f4661726d696e6752616e67653a3a757064617465526577617264496e666f3a3a60448201527f72657761726420706572696f6420656e646564000000000000000000000000006064820152608401610692565b86156115855785846114d660018a613504565b815481106114e6576114e66134a6565b90600052602060002090600202016000015410611585576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f4661726d696e6752616e67653a3a757064617465526577617264496e666f3a3a60448201527f626164206e657720656e64626c6f636b000000000000000000000000000000006064820152608401610692565b61159087600161352e565b8454111561167a57836115a488600161352e565b815481106115b4576115b46134a6565b906000526020600020906002020160000154861061167a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604260248201527f4661726d696e6752616e67653a3a757064617465526577617264496e666f3a3a60448201527f72657761726420706572696f6420656e6420697320696e206e6578742072616e60648201527f6765000000000000000000000000000000000000000000000000000000000000608482015260a401610692565b60008061168b89898989898961274c565b915091508115801561169d5750600081115b156116c85760018501546116c89073ffffffffffffffffffffffffffffffffffffffff16828c611d58565b8288141580156116e55750855489906116e390600190613504565b115b156117d4576000866116f88b600161352e565b81548110611708576117086134a6565b6000918252602082206002909102018054909250906117278683613504565b905060006117358c84613504565b905060008460010154836117499190613517565b90508183866001015461175c9190613517565b61176691906135a8565b6001860181905560009061177a9084613517565b9050818110156117cd576006546117cd9073ffffffffffffffffffffffffffffffffffffffff166117ab8385613504565b60018e015473ffffffffffffffffffffffffffffffffffffffff169190612422565b5050505050505b816117ee578085600601546117e9919061352e565b6117fe565b8085600601546117fe9190613504565b60068601558784556001840187905560408051898152602081018990528a918c917fcd251e3ce758f4da844a7b790619743994a9ce956a4abb78aec611623ae8af5f910160405180910390a350505050505050505050565b61185e6121b7565b6118678161256b565b610fcd60018055565b6118786121b7565b60006003838154811061188d5761188d6134a6565b600091825260208083208684526004825260408085203386529092529220600790910290910191506118be8461256b565b80541561192e576000816001015468056bc75e2d63100000846004015484600001546118ea9190613517565b6118f491906135a8565b6118fe9190613504565b9050801561192c57600183015461192c9073ffffffffffffffffffffffffffffffffffffffff163383612422565b505b821561197d5781546119589073ffffffffffffffffffffffffffffffffffffffff16333086612cc9565b805461196590849061352e565b8155600582015461197790849061352e565b60058301555b6004820154815468056bc75e2d631000009161199891613517565b6119a291906135a8565b6001820155604080518481526020810186905233917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15910160405180910390a25050610dba60018055565b6119f56121b7565b60035460005b81811015611a1c57611a0c8161256b565b611a1581613541565b90506119fb565b505061103260018055565b611a2f611cd7565b73ffffffffffffffffffffffffffffffffffffffff8116611ad2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610692565b610fcd816124f6565b611ae3611cd7565b8685148015611af157508483145b8015611afc57508481145b611b88576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603d60248201527f4661726d696e6752616e67653a3a75706461746543616d706169676e7352657760448201527f617264733a3a77726f6e6720726577617264496e666f206c656e6774680000006064820152608401610692565b60005b87811015611ccc57611cba898983818110611ba857611ba86134a6565b90506020020135888884818110611bc157611bc16134a6565b9050602002810190611bd391906135e3565b808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508a9250899150869050818110611c1957611c196134a6565b9050602002810190611c2b91906135e3565b80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250899250889150879050818110611c7157611c716134a6565b9050602002810190611c8391906135e3565b80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250610dbe92505050565b80611cc481613541565b915050611b8b565b505050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314611032576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610692565b6006546040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff918216600482015230602482015260448101849052908416906323b872dd906064016020604051808303816000875af1925050508015611e11575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252611e0e9181019061364b565b60015b611f31576006546040516024810183905273ffffffffffffffffffffffffffffffffffffffff90911690604401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167feee4f11b0000000000000000000000000000000000000000000000000000000017905251611ebf919061368c565b6000604051808303816000865af19150503d8060008114611efc576040519150601f19603f3d011682016040523d82523d6000602084013e611f01565b606091505b5050600654611f2c915073ffffffffffffffffffffffffffffffffffffffff85811691163085612cc9565b505050565b50505050565b6040517f7ecebe0000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8881166004830152600091908a1690637ecebe0090602401602060405180830381865afa158015611fa7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fcb91906136a8565b6040517fd505accf00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8a811660048301528981166024830152604482018990526064820188905260ff8716608483015260a4820186905260c48201859052919250908a169063d505accf9060e401600060405180830381600087803b15801561206557600080fd5b505af1158015612079573d6000803e3d6000fd5b50506040517f7ecebe0000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b81166004830152600093508c169150637ecebe0090602401602060405180830381865afa1580156120ec573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061211091906136a8565b905061211d82600161352e565b81146121ab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f5361666545524332303a207065726d697420646964206e6f742073756363656560448201527f64000000000000000000000000000000000000000000000000000000000000006064820152608401610692565b50505050505050505050565b600260015403612223576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610692565b6002600155565b60006003838154811061223f5761223f6134a6565b6000918252602080832086845260048252604080852033865290925292208054600790920290920192508311156122f8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f4661726d696e6752616e67653a3a77697468647261773a3a626164207769746860448201527f6472617720616d6f756e740000000000000000000000000000000000000000006064820152608401610692565b6123018461256b565b6000816001015468056bc75e2d63100000846004015484600001546123269190613517565b61233091906135a8565b61233a9190613504565b905080156123685760018301546123689073ffffffffffffffffffffffffffffffffffffffff163383612422565b83156123b657815461237b908590613504565b825582546123a09073ffffffffffffffffffffffffffffffffffffffff163386612422565b8383600501546123b09190613504565b60058401555b6004830154825468056bc75e2d63100000916123d191613517565b6123db91906135a8565b6001830155604080518581526020810187905233917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568910160405180910390a25050505050565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052611f2c9084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612d27565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060038281548110612580576125806134a6565b60009182526020808320858452600282526040808520805482518186028101860190935280835260079095029092019550929091849084015b828210156125ff578382906000526020600020906002020160405180604001604052908160008201548152602001600182015481525050815260200190600101906125b9565b5050505090508160030154431161261557505050565b816005015460000361263d5761262b8343612ba3565b431115611f2c57436003830155505050565b60005b8151811015611f31576000612677846003015443858581518110612666576126666134a6565b602002602001015160000151611034565b905080600003612687575061273c565b828281518110612699576126996134a6565b6020026020010151600001514311156126d4578282815181106126be576126be6134a6565b60209081029190910101515160038501556126db565b4360038501555b83600501548383815181106126f2576126f26134a6565b602002602001015160200151826127099190613517565b61271c9068056bc75e2d63100000613517565b61272691906135a8565b8460040154612735919061352e565b6004850155505b61274581613541565b9050612640565b600080808815612789578561276260018b613504565b81548110612772576127726134a6565b90600052602060002090600202016000015461278f565b84600201545b905060008143116127a057816127a2565b435b905060008286600001546127b69190613504565b905060006127c4838c613504565b60018801549091506000816127d98787613504565b6127e39190613517565b905060006127f18584613517565b905060006127ff858f613517565b905061280b838261352e565b821199508961282e578161281f848361352e565b6128299190613504565b612843565b826128398284613504565b6128439190613504565b985089156128775760065460018d01546128779173ffffffffffffffffffffffffffffffffffffffff91821691168b612422565b5050505050505050965096945050505050565b600082815260026020908152604080832080548251818502810185019093528083528493849084015b828210156128f9578382906000526020600020906002020160405180604001604052908160008201548152602001600182015481525050815260200190600101906128b3565b505082519293505050600081900361291657600092505050611307565b60005b8181101561297d57828181518110612933576129336134a6565b602002602001015160000151851161296d57828181518110612957576129576134a6565b6020026020010151602001519350505050611307565b61297681613541565b9050612919565b50600095945050505050565b6000806003858154811061299f5761299f6134a6565b600091825260208083206040805160e0810182526007909402909101805473ffffffffffffffffffffffffffffffffffffffff908116855260018201541684840152600280820154858401526003820154606086015260048201546080860152600582015460a086015260069091015460c08501528985528252808420805482518185028101850190935280835293955090929091849084015b82821015612a7f57838290600052602060002090600202016040518060400160405290816000820154815260200160018201548152505081526020019060010190612a39565b505050509050600082608001519050826060015143118015612aa4575060a083015115155b15612b6f57606083015160005b8351811015612b6c576000612ad38343878581518110612666576126666134a6565b905080600003612ae35750612b5c565b848281518110612af557612af56134a6565b60200260200101516000015192508560a00151858381518110612b1a57612b1a6134a6565b60200260200101516020015182612b319190613517565b612b449068056bc75e2d63100000613517565b612b4e91906135a8565b612b58908561352e565b9350505b612b6581613541565b9050612ab1565b50505b8468056bc75e2d63100000612b848389613517565b612b8e91906135a8565b612b989190613504565b979650505050505050565b600082815260026020908152604080832080548251818502810185019093528083528493849084015b82821015612c1257838290600052602060002090600202016040518060400160405290816000820154815260200160018201548152505081526020019060010190612bcc565b5050825192935050506000819003612c2f57600092505050611307565b60005b81811015612c9657828181518110612c4c57612c4c6134a6565b6020026020010151600001518511612c8657828181518110612c7057612c706134a6565b6020026020010151600001519350505050611307565b612c8f81613541565b9050612c32565b5081612ca3600183613504565b81518110612cb357612cb36134a6565b6020026020010151600001519250505092915050565b60405173ffffffffffffffffffffffffffffffffffffffff80851660248301528316604482015260648101829052611f319085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401612474565b6000612d89826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16612e339092919063ffffffff16565b805190915015611f2c5780806020019051810190612da7919061364b565b611f2c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610692565b60606110738484600085856000808673ffffffffffffffffffffffffffffffffffffffff168587604051612e67919061368c565b60006040518083038185875af1925050503d8060008114612ea4576040519150601f19603f3d011682016040523d82523d6000602084013e612ea9565b606091505b5091509150612eba87838387612ec7565b925050505b949350505050565b60608315612f5d578251600003612f565773ffffffffffffffffffffffffffffffffffffffff85163b612f56576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610692565b5081612ebf565b612ebf8383815115612f725781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161069291906136c1565b60008060408385031215612fb957600080fd5b50508035926020909101359150565b73ffffffffffffffffffffffffffffffffffffffff81168114610fcd57600080fd5b600060208284031215612ffc57600080fd5b813561107681612fc8565b60008060006060848603121561301c57600080fd5b505081359360208301359350604090920135919050565b8015158114610fcd57600080fd5b600080600080600080600060e0888a03121561305c57600080fd5b8735965060208801359550604088013561307581613033565b945060608801359350608088013560ff8116811461309257600080fd5b9699959850939692959460a0840135945060c09093013592915050565b6000602082840312156130c157600080fd5b5035919050565b60008083601f8401126130da57600080fd5b50813567ffffffffffffffff8111156130f257600080fd5b6020830191508360208260051b850101111561310d57600080fd5b9250929050565b60008060008060006060868803121561312c57600080fd5b85359450602086013567ffffffffffffffff8082111561314b57600080fd5b61315789838a016130c8565b9096509450604088013591508082111561317057600080fd5b5061317d888289016130c8565b969995985093965092949392505050565b6000806000606084860312156131a357600080fd5b83356131ae81612fc8565b925060208401356131be81612fc8565b929592945050506040919091013590565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f83011261320f57600080fd5b8135602067ffffffffffffffff8083111561322c5761322c6131cf565b8260051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f8301168101818110848211171561326f5761326f6131cf565b60405293845285810183019383810192508785111561328d57600080fd5b83870191505b84821015612b9857813583529183019190830190613293565b600080600080608085870312156132c257600080fd5b84359350602085013567ffffffffffffffff808211156132e157600080fd5b6132ed888389016131fe565b9450604087013591508082111561330357600080fd5b61330f888389016131fe565b9350606087013591508082111561332557600080fd5b50613332878288016131fe565b91505092959194509250565b6000806020838503121561335157600080fd5b823567ffffffffffffffff81111561336857600080fd5b613374858286016130c8565b90969095509350505050565b6000806040838503121561339357600080fd5b8235915060208301356133a581612fc8565b809150509250929050565b600080600080608085870312156133c657600080fd5b5050823594602084013594506040840135936060013592509050565b6000806000806000806000806080898b0312156133fe57600080fd5b883567ffffffffffffffff8082111561341657600080fd5b6134228c838d016130c8565b909a50985060208b013591508082111561343b57600080fd5b6134478c838d016130c8565b909850965060408b013591508082111561346057600080fd5b61346c8c838d016130c8565b909650945060608b013591508082111561348557600080fd5b506134928b828c016130c8565b999c989b5096995094979396929594505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b81810381811115611307576113076134d5565b8082028115828204841417611307576113076134d5565b80820180821115611307576113076134d5565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613572576135726134d5565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6000826135de577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261361857600080fd5b83018035915067ffffffffffffffff82111561363357600080fd5b6020019150600581901b360382131561310d57600080fd5b60006020828403121561365d57600080fd5b815161107681613033565b60005b8381101561368357818101518382015260200161366b565b50506000910152565b6000825161369e818460208701613668565b9190910192915050565b6000602082840312156136ba57600080fd5b5051919050565b60208152600082518060208401526136e0816040850160208701613668565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea164736f6c6343000811000a
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000025c4b95f00a01d3739815f026c52126f44034837
-----Decoded View---------------
Arg [0] : _rewardManager (address): 0x25c4b95F00a01D3739815F026C52126F44034837
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000025c4b95f00a01d3739815f026c52126f44034837
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $0.013985 | 922,647.1125 | $12,903.09 |
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.