More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 131 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
Value | ||||
---|---|---|---|---|---|---|---|---|---|
Stake | 12755191 | 989 days ago | IN | 0 ETH | 0.00164962 | ||||
Stake | 12698780 | 998 days ago | IN | 0 ETH | 0.00189621 | ||||
Stake | 12692762 | 999 days ago | IN | 0 ETH | 0.00150689 | ||||
Stake | 12589073 | 1015 days ago | IN | 0 ETH | 0.00326297 | ||||
Stake | 12588097 | 1015 days ago | IN | 0 ETH | 0.00112869 | ||||
Stake | 12588084 | 1015 days ago | IN | 0 ETH | 0.00251119 | ||||
Stake | 12587242 | 1015 days ago | IN | 0 ETH | 0.00819693 | ||||
Stake | 12581182 | 1016 days ago | IN | 0 ETH | 0.00179959 | ||||
Stake | 12543066 | 1022 days ago | IN | 0 ETH | 0.00354499 | ||||
Stake | 12528051 | 1025 days ago | IN | 0 ETH | 0.00261316 | ||||
Stake | 12522699 | 1025 days ago | IN | 0 ETH | 0.00509884 | ||||
Stake | 12511108 | 1027 days ago | IN | 0 ETH | 0.0050489 | ||||
Stake | 12503514 | 1028 days ago | IN | 0 ETH | 0.00627779 | ||||
Stake | 12503168 | 1028 days ago | IN | 0 ETH | 0.0069047 | ||||
Stake | 12496936 | 1029 days ago | IN | 0 ETH | 0.00705553 | ||||
Stake | 12494393 | 1030 days ago | IN | 0 ETH | 0.00719836 | ||||
Stake | 12493629 | 1030 days ago | IN | 0 ETH | 0.01732112 | ||||
Stake | 12489797 | 1031 days ago | IN | 0 ETH | 0.01811145 | ||||
Stake | 12488258 | 1031 days ago | IN | 0 ETH | 0.00401084 | ||||
Stake | 12485554 | 1031 days ago | IN | 0 ETH | 0.00523546 | ||||
Stake | 12482384 | 1032 days ago | IN | 0 ETH | 0.01251076 | ||||
Stake | 12479498 | 1032 days ago | IN | 0 ETH | 0.01391977 | ||||
Stake | 12477115 | 1033 days ago | IN | 0 ETH | 0.004971 | ||||
Stake | 12473416 | 1033 days ago | IN | 0 ETH | 0.01777572 | ||||
Stake | 12457015 | 1036 days ago | IN | 0 ETH | 0.00694931 |
Latest 1 internal transaction
Advanced mode:
Parent Txn Hash | Block | From | To | Value | ||
---|---|---|---|---|---|---|
11498753 | 1183 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Contract Name:
RewardsType1
Compiler Version
v0.6.2+commit.bacdbe57
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity ^0.6.0; import "./Rewards.sol"; import "./ReferralRewardsType1.sol"; contract RewardsType1 is Rewards { /// @dev Constructor that initializes the most important configurations. /// @param _token Token to be staked and harvested. /// @param _referralTree Contract with referral's tree. constructor(dANT _token, ReferralTree _referralTree) public Rewards(_token, 150 days, 86805555556) { referralRewards = new ReferralRewardsType1( _token, _referralTree, Rewards(address(this)), [uint256(5000 * 1e18), 2000 * 1e18, 100 * 1e18], [ [uint256(6 * 1e16), 2 * 1e16, 1 * 1e16], [uint256(5 * 1e16), 15 * 1e15, 75 * 1e14], [uint256(4 * 1e16), 1 * 1e16, 5 * 1e15] ], [ [uint256(6 * 1e16), 2 * 1e16, 1 * 1e16], [uint256(5 * 1e16), 15 * 1e15, 75 * 1e14], [uint256(4 * 1e16), 1 * 1e16, 5 * 1e15] ] ); referralRewards.transferOwnership(_msgSender()); } }
pragma solidity ^0.6.0; pragma experimental ABIEncoderV2; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/math/Math.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./ReferralTree.sol"; import "./dANT.sol"; contract ReferralRewards is Ownable { using SafeMath for uint256; event ReferralDepositReward( address indexed refferer, address indexed refferal, uint256 indexed level, uint256 amount ); event ReferralRewardPaid(address indexed user, uint256 amount); // Info of each deposit made by the referrer struct DepositInfo { address referrer; // Address of refferer who made this deposit uint256 depth; // The level of the refferal uint256 amount; // Amount of deposited LP tokens uint256 time; // Wnen the deposit is ended uint256 lastUpdatedTime; // Last time the referral claimed reward from the deposit } // Info of each referral struct ReferralInfo { uint256 reward; // Ammount of collected deposit rewards uint256 lastUpdate; // Last time the referral claimed rewards uint256 depositHead; // The start index in the deposit's list uint256 depositTail; // The end index in the deposit's list uint256[amtLevels] amounts; // Amounts that generate rewards on each referral level mapping(uint256 => DepositInfo) deposits; // Deposits that generate reward for the referral } uint256 public constant amtLevels = 3; // Number of levels by total staked amount that determine referral reward's rate uint256 public constant referDepth = 3; // Number of referral levels that can receive dividends dANT public token; // Harvested token contract ReferralTree public referralTree; // Contract with referral's tree Rewards rewards; // Main farming contract uint256[amtLevels] public depositBounds; // Limits of referral's stake used to determine the referral rate uint256[referDepth][amtLevels] public depositRate; // Referral rates based on referral's deplth and stake received from deposit uint256[referDepth][amtLevels] public stakingRate; // Referral rates based on referral's deplth and stake received from staking mapping(address => ReferralInfo) public referralReward; // Info per each referral /// @dev Constructor that initializes the most important configurations. /// @param _token Token to be staked and harvested. /// @param _referralTree Contract with referral's tree. /// @param _rewards Main farming contract. /// @param _depositBounds Limits of referral's stake used to determine the referral rate. /// @param _depositRate Referral rates based on referral's deplth and stake received from deposit. /// @param _stakingRate Referral rates based on referral's deplth and stake received from staking. constructor( dANT _token, ReferralTree _referralTree, Rewards _rewards, uint256[amtLevels] memory _depositBounds, uint256[referDepth][amtLevels] memory _depositRate, uint256[referDepth][amtLevels] memory _stakingRate ) public Ownable() { token = _token; referralTree = _referralTree; depositBounds = _depositBounds; depositRate = _depositRate; stakingRate = _stakingRate; rewards = _rewards; } /// @dev Allows an owner to update bounds. /// @param _depositBounds Limits of referral's stake used to determine the referral rate. function setBounds(uint256[amtLevels] memory _depositBounds) public onlyOwner { depositBounds = _depositBounds; } /// @dev Allows an owner to update deposit rates. /// @param _depositRate Referral rates based on referral's deplth and stake received from deposit. function setDepositRate(uint256[referDepth][amtLevels] memory _depositRate) public onlyOwner { depositRate = _depositRate; } /// @dev Allows an owner to update staking rates. /// @param _stakingRate Referral rates based on referral's deplth and stake received from staking. function setStakingRate(uint256[referDepth][amtLevels] memory _stakingRate) public onlyOwner { stakingRate = _stakingRate; } /// @dev Allows a farming contract to set user referral. /// @param _referrer Address of the referred user. /// @param _referral Address of the refferal. function setReferral(address _referrer, address _referral) public { require( msg.sender == address(rewards), "assessReferalDepositReward: bad role" ); referralTree.setReferral(_referrer, _referral); } /// @dev Allows the main farming contract to assess referral deposit rewards. /// @param _referrer Address of the referred user. /// @param _amount Amount of new deposit. function assessReferalDepositReward(address _referrer, uint256 _amount) external virtual { require( msg.sender == address(rewards), "assessReferalDepositReward: bad role" ); address[] memory referrals = referralTree.getReferrals( _referrer, referDepth ); uint256[] memory referralStakes = rewards.getReferralStakes(referrals); uint256[] memory percents = getDepositRate(referralStakes); for (uint256 level = 0; level < referrals.length; level++) { if (referrals[level] == address(0)) { continue; } ReferralInfo storage referralInfo = referralReward[referrals[level]]; referralInfo.deposits[referralInfo.depositTail] = DepositInfo({ referrer: _referrer, depth: level, amount: _amount, lastUpdatedTime: now, time: now + rewards.duration() }); referralInfo.amounts[level] = referralInfo.amounts[level].add( _amount ); referralInfo.depositTail = referralInfo.depositTail.add(1); if (percents[level] == 0) { continue; } uint256 depositReward = _amount.mul(percents[level]); if (depositReward > 0) { referralInfo.reward = referralInfo.reward.add(depositReward); emit ReferralDepositReward( _referrer, referrals[level], level, depositReward ); } } } /// @dev Allows a user to claim his dividends. function claimDividends() public { claimUserDividends(msg.sender); } /// @dev Allows a referral tree to claim all the dividends. /// @param _referral Address of user that claims his dividends. function claimAllDividends(address _referral) public { require( msg.sender == address(referralTree) || msg.sender == address(rewards), "claimAllDividends: bad role" ); claimUserDividends(_referral); } /// @dev Allows to decrement staked amount that generates reward to the referrals. /// @param _referrer Address of the referrer. /// @param _amount Ammount of tokens to be withdrawn by referrer. function removeDepositReward(address _referrer, uint256 _amount) external virtual {} /// @dev Update the staking referral reward for _user. /// @param _user Address of the referral. function accumulateReward(address _user) internal virtual { ReferralInfo storage referralInfo = referralReward[_user]; if (referralInfo.lastUpdate >= now) { return; } uint256 rewardPerSec = rewards.rewardPerSec(); uint256 referralStake = rewards.getReferralStake(_user); uint256[referDepth] memory rates = getStakingRateRange(referralStake); for ( uint256 i = referralInfo.depositHead; i < referralInfo.depositTail; i++ ) { DepositInfo memory deposit = referralInfo.deposits[i]; uint256 reward = Math .min(now, deposit.time) .sub(deposit.lastUpdatedTime) .mul(deposit.amount) .mul(rewardPerSec) .mul(rates[deposit.depth]) .div(1e18); if (reward > 0) { referralInfo.reward = referralInfo.reward.add(reward); } referralInfo.deposits[i].lastUpdatedTime = now; if (deposit.time < now) { if (i != referralInfo.depositHead) { referralInfo.deposits[i] = referralInfo .deposits[referralInfo.depositHead]; } delete referralInfo.deposits[referralInfo.depositHead]; referralInfo.depositHead = referralInfo.depositHead.add(1); } } referralInfo.lastUpdate = now; } /// @dev Asses and distribute claimed dividends. /// @param _user Address of user that claims dividends. function claimUserDividends(address _user) internal { accumulateReward(_user); ReferralInfo storage referralInfo = referralReward[_user]; uint256 amount = referralInfo.reward.div(1e18); if (amount > 0) { uint256 scaledReward = amount.mul(1e18); referralInfo.reward = referralInfo.reward.sub(scaledReward); token.mint(_user, amount); emit ReferralRewardPaid(_user, amount); } } /// @dev Returns referral reward. /// @param _user Address of referral. /// @return Referral reward. function getReferralReward(address _user) external virtual view returns (uint256) { ReferralInfo storage referralInfo = referralReward[_user]; uint256 rewardPerSec = rewards.rewardPerSec(); uint256 referralStake = rewards.getReferralStake(_user); uint256[referDepth] memory rates = getStakingRateRange(referralStake); uint256 _reward = referralInfo.reward; for ( uint256 i = referralInfo.depositHead; i < referralInfo.depositTail; i++ ) { DepositInfo memory deposit = referralInfo.deposits[i]; _reward = _reward.add( Math .min(now, deposit.time) .sub(deposit.lastUpdatedTime) .mul(deposit.amount) .mul(rewardPerSec) .mul(rates[deposit.depth]) .div(1e18) ); } return _reward.div(1e18); } /// @dev Returns direct user referral. /// @param _user Address of referrer. /// @return Direct user referral. function getReferral(address _user) public view returns (address) { return referralTree.referrals(_user); } /// @dev Returns stakong rate for the spesific referral stake. /// @param _referralStake Amount staked by referral. /// @return _rates Array of stakong rates by referral level. function getStakingRateRange(uint256 _referralStake) public view returns (uint256[referDepth] memory _rates) { for (uint256 i = 0; i < depositBounds.length; i++) { if (_referralStake >= depositBounds[i]) { return stakingRate[i]; } } } /// @dev Returns deposit rate based on the spesific referral stake and referral level. /// @param _referralStakes Amounts staked by referrals. /// @return _rates Array of deposit rates by referral level. function getDepositRate(uint256[] memory _referralStakes) public view returns (uint256[] memory _rates) { _rates = new uint256[](_referralStakes.length); for (uint256 level = 0; level < _referralStakes.length; level++) { for (uint256 j = 0; j < depositBounds.length; j++) { if (_referralStakes[level] >= depositBounds[j]) { _rates[level] = depositRate[j][level]; break; } } } } /// @dev Returns limits of referral's stake used to determine the referral rate. /// @return Array of deposit bounds. function getDepositBounds() public view returns (uint256[referDepth] memory) { return depositBounds; } /// @dev Returns referral rates based on referral's deplth and stake received from staking. /// @return Array of staking rates. function getStakingRates() public view returns (uint256[referDepth][amtLevels] memory) { return stakingRate; } /// @dev Returns referral rates based on referral's deplth and stake received from deposit. /// @return Array of deposit rates. function getDepositRates() public view returns (uint256[referDepth][amtLevels] memory) { return depositRate; } /// @dev Returns amounts that generate reward for referral bu levels. /// @param _user Address of referral. /// @return Returns amounts that generate reward for referral bu levels. function getReferralAmounts(address _user) public view returns (uint256[amtLevels] memory) { ReferralInfo memory referralInfo = referralReward[_user]; return referralInfo.amounts; } }
pragma solidity ^0.6.0; pragma experimental ABIEncoderV2; import "./ReferralRewards.sol"; contract ReferralRewardsType1 is ReferralRewards { /// @dev Constructor that initializes the most important configurations. /// @param _token Token to be staked and harvested. /// @param _referralTree Contract with referral's tree. /// @param _rewards Main farming contract. /// @param _depositBounds Limits of referral's stake used to determine the referral rate. /// @param _depositRate Referral rates based on referral's deplth and stake received from deposit. /// @param _stakingRate Referral rates based on referral's deplth and stake received from staking. constructor( dANT _token, ReferralTree _referralTree, Rewards _rewards, uint256[amtLevels] memory _depositBounds, uint256[referDepth][amtLevels] memory _depositRate, uint256[referDepth][amtLevels] memory _stakingRate ) public ReferralRewards( _token, _referralTree, _rewards, _depositBounds, _depositRate, _stakingRate ) {} }
pragma solidity ^0.6.0; import "@openzeppelin/contracts/access/AccessControl.sol"; import "./ReferralRewards.sol"; import "./Rewards.sol"; contract ReferralTree is AccessControl { using SafeMath for uint256; event ReferralAdded(address indexed referrer, address indexed referral); bytes32 public constant REWARDS_ROLE = keccak256("REWARDS_ROLE"); // Role for those who allowed to mint new tokens mapping(address => address) public referrals; // Referral addresses for each referrer mapping(address => bool) public registered; // Map to ensure if the referrer is in the tree mapping(address => address[]) public referrers; // List of referrer addresses for each referral ReferralRewards[] public referralRewards; // Referral reward contracts that are allowed to modify the tree address public treeRoot; // The root of the referral tree /// @dev Constructor that initializes the most important configurations. /// @param _treeRoot The root of the referral tree. constructor(address _treeRoot) public AccessControl() { treeRoot = _treeRoot; registered[_treeRoot] = true; _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); } /// @dev Allows an admin to reanonce the DEFAULT_ADMIN_ROLE. /// @param _newAdmin Address of the new admin. function changeAdmin(address _newAdmin) public { require( hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "changeAdmin: bad role" ); _setupRole(DEFAULT_ADMIN_ROLE, _newAdmin); renounceRole(DEFAULT_ADMIN_ROLE, _msgSender()); } /// @dev Allows a farming contract to set the users referral. /// @param _referrer Address of the referred user. /// @param _referral Address of the refferal. function setReferral(address _referrer, address _referral) public { require(hasRole(REWARDS_ROLE, _msgSender()), "setReferral: bad role"); require(_referrer != address(0), "setReferral: bad referrer"); if (!registered[_referrer]) { require( registered[_referral], "setReferral: not registered referral" ); referrals[_referrer] = _referral; registered[_referrer] = true; referrers[_referral].push(_referrer); emit ReferralAdded(_referrer, _referral); } } /// @dev Allows an admin to remove the referral rewards contract from trusted list. /// @param _referralRewards Contract that manages referral rewards. function removeReferralReward(ReferralRewards _referralRewards) public { require( hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "setReferral: bad role" ); for (uint256 i = 0; i < referralRewards.length; i++) { if (_referralRewards == referralRewards[i]) { uint256 lastIndex = referralRewards.length - 1; if (i != lastIndex) { referralRewards[i] = referralRewards[lastIndex]; } referralRewards.pop(); revokeRole(REWARDS_ROLE, address(_referralRewards)); break; } } } /// @dev Allows an admin to add the referral rewards contract from trusted list. /// @param _referralRewards Contract that manages referral rewards. function addReferralReward(ReferralRewards _referralRewards) public { require( hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "setReferral: bad role" ); _setupRole(REWARDS_ROLE, address(_referralRewards)); referralRewards.push(_referralRewards); } /// @dev Allows a user to claim all the dividends in all trusted products. function claimAllDividends() public { for (uint256 i = 0; i < referralRewards.length; i++) { ReferralRewards referralReward = referralRewards[i]; if (referralReward.getReferralReward(_msgSender()) > 0) { referralReward.claimAllDividends(_msgSender()); } } } /// @dev Returns user referrals up to the required depth. /// @param _referrer Address of referrer. /// @param _referDepth Number of referrals to be returned. /// @return List of user referrals. function getReferrals(address _referrer, uint256 _referDepth) public view returns (address[] memory) { address[] memory referralsTree = new address[](_referDepth); address referrer = _referrer; for (uint256 i = 0; i < _referDepth; i++) { referralsTree[i] = referrals[referrer]; referrer = referralsTree[i]; } return referralsTree; } /// @dev Returns user referrals up to the required depth. /// @param _referral Address of referral. /// @return List of user referrers. function getReferrers(address _referral) public view returns (address[] memory) { return referrers[_referral]; } /// @dev Returns total user's referral reward. /// @param _user Address of the user. /// @return Total user's referral reward. function getUserReferralReward(address _user) public view returns (uint256) { uint256 amount = 0; for (uint256 i = 0; i < referralRewards.length; i++) { ReferralRewards referralReward = referralRewards[i]; amount = amount.add(referralReward.getReferralReward(_user)); } return amount; } /// @dev Returns trusted referral reward contracts. /// @return List of trusted referral reward contracts. function getReferralRewards() public view returns (ReferralRewards[] memory) { return referralRewards; } }
pragma solidity ^0.6.0; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/math/Math.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./ReferralTree.sol"; import "./dANT.sol"; import "./ReferralRewards.sol"; abstract contract Rewards is Ownable { using SafeMath for uint256; event Deposit( address indexed user, uint256 indexed id, uint256 amount, uint256 start, uint256 end ); event Withdraw( address indexed user, uint256 indexed id, uint256 amount, uint256 time ); event RewardPaid(address indexed user, uint256 amount); // Info of each deposit made by the user struct DepositInfo { uint256 amount; // Amount of deposited LP tokens uint256 time; // Wnen the deposit is ended } // Info of each user struct UserInfo { uint256 amount; // Total deposited amount uint256 unfrozen; // Amount of token to be unstaked uint256 reward; // Ammount of claimed rewards uint256 lastUpdate; // Last time the user claimed rewards uint256 depositHead; // The start index in the deposit's list uint256 depositTail; // The end index in the deposit's list mapping(uint256 => DepositInfo) deposits; // User's dposits } dANT public token; // Harvested token contract ReferralRewards public referralRewards; // Contract that manages referral rewards uint256 public duration; // How long the deposit works uint256 public rewardPerSec; // Reward rate generated each second uint256 public totalStake; // Amount of all staked LP tokens uint256 public totalClaimed; // Amount of all distributed rewards uint256 public lastUpdate; // Last time someone received rewards bool public isActive = true; // If the deposits are allowed mapping(address => UserInfo) public userInfo; // Info per each user /// @dev Constructor that initializes the most important configurations. /// @param _token Token to be staked and harvested. /// @param _duration How long the deposit works. /// @param _rewardPerSec Reward rate generated each second. constructor( dANT _token, uint256 _duration, uint256 _rewardPerSec ) public Ownable() { token = _token; duration = _duration; rewardPerSec = _rewardPerSec; } /// @dev Allows an owner to stop or countinue deposits. /// @param _isActive Whether the deposits are allowed. function setActive(bool _isActive) public onlyOwner { isActive = _isActive; } /// @dev Allows an owner to update referral rewards module. /// @param _referralRewards Contract that manages referral rewards. function setReferralRewards(ReferralRewards _referralRewards) public onlyOwner { referralRewards = _referralRewards; } /// @dev Allows an owner to update duration of the deposits. /// @param _duration How long the deposit works. function setDuration(uint256 _duration) public onlyOwner { duration = _duration; } /// @dev Allows an owner to update reward rate per sec. /// @param _rewardPerSec Reward rate generated each second. function setRewardPerSec(uint256 _rewardPerSec) public onlyOwner { rewardPerSec = _rewardPerSec; } /// @dev Allows to stake for the specific user. /// @param _user Deposit receiver. /// @param _amount Amount of deposit. function stakeFor(address _user, uint256 _amount) public { require( referralRewards.getReferral(_user) != address(0), "stakeFor: referral isn't set" ); proccessStake(_user, _amount, address(0)); } /// @dev Allows to stake for themselves. /// @param _amount Amount of deposit. /// @param _refferal Referral address that will be set in case of the first stake. function stake(uint256 _amount, address _refferal) public { proccessStake(msg.sender, _amount, _refferal); } /// @dev Proccess the stake. /// @param _receiver Deposit receiver. /// @param _amount Amount of deposit. /// @param _refferal Referral address that will be set in case of the first stake. function proccessStake( address _receiver, uint256 _amount, address _refferal ) internal { require(isActive, "stake: is paused"); referralRewards.setReferral(_receiver, _refferal); referralRewards.claimAllDividends(_receiver); updateStakingReward(_receiver); if (_amount > 0) { token.transferFrom(msg.sender, address(this), _amount); UserInfo storage user = userInfo[_receiver]; user.amount = user.amount.add(_amount); totalStake = totalStake.add(_amount); user.deposits[user.depositTail] = DepositInfo({ amount: _amount, time: now + duration }); emit Deposit( _receiver, user.depositTail, _amount, now, now + duration ); user.depositTail = user.depositTail.add(1); referralRewards.assessReferalDepositReward(_receiver, _amount); } } /// @dev Accumulate new reward and remove old deposits. /// @param _user Address of the user. /// @return _reward Earned reward. function accumulateStakingReward(address _user) internal virtual returns (uint256 _reward) { UserInfo storage user = userInfo[_user]; for (uint256 i = user.depositHead; i < user.depositTail; i++) { DepositInfo memory deposit = user.deposits[i]; _reward = _reward.add( Math .min(now, deposit.time) .sub(user.lastUpdate) .mul(deposit.amount) .mul(rewardPerSec) ); if (deposit.time < now) { referralRewards.claimAllDividends(_user); user.amount = user.amount.sub(deposit.amount); handleDepositEnd(_user, deposit.amount); delete user.deposits[i]; user.depositHead = user.depositHead.add(1); } } } /// @dev Assess new reward. /// @param _user Address of the user. function updateStakingReward(address _user) internal virtual { UserInfo storage user = userInfo[_user]; if (user.lastUpdate >= now) { return; } uint256 scaledReward = accumulateStakingReward(_user); uint256 reward = scaledReward.div(1e18); lastUpdate = now; user.reward = user.reward.add(reward); user.lastUpdate = now; if (reward > 0) { totalClaimed = totalClaimed.add(reward); token.mint(_user, reward); emit RewardPaid(_user, reward); } } /// @dev Procces deposit and by returning deposit. /// @param _user Address of the user. /// @param _amount Amount of the deposit. function handleDepositEnd(address _user, uint256 _amount) internal virtual { totalStake = totalStake.sub(_amount); safeTokenTransfer(_user, _amount); emit Withdraw(_user, 0, _amount, now); } /// @dev Safe token transfer. /// @param _to Address of the receiver. /// @param _amount Amount of the tokens to be sent. function safeTokenTransfer(address _to, uint256 _amount) internal { uint256 tokenBal = token.balanceOf(address(this)); if (_amount > tokenBal) { token.transfer(_to, tokenBal); } else { token.transfer(_to, _amount); } } /// @dev Returns user's unclaimed reward. /// @param _user Address of the user. /// @param _includeDeposit Should the finnished deposits be included into calculations. /// @return _reward User's reward. function getPendingReward(address _user, bool _includeDeposit) public virtual view returns (uint256 _reward) { UserInfo storage user = userInfo[_user]; for (uint256 i = user.depositHead; i < user.depositTail; i++) { DepositInfo memory deposit = user.deposits[i]; _reward = _reward.add( Math .min(now, deposit.time) .sub(user.lastUpdate) .mul(deposit.amount) .mul(rewardPerSec) .div(1e18) ); if (_includeDeposit && deposit.time < now) { _reward = _reward.add(deposit.amount); } } } /// @dev Returns claimed and unclaimed user's reward. /// @param _user Address of the user. /// @return _reward User's reward. function getReward(address _user) public virtual view returns (uint256 _reward) { UserInfo storage user = userInfo[_user]; _reward = user.reward; for (uint256 i = user.depositHead; i < user.depositTail; i++) { DepositInfo memory deposit = user.deposits[i]; _reward = _reward.add( Math .min(now, deposit.time) .sub(user.lastUpdate) .mul(deposit.amount) .mul(rewardPerSec) .div(1e18) ); } } /// @dev Returns referral stakes. /// @param _referrals List of referrals[]. /// @return _stakes List of referral stakes. function getReferralStakes(address[] memory _referrals) public view returns (uint256[] memory _stakes) { _stakes = new uint256[](_referrals.length); for (uint256 i = 0; i < _referrals.length; i++) { _stakes[i] = userInfo[_referrals[i]].amount; } } /// @dev Returns referral stake. /// @param _referral Address of referral. /// @return Deposited amount. function getReferralStake(address _referral) public view returns (uint256) { return userInfo[_referral].amount; } /// @dev Returns approximate reward assessed in the future. /// @param _delta Time to estimate. /// @return Predicted rewards. function getEstimated(uint256 _delta) public view returns (uint256) { return (now + _delta) .sub(lastUpdate) .mul(totalStake) .mul(rewardPerSec) .div(1e18); } /// @dev Returns user's deposit by id. /// @param _user Address of user. /// @param _id Deposit id. /// @return Deposited amount and deposit end time. function getDeposit(address _user, uint256 _id) public view returns (uint256, uint256) { DepositInfo memory deposit = userInfo[_user].deposits[_id]; return (deposit.amount, deposit.time); } }
pragma solidity ^0.6.0; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; contract dANT is ERC20Burnable, AccessControl { bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); /** * @dev Grants `DEFAULT_ADMIN_ROLE` to the * account that deploys the contract. * * See {ERC20-constructor}. */ constructor(uint256 initialSupply) public ERC20("Digital Antares Dollar", "dANT") AccessControl() { _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); _mint(0xE7de66EC6Fca05392Ade53E1A6c06779f029977a, initialSupply * 10**18); } /** * @dev Set the DEFAULT_ADMIN_ROLE to `_newAdmin`. * * Requirements: * * - the caller must have the `DEFAULT_ADMIN_ROLE`. */ function changeAdmin(address _newAdmin) public { require( hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "changeAdmin: bad role" ); _setupRole(DEFAULT_ADMIN_ROLE, _newAdmin); renounceRole(DEFAULT_ADMIN_ROLE, _msgSender()); } /** * @dev Creates `_amount` new tokens for `_to`. * * See {ERC20-_mint}. * * Requirements: * * - the caller must have the `MINTER_ROLE`. */ function mint(address _to, uint256 _amount) public { require(hasRole(MINTER_ROLE, _msgSender()), "mint: bad role"); _mint(_to, _amount); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <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 GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../utils/EnumerableSet.sol"; import "../utils/Address.sol"; import "../GSN/Context.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context { using EnumerableSet for EnumerableSet.AddressSet; using Address for address; struct RoleData { EnumerableSet.AddressSet members; bytes32 adminRole; } mapping (bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view returns (bool) { return _roles[role].members.contains(account); } /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) public view returns (uint256) { return _roles[role].members.length(); } /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) public view returns (address) { return _roles[role].members.at(index); } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) public virtual { require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to grant"); _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) public virtual { require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to revoke"); _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) public virtual { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { emit RoleAdminChanged(role, _roles[role].adminRole, adminRole); _roles[role].adminRole = adminRole; } function _grantRole(bytes32 role, address account) private { if (_roles[role].members.add(account)) { emit RoleGranted(role, account, _msgSender()); } } function _revokeRole(bytes32 role, address account) private { if (_roles[role].members.remove(account)) { emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../GSN/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ 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 () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow, so we distribute return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../../GSN/Context.sol"; import "./IERC20.sol"; import "../../math/SafeMath.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin guidelines: functions revert instead * of returning `false` on failure. This behavior is nonetheless conventional * and does not conflict with the expectations of ERC20 applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; /** * @dev Sets the values for {name} and {symbol}, initializes {decimals} with * a default value of 18. * * To select a different value for {decimals}, use {_setupDecimals}. * * All three of these values are immutable: they can only be set once during * construction. */ constructor (string memory name_, string memory symbol_) public { _name = name_; _symbol = symbol_; _decimals = 18; } /** * @dev Returns the name of the token. */ function name() public view returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is * called. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view returns (uint8) { return _decimals; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Sets {decimals} to a value other than the default one of 18. * * WARNING: This function should only be called from the constructor. Most * applications that interact with token contracts will not expect * {decimals} to ever change, and may work incorrectly if it does. */ function _setupDecimals(uint8 decimals_) internal { _decimals = decimals_; } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../../GSN/Context.sol"; import "./ERC20.sol"; /** * @dev Extension of {ERC20} that allows token holders to destroy both their own * tokens and those that they have an allowance for, in a way that can be * recognized off-chain (via event analysis). */ abstract contract ERC20Burnable is Context, ERC20 { using SafeMath for uint256; /** * @dev Destroys `amount` tokens from the caller. * * See {ERC20-_burn}. */ function burn(uint256 amount) public virtual { _burn(_msgSender(), amount); } /** * @dev Destroys `amount` tokens from `account`, deducting from the caller's * allowance. * * See {ERC20-_burn} and {ERC20-allowance}. * * Requirements: * * - the caller must have allowance for ``accounts``'s tokens of at least * `amount`. */ function burnFrom(address account, uint256 amount) public virtual { uint256 decreasedAllowance = allowance(account, _msgSender()).sub(amount, "ERC20: burn amount exceeds allowance"); _approve(account, _msgSender(), decreasedAllowance); _burn(account, amount); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(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) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping (bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { require(set._values.length > index, "EnumerableSet: index out of bounds"); return set._values[index]; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(value))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(value))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(value))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint256(_at(set._inner, index))); } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } }
{ "remappings": [], "optimizer": { "enabled": false, "runs": 200 }, "evmVersion": "istanbul", "libraries": { "": {} }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract dANT","name":"_token","type":"address"},{"internalType":"contract ReferralTree","name":"_referralTree","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"start","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"end","type":"uint256"}],"name":"Deposit","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":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"duration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"getDeposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_delta","type":"uint256"}],"name":"getEstimated","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"bool","name":"_includeDeposit","type":"bool"}],"name":"getPendingReward","outputs":[{"internalType":"uint256","name":"_reward","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_referral","type":"address"}],"name":"getReferralStake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_referrals","type":"address[]"}],"name":"getReferralStakes","outputs":[{"internalType":"uint256[]","name":"_stakes","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getReward","outputs":[{"internalType":"uint256","name":"_reward","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastUpdate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"referralRewards","outputs":[{"internalType":"contract ReferralRewards","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardPerSec","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"_isActive","type":"bool"}],"name":"setActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_duration","type":"uint256"}],"name":"setDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ReferralRewards","name":"_referralRewards","type":"address"}],"name":"setReferralRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewardPerSec","type":"uint256"}],"name":"setRewardPerSec","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_refferal","type":"address"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"stakeFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract dANT","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalClaimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalStake","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"unfrozen","type":"uint256"},{"internalType":"uint256","name":"reward","type":"uint256"},{"internalType":"uint256","name":"lastUpdate","type":"uint256"},{"internalType":"uint256","name":"depositHead","type":"uint256"},{"internalType":"uint256","name":"depositTail","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040526001600860006101000a81548160ff0219169083151502179055503480156200002c57600080fd5b506040516200693838038062006938833981810160405260408110156200005257600080fd5b8101908080519060200190929190805190602001909291905050508162c5c10064143603a96460006200008a620005bb60201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35082600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508160038190555080600481905550505050818130604051806060016040528069010f0cf064dd592000008152602001686c6b935b8bbd400000815260200168056bc75e2d631000008152506040518060600160405280604051806060016040528066d529ae9e860000815260200166470de4df8200008152602001662386f26fc100008152508152602001604051806060016040528066b1a2bc2ec50000815260200166354a6ba7a180008152602001661aa535d3d0c00081525081526020016040518060600160405280668e1bc9bf0400008152602001662386f26fc1000081526020016611c37937e080008152508152506040518060600160405280604051806060016040528066d529ae9e860000815260200166470de4df8200008152602001662386f26fc100008152508152602001604051806060016040528066b1a2bc2ec50000815260200166354a6ba7a180008152602001661aa535d3d0c00081525081526020016040518060600160405280668e1bc9bf0400008152602001662386f26fc1000081526020016611c37937e080008152508152506040516200031290620005c3565b808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200184600360200280838360005b83811015620003d2578082015181840152602081019050620003b5565b505050509050018360036000925b818410156200042a5782846020020151600360200280838360005b8381101562000418578082015181840152602081019050620003fb565b505050509050019260010192620003e0565b925050508260036000925b818410156200047f5782846020020151600360200280838360005b838110156200046d57808201518184015260208101905062000450565b50505050905001926001019262000435565b925050509650505050505050604051809103906000f080158015620004a8573d6000803e3d6000fd5b50600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f2fde38b62000537620005bb60201b60201c565b6040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b1580156200059a57600080fd5b505af1158015620005af573d6000803e3d6000fd5b505050505050620005d1565b600033905090565b613c6b8062002ccd83390190565b6126ec80620005e16000396000f3fe608060405234801561001057600080fd5b50600436106101585760003560e01c8063995deaba116100c3578063c04637111161007c578063c0463711146106b8578063d54ad2a1146106d6578063eeb58da5146106f4578063f2fde38b14610738578063f6be71d11461077c578063fc0c546a146107aa57610158565b8063995deaba14610469578063abdc8054146104b3578063acec338a146104f5578063adcfa77314610525578063be6b5c9114610553578063c00007b01461066057610158565b80634da63f8f116101155780634da63f8f146103275780634f41e95d1461038b578063715018a6146103a95780637acb7757146103b35780638b0e9f3f146104015780638da5cb5b1461041f57610158565b80630fb5a6b41461015d5780631959a0021461017b5780631b1ace25146101f657806322f3e2d41461024e5780632726b506146102705780632ee40908146102d9575b600080fd5b6101656107f4565b6040518082815260200191505060405180910390f35b6101bd6004803603602081101561019157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107fa565b60405180878152602001868152602001858152602001848152602001838152602001828152602001965050505050505060405180910390f35b6102386004803603602081101561020c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610836565b6040518082815260200191505060405180910390f35b610256610882565b604051808215151515815260200191505060405180910390f35b6102bc6004803603604081101561028657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610895565b604051808381526020018281526020019250505060405180910390f35b610325600480360360408110156102ef57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061092a565b005b6103756004803603604081101561033d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803515159060200190929190505050610ab6565b6040518082815260200191505060405180910390f35b610393610c0f565b6040518082815260200191505060405180910390f35b6103b1610c15565b005b6103ff600480360360408110156103c957600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d9d565b005b610409610dac565b6040518082815260200191505060405180910390f35b610427610db2565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610471610ddb565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104df600480360360208110156104c957600080fd5b8101908080359060200190929190505050610e01565b6040518082815260200191505060405180910390f35b6105236004803603602081101561050b57600080fd5b81019080803515159060200190929190505050610e63565b005b6105516004803603602081101561053b57600080fd5b8101908080359060200190929190505050610f49565b005b6106096004803603602081101561056957600080fd5b810190808035906020019064010000000081111561058657600080fd5b82018360208201111561059857600080fd5b803590602001918460208302840111640100000000831117156105ba57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050919291929050505061101c565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561064c578082015181840152602081019050610631565b505050509050019250505060405180910390f35b6106a26004803603602081101561067657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506110e1565b6040518082815260200191505060405180910390f35b6106c0611211565b6040518082815260200191505060405180910390f35b6106de611217565b6040518082815260200191505060405180910390f35b6107366004803603602081101561070a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061121d565b005b61077a6004803603602081101561074e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061132a565b005b6107a86004803603602081101561079257600080fd5b8101908080359060200190929190505050611537565b005b6107b261160a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60035481565b60096020528060005260406000206000915090508060000154908060010154908060020154908060030154908060040154908060050154905086565b6000600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001549050919050565b600860009054906101000a900460ff1681565b6000806108a0612655565b600960008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060060160008581526020019081526020016000206040518060400160405290816000820154815260200160018201548152505090508060000151816020015192509250509250929050565b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633b0f0f2f846040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156109e157600080fd5b505afa1580156109f5573d6000803e3d6000fd5b505050506040513d6020811015610a0b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161415610aa6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f7374616b65466f723a20726566657272616c2069736e2774207365740000000081525060200191505060405180910390fd5b610ab282826000611630565b5050565b600080600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506000816004015490505b8160050154811015610c0757610b18612655565b826006016000838152602001908152602001600020604051806040016040529081600082015481526020016001820154815250509050610bc8610bb9670de0b6b3a7640000610bab600454610b9d8660000151610b8f8a60030154610b81428b60200151611b98565b611bb190919063ffffffff16565b611bfb90919063ffffffff16565b611bfb90919063ffffffff16565b611c8190919063ffffffff16565b85611ccb90919063ffffffff16565b9350848015610bda5750428160200151105b15610bf957610bf6816000015185611ccb90919063ffffffff16565b93505b508080600101915050610b04565b505092915050565b60045481565b610c1d611d53565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cde576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610da8338383611630565b5050565b60055481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000610e5c670de0b6b3a7640000610e4e600454610e40600554610e32600754894201611bb190919063ffffffff16565b611bfb90919063ffffffff16565b611bfb90919063ffffffff16565b611c8190919063ffffffff16565b9050919050565b610e6b611d53565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f2c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600860006101000a81548160ff02191690831515021790555050565b610f51611d53565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611012576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b8060048190555050565b6060815160405190808252806020026020018201604052801561104e5781602001602082028038833980820191505090505b50905060008090505b82518110156110db576009600084838151811061107057fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001548282815181106110c257fe5b6020026020010181815250508080600101915050611057565b50919050565b600080600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050806002015491506000816004015490505b816005015481101561120a5761114a612655565b8260060160008381526020019081526020016000206040518060400160405290816000820154815260200160018201548152505090506111fa6111eb670de0b6b3a76400006111dd6004546111cf86600001516111c18a600301546111b3428b60200151611b98565b611bb190919063ffffffff16565b611bfb90919063ffffffff16565b611bfb90919063ffffffff16565b611c8190919063ffffffff16565b85611ccb90919063ffffffff16565b9350508080600101915050611136565b5050919050565b60075481565b60065481565b611225611d53565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146112e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b611332611d53565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146113f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611479576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806126706026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61153f611d53565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611600576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b8060038190555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600860009054906101000a900460ff166116b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f7374616b653a206973207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637543e3f084836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050600060405180830381600087803b15801561178757600080fd5b505af115801561179b573d6000803e3d6000fd5b50505050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166319aaff86846040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b15801561184057600080fd5b505af1158015611854573d6000803e3d6000fd5b5050505061186183611d5b565b6000821115611b9357600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b15801561194757600080fd5b505af115801561195b573d6000803e3d6000fd5b505050506040513d602081101561197157600080fd5b8101908080519060200190929190505050506000600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506119dd838260000154611ccb90919063ffffffff16565b81600001819055506119fa83600554611ccb90919063ffffffff16565b6005819055506040518060400160405280848152602001600354420181525081600601600083600501548152602001908152602001600020600082015181600001556020820151816001015590505080600501548473ffffffffffffffffffffffffffffffffffffffff167f7162984403f6c73c8639375d45a9187dfd04602231bd8e587c415718b5f7e5f98542600354420160405180848152602001838152602001828152602001935050505060405180910390a3611ac860018260050154611ccb90919063ffffffff16565b8160050181905550600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ab4f7a7a85856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b158015611b7957600080fd5b505af1158015611b8d573d6000803e3d6000fd5b50505050505b505050565b6000818310611ba75781611ba9565b825b905092915050565b6000611bf383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611f45565b905092915050565b600080831415611c0e5760009050611c7b565b6000828402905082848281611c1f57fe5b0414611c76576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806126966021913960400191505060405180910390fd5b809150505b92915050565b6000611cc383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612005565b905092915050565b600080828401905083811015611d49576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600033905090565b6000600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905042816003015410611daf5750611f42565b6000611dba836120cb565b90506000611dd9670de0b6b3a764000083611c8190919063ffffffff16565b905042600781905550611df9818460020154611ccb90919063ffffffff16565b83600201819055504283600301819055506000811115611f3e57611e2881600654611ccb90919063ffffffff16565b600681905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f1985836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b158015611ed757600080fd5b505af1158015611eeb573d6000803e3d6000fd5b505050508373ffffffffffffffffffffffffffffffffffffffff167fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486826040518082815260200191505060405180910390a25b5050505b50565b6000838311158290611ff2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611fb7578082015181840152602081019050611f9c565b50505050905090810190601f168015611fe45780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080831182906120b1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561207657808201518184015260208101905061205b565b50505050905090810190601f1680156120a35780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816120bd57fe5b049050809150509392505050565b600080600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506000816004015490505b81600501548110156123125761212d612655565b8260060160008381526020019081526020016000206040518060400160405290816000820154815260200160018201548152505090506121c36121b46004546121a68460000151612198886003015461218a428960200151611b98565b611bb190919063ffffffff16565b611bfb90919063ffffffff16565b611bfb90919063ffffffff16565b85611ccb90919063ffffffff16565b9350428160200151101561230457600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166319aaff86866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b15801561227257600080fd5b505af1158015612286573d6000803e3d6000fd5b505050506122a581600001518460000154611bb190919063ffffffff16565b83600001819055506122bb858260000151612319565b826006016000838152602001908152602001600020600080820160009055600182016000905550506122fb60018460040154611ccb90919063ffffffff16565b83600401819055505b508080600101915050612119565b5050919050565b61232e81600554611bb190919063ffffffff16565b60058190555061233e828261239a565b60008273ffffffffffffffffffffffffffffffffffffffff167f02f25270a4d87bea75db541cdfe559334a275b4a233520ed6c0a2429667cca948342604051808381526020018281526020019250505060405180910390a35050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561243b57600080fd5b505afa15801561244f573d6000803e3d6000fd5b505050506040513d602081101561246557600080fd5b810190808051906020019092919050505090508082111561256a57600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb84836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561252957600080fd5b505af115801561253d573d6000803e3d6000fd5b505050506040513d602081101561255357600080fd5b810190808051906020019092919050505050612650565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb84846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561261357600080fd5b505af1158015612627573d6000803e3d6000fd5b505050506040513d602081101561263d57600080fd5b8101908080519060200190929190505050505b505050565b60405180604001604052806000815260200160008152509056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a2646970667358221220b8ecbc86887a737a9e3fb9903af42002d9f819ea7a1b5a3530f85e0dff5733f464736f6c6343000602003360806040523480156200001157600080fd5b5060405162003c6b38038062003c6b83398181016040526200003791908101906200052b565b85858585858560006200004f620001fe60201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35085600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555084600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508260049060036200018292919062000206565b50816007906003620001969291906200024b565b50806010906003620001aa9291906200024b565b5083600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505050505050505050506200073c565b600033905090565b826003810192821562000238579160200282015b82811115620002375782518255916020019190600101906200021a565b5b509050620002479190620002a2565b5090565b826003800281019282156200028f579160200282015b828111156200028e578251829060036200027d929190620002ca565b509160200191906003019062000261565b5b5090506200029e91906200030f565b5090565b620002c791905b80821115620002c3576000816000905550600101620002a9565b5090565b90565b8260038101928215620002fc579160200282015b82811115620002fb578251825591602001919060010190620002de565b5b5090506200030b9190620002a2565b5090565b6200033d91905b808211156200033957600081816200032f919062000340565b5060030162000316565b5090565b90565b50600081556001016000815560010160009055565b600082601f8301126200036757600080fd5b60036200037e6200037882620005f1565b620005c3565b915081838560608402820111156200039557600080fd5b60005b83811015620003c95781620003ae8882620003d3565b84526020840193506060830192505060018101905062000398565b5050505092915050565b600082601f830112620003e557600080fd5b6003620003fc620003f68262000614565b620005c3565b915081838560208402820111156200041357600080fd5b60005b838110156200044757816200042c888262000514565b84526020840193506020830192505060018101905062000416565b5050505092915050565b600082601f8301126200046357600080fd5b60036200047a620004748262000637565b620005c3565b915081838560208402820111156200049157600080fd5b60005b83811015620004c55781620004aa888262000514565b84526020840193506020830192505060018101905062000494565b5050505092915050565b600081519050620004e081620006d4565b92915050565b600081519050620004f781620006ee565b92915050565b6000815190506200050e8162000708565b92915050565b600081519050620005258162000722565b92915050565b60008060008060008061030087890312156200054657600080fd5b60006200055689828a01620004fd565b96505060206200056989828a01620004cf565b95505060406200057c89828a01620004e6565b94505060606200058f89828a0162000451565b93505060c0620005a289828a0162000355565b9250506101e0620005b689828a0162000355565b9150509295509295509295565b6000604051905081810181811067ffffffffffffffff82111715620005e757600080fd5b8060405250919050565b600067ffffffffffffffff8211156200060957600080fd5b602082029050919050565b600067ffffffffffffffff8211156200062c57600080fd5b602082029050919050565b600067ffffffffffffffff8211156200064f57600080fd5b602082029050919050565b60006200066782620006aa565b9050919050565b60006200067b826200065a565b9050919050565b60006200068f826200065a565b9050919050565b6000620006a3826200065a565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b620006df816200066e565b8114620006eb57600080fd5b50565b620006f98162000682565b81146200070557600080fd5b50565b620007138162000696565b81146200071f57600080fd5b50565b6200072d81620006ca565b81146200073957600080fd5b50565b61351f806200074c6000396000f3fe608060405234801561001057600080fd5b50600436106101a95760003560e01c8063715018a6116100f9578063ab4f7a7a11610097578063e7e2fe1911610071578063e7e2fe19146104bd578063f2fde38b146104db578063f3c13a12146104f7578063fc0c546a14610527576101a9565b8063ab4f7a7a14610455578063ad35710114610471578063c72b50fd146104a1576101a9565b80638da5cb5b116100d35780638da5cb5b146103a757806393af7adc146103c5578063a6a9fcfa146103f5578063a7749d1c14610425576101a9565b8063715018a6146103515780637543e3f01461035b578063767bd4ba14610377576101a9565b80633a294ba31161016657806353d4e7f51161014057806353d4e7f5146102d8578063668038e0146102f65780636dcc2b3a146103005780636e18b6db1461031e576101a9565b80633a294ba31461025c5780633b0f0f2f14610278578063414eff13146102a8576101a9565b80630b3cb9d2146101ae5780630d434226146101cc578063168b85cf146101e857806319aaff8614610204578063396fe62714610220578063397f66901461023e575b600080fd5b6101b6610545565b6040516101c3919061319b565b60405180910390f35b6101e660048036036101e1919081019061292d565b61054a565b005b61020260048036036101fd91908101906129d4565b61054e565b005b61021e6004803603610219919081019061289f565b6105f9565b005b6102286106ed565b604051610235919061302a565b60405180910390f35b610246610770565b6040516102539190613083565b60405180910390f35b610276600480360361027191908101906129aa565b610796565b005b610292600480360361028d919081019061289f565b610841565b60405161029f9190612f9b565b60405180910390f35b6102c260048036036102bd919081019061289f565b6108f5565b6040516102cf919061319b565b60405180910390f35b6102e0610c3c565b6040516102ed919061302a565b60405180910390f35b6102fe610cbf565b005b610308610cca565b604051610315919061319b565b60405180910390f35b6103386004803603610333919081019061289f565b610ccf565b60405161034894939291906131b6565b60405180910390f35b610359610cff565b005b610375600480360361037091908101906128f1565b610e54565b005b610391600480360361038c9190810190612a7f565b610f77565b60405161039e919061319b565b60405180910390f35b6103af610f8f565b6040516103bc9190612f9b565b60405180910390f35b6103df60048036036103da9190810190612a7f565b610fb8565b6040516103ec9190613046565b60405180910390f35b61040f600480360361040a919081019061289f565b61104d565b60405161041c9190613046565b60405180910390f35b61043f600480360361043a91908101906129fd565b611123565b60405161044c9190613061565b60405180910390f35b61046f600480360361046a919081019061292d565b6111fa565b005b61048b60048036036104869190810190612ad1565b61177a565b604051610498919061319b565b60405180910390f35b6104bb60048036036104b691908101906129aa565b6117a2565b005b6104c561184d565b6040516104d29190613046565b60405180910390f35b6104f560048036036104f0919081019061289f565b611898565b005b610511600480360361050c9190810190612ad1565b611a5c565b60405161051e919061319b565b60405180910390f35b61052f611a84565b60405161053c919061309e565b60405180910390f35b600381565b5050565b610556611aaa565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105db9061313b565b60405180910390fd5b8060049060036105f5929190612345565b5050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806106a25750600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b6106e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106d89061315b565b60405180910390fd5b6106ea81611ab2565b50565b6106f5612385565b6010600380602002604051908101604052809291906000905b8282101561076757838260030201600380602002604051908101604052809291908260038015610753576020028201915b81548152602001906001019080831161073f575b50505050508152602001906001019061070e565b50505050905090565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61079e611aaa565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461082c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108239061313b565b60405180910390fd5b80601090600361083d9291906123b2565b5050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639ca423b3836040518263ffffffff1660e01b815260040161089e9190612f9b565b60206040518083038186803b1580156108b657600080fd5b505afa1580156108ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506108ee91908101906128c8565b9050919050565b600080601960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634f41e95d6040518163ffffffff1660e01b815260040160206040518083038186803b1580156109a357600080fd5b505afa1580156109b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506109db9190810190612aa8565b90506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631b1ace25866040518263ffffffff1660e01b8152600401610a3a9190612f9b565b60206040518083038186803b158015610a5257600080fd5b505afa158015610a66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610a8a9190810190612aa8565b9050610a94612402565b610a9d82610fb8565b90506000846000015490506000856002015490505b8560030154811015610c1457610ac6612424565b8660070160008381526020019081526020016000206040518060a00160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016001820154815260200160028201548152602001600382015481526020016004820154815250509050610c04610bf5670de0b6b3a7640000610be787856020015160038110610b8857fe5b6020020151610bd98b610bcb8860400151610bbd8a60800151610baf428d60600151611c4c565b611c6590919063ffffffff16565b611caf90919063ffffffff16565b611caf90919063ffffffff16565b611caf90919063ffffffff16565b611d1f90919063ffffffff16565b84611d6990919063ffffffff16565b9250508080600101915050610ab2565b50610c30670de0b6b3a764000082611d1f90919063ffffffff16565b95505050505050919050565b610c44612385565b6007600380602002604051908101604052809291906000905b82821015610cb657838260030201600380602002604051908101604052809291908260038015610ca2576020028201915b815481526020019060010190808311610c8e575b505050505081526020019060010190610c5d565b50505050905090565b610cc833611ab2565b565b600381565b60196020528060005260406000206000915090508060000154908060010154908060020154908060030154905084565b610d07611aaa565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d95576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d8c9061313b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ee4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610edb9061317b565b60405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637543e3f083836040518363ffffffff1660e01b8152600401610f41929190612fb6565b600060405180830381600087803b158015610f5b57600080fd5b505af1158015610f6f573d6000803e3d6000fd5b505050505050565b60048160038110610f8457fe5b016000915090505481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610fc0612402565b60008090505b60038110156110465760048160038110610fdc57fe5b015483106110395760108160038110610ff157fe5b6003020160038060200260405190810160405280929190826003801561102c576020028201915b815481526020019060010190808311611018575b5050505050915050611048565b8080600101915050610fc6565b505b919050565b611055612402565b61105d612469565b601960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060a0016040529081600082015481526020016001820154815260200160028201548152602001600382015481526020016004820160038060200260405190810160405280929190826003801561110b576020028201915b8154815260200190600101908083116110f7575b50505050508152505090508060800151915050919050565b606081516040519080825280602002602001820160405280156111555781602001602082028038833980820191505090505b50905060008090505b82518110156111f45760008090505b60038110156111e6576004816003811061118357fe5b015484838151811061119157fe5b6020026020010151106111d957600781600381106111ab57fe5b6003020182600381106111ba57fe5b01548383815181106111c857fe5b6020026020010181815250506111e6565b808060010191505061116d565b50808060010191505061115e565b50919050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461128a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112819061317b565b60405180910390fd5b6060600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166332a00d8e8460036040518363ffffffff1660e01b81526004016112ea929190612fdf565b60006040518083038186803b15801561130257600080fd5b505afa158015611316573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525061133f9190810190612969565b90506060600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663be6b5c91836040518263ffffffff1660e01b815260040161139e9190613008565b60006040518083038186803b1580156113b657600080fd5b505afa1580156113ca573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506113f39190810190612a3e565b9050606061140082611123565b905060008090505b835181101561177257600073ffffffffffffffffffffffffffffffffffffffff1684828151811061143557fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16141561145e57611765565b60006019600086848151811061147057fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506040518060a001604052808873ffffffffffffffffffffffffffffffffffffffff168152602001838152602001878152602001600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630fb5a6b46040518163ffffffff1660e01b815260040160206040518083038186803b15801561154f57600080fd5b505afa158015611563573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506115879190810190612aa8565b42018152602001428152508160070160008360030154815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550602082015181600101556040820151816002015560608201518160030155608082015181600401559050506116408682600401846003811061163057fe5b0154611d6990919063ffffffff16565b81600401836003811061164f57fe5b018190555061166c60018260030154611d6990919063ffffffff16565b8160030181905550600083838151811061168257fe5b602002602001015114156116965750611765565b60006116be8484815181106116a757fe5b602002602001015188611caf90919063ffffffff16565b90506000811115611762576116e0818360000154611d6990919063ffffffff16565b8260000181905550828684815181106116f557fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167f4fc64bb58b238ade3c987f7668ff5ada4fe2ffb713d8254fefaa0252a5ba564c84604051611759919061319b565b60405180910390a45b50505b8080600101915050611408565b505050505050565b6010826003811061178757fe5b60030201816003811061179657fe5b01600091509150505481565b6117aa611aaa565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611838576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161182f9061313b565b60405180910390fd5b8060079060036118499291906123b2565b5050565b611855612402565b600460038060200260405190810160405280929190826003801561188e576020028201915b81548152602001906001019080831161187a575b5050505050905090565b6118a0611aaa565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461192e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119259061313b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561199e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611995906130db565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60078260038110611a6957fe5b600302018160038110611a7857fe5b01600091509150505481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600033905090565b611abb81611dbe565b6000601960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506000611b1f670de0b6b3a76400008360000154611d1f90919063ffffffff16565b90506000811115611c47576000611b47670de0b6b3a764000083611caf90919063ffffffff16565b9050611b60818460000154611c6590919063ffffffff16565b8360000181905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f1985846040518363ffffffff1660e01b8152600401611bc5929190612fdf565b600060405180830381600087803b158015611bdf57600080fd5b505af1158015611bf3573d6000803e3d6000fd5b505050508373ffffffffffffffffffffffffffffffffffffffff167f04b20935b234f45fda390d2df59d92b7bb8bed322d3bc8764e826cfff50007d583604051611c3d919061319b565b60405180910390a2505b505050565b6000818310611c5b5781611c5d565b825b905092915050565b6000611ca783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612289565b905092915050565b600080831415611cc25760009050611d19565b6000828402905082848281611cd357fe5b0414611d14576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d0b9061311b565b60405180910390fd5b809150505b92915050565b6000611d6183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506122e4565b905092915050565b600080828401905083811015611db4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dab906130fb565b60405180910390fd5b8091505092915050565b6000601960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905042816001015410611e125750612286565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634f41e95d6040518163ffffffff1660e01b815260040160206040518083038186803b158015611e7c57600080fd5b505afa158015611e90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611eb49190810190612aa8565b90506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631b1ace25856040518263ffffffff1660e01b8152600401611f139190612f9b565b60206040518083038186803b158015611f2b57600080fd5b505afa158015611f3f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611f639190810190612aa8565b9050611f6d612402565b611f7682610fb8565b90506000846002015490505b846003015481101561227757611f96612424565b8560070160008381526020019081526020016000206040518060a00160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015481526020016002820154815260200160038201548152602001600482015481525050905060006120c4670de0b6b3a76400006120b68685602001516003811061205757fe5b60200201516120a88a61209a886040015161208c8a6080015161207e428d60600151611c4c565b611c6590919063ffffffff16565b611caf90919063ffffffff16565b611caf90919063ffffffff16565b611caf90919063ffffffff16565b611d1f90919063ffffffff16565b905060008111156120ef576120e6818860000154611d6990919063ffffffff16565b87600001819055505b4287600701600085815260200190815260200160002060040181905550428260600151101561226857866002015483146121e457866007016000886002015481526020019081526020016000208760070160008581526020019081526020016000206000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600182015481600101556002820154816002015560038201548160030155600482015481600401559050505b86600701600088600201548152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001820160009055600282016000905560038201600090556004820160009055505061225f60018860020154611d6990919063ffffffff16565b87600201819055505b50508080600101915050611f82565b50428460010181905550505050505b50565b60008383111582906122d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122c891906130b9565b60405180910390fd5b5060008385039050809150509392505050565b6000808311829061232b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161232291906130b9565b60405180910390fd5b50600083858161233757fe5b049050809150509392505050565b8260038101928215612374579160200282015b82811115612373578251825591602001919060010190612358565b5b509050612381919061249e565b5090565b60405180606001604052806003905b61239c6124c3565b8152602001906001900390816123945790505090565b826003800281019282156123f1579160200282015b828111156123f0578251829060036123e09291906124e5565b50916020019190600301906123c7565b5b5090506123fe9190612525565b5090565b6040518060600160405280600390602082028038833980820191505090505090565b6040518060a00160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600081526020016000815260200160008152602001600081525090565b6040518060a00160405280600081526020016000815260200160008152602001600081526020016124986124c3565b81525090565b6124c091905b808211156124bc5760008160009055506001016124a4565b5090565b90565b6040518060600160405280600390602082028038833980820191505090505090565b8260038101928215612514579160200282015b828111156125135782518255916020019190600101906124f8565b5b509050612521919061249e565b5090565b61254e91905b8082111561254a57600081816125419190612551565b5060030161252b565b5090565b90565b50600081556001016000815560010160009055565b600081359050612575816134bb565b92915050565b60008151905061258a816134bb565b92915050565b600082601f8301126125a157600080fd5b81516125b46125af82613228565b6131fb565b915081818352602084019350602081019050838560208402820111156125d957600080fd5b60005b8381101561260957816125ef888261257b565b8452602084019350602083019250506001810190506125dc565b5050505092915050565b600082601f83011261262457600080fd5b600361263761263282613250565b6131fb565b9150818385606084028201111561264d57600080fd5b60005b8381101561267d57816126638882612687565b845260208401935060608301925050600181019050612650565b5050505092915050565b600082601f83011261269857600080fd5b60036126ab6126a682613272565b6131fb565b915081838560208402820111156126c157600080fd5b60005b838110156126f157816126d78882612875565b8452602084019350602083019250506001810190506126c4565b5050505092915050565b600082601f83011261270c57600080fd5b600361271f61271a82613294565b6131fb565b9150818385602084028201111561273557600080fd5b60005b83811015612765578161274b8882612875565b845260208401935060208301925050600181019050612738565b5050505092915050565b600082601f83011261278057600080fd5b813561279361278e826132b6565b6131fb565b915081818352602084019350602081019050838560208402820111156127b857600080fd5b60005b838110156127e857816127ce8882612875565b8452602084019350602083019250506001810190506127bb565b5050505092915050565b600082601f83011261280357600080fd5b8151612816612811826132b6565b6131fb565b9150818183526020840193506020810190508385602084028201111561283b57600080fd5b60005b8381101561286b5781612851888261288a565b84526020840193506020830192505060018101905061283e565b5050505092915050565b600081359050612884816134d2565b92915050565b600081519050612899816134d2565b92915050565b6000602082840312156128b157600080fd5b60006128bf84828501612566565b91505092915050565b6000602082840312156128da57600080fd5b60006128e88482850161257b565b91505092915050565b6000806040838503121561290457600080fd5b600061291285828601612566565b925050602061292385828601612566565b9150509250929050565b6000806040838503121561294057600080fd5b600061294e85828601612566565b925050602061295f85828601612875565b9150509250929050565b60006020828403121561297b57600080fd5b600082015167ffffffffffffffff81111561299557600080fd5b6129a184828501612590565b91505092915050565b600061012082840312156129bd57600080fd5b60006129cb84828501612613565b91505092915050565b6000606082840312156129e657600080fd5b60006129f4848285016126fb565b91505092915050565b600060208284031215612a0f57600080fd5b600082013567ffffffffffffffff811115612a2957600080fd5b612a358482850161276f565b91505092915050565b600060208284031215612a5057600080fd5b600082015167ffffffffffffffff811115612a6a57600080fd5b612a76848285016127f2565b91505092915050565b600060208284031215612a9157600080fd5b6000612a9f84828501612875565b91505092915050565b600060208284031215612aba57600080fd5b6000612ac88482850161288a565b91505092915050565b60008060408385031215612ae457600080fd5b6000612af285828601612875565b9250506020612b0385828601612875565b9150509250929050565b6000612b198383612b55565b60208301905092915050565b6000612b318383612c7f565b60608301905092915050565b6000612b498383612f7d565b60208301905092915050565b612b5e816133f3565b82525050565b612b6d816133f3565b82525050565b6000612b7e8261331c565b612b88818561339f565b9350612b93836132de565b8060005b83811015612bc4578151612bab8882612b0d565b9750612bb68361335e565b925050600181019050612b97565b5085935050505092915050565b612bda81613327565b612be481846133b0565b9250612bef826132ee565b8060005b83811015612c20578151612c078782612b25565b9650612c128361336b565b925050600181019050612bf3565b505050505050565b612c318161333d565b612c3b81846133c6565b9250612c4682613302565b8060005b83811015612c77578151612c5e8782612b3d565b9650612c6983613385565b925050600181019050612c4a565b505050505050565b612c8881613332565b612c9281846133bb565b9250612c9d826132f8565b8060005b83811015612cce578151612cb58782612b3d565b9650612cc083613378565b925050600181019050612ca1565b505050505050565b6000612ce182613348565b612ceb81856133d1565b9350612cf68361330c565b8060005b83811015612d27578151612d0e8882612b3d565b9750612d1983613392565b925050600181019050612cfa565b5085935050505092915050565b612d3d8161342f565b82525050565b612d4c81613453565b82525050565b6000612d5d82613353565b612d6781856133e2565b9350612d77818560208601613477565b612d80816134aa565b840191505092915050565b6000612d986026836133e2565b91507f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008301527f64647265737300000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000612dfe601b836133e2565b91507f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006000830152602082019050919050565b6000612e3e6021836133e2565b91507f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008301527f77000000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000612ea46020836133e2565b91507f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726000830152602082019050919050565b6000612ee4601b836133e2565b91507f636c61696d416c6c4469766964656e64733a2062616420726f6c6500000000006000830152602082019050919050565b6000612f246024836133e2565b91507f6173736573735265666572616c4465706f7369745265776172643a206261642060008301527f726f6c65000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b612f8681613425565b82525050565b612f9581613425565b82525050565b6000602082019050612fb06000830184612b64565b92915050565b6000604082019050612fcb6000830185612b64565b612fd86020830184612b64565b9392505050565b6000604082019050612ff46000830185612b64565b6130016020830184612f8c565b9392505050565b600060208201905081810360008301526130228184612b73565b905092915050565b6000610120820190506130406000830184612bd1565b92915050565b600060608201905061305b6000830184612c28565b92915050565b6000602082019050818103600083015261307b8184612cd6565b905092915050565b60006020820190506130986000830184612d34565b92915050565b60006020820190506130b36000830184612d43565b92915050565b600060208201905081810360008301526130d38184612d52565b905092915050565b600060208201905081810360008301526130f481612d8b565b9050919050565b6000602082019050818103600083015261311481612df1565b9050919050565b6000602082019050818103600083015261313481612e31565b9050919050565b6000602082019050818103600083015261315481612e97565b9050919050565b6000602082019050818103600083015261317481612ed7565b9050919050565b6000602082019050818103600083015261319481612f17565b9050919050565b60006020820190506131b06000830184612f8c565b92915050565b60006080820190506131cb6000830187612f8c565b6131d86020830186612f8c565b6131e56040830185612f8c565b6131f26060830184612f8c565b95945050505050565b6000604051905081810181811067ffffffffffffffff8211171561321e57600080fd5b8060405250919050565b600067ffffffffffffffff82111561323f57600080fd5b602082029050602081019050919050565b600067ffffffffffffffff82111561326757600080fd5b602082029050919050565b600067ffffffffffffffff82111561328957600080fd5b602082029050919050565b600067ffffffffffffffff8211156132ab57600080fd5b602082029050919050565b600067ffffffffffffffff8211156132cd57600080fd5b602082029050602081019050919050565b6000819050602082019050919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000819050602082019050919050565b600081519050919050565b600060039050919050565b600060039050919050565b600060039050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600081905092915050565b600081905092915050565b600081905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b60006133fe82613405565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600061343a82613441565b9050919050565b600061344c82613405565b9050919050565b600061345e82613465565b9050919050565b600061347082613405565b9050919050565b60005b8381101561349557808201518184015260208101905061347a565b838111156134a4576000848401525b50505050565b6000601f19601f8301169050919050565b6134c4816133f3565b81146134cf57600080fd5b50565b6134db81613425565b81146134e657600080fd5b5056fea264697066735822122078c91550394d860d2cd67c58eda5fa6ed160d7b6ae285c10be4b2937cf3a127564736f6c63430006020033000000000000000000000000be3c393fb670f0a29c3f3e660ffb113200e36676000000000000000000000000e5c23851bbde700414beb3ab2d2ae7063c8d9c72
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101585760003560e01c8063995deaba116100c3578063c04637111161007c578063c0463711146106b8578063d54ad2a1146106d6578063eeb58da5146106f4578063f2fde38b14610738578063f6be71d11461077c578063fc0c546a146107aa57610158565b8063995deaba14610469578063abdc8054146104b3578063acec338a146104f5578063adcfa77314610525578063be6b5c9114610553578063c00007b01461066057610158565b80634da63f8f116101155780634da63f8f146103275780634f41e95d1461038b578063715018a6146103a95780637acb7757146103b35780638b0e9f3f146104015780638da5cb5b1461041f57610158565b80630fb5a6b41461015d5780631959a0021461017b5780631b1ace25146101f657806322f3e2d41461024e5780632726b506146102705780632ee40908146102d9575b600080fd5b6101656107f4565b6040518082815260200191505060405180910390f35b6101bd6004803603602081101561019157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107fa565b60405180878152602001868152602001858152602001848152602001838152602001828152602001965050505050505060405180910390f35b6102386004803603602081101561020c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610836565b6040518082815260200191505060405180910390f35b610256610882565b604051808215151515815260200191505060405180910390f35b6102bc6004803603604081101561028657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610895565b604051808381526020018281526020019250505060405180910390f35b610325600480360360408110156102ef57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061092a565b005b6103756004803603604081101561033d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803515159060200190929190505050610ab6565b6040518082815260200191505060405180910390f35b610393610c0f565b6040518082815260200191505060405180910390f35b6103b1610c15565b005b6103ff600480360360408110156103c957600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d9d565b005b610409610dac565b6040518082815260200191505060405180910390f35b610427610db2565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610471610ddb565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104df600480360360208110156104c957600080fd5b8101908080359060200190929190505050610e01565b6040518082815260200191505060405180910390f35b6105236004803603602081101561050b57600080fd5b81019080803515159060200190929190505050610e63565b005b6105516004803603602081101561053b57600080fd5b8101908080359060200190929190505050610f49565b005b6106096004803603602081101561056957600080fd5b810190808035906020019064010000000081111561058657600080fd5b82018360208201111561059857600080fd5b803590602001918460208302840111640100000000831117156105ba57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050919291929050505061101c565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561064c578082015181840152602081019050610631565b505050509050019250505060405180910390f35b6106a26004803603602081101561067657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506110e1565b6040518082815260200191505060405180910390f35b6106c0611211565b6040518082815260200191505060405180910390f35b6106de611217565b6040518082815260200191505060405180910390f35b6107366004803603602081101561070a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061121d565b005b61077a6004803603602081101561074e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061132a565b005b6107a86004803603602081101561079257600080fd5b8101908080359060200190929190505050611537565b005b6107b261160a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60035481565b60096020528060005260406000206000915090508060000154908060010154908060020154908060030154908060040154908060050154905086565b6000600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001549050919050565b600860009054906101000a900460ff1681565b6000806108a0612655565b600960008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060060160008581526020019081526020016000206040518060400160405290816000820154815260200160018201548152505090508060000151816020015192509250509250929050565b600073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633b0f0f2f846040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156109e157600080fd5b505afa1580156109f5573d6000803e3d6000fd5b505050506040513d6020811015610a0b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff161415610aa6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f7374616b65466f723a20726566657272616c2069736e2774207365740000000081525060200191505060405180910390fd5b610ab282826000611630565b5050565b600080600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506000816004015490505b8160050154811015610c0757610b18612655565b826006016000838152602001908152602001600020604051806040016040529081600082015481526020016001820154815250509050610bc8610bb9670de0b6b3a7640000610bab600454610b9d8660000151610b8f8a60030154610b81428b60200151611b98565b611bb190919063ffffffff16565b611bfb90919063ffffffff16565b611bfb90919063ffffffff16565b611c8190919063ffffffff16565b85611ccb90919063ffffffff16565b9350848015610bda5750428160200151105b15610bf957610bf6816000015185611ccb90919063ffffffff16565b93505b508080600101915050610b04565b505092915050565b60045481565b610c1d611d53565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cde576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610da8338383611630565b5050565b60055481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000610e5c670de0b6b3a7640000610e4e600454610e40600554610e32600754894201611bb190919063ffffffff16565b611bfb90919063ffffffff16565b611bfb90919063ffffffff16565b611c8190919063ffffffff16565b9050919050565b610e6b611d53565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f2c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600860006101000a81548160ff02191690831515021790555050565b610f51611d53565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611012576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b8060048190555050565b6060815160405190808252806020026020018201604052801561104e5781602001602082028038833980820191505090505b50905060008090505b82518110156110db576009600084838151811061107057fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001548282815181106110c257fe5b6020026020010181815250508080600101915050611057565b50919050565b600080600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050806002015491506000816004015490505b816005015481101561120a5761114a612655565b8260060160008381526020019081526020016000206040518060400160405290816000820154815260200160018201548152505090506111fa6111eb670de0b6b3a76400006111dd6004546111cf86600001516111c18a600301546111b3428b60200151611b98565b611bb190919063ffffffff16565b611bfb90919063ffffffff16565b611bfb90919063ffffffff16565b611c8190919063ffffffff16565b85611ccb90919063ffffffff16565b9350508080600101915050611136565b5050919050565b60075481565b60065481565b611225611d53565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146112e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b611332611d53565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146113f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611479576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806126706026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61153f611d53565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611600576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b8060038190555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600860009054906101000a900460ff166116b2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f7374616b653a206973207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637543e3f084836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050600060405180830381600087803b15801561178757600080fd5b505af115801561179b573d6000803e3d6000fd5b50505050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166319aaff86846040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b15801561184057600080fd5b505af1158015611854573d6000803e3d6000fd5b5050505061186183611d5b565b6000821115611b9357600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b15801561194757600080fd5b505af115801561195b573d6000803e3d6000fd5b505050506040513d602081101561197157600080fd5b8101908080519060200190929190505050506000600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506119dd838260000154611ccb90919063ffffffff16565b81600001819055506119fa83600554611ccb90919063ffffffff16565b6005819055506040518060400160405280848152602001600354420181525081600601600083600501548152602001908152602001600020600082015181600001556020820151816001015590505080600501548473ffffffffffffffffffffffffffffffffffffffff167f7162984403f6c73c8639375d45a9187dfd04602231bd8e587c415718b5f7e5f98542600354420160405180848152602001838152602001828152602001935050505060405180910390a3611ac860018260050154611ccb90919063ffffffff16565b8160050181905550600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ab4f7a7a85856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b158015611b7957600080fd5b505af1158015611b8d573d6000803e3d6000fd5b50505050505b505050565b6000818310611ba75781611ba9565b825b905092915050565b6000611bf383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611f45565b905092915050565b600080831415611c0e5760009050611c7b565b6000828402905082848281611c1f57fe5b0414611c76576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806126966021913960400191505060405180910390fd5b809150505b92915050565b6000611cc383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612005565b905092915050565b600080828401905083811015611d49576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600033905090565b6000600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905042816003015410611daf5750611f42565b6000611dba836120cb565b90506000611dd9670de0b6b3a764000083611c8190919063ffffffff16565b905042600781905550611df9818460020154611ccb90919063ffffffff16565b83600201819055504283600301819055506000811115611f3e57611e2881600654611ccb90919063ffffffff16565b600681905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f1985836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b158015611ed757600080fd5b505af1158015611eeb573d6000803e3d6000fd5b505050508373ffffffffffffffffffffffffffffffffffffffff167fe2403640ba68fed3a2f88b7557551d1993f84b99bb10ff833f0cf8db0c5e0486826040518082815260200191505060405180910390a25b5050505b50565b6000838311158290611ff2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611fb7578082015181840152602081019050611f9c565b50505050905090810190601f168015611fe45780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080831182906120b1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561207657808201518184015260208101905061205b565b50505050905090810190601f1680156120a35780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816120bd57fe5b049050809150509392505050565b600080600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506000816004015490505b81600501548110156123125761212d612655565b8260060160008381526020019081526020016000206040518060400160405290816000820154815260200160018201548152505090506121c36121b46004546121a68460000151612198886003015461218a428960200151611b98565b611bb190919063ffffffff16565b611bfb90919063ffffffff16565b611bfb90919063ffffffff16565b85611ccb90919063ffffffff16565b9350428160200151101561230457600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166319aaff86866040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b15801561227257600080fd5b505af1158015612286573d6000803e3d6000fd5b505050506122a581600001518460000154611bb190919063ffffffff16565b83600001819055506122bb858260000151612319565b826006016000838152602001908152602001600020600080820160009055600182016000905550506122fb60018460040154611ccb90919063ffffffff16565b83600401819055505b508080600101915050612119565b5050919050565b61232e81600554611bb190919063ffffffff16565b60058190555061233e828261239a565b60008273ffffffffffffffffffffffffffffffffffffffff167f02f25270a4d87bea75db541cdfe559334a275b4a233520ed6c0a2429667cca948342604051808381526020018281526020019250505060405180910390a35050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561243b57600080fd5b505afa15801561244f573d6000803e3d6000fd5b505050506040513d602081101561246557600080fd5b810190808051906020019092919050505090508082111561256a57600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb84836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561252957600080fd5b505af115801561253d573d6000803e3d6000fd5b505050506040513d602081101561255357600080fd5b810190808051906020019092919050505050612650565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb84846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561261357600080fd5b505af1158015612627573d6000803e3d6000fd5b505050506040513d602081101561263d57600080fd5b8101908080519060200190929190505050505b505050565b60405180604001604052806000815260200160008152509056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a2646970667358221220b8ecbc86887a737a9e3fb9903af42002d9f819ea7a1b5a3530f85e0dff5733f464736f6c63430006020033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000be3c393fb670f0a29c3f3e660ffb113200e36676000000000000000000000000e5c23851bbde700414beb3ab2d2ae7063c8d9c72
-----Decoded View---------------
Arg [0] : _token (address): 0xbE3c393Fb670f0A29C3F3E660FFB113200e36676
Arg [1] : _referralTree (address): 0xe5C23851Bbde700414BeB3Ab2D2aE7063c8D9C72
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000be3c393fb670f0a29c3f3e660ffb113200e36676
Arg [1] : 000000000000000000000000e5c23851bbde700414beb3ab2d2ae7063c8d9c72
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 23 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ 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.