More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 2,383 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Claim Rewards | 12498861 | 1225 days ago | IN | 0 ETH | 0.00294945 | ||||
Withdraw Stake | 12498855 | 1225 days ago | IN | 0 ETH | 0.00299439 | ||||
Claim Rewards | 12498844 | 1225 days ago | IN | 0 ETH | 0.00303372 | ||||
Withdraw Stake | 12498841 | 1225 days ago | IN | 0 ETH | 0.00307994 | ||||
Withdraw Stake | 12498841 | 1225 days ago | IN | 0 ETH | 0.00299439 | ||||
Claim Rewards | 12282640 | 1259 days ago | IN | 0 ETH | 0.00568822 | ||||
Withdraw Stake | 12282640 | 1259 days ago | IN | 0 ETH | 0.00577489 | ||||
Claim Rewards | 12223125 | 1268 days ago | IN | 0 ETH | 0.00221238 | ||||
Withdraw Stake | 12223125 | 1268 days ago | IN | 0 ETH | 0.00225603 | ||||
Withdraw Stake | 12223125 | 1268 days ago | IN | 0 ETH | 0.00235556 | ||||
Withdraw Stake | 12223125 | 1268 days ago | IN | 0 ETH | 0.00222285 | ||||
Withdraw Stake | 11936782 | 1312 days ago | IN | 0 ETH | 0.00321816 | ||||
Claim Rewards | 11935335 | 1312 days ago | IN | 0 ETH | 0.00315589 | ||||
Claim Rewards | 11932000 | 1313 days ago | IN | 0 ETH | 0.00422955 | ||||
Withdraw Stake | 11854726 | 1324 days ago | IN | 0 ETH | 0.00398124 | ||||
Withdraw Stake | 11848852 | 1325 days ago | IN | 0 ETH | 0.00364947 | ||||
Withdraw Stake | 11848852 | 1325 days ago | IN | 0 ETH | 0.00364947 | ||||
Withdraw Stake | 11848852 | 1325 days ago | IN | 0 ETH | 0.0033177 | ||||
Withdraw Stake | 11848819 | 1325 days ago | IN | 0 ETH | 0.00335087 | ||||
Withdraw Stake | 11848805 | 1325 days ago | IN | 0 ETH | 0.00364947 | ||||
Claim Rewards | 11840966 | 1327 days ago | IN | 0 ETH | 0.0040018 | ||||
Withdraw Stake | 11679037 | 1351 days ago | IN | 0 ETH | 0.00235556 | ||||
Withdraw Stake | 11678987 | 1351 days ago | IN | 0 ETH | 0.00182473 | ||||
Claim Rewards | 11678766 | 1351 days ago | IN | 0 ETH | 0.00191956 | ||||
Withdraw Stake | 11678766 | 1351 days ago | IN | 0 ETH | 0.00189108 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
IxtProtect
Compiler Version
v0.5.1+commit.c8a2cb62
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2018-12-21 */ pragma solidity 0.5.1; // File: contracts/lib/Ownable.sol /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor () internal { _owner = msg.sender; emit OwnershipTransferred(address(0), _owner); } /** * @return the address of the owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(isOwner(), "Only the owner can call this function."); _; } /** * @return true if `msg.sender` is the owner of the contract. */ function isOwner() public view returns (bool) { return msg.sender == _owner; } /** * @dev Allows the current owner to relinquish control of the contract. * @notice Renouncing to ownership will leave the contract without an owner. * It will not be possible to call the functions with the `onlyOwner` * modifier anymore. */ function renounceOwnership() public onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { _transferOwnership(newOwner); } /** * @dev Transfers control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function _transferOwnership(address newOwner) internal { require(newOwner != address(0)); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } // File: contracts/lib/IERC20.sol /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); // solhint-disable-next-line func-order function transfer(address to, uint256 value) external returns (bool); // solhint-disable-next-line func-order function approve(address spender, uint256 value) external returns (bool); // solhint-disable-next-line func-order function transferFrom(address from, address to, uint256 value) external returns (bool); // solhint-disable-next-line no-simple-event-func-name event Transfer( address indexed from, address indexed to, uint256 value ); event Approval( address indexed owner, address indexed spender, uint256 value ); } // File: contracts/lib/SafeMath.sol /** * @title SafeMath * @dev Math operations with safety checks that revert on error */ library SafeMath { /** * @dev Multiplies two numbers, reverts on 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-solidity/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b); return c; } /** * @dev Integer division of two numbers truncating the quotient, reverts on division by zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0); // Solidity only automatically asserts when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a); uint256 c = a - b; return c; } /** * @dev Adds two numbers, reverts on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a); return c; } /** * @dev Divides two numbers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0); return a % b; } } // File: contracts/lib/Roles.sol /** * @title Roles * @dev Library for managing addresses assigned to a Role. */ library Roles { struct Role { mapping (address => bool) bearer; } /** * @dev give an account access to this role */ function add(Role storage role, address account) internal { require(account != address(0)); role.bearer[account] = true; } /** * @dev remove an account's access to this role */ function remove(Role storage role, address account) internal { require(account != address(0)); role.bearer[account] = false; } /** * @dev check if an account has this role * @return bool */ function has(Role storage role, address account) internal view returns (bool) { require(account != address(0)); return role.bearer[account]; } } // File: contracts/lib/PauserRole.sol contract PauserRole { using Roles for Roles.Role; event PauserAdded(address indexed account); event PauserRemoved(address indexed account); Roles.Role private pausers; constructor() public { _addPauser(msg.sender); } modifier onlyPauser() { require(isPauser(msg.sender), "Can only be called by pauser."); _; } function isPauser(address account) public view returns (bool) { return pausers.has(account); } function addPauser(address account) public onlyPauser { _addPauser(account); } function renouncePauser() public { _removePauser(msg.sender); } function _addPauser(address account) internal { pausers.add(account); emit PauserAdded(account); } function _removePauser(address account) internal { pausers.remove(account); emit PauserRemoved(account); } } // File: contracts/lib/Pausable.sol /** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is PauserRole { event Paused(); event Unpaused(); bool private _paused = false; /** * @return true if the contract is paused, false otherwise. */ function paused() public view returns(bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!_paused, "Cannot call when paused."); _; } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { require(_paused, "Can only call this when paused."); _; } /** * @dev called by the owner to pause, triggers stopped state */ function pause() public onlyPauser whenNotPaused { _paused = true; emit Paused(); } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() public onlyPauser whenPaused { _paused = false; emit Unpaused(); } } // File: contracts/lib/ValidatorRole.sol contract ValidatorRole { using Roles for Roles.Role; event ValidatorAdded(address indexed account); event ValidatorRemoved(address indexed account); Roles.Role private validators; constructor(address validator) public { _addValidator(validator); } modifier onlyValidator() { require( isValidator(msg.sender), "This function can only be called by a validator." ); _; } function isValidator(address account) public view returns (bool) { return validators.has(account); } function addValidator(address account) public onlyValidator { _addValidator(account); } function renounceValidator() public { _removeValidator(msg.sender); } function _addValidator(address account) internal { validators.add(account); emit ValidatorAdded(account); } function _removeValidator(address account) internal { validators.remove(account); emit ValidatorRemoved(account); } } // File: contracts/IxtProtect.sol /// @title IxtEvents /// @notice Holds all events used by the IXTProtect contract contract IxtEvents { event MemberAdded( address indexed memberAddress, bytes32 indexed membershipNumber, bytes32 indexed invitationCode ); event StakeDeposited( address indexed memberAddress, bytes32 indexed membershipNumber, uint256 stakeAmount ); event StakeWithdrawn( address indexed memberAddress, uint256 stakeAmount ); event RewardClaimed( address indexed memberAddress, uint256 rewardAmount ); event InvitationRewardGiven( address indexed memberReceivingReward, address indexed memberGivingReward, uint256 rewardAmount ); event PoolDeposit( address indexed depositer, uint256 amount ); event PoolWithdraw( address indexed withdrawer, uint256 amount ); event AdminRemovedMember( address indexed admin, address indexed userAddress, uint256 refundIssued ); event MemberDrained( address indexed memberAddress, uint256 amountRefunded ); event PoolDrained( address indexed refundRecipient, uint256 amountRefunded ); event ContractDrained( address indexed drainInitiator ); event InvitationRewardChanged( uint256 newInvitationReward ); event LoyaltyRewardChanged( uint256 newLoyaltyRewardAmount ); } /// @title RoleManager which inherits the Role-based functionality used /// by the IXTProtect contract contract RoleManager is Ownable, Pausable, ValidatorRole { constructor(address validator) public ValidatorRole(validator) {} } /// @title StakeManager which contains some of the stake-based state /// used by the IXTProtect contract contract StakeManager { /* Function modifiers */ modifier isValidStakeLevel(StakeLevel level) { require( uint8(level) >= 0 && uint8(level) <= 2, "Is not valid a staking level." ); _; } /* Data types */ /// @dev The three levels of stake used within the IXTProtect platform /// @dev Solidity enums are 0 based enum StakeLevel { LOW, MEDIUM, HIGH } /* Variable declarations */ /// @dev the defined staking amount for each level uint256[3] public ixtStakingLevels; /* Constructor */ /// @param _ixtStakingLevels the amount of stake used for each of the staking levels /// used within the IXTProtect platform constructor( uint256[3] memory _ixtStakingLevels ) public { ixtStakingLevels = _ixtStakingLevels; } } /// @title RewardManager which contains some of the reward-based state /// used by the IXTProtect contract contract RewardManager { /* Variable declarations */ /// @dev the reward received when inviting someone uint256 public invitationReward; /// @dev the period after which a member gets a loyalty reward uint256 public loyaltyPeriodDays; /// @dev the rate used for calculation of the loyalty reward uint256 public loyaltyRewardAmount; /* Constructor */ /// @param _invitationReward the amount of reward used when a member uses an invitation code /// @param _loyaltyPeriodDays the amount of days that will be used for the loyalty period /// @param _loyaltyRewardAmount the rate used as a loyalty reward after every loyalty period constructor( uint256 _invitationReward, uint256 _loyaltyPeriodDays, uint256 _loyaltyRewardAmount ) public { require( _loyaltyRewardAmount >= 0 && _loyaltyRewardAmount <= 100, "Loyalty reward amount must be between 0 and 100." ); invitationReward = _invitationReward; loyaltyPeriodDays = _loyaltyPeriodDays; loyaltyRewardAmount = _loyaltyRewardAmount; } } /// @title IxtProtect /// @notice Holds state and contains key logic which controls the IXTProtect platform contract IxtProtect is IxtEvents, RoleManager, StakeManager, RewardManager { /* Function modifiers */ modifier isNotMember(address memberAddress) { require( members[memberAddress].addedTimestamp == 0, "Already a member." ); _; } modifier isMember(address memberAddress) { require( members[memberAddress].addedTimestamp != 0, "User is not a member." ); _; } modifier notStaking(address memberAddress) { require( members[memberAddress].stakeTimestamp == 0, "Member is staking already." ); _; } modifier staking(address memberAddress) { require( members[memberAddress].stakeTimestamp != 0, "Member is not staking." ); _; } /* Data types */ /// @dev data structure used to track state on each member using the platform struct Member { uint256 addedTimestamp; uint256 stakeTimestamp; uint256 startOfLoyaltyRewardEligibility; bytes32 membershipNumber; bytes32 invitationCode; uint256 stakeBalance; uint256 invitationRewards; uint256 previouslyAppliedLoyaltyBalance; } /* Variable declarations */ /// @dev the IXT ERC20 Token contract IERC20 public ixtToken; /// @dev a mapping from member wallet addresses to Member struct mapping(address => Member) public members; /// @dev the same data as `members`, but iterable address[] public membersArray; /// @dev the total balance of all members uint256 public totalMemberBalance; /// @dev the total pool balance uint256 public totalPoolBalance; /// @notice a mapping from invitationCode => memberAddress, so invitation rewards can be applied. mapping(bytes32 => address) public registeredInvitationCodes; /* Constants */ /// @dev the amount of decimals used by the IXT ERC20 token uint256 public constant IXT_DECIMALS = 8; /* Constructor */ /// @param _validator the address to use as the validator /// @param _loyaltyPeriodDays the amount of days that will be used for the loyalty period /// @param _ixtToken the address of the IXT ERC20 token to be used as stake and for rewards /// @param _invitationReward the amount of reward used when a member uses an invitation code /// @param _loyaltyRewardAmount the rate used as a loyalty reward after every loyalty period /// @param _ixtStakingLevels three ascending amounts of IXT token to be used as staking levels constructor( address _validator, uint256 _loyaltyPeriodDays, address _ixtToken, uint256 _invitationReward, uint256 _loyaltyRewardAmount, uint256[3] memory _ixtStakingLevels ) public RoleManager(_validator) StakeManager(_ixtStakingLevels) RewardManager(_invitationReward, _loyaltyPeriodDays, _loyaltyRewardAmount) { require(_ixtToken != address(0x0), "ixtToken address was set to 0."); ixtToken = IERC20(_ixtToken); } /* */ /* PUBLIC FUNCTIONS */ /* */ /* (member control) */ /// @notice Registers a new user as a member after the KYC process /// @notice This function should not add the invitationCode /// to the mapping yet, this should only happen after join /// @notice This function can only be called by a "validator" which is set inside the /// constructor /// @param _membershipNumber the membership number of the member to authorise /// @param _memberAddress the EOA address of the member to authorise /// @param _invitationCode should be associated with *this* member in order to apply invitation rewards /// @param _referralInvitationCode the invitation code of another member which is used to give the function addMember( bytes32 _membershipNumber, address _memberAddress, bytes32 _invitationCode, bytes32 _referralInvitationCode ) public onlyValidator isNotMember(_memberAddress) notStaking(_memberAddress) { require( _memberAddress != address(0x0), "Member address was set to 0." ); Member memory member = Member({ addedTimestamp: block.timestamp, stakeTimestamp: 0, startOfLoyaltyRewardEligibility: 0, membershipNumber: _membershipNumber, invitationCode: _invitationCode, stakeBalance: 0, invitationRewards: 0, previouslyAppliedLoyaltyBalance: 0 }); members[_memberAddress] = member; membersArray.push(_memberAddress); /// @dev add this members invitation code to the mapping registeredInvitationCodes[member.invitationCode] = _memberAddress; /// @dev if the _referralInvitationCode is already registered, add on reward address rewardMemberAddress = registeredInvitationCodes[_referralInvitationCode]; if ( rewardMemberAddress != address(0x0) ) { Member storage rewardee = members[rewardMemberAddress]; rewardee.invitationRewards = SafeMath.add(rewardee.invitationRewards, invitationReward); emit InvitationRewardGiven(rewardMemberAddress, _memberAddress, invitationReward); } emit MemberAdded(_memberAddress, _membershipNumber, _invitationCode); } /// @notice Called by a member once they have been approved to join the scheme /// @notice Before calling the prospective member *must* have approved the appropriate amount of /// IXT token to be transferred by this contract /// @param _stakeLevel the staking level used by this member. Note this is not the staking *amount*. /// other member a reward upon *this* user joining. function depositStake( StakeLevel _stakeLevel ) public whenNotPaused() isMember(msg.sender) notStaking(msg.sender) isValidStakeLevel(_stakeLevel) { uint256 amountDeposited = depositInternal(msg.sender, ixtStakingLevels[uint256(_stakeLevel)], false); Member storage member = members[msg.sender]; member.stakeTimestamp = block.timestamp; member.startOfLoyaltyRewardEligibility = block.timestamp; /// @dev add this members invitation code to the mapping registeredInvitationCodes[member.invitationCode] = msg.sender; emit StakeDeposited(msg.sender, member.membershipNumber, amountDeposited); } /// @notice Called by the member if they wish to withdraw the stake /// @notice This function will return all stake and eligible reward balance back to the user function withdrawStake() public whenNotPaused() staking(msg.sender) { uint256 stakeAmount = refundUserBalance(msg.sender); delete registeredInvitationCodes[members[msg.sender].invitationCode]; Member storage member = members[msg.sender]; member.stakeTimestamp = 0; member.startOfLoyaltyRewardEligibility = 0; emit StakeWithdrawn(msg.sender, stakeAmount); } /// @notice Called by the member if they wish to claim the rewards they are eligible /// @notice This function will return all eligible reward balance back to the user function claimRewards() public whenNotPaused() staking(msg.sender) { uint256 rewardClaimed = claimRewardsInternal(msg.sender); emit RewardClaimed(msg.sender, rewardClaimed); } /* (getter functions) */ /// @notice Called in order to get the number of members on the platform /// @return length of the members array function getMembersArrayLength() public view returns (uint256) { return membersArray.length; } /// @notice Called to obtain the account balance of any given member /// @param memberAddress the address of the member to get the account balance for /// @return the account balance of the member in question function getAccountBalance(address memberAddress) public view staking(memberAddress) returns (uint256) { return getStakeBalance(memberAddress) + getRewardBalance(memberAddress); } /// @notice Called to obtain the stake balance of any given member /// @param memberAddress the address of the member to get the stake balance for /// @return the stake balance of the member in question function getStakeBalance(address memberAddress) public view staking(memberAddress) returns (uint256) { return members[memberAddress].stakeBalance; } /// @notice Called to obtain the reward balance of any given member /// @param memberAddress the address of the member to get the total reward balance for /// @return the total reward balance of the member in question function getRewardBalance(address memberAddress) public view staking(memberAddress) returns (uint256) { return getInvitationRewardBalance(memberAddress) + getLoyaltyRewardBalance(memberAddress); } /// @notice Called to obtain the invitation reward balance of any given member /// @param memberAddress the address of the member to get the invitation reward balance for /// @return the invitation reward balance of the member in question function getInvitationRewardBalance(address memberAddress) public view staking(memberAddress) returns (uint256) { return members[memberAddress].invitationRewards; } /// @notice Called to obtain the loyalty reward balance of any given member /// @param memberAddress the address of the member to get the loyalty reward balance for /// @return the loyalty reward balance of the member in question function getLoyaltyRewardBalance(address memberAddress) public view staking(memberAddress) returns (uint256 loyaltyReward) { uint256 loyaltyPeriodSeconds = loyaltyPeriodDays * 1 days; Member storage thisMember = members[memberAddress]; uint256 elapsedTimeSinceEligible = block.timestamp - thisMember.startOfLoyaltyRewardEligibility; loyaltyReward = thisMember.previouslyAppliedLoyaltyBalance; if (elapsedTimeSinceEligible >= loyaltyPeriodSeconds) { uint256 numWholePeriods = SafeMath.div(elapsedTimeSinceEligible, loyaltyPeriodSeconds); uint256 rewardForEachPeriod = thisMember.stakeBalance * loyaltyRewardAmount / 100; loyaltyReward += rewardForEachPeriod * numWholePeriods; } } /* (admin functions) */ /// @notice Called by the admin to deposit extra IXT into the contract to be used as rewards /// @notice This function can only be called by the contract owner /// @param amountToDeposit the amount of IXT ERC20 token to deposit into the pool function depositPool(uint256 amountToDeposit) public onlyOwner { uint256 amountDeposited = depositInternal(msg.sender, amountToDeposit, true); emit PoolDeposit(msg.sender, amountDeposited); } /// @notice Called by the admin to withdraw IXT from the pool balance /// @notice This function can only be called by the contract owner /// @param amountToWithdraw the amount of IXT ERC20 token to withdraw from the pool function withdrawPool(uint256 amountToWithdraw) public onlyOwner { if (amountToWithdraw > 0) { require( totalPoolBalance >= amountToWithdraw && ixtToken.transfer(msg.sender, amountToWithdraw), "Unable to withdraw this value of IXT." ); totalPoolBalance = SafeMath.sub(totalPoolBalance, amountToWithdraw); } emit PoolWithdraw(msg.sender, amountToWithdraw); } /// @notice Called by an admin to remove a member from the platform /// @notice This function can only be called by the contract owner /// @notice The member will be automatically refunded their stake balance and any /// unclaimed rewards as a result of being removed by the admin /// @notice Can be called if user is authorised *or* joined /// @param userAddress the address of the member that the admin wishes to remove function removeMember(address userAddress) public isMember(userAddress) onlyOwner { uint256 refund = cancelMembershipInternal(userAddress); emit AdminRemovedMember(msg.sender, userAddress, refund); } /// @notice Called by an admin in emergency situations only, will returns *ALL* stake balance /// and reward balances back to the users. Any left over pool balance will be returned to the /// contract owner. /// @notice This function can only be called by the contract owner function drain() public onlyOwner { /// @dev Refund and delete all members for (uint256 index = 0; index < membersArray.length; index++) { address memberAddress = membersArray[index]; bool memberJoined = members[memberAddress].stakeTimestamp != 0; uint256 amountRefunded = memberJoined ? refundUserBalance(memberAddress) : 0; delete registeredInvitationCodes[members[memberAddress].invitationCode]; delete members[memberAddress]; emit MemberDrained(memberAddress, amountRefunded); } delete membersArray; /// @dev Refund the pool balance require( ixtToken.transfer(msg.sender, totalPoolBalance), "Unable to withdraw this value of IXT." ); totalPoolBalance = 0; emit PoolDrained(msg.sender, totalPoolBalance); emit ContractDrained(msg.sender); } /// @notice Called by the contract owner to set the invitation reward to be given to future members /// @notice This function does not affect previously awarded invitation rewards /// @param _invitationReward the amount that the invitation reward should be set to function setInvitationReward(uint256 _invitationReward) public onlyOwner { invitationReward = _invitationReward; emit InvitationRewardChanged(_invitationReward); } /// @notice Called by the contract owner to set the loyalty reward rate to be given to future members /// @notice This function does not affect previously awarded loyalty rewards /// @notice The loyalty reward amount is actually a rate from 0 to 100 that is used to /// calculate the proportion of stake balance that should be rewarded. /// @param newLoyaltyRewardAmount the amount that the loyalty reward should be set to function setLoyaltyRewardAmount(uint256 newLoyaltyRewardAmount) public onlyOwner { require( newLoyaltyRewardAmount >= 0 && newLoyaltyRewardAmount <= 100, "Loyalty reward amount must be between 0 and 100." ); uint256 loyaltyPeriodSeconds = loyaltyPeriodDays * 1 days; /// @dev Loop through all the current members and apply previous reward amounts for (uint256 i = 0; i < membersArray.length; i++) { Member storage thisMember = members[membersArray[i]]; uint256 elapsedTimeSinceEligible = block.timestamp - thisMember.startOfLoyaltyRewardEligibility; if (elapsedTimeSinceEligible >= loyaltyPeriodSeconds) { uint256 numWholePeriods = SafeMath.div(elapsedTimeSinceEligible, loyaltyPeriodSeconds); uint256 rewardForEachPeriod = thisMember.stakeBalance * loyaltyRewardAmount / 100; thisMember.previouslyAppliedLoyaltyBalance += rewardForEachPeriod * numWholePeriods; thisMember.startOfLoyaltyRewardEligibility += numWholePeriods * loyaltyPeriodSeconds; } } loyaltyRewardAmount = newLoyaltyRewardAmount; emit LoyaltyRewardChanged(newLoyaltyRewardAmount); } /* */ /* INTERNAL FUNCTIONS */ /* */ function cancelMembershipInternal(address memberAddress) internal returns (uint256 amountRefunded) { if(members[memberAddress].stakeTimestamp != 0) { amountRefunded = refundUserBalance(memberAddress); } delete registeredInvitationCodes[members[memberAddress].invitationCode]; delete members[memberAddress]; removeMemberFromArray(memberAddress); } function refundUserBalance( address memberAddress ) internal returns (uint256) { Member storage member = members[memberAddress]; /// @dev Pool balance will be reduced inside this function uint256 claimsRefunded = claimRewardsInternal(memberAddress); uint256 stakeToRefund = member.stakeBalance; bool userStaking = member.stakeTimestamp != 0; if (stakeToRefund > 0 && userStaking) { require( ixtToken.transfer(memberAddress, stakeToRefund), "Unable to withdraw this value of IXT." ); totalMemberBalance = SafeMath.sub(totalMemberBalance, stakeToRefund); } member.stakeBalance = 0; return claimsRefunded + stakeToRefund; } function removeMemberFromArray(address memberAddress) internal { /// @dev removing the member address from the membersArray for (uint256 index; index < membersArray.length; index++) { if (membersArray[index] == memberAddress) { membersArray[index] = membersArray[membersArray.length - 1]; membersArray[membersArray.length - 1] = address(0); membersArray.length -= 1; break; } } } function claimRewardsInternal(address memberAddress) internal returns (uint256 rewardAmount) { rewardAmount = getRewardBalance(memberAddress); if (rewardAmount == 0) { return rewardAmount; } require( totalPoolBalance >= rewardAmount, "Pool balance not sufficient to withdraw rewards." ); require( ixtToken.transfer(memberAddress, rewardAmount), "Unable to withdraw this value of IXT." ); /// @dev we know this is safe as totalPoolBalance >= rewardAmount totalPoolBalance -= rewardAmount; Member storage thisMember = members[memberAddress]; thisMember.previouslyAppliedLoyaltyBalance = 0; thisMember.invitationRewards = 0; uint256 loyaltyPeriodSeconds = loyaltyPeriodDays * 1 days; uint256 elapsedTimeSinceEligible = block.timestamp - thisMember.startOfLoyaltyRewardEligibility; if (elapsedTimeSinceEligible >= loyaltyPeriodSeconds) { uint256 numWholePeriods = SafeMath.div(elapsedTimeSinceEligible, loyaltyPeriodSeconds); thisMember.startOfLoyaltyRewardEligibility += numWholePeriods * loyaltyPeriodSeconds; } } function depositInternal( address depositer, uint256 amount, bool isPoolDeposit ) internal returns (uint256) { /// @dev Explicitly checking allowance & balance before transferFrom /// so we get the revert message. require(amount > 0, "Cannot deposit 0 IXT."); require( ixtToken.allowance(depositer, address(this)) >= amount && ixtToken.balanceOf(depositer) >= amount && ixtToken.transferFrom(depositer, address(this), amount), "Unable to deposit IXT - check allowance and balance." ); if (isPoolDeposit) { totalPoolBalance = SafeMath.add(totalPoolBalance, amount); } else { Member storage member = members[depositer]; member.stakeBalance = SafeMath.add(member.stakeBalance, amount); totalMemberBalance = SafeMath.add(totalMemberBalance, amount); } return amount; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"members","outputs":[{"name":"addedTimestamp","type":"uint256"},{"name":"stakeTimestamp","type":"uint256"},{"name":"startOfLoyaltyRewardEligibility","type":"uint256"},{"name":"membershipNumber","type":"bytes32"},{"name":"invitationCode","type":"bytes32"},{"name":"stakeBalance","type":"uint256"},{"name":"invitationRewards","type":"uint256"},{"name":"previouslyAppliedLoyaltyBalance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"loyaltyRewardAmount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"userAddress","type":"address"}],"name":"removeMember","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"memberAddress","type":"address"}],"name":"getInvitationRewardBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_invitationReward","type":"uint256"}],"name":"setInvitationReward","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"amountToDeposit","type":"uint256"}],"name":"depositPool","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"ixtStakingLevels","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"claimRewards","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"unpause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"account","type":"address"}],"name":"isPauser","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"amountToWithdraw","type":"uint256"}],"name":"withdrawPool","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"account","type":"address"}],"name":"addValidator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalPoolBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"paused","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newLoyaltyRewardAmount","type":"uint256"}],"name":"setLoyaltyRewardAmount","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_membershipNumber","type":"bytes32"},{"name":"_memberAddress","type":"address"},{"name":"_invitationCode","type":"bytes32"},{"name":"_referralInvitationCode","type":"bytes32"}],"name":"addMember","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"invitationReward","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renouncePauser","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"account","type":"address"}],"name":"addPauser","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"pause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"memberAddress","type":"address"}],"name":"getLoyaltyRewardBalance","outputs":[{"name":"loyaltyReward","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"memberAddress","type":"address"}],"name":"getAccountBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"drain","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"membersArray","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalMemberBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"withdrawStake","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"registeredInvitationCodes","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"memberAddress","type":"address"}],"name":"getRewardBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getMembersArrayLength","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"IXT_DECIMALS","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"loyaltyPeriodDays","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"memberAddress","type":"address"}],"name":"getStakeBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_stakeLevel","type":"uint8"}],"name":"depositStake","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"renounceValidator","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"ixtToken","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"account","type":"address"}],"name":"isValidator","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_validator","type":"address"},{"name":"_loyaltyPeriodDays","type":"uint256"},{"name":"_ixtToken","type":"address"},{"name":"_invitationReward","type":"uint256"},{"name":"_loyaltyRewardAmount","type":"uint256"},{"name":"_ixtStakingLevels","type":"uint256[3]"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"account","type":"address"}],"name":"ValidatorAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"account","type":"address"}],"name":"ValidatorRemoved","type":"event"},{"anonymous":false,"inputs":[],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"account","type":"address"}],"name":"PauserAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"account","type":"address"}],"name":"PauserRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"memberAddress","type":"address"},{"indexed":true,"name":"membershipNumber","type":"bytes32"},{"indexed":true,"name":"invitationCode","type":"bytes32"}],"name":"MemberAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"memberAddress","type":"address"},{"indexed":true,"name":"membershipNumber","type":"bytes32"},{"indexed":false,"name":"stakeAmount","type":"uint256"}],"name":"StakeDeposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"memberAddress","type":"address"},{"indexed":false,"name":"stakeAmount","type":"uint256"}],"name":"StakeWithdrawn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"memberAddress","type":"address"},{"indexed":false,"name":"rewardAmount","type":"uint256"}],"name":"RewardClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"memberReceivingReward","type":"address"},{"indexed":true,"name":"memberGivingReward","type":"address"},{"indexed":false,"name":"rewardAmount","type":"uint256"}],"name":"InvitationRewardGiven","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"depositer","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"PoolDeposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"withdrawer","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"PoolWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"admin","type":"address"},{"indexed":true,"name":"userAddress","type":"address"},{"indexed":false,"name":"refundIssued","type":"uint256"}],"name":"AdminRemovedMember","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"memberAddress","type":"address"},{"indexed":false,"name":"amountRefunded","type":"uint256"}],"name":"MemberDrained","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"refundRecipient","type":"address"},{"indexed":false,"name":"amountRefunded","type":"uint256"}],"name":"PoolDrained","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"drainInitiator","type":"address"}],"name":"ContractDrained","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newInvitationReward","type":"uint256"}],"name":"InvitationRewardChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newLoyaltyRewardAmount","type":"uint256"}],"name":"LoyaltyRewardChanged","type":"event"}]
Contract Creation Code
60806040526002805460ff191690553480156200001b57600080fd5b50604051610100806200306983398101806040526101008110156200003f57600080fd5b50805160208201516040808401516060850151608086015160008054600160a060020a031916331780825594519697959693959294919360a09093019285928892869286928c928392600160a060020a0392909216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3620000ce336401000000006200024e810204565b620000e281640100000000620002a0810204565b50620000f4905060048260036200032d565b50506000811015801562000109575060648111155b15156200019d57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f4c6f79616c74792072657761726420616d6f756e74206d75737420626520626560448201527f747765656e203020616e64203130302e00000000000000000000000000000000606482015290519081900360840190fd5b600792909255600855600955600160a060020a03841615156200022157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f697874546f6b656e2061646472657373207761732073657420746f20302e0000604482015290519081900360640190fd5b5050600a8054600160a060020a031916600160a060020a0393909316929092179091555062000390915050565b6200026960018264010000000062002adb620002f282021704565b604051600160a060020a038216907f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890600090a250565b620002bb60038264010000000062002adb620002f282021704565b604051600160a060020a038216907fe366c1c0452ed8eec96861e9e54141ebff23c9ec89fe27b996b45f5ec388498790600090a250565b600160a060020a03811615156200030857600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b82600381019282156200035e579160200282015b828111156200035e57825182559160200191906001019062000341565b506200036c92915062000370565b5090565b6200038d91905b808211156200036c576000815560010162000377565b90565b612cc980620003a06000396000f3fe6080604052600436106101e7577c0100000000000000000000000000000000000000000000000000000000600035046308ae4b0c81146101ec5780630a47ad24146102605780630b1ca49a146102875780630fe67260146102bc57806311267227146102ef57806323440944146103195780632d6b4e5314610343578063372500ab1461036d5780633f4ba83a1461038257806346fbf68e146103975780634c034ea9146103de5780634d238c8e146104085780635026d63e1461043b5780635c975abb146104505780635f842fab146104655780636877123b1461048f5780636bdad940146104d45780636ef8d66d146104e9578063715018a6146104fe57806382dc1ec4146105135780638456cb59146105465780638ba7dad41461055b5780638da5cb5b1461058e5780638f32d59b146105bf57806393423e9c146105d45780639890220b1461060757806399c0d0d21461061c5780639f2bb28714610646578063bed9d8611461065b578063c9c77eb814610670578063d5a849e91461069a578063d74a3c3d146106cd578063d80260a8146106e2578063e3d552ba146106f7578063ef8697731461070c578063f0bd90051461073f578063f0c043ee1461076c578063f2fde38b14610781578063f4d885b0146107b4578063facd743b146107c9575b600080fd5b3480156101f857600080fd5b5061021f6004803603602081101561020f57600080fd5b5035600160a060020a03166107fc565b604080519889526020890197909752878701959095526060870193909352608086019190915260a085015260c084015260e083015251908190036101000190f35b34801561026c57600080fd5b5061027561083f565b60408051918252519081900360200190f35b34801561029357600080fd5b506102ba600480360360208110156102aa57600080fd5b5035600160a060020a0316610845565b005b3480156102c857600080fd5b50610275600480360360208110156102df57600080fd5b5035600160a060020a0316610968565b3480156102fb57600080fd5b506102ba6004803603602081101561031257600080fd5b50356109ea565b34801561032557600080fd5b506102ba6004803603602081101561033c57600080fd5b5035610a83565b34801561034f57600080fd5b506102756004803603602081101561036657600080fd5b5035610b2b565b34801561037957600080fd5b506102ba610b3f565b34801561038e57600080fd5b506102ba610c26565b3480156103a357600080fd5b506103ca600480360360208110156103ba57600080fd5b5035600160a060020a0316610d16565b604080519115158252519081900360200190f35b3480156103ea57600080fd5b506102ba6004803603602081101561040157600080fd5b5035610d31565b34801561041457600080fd5b506102ba6004803603602081101561042b57600080fd5b5035600160a060020a0316610eca565b34801561044757600080fd5b50610275610f5b565b34801561045c57600080fd5b506103ca610f61565b34801561047157600080fd5b506102ba6004803603602081101561048857600080fd5b5035610f6b565b34801561049b57600080fd5b506102ba600480360360808110156104b257600080fd5b50803590600160a060020a036020820135169060408101359060600135611142565b3480156104e057600080fd5b50610275611554565b3480156104f557600080fd5b506102ba61155a565b34801561050a57600080fd5b506102ba611565565b34801561051f57600080fd5b506102ba6004803603602081101561053657600080fd5b5035600160a060020a031661160d565b34801561055257600080fd5b506102ba611675565b34801561056757600080fd5b506102756004803603602081101561057e57600080fd5b5035600160a060020a0316611755565b34801561059a57600080fd5b506105a3611828565b60408051600160a060020a039092168252519081900360200190f35b3480156105cb57600080fd5b506103ca611837565b3480156105e057600080fd5b50610275600480360360208110156105f757600080fd5b5035600160a060020a0316611848565b34801561061357600080fd5b506102ba6118c4565b34801561062857600080fd5b506105a36004803603602081101561063f57600080fd5b5035611b88565b34801561065257600080fd5b50610275611bb0565b34801561066757600080fd5b506102ba611bb6565b34801561067c57600080fd5b506105a36004803603602081101561069357600080fd5b5035611cdf565b3480156106a657600080fd5b50610275600480360360208110156106bd57600080fd5b5035600160a060020a0316611cfa565b3480156106d957600080fd5b50610275611d6e565b3480156106ee57600080fd5b50610275611d74565b34801561070357600080fd5b50610275611d79565b34801561071857600080fd5b506102756004803603602081101561072f57600080fd5b5035600160a060020a0316611d7f565b34801561074b57600080fd5b506102ba6004803603602081101561076257600080fd5b503560ff16611e01565b34801561077857600080fd5b506102ba612049565b34801561078d57600080fd5b506102ba600480360360208110156107a457600080fd5b5035600160a060020a0316612052565b3480156107c057600080fd5b506105a36120b9565b3480156107d557600080fd5b506103ca600480360360208110156107ec57600080fd5b5035600160a060020a03166120c8565b600b602052600090815260409020805460018201546002830154600384015460048501546005860154600687015460079097015495969495939492939192909188565b60095481565b600160a060020a0381166000908152600b6020526040902054819015156108b6576040805160e560020a62461bcd02815260206004820152601560248201527f55736572206973206e6f742061206d656d6265722e0000000000000000000000604482015290519081900360640190fd5b6108be611837565b1515610914576040805160e560020a62461bcd0281526020600482015260266024820152600080516020612bfe833981519152604482015260d160020a6531ba34b7b71702606482015290519081900360840190fd5b600061091f836120db565b604080518281529051919250600160a060020a0385169133917f959cb5beed67a71b290bdade385cdd57bb44e4f8884f522e6a799d1ccb3fb21c919081900360200190a3505050565b600160a060020a0381166000908152600b6020526040812060010154829015156109ca576040805160e560020a62461bcd0281526020600482015260166024820152600080516020612c1e833981519152604482015290519081900360640190fd5b5050600160a060020a03166000908152600b602052604090206006015490565b6109f2611837565b1515610a48576040805160e560020a62461bcd0281526020600482015260266024820152600080516020612bfe833981519152604482015260d160020a6531ba34b7b71702606482015290519081900360840190fd5b60078190556040805182815290517fbe3f0b74dce65634b50271acb4c999f395491d37b5c707bd34df15134ea5cc099181900360200190a150565b610a8b611837565b1515610ae1576040805160e560020a62461bcd0281526020600482015260266024820152600080516020612bfe833981519152604482015260d160020a6531ba34b7b71702606482015290519081900360840190fd5b6000610aef3383600161217e565b60408051828152905191925033917fea74918ad47929fae6a873ab3425581f01a3cd9c602bd9ed21348414c2c8bc119181900360200190a25050565b60048160038110610b3857fe5b0154905081565b60025460ff1615610b88576040805160e560020a62461bcd0281526020600482015260186024820152600080516020612c5e833981519152604482015290519081900360640190fd5b336000818152600b60205260409020600101541515610bdf576040805160e560020a62461bcd0281526020600482015260166024820152600080516020612c1e833981519152604482015290519081900360640190fd5b6000610bea33612498565b60408051828152905191925033917f106f923f993c2149d49b4255ff723acafa1f2d94393f561d3eda32ae348f72419181900360200190a25050565b610c2f33610d16565b1515610c85576040805160e560020a62461bcd02815260206004820152601d60248201527f43616e206f6e6c792062652063616c6c6564206279207061757365722e000000604482015290519081900360640190fd5b60025460ff161515610ce1576040805160e560020a62461bcd02815260206004820152601f60248201527f43616e206f6e6c792063616c6c2074686973207768656e207061757365642e00604482015290519081900360640190fd5b6002805460ff191690556040517fa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d1693390600090a1565b6000610d2960018363ffffffff61267b16565b90505b919050565b610d39611837565b1515610d8f576040805160e560020a62461bcd0281526020600482015260266024820152600080516020612bfe833981519152604482015260d160020a6531ba34b7b71702606482015290519081900360840190fd5b6000811115610e915780600e5410158015610e295750600a546040805160e060020a63a9059cbb028152336004820152602481018490529051600160a060020a039092169163a9059cbb916044808201926020929091908290030181600087803b158015610dfc57600080fd5b505af1158015610e10573d6000803e3d6000fd5b505050506040513d6020811015610e2657600080fd5b50515b1515610e81576040805160e560020a62461bcd0281526020600482015260256024820152600080516020612c7e8339815191526044820152600080516020612c3e833981519152606482015290519081900360840190fd5b610e8d600e54826126b2565b600e555b60408051828152905133917f61a0b4d879cd5e5653631acae542581573d52905e66efcbb6246efca1ef306d6919081900360200190a250565b610ed3336120c8565b1515610f4f576040805160e560020a62461bcd02815260206004820152603060248201527f546869732066756e6374696f6e2063616e206f6e6c792062652063616c6c656460448201527f20627920612076616c696461746f722e00000000000000000000000000000000606482015290519081900360840190fd5b610f58816126c7565b50565b600e5481565b60025460ff165b90565b610f73611837565b1515610fc9576040805160e560020a62461bcd0281526020600482015260266024820152600080516020612bfe833981519152604482015260d160020a6531ba34b7b71702606482015290519081900360840190fd5b60008110158015610fdb575060648111155b1515611057576040805160e560020a62461bcd02815260206004820152603060248201527f4c6f79616c74792072657761726420616d6f756e74206d75737420626520626560448201527f747765656e203020616e64203130302e00000000000000000000000000000000606482015290519081900360840190fd5b600854620151800260005b600c54811015611105576000600b6000600c8481548110151561108157fe5b6000918252602080832090910154600160a060020a031683528201929092526040019020600281015490915042038381106110fb5760006110c2828661270f565b9050600060646009548560050154028115156110da57fe5b60078601805492909104840290910190555060028301805491860290910190555b5050600101611062565b5060098290556040805183815290517fd5fe04030c34ea1cfd57274ba3c2ba027368da8568fb89d84a65f883918b77ed9181900360200190a15050565b61114b336120c8565b15156111c7576040805160e560020a62461bcd02815260206004820152603060248201527f546869732066756e6374696f6e2063616e206f6e6c792062652063616c6c656460448201527f20627920612076616c696461746f722e00000000000000000000000000000000606482015290519081900360840190fd5b600160a060020a0383166000908152600b6020526040902054839015611237576040805160e560020a62461bcd02815260206004820152601160248201527f416c72656164792061206d656d6265722e000000000000000000000000000000604482015290519081900360640190fd5b600160a060020a0384166000908152600b60205260409020600101548490156112aa576040805160e560020a62461bcd02815260206004820152601a60248201527f4d656d626572206973207374616b696e6720616c72656164792e000000000000604482015290519081900360640190fd5b600160a060020a038516151561130a576040805160e560020a62461bcd02815260206004820152601c60248201527f4d656d6265722061646472657373207761732073657420746f20302e00000000604482015290519081900360640190fd5b611312612b4c565b61010060405190810160405280428152602001600081526020016000815260200188815260200186815260200160008152602001600081526020016000815250905080600b600088600160a060020a0316600160a060020a03168152602001908152602001600020600082015181600001556020820151816001015560408201518160020155606082015181600301556080820151816004015560a0820151816005015560c0820151816006015560e08201518160070155905050600c8690806001815401808255809150509060018203906000526020600020016000909192909190916101000a815481600160a060020a030219169083600160a060020a031602179055505085600f60008360800151815260200190815260200160002060006101000a815481600160a060020a030219169083600160a060020a031602179055506000600f600086815260200190815260200160002060009054906101000a9004600160a060020a031690506000600160a060020a031681600160a060020a031614151561151257600160a060020a0381166000908152600b6020526040902060068101546007546114c69190612733565b60068201556007546040805191825251600160a060020a03808b1692908516917f6b39a6459136ef74b2d635667097bdc51b53c1fcc7068a4535a0150a8d85a7369181900360200190a3505b858888600160a060020a03167faca4b80fcb8f11692ba3753ba2bbf166e611e4b50ee6d6f07be507439e65b56d60405160405180910390a45050505050505050565b60075481565b6115633361274c565b565b61156d611837565b15156115c3576040805160e560020a62461bcd0281526020600482015260266024820152600080516020612bfe833981519152604482015260d160020a6531ba34b7b71702606482015290519081900360840190fd5b60008054604051600160a060020a03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a360008054600160a060020a0319169055565b61161633610d16565b151561166c576040805160e560020a62461bcd02815260206004820152601d60248201527f43616e206f6e6c792062652063616c6c6564206279207061757365722e000000604482015290519081900360640190fd5b610f5881612794565b61167e33610d16565b15156116d4576040805160e560020a62461bcd02815260206004820152601d60248201527f43616e206f6e6c792062652063616c6c6564206279207061757365722e000000604482015290519081900360640190fd5b60025460ff161561171d576040805160e560020a62461bcd0281526020600482015260186024820152600080516020612c5e833981519152604482015290519081900360640190fd5b6002805460ff191660011790556040517f9e87fac88ff661f02d44f95383c817fece4bce600a3dab7a54406878b965e75290600090a1565b600160a060020a0381166000908152600b6020526040812060010154829015156117b7576040805160e560020a62461bcd0281526020600482015260166024820152600080516020612c1e833981519152604482015290519081900360640190fd5b600854600160a060020a0384166000908152600b602052604090206002810154600782015494506201518090920291420382811061181f5760006117fb828561270f565b90506000606460095485600501540281151561181357fe5b04919091029590950194505b50505050919050565b600054600160a060020a031690565b600054600160a060020a0316331490565b600160a060020a0381166000908152600b6020526040812060010154829015156118aa576040805160e560020a62461bcd0281526020600482015260166024820152600080516020612c1e833981519152604482015290519081900360640190fd5b6118b383611cfa565b6118bc84611d7f565b019392505050565b6118cc611837565b1515611922576040805160e560020a62461bcd0281526020600482015260266024820152600080516020612bfe833981519152604482015260d160020a6531ba34b7b71702606482015290519081900360840190fd5b60005b600c54811015611a34576000600c8281548110151561194057fe5b6000918252602080832090910154600160a060020a0316808352600b909152604082206001015490925015159081611979576000611982565b611982836127dc565b600160a060020a0384166000818152600b602081815260408084206004810180548652600f84528286208054600160a060020a03191690558686529383528481556001810185905560028101859055600381018590559284905560058301849055600683018490556007909201929092558051848152905193945091927fbd350368d00f1cccedbd91542fd4b78e8bf17a54efa5c196cbfde197a10a5c019281900390910190a2505050600101611925565b50611a41600c6000612b98565b600a54600e546040805160e060020a63a9059cbb028152336004820152602481019290925251600160a060020a039092169163a9059cbb916044808201926020929091908290030181600087803b158015611a9b57600080fd5b505af1158015611aaf573d6000803e3d6000fd5b505050506040513d6020811015611ac557600080fd5b50511515611b1f576040805160e560020a62461bcd0281526020600482015260256024820152600080516020612c7e8339815191526044820152600080516020612c3e833981519152606482015290519081900360840190fd5b6000600e819055604080519182525133917f91b1cad2ec95df0b922e500d999cb940e01fdd73938a2eff337a259c13ce81c2919081900360200190a260405133907fb8dedf73564df32ee9c7bb17337c54e8b3ee64c6a056bddb528989c496cfe4c990600090a2565b600c805482908110611b9657fe5b600091825260209091200154600160a060020a0316905081565b600d5481565b60025460ff1615611bff576040805160e560020a62461bcd0281526020600482015260186024820152600080516020612c5e833981519152604482015290519081900360640190fd5b336000818152600b60205260409020600101541515611c56576040805160e560020a62461bcd0281526020600482015260166024820152600080516020612c1e833981519152604482015290519081900360640190fd5b6000611c61336127dc565b336000818152600b6020818152604080842060048101548552600f83528185208054600160a060020a03191690558585529282526001830184905560028301939093558251858152925194955090937f8108595eb6bad3acefa9da467d90cc2217686d5c5ac85460f8b7849c840645fc9281900390910190a2505050565b600f60205260009081526040902054600160a060020a031681565b600160a060020a0381166000908152600b602052604081206001015482901515611d5c576040805160e560020a62461bcd0281526020600482015260166024820152600080516020612c1e833981519152604482015290519081900360640190fd5b611d6583611755565b6118bc84610968565b600c5490565b600881565b60085481565b600160a060020a0381166000908152600b602052604081206001015482901515611de1576040805160e560020a62461bcd0281526020600482015260166024820152600080516020612c1e833981519152604482015290519081900360640190fd5b5050600160a060020a03166000908152600b602052604090206005015490565b60025460ff1615611e4a576040805160e560020a62461bcd0281526020600482015260186024820152600080516020612c5e833981519152604482015290519081900360640190fd5b336000818152600b60205260409020541515611eb0576040805160e560020a62461bcd02815260206004820152601560248201527f55736572206973206e6f742061206d656d6265722e0000000000000000000000604482015290519081900360640190fd5b336000818152600b602052604090206001015415611f18576040805160e560020a62461bcd02815260206004820152601a60248201527f4d656d626572206973207374616b696e6720616c72656164792e000000000000604482015290519081900360640190fd5b826000816002811115611f2757fe5b60ff1610158015611f4757506002816002811115611f4157fe5b60ff1611155b1515611f9d576040805160e560020a62461bcd02815260206004820152601d60248201527f4973206e6f742076616c69642061207374616b696e67206c6576656c2e000000604482015290519081900360640190fd5b6000611fc4336004876002811115611fb157fe5b60038110611fbb57fe5b0154600061217e565b336000818152600b602090815260408083204260018201819055600282015560048101548452600f8352928190208054600160a060020a0319168517905560038301548151868152915195965092949293927f934689bd9b9fb853503e580edb3c1b0dd8a3fa53dc75bda1e124ee24652dc50f929181900390910190a3505050505050565b61156333612921565b61205a611837565b15156120b0576040805160e560020a62461bcd0281526020600482015260266024820152600080516020612bfe833981519152604482015260d160020a6531ba34b7b71702606482015290519081900360840190fd5b610f5881612969565b600a54600160a060020a031681565b6000610d2960038363ffffffff61267b16565b600160a060020a0381166000908152600b60205260408120600101541561210857612105826127dc565b90505b600160a060020a0382166000818152600b602081815260408084206004810180548652600f84529185208054600160a060020a03191690559484529190528183556001830182905560028301829055600383018290558190556005820181905560068201819055600790910155610d2c826129d9565b60008083116121d7576040805160e560020a62461bcd02815260206004820152601560248201527f43616e6e6f74206465706f7369742030204958542e0000000000000000000000604482015290519081900360640190fd5b600a54604080517fdd62ed3e000000000000000000000000000000000000000000000000000000008152600160a060020a03878116600483015230602483015291518693929092169163dd62ed3e91604480820192602092909190829003018186803b15801561224657600080fd5b505afa15801561225a573d6000803e3d6000fd5b505050506040513d602081101561227057600080fd5b5051108015906123135750600a54604080517f70a08231000000000000000000000000000000000000000000000000000000008152600160a060020a0387811660048301529151869392909216916370a0823191602480820192602092909190829003018186803b1580156122e457600080fd5b505afa1580156122f8573d6000803e3d6000fd5b505050506040513d602081101561230e57600080fd5b505110155b80156123bc5750600a54604080517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a03878116600483015230602483015260448201879052915191909216916323b872dd9160648083019260209291908290030181600087803b15801561238f57600080fd5b505af11580156123a3573d6000803e3d6000fd5b505050506040513d60208110156123b957600080fd5b50515b1515612438576040805160e560020a62461bcd02815260206004820152603460248201527f556e61626c6520746f206465706f73697420495854202d20636865636b20616c60448201527f6c6f77616e636520616e642062616c616e63652e000000000000000000000000606482015290519081900360840190fd5b81156124525761244a600e5484612733565b600e55612490565b600160a060020a0384166000908152600b6020526040902060058101546124799085612733565b6005820155600d5461248b9085612733565b600d55505b509092915050565b60006124a382611cfa565b90508015156124b157610d2c565b600e54811115612531576040805160e560020a62461bcd02815260206004820152603060248201527f506f6f6c2062616c616e6365206e6f742073756666696369656e7420746f207760448201527f6974686472617720726577617264732e00000000000000000000000000000000606482015290519081900360840190fd5b600a546040805160e060020a63a9059cbb028152600160a060020a038581166004830152602482018590529151919092169163a9059cbb9160448083019260209291908290030181600087803b15801561258a57600080fd5b505af115801561259e573d6000803e3d6000fd5b505050506040513d60208110156125b457600080fd5b5051151561260e576040805160e560020a62461bcd0281526020600482015260256024820152600080516020612c7e8339815191526044820152600080516020612c3e833981519152606482015290519081900360840190fd5b600e80548290039055600160a060020a0382166000908152600b60205260408120600781018290556006810191909155600854600282015462015180909102904203818110612673576000612663828461270f565b6002850180549185029091019055505b505050919050565b6000600160a060020a038216151561269257600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b6000828211156126c157600080fd5b50900390565b6126d860038263ffffffff612adb16565b604051600160a060020a038216907fe366c1c0452ed8eec96861e9e54141ebff23c9ec89fe27b996b45f5ec388498790600090a250565b600080821161271d57600080fd5b6000828481151561272a57fe5b04949350505050565b60008282018381101561274557600080fd5b9392505050565b61275d60018263ffffffff612b1516565b604051600160a060020a038216907fcd265ebaf09df2871cc7bd4133404a235ba12eff2041bb89d9c714a2621c7c7e90600090a250565b6127a560018263ffffffff612adb16565b604051600160a060020a038216907f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890600090a250565b600160a060020a0381166000908152600b60205260408120816127fe84612498565b6005830154600184015491925090151560008211801561281b5750805b1561290d57600a546040805160e060020a63a9059cbb028152600160a060020a038981166004830152602482018690529151919092169163a9059cbb9160448083019260209291908290030181600087803b15801561287957600080fd5b505af115801561288d573d6000803e3d6000fd5b505050506040513d60208110156128a357600080fd5b505115156128fd576040805160e560020a62461bcd0281526020600482015260256024820152600080516020612c7e8339815191526044820152600080516020612c3e833981519152606482015290519081900360840190fd5b612909600d54836126b2565b600d555b506000600590930192909255019050919050565b61293260038263ffffffff612b1516565b604051600160a060020a038216907fe1434e25d6611e0db941968fdc97811c982ac1602e951637d206f5fdda9dd8f190600090a250565b600160a060020a038116151561297e57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a360008054600160a060020a031916600160a060020a0392909216919091179055565b60005b600c54811015612ad75781600160a060020a0316600c828154811015156129ff57fe5b600091825260209091200154600160a060020a03161415612acf57600c80546000198101908110612a2c57fe5b600091825260209091200154600c8054600160a060020a039092169183908110612a5257fe5b600091825260208220018054600160a060020a031916600160a060020a039390931692909217909155600c80546000198101908110612a8d57fe5b60009182526020909120018054600160a060020a031916600160a060020a0392909216919091179055600c80546000190190612ac99082612bb6565b50612ad7565b6001016129dc565b5050565b600160a060020a0381161515612af057600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b600160a060020a0381161515612b2a57600080fd5b600160a060020a0316600090815260209190915260409020805460ff19169055565b6101006040519081016040528060008152602001600081526020016000815260200160008019168152602001600080191681526020016000815260200160008152602001600081525090565b5080546000825590600052602060002090810190610f589190612bdf565b815481835581811115612bda57600083815260209020612bda918101908301612bdf565b505050565b610f6891905b80821115612bf95760008155600101612be5565b509056fe4f6e6c7920746865206f776e65722063616e2063616c6c20746869732066756e4d656d626572206973206e6f74207374616b696e672e00000000000000000000204958542e00000000000000000000000000000000000000000000000000000043616e6e6f742063616c6c207768656e207061757365642e0000000000000000556e61626c6520746f20776974686472617720746869732076616c7565206f66a165627a7a72305820c21a9c7be01d5eaa450509dd274825b219237d4fa735184c142b676a9c392c47002900000000000000000000000054b9a1e220d394548113645adb50081d0f92d17c000000000000000000000000000000000000000000000000000000000000005a000000000000000000000000fca47962d45adfdfd1ab2d972315db4ce7ccf09400000000000000000000000000000000000000000000000000000004a817c800000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000174876e800000000000000000000000000000000000000000000000000000000746a528800000000000000000000000000000000000000000000000000000000e8d4a51000
Deployed Bytecode
0x6080604052600436106101e7577c0100000000000000000000000000000000000000000000000000000000600035046308ae4b0c81146101ec5780630a47ad24146102605780630b1ca49a146102875780630fe67260146102bc57806311267227146102ef57806323440944146103195780632d6b4e5314610343578063372500ab1461036d5780633f4ba83a1461038257806346fbf68e146103975780634c034ea9146103de5780634d238c8e146104085780635026d63e1461043b5780635c975abb146104505780635f842fab146104655780636877123b1461048f5780636bdad940146104d45780636ef8d66d146104e9578063715018a6146104fe57806382dc1ec4146105135780638456cb59146105465780638ba7dad41461055b5780638da5cb5b1461058e5780638f32d59b146105bf57806393423e9c146105d45780639890220b1461060757806399c0d0d21461061c5780639f2bb28714610646578063bed9d8611461065b578063c9c77eb814610670578063d5a849e91461069a578063d74a3c3d146106cd578063d80260a8146106e2578063e3d552ba146106f7578063ef8697731461070c578063f0bd90051461073f578063f0c043ee1461076c578063f2fde38b14610781578063f4d885b0146107b4578063facd743b146107c9575b600080fd5b3480156101f857600080fd5b5061021f6004803603602081101561020f57600080fd5b5035600160a060020a03166107fc565b604080519889526020890197909752878701959095526060870193909352608086019190915260a085015260c084015260e083015251908190036101000190f35b34801561026c57600080fd5b5061027561083f565b60408051918252519081900360200190f35b34801561029357600080fd5b506102ba600480360360208110156102aa57600080fd5b5035600160a060020a0316610845565b005b3480156102c857600080fd5b50610275600480360360208110156102df57600080fd5b5035600160a060020a0316610968565b3480156102fb57600080fd5b506102ba6004803603602081101561031257600080fd5b50356109ea565b34801561032557600080fd5b506102ba6004803603602081101561033c57600080fd5b5035610a83565b34801561034f57600080fd5b506102756004803603602081101561036657600080fd5b5035610b2b565b34801561037957600080fd5b506102ba610b3f565b34801561038e57600080fd5b506102ba610c26565b3480156103a357600080fd5b506103ca600480360360208110156103ba57600080fd5b5035600160a060020a0316610d16565b604080519115158252519081900360200190f35b3480156103ea57600080fd5b506102ba6004803603602081101561040157600080fd5b5035610d31565b34801561041457600080fd5b506102ba6004803603602081101561042b57600080fd5b5035600160a060020a0316610eca565b34801561044757600080fd5b50610275610f5b565b34801561045c57600080fd5b506103ca610f61565b34801561047157600080fd5b506102ba6004803603602081101561048857600080fd5b5035610f6b565b34801561049b57600080fd5b506102ba600480360360808110156104b257600080fd5b50803590600160a060020a036020820135169060408101359060600135611142565b3480156104e057600080fd5b50610275611554565b3480156104f557600080fd5b506102ba61155a565b34801561050a57600080fd5b506102ba611565565b34801561051f57600080fd5b506102ba6004803603602081101561053657600080fd5b5035600160a060020a031661160d565b34801561055257600080fd5b506102ba611675565b34801561056757600080fd5b506102756004803603602081101561057e57600080fd5b5035600160a060020a0316611755565b34801561059a57600080fd5b506105a3611828565b60408051600160a060020a039092168252519081900360200190f35b3480156105cb57600080fd5b506103ca611837565b3480156105e057600080fd5b50610275600480360360208110156105f757600080fd5b5035600160a060020a0316611848565b34801561061357600080fd5b506102ba6118c4565b34801561062857600080fd5b506105a36004803603602081101561063f57600080fd5b5035611b88565b34801561065257600080fd5b50610275611bb0565b34801561066757600080fd5b506102ba611bb6565b34801561067c57600080fd5b506105a36004803603602081101561069357600080fd5b5035611cdf565b3480156106a657600080fd5b50610275600480360360208110156106bd57600080fd5b5035600160a060020a0316611cfa565b3480156106d957600080fd5b50610275611d6e565b3480156106ee57600080fd5b50610275611d74565b34801561070357600080fd5b50610275611d79565b34801561071857600080fd5b506102756004803603602081101561072f57600080fd5b5035600160a060020a0316611d7f565b34801561074b57600080fd5b506102ba6004803603602081101561076257600080fd5b503560ff16611e01565b34801561077857600080fd5b506102ba612049565b34801561078d57600080fd5b506102ba600480360360208110156107a457600080fd5b5035600160a060020a0316612052565b3480156107c057600080fd5b506105a36120b9565b3480156107d557600080fd5b506103ca600480360360208110156107ec57600080fd5b5035600160a060020a03166120c8565b600b602052600090815260409020805460018201546002830154600384015460048501546005860154600687015460079097015495969495939492939192909188565b60095481565b600160a060020a0381166000908152600b6020526040902054819015156108b6576040805160e560020a62461bcd02815260206004820152601560248201527f55736572206973206e6f742061206d656d6265722e0000000000000000000000604482015290519081900360640190fd5b6108be611837565b1515610914576040805160e560020a62461bcd0281526020600482015260266024820152600080516020612bfe833981519152604482015260d160020a6531ba34b7b71702606482015290519081900360840190fd5b600061091f836120db565b604080518281529051919250600160a060020a0385169133917f959cb5beed67a71b290bdade385cdd57bb44e4f8884f522e6a799d1ccb3fb21c919081900360200190a3505050565b600160a060020a0381166000908152600b6020526040812060010154829015156109ca576040805160e560020a62461bcd0281526020600482015260166024820152600080516020612c1e833981519152604482015290519081900360640190fd5b5050600160a060020a03166000908152600b602052604090206006015490565b6109f2611837565b1515610a48576040805160e560020a62461bcd0281526020600482015260266024820152600080516020612bfe833981519152604482015260d160020a6531ba34b7b71702606482015290519081900360840190fd5b60078190556040805182815290517fbe3f0b74dce65634b50271acb4c999f395491d37b5c707bd34df15134ea5cc099181900360200190a150565b610a8b611837565b1515610ae1576040805160e560020a62461bcd0281526020600482015260266024820152600080516020612bfe833981519152604482015260d160020a6531ba34b7b71702606482015290519081900360840190fd5b6000610aef3383600161217e565b60408051828152905191925033917fea74918ad47929fae6a873ab3425581f01a3cd9c602bd9ed21348414c2c8bc119181900360200190a25050565b60048160038110610b3857fe5b0154905081565b60025460ff1615610b88576040805160e560020a62461bcd0281526020600482015260186024820152600080516020612c5e833981519152604482015290519081900360640190fd5b336000818152600b60205260409020600101541515610bdf576040805160e560020a62461bcd0281526020600482015260166024820152600080516020612c1e833981519152604482015290519081900360640190fd5b6000610bea33612498565b60408051828152905191925033917f106f923f993c2149d49b4255ff723acafa1f2d94393f561d3eda32ae348f72419181900360200190a25050565b610c2f33610d16565b1515610c85576040805160e560020a62461bcd02815260206004820152601d60248201527f43616e206f6e6c792062652063616c6c6564206279207061757365722e000000604482015290519081900360640190fd5b60025460ff161515610ce1576040805160e560020a62461bcd02815260206004820152601f60248201527f43616e206f6e6c792063616c6c2074686973207768656e207061757365642e00604482015290519081900360640190fd5b6002805460ff191690556040517fa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d1693390600090a1565b6000610d2960018363ffffffff61267b16565b90505b919050565b610d39611837565b1515610d8f576040805160e560020a62461bcd0281526020600482015260266024820152600080516020612bfe833981519152604482015260d160020a6531ba34b7b71702606482015290519081900360840190fd5b6000811115610e915780600e5410158015610e295750600a546040805160e060020a63a9059cbb028152336004820152602481018490529051600160a060020a039092169163a9059cbb916044808201926020929091908290030181600087803b158015610dfc57600080fd5b505af1158015610e10573d6000803e3d6000fd5b505050506040513d6020811015610e2657600080fd5b50515b1515610e81576040805160e560020a62461bcd0281526020600482015260256024820152600080516020612c7e8339815191526044820152600080516020612c3e833981519152606482015290519081900360840190fd5b610e8d600e54826126b2565b600e555b60408051828152905133917f61a0b4d879cd5e5653631acae542581573d52905e66efcbb6246efca1ef306d6919081900360200190a250565b610ed3336120c8565b1515610f4f576040805160e560020a62461bcd02815260206004820152603060248201527f546869732066756e6374696f6e2063616e206f6e6c792062652063616c6c656460448201527f20627920612076616c696461746f722e00000000000000000000000000000000606482015290519081900360840190fd5b610f58816126c7565b50565b600e5481565b60025460ff165b90565b610f73611837565b1515610fc9576040805160e560020a62461bcd0281526020600482015260266024820152600080516020612bfe833981519152604482015260d160020a6531ba34b7b71702606482015290519081900360840190fd5b60008110158015610fdb575060648111155b1515611057576040805160e560020a62461bcd02815260206004820152603060248201527f4c6f79616c74792072657761726420616d6f756e74206d75737420626520626560448201527f747765656e203020616e64203130302e00000000000000000000000000000000606482015290519081900360840190fd5b600854620151800260005b600c54811015611105576000600b6000600c8481548110151561108157fe5b6000918252602080832090910154600160a060020a031683528201929092526040019020600281015490915042038381106110fb5760006110c2828661270f565b9050600060646009548560050154028115156110da57fe5b60078601805492909104840290910190555060028301805491860290910190555b5050600101611062565b5060098290556040805183815290517fd5fe04030c34ea1cfd57274ba3c2ba027368da8568fb89d84a65f883918b77ed9181900360200190a15050565b61114b336120c8565b15156111c7576040805160e560020a62461bcd02815260206004820152603060248201527f546869732066756e6374696f6e2063616e206f6e6c792062652063616c6c656460448201527f20627920612076616c696461746f722e00000000000000000000000000000000606482015290519081900360840190fd5b600160a060020a0383166000908152600b6020526040902054839015611237576040805160e560020a62461bcd02815260206004820152601160248201527f416c72656164792061206d656d6265722e000000000000000000000000000000604482015290519081900360640190fd5b600160a060020a0384166000908152600b60205260409020600101548490156112aa576040805160e560020a62461bcd02815260206004820152601a60248201527f4d656d626572206973207374616b696e6720616c72656164792e000000000000604482015290519081900360640190fd5b600160a060020a038516151561130a576040805160e560020a62461bcd02815260206004820152601c60248201527f4d656d6265722061646472657373207761732073657420746f20302e00000000604482015290519081900360640190fd5b611312612b4c565b61010060405190810160405280428152602001600081526020016000815260200188815260200186815260200160008152602001600081526020016000815250905080600b600088600160a060020a0316600160a060020a03168152602001908152602001600020600082015181600001556020820151816001015560408201518160020155606082015181600301556080820151816004015560a0820151816005015560c0820151816006015560e08201518160070155905050600c8690806001815401808255809150509060018203906000526020600020016000909192909190916101000a815481600160a060020a030219169083600160a060020a031602179055505085600f60008360800151815260200190815260200160002060006101000a815481600160a060020a030219169083600160a060020a031602179055506000600f600086815260200190815260200160002060009054906101000a9004600160a060020a031690506000600160a060020a031681600160a060020a031614151561151257600160a060020a0381166000908152600b6020526040902060068101546007546114c69190612733565b60068201556007546040805191825251600160a060020a03808b1692908516917f6b39a6459136ef74b2d635667097bdc51b53c1fcc7068a4535a0150a8d85a7369181900360200190a3505b858888600160a060020a03167faca4b80fcb8f11692ba3753ba2bbf166e611e4b50ee6d6f07be507439e65b56d60405160405180910390a45050505050505050565b60075481565b6115633361274c565b565b61156d611837565b15156115c3576040805160e560020a62461bcd0281526020600482015260266024820152600080516020612bfe833981519152604482015260d160020a6531ba34b7b71702606482015290519081900360840190fd5b60008054604051600160a060020a03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a360008054600160a060020a0319169055565b61161633610d16565b151561166c576040805160e560020a62461bcd02815260206004820152601d60248201527f43616e206f6e6c792062652063616c6c6564206279207061757365722e000000604482015290519081900360640190fd5b610f5881612794565b61167e33610d16565b15156116d4576040805160e560020a62461bcd02815260206004820152601d60248201527f43616e206f6e6c792062652063616c6c6564206279207061757365722e000000604482015290519081900360640190fd5b60025460ff161561171d576040805160e560020a62461bcd0281526020600482015260186024820152600080516020612c5e833981519152604482015290519081900360640190fd5b6002805460ff191660011790556040517f9e87fac88ff661f02d44f95383c817fece4bce600a3dab7a54406878b965e75290600090a1565b600160a060020a0381166000908152600b6020526040812060010154829015156117b7576040805160e560020a62461bcd0281526020600482015260166024820152600080516020612c1e833981519152604482015290519081900360640190fd5b600854600160a060020a0384166000908152600b602052604090206002810154600782015494506201518090920291420382811061181f5760006117fb828561270f565b90506000606460095485600501540281151561181357fe5b04919091029590950194505b50505050919050565b600054600160a060020a031690565b600054600160a060020a0316331490565b600160a060020a0381166000908152600b6020526040812060010154829015156118aa576040805160e560020a62461bcd0281526020600482015260166024820152600080516020612c1e833981519152604482015290519081900360640190fd5b6118b383611cfa565b6118bc84611d7f565b019392505050565b6118cc611837565b1515611922576040805160e560020a62461bcd0281526020600482015260266024820152600080516020612bfe833981519152604482015260d160020a6531ba34b7b71702606482015290519081900360840190fd5b60005b600c54811015611a34576000600c8281548110151561194057fe5b6000918252602080832090910154600160a060020a0316808352600b909152604082206001015490925015159081611979576000611982565b611982836127dc565b600160a060020a0384166000818152600b602081815260408084206004810180548652600f84528286208054600160a060020a03191690558686529383528481556001810185905560028101859055600381018590559284905560058301849055600683018490556007909201929092558051848152905193945091927fbd350368d00f1cccedbd91542fd4b78e8bf17a54efa5c196cbfde197a10a5c019281900390910190a2505050600101611925565b50611a41600c6000612b98565b600a54600e546040805160e060020a63a9059cbb028152336004820152602481019290925251600160a060020a039092169163a9059cbb916044808201926020929091908290030181600087803b158015611a9b57600080fd5b505af1158015611aaf573d6000803e3d6000fd5b505050506040513d6020811015611ac557600080fd5b50511515611b1f576040805160e560020a62461bcd0281526020600482015260256024820152600080516020612c7e8339815191526044820152600080516020612c3e833981519152606482015290519081900360840190fd5b6000600e819055604080519182525133917f91b1cad2ec95df0b922e500d999cb940e01fdd73938a2eff337a259c13ce81c2919081900360200190a260405133907fb8dedf73564df32ee9c7bb17337c54e8b3ee64c6a056bddb528989c496cfe4c990600090a2565b600c805482908110611b9657fe5b600091825260209091200154600160a060020a0316905081565b600d5481565b60025460ff1615611bff576040805160e560020a62461bcd0281526020600482015260186024820152600080516020612c5e833981519152604482015290519081900360640190fd5b336000818152600b60205260409020600101541515611c56576040805160e560020a62461bcd0281526020600482015260166024820152600080516020612c1e833981519152604482015290519081900360640190fd5b6000611c61336127dc565b336000818152600b6020818152604080842060048101548552600f83528185208054600160a060020a03191690558585529282526001830184905560028301939093558251858152925194955090937f8108595eb6bad3acefa9da467d90cc2217686d5c5ac85460f8b7849c840645fc9281900390910190a2505050565b600f60205260009081526040902054600160a060020a031681565b600160a060020a0381166000908152600b602052604081206001015482901515611d5c576040805160e560020a62461bcd0281526020600482015260166024820152600080516020612c1e833981519152604482015290519081900360640190fd5b611d6583611755565b6118bc84610968565b600c5490565b600881565b60085481565b600160a060020a0381166000908152600b602052604081206001015482901515611de1576040805160e560020a62461bcd0281526020600482015260166024820152600080516020612c1e833981519152604482015290519081900360640190fd5b5050600160a060020a03166000908152600b602052604090206005015490565b60025460ff1615611e4a576040805160e560020a62461bcd0281526020600482015260186024820152600080516020612c5e833981519152604482015290519081900360640190fd5b336000818152600b60205260409020541515611eb0576040805160e560020a62461bcd02815260206004820152601560248201527f55736572206973206e6f742061206d656d6265722e0000000000000000000000604482015290519081900360640190fd5b336000818152600b602052604090206001015415611f18576040805160e560020a62461bcd02815260206004820152601a60248201527f4d656d626572206973207374616b696e6720616c72656164792e000000000000604482015290519081900360640190fd5b826000816002811115611f2757fe5b60ff1610158015611f4757506002816002811115611f4157fe5b60ff1611155b1515611f9d576040805160e560020a62461bcd02815260206004820152601d60248201527f4973206e6f742076616c69642061207374616b696e67206c6576656c2e000000604482015290519081900360640190fd5b6000611fc4336004876002811115611fb157fe5b60038110611fbb57fe5b0154600061217e565b336000818152600b602090815260408083204260018201819055600282015560048101548452600f8352928190208054600160a060020a0319168517905560038301548151868152915195965092949293927f934689bd9b9fb853503e580edb3c1b0dd8a3fa53dc75bda1e124ee24652dc50f929181900390910190a3505050505050565b61156333612921565b61205a611837565b15156120b0576040805160e560020a62461bcd0281526020600482015260266024820152600080516020612bfe833981519152604482015260d160020a6531ba34b7b71702606482015290519081900360840190fd5b610f5881612969565b600a54600160a060020a031681565b6000610d2960038363ffffffff61267b16565b600160a060020a0381166000908152600b60205260408120600101541561210857612105826127dc565b90505b600160a060020a0382166000818152600b602081815260408084206004810180548652600f84529185208054600160a060020a03191690559484529190528183556001830182905560028301829055600383018290558190556005820181905560068201819055600790910155610d2c826129d9565b60008083116121d7576040805160e560020a62461bcd02815260206004820152601560248201527f43616e6e6f74206465706f7369742030204958542e0000000000000000000000604482015290519081900360640190fd5b600a54604080517fdd62ed3e000000000000000000000000000000000000000000000000000000008152600160a060020a03878116600483015230602483015291518693929092169163dd62ed3e91604480820192602092909190829003018186803b15801561224657600080fd5b505afa15801561225a573d6000803e3d6000fd5b505050506040513d602081101561227057600080fd5b5051108015906123135750600a54604080517f70a08231000000000000000000000000000000000000000000000000000000008152600160a060020a0387811660048301529151869392909216916370a0823191602480820192602092909190829003018186803b1580156122e457600080fd5b505afa1580156122f8573d6000803e3d6000fd5b505050506040513d602081101561230e57600080fd5b505110155b80156123bc5750600a54604080517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a03878116600483015230602483015260448201879052915191909216916323b872dd9160648083019260209291908290030181600087803b15801561238f57600080fd5b505af11580156123a3573d6000803e3d6000fd5b505050506040513d60208110156123b957600080fd5b50515b1515612438576040805160e560020a62461bcd02815260206004820152603460248201527f556e61626c6520746f206465706f73697420495854202d20636865636b20616c60448201527f6c6f77616e636520616e642062616c616e63652e000000000000000000000000606482015290519081900360840190fd5b81156124525761244a600e5484612733565b600e55612490565b600160a060020a0384166000908152600b6020526040902060058101546124799085612733565b6005820155600d5461248b9085612733565b600d55505b509092915050565b60006124a382611cfa565b90508015156124b157610d2c565b600e54811115612531576040805160e560020a62461bcd02815260206004820152603060248201527f506f6f6c2062616c616e6365206e6f742073756666696369656e7420746f207760448201527f6974686472617720726577617264732e00000000000000000000000000000000606482015290519081900360840190fd5b600a546040805160e060020a63a9059cbb028152600160a060020a038581166004830152602482018590529151919092169163a9059cbb9160448083019260209291908290030181600087803b15801561258a57600080fd5b505af115801561259e573d6000803e3d6000fd5b505050506040513d60208110156125b457600080fd5b5051151561260e576040805160e560020a62461bcd0281526020600482015260256024820152600080516020612c7e8339815191526044820152600080516020612c3e833981519152606482015290519081900360840190fd5b600e80548290039055600160a060020a0382166000908152600b60205260408120600781018290556006810191909155600854600282015462015180909102904203818110612673576000612663828461270f565b6002850180549185029091019055505b505050919050565b6000600160a060020a038216151561269257600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b6000828211156126c157600080fd5b50900390565b6126d860038263ffffffff612adb16565b604051600160a060020a038216907fe366c1c0452ed8eec96861e9e54141ebff23c9ec89fe27b996b45f5ec388498790600090a250565b600080821161271d57600080fd5b6000828481151561272a57fe5b04949350505050565b60008282018381101561274557600080fd5b9392505050565b61275d60018263ffffffff612b1516565b604051600160a060020a038216907fcd265ebaf09df2871cc7bd4133404a235ba12eff2041bb89d9c714a2621c7c7e90600090a250565b6127a560018263ffffffff612adb16565b604051600160a060020a038216907f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890600090a250565b600160a060020a0381166000908152600b60205260408120816127fe84612498565b6005830154600184015491925090151560008211801561281b5750805b1561290d57600a546040805160e060020a63a9059cbb028152600160a060020a038981166004830152602482018690529151919092169163a9059cbb9160448083019260209291908290030181600087803b15801561287957600080fd5b505af115801561288d573d6000803e3d6000fd5b505050506040513d60208110156128a357600080fd5b505115156128fd576040805160e560020a62461bcd0281526020600482015260256024820152600080516020612c7e8339815191526044820152600080516020612c3e833981519152606482015290519081900360840190fd5b612909600d54836126b2565b600d555b506000600590930192909255019050919050565b61293260038263ffffffff612b1516565b604051600160a060020a038216907fe1434e25d6611e0db941968fdc97811c982ac1602e951637d206f5fdda9dd8f190600090a250565b600160a060020a038116151561297e57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a360008054600160a060020a031916600160a060020a0392909216919091179055565b60005b600c54811015612ad75781600160a060020a0316600c828154811015156129ff57fe5b600091825260209091200154600160a060020a03161415612acf57600c80546000198101908110612a2c57fe5b600091825260209091200154600c8054600160a060020a039092169183908110612a5257fe5b600091825260208220018054600160a060020a031916600160a060020a039390931692909217909155600c80546000198101908110612a8d57fe5b60009182526020909120018054600160a060020a031916600160a060020a0392909216919091179055600c80546000190190612ac99082612bb6565b50612ad7565b6001016129dc565b5050565b600160a060020a0381161515612af057600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b600160a060020a0381161515612b2a57600080fd5b600160a060020a0316600090815260209190915260409020805460ff19169055565b6101006040519081016040528060008152602001600081526020016000815260200160008019168152602001600080191681526020016000815260200160008152602001600081525090565b5080546000825590600052602060002090810190610f589190612bdf565b815481835581811115612bda57600083815260209020612bda918101908301612bdf565b505050565b610f6891905b80821115612bf95760008155600101612be5565b509056fe4f6e6c7920746865206f776e65722063616e2063616c6c20746869732066756e4d656d626572206973206e6f74207374616b696e672e00000000000000000000204958542e00000000000000000000000000000000000000000000000000000043616e6e6f742063616c6c207768656e207061757365642e0000000000000000556e61626c6520746f20776974686472617720746869732076616c7565206f66a165627a7a72305820c21a9c7be01d5eaa450509dd274825b219237d4fa735184c142b676a9c392c470029
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000054b9a1e220d394548113645adb50081d0f92d17c000000000000000000000000000000000000000000000000000000000000005a000000000000000000000000fca47962d45adfdfd1ab2d972315db4ce7ccf09400000000000000000000000000000000000000000000000000000004a817c800000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000174876e800000000000000000000000000000000000000000000000000000000746a528800000000000000000000000000000000000000000000000000000000e8d4a51000
-----Decoded View---------------
Arg [0] : _validator (address): 0x54B9a1e220D394548113645ADb50081d0f92d17c
Arg [1] : _loyaltyPeriodDays (uint256): 90
Arg [2] : _ixtToken (address): 0xfcA47962D45ADFdfd1Ab2D972315dB4ce7CCf094
Arg [3] : _invitationReward (uint256): 20000000000
Arg [4] : _loyaltyRewardAmount (uint256): 10
Arg [5] : _ixtStakingLevels (uint256[3]): 100000000000,500000000000,1000000000000
-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 00000000000000000000000054b9a1e220d394548113645adb50081d0f92d17c
Arg [1] : 000000000000000000000000000000000000000000000000000000000000005a
Arg [2] : 000000000000000000000000fca47962d45adfdfd1ab2d972315db4ce7ccf094
Arg [3] : 00000000000000000000000000000000000000000000000000000004a817c800
Arg [4] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [5] : 000000000000000000000000000000000000000000000000000000174876e800
Arg [6] : 000000000000000000000000000000000000000000000000000000746a528800
Arg [7] : 000000000000000000000000000000000000000000000000000000e8d4a51000
Swarm Source
bzzr://c21a9c7be01d5eaa450509dd274825b219237d4fa735184c142b676a9c392c47
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 27 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $0.001314 | 1,494,781.0001 | $1,964.25 |
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.