Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
11498757 | 1365 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x604D684a...95C571c40 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
ReferralRewardsType2
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; pragma experimental ABIEncoderV2; import "./ReferralRewards.sol"; contract ReferralRewardsType2 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 ) {} /// @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 override { require( msg.sender == address(rewards), "assessReferalDepositReward: bad role" ); address[] memory referrals = referralTree.getReferrals( _referrer, referDepth ); for (uint256 i = 0; i < referrals.length; i++) { if (referrals[i] == address(0)) { continue; } accumulateReward(referrals[i]); ReferralInfo storage referralInfo = referralReward[referrals[i]]; referralInfo.deposits[referralInfo.depositTail] = DepositInfo({ referrer: _referrer, depth: i, amount: _amount, lastUpdatedTime: now, time: 0 }); referralInfo.amounts[i] = referralInfo.amounts[i].add(_amount); referralInfo.depositTail = referralInfo.depositTail.add(1); } } /// @dev Update the staking referral reward for _user. /// @param _user Address of the referral. function accumulateReward(address _user) internal override { 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); if (referralInfo.lastUpdate > 0) { for (uint256 i = 0; i < referralInfo.amounts.length; i++) { uint256 reward = now .sub(referralInfo.lastUpdate) .mul(referralInfo.amounts[i]) .mul(rewardPerSec) .mul(rates[i]) .div(1e18); if (reward > 0) { referralInfo.reward = referralInfo.reward.add(reward); } } } referralInfo.lastUpdate = now; } /// @dev Allows the main farming contract 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 override { require( msg.sender == address(rewards), "removeDepositReward: bad role" ); address[] memory referrals = referralTree.getReferrals( _referrer, referDepth ); for (uint256 i = 0; i < referrals.length; i++) { if (referrals[i] == address(0)) { continue; } accumulateReward(referrals[i]); ReferralInfo storage referralInfo = referralReward[referrals[i]]; referralInfo.amounts[i] = referralInfo.amounts[i].sub(_amount); } } /// @dev Returns referral reward. /// @param _user Address of referral. /// @return Referral reward. function getReferralReward(address _user) external override 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; if (referralInfo.lastUpdate > 0) { for (uint256 i = 0; i < referralInfo.amounts.length; i++) { _reward = _reward.add( now .sub(referralInfo.lastUpdate) .mul(referralInfo.amounts[i]) .mul(rewardPerSec) .mul(rates[i]) .div(1e18) ); } } return _reward.div(1e18); } }
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; 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"},{"internalType":"contract Rewards","name":"_rewards","type":"address"},{"internalType":"uint256[3]","name":"_depositBounds","type":"uint256[3]"},{"internalType":"uint256[3][3]","name":"_depositRate","type":"uint256[3][3]"},{"internalType":"uint256[3][3]","name":"_stakingRate","type":"uint256[3][3]"}],"stateMutability":"nonpayable","type":"constructor"},{"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":"refferer","type":"address"},{"indexed":true,"internalType":"address","name":"refferal","type":"address"},{"indexed":true,"internalType":"uint256","name":"level","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ReferralDepositReward","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ReferralRewardPaid","type":"event"},{"inputs":[],"name":"amtLevels","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_referrer","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"assessReferalDepositReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_referral","type":"address"}],"name":"claimAllDividends","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimDividends","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"depositBounds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"depositRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDepositBounds","outputs":[{"internalType":"uint256[3]","name":"","type":"uint256[3]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_referralStakes","type":"uint256[]"}],"name":"getDepositRate","outputs":[{"internalType":"uint256[]","name":"_rates","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDepositRates","outputs":[{"internalType":"uint256[3][3]","name":"","type":"uint256[3][3]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getReferral","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getReferralAmounts","outputs":[{"internalType":"uint256[3]","name":"","type":"uint256[3]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getReferralReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_referralStake","type":"uint256"}],"name":"getStakingRateRange","outputs":[{"internalType":"uint256[3]","name":"_rates","type":"uint256[3]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getStakingRates","outputs":[{"internalType":"uint256[3][3]","name":"","type":"uint256[3][3]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"referDepth","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"referralReward","outputs":[{"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"},{"inputs":[],"name":"referralTree","outputs":[{"internalType":"contract ReferralTree","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_referrer","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"removeDepositReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[3]","name":"_depositBounds","type":"uint256[3]"}],"name":"setBounds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[3][3]","name":"_depositRate","type":"uint256[3][3]"}],"name":"setDepositRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_referrer","type":"address"},{"internalType":"address","name":"_referral","type":"address"}],"name":"setReferral","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[3][3]","name":"_stakingRate","type":"uint256[3][3]"}],"name":"setStakingRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"stakingRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract dANT","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101a95760003560e01c8063715018a6116100f9578063ab4f7a7a11610097578063e7e2fe1911610071578063e7e2fe19146104bd578063f2fde38b146104db578063f3c13a12146104f7578063fc0c546a14610527576101a9565b8063ab4f7a7a14610455578063ad35710114610471578063c72b50fd146104a1576101a9565b80638da5cb5b116100d35780638da5cb5b146103a757806393af7adc146103c5578063a6a9fcfa146103f5578063a7749d1c14610425576101a9565b8063715018a6146103515780637543e3f01461035b578063767bd4ba14610377576101a9565b80633a294ba31161016657806353d4e7f51161014057806353d4e7f5146102d8578063668038e0146102f65780636dcc2b3a146103005780636e18b6db1461031e576101a9565b80633a294ba31461025c5780633b0f0f2f14610278578063414eff13146102a8576101a9565b80630b3cb9d2146101ae5780630d434226146101cc578063168b85cf146101e857806319aaff8614610204578063396fe62714610220578063397f66901461023e575b600080fd5b6101b6610545565b6040516101c39190612d92565b60405180910390f35b6101e660048036036101e191908101906125ac565b61054a565b005b61020260048036036101fd9190810190612653565b6107ab565b005b61021e6004803603610219919081019061251e565b610856565b005b61022861094a565b6040516102359190612c01565b60405180910390f35b6102466109cd565b6040516102539190612c5a565b60405180910390f35b61027660048036036102719190810190612629565b6109f3565b005b610292600480360361028d919081019061251e565b610a9e565b60405161029f9190612b94565b60405180910390f35b6102c260048036036102bd919081019061251e565b610b52565b6040516102cf9190612d92565b60405180910390f35b6102e0610df2565b6040516102ed9190612c01565b60405180910390f35b6102fe610e75565b005b610308610e80565b6040516103159190612d92565b60405180910390f35b6103386004803603610333919081019061251e565b610e85565b6040516103489493929190612dad565b60405180910390f35b610359610eb5565b005b61037560048036036103709190810190612570565b61100a565b005b610391600480360361038c91908101906126bd565b61112d565b60405161039e9190612d92565b60405180910390f35b6103af611145565b6040516103bc9190612b94565b60405180910390f35b6103df60048036036103da91908101906126bd565b61116e565b6040516103ec9190612c1d565b60405180910390f35b61040f600480360361040a919081019061251e565b611203565b60405161041c9190612c1d565b60405180910390f35b61043f600480360361043a919081019061267c565b6112d9565b60405161044c9190612c38565b60405180910390f35b61046f600480360361046a91908101906125ac565b6113b0565b005b61048b6004803603610486919081019061270f565b6116fa565b6040516104989190612d92565b60405180910390f35b6104bb60048036036104b69190810190612629565b611722565b005b6104c56117cd565b6040516104d29190612c1d565b60405180910390f35b6104f560048036036104f0919081019061251e565b611818565b005b610511600480360361050c919081019061270f565b6119dc565b60405161051e9190612d92565b60405180910390f35b61052f611a04565b60405161053c9190612c75565b60405180910390f35b600381565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146105da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105d190612cf2565b60405180910390fd5b6060600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166332a00d8e8460036040518363ffffffff1660e01b815260040161063a929190612bd8565b60006040518083038186803b15801561065257600080fd5b505afa158015610666573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f8201168201806040525061068f91908101906125e8565b905060008090505b81518110156107a557600073ffffffffffffffffffffffffffffffffffffffff168282815181106106c457fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614156106ed57610798565b6107098282815181106106fc57fe5b6020026020010151611a2a565b60006019600084848151811061071b57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506107828482600401846003811061077257fe5b0154611cd590919063ffffffff16565b81600401836003811061079157fe5b0181905550505b8080600101915050610697565b50505050565b6107b3611d1f565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610841576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161083890612d32565b60405180910390fd5b80600490600361085292919061208c565b5050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806108ff5750600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b61093e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093590612d52565b60405180910390fd5b61094781611d27565b50565b6109526120cc565b6010600380602002604051908101604052809291906000905b828210156109c4578382600302016003806020026040519081016040528092919082600380156109b0576020028201915b81548152602001906001019080831161099c575b50505050508152602001906001019061096b565b50505050905090565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6109fb611d1f565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a89576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a8090612d32565b60405180910390fd5b806010906003610a9a9291906120f9565b5050565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639ca423b3836040518263ffffffff1660e01b8152600401610afb9190612b94565b60206040518083038186803b158015610b1357600080fd5b505afa158015610b27573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610b4b9190810190612547565b9050919050565b600080601960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634f41e95d6040518163ffffffff1660e01b815260040160206040518083038186803b158015610c0057600080fd5b505afa158015610c14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610c3891908101906126e6565b90506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631b1ace25866040518263ffffffff1660e01b8152600401610c979190612b94565b60206040518083038186803b158015610caf57600080fd5b505afa158015610cc3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610ce791908101906126e6565b9050610cf1612149565b610cfa8261116e565b9050600084600001549050600085600101541115610dcb5760008090505b6003811015610dc957610dba610dab670de0b6b3a7640000610d9d868560038110610d3f57fe5b6020020151610d8f8a610d818d6004018960038110610d5a57fe5b0154610d738f6001015442611cd590919063ffffffff16565b611ec190919063ffffffff16565b611ec190919063ffffffff16565b611ec190919063ffffffff16565b611f3190919063ffffffff16565b83611f7b90919063ffffffff16565b91508080600101915050610d18565b505b610de6670de0b6b3a764000082611f3190919063ffffffff16565b95505050505050919050565b610dfa6120cc565b6007600380602002604051908101604052809291906000905b82821015610e6c57838260030201600380602002604051908101604052809291908260038015610e58576020028201915b815481526020019060010190808311610e44575b505050505081526020019060010190610e13565b50505050905090565b610e7e33611d27565b565b600381565b60196020528060005260406000206000915090508060000154908060010154908060020154908060030154905084565b610ebd611d1f565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f4b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f4290612d32565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461109a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161109190612d72565b60405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637543e3f083836040518363ffffffff1660e01b81526004016110f7929190612baf565b600060405180830381600087803b15801561111157600080fd5b505af1158015611125573d6000803e3d6000fd5b505050505050565b6004816003811061113a57fe5b016000915090505481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b611176612149565b60008090505b60038110156111fc576004816003811061119257fe5b015483106111ef57601081600381106111a757fe5b600302016003806020026040519081016040528092919082600380156111e2576020028201915b8154815260200190600101908083116111ce575b50505050509150506111fe565b808060010191505061117c565b505b919050565b61120b612149565b61121361216b565b601960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206040518060a001604052908160008201548152602001600182015481526020016002820154815260200160038201548152602001600482016003806020026040519081016040528092919082600380156112c1576020028201915b8154815260200190600101908083116112ad575b50505050508152505090508060800151915050919050565b6060815160405190808252806020026020018201604052801561130b5781602001602082028038833980820191505090505b50905060008090505b82518110156113aa5760008090505b600381101561139c576004816003811061133957fe5b015484838151811061134757fe5b60200260200101511061138f576007816003811061136157fe5b60030201826003811061137057fe5b015483838151811061137e57fe5b60200260200101818152505061139c565b8080600101915050611323565b508080600101915050611314565b50919050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611440576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161143790612d72565b60405180910390fd5b6060600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166332a00d8e8460036040518363ffffffff1660e01b81526004016114a0929190612bd8565b60006040518083038186803b1580156114b857600080fd5b505afa1580156114cc573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506114f591908101906125e8565b905060008090505b81518110156116f457600073ffffffffffffffffffffffffffffffffffffffff1682828151811061152a57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff161415611553576116e7565b61156f82828151811061156257fe5b6020026020010151611a2a565b60006019600084848151811061158157fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506040518060a001604052808673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200185815260200160008152602001428152508160070160008360030154815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550602082015181600101556040820151816002015560608201518160030155608082015181600401559050506116b1848260040184600381106116a157fe5b0154611f7b90919063ffffffff16565b8160040183600381106116c057fe5b01819055506116dd60018260030154611f7b90919063ffffffff16565b8160030181905550505b80806001019150506114fd565b50505050565b6010826003811061170757fe5b60030201816003811061171657fe5b01600091509150505481565b61172a611d1f565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146117b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117af90612d32565b60405180910390fd5b8060079060036117c99291906120f9565b5050565b6117d5612149565b600460038060200260405190810160405280929190826003801561180e576020028201915b8154815260200190600101908083116117fa575b5050505050905090565b611820611d1f565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146118ae576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118a590612d32565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561191e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161191590612cb2565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600782600381106119e957fe5b6003020181600381106119f857fe5b01600091509150505481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000601960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905042816001015410611a7e5750611cd2565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634f41e95d6040518163ffffffff1660e01b815260040160206040518083038186803b158015611ae857600080fd5b505afa158015611afc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611b2091908101906126e6565b90506000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631b1ace25856040518263ffffffff1660e01b8152600401611b7f9190612b94565b60206040518083038186803b158015611b9757600080fd5b505afa158015611bab573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611bcf91908101906126e6565b9050611bd9612149565b611be28261116e565b9050600084600101541115611cc45760008090505b6003811015611cc2576000611c89670de0b6b3a7640000611c7b858560038110611c1d57fe5b6020020151611c6d89611c5f8c6004018960038110611c3857fe5b0154611c518e6001015442611cd590919063ffffffff16565b611ec190919063ffffffff16565b611ec190919063ffffffff16565b611ec190919063ffffffff16565b611f3190919063ffffffff16565b90506000811115611cb457611cab818760000154611f7b90919063ffffffff16565b86600001819055505b508080600101915050611bf7565b505b428460010181905550505050505b50565b6000611d1783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611fd0565b905092915050565b600033905090565b611d3081611a2a565b6000601960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090506000611d94670de0b6b3a76400008360000154611f3190919063ffffffff16565b90506000811115611ebc576000611dbc670de0b6b3a764000083611ec190919063ffffffff16565b9050611dd5818460000154611cd590919063ffffffff16565b8360000181905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340c10f1985846040518363ffffffff1660e01b8152600401611e3a929190612bd8565b600060405180830381600087803b158015611e5457600080fd5b505af1158015611e68573d6000803e3d6000fd5b505050508373ffffffffffffffffffffffffffffffffffffffff167f04b20935b234f45fda390d2df59d92b7bb8bed322d3bc8764e826cfff50007d583604051611eb29190612d92565b60405180910390a2505b505050565b600080831415611ed45760009050611f2b565b6000828402905082848281611ee557fe5b0414611f26576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f1d90612d12565b60405180910390fd5b809150505b92915050565b6000611f7383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061202b565b905092915050565b600080828401905083811015611fc6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fbd90612cd2565b60405180910390fd5b8091505092915050565b6000838311158290612018576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161200f9190612c90565b60405180910390fd5b5060008385039050809150509392505050565b60008083118290612072576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120699190612c90565b60405180910390fd5b50600083858161207e57fe5b049050809150509392505050565b82600381019282156120bb579160200282015b828111156120ba57825182559160200191906001019061209f565b5b5090506120c891906121a0565b5090565b60405180606001604052806003905b6120e36121c5565b8152602001906001900390816120db5790505090565b82600380028101928215612138579160200282015b82811115612137578251829060036121279291906121e7565b509160200191906003019061210e565b5b5090506121459190612227565b5090565b6040518060600160405280600390602082028038833980820191505090505090565b6040518060a001604052806000815260200160008152602001600081526020016000815260200161219a6121c5565b81525090565b6121c291905b808211156121be5760008160009055506001016121a6565b5090565b90565b6040518060600160405280600390602082028038833980820191505090505090565b8260038101928215612216579160200282015b828111156122155782518255916020019190600101906121fa565b5b50905061222391906121a0565b5090565b61225091905b8082111561224c57600081816122439190612253565b5060030161222d565b5090565b90565b50600081556001016000815560010160009055565b60008135905061227781613079565b92915050565b60008151905061228c81613079565b92915050565b600082601f8301126122a357600080fd5b81516122b66122b182612e1f565b612df2565b915081818352602084019350602081019050838560208402820111156122db57600080fd5b60005b8381101561230b57816122f1888261227d565b8452602084019350602083019250506001810190506122de565b5050505092915050565b600082601f83011261232657600080fd5b600361233961233482612e47565b612df2565b9150818385606084028201111561234f57600080fd5b60005b8381101561237f57816123658882612389565b845260208401935060608301925050600181019050612352565b5050505092915050565b600082601f83011261239a57600080fd5b60036123ad6123a882612e69565b612df2565b915081838560208402820111156123c357600080fd5b60005b838110156123f357816123d988826124f4565b8452602084019350602083019250506001810190506123c6565b5050505092915050565b600082601f83011261240e57600080fd5b600361242161241c82612e8b565b612df2565b9150818385602084028201111561243757600080fd5b60005b83811015612467578161244d88826124f4565b84526020840193506020830192505060018101905061243a565b5050505092915050565b600082601f83011261248257600080fd5b813561249561249082612ead565b612df2565b915081818352602084019350602081019050838560208402820111156124ba57600080fd5b60005b838110156124ea57816124d088826124f4565b8452602084019350602083019250506001810190506124bd565b5050505092915050565b60008135905061250381613090565b92915050565b60008151905061251881613090565b92915050565b60006020828403121561253057600080fd5b600061253e84828501612268565b91505092915050565b60006020828403121561255957600080fd5b60006125678482850161227d565b91505092915050565b6000806040838503121561258357600080fd5b600061259185828601612268565b92505060206125a285828601612268565b9150509250929050565b600080604083850312156125bf57600080fd5b60006125cd85828601612268565b92505060206125de858286016124f4565b9150509250929050565b6000602082840312156125fa57600080fd5b600082015167ffffffffffffffff81111561261457600080fd5b61262084828501612292565b91505092915050565b6000610120828403121561263c57600080fd5b600061264a84828501612315565b91505092915050565b60006060828403121561266557600080fd5b6000612673848285016123fd565b91505092915050565b60006020828403121561268e57600080fd5b600082013567ffffffffffffffff8111156126a857600080fd5b6126b484828501612471565b91505092915050565b6000602082840312156126cf57600080fd5b60006126dd848285016124f4565b91505092915050565b6000602082840312156126f857600080fd5b600061270684828501612509565b91505092915050565b6000806040838503121561272257600080fd5b6000612730858286016124f4565b9250506020612741858286016124f4565b9150509250929050565b60006127578383612838565b60608301905092915050565b600061276f8383612b76565b60208301905092915050565b61278481612fb1565b82525050565b61279381612f03565b61279d8184612f6e565b92506127a882612ed5565b8060005b838110156127d95781516127c0878261274b565b96506127cb83612f3a565b9250506001810190506127ac565b505050505050565b6127ea81612f19565b6127f48184612f84565b92506127ff82612ee9565b8060005b838110156128305781516128178782612763565b965061282283612f54565b925050600181019050612803565b505050505050565b61284181612f0e565b61284b8184612f79565b925061285682612edf565b8060005b8381101561288757815161286e8782612763565b965061287983612f47565b92505060018101905061285a565b505050505050565b600061289a82612f24565b6128a48185612f8f565b93506128af83612ef3565b8060005b838110156128e05781516128c78882612763565b97506128d283612f61565b9250506001810190506128b3565b5085935050505092915050565b6128f681612fed565b82525050565b61290581613011565b82525050565b600061291682612f2f565b6129208185612fa0565b9350612930818560208601613035565b61293981613068565b840191505092915050565b6000612951602683612fa0565b91507f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008301527f64647265737300000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006129b7601b83612fa0565b91507f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006000830152602082019050919050565b60006129f7601d83612fa0565b91507f72656d6f76654465706f7369745265776172643a2062616420726f6c650000006000830152602082019050919050565b6000612a37602183612fa0565b91507f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008301527f77000000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000612a9d602083612fa0565b91507f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726000830152602082019050919050565b6000612add601b83612fa0565b91507f636c61696d416c6c4469766964656e64733a2062616420726f6c6500000000006000830152602082019050919050565b6000612b1d602483612fa0565b91507f6173736573735265666572616c4465706f7369745265776172643a206261642060008301527f726f6c65000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b612b7f81612fe3565b82525050565b612b8e81612fe3565b82525050565b6000602082019050612ba9600083018461277b565b92915050565b6000604082019050612bc4600083018561277b565b612bd1602083018461277b565b9392505050565b6000604082019050612bed600083018561277b565b612bfa6020830184612b85565b9392505050565b600061012082019050612c17600083018461278a565b92915050565b6000606082019050612c3260008301846127e1565b92915050565b60006020820190508181036000830152612c52818461288f565b905092915050565b6000602082019050612c6f60008301846128ed565b92915050565b6000602082019050612c8a60008301846128fc565b92915050565b60006020820190508181036000830152612caa818461290b565b905092915050565b60006020820190508181036000830152612ccb81612944565b9050919050565b60006020820190508181036000830152612ceb816129aa565b9050919050565b60006020820190508181036000830152612d0b816129ea565b9050919050565b60006020820190508181036000830152612d2b81612a2a565b9050919050565b60006020820190508181036000830152612d4b81612a90565b9050919050565b60006020820190508181036000830152612d6b81612ad0565b9050919050565b60006020820190508181036000830152612d8b81612b10565b9050919050565b6000602082019050612da76000830184612b85565b92915050565b6000608082019050612dc26000830187612b85565b612dcf6020830186612b85565b612ddc6040830185612b85565b612de96060830184612b85565b95945050505050565b6000604051905081810181811067ffffffffffffffff82111715612e1557600080fd5b8060405250919050565b600067ffffffffffffffff821115612e3657600080fd5b602082029050602081019050919050565b600067ffffffffffffffff821115612e5e57600080fd5b602082029050919050565b600067ffffffffffffffff821115612e8057600080fd5b602082029050919050565b600067ffffffffffffffff821115612ea257600080fd5b602082029050919050565b600067ffffffffffffffff821115612ec457600080fd5b602082029050602081019050919050565b6000819050919050565b6000819050919050565b6000819050919050565b6000819050602082019050919050565b600060039050919050565b600060039050919050565b600060039050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b600081905092915050565b600081905092915050565b600081905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b6000612fbc82612fc3565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000612ff882612fff565b9050919050565b600061300a82612fc3565b9050919050565b600061301c82613023565b9050919050565b600061302e82612fc3565b9050919050565b60005b83811015613053578082015181840152602081019050613038565b83811115613062576000848401525b50505050565b6000601f19601f8301169050919050565b61308281612fb1565b811461308d57600080fd5b50565b61309981612fe3565b81146130a457600080fd5b5056fea2646970667358221220afd5d572a68e87f62246d4b6444c10013b6354347155267bec1c11452a79a9b264736f6c63430006020033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 27 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.