More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 189 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Claim | 15375611 | 721 days ago | IN | 0 ETH | 0.00046049 | ||||
Claim | 15236937 | 743 days ago | IN | 0 ETH | 0.00056537 | ||||
Claim | 15052401 | 772 days ago | IN | 0 ETH | 0.00299379 | ||||
Claim | 14736036 | 825 days ago | IN | 0 ETH | 0.0021891 | ||||
Claim | 14522894 | 858 days ago | IN | 0 ETH | 0.00385315 | ||||
Claim | 14211528 | 907 days ago | IN | 0 ETH | 0.00720677 | ||||
Claim | 14191504 | 910 days ago | IN | 0 ETH | 0.00249609 | ||||
Claim | 14055689 | 931 days ago | IN | 0 ETH | 0.0096643 | ||||
Claim | 13879422 | 958 days ago | IN | 0 ETH | 0.00356328 | ||||
Claim | 13867851 | 960 days ago | IN | 0 ETH | 0.00425711 | ||||
Claim | 13809802 | 969 days ago | IN | 0 ETH | 0.0040481 | ||||
Claim | 13797063 | 971 days ago | IN | 0 ETH | 0.00377279 | ||||
Claim | 13789926 | 972 days ago | IN | 0 ETH | 0.00256752 | ||||
Claim | 13767912 | 975 days ago | IN | 0 ETH | 0.007222 | ||||
Claim | 13766590 | 976 days ago | IN | 0 ETH | 0.00566734 | ||||
Claim | 13766554 | 976 days ago | IN | 0 ETH | 0.00647696 | ||||
Claim | 13760297 | 977 days ago | IN | 0 ETH | 0.00811526 | ||||
Claim | 13758252 | 977 days ago | IN | 0 ETH | 0.00603491 | ||||
Claim | 13727199 | 982 days ago | IN | 0 ETH | 0.0044138 | ||||
Claim | 13697193 | 987 days ago | IN | 0 ETH | 0.00570295 | ||||
Claim | 13658570 | 993 days ago | IN | 0 ETH | 0.0053206 | ||||
Claim | 13657070 | 993 days ago | IN | 0 ETH | 0.00647565 | ||||
Claim | 13644468 | 995 days ago | IN | 0 ETH | 0.00855977 | ||||
Claim | 13615570 | 1000 days ago | IN | 0 ETH | 0.00703631 | ||||
Claim | 13597534 | 1003 days ago | IN | 0 ETH | 0.00972089 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
WalletTokensalePublic
Compiler Version
v0.6.12+commit.27d51765
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.6.12; import "openzeppelin-solidity/contracts/access/AccessControl.sol"; import "openzeppelin-solidity/contracts/math/SafeMath.sol"; import "openzeppelin-solidity/contracts/utils/ReentrancyGuard.sol"; import "openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol"; import "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol"; import "openzeppelin-solidity/contracts/cryptography/ECDSA.sol"; import {vcUSDPool} from "contracts/Pool/vcUSDPool.sol"; contract WalletTokensalePublic is AccessControl, ReentrancyGuard { using SafeMath for uint256; using SafeERC20 for ERC20; bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); bytes32 public constant SERVICE_ROLE = keccak256("SERVICE_ROLE"); uint256 public constant AMOUNT_USD = 500000000; uint256 public totalAmount; uint256 public totalSold; uint256 public maxAmountToBuy; /// @dev address of main token address public govTokenAddress; address public USDTAddress; uint256 public factor = 10**12; uint256 public USDTReceived; uint256 public USDTClaimed; /// @dev for example: 100000 = 0.01 USD uint256 public rate; uint256 public ratesPrecision = 10**7; address public vcUSDPoolAddress; uint256 currentLockNumber = 0; /// @dev true = swap unlocked, false = swap locked bool public swapUnlocked = true; /// @dev true = claim unlocked, false = locked bool public claimUnlocked = false; /// @dev struct of lock tokens struct Lock { uint256 unlockDate; uint256 percent; } /// @dev array of locks tokens Lock[] public locks; struct UserInfo { uint256 amount; uint256 claimed; } mapping(address => UserInfo) public users; mapping(bytes32 => bool) hashes; uint256 public swapsCount; event TokenExchanged( address indexed spender, uint256 usdAmount, uint256 daovcAmount, uint256 time, string userId ); event TokenExchangedFiat( address indexed spender, uint256 amount, uint256 daovcAmount, uint256 time ); event TokensClaimed( address indexed claimer, uint256 amountClaimed, uint256 time ); event RoundStateChanged(bool state, uint256 time); modifier roundUnlocked() { require(swapUnlocked, "Round is locked!"); _; } modifier claimUnlockedModifier() { require(claimUnlocked, "Round is locked!"); _; } /** * @dev Constructor of Wallet * @param _govTokenAddress address of main token * @param _USDTAddress address of USDT token * @param _rate rate value * @param _totalAmount total amount of tokens * @param _maxAmountToBuy max amount ot buy in usdt * @param _vcUSDPoolAddress vc usd pool address * @param _usdtReceived initial value of received usdt * @param _usdtClaimed initial value of claimed usdt */ constructor( address _govTokenAddress, address _USDTAddress, uint256 _rate, uint256 _totalAmount, uint256 _maxAmountToBuy, address _vcUSDPoolAddress, uint256 _usdtReceived, uint256 _usdtClaimed ) public { _setupRole(DEFAULT_ADMIN_ROLE, msg.sender); _setupRole(ADMIN_ROLE, msg.sender); govTokenAddress = _govTokenAddress; USDTAddress = _USDTAddress; rate = _rate; totalAmount = _totalAmount; maxAmountToBuy = _maxAmountToBuy; vcUSDPoolAddress = _vcUSDPoolAddress; USDTClaimed = _usdtClaimed; USDTReceived = _usdtReceived; } /** * @dev set round state * @param _state state of round */ function setRoundState(bool _state) external { require(hasRole(ADMIN_ROLE, msg.sender), "Caller is not an admin"); swapUnlocked = _state; emit RoundStateChanged(_state, block.timestamp); } /** * @dev add the token to Lock pull * @param _unlockDate date of token unlock * @param _percent percent of unlocked token */ function addLock(uint256[] memory _unlockDate, uint256[] memory _percent) external { require(hasRole(ADMIN_ROLE, msg.sender), "Caller is not an admin"); require( _unlockDate.length == _percent.length, "unlockDate array and percent arrays must have same values" ); for (uint256 i = 0; i < _unlockDate.length; i++) { locks.push( Lock({percent: _percent[i], unlockDate: _unlockDate[i]}) ); } } /** * @dev swap usdt to daoVC gov token * @param hashedMessage hash of transaction data * @param _sequence transaction number * @param _v v of hash signature * @param _r r of hash signature * @param _s s of hash signature */ function swap( bytes32 hashedMessage, string memory _userId, uint256 _sequence, uint8 _v, bytes32 _r, bytes32 _s ) external roundUnlocked { address service = ECDSA.recover(hashedMessage, _v, _r, _s); require(hasRole(SERVICE_ROLE, service), "Signed not by a service"); bytes32 message = ECDSA.toEthSignedMessageHash( keccak256(abi.encodePacked(_userId, _sequence)) ); require(hashedMessage == message, "Incorrect hashed message"); require( !hashes[message], "Sequence amount already claimed or dublicated" ); hashes[message] = true; swapsCount++; UserInfo storage user = users[msg.sender]; uint256 amountInGov = AMOUNT_USD.mul(factor).mul(ratesPrecision).div( rate ); require( user.amount.add(amountInGov) <= maxAmountToBuy, "You cannot swap more tokens" ); require( totalSold.add(amountInGov) <= totalAmount, "All tokens was sold" ); ERC20(USDTAddress).safeTransferFrom( msg.sender, address(this), AMOUNT_USD ); USDTReceived = USDTReceived.add(AMOUNT_USD); user.amount = user.amount.add(amountInGov); totalSold = totalSold.add(amountInGov); emit TokenExchanged( msg.sender, AMOUNT_USD, amountInGov, block.timestamp, _userId ); } /** * @dev swap fiat to daoVC gov token * @param _user user's address */ function swapBackend(address _user) external roundUnlocked { require( hasRole(SERVICE_ROLE, msg.sender), "Caller does not have the service role" ); UserInfo storage user = users[_user]; uint256 amountInGov = AMOUNT_USD.mul(factor).mul(ratesPrecision).div( rate ); require( user.amount.add(amountInGov) <= maxAmountToBuy, "You cannot swap more tokens" ); require( totalSold.add(amountInGov) <= totalAmount, "All tokens was sold" ); swapsCount++; USDTReceived = USDTReceived.add(AMOUNT_USD); user.amount = user.amount.add(amountInGov); totalSold = totalSold.add(amountInGov); emit TokenExchangedFiat(_user, AMOUNT_USD, amountInGov, block.timestamp); } /** * @dev user claim's his availeble tokens */ function claim() external nonReentrant claimUnlockedModifier { UserInfo storage user = users[msg.sender]; require(user.amount > 0, "Nothing to claim"); uint256 newLock = currentLockNumber; if (newLock <= locks.length - 2) { while (block.timestamp >= locks[newLock + 1].unlockDate) { newLock = newLock + 1; if (newLock == locks.length - 1) { break; } } currentLockNumber = newLock; } uint256 availableAmount = calcAvailableAmount(msg.sender); require(availableAmount > 0, "There are not available tokens to claim"); user.claimed = user.claimed.add(availableAmount); ERC20(govTokenAddress).safeTransfer(msg.sender, availableAmount); emit TokensClaimed(msg.sender, availableAmount, block.timestamp); } /** * @dev send USDT to vc usd pool */ function sendUsdtToPool(uint256 _amount) external { require( hasRole(SERVICE_ROLE, msg.sender), "Caller does not have the service role" ); ERC20(USDTAddress).safeTransfer(vcUSDPoolAddress, _amount); USDTClaimed = USDTClaimed.add(_amount); vcUSDPool(vcUSDPoolAddress).sellVcUsdBackend(_amount); } /** * @dev Caluclate available amount of tokens for user * @param _user - address of user */ function calcAvailableAmount(address _user) private view returns (uint256 availableToken) { UserInfo storage user = users[_user]; availableToken = ( user.amount.mul(locks[currentLockNumber].percent).div(100) ); if (availableToken >= user.claimed) { availableToken = availableToken.sub(user.claimed); } else { availableToken = 0; } return availableToken; } /** * @dev get user info * @param _user address of user */ function getUserInfo(address _user) external view returns ( uint256 amount_, uint256 available_, uint256 claimed_, uint256 currentLockTime_ ) { UserInfo storage user = users[_user]; uint256 newLock = currentLockNumber; if (newLock <= locks.length - 2) { while (block.timestamp >= locks[newLock + 1].unlockDate) { newLock = newLock + 1; if (newLock == locks.length - 1) { break; } } } amount_ = user.amount; claimed_ = user.claimed; available_ = (user.amount.mul(locks[newLock].percent).div(100)); if (available_ >= user.claimed) { available_ = available_.sub(user.claimed); } else { available_ = 0; } if (newLock == locks.length - 1) { currentLockTime_ = locks[newLock].unlockDate; } else { currentLockTime_ = locks[newLock + 1].unlockDate; } return (amount_, available_, claimed_, currentLockTime_); } /** * @dev get state of round */ function getRoundState() external view returns (bool) { return swapUnlocked; } /** * @dev remove tokens from pool * @param _recepient address of recipient * @param _amount amount of tokens * @param tokenAddress address of token */ function removeToken( address _recepient, uint256 _amount, address tokenAddress ) external { require(hasRole(ADMIN_ROLE, msg.sender), "Caller is not an admin"); ERC20(tokenAddress).safeTransfer(_recepient, _amount); } /** * @dev update lock data * @param _index index of lock data * @param _percent percent value * @param _unlockDate date of unlock */ function updateLock( uint256 _index, uint256 _percent, uint256 _unlockDate ) external { require(hasRole(ADMIN_ROLE, msg.sender), "Caller is not an admin"); locks[_index].percent = _percent; locks[_index].unlockDate = _unlockDate; } /** * @dev update user info * @param _user address of user * @param _amount amount of tokens * @param _claimed amount of claimed tokens */ function updateUserInfo( address _user, uint256 _amount, uint256 _claimed ) external { require(hasRole(ADMIN_ROLE, msg.sender), "Caller is not an admin"); UserInfo storage user = users[_user]; user.amount = _amount; user.claimed = _claimed; } /** * @dev set address of token * @param _govTokenAddress address of gov token */ function updateTokenAddress(address _govTokenAddress) external { require(hasRole(ADMIN_ROLE, msg.sender), "Caller is not an admin"); govTokenAddress = _govTokenAddress; } /** @dev claim usdt from this contract * @param _usdtReceiver address, who gets USDT tokens */ function claimUSDT(address _usdtReceiver) external { require(hasRole(ADMIN_ROLE, msg.sender), "Caller is not an admin"); require(USDTReceived > 0, "Not enough USDT to claim"); ERC20(USDTAddress).safeTransfer( _usdtReceiver, USDTReceived.sub(USDTClaimed) ); USDTClaimed = USDTClaimed.add(USDTReceived.sub(USDTClaimed)); } /** * @dev */ function getInfoAboutUsdt() external view returns (uint256 USDTReceived_, uint256 USDTClaimed_) { USDTReceived_ = USDTReceived; USDTClaimed_ = USDTClaimed; return (USDTReceived_, USDTClaimed_); } /** * @dev returns current rate for contract */ function getRate() external view returns (uint256) { return rate; } /** * @dev update rates * @param _rate rate, for example: 400000 = 0.04$ */ function updateRate(uint256 _rate) public { require(hasRole(ADMIN_ROLE, msg.sender), "Caller is not an admin"); rate = _rate; } /** * @dev update vc usd pool address * @param _vcUSDPoolAddress address of vc usd pool */ function updateVcUsdPoolAddress(address _vcUSDPoolAddress) external { require(hasRole(ADMIN_ROLE, msg.sender), "Caller is not an admin"); vcUSDPoolAddress = _vcUSDPoolAddress; } /** * @dev update maximum amount to buy * @param _maxAmountToBuy maximum amount value */ function updateMaximum(uint256 _maxAmountToBuy) external { require(hasRole(ADMIN_ROLE, msg.sender), "Caller is not an admin"); maxAmountToBuy = _maxAmountToBuy; } /** * @dev update current lock number * @param _newCurrentLock new lock number */ function updateCurrentLockNumber(uint256 _newCurrentLock) external { require(hasRole(ADMIN_ROLE, msg.sender), "Caller is not an admin"); currentLockNumber = _newCurrentLock; } /** * @dev add users with info * @param _users users addresses array * @param _amounts amounts array * @param _claimed claimed amount array */ function migrateUsers( address[] memory _users, uint256[] memory _amounts, uint256[] memory _claimed ) external { require(hasRole(ADMIN_ROLE, msg.sender), "Caller is not an admin"); require( _users.length == _amounts.length, "Array users and amounts must be the same length" ); require( _users.length == _claimed.length, "Array users and claimed must be the same length" ); for (uint256 i = 0; i < _users.length; i++) { UserInfo storage user = users[_users[i]]; user.amount = _amounts[i]; user.claimed = _claimed[i]; } } /** * @dev set state of claim * @param _state state of claim */ function setClaimState(bool _state) external { require(hasRole(ADMIN_ROLE, msg.sender), "Caller is not an admin"); claimUnlocked = _state; } /** * @dev set total amount of reward tokens * @param _totalAmount total amount value */ function updateTotalAmount(uint256 _totalAmount) external { require(hasRole(ADMIN_ROLE, msg.sender), "Caller is not an admin"); totalAmount = _totalAmount; } /** * @dev set total sold * @param _totalSold total sold amount */ function updateTotalSold(uint256 _totalSold) external { require(hasRole(ADMIN_ROLE, msg.sender), "Caller is not an admin"); totalSold = _totalSold; } /** * @dev set factor * @param _factor factor value */ function updateFactor(uint256 _factor) external { require(hasRole(ADMIN_ROLE, msg.sender), "Caller is not an admin"); factor = _factor; } /** * @dev set value of received USDT * @param _usdtReceived received USDT amount */ function updateUSDTReceived(uint256 _usdtReceived) external { require(hasRole(ADMIN_ROLE, msg.sender), "Caller is not an admin"); USDTReceived = _usdtReceived; } /** * @dev set value of claimed USDT * @param _usdtClaimed claimed USDT amount */ function updateUSDTClaimed(uint256 _usdtClaimed) external { require(hasRole(ADMIN_ROLE, msg.sender), "Caller is not an admin"); USDTClaimed = _usdtClaimed; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../utils/EnumerableSet.sol"; import "../utils/Address.sol"; import "../utils/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; /** * @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, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b > a) return (false, 0); return (true, a - b); } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, 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 (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a / b); } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a % b); } /** * @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) { require(b <= a, "SafeMath: subtraction overflow"); return a - b; } /** * @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) { 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, reverting 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) { require(b > 0, "SafeMath: division by zero"); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting 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) { require(b > 0, "SafeMath: modulo by zero"); return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * 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); return a - b; } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryDiv}. * * 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); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * 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; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor () internal { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "./IERC20.sol"; import "../../math/SafeMath.sol"; import "../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line max-line-length require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../../utils/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 virtual returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual 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 virtual returns (uint8) { return _decimals; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual 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 virtual { _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; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { // Check the signature length if (signature.length != 65) { revert("ECDSA: invalid signature length"); } // Divide the signature in r, s and v variables bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. // solhint-disable-next-line no-inline-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return recover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover-bytes32-bytes-} that receives the `v`, * `r` and `s` signature fields separately. */ function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (281): 0 < s < secp256k1n ÷ 2 + 1, and for v in (282): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. require(uint256(s) <= 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0, "ECDSA: invalid signature 's' value"); require(v == 27 || v == 28, "ECDSA: invalid signature 'v' value"); // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); require(signer != address(0), "ECDSA: invalid signature"); return signer; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * replicates the behavior of the * https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign[`eth_sign`] * JSON-RPC method. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.12; import "openzeppelin-solidity/contracts/access/AccessControl.sol"; import "openzeppelin-solidity/contracts/math/SafeMath.sol"; import "openzeppelin-solidity/contracts/utils/ReentrancyGuard.sol"; import "openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol"; import "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol"; import "contracts/tokens/vcUSD.sol"; import {WalletTokensalePrivate} from "contracts/Wallets/WalletTokensalePrivate.sol"; contract vcUSDPool is AccessControl, ReentrancyGuard { using SafeMath for uint256; using SafeERC20 for ERC20; bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); bytes32 public constant SERVICE_ROLE = keccak256("SERVICE_ROLE"); bool public saleUnlocked = true; bool public claimUnlocked = true; mapping(bytes32 => bool) hashes; address public vcUSDAddress; address public USDTAddress; address public service_backend; address public privateAddress; event vcUSDBuy(address indexed user, uint256 amount, uint256 time); event vcUSDSell(address indexed user, uint256 amount, uint256 time); event RefferalsClaimed(address indexed user, uint256 amount, uint256 time); constructor( address _USDTAddress, address _vcUSDAddress, address _service_backend ) public { _setupRole(DEFAULT_ADMIN_ROLE, msg.sender); _setupRole(ADMIN_ROLE, msg.sender); _setRoleAdmin(ADMIN_ROLE, DEFAULT_ADMIN_ROLE); _setRoleAdmin(SERVICE_ROLE, ADMIN_ROLE); vcUSDAddress = _vcUSDAddress; USDTAddress = _USDTAddress; service_backend = _service_backend; _setupRole(SERVICE_ROLE, service_backend); } modifier refferalClaimUnlocked() { require(claimUnlocked, "Claim is locked"); _; } modifier salesUnlocked() { require(saleUnlocked, "Sales is locked!"); _; } function airdrop(address[] calldata _addresses, uint256[] calldata _amounts) external { require(hasRole(SERVICE_ROLE, msg.sender), "Caller is not an service"); require( _addresses.length == _amounts.length, "Arrays must have the same length" ); for (uint256 i = 0; i < _addresses.length; i++) { vcUSDToken(vcUSDAddress).mint(_addresses[i], _amounts[i]); } } function buyVcUSDBackend(uint256 _amount, address _recepient) external { require(hasRole(SERVICE_ROLE, msg.sender), "Caller is not an service"); require(_amount > 0, "Amount must be above zero!"); vcUSDToken(vcUSDAddress).burn(service_backend, _amount); ERC20(USDTAddress).safeTransfer(_recepient, _amount); emit vcUSDBuy(_recepient, _amount, block.timestamp); } function sellVcUsdBackend(uint256 _amount) external { require(hasRole(SERVICE_ROLE, msg.sender), "Caller is not an service"); require(_amount > 0, "Amount must be above zero!"); vcUSDToken(vcUSDAddress).mint(service_backend, _amount); emit vcUSDSell(service_backend, _amount, block.timestamp); } function buyVcUSD(uint256 _amount) external salesUnlocked nonReentrant { require(_amount > 0, "Amount must be above zero!"); vcUSDToken(vcUSDAddress).burn(msg.sender, _amount); ERC20(USDTAddress).safeTransfer(msg.sender, _amount); emit vcUSDBuy(msg.sender, _amount, block.timestamp); } function sellVcUsd(uint256 _amount) external salesUnlocked nonReentrant { require(_amount > 0, "Amount must be above zero!"); ERC20(USDTAddress).safeTransferFrom(msg.sender, address(this), _amount); vcUSDToken(vcUSDAddress).mint(msg.sender, _amount); emit vcUSDSell(msg.sender, _amount, block.timestamp); } function updateServiceAddress(address _service_backend) external { require(hasRole(ADMIN_ROLE, msg.sender), "Caller is not an admin"); service_backend = _service_backend; } function updateSalesState(bool _state) external { require(hasRole(ADMIN_ROLE, msg.sender), "Caller is not an admin"); saleUnlocked = _state; } function updateVcUSDAddress(address _vcUSDAddress) external { require(hasRole(ADMIN_ROLE, msg.sender), "Caller is not an admin"); vcUSDAddress = _vcUSDAddress; } function claim( bytes32 hashedMessage, uint256 _amount, uint256 _sequence, uint8 _v, bytes32 _r, bytes32 _s, address _from ) external nonReentrant refferalClaimUnlocked { address service = recover(hashedMessage, _v, _r, _s); require(hasRole(SERVICE_ROLE, service), "Signed not by a service"); //TO-DO _form to msg.sender bytes32 message = keccak256( abi.encodePacked(msg.sender, _amount, _sequence) ); message = keccak256( abi.encodePacked("\x19Ethereum Signed Message:\n32", message) ); // return (message, service); require(hashedMessage == message, "Incorrect hashed message"); require( !hashes[message], "Sequence amount already claimed or dublicated." ); hashes[message] = true; WalletTokensalePrivate(_from).removeToken( msg.sender, _amount, USDTAddress ); emit RefferalsClaimed(msg.sender, _amount, block.timestamp); } function removeToken( address _recepient, uint256 _amount, address tokenAddress ) external { require(hasRole(ADMIN_ROLE, msg.sender), "Caller is not an admin"); ERC20(tokenAddress).safeTransfer(_recepient, _amount); } function updateClaimState(bool _state) external { require(hasRole(ADMIN_ROLE, msg.sender), "Caller is not an admin"); claimUnlocked = _state; } function recover( bytes32 hashedMsg, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { require( uint256(s) <= 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0, "ECDSA: invalid signature 's' value" ); require(v == 27 || v == 28, "ECDSA: invalid signature 'v' value"); address signer = ecrecover(hashedMsg, v, r, s); require(signer != address(0), "ECDSA: invalid signature"); return signer; } }
// 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(uint160(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(uint160(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(uint160(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(uint160(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)); } }
// 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); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(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 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; /** * @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.12; import "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol"; import "openzeppelin-solidity/contracts/access/AccessControl.sol"; contract vcUSDToken is ERC20, AccessControl { bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); bytes32 public constant BURNER_ROLE = keccak256("BURNER_ROLE"); bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); constructor( string memory _name, string memory _symbol, uint8 _decimals ) public ERC20(_name, _symbol) { // Grant the contract deployer the default admin role: it will be able // to grant and revoke any roles _setupRole(DEFAULT_ADMIN_ROLE, msg.sender); _setupRole(ADMIN_ROLE, msg.sender); // Sets `DEFAULT_ADMIN_ROLE` as ``ADMIN_ROLE``'s admin role. _setRoleAdmin(ADMIN_ROLE, DEFAULT_ADMIN_ROLE); _setupDecimals(_decimals); } function mint(address to, uint256 amount) external { require(hasRole(MINTER_ROLE, msg.sender), "Caller is not an minter"); _mint(to, amount); } function burn(address from, uint256 amount) external { require(hasRole(BURNER_ROLE, msg.sender), "Caller is not an burner"); _burn(from, amount); } function _beforeTokenTransfer( address _from, address _to, uint256 _amount ) internal virtual override(ERC20) { ERC20._beforeTokenTransfer(_from, _to, _amount); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.12; import "openzeppelin-solidity/contracts/access/AccessControl.sol"; import "openzeppelin-solidity/contracts/math/SafeMath.sol"; import "openzeppelin-solidity/contracts/utils/ReentrancyGuard.sol"; import "openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol"; import "openzeppelin-solidity/contracts/token/ERC20/ERC20.sol"; import {vcUSDPool} from "contracts/Pool/vcUSDPool.sol"; contract WalletTokensalePrivate is AccessControl, ReentrancyGuard { using SafeMath for uint256; using SafeERC20 for ERC20; uint256 public totalAmount; uint256 public totalSold; uint256 public minAmountToBuy; uint256 public maxAmountToBuy; bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); bytes32 public constant SERVICE_ROLE = keccak256("SERVICE_ROLE"); // address of main token address public govTokenAddress; address public USDTAddress; uint256 public factor = 10**12; uint256 public USDTReceived; uint256 public USDTClaimed; // for example: 100000 = 0.01 USD uint256 public rate; uint256 public ratesPrecision = 10**7; address public vcUSDPoolAddress; uint256 currentLockNumber = 0; // true = swap unlocked, false = swap locked bool public swapUnlocked = true; //true = claim unlocked, false = locked bool public claimUnlocked = false; // struct of lock tokens struct Lock { uint256 unlockDate; uint256 percent; } // array of locks tokens Lock[] public locks; struct UserInfo { uint256 amount; uint256 claimed; } mapping(address => UserInfo) public users; event TokenExchangedFromUsdt( address indexed spender, uint256 usdtAmount, uint256 daovcAmount, string userId, uint256 time ); event TokensClaimed( address indexed claimer, uint256 amountClaimed, uint256 time ); event TokenExchangedFromFiat( address indexed spender, uint256 amount, uint256 daovcAmount, uint256 time ); event RoundStateChanged(bool state, uint256 time); modifier roundUnlocked() { require(swapUnlocked, "Round is locked!"); _; } modifier claimUnlockedModifier() { require(claimUnlocked, "Round is locked!"); _; } /** * @dev Constructor of Wallet. * */ constructor( address _govTokenAddress, address _USDTAddress, uint256 _rate, uint256 _totalAmount, uint256 _minAmountToBuy, uint256 _maxAmountToBuy, address _vcUSDPoolAddress, uint256 _usdtReceived, uint256 _usdtClaimed ) public { _setupRole(DEFAULT_ADMIN_ROLE, msg.sender); _setupRole(ADMIN_ROLE, msg.sender); _setRoleAdmin(ADMIN_ROLE, DEFAULT_ADMIN_ROLE); govTokenAddress = _govTokenAddress; USDTAddress = _USDTAddress; rate = _rate; totalAmount = _totalAmount; minAmountToBuy = _minAmountToBuy; maxAmountToBuy = _maxAmountToBuy; vcUSDPoolAddress = _vcUSDPoolAddress; USDTClaimed = _usdtClaimed; USDTReceived = _usdtReceived; } function setRoundState(bool _state) external { require(hasRole(ADMIN_ROLE, msg.sender), "Caller is not an admin"); swapUnlocked = _state; emit RoundStateChanged(_state, block.timestamp); } /** * @dev add the token to Lock pull * * Parameters: * * - `_unlockDate` - date of token unlock * - `_amount` - token amount */ function addLock(uint256[] memory _unlockDate, uint256[] memory _percent) external { require(hasRole(ADMIN_ROLE, msg.sender), "Caller is not an admin"); require( _unlockDate.length == 10, "unlockDate array must have 10 values!" ); require(_percent.length == 10, "percent array must have 10 values!"); for (uint256 i = 0; i < _unlockDate.length; i++) { locks.push( Lock({percent: _percent[i], unlockDate: _unlockDate[i]}) ); } } /** @notice swap usdt to daoVC gov token * * Parameters: * * @param _amountInUsdt - amount in usdt */ function swap(uint256 _amountInUsdt, string memory _userId) external roundUnlocked { UserInfo storage user = users[msg.sender]; uint256 amountInGov = _amountInUsdt.mul(factor).mul(ratesPrecision).div( rate ); require( _amountInUsdt >= minAmountToBuy && user.amount.add(amountInGov) <= maxAmountToBuy, "Amount must must be within the permitted range!" ); require( totalSold.add(amountInGov) <= totalAmount, "All tokens was sold!" ); ERC20(USDTAddress).safeTransferFrom( msg.sender, address(this), _amountInUsdt ); USDTReceived = USDTReceived.add(_amountInUsdt); user.amount = user.amount.add(amountInGov); totalSold = totalSold.add(amountInGov); emit TokenExchangedFromUsdt( msg.sender, _amountInUsdt, amountInGov, _userId, block.timestamp ); } /** @notice swap fiat to daoVC gov token * * Parameters: * * @param _user - user's address * @param _amountInUsdt - amount in usd */ function swapBackend(address _user, uint256 _amountInUsdt) external roundUnlocked { require( hasRole(SERVICE_ROLE, msg.sender), "Caller does not have the service role." ); UserInfo storage user = users[_user]; uint256 amountInGov = _amountInUsdt.mul(factor).mul(ratesPrecision).div( rate ); require( _amountInUsdt >= minAmountToBuy && user.amount.add(amountInGov) <= maxAmountToBuy, "Amount must must be within the permitted range!" ); require( totalSold.add(amountInGov) <= totalAmount, "All tokens was sold!" ); USDTReceived = USDTReceived.add(_amountInUsdt); user.amount = user.amount.add(amountInGov); totalSold = totalSold.add(amountInGov); emit TokenExchangedFromFiat( _user, _amountInUsdt, amountInGov, block.timestamp ); } /** @notice user claim's his availeble tokens * */ function claim() external nonReentrant claimUnlockedModifier { UserInfo storage user = users[msg.sender]; require(user.amount > 0, "Nothing to claim"); uint256 newLock = currentLockNumber; if (newLock <= locks.length - 2) { while (block.timestamp >= locks[newLock + 1].unlockDate) { newLock = newLock + 1; if (newLock == 9) { break; } } currentLockNumber = newLock; } uint256 availableAmount = calcAvailableAmount(msg.sender); require(availableAmount > 0, "There are not available tokens to claim"); user.claimed = user.claimed.add(availableAmount); ERC20(govTokenAddress).safeTransfer(msg.sender, availableAmount); emit TokensClaimed(msg.sender, availableAmount, block.timestamp); } function sendUsdtToPool(uint256 _amount) external { require( hasRole(SERVICE_ROLE, msg.sender), "Caller does not have the service role." ); ERC20(USDTAddress).safeTransfer(vcUSDPoolAddress, _amount); USDTClaimed = USDTClaimed.add(_amount); vcUSDPool(vcUSDPoolAddress).sellVcUsdBackend(_amount); } /** @notice caluclate availeble amount of tokens for user * * Parameters: * * @param _user - address of user */ function calcAvailableAmount(address _user) private view returns (uint256 availableToken) { UserInfo storage user = users[_user]; availableToken = ( user.amount.mul(locks[currentLockNumber].percent).div(100) ); if (availableToken >= user.claimed) { availableToken = availableToken.sub(user.claimed); } else { availableToken = 0; } return availableToken; } function getUserInfo(address _user) external view returns ( uint256 amount_, uint256 available_, uint256 claimed_, uint256 currentLockTime_ ) { UserInfo storage user = users[_user]; uint256 newLock = currentLockNumber; if (newLock <= locks.length - 2) { while (block.timestamp >= locks[newLock + 1].unlockDate) { newLock = newLock + 1; if (newLock == 9) { break; } } } amount_ = user.amount; claimed_ = user.claimed; available_ = (user.amount.mul(locks[newLock].percent).div(100)); if (available_ >= user.claimed) { available_ = available_.sub(user.claimed); } else { available_ = 0; } if (newLock == locks.length - 1) { currentLockTime_ = locks[newLock].unlockDate; } else { currentLockTime_ = locks[newLock + 1].unlockDate; } return (amount_, available_, claimed_, currentLockTime_); } function getRoundState() external view returns (bool) { return swapUnlocked; } function removeToken( address _recepient, uint256 _amount, address tokenAddress ) external { require(hasRole(ADMIN_ROLE, msg.sender), "Caller is not an admin"); require( _amount <= ERC20(tokenAddress).balanceOf(address(this)), "Amount must be <= balanceOf(this contract)." ); ERC20(tokenAddress).safeTransfer(_recepient, _amount); } function updateLock( uint256 _index, uint256 _percent, uint256 _unlockDate ) external { require(hasRole(ADMIN_ROLE, msg.sender), "Caller is not an admin"); locks[_index].percent = _percent; locks[_index].unlockDate = _unlockDate; } function updateUserInfo( address _user, uint256 _amount, uint256 _claimed ) external { require(hasRole(ADMIN_ROLE, msg.sender), "Caller is not an admin"); UserInfo storage user = users[_user]; user.amount = _amount; user.claimed = _claimed; } function updateTokenAddress(address _govTokenAddress) external { require(hasRole(ADMIN_ROLE, msg.sender), "Caller is not an admin"); govTokenAddress = _govTokenAddress; } /** @dev claim usdt from this contract * * Parameters: * * - `usdtReceiver` - address, who gets USDT tokens */ function claimUSDT(address _usdtReceiver) external { require(hasRole(ADMIN_ROLE, msg.sender), "Caller is not an admin"); require(USDTReceived > 0, "Not enough USDT to claim"); ERC20(USDTAddress).safeTransfer( _usdtReceiver, USDTReceived.sub(USDTClaimed) ); USDTClaimed = USDTClaimed.add(USDTReceived.sub(USDTClaimed)); } function getInfoAboutUsdt() external view returns (uint256 USDTReceived_, uint256 USDTClaimed_) { USDTReceived_ = USDTReceived; USDTClaimed_ = USDTClaimed; return (USDTReceived_, USDTClaimed_); } /** @dev returns current rate for contract * */ function getRate() external view returns (uint256) { return rate; } /** @dev update rates * * Parameters: * * - `_rate` - rate, for example: 400000 = 0.04$ */ function updateRate(uint256 _rate) public { require(hasRole(ADMIN_ROLE, msg.sender), "Caller is not an admin"); rate = _rate; } function updateVcUsdPoolAddress(address _vcUSDPoolAddress) external { require(hasRole(ADMIN_ROLE, msg.sender), "Caller is not an admin"); vcUSDPoolAddress = _vcUSDPoolAddress; } // amount in usdt function updateMinimum(uint256 _minAmountToBuy) external { require(hasRole(ADMIN_ROLE, msg.sender), "Caller is not an admin"); minAmountToBuy = _minAmountToBuy; } //amount in gov token function updateMaximum(uint256 _maxAmountToBuy) external { require(hasRole(ADMIN_ROLE, msg.sender), "Caller is not an admin"); maxAmountToBuy = _maxAmountToBuy; } function updateCurrentLockNumber(uint256 _newCurrentLock) external { require(hasRole(ADMIN_ROLE, msg.sender), "Caller is not an admin"); currentLockNumber = _newCurrentLock; } function migrateUsers( address[] memory _users, uint256[] memory _amounts, uint256[] memory _claimed ) external { require(hasRole(ADMIN_ROLE, msg.sender), "Caller is not an admin"); require( _users.length == _amounts.length, "Array users and amounts must be the same length!" ); require( _users.length == _claimed.length, "Array users and claimed must be the same length!" ); for (uint256 i = 0; i < _users.length; i++) { UserInfo storage user = users[_users[i]]; user.amount = _amounts[i]; user.claimed = _claimed[i]; } } function setClaimState(bool _state) external { require(hasRole(ADMIN_ROLE, msg.sender), "Caller is not an admin"); claimUnlocked = _state; } function updateTotalAmount(uint256 _totalAmount) external { require(hasRole(ADMIN_ROLE, msg.sender), "Caller is not an admin"); totalAmount = _totalAmount; } function updateTotalSold(uint256 _totalSold) external { require(hasRole(ADMIN_ROLE, msg.sender), "Caller is not an admin"); totalSold = _totalSold; } function updateFactor(uint256 _factor) external { require(hasRole(ADMIN_ROLE, msg.sender), "Caller is not an admin"); factor = _factor; } function updateUSDTReceived(uint256 _usdtReceived) external { require(hasRole(ADMIN_ROLE, msg.sender), "Caller is not an admin"); USDTReceived = _usdtReceived; } function updateUSDTClaimed(uint256 _usdtClaimed) external { require(hasRole(ADMIN_ROLE, msg.sender), "Caller is not an admin"); USDTClaimed = _usdtClaimed; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_govTokenAddress","type":"address"},{"internalType":"address","name":"_USDTAddress","type":"address"},{"internalType":"uint256","name":"_rate","type":"uint256"},{"internalType":"uint256","name":"_totalAmount","type":"uint256"},{"internalType":"uint256","name":"_maxAmountToBuy","type":"uint256"},{"internalType":"address","name":"_vcUSDPoolAddress","type":"address"},{"internalType":"uint256","name":"_usdtReceived","type":"uint256"},{"internalType":"uint256","name":"_usdtClaimed","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"state","type":"bool"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"RoundStateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"usdAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"daovcAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"},{"indexed":false,"internalType":"string","name":"userId","type":"string"}],"name":"TokenExchanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"daovcAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"TokenExchangedFiat","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"claimer","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountClaimed","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"TokensClaimed","type":"event"},{"inputs":[],"name":"ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"AMOUNT_USD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SERVICE_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USDTAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USDTClaimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USDTReceived","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_unlockDate","type":"uint256[]"},{"internalType":"uint256[]","name":"_percent","type":"uint256[]"}],"name":"addLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_usdtReceiver","type":"address"}],"name":"claimUSDT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimUnlocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"factor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getInfoAboutUsdt","outputs":[{"internalType":"uint256","name":"USDTReceived_","type":"uint256"},{"internalType":"uint256","name":"USDTClaimed_","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getRoundState","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getUserInfo","outputs":[{"internalType":"uint256","name":"amount_","type":"uint256"},{"internalType":"uint256","name":"available_","type":"uint256"},{"internalType":"uint256","name":"claimed_","type":"uint256"},{"internalType":"uint256","name":"currentLockTime_","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"govTokenAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"locks","outputs":[{"internalType":"uint256","name":"unlockDate","type":"uint256"},{"internalType":"uint256","name":"percent","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxAmountToBuy","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_users","type":"address[]"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"},{"internalType":"uint256[]","name":"_claimed","type":"uint256[]"}],"name":"migrateUsers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ratesPrecision","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_recepient","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"removeToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"sendUsdtToPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"setClaimState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"setRoundState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"hashedMessage","type":"bytes32"},{"internalType":"string","name":"_userId","type":"string"},{"internalType":"uint256","name":"_sequence","type":"uint256"},{"internalType":"uint8","name":"_v","type":"uint8"},{"internalType":"bytes32","name":"_r","type":"bytes32"},{"internalType":"bytes32","name":"_s","type":"bytes32"}],"name":"swap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"swapBackend","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"swapUnlocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"swapsCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newCurrentLock","type":"uint256"}],"name":"updateCurrentLockNumber","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_factor","type":"uint256"}],"name":"updateFactor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"},{"internalType":"uint256","name":"_percent","type":"uint256"},{"internalType":"uint256","name":"_unlockDate","type":"uint256"}],"name":"updateLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxAmountToBuy","type":"uint256"}],"name":"updateMaximum","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rate","type":"uint256"}],"name":"updateRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_govTokenAddress","type":"address"}],"name":"updateTokenAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_totalAmount","type":"uint256"}],"name":"updateTotalAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_totalSold","type":"uint256"}],"name":"updateTotalSold","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_usdtClaimed","type":"uint256"}],"name":"updateUSDTClaimed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_usdtReceived","type":"uint256"}],"name":"updateUSDTReceived","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_claimed","type":"uint256"}],"name":"updateUserInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vcUSDPoolAddress","type":"address"}],"name":"updateVcUsdPoolAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"users","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"claimed","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vcUSDPoolAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405264e8d4a5100060075562989680600b556000600d55600e805461ff001960ff199091166001171690553480156200003a57600080fd5b506040516200321c3803806200321c83398181016040526101008110156200006157600080fd5b508051602082015160408301516060840151608085015160a086015160c087015160e09097015160018055959694959394929391929091620000a56000336200012e565b620000d17fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775336200012e565b600580546001600160a01b03199081166001600160a01b039a8b1617909155600680548216988a1698909817909755600a95909555600293909355600491909155600c805490941694169390931790915560095560085562000242565b6200013a82826200013e565b5050565b60008281526020818152604090912062000163918390620022c1620001b7821b17901c565b156200013a5762000173620001d7565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000620001ce836001600160a01b038416620001db565b90505b92915050565b3390565b6000620001e983836200022a565b6200022157508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620001d1565b506000620001d1565b60009081526001919091016020526040902054151590565b612fca80620002526000396000f3fe608060405234801561001057600080fd5b50600436106103275760003560e01c806376aa28fc116101b8578063b122028411610104578063da58f199116100a2578063f87682f41161007c578063f87682f414610a78578063f9d9449d14610b9b578063fb29dafb14610ba3578063ff920c7414610bc057610327565b8063da58f1991461097d578063e1356e7714610a3c578063f4dadc6114610a5b57610327565b8063c3b24312116100de578063c3b2431214610906578063ca15c8731461092c578063d547741f14610949578063d6bed7f91461097557610327565b8063b1220284146108d9578063b72b54a4146108e1578063bed75809146108fe57610327565b806391d1485411610171578063a20e7d471161014b578063a20e7d471461086d578063a217fddf14610875578063a87430ba1461087d578063aaf29bad146108bc57610327565b806391d148541461080357806397bb15c91461082f5780639ce2bdab1461086557610327565b806376aa28fc146105e5578063778aad2e1461060257806378a96f7e1461062b5780637f2f2c8e146106335780639010d07c146107d85780639106d7ba146107fb57610327565b80633c30a513116102775780636386c1c71161023057806369ea17711161020a57806369ea17711461059b578063717503b9146105b8578063746347c3146105d557806375b238fc146105dd57610327565b80636386c1c7146105215780636691461a1461056d578063679aefce1461059357610327565b80633c30a513146104a95780634a3b00a6146104c65780634b014e28146104ea5780634e71d92d1461050957806350e497641461051157806354f703f81461051957610327565b8063245f73b8116102e45780632c4e722e116102be5780632c4e722e1461042c5780632f2ff15d1461043457806336568abe1461046057806339eb2b6e1461048c57610327565b8063245f73b8146103cd578063248a9ca3146103f3578063293c29581461041057610327565b806302835c7a1461032c578063040145091461036057806310c564f51461038657806310f571ac146103a0578063170f0671146103bd5780631a39d8ef146103c5575b600080fd5b61035e6004803603606081101561034257600080fd5b506001600160a01b038135169060208101359060400135610bc8565b005b61035e6004803603602081101561037657600080fd5b50356001600160a01b0316610c41565b61038e610e74565b60408051918252519081900360200190f35b61035e600480360360208110156103b657600080fd5b5035610e7a565b61038e610ed6565b61038e610edc565b61035e600480360360208110156103e357600080fd5b50356001600160a01b0316610ee2565b61038e6004803603602081101561040957600080fd5b5035610fe7565b610418610ffc565b604080519115158252519081900360200190f35b61038e611005565b61035e6004803603604081101561044a57600080fd5b50803590602001356001600160a01b031661100b565b61035e6004803603604081101561047657600080fd5b50803590602001356001600160a01b0316611077565b61035e600480360360208110156104a257600080fd5b50356110d8565b61035e600480360360208110156104bf57600080fd5b5035611134565b6104ce611190565b604080516001600160a01b039092168252519081900360200190f35b61035e6004803603602081101561050057600080fd5b5035151561119f565b61035e611210565b610418611427565b61038e611435565b6105476004803603602081101561053757600080fd5b50356001600160a01b031661143b565b604080519485526020850193909352838301919091526060830152519081900360800190f35b61035e6004803603602081101561058357600080fd5b50356001600160a01b031661157a565b61038e6115f3565b61035e600480360360208110156105b157600080fd5b50356115f9565b61035e600480360360208110156105ce57600080fd5b5035611655565b61041861173d565b61038e611746565b61035e600480360360208110156105fb57600080fd5b5035611758565b61035e6004803603606081101561061857600080fd5b50803590602081013590604001356117b4565b61038e611852565b61035e6004803603606081101561064957600080fd5b810190602081018135600160201b81111561066357600080fd5b82018360208201111561067557600080fd5b803590602001918460208302840111600160201b8311171561069657600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156106e557600080fd5b8201836020820111156106f757600080fd5b803590602001918460208302840111600160201b8311171561071857600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561076757600080fd5b82018360208201111561077957600080fd5b803590602001918460208302840111600160201b8311171561079a57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611858945050505050565b6104ce600480360360408110156107ee57600080fd5b50803590602001356119bc565b61038e6119dd565b6104186004803603604081101561081957600080fd5b50803590602001356001600160a01b03166119e3565b61035e6004803603606081101561084557600080fd5b506001600160a01b038135811691602081013591604090910135166119fb565b6104ce611a6b565b61038e611a7a565b61038e611a8c565b6108a36004803603602081101561089357600080fd5b50356001600160a01b0316611a91565b6040805192835260208301919091528051918290030190f35b61035e600480360360208110156108d257600080fd5b5035611aaa565b6108a3611b06565b61035e600480360360208110156108f757600080fd5b5035611b10565b61038e611b6c565b61035e6004803603602081101561091c57600080fd5b50356001600160a01b0316611b72565b61038e6004803603602081101561094257600080fd5b5035611beb565b61035e6004803603604081101561095f57600080fd5b50803590602001356001600160a01b0316611c02565b61038e611c5b565b61035e600480360360c081101561099357600080fd5b81359190810190604081016020820135600160201b8111156109b457600080fd5b8201836020820111156109c657600080fd5b803590602001918460018302840111600160201b831117156109e757600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955050823593505060ff602083013516916040810135915060600135611c61565b61035e60048036036020811015610a5257600080fd5b50351515612071565b6108a360048036036020811015610a7157600080fd5b5035612115565b61035e60048036036040811015610a8e57600080fd5b810190602081018135600160201b811115610aa857600080fd5b820183602082011115610aba57600080fd5b803590602001918460208302840111600160201b83111715610adb57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610b2a57600080fd5b820183602082011115610b3c57600080fd5b803590602001918460208302840111600160201b83111715610b5d57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550612140945050505050565b61038e61224e565b61035e60048036036020811015610bb957600080fd5b5035612256565b6104ce6122b2565b610be0600080516020612ea3833981519152336119e3565b610c1f576040805162461bcd60e51b81526020600482015260166024820152600080516020612de2833981519152604482015290519081900360640190fd5b6001600160a01b03909216600090815260106020526040902090815560010155565b600e5460ff16610c8b576040805162461bcd60e51b815260206004820152601060248201526f526f756e64206973206c6f636b65642160801b604482015290519081900360640190fd5b610ca3600080516020612d6c833981519152336119e3565b610cde5760405162461bcd60e51b8152600401808060200182810382526025815260200180612ec36025913960400191505060405180910390fd5b6001600160a01b0381166000908152601060205260408120600a54600b54600754929392610d269291610d2091610d1a90631dcd6500906122d6565b906122d6565b9061232f565b600454835491925090610d399083612396565b1115610d8c576040805162461bcd60e51b815260206004820152601b60248201527f596f752063616e6e6f742073776170206d6f726520746f6b656e730000000000604482015290519081900360640190fd5b600254600354610d9c9083612396565b1115610de5576040805162461bcd60e51b8152602060048201526013602482015272105b1b081d1bdad95b9cc81dd85cc81cdbdb19606a1b604482015290519081900360640190fd5b601280546001019055600854610dff90631dcd6500612396565b6008558154610e0e9082612396565b8255600354610e1d9082612396565b60035560408051631dcd6500815260208101839052428183015290516001600160a01b038516917f38df76114aa6b6c19ab2ad589e277f4966eb1d89e2caf59c2f701fa3821998cc919081900360600190a2505050565b60085481565b610e92600080516020612ea3833981519152336119e3565b610ed1576040805162461bcd60e51b81526020600482015260166024820152600080516020612de2833981519152604482015290519081900360640190fd5b600d55565b60045481565b60025481565b610efa600080516020612ea3833981519152336119e3565b610f39576040805162461bcd60e51b81526020600482015260166024820152600080516020612de2833981519152604482015290519081900360640190fd5b600060085411610f90576040805162461bcd60e51b815260206004820152601860248201527f4e6f7420656e6f756768205553445420746f20636c61696d0000000000000000604482015290519081900360640190fd5b610fbe81610fab6009546008546123f090919063ffffffff16565b6006546001600160a01b0316919061244d565b610fe1610fd86009546008546123f090919063ffffffff16565b60095490612396565b60095550565b60009081526020819052604090206002015490565b600e5460ff1690565b600a5481565b60008281526020819052604090206002015461102e9061102961249f565b6119e3565b6110695760405162461bcd60e51b815260040180806020018281038252602f815260200180612d1b602f913960400191505060405180910390fd5b61107382826124a3565b5050565b61107f61249f565b6001600160a01b0316816001600160a01b0316146110ce5760405162461bcd60e51b815260040180806020018281038252602f815260200180612f66602f913960400191505060405180910390fd5b611073828261250c565b6110f0600080516020612ea3833981519152336119e3565b61112f576040805162461bcd60e51b81526020600482015260166024820152600080516020612de2833981519152604482015290519081900360640190fd5b600855565b61114c600080516020612ea3833981519152336119e3565b61118b576040805162461bcd60e51b81526020600482015260166024820152600080516020612de2833981519152604482015290519081900360640190fd5b600955565b6005546001600160a01b031681565b6111b7600080516020612ea3833981519152336119e3565b6111f6576040805162461bcd60e51b81526020600482015260166024820152600080516020612de2833981519152604482015290519081900360640190fd5b600e80549115156101000261ff0019909216919091179055565b60026001541415611268576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600155600e54610100900460ff166112bc576040805162461bcd60e51b815260206004820152601060248201526f526f756e64206973206c6f636b65642160801b604482015290519081900360640190fd5b3360009081526010602052604090208054611311576040805162461bcd60e51b815260206004820152601060248201526f4e6f7468696e6720746f20636c61696d60801b604482015290519081900360640190fd5b600d54600f5460011901811161136e575b600f816001018154811061133257fe5b906000526020600020906002020160000154421061136857600f546001909101906000190181141561136357611368565b611322565b600d8190555b600061137933612575565b9050600081116113ba5760405162461bcd60e51b8152600401808060200182810382526027815260200180612ee86027913960400191505060405180910390fd5b60018301546113c99082612396565b60018401556005546113e5906001600160a01b0316338361244d565b60408051828152426020820152815133927f9923b4306c6c030f2bdfbf156517d5983b87e15b96176da122cd4f2effa4ba7b928290030190a250506001805550565b600e54610100900460ff1681565b60075481565b6001600160a01b0381166000908152601060205260408120600d54600f548392839283926001190181116114b0575b600f816001018154811061147a57fe5b90600052602060002090600202016000015442106114b057600f54600190910190600019018114156114ab576114b0565b61146a565b81600001549550816001015493506114ef6064610d20600f84815481106114d357fe5b60009182526020909120600160029092020101548554906122d6565b94508160010154851061151357600182015461150c9086906123f0565b9450611518565b600094505b600f546000190181141561154c57600f818154811061153357fe5b9060005260206000209060020201600001549250611571565b600f816001018154811061155c57fe5b90600052602060002090600202016000015492505b50509193509193565b611592600080516020612ea3833981519152336119e3565b6115d1576040805162461bcd60e51b81526020600482015260166024820152600080516020612de2833981519152604482015290519081900360640190fd5b600580546001600160a01b0319166001600160a01b0392909216919091179055565b600a5490565b611611600080516020612ea3833981519152336119e3565b611650576040805162461bcd60e51b81526020600482015260166024820152600080516020612de2833981519152604482015290519081900360640190fd5b600a55565b61166d600080516020612d6c833981519152336119e3565b6116a85760405162461bcd60e51b8152600401808060200182810382526025815260200180612ec36025913960400191505060405180910390fd5b600c546006546116c5916001600160a01b0391821691168361244d565b6009546116d29082612396565b600955600c5460408051639c86d67d60e01b81526004810184905290516001600160a01b0390921691639c86d67d9160248082019260009290919082900301818387803b15801561172257600080fd5b505af1158015611736573d6000803e3d6000fd5b5050505050565b600e5460ff1681565b600080516020612ea383398151915281565b611770600080516020612ea3833981519152336119e3565b6117af576040805162461bcd60e51b81526020600482015260166024820152600080516020612de2833981519152604482015290519081900360640190fd5b600355565b6117cc600080516020612ea3833981519152336119e3565b61180b576040805162461bcd60e51b81526020600482015260166024820152600080516020612de2833981519152604482015290519081900360640190fd5b81600f848154811061181957fe5b90600052602060002090600202016001018190555080600f848154811061183c57fe5b6000918252602090912060029091020155505050565b60125481565b611870600080516020612ea3833981519152336119e3565b6118af576040805162461bcd60e51b81526020600482015260166024820152600080516020612de2833981519152604482015290519081900360640190fd5b81518351146118ef5760405162461bcd60e51b815260040180806020018281038252602f815260200180612e74602f913960400191505060405180910390fd5b805183511461192f5760405162461bcd60e51b815260040180806020018281038252602f815260200180612e45602f913960400191505060405180910390fd5b60005b83518110156119b65760006010600086848151811061194d57fe5b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020905083828151811061198357fe5b6020026020010151816000018190555082828151811061199f57fe5b602090810291909101015160019182015501611932565b50505050565b60008281526020819052604081206119d490836125f5565b90505b92915050565b60035481565b60008281526020819052604081206119d49083612601565b611a13600080516020612ea3833981519152336119e3565b611a52576040805162461bcd60e51b81526020600482015260166024820152600080516020612de2833981519152604482015290519081900360640190fd5b611a666001600160a01b038216848461244d565b505050565b600c546001600160a01b031681565b600080516020612d6c83398151915281565b600081565b6010602052600090815260409020805460019091015482565b611ac2600080516020612ea3833981519152336119e3565b611b01576040805162461bcd60e51b81526020600482015260166024820152600080516020612de2833981519152604482015290519081900360640190fd5b600255565b6008546009549091565b611b28600080516020612ea3833981519152336119e3565b611b67576040805162461bcd60e51b81526020600482015260166024820152600080516020612de2833981519152604482015290519081900360640190fd5b600755565b600b5481565b611b8a600080516020612ea3833981519152336119e3565b611bc9576040805162461bcd60e51b81526020600482015260166024820152600080516020612de2833981519152604482015290519081900360640190fd5b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b60008181526020819052604081206119d790612616565b600082815260208190526040902060020154611c209061102961249f565b6110ce5760405162461bcd60e51b8152600401808060200182810382526030815260200180612db26030913960400191505060405180910390fd5b60095481565b600e5460ff16611cab576040805162461bcd60e51b815260206004820152601060248201526f526f756e64206973206c6f636b65642160801b604482015290519081900360640190fd5b6000611cb987858585612621565b9050611cd3600080516020612d6c833981519152826119e3565b611d24576040805162461bcd60e51b815260206004820152601760248201527f5369676e6564206e6f7420627920612073657276696365000000000000000000604482015290519081900360640190fd5b6000611d9c87876040516020018083805190602001908083835b60208310611d5d5780518252601f199092019160209182019101611d3e565b51815160209384036101000a600019018019909216911617905292019384525060408051808503815293820190528251920191909120915061279f9050565b9050808814611df2576040805162461bcd60e51b815260206004820152601860248201527f496e636f727265637420686173686564206d6573736167650000000000000000604482015290519081900360640190fd5b60008181526011602052604090205460ff1615611e405760405162461bcd60e51b815260040180806020018281038252602d815260200180612f39602d913960400191505060405180910390fd5b6000818152601160209081526040808320805460ff1916600190811790915560128054909101905533835260109091528120600a54600b54600754929392611e969291610d2091610d1a90631dcd6500906122d6565b600454835491925090611ea99083612396565b1115611efc576040805162461bcd60e51b815260206004820152601b60248201527f596f752063616e6e6f742073776170206d6f726520746f6b656e730000000000604482015290519081900360640190fd5b600254600354611f0c9083612396565b1115611f55576040805162461bcd60e51b8152602060048201526013602482015272105b1b081d1bdad95b9cc81dd85cc81cdbdb19606a1b604482015290519081900360640190fd5b600654611f71906001600160a01b03163330631dcd65006127f0565b600854611f8290631dcd6500612396565b6008558154611f919082612396565b8255600354611fa09082612396565b600381905550336001600160a01b03167fcdbc8151f2897cbbf0d24beb36eea80814ea1f9a8d3225b7f1e5ea0d6c51dd39631dcd650083428d6040518085815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612028578181015183820152602001612010565b50505050905090810190601f1680156120555780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a250505050505050505050565b612089600080516020612ea3833981519152336119e3565b6120c8576040805162461bcd60e51b81526020600482015260166024820152600080516020612de2833981519152604482015290519081900360640190fd5b600e805460ff19168215159081179091556040805191825242602083015280517fbcdda6bf9b7d876bc98e9a8a84ada64a8fb356d01e046769f012b7e8a392e1d09281900390910190a150565b600f818154811061212257fe5b60009182526020909120600290910201805460019091015490915082565b612158600080516020612ea3833981519152336119e3565b612197576040805162461bcd60e51b81526020600482015260166024820152600080516020612de2833981519152604482015290519081900360640190fd5b80518251146121d75760405162461bcd60e51b8152600401808060200182810382526039815260200180612ce26039913960400191505060405180910390fd5b60005b8251811015611a6657600f60405180604001604052808584815181106121fc57fe5b6020026020010151815260200184848151811061221557fe5b602090810291909101810151909152825460018181018555600094855293829020835160029092020190815591015190820155016121da565b631dcd650081565b61226e600080516020612ea3833981519152336119e3565b6122ad576040805162461bcd60e51b81526020600482015260166024820152600080516020612de2833981519152604482015290519081900360640190fd5b600455565b6006546001600160a01b031681565b60006119d4836001600160a01b03841661284a565b6000826122e5575060006119d7565b828202828482816122f257fe5b04146119d45760405162461bcd60e51b8152600401808060200182810382526021815260200180612e246021913960400191505060405180910390fd5b6000808211612385576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161238e57fe5b049392505050565b6000828201838110156119d4576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115612447576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611a66908490612894565b3390565b60008281526020819052604090206124bb90826122c1565b15611073576124c861249f565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526020819052604090206125249082612945565b156110735761253161249f565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b6001600160a01b0381166000908152601060205260408120600d54600f80546125c692606492610d209290919081106125aa57fe5b60009182526020909120600160029092020101548454906122d6565b9150806001015482106125ea5760018101546125e39083906123f0565b91506125ef565b600091505b50919050565b60006119d4838361295a565b60006119d4836001600160a01b0384166129be565b60006119d7826129d6565b60007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08211156126825760405162461bcd60e51b8152600401808060200182810382526022815260200180612d4a6022913960400191505060405180910390fd5b8360ff16601b148061269757508360ff16601c145b6126d25760405162461bcd60e51b8152600401808060200182810382526022815260200180612e026022913960400191505060405180910390fd5b600060018686868660405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa15801561272e573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612796576040805162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015290519081900360640190fd5b95945050505050565b604080517f19457468657265756d205369676e6564204d6573736167653a0a333200000000602080830191909152603c8083019490945282518083039094018452605c909101909152815191012090565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526119b6908590612894565b600061285683836129be565b61288c575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556119d7565b5060006119d7565b60606128e9826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166129da9092919063ffffffff16565b805190915015611a665780806020019051602081101561290857600080fd5b5051611a665760405162461bcd60e51b815260040180806020018281038252602a815260200180612f0f602a913960400191505060405180910390fd5b60006119d4836001600160a01b0384166129f3565b8154600090821061299c5760405162461bcd60e51b8152600401808060200182810382526022815260200180612cc06022913960400191505060405180910390fd5b8260000182815481106129ab57fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b60606129e98484600085612ab9565b90505b9392505050565b60008181526001830160205260408120548015612aaf5783546000198083019190810190600090879083908110612a2657fe5b9060005260206000200154905080876000018481548110612a4357fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080612a7357fe5b600190038181906000526020600020016000905590558660010160008781526020019081526020016000206000905560019450505050506119d7565b60009150506119d7565b606082471015612afa5760405162461bcd60e51b8152600401808060200182810382526026815260200180612d8c6026913960400191505060405180910390fd5b612b0385612c15565b612b54576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310612b935780518252601f199092019160209182019101612b74565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114612bf5576040519150601f19603f3d011682016040523d82523d6000602084013e612bfa565b606091505b5091509150612c0a828286612c1b565b979650505050505050565b3b151590565b60608315612c2a5750816129ec565b825115612c3a5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612c84578181015183820152602001612c6c565b50505050905090810190601f168015612cb15780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473756e6c6f636b4461746520617272617920616e642070657263656e7420617272617973206d75737420686176652073616d652076616c756573416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e7445434453413a20696e76616c6964207369676e6174757265202773272076616c7565d8a7a79547af723ee3e12b59a480111268d8969c634e1a34a144d2c8b91d635b416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b6543616c6c6572206973206e6f7420616e2061646d696e0000000000000000000045434453413a20696e76616c6964207369676e6174757265202776272076616c7565536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77417272617920757365727320616e6420636c61696d6564206d757374206265207468652073616d65206c656e677468417272617920757365727320616e6420616d6f756e7473206d757374206265207468652073616d65206c656e677468a49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177543616c6c657220646f6573206e6f74206861766520746865207365727669636520726f6c65546865726520617265206e6f7420617661696c61626c6520746f6b656e7320746f20636c61696d5361666545524332303a204552433230206f7065726174696f6e20646964206e6f74207375636365656453657175656e636520616d6f756e7420616c726561647920636c61696d6564206f72206475626c696361746564416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a264697066735822122058279e24d0829dcb4db20e1f7de0ba47677abee019ffcdab83204117019172da64736f6c634300060c0033000000000000000000000000284b59cf2539544559c6efa11e2795e06d535345000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000000d6d800000000000000000000000000000000000000000000120c2db0e1ad42a50000000000000000000000000000000000000000000000000013405971f7949880000000000000000000000000000fea4d6e08d4048f0c93ccf0738b1a018a78be8dc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106103275760003560e01c806376aa28fc116101b8578063b122028411610104578063da58f199116100a2578063f87682f41161007c578063f87682f414610a78578063f9d9449d14610b9b578063fb29dafb14610ba3578063ff920c7414610bc057610327565b8063da58f1991461097d578063e1356e7714610a3c578063f4dadc6114610a5b57610327565b8063c3b24312116100de578063c3b2431214610906578063ca15c8731461092c578063d547741f14610949578063d6bed7f91461097557610327565b8063b1220284146108d9578063b72b54a4146108e1578063bed75809146108fe57610327565b806391d1485411610171578063a20e7d471161014b578063a20e7d471461086d578063a217fddf14610875578063a87430ba1461087d578063aaf29bad146108bc57610327565b806391d148541461080357806397bb15c91461082f5780639ce2bdab1461086557610327565b806376aa28fc146105e5578063778aad2e1461060257806378a96f7e1461062b5780637f2f2c8e146106335780639010d07c146107d85780639106d7ba146107fb57610327565b80633c30a513116102775780636386c1c71161023057806369ea17711161020a57806369ea17711461059b578063717503b9146105b8578063746347c3146105d557806375b238fc146105dd57610327565b80636386c1c7146105215780636691461a1461056d578063679aefce1461059357610327565b80633c30a513146104a95780634a3b00a6146104c65780634b014e28146104ea5780634e71d92d1461050957806350e497641461051157806354f703f81461051957610327565b8063245f73b8116102e45780632c4e722e116102be5780632c4e722e1461042c5780632f2ff15d1461043457806336568abe1461046057806339eb2b6e1461048c57610327565b8063245f73b8146103cd578063248a9ca3146103f3578063293c29581461041057610327565b806302835c7a1461032c578063040145091461036057806310c564f51461038657806310f571ac146103a0578063170f0671146103bd5780631a39d8ef146103c5575b600080fd5b61035e6004803603606081101561034257600080fd5b506001600160a01b038135169060208101359060400135610bc8565b005b61035e6004803603602081101561037657600080fd5b50356001600160a01b0316610c41565b61038e610e74565b60408051918252519081900360200190f35b61035e600480360360208110156103b657600080fd5b5035610e7a565b61038e610ed6565b61038e610edc565b61035e600480360360208110156103e357600080fd5b50356001600160a01b0316610ee2565b61038e6004803603602081101561040957600080fd5b5035610fe7565b610418610ffc565b604080519115158252519081900360200190f35b61038e611005565b61035e6004803603604081101561044a57600080fd5b50803590602001356001600160a01b031661100b565b61035e6004803603604081101561047657600080fd5b50803590602001356001600160a01b0316611077565b61035e600480360360208110156104a257600080fd5b50356110d8565b61035e600480360360208110156104bf57600080fd5b5035611134565b6104ce611190565b604080516001600160a01b039092168252519081900360200190f35b61035e6004803603602081101561050057600080fd5b5035151561119f565b61035e611210565b610418611427565b61038e611435565b6105476004803603602081101561053757600080fd5b50356001600160a01b031661143b565b604080519485526020850193909352838301919091526060830152519081900360800190f35b61035e6004803603602081101561058357600080fd5b50356001600160a01b031661157a565b61038e6115f3565b61035e600480360360208110156105b157600080fd5b50356115f9565b61035e600480360360208110156105ce57600080fd5b5035611655565b61041861173d565b61038e611746565b61035e600480360360208110156105fb57600080fd5b5035611758565b61035e6004803603606081101561061857600080fd5b50803590602081013590604001356117b4565b61038e611852565b61035e6004803603606081101561064957600080fd5b810190602081018135600160201b81111561066357600080fd5b82018360208201111561067557600080fd5b803590602001918460208302840111600160201b8311171561069657600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156106e557600080fd5b8201836020820111156106f757600080fd5b803590602001918460208302840111600160201b8311171561071857600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561076757600080fd5b82018360208201111561077957600080fd5b803590602001918460208302840111600160201b8311171561079a57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611858945050505050565b6104ce600480360360408110156107ee57600080fd5b50803590602001356119bc565b61038e6119dd565b6104186004803603604081101561081957600080fd5b50803590602001356001600160a01b03166119e3565b61035e6004803603606081101561084557600080fd5b506001600160a01b038135811691602081013591604090910135166119fb565b6104ce611a6b565b61038e611a7a565b61038e611a8c565b6108a36004803603602081101561089357600080fd5b50356001600160a01b0316611a91565b6040805192835260208301919091528051918290030190f35b61035e600480360360208110156108d257600080fd5b5035611aaa565b6108a3611b06565b61035e600480360360208110156108f757600080fd5b5035611b10565b61038e611b6c565b61035e6004803603602081101561091c57600080fd5b50356001600160a01b0316611b72565b61038e6004803603602081101561094257600080fd5b5035611beb565b61035e6004803603604081101561095f57600080fd5b50803590602001356001600160a01b0316611c02565b61038e611c5b565b61035e600480360360c081101561099357600080fd5b81359190810190604081016020820135600160201b8111156109b457600080fd5b8201836020820111156109c657600080fd5b803590602001918460018302840111600160201b831117156109e757600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955050823593505060ff602083013516916040810135915060600135611c61565b61035e60048036036020811015610a5257600080fd5b50351515612071565b6108a360048036036020811015610a7157600080fd5b5035612115565b61035e60048036036040811015610a8e57600080fd5b810190602081018135600160201b811115610aa857600080fd5b820183602082011115610aba57600080fd5b803590602001918460208302840111600160201b83111715610adb57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115610b2a57600080fd5b820183602082011115610b3c57600080fd5b803590602001918460208302840111600160201b83111715610b5d57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550612140945050505050565b61038e61224e565b61035e60048036036020811015610bb957600080fd5b5035612256565b6104ce6122b2565b610be0600080516020612ea3833981519152336119e3565b610c1f576040805162461bcd60e51b81526020600482015260166024820152600080516020612de2833981519152604482015290519081900360640190fd5b6001600160a01b03909216600090815260106020526040902090815560010155565b600e5460ff16610c8b576040805162461bcd60e51b815260206004820152601060248201526f526f756e64206973206c6f636b65642160801b604482015290519081900360640190fd5b610ca3600080516020612d6c833981519152336119e3565b610cde5760405162461bcd60e51b8152600401808060200182810382526025815260200180612ec36025913960400191505060405180910390fd5b6001600160a01b0381166000908152601060205260408120600a54600b54600754929392610d269291610d2091610d1a90631dcd6500906122d6565b906122d6565b9061232f565b600454835491925090610d399083612396565b1115610d8c576040805162461bcd60e51b815260206004820152601b60248201527f596f752063616e6e6f742073776170206d6f726520746f6b656e730000000000604482015290519081900360640190fd5b600254600354610d9c9083612396565b1115610de5576040805162461bcd60e51b8152602060048201526013602482015272105b1b081d1bdad95b9cc81dd85cc81cdbdb19606a1b604482015290519081900360640190fd5b601280546001019055600854610dff90631dcd6500612396565b6008558154610e0e9082612396565b8255600354610e1d9082612396565b60035560408051631dcd6500815260208101839052428183015290516001600160a01b038516917f38df76114aa6b6c19ab2ad589e277f4966eb1d89e2caf59c2f701fa3821998cc919081900360600190a2505050565b60085481565b610e92600080516020612ea3833981519152336119e3565b610ed1576040805162461bcd60e51b81526020600482015260166024820152600080516020612de2833981519152604482015290519081900360640190fd5b600d55565b60045481565b60025481565b610efa600080516020612ea3833981519152336119e3565b610f39576040805162461bcd60e51b81526020600482015260166024820152600080516020612de2833981519152604482015290519081900360640190fd5b600060085411610f90576040805162461bcd60e51b815260206004820152601860248201527f4e6f7420656e6f756768205553445420746f20636c61696d0000000000000000604482015290519081900360640190fd5b610fbe81610fab6009546008546123f090919063ffffffff16565b6006546001600160a01b0316919061244d565b610fe1610fd86009546008546123f090919063ffffffff16565b60095490612396565b60095550565b60009081526020819052604090206002015490565b600e5460ff1690565b600a5481565b60008281526020819052604090206002015461102e9061102961249f565b6119e3565b6110695760405162461bcd60e51b815260040180806020018281038252602f815260200180612d1b602f913960400191505060405180910390fd5b61107382826124a3565b5050565b61107f61249f565b6001600160a01b0316816001600160a01b0316146110ce5760405162461bcd60e51b815260040180806020018281038252602f815260200180612f66602f913960400191505060405180910390fd5b611073828261250c565b6110f0600080516020612ea3833981519152336119e3565b61112f576040805162461bcd60e51b81526020600482015260166024820152600080516020612de2833981519152604482015290519081900360640190fd5b600855565b61114c600080516020612ea3833981519152336119e3565b61118b576040805162461bcd60e51b81526020600482015260166024820152600080516020612de2833981519152604482015290519081900360640190fd5b600955565b6005546001600160a01b031681565b6111b7600080516020612ea3833981519152336119e3565b6111f6576040805162461bcd60e51b81526020600482015260166024820152600080516020612de2833981519152604482015290519081900360640190fd5b600e80549115156101000261ff0019909216919091179055565b60026001541415611268576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b6002600155600e54610100900460ff166112bc576040805162461bcd60e51b815260206004820152601060248201526f526f756e64206973206c6f636b65642160801b604482015290519081900360640190fd5b3360009081526010602052604090208054611311576040805162461bcd60e51b815260206004820152601060248201526f4e6f7468696e6720746f20636c61696d60801b604482015290519081900360640190fd5b600d54600f5460011901811161136e575b600f816001018154811061133257fe5b906000526020600020906002020160000154421061136857600f546001909101906000190181141561136357611368565b611322565b600d8190555b600061137933612575565b9050600081116113ba5760405162461bcd60e51b8152600401808060200182810382526027815260200180612ee86027913960400191505060405180910390fd5b60018301546113c99082612396565b60018401556005546113e5906001600160a01b0316338361244d565b60408051828152426020820152815133927f9923b4306c6c030f2bdfbf156517d5983b87e15b96176da122cd4f2effa4ba7b928290030190a250506001805550565b600e54610100900460ff1681565b60075481565b6001600160a01b0381166000908152601060205260408120600d54600f548392839283926001190181116114b0575b600f816001018154811061147a57fe5b90600052602060002090600202016000015442106114b057600f54600190910190600019018114156114ab576114b0565b61146a565b81600001549550816001015493506114ef6064610d20600f84815481106114d357fe5b60009182526020909120600160029092020101548554906122d6565b94508160010154851061151357600182015461150c9086906123f0565b9450611518565b600094505b600f546000190181141561154c57600f818154811061153357fe5b9060005260206000209060020201600001549250611571565b600f816001018154811061155c57fe5b90600052602060002090600202016000015492505b50509193509193565b611592600080516020612ea3833981519152336119e3565b6115d1576040805162461bcd60e51b81526020600482015260166024820152600080516020612de2833981519152604482015290519081900360640190fd5b600580546001600160a01b0319166001600160a01b0392909216919091179055565b600a5490565b611611600080516020612ea3833981519152336119e3565b611650576040805162461bcd60e51b81526020600482015260166024820152600080516020612de2833981519152604482015290519081900360640190fd5b600a55565b61166d600080516020612d6c833981519152336119e3565b6116a85760405162461bcd60e51b8152600401808060200182810382526025815260200180612ec36025913960400191505060405180910390fd5b600c546006546116c5916001600160a01b0391821691168361244d565b6009546116d29082612396565b600955600c5460408051639c86d67d60e01b81526004810184905290516001600160a01b0390921691639c86d67d9160248082019260009290919082900301818387803b15801561172257600080fd5b505af1158015611736573d6000803e3d6000fd5b5050505050565b600e5460ff1681565b600080516020612ea383398151915281565b611770600080516020612ea3833981519152336119e3565b6117af576040805162461bcd60e51b81526020600482015260166024820152600080516020612de2833981519152604482015290519081900360640190fd5b600355565b6117cc600080516020612ea3833981519152336119e3565b61180b576040805162461bcd60e51b81526020600482015260166024820152600080516020612de2833981519152604482015290519081900360640190fd5b81600f848154811061181957fe5b90600052602060002090600202016001018190555080600f848154811061183c57fe5b6000918252602090912060029091020155505050565b60125481565b611870600080516020612ea3833981519152336119e3565b6118af576040805162461bcd60e51b81526020600482015260166024820152600080516020612de2833981519152604482015290519081900360640190fd5b81518351146118ef5760405162461bcd60e51b815260040180806020018281038252602f815260200180612e74602f913960400191505060405180910390fd5b805183511461192f5760405162461bcd60e51b815260040180806020018281038252602f815260200180612e45602f913960400191505060405180910390fd5b60005b83518110156119b65760006010600086848151811061194d57fe5b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020905083828151811061198357fe5b6020026020010151816000018190555082828151811061199f57fe5b602090810291909101015160019182015501611932565b50505050565b60008281526020819052604081206119d490836125f5565b90505b92915050565b60035481565b60008281526020819052604081206119d49083612601565b611a13600080516020612ea3833981519152336119e3565b611a52576040805162461bcd60e51b81526020600482015260166024820152600080516020612de2833981519152604482015290519081900360640190fd5b611a666001600160a01b038216848461244d565b505050565b600c546001600160a01b031681565b600080516020612d6c83398151915281565b600081565b6010602052600090815260409020805460019091015482565b611ac2600080516020612ea3833981519152336119e3565b611b01576040805162461bcd60e51b81526020600482015260166024820152600080516020612de2833981519152604482015290519081900360640190fd5b600255565b6008546009549091565b611b28600080516020612ea3833981519152336119e3565b611b67576040805162461bcd60e51b81526020600482015260166024820152600080516020612de2833981519152604482015290519081900360640190fd5b600755565b600b5481565b611b8a600080516020612ea3833981519152336119e3565b611bc9576040805162461bcd60e51b81526020600482015260166024820152600080516020612de2833981519152604482015290519081900360640190fd5b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b60008181526020819052604081206119d790612616565b600082815260208190526040902060020154611c209061102961249f565b6110ce5760405162461bcd60e51b8152600401808060200182810382526030815260200180612db26030913960400191505060405180910390fd5b60095481565b600e5460ff16611cab576040805162461bcd60e51b815260206004820152601060248201526f526f756e64206973206c6f636b65642160801b604482015290519081900360640190fd5b6000611cb987858585612621565b9050611cd3600080516020612d6c833981519152826119e3565b611d24576040805162461bcd60e51b815260206004820152601760248201527f5369676e6564206e6f7420627920612073657276696365000000000000000000604482015290519081900360640190fd5b6000611d9c87876040516020018083805190602001908083835b60208310611d5d5780518252601f199092019160209182019101611d3e565b51815160209384036101000a600019018019909216911617905292019384525060408051808503815293820190528251920191909120915061279f9050565b9050808814611df2576040805162461bcd60e51b815260206004820152601860248201527f496e636f727265637420686173686564206d6573736167650000000000000000604482015290519081900360640190fd5b60008181526011602052604090205460ff1615611e405760405162461bcd60e51b815260040180806020018281038252602d815260200180612f39602d913960400191505060405180910390fd5b6000818152601160209081526040808320805460ff1916600190811790915560128054909101905533835260109091528120600a54600b54600754929392611e969291610d2091610d1a90631dcd6500906122d6565b600454835491925090611ea99083612396565b1115611efc576040805162461bcd60e51b815260206004820152601b60248201527f596f752063616e6e6f742073776170206d6f726520746f6b656e730000000000604482015290519081900360640190fd5b600254600354611f0c9083612396565b1115611f55576040805162461bcd60e51b8152602060048201526013602482015272105b1b081d1bdad95b9cc81dd85cc81cdbdb19606a1b604482015290519081900360640190fd5b600654611f71906001600160a01b03163330631dcd65006127f0565b600854611f8290631dcd6500612396565b6008558154611f919082612396565b8255600354611fa09082612396565b600381905550336001600160a01b03167fcdbc8151f2897cbbf0d24beb36eea80814ea1f9a8d3225b7f1e5ea0d6c51dd39631dcd650083428d6040518085815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612028578181015183820152602001612010565b50505050905090810190601f1680156120555780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a250505050505050505050565b612089600080516020612ea3833981519152336119e3565b6120c8576040805162461bcd60e51b81526020600482015260166024820152600080516020612de2833981519152604482015290519081900360640190fd5b600e805460ff19168215159081179091556040805191825242602083015280517fbcdda6bf9b7d876bc98e9a8a84ada64a8fb356d01e046769f012b7e8a392e1d09281900390910190a150565b600f818154811061212257fe5b60009182526020909120600290910201805460019091015490915082565b612158600080516020612ea3833981519152336119e3565b612197576040805162461bcd60e51b81526020600482015260166024820152600080516020612de2833981519152604482015290519081900360640190fd5b80518251146121d75760405162461bcd60e51b8152600401808060200182810382526039815260200180612ce26039913960400191505060405180910390fd5b60005b8251811015611a6657600f60405180604001604052808584815181106121fc57fe5b6020026020010151815260200184848151811061221557fe5b602090810291909101810151909152825460018181018555600094855293829020835160029092020190815591015190820155016121da565b631dcd650081565b61226e600080516020612ea3833981519152336119e3565b6122ad576040805162461bcd60e51b81526020600482015260166024820152600080516020612de2833981519152604482015290519081900360640190fd5b600455565b6006546001600160a01b031681565b60006119d4836001600160a01b03841661284a565b6000826122e5575060006119d7565b828202828482816122f257fe5b04146119d45760405162461bcd60e51b8152600401808060200182810382526021815260200180612e246021913960400191505060405180910390fd5b6000808211612385576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b81838161238e57fe5b049392505050565b6000828201838110156119d4576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115612447576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611a66908490612894565b3390565b60008281526020819052604090206124bb90826122c1565b15611073576124c861249f565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526020819052604090206125249082612945565b156110735761253161249f565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b6001600160a01b0381166000908152601060205260408120600d54600f80546125c692606492610d209290919081106125aa57fe5b60009182526020909120600160029092020101548454906122d6565b9150806001015482106125ea5760018101546125e39083906123f0565b91506125ef565b600091505b50919050565b60006119d4838361295a565b60006119d4836001600160a01b0384166129be565b60006119d7826129d6565b60007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08211156126825760405162461bcd60e51b8152600401808060200182810382526022815260200180612d4a6022913960400191505060405180910390fd5b8360ff16601b148061269757508360ff16601c145b6126d25760405162461bcd60e51b8152600401808060200182810382526022815260200180612e026022913960400191505060405180910390fd5b600060018686868660405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa15801561272e573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612796576040805162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015290519081900360640190fd5b95945050505050565b604080517f19457468657265756d205369676e6564204d6573736167653a0a333200000000602080830191909152603c8083019490945282518083039094018452605c909101909152815191012090565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526119b6908590612894565b600061285683836129be565b61288c575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556119d7565b5060006119d7565b60606128e9826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166129da9092919063ffffffff16565b805190915015611a665780806020019051602081101561290857600080fd5b5051611a665760405162461bcd60e51b815260040180806020018281038252602a815260200180612f0f602a913960400191505060405180910390fd5b60006119d4836001600160a01b0384166129f3565b8154600090821061299c5760405162461bcd60e51b8152600401808060200182810382526022815260200180612cc06022913960400191505060405180910390fd5b8260000182815481106129ab57fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b60606129e98484600085612ab9565b90505b9392505050565b60008181526001830160205260408120548015612aaf5783546000198083019190810190600090879083908110612a2657fe5b9060005260206000200154905080876000018481548110612a4357fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080612a7357fe5b600190038181906000526020600020016000905590558660010160008781526020019081526020016000206000905560019450505050506119d7565b60009150506119d7565b606082471015612afa5760405162461bcd60e51b8152600401808060200182810382526026815260200180612d8c6026913960400191505060405180910390fd5b612b0385612c15565b612b54576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310612b935780518252601f199092019160209182019101612b74565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114612bf5576040519150601f19603f3d011682016040523d82523d6000602084013e612bfa565b606091505b5091509150612c0a828286612c1b565b979650505050505050565b3b151590565b60608315612c2a5750816129ec565b825115612c3a5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612c84578181015183820152602001612c6c565b50505050905090810190601f168015612cb15780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473756e6c6f636b4461746520617272617920616e642070657263656e7420617272617973206d75737420686176652073616d652076616c756573416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e7445434453413a20696e76616c6964207369676e6174757265202773272076616c7565d8a7a79547af723ee3e12b59a480111268d8969c634e1a34a144d2c8b91d635b416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b6543616c6c6572206973206e6f7420616e2061646d696e0000000000000000000045434453413a20696e76616c6964207369676e6174757265202776272076616c7565536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77417272617920757365727320616e6420636c61696d6564206d757374206265207468652073616d65206c656e677468417272617920757365727320616e6420616d6f756e7473206d757374206265207468652073616d65206c656e677468a49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177543616c6c657220646f6573206e6f74206861766520746865207365727669636520726f6c65546865726520617265206e6f7420617661696c61626c6520746f6b656e7320746f20636c61696d5361666545524332303a204552433230206f7065726174696f6e20646964206e6f74207375636365656453657175656e636520616d6f756e7420616c726561647920636c61696d6564206f72206475626c696361746564416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a264697066735822122058279e24d0829dcb4db20e1f7de0ba47677abee019ffcdab83204117019172da64736f6c634300060c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000284b59cf2539544559c6efa11e2795e06d535345000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec700000000000000000000000000000000000000000000000000000000000d6d800000000000000000000000000000000000000000000120c2db0e1ad42a50000000000000000000000000000000000000000000000000013405971f7949880000000000000000000000000000fea4d6e08d4048f0c93ccf0738b1a018a78be8dc00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _govTokenAddress (address): 0x284b59cf2539544559C6EfA11E2795e06D535345
Arg [1] : _USDTAddress (address): 0xdAC17F958D2ee523a2206206994597C13D831ec7
Arg [2] : _rate (uint256): 880000
Arg [3] : _totalAmount (uint256): 1363636000000000000000000
Arg [4] : _maxAmountToBuy (uint256): 5682000000000000000000
Arg [5] : _vcUSDPoolAddress (address): 0xFEA4D6e08d4048f0c93CCF0738B1A018a78be8Dc
Arg [6] : _usdtReceived (uint256): 0
Arg [7] : _usdtClaimed (uint256): 0
-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 000000000000000000000000284b59cf2539544559c6efa11e2795e06d535345
Arg [1] : 000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7
Arg [2] : 00000000000000000000000000000000000000000000000000000000000d6d80
Arg [3] : 0000000000000000000000000000000000000000000120c2db0e1ad42a500000
Arg [4] : 00000000000000000000000000000000000000000000013405971f7949880000
Arg [5] : 000000000000000000000000fea4d6e08d4048f0c93ccf0738b1a018a78be8dc
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.