More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 231 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Claim | 19159160 | 316 days ago | IN | 0 ETH | 0.00120649 | ||||
Claim | 17860310 | 498 days ago | IN | 0 ETH | 0.00133476 | ||||
Claim | 17431834 | 558 days ago | IN | 0 ETH | 0.00209767 | ||||
Claim | 17376632 | 566 days ago | IN | 0 ETH | 0.00343581 | ||||
Claim | 17374033 | 566 days ago | IN | 0 ETH | 0.00589252 | ||||
Claim | 16673924 | 665 days ago | IN | 0 ETH | 0.00272887 | ||||
Claim | 16495466 | 690 days ago | IN | 0 ETH | 0.00176695 | ||||
Claim | 16474940 | 693 days ago | IN | 0 ETH | 0.00171276 | ||||
Claim | 16474917 | 693 days ago | IN | 0 ETH | 0.0017191 | ||||
Claim | 16474893 | 693 days ago | IN | 0 ETH | 0.0017356 | ||||
Claim | 16474875 | 693 days ago | IN | 0 ETH | 0.00164509 | ||||
Claim | 16238215 | 726 days ago | IN | 0 ETH | 0.00156814 | ||||
Claim | 16232289 | 726 days ago | IN | 0 ETH | 0.0015303 | ||||
Claim | 16232282 | 726 days ago | IN | 0 ETH | 0.00177348 | ||||
Claim | 16232276 | 726 days ago | IN | 0 ETH | 0.00157234 | ||||
Claim | 16232270 | 726 days ago | IN | 0 ETH | 0.0016633 | ||||
Claim | 16232258 | 726 days ago | IN | 0 ETH | 0.0015302 | ||||
Claim | 16226338 | 727 days ago | IN | 0 ETH | 0.00176809 | ||||
Claim | 16226336 | 727 days ago | IN | 0 ETH | 0.00174087 | ||||
Claim | 16226334 | 727 days ago | IN | 0 ETH | 0.00189031 | ||||
Claim | 16226333 | 727 days ago | IN | 0 ETH | 0.00191713 | ||||
Claim | 16226330 | 727 days ago | IN | 0 ETH | 0.00179124 | ||||
Claim | 16226324 | 727 days ago | IN | 0 ETH | 0.00185141 | ||||
Claim | 16226321 | 727 days ago | IN | 0 ETH | 0.00182783 | ||||
Claim | 16226189 | 727 days ago | IN | 0 ETH | 0.0016897 |
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
14937636 | 920 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0xAA8f95A8...8323D0658 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
PublicSaleProxy
Compiler Version
v0.7.6+commit.7338295f
Optimization Enabled:
Yes with 100 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.7.6; import "../interfaces/IPublicSaleProxy.sol"; import "../common/ProxyAccessCommon.sol"; import "./PublicSaleStorage.sol"; import "../stake/ProxyBase.sol"; import { OnApprove } from "./OnApprove.sol"; import "../interfaces/IWTON.sol"; import "../interfaces/IPublicSale.sol"; contract PublicSaleProxy is PublicSaleStorage, ProxyAccessCommon, ProxyBase, OnApprove, IPublicSaleProxy { event Upgraded(address indexed implementation); event Pause(address indexed addr, uint256 time); /// @dev constructor of PublicSaleProxy constructor() { assert( IMPLEMENTATION_SLOT == bytes32(uint256(keccak256("eip1967.proxy.implementation")) - 1) ); _setRoleAdmin(PROJECT_ADMIN_ROLE, PROJECT_ADMIN_ROLE); _setupRole(PROJECT_ADMIN_ROLE, msg.sender); _setupRole(DEFAULT_ADMIN_ROLE, msg.sender); } /// @dev set the logic /// @param _impl the logic address of PublicSaleProxy function setImplementation(address _impl) external override onlyProxyOwner { require(_impl != address(0), "PublicSaleProxy: logic is zero"); _setImplementation(_impl); } /// @notice Set pause state /// @param _pause true:pause or false:resume function setProxyPause(bool _pause) external override onlyOwner { pauseProxy = _pause; emit Pause(msg.sender,block.timestamp); } /// @notice Set implementation contract /// @param impl New implementation contract address function upgradeTo(address impl) external override onlyProxyOwner { require(impl != address(0), "PublicSaleProxy: input is zero"); require(_implementation() != impl, "PublicSaleProxy: same"); _setImplementation(impl); emit Upgraded(impl); } /// @dev returns the implementation function implementation() public override view returns (address) { return _implementation(); } /// @dev receive ether receive() external payable { revert("cannot receive Ether"); } /// @dev fallback function , execute on undefined function call fallback() external payable { _fallback(); } /// @dev fallback function , execute on undefined function call function _fallback() internal { address _impl = _implementation(); require( _impl != address(0) && !pauseProxy, "PublicSaleProxy: impl OR proxy is false" ); assembly { // Copy msg.data. We take full control of memory in this inline assembly // block because it will not return to Solidity code. We overwrite the // Solidity scratch pad at memory position 0. calldatacopy(0, 0, calldatasize()) // Call the implementation. // out and outsize are 0 because we don't know the size yet. let result := delegatecall(gas(), _impl, 0, calldatasize(), 0, 0) // Copy the returned data. returndatacopy(0, 0, returndatasize()) switch result // delegatecall returns 0 on error. case 0 { revert(0, returndatasize()) } default { return(0, returndatasize()) } } } /// @dev Initialize function initialize( address _saleTokenAddress, address _getTokenOwner, address _vaultAddress ) external override onlyProxyOwner { require(startAddWhiteTime == 0, "possible to setting the whiteTime before"); saleToken = IERC20(_saleTokenAddress); getTokenOwner = _getTokenOwner; liquidityVaultAddress = _vaultAddress; deployTime = block.timestamp; } function changeBasicSet( address _getTokenAddress, address _sTOS, address _wton, address _uniswapRouter, address _TOS ) external override onlyProxyOwner { require(startAddWhiteTime == 0, "possible to setting the whiteTime before"); getToken = _getTokenAddress; sTOS = ILockTOS(_sTOS); wton = _wton; uniswapRouter = ISwapRouter(_uniswapRouter); tos = IERC20(_TOS); IERC20(wton).approve( address(uniswapRouter), type(uint256).max ); IERC20(getToken).approve( wton, type(uint256).max ); } function setMaxMinPercent( uint256 _min, uint256 _max ) external override onlyProxyOwner { require(_min < _max, "need min < max"); minPer = _min; maxPer = _max; } function setSTOSstandard( uint256 _tier1, uint256 _tier2, uint256 _tier3, uint256 _tier4 ) external override onlyProxyOwner { require( (_tier1 < _tier2) && (_tier2 < _tier3) && (_tier3 < _tier4), "tier set error" ); stanTier1 = _tier1; stanTier2 = _tier2; stanTier3 = _tier3; stanTier4 = _tier4; } function setDelayTime( uint256 _delay ) external override onlyProxyOwner { delayTime = _delay; } function onApprove( address sender, address spender, uint256 amount, bytes calldata data ) external override returns (bool) { require(msg.sender == address(getToken) || msg.sender == address(IWTON(wton)), "PublicSale: only accept TON and WTON approve callback"); if(msg.sender == address(getToken)) { uint256 wtonAmount = IPublicSale(address(this))._decodeApproveData(data); if(wtonAmount == 0){ if(block.timestamp >= startExclusiveTime && block.timestamp < endExclusiveTime) { IPublicSale(address(this)).exclusiveSale(sender,amount); } else { require(block.timestamp >= startDepositTime && block.timestamp < endDepositTime, "PublicSale: not SaleTime"); IPublicSale(address(this)).deposit(sender,amount); } } else { uint256 totalAmount = amount + wtonAmount; if(block.timestamp >= startExclusiveTime && block.timestamp < endExclusiveTime) { IPublicSale(address(this)).exclusiveSale(sender,totalAmount); } else { require(block.timestamp >= startDepositTime && block.timestamp < endDepositTime, "PublicSale: not SaleTime"); IPublicSale(address(this)).deposit(sender,totalAmount); } } } else if (msg.sender == address(IWTON(wton))) { uint256 wtonAmount = IPublicSale(address(this))._toWAD(amount); if(block.timestamp >= startExclusiveTime && block.timestamp < endExclusiveTime) { IPublicSale(address(this)).exclusiveSale(sender,wtonAmount); } else { require(block.timestamp >= startDepositTime && block.timestamp < endDepositTime, "PublicSale: not SaleTime"); IPublicSale(address(this)).deposit(sender,wtonAmount); } } return true; } }
//SPDX-License-Identifier: Unlicense pragma solidity ^0.7.6; interface IPublicSaleProxy { /// @dev set the logic /// @param _impl publicSaleContract Address; function setImplementation(address _impl) external; /// @dev Set pause state /// @param _pause true:pause or false:resume function setProxyPause(bool _pause) external; /// @dev Set implementation contract /// @param _impl New implementation contract address function upgradeTo(address _impl) external; /// @dev view implementation address /// @return the logic address function implementation() external view returns (address); /// @dev initialize function initialize( address _saleTokenAddress, address _getTokenOwner, address _vaultAddress ) external; /// @dev changeBasicSet function changeBasicSet( address _getTokenAddress, address _sTOS, address _wton, address _uniswapRouter, address _TOS ) external; /// @dev set Max,Min /// @param _min wton->tos min Percent /// @param _max wton->tos max Percent function setMaxMinPercent( uint256 _min, uint256 _max ) external; /// @dev set sTOSstandrard /// @param _tier1 tier1 standrard /// @param _tier2 tier2 standrard /// @param _tier3 tier3 standrard /// @param _tier4 tier4 standrard function setSTOSstandard( uint256 _tier1, uint256 _tier2, uint256 _tier3, uint256 _tier4 ) external; /// @dev set delayTime /// @param _delay delayTime function setDelayTime( uint256 _delay ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.6; import "@openzeppelin/contracts/access/AccessControl.sol"; import "./AccessRoleCommon.sol"; contract ProxyAccessCommon is AccessRoleCommon, AccessControl { modifier onlyOwner() { require(isAdmin(msg.sender) || isProxyAdmin(msg.sender), "Accessible: Caller is not an admin"); _; } modifier onlyProxyOwner() { require(isProxyAdmin(msg.sender), "Accessible: Caller is not an proxy admin"); _; } function addProxyAdmin(address _owner) external onlyProxyOwner { _setupRole(DEFAULT_ADMIN_ROLE, _owner); } function removeProxyAdmin() public virtual onlyProxyOwner { renounceRole(DEFAULT_ADMIN_ROLE, msg.sender); } function transferProxyAdmin(address newAdmin) external virtual onlyProxyOwner { require(newAdmin != address(0), "Accessible: zero address"); require(msg.sender != newAdmin, "Accessible: same admin"); grantRole(DEFAULT_ADMIN_ROLE, newAdmin); renounceRole(DEFAULT_ADMIN_ROLE, msg.sender); } /// @dev add admin /// @param account address to add function addAdmin(address account) public virtual onlyProxyOwner { grantRole(PROJECT_ADMIN_ROLE, account); } /// @dev remove admin function removeAdmin() public virtual onlyOwner { renounceRole(PROJECT_ADMIN_ROLE, msg.sender); } /// @dev transfer admin /// @param newAdmin new admin address function transferAdmin(address newAdmin) external virtual onlyOwner { require(newAdmin != address(0), "Accessible: zero address"); require(msg.sender != newAdmin, "Accessible: same admin"); grantRole(PROJECT_ADMIN_ROLE, newAdmin); renounceRole(PROJECT_ADMIN_ROLE, msg.sender); } /// @dev whether admin /// @param account address to check function isAdmin(address account) public view virtual returns (bool) { return hasRole(PROJECT_ADMIN_ROLE, account); } function isProxyAdmin(address account) public view virtual returns (bool) { return hasRole(DEFAULT_ADMIN_ROLE, account); } }
//SPDX-License-Identifier: Unlicense pragma solidity ^0.7.6; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "../interfaces/ILockTOS.sol"; import "../libraries/LibPublicSale.sol"; import "@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol"; contract PublicSaleStorage { /// @dev flag for pause proxy bool public pauseProxy; uint256 public snapshot = 0; uint256 public deployTime; //contract 배포된 시간 uint256 public delayTime; //contract와 snapshot사이 시간 uint256 public startAddWhiteTime = 0; uint256 public endAddWhiteTime = 0; uint256 public startExclusiveTime = 0; uint256 public endExclusiveTime = 0; uint256 public startDepositTime = 0; //청약 시작시간 uint256 public endDepositTime = 0; //청약 끝시간 uint256 public startClaimTime = 0; uint256 public totalUsers = 0; //전체 세일 참여자 (라운드1,라운드2 포함, 유니크) uint256 public totalRound1Users = 0; //라운드 1 참여자 uint256 public totalRound2Users = 0; //라운드 2 참여자 uint256 public totalRound2UsersClaim = 0; //라운드 2 참여자중 claim한사람 uint256 public totalExSaleAmount = 0; //총 exclu 실제 판매토큰 양 (exclusive) uint256 public totalExPurchasedAmount = 0; //총 지불토큰 받은 양 (exclusive) uint256 public totalDepositAmount; //총 청약 한 양 (openSale) uint256 public totalExpectSaleAmount; //예정된 판매토큰 양 (exclusive) uint256 public totalExpectOpenSaleAmount; //예정된 판매 토큰량 (opensale) uint256 public saleTokenPrice; //판매하는 토큰(DOC) uint256 public payTokenPrice; //받는 토큰(TON) uint256 public claimInterval; //클레임 간격 (epochtime) uint256 public claimPeriod; //클레임 횟수 uint256 public claimFirst; //초기 클레임 percents uint256 public hardCap; //hardcap 수량 (ton 기준) uint256 public changeTOS; //ton -> tos로 변경하는 % uint256 public minPer; //변경하는 % min uint256 public maxPer; //변경하는 % max uint256 public stanTier1; //최소 기준 Tier1 uint256 public stanTier2; //최소 기준 Tier2 uint256 public stanTier3; //최소 기준 Tier3 uint256 public stanTier4; //최소 기준 Tier4 address public liquidityVaultAddress; //liquidityVault의 Address ISwapRouter public uniswapRouter; uint24 public constant poolFee = 3000; address public getTokenOwner; address public wton; address public getToken; IERC20 public saleToken; IERC20 public tos; ILockTOS public sTOS; address[] public depositors; address[] public whitelists; bool public adminWithdraw; //withdraw 실행여부 uint256 public totalClaimCounts; uint256[] public claimTimes; uint256[] public claimPercents; mapping (address => LibPublicSale.UserInfoEx) public usersEx; mapping (address => LibPublicSale.UserInfoOpen) public usersOpen; mapping (address => LibPublicSale.UserClaim) public usersClaim; mapping (uint => uint256) public tiers; //티어별 가격 설정 mapping (uint => uint256) public tiersAccount; //티어별 화이트리스트 참여자 숫자 기록 mapping (uint => uint256) public tiersExAccount; //티어별 exclusiveSale 참여자 숫자 기록 mapping (uint => uint256) public tiersPercents; //티어별 퍼센트 기록 }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.6; import {Address} from "@openzeppelin/contracts/utils/Address.sol"; abstract contract ProxyBase { // bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)) bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /// @dev Sets the implementation address of the proxy. /// @param newImplementation Address of the new implementation. function _setImplementation(address newImplementation) internal { require( Address.isContract(newImplementation), "ProxyBase: Cannot set a proxy implementation to a non-contract address" ); bytes32 slot = IMPLEMENTATION_SLOT; assembly { sstore(slot, newImplementation) } } function _implementation() internal view returns (address impl) { bytes32 slot = IMPLEMENTATION_SLOT; assembly { impl := sload(slot) } } }
//SPDX-License-Identifier: MIT pragma solidity ^0.7.6; import { ERC165 } from "@openzeppelin/contracts/introspection/ERC165.sol"; abstract contract OnApprove is ERC165 { constructor() { _registerInterface(OnApprove(this).onApprove.selector); } function onApprove(address owner, address spender, uint256 amount, bytes calldata data) external virtual returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.6; interface IWTON { function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); function onApprove( address owner, address spender, uint256 tonAmount, bytes calldata data ) external returns (bool); function burnFrom(address account, uint256 amount) external; function swapToTON(uint256 wtonAmount) external returns (bool); function swapFromTON(uint256 tonAmount) external returns (bool); function swapToTONAndTransfer(address to, uint256 wtonAmount) external returns (bool); function swapFromTONAndTransfer(address to, uint256 tonAmount) external returns (bool); function renounceTonMinter() external; function approve(address spender, uint256 amount) external returns (bool); function allowance(address sender, address recipient) external returns (uint256); }
//SPDX-License-Identifier: Unlicense pragma solidity ^0.7.6; interface IPublicSale { /// @dev set changeTONOwner function changeTONOwner( address _address ) external; /// @dev set the allsetting /// @param _Tier _Tier[0~3] : set the sTOS Tier standard, _Tier[4~7] : set the Tier percents /// @param _amount _amount[0] : Round1 Sale Amount, _amount[1] : Round2 Sale Amount, _amount[2] : saleToken Price, _amount[3] : TON Price, _amount[4] : hardcap amount, _amount[5] : ton to tos % /// @param _time _time[0] : sTOS snapshot time, _time[1] : whitelist startTime, _time[2] : whitelist endTime, _time[3] : round1 sale startTime, _time[4] : round1 sale endTime, _time[5] : round2 deposit startTime, _time[6] : round2 deposit endTime, _time[7] : totalClaimCounts /// @param _claimTimes _claimTimes[] : claim time array /// @param _claimPercents _claimPercents[] : claim percents array (this is need sum 100) function setAllsetting( uint256[8] calldata _Tier, uint256[6] calldata _amount, uint256[8] calldata _time, uint256[] calldata _claimTimes, uint256[] calldata _claimPercents ) external; /// @dev set snapshot /// @param _snapshot _snapshot timestamp function setSnapshot(uint256 _snapshot) external; /// @dev set information related to exclusive sale /// @param _startAddWhiteTime start time of addwhitelist /// @param _endAddWhiteTime end time of addwhitelist /// @param _startExclusiveTime start time of exclusive sale /// @param _endExclusiveTime start time of exclusive sale function setExclusiveTime( uint256 _startAddWhiteTime, uint256 _endAddWhiteTime, uint256 _startExclusiveTime, uint256 _endExclusiveTime ) external; /// @dev set information related to open sale /// @param _startDepositTime start time of deposit /// @param _endDepositTime end time of deposit function setOpenTime( uint256 _startDepositTime, uint256 _endDepositTime ) external; /// @dev set information related to open sale /// @param _claimCounts totalClaimCounts from this contract /// @param _claimTimes claim time array /// @param _claimPercents claim percents array (this is need sum 100) function setEachClaim( uint256 _claimCounts, uint256[] calldata _claimTimes, uint256[] calldata _claimPercents ) external; /// @dev set information related to tier and tierPercents /// @param _tier[4] sTOS condition setting /// @param _tierPercent[4] tier proportion setting function setAllTier( uint256[4] calldata _tier, uint256[4] calldata _tierPercent ) external; /// @dev set information related to tier /// @param _tier1 tier1 condition of STOS hodings /// @param _tier2 tier2 condition of STOS hodings /// @param _tier3 tier3 condition of STOS hodings /// @param _tier4 tier4 condition of STOS hodings function setTier( uint256 _tier1, uint256 _tier2, uint256 _tier3, uint256 _tier4 ) external; /// @dev set information related to tier proportion for exclusive sale /// @param _tier1 tier1 proportion (If it is 6%, enter as 600 -> To record up to the 2nd decimal point) /// @param _tier2 tier2 proportion /// @param _tier3 tier3 proportion /// @param _tier4 tier4 proportion function setTierPercents( uint256 _tier1, uint256 _tier2, uint256 _tier3, uint256 _tier4 ) external; /// @dev set information related to saleAmount and tokenPrice /// @param _expectAmount[2] saleAmount setting /// @param _priceAmount[2] tokenPrice setting function setAllAmount( uint256[2] calldata _expectAmount, uint256[2] calldata _priceAmount ) external; /// @dev set information related to sale amount /// @param _totalExpectSaleAmount expected amount of exclusive sale /// @param _totalExpectOpenSaleAmount expected amount of open sale function setSaleAmount( uint256 _totalExpectSaleAmount, uint256 _totalExpectOpenSaleAmount ) external; /// @dev set information related to token price /// @param _saleTokenPrice the sale token price /// @param _payTokenPrice the funding(pay) token price function setTokenPrice(uint256 _saleTokenPrice, uint256 _payTokenPrice) external; /// @dev set information related to token price /// @param _hardcapAmount the sale token price /// @param _changePercent the funding(pay) token price function setHardcap ( uint256 _hardcapAmount, uint256 _changePercent ) external; /// @dev view totalExpectOpenSaleAmount function totalExpectOpenSaleAmountView() external view returns(uint256); /// @dev view totalRound1NonSaleAmount function totalRound1NonSaleAmount() external view returns(uint256); /// @dev calculate the sale Token amount /// @param _amount th amount function calculSaleToken(uint256 _amount) external view returns (uint256); /// @dev calculate the pay Token amount /// @param _amount th amount function calculPayToken(uint256 _amount) external view returns (uint256); /// @dev calculate the tier /// @param _address user address function calculTier(address _address) external view returns (uint256); /// @dev calculate the tier's amount /// @param _address user address function calculTierAmount(address _address) external view returns (uint256); /// @dev calculate the open sale amount /// @param _account user address /// @param _amount amount function calculOpenSaleAmount(address _account, uint256 _amount) external view returns (uint256); /// @dev calculate the open sale amount /// @param _account user address function calculClaimAmount(address _account, uint256 _period) external view returns (uint256 _reward, uint256 _totalClaim, uint256 _refundAmount); /// @dev view totalSaleUserAmount function totalSaleUserAmount(address user) external view returns (uint256 _realPayAmount, uint256 _realSaleAmount, uint256 _refundAmount); /// @dev view openSaleUserAmount function openSaleUserAmount(address user) external view returns (uint256 _realPayAmount, uint256 _realSaleAmount, uint256 _refundAmount); /// @dev view totalOpenSaleAmount function totalOpenSaleAmount() external view returns (uint256); /// @dev view totalOpenPurchasedAmount function totalOpenPurchasedAmount() external view returns (uint256); /// @dev execute add whitelist function addWhiteList() external; /// @dev execute exclusive sale /// @param _sender user address /// @param _amount amount function exclusiveSale(address _sender,uint256 _amount) external; /// @dev execute deposit /// @param _sender user address /// @param _amount amount function deposit(address _sender,uint256 _amount) external; /// @dev execute the claim function claim() external; /// @dev execute the claim function depositWithdraw() external; function _decodeApproveData( bytes memory data ) external pure returns (uint256 approveData); function _toWAD(uint256 v) external pure returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../utils/EnumerableSet.sol"; import "../utils/Address.sol"; import "../GSN/Context.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context { using EnumerableSet for EnumerableSet.AddressSet; using Address for address; struct RoleData { EnumerableSet.AddressSet members; bytes32 adminRole; } mapping (bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view returns (bool) { return _roles[role].members.contains(account); } /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) public view returns (uint256) { return _roles[role].members.length(); } /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) public view returns (address) { return _roles[role].members.at(index); } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) public virtual { require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to grant"); _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) public virtual { require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to revoke"); _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) public virtual { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { emit RoleAdminChanged(role, _roles[role].adminRole, adminRole); _roles[role].adminRole = adminRole; } function _grantRole(bytes32 role, address account) private { if (_roles[role].members.add(account)) { emit RoleGranted(role, account, _msgSender()); } } function _revokeRole(bytes32 role, address account) private { if (_roles[role].members.remove(account)) { emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.7.6; contract AccessRoleCommon { bytes32 public constant ADMIN_ROLE = keccak256("ADMIN"); bytes32 public constant MINTER_ROLE = keccak256("MINTER"); bytes32 public constant BURNER_ROLE = keccak256("BURNER"); bytes32 public constant PROJECT_ADMIN_ROLE = keccak256("PROJECT_ADMIN_ROLE"); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping (bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { require(set._values.length > index, "EnumerableSet: index out of bounds"); return set._values[index]; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(value))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(value))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(value))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint256(_at(set._inner, index))); } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /* * @dev 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: Unlicense pragma solidity ^0.7.6; pragma abicoder v2; import "../libraries/LibLockTOS.sol"; interface ILockTOS { /// @dev Returns addresses of all holders of LockTOS function allHolders() external returns (address[] memory); /// @dev Returns addresses of active holders of LockTOS function activeHolders() external returns (address[] memory); /// @dev Returns all withdrawable locks function withdrawableLocksOf(address user) external view returns (uint256[] memory); /// @dev Returns all locks of `_addr` function locksOf(address _addr) external view returns (uint256[] memory); /// @dev Returns all locks of `_addr` function activeLocksOf(address _addr) external view returns (uint256[] memory); /// @dev Total locked amount of `_addr` function totalLockedAmountOf(address _addr) external view returns (uint256); /// @dev jhswuqhdiuwjhdoiehdoijijf bhabcgfzvg tqafstqfzys amount of `_addr` function withdrawableAmountOf(address _addr) external view returns (uint256); /// @dev Returns all locks of `_addr` function locksInfo(uint256 _lockId) external view returns ( uint256, uint256, uint256 ); /// @dev Returns all history of `_addr` function pointHistoryOf(uint256 _lockId) external view returns (LibLockTOS.Point[] memory); /// @dev Total vote weight function totalSupply() external view returns (uint256); /// @dev Total vote weight at `_timestamp` function totalSupplyAt(uint256 _timestamp) external view returns (uint256); /// @dev Vote weight of lock at `_timestamp` function balanceOfLockAt(uint256 _lockId, uint256 _timestamp) external view returns (uint256); /// @dev Vote weight of lock function balanceOfLock(uint256 _lockId) external view returns (uint256); /// @dev Vote weight of a user at `_timestamp` function balanceOfAt(address _addr, uint256 _timestamp) external view returns (uint256 balance); /// @dev Vote weight of a iser function balanceOf(address _addr) external view returns (uint256 balance); /// @dev Increase amount function increaseAmount(uint256 _lockId, uint256 _value) external; /// @dev Deposits value for '_addr' function depositFor( address _addr, uint256 _lockId, uint256 _value ) external; /// @dev Create lock using permit function createLockWithPermit( uint256 _value, uint256 _unlockTime, uint256 _deadline, uint8 _v, bytes32 _r, bytes32 _s ) external returns (uint256 lockId); /// @dev Create lock function createLock(uint256 _value, uint256 _unlockTime) external returns (uint256 lockId); /// @dev Increase function increaseUnlockTime(uint256 _lockId, uint256 unlockTime) external; /// @dev Withdraw all TOS function withdrawAll() external; /// @dev Withdraw TOS function withdraw(uint256 _lockId) external; /// @dev needCheckpoint function needCheckpoint() external view returns (bool need); /// @dev Global checkpoint function globalCheckpoint() external; /// @dev set MaxTime function setMaxTime(uint256 _maxTime) external; }
// SPDX-License-Identifier: Unlicense pragma solidity ^0.7.6; library LibPublicSale { struct UserInfoEx { bool join; uint tier; uint256 payAmount; uint256 saleAmount; } struct UserInfoOpen { bool join; uint256 depositAmount; uint256 payAmount; } struct UserClaim { bool exec; uint256 claimAmount; uint256 refundAmount; } }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.7.5; pragma abicoder v2; import '@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol'; /// @title Router token swapping functionality /// @notice Functions for swapping tokens via Uniswap V3 interface ISwapRouter is IUniswapV3SwapCallback { struct ExactInputSingleParams { address tokenIn; address tokenOut; uint24 fee; address recipient; uint256 deadline; uint256 amountIn; uint256 amountOutMinimum; uint160 sqrtPriceLimitX96; } /// @notice Swaps `amountIn` of one token for as much as possible of another token /// @param params The parameters necessary for the swap, encoded as `ExactInputSingleParams` in calldata /// @return amountOut The amount of the received token function exactInputSingle(ExactInputSingleParams calldata params) external payable returns (uint256 amountOut); struct ExactInputParams { bytes path; address recipient; uint256 deadline; uint256 amountIn; uint256 amountOutMinimum; } /// @notice Swaps `amountIn` of one token for as much as possible of another along the specified path /// @param params The parameters necessary for the multi-hop swap, encoded as `ExactInputParams` in calldata /// @return amountOut The amount of the received token function exactInput(ExactInputParams calldata params) external payable returns (uint256 amountOut); struct ExactOutputSingleParams { address tokenIn; address tokenOut; uint24 fee; address recipient; uint256 deadline; uint256 amountOut; uint256 amountInMaximum; uint160 sqrtPriceLimitX96; } /// @notice Swaps as little as possible of one token for `amountOut` of another token /// @param params The parameters necessary for the swap, encoded as `ExactOutputSingleParams` in calldata /// @return amountIn The amount of the input token function exactOutputSingle(ExactOutputSingleParams calldata params) external payable returns (uint256 amountIn); struct ExactOutputParams { bytes path; address recipient; uint256 deadline; uint256 amountOut; uint256 amountInMaximum; } /// @notice Swaps as little as possible of one token for `amountOut` of another along the specified path (reversed) /// @param params The parameters necessary for the multi-hop swap, encoded as `ExactOutputParams` in calldata /// @return amountIn The amount of the input token function exactOutput(ExactOutputParams calldata params) external payable returns (uint256 amountIn); }
// SPDX-License-Identifier: Unlicense pragma solidity ^0.7.6; library LibLockTOS { struct Point { int256 bias; int256 slope; uint256 timestamp; } struct LockedBalance { uint256 start; uint256 end; uint256 amount; bool withdrawn; } struct SlopeChange { int256 bias; int256 slope; uint256 changeTime; } struct LockedBalanceInfo { uint256 id; uint256 start; uint256 end; uint256 amount; uint256 balance; } }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.5.0; /// @title Callback for IUniswapV3PoolActions#swap /// @notice Any contract that calls IUniswapV3PoolActions#swap must implement this interface interface IUniswapV3SwapCallback { /// @notice Called to `msg.sender` after executing a swap via IUniswapV3Pool#swap. /// @dev In the implementation you must pay the pool tokens owed for the swap. /// The caller of this method must be checked to be a UniswapV3Pool deployed by the canonical UniswapV3Factory. /// amount0Delta and amount1Delta can both be 0 if no tokens were swapped. /// @param amount0Delta The amount of token0 that was sent (negative) or must be received (positive) by the pool by /// the end of the swap. If positive, the callback must send that amount of token0 to the pool. /// @param amount1Delta The amount of token1 that was sent (negative) or must be received (positive) by the pool by /// the end of the swap. If positive, the callback must send that amount of token1 to the pool. /// @param data Any data passed through by the caller via the IUniswapV3PoolActions#swap call function uniswapV3SwapCallback( int256 amount0Delta, int256 amount1Delta, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts may inherit from this and call {_registerInterface} to declare * their support of an interface. */ abstract contract ERC165 is IERC165 { /* * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7 */ bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7; /** * @dev Mapping of interface ids to whether or not it's supported. */ mapping(bytes4 => bool) private _supportedInterfaces; constructor () internal { // Derived contracts need only register support for their own interfaces, // we register support for ERC165 itself here _registerInterface(_INTERFACE_ID_ERC165); } /** * @dev See {IERC165-supportsInterface}. * * Time complexity O(1), guaranteed to always use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) public view override returns (bool) { return _supportedInterfaces[interfaceId]; } /** * @dev Registers the contract as an implementer of the interface defined by * `interfaceId`. Support of the actual ERC165 interface is automatic and * registering its interface id is not required. * * See {IERC165-supportsInterface}. * * Requirements: * * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`). */ function _registerInterface(bytes4 interfaceId) internal virtual { require(interfaceId != 0xffffffff, "ERC165: invalid interface id"); _supportedInterfaces[interfaceId] = true; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "optimizer": { "enabled": true, "runs": 100 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"addr","type":"address"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"Pause","type":"event"},{"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":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BURNER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PROJECT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"addAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"addProxyAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"adminWithdraw","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_getTokenAddress","type":"address"},{"internalType":"address","name":"_sTOS","type":"address"},{"internalType":"address","name":"_wton","type":"address"},{"internalType":"address","name":"_uniswapRouter","type":"address"},{"internalType":"address","name":"_TOS","type":"address"}],"name":"changeBasicSet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"changeTOS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimFirst","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimInterval","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"claimPercents","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"claimTimes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"delayTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"deployTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"depositors","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"endAddWhiteTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"endDepositTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"endExclusiveTime","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":"getToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTokenOwner","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":[],"name":"hardCap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_saleTokenAddress","type":"address"},{"internalType":"address","name":"_getTokenOwner","type":"address"},{"internalType":"address","name":"_vaultAddress","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isProxyAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"liquidityVaultAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPer","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minPer","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onApprove","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"pauseProxy","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"payTokenPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolFee","outputs":[{"internalType":"uint24","name":"","type":"uint24"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"removeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"removeProxyAdmin","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":[],"name":"sTOS","outputs":[{"internalType":"contract ILockTOS","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"saleToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"saleTokenPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_delay","type":"uint256"}],"name":"setDelayTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_impl","type":"address"}],"name":"setImplementation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_min","type":"uint256"},{"internalType":"uint256","name":"_max","type":"uint256"}],"name":"setMaxMinPercent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_pause","type":"bool"}],"name":"setProxyPause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tier1","type":"uint256"},{"internalType":"uint256","name":"_tier2","type":"uint256"},{"internalType":"uint256","name":"_tier3","type":"uint256"},{"internalType":"uint256","name":"_tier4","type":"uint256"}],"name":"setSTOSstandard","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"snapshot","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stanTier1","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stanTier2","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stanTier3","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stanTier4","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startAddWhiteTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startClaimTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startDepositTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startExclusiveTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tiers","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tiersAccount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tiersExAccount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tiersPercents","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tos","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalClaimCounts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalDepositAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalExPurchasedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalExSaleAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalExpectOpenSaleAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalExpectSaleAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalRound1Users","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalRound2Users","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalRound2UsersClaim","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalUsers","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newAdmin","type":"address"}],"name":"transferAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAdmin","type":"address"}],"name":"transferProxyAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"uniswapRouter","outputs":[{"internalType":"contract ISwapRouter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"impl","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"usersClaim","outputs":[{"internalType":"bool","name":"exec","type":"bool"},{"internalType":"uint256","name":"claimAmount","type":"uint256"},{"internalType":"uint256","name":"refundAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"usersEx","outputs":[{"internalType":"bool","name":"join","type":"bool"},{"internalType":"uint256","name":"tier","type":"uint256"},{"internalType":"uint256","name":"payAmount","type":"uint256"},{"internalType":"uint256","name":"saleAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"usersOpen","outputs":[{"internalType":"bool","name":"join","type":"bool"},{"internalType":"uint256","name":"depositAmount","type":"uint256"},{"internalType":"uint256","name":"payAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"whitelists","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wton","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Deployed Bytecode
0x6080604052600436106104b95760003560e01c806389f395de1161026b578063bff1f9e11161014f578063e4b2fb79116100c1578063f18d20be11610085578063f18d20be14611024578063f47f2f1d14611039578063fb86a4041461106c578063fe404c9614611081578063fe4d5add146110ab578063ff6dac76146110d557610502565b8063e4b2fb7914610f91578063e985e36714610fbb578063eaff056d14610fd0578063eb8445f814610fe5578063ed5131f514610ffa57610502565b8063cae9ce1b11610113578063cae9ce1b14610e8b578063d539139314610ee6578063d547741f14610efb578063d784d42614610f34578063dc560fcd14610f67578063e016bac414610f7c57610502565b8063bff1f9e114610ddd578063c0c53b8b14610df2578063c3e5763514610e37578063c5408d5014610e4c578063ca15c87314610e6157610502565b80639d18fde7116101e8578063a55abb17116101ac578063a55abb1714610d38578063ac3c467614610d4d578063b7182b9514610d89578063b960ca0414610d9e578063be72f2d314610db3578063bfc630b114610dc857610502565b80639d18fde714610ccf5780639f87b77f14610ce4578063a055e62514610cf9578063a217fddf14610d0e578063a389595f14610d2357610502565b806394f641d51161022f57806394f641d514610c485780639525269214610c5d57806396f1557c14610c725780639711715a14610ca55780639a202d4714610cba57610502565b806389f395de14610b8b5780638d62d94914610ba05780638f68711a14610bb55780639010d07c14610bdf57806391d1485414610c0f57610502565b806351d28a7e1161039d578063735de9f71161030f5780637cb00d25116102d35780637cb00d2514610ac35780637dc2cd9814610aef5780637e2eee5314610b0457806381a9f6d714610b195780638356ca4f14610b2e5780638951ed1814610b6157610502565b8063735de9f714610a3c57806375829def14610a5157806375b238fc14610a84578063768b821f14610a995780637a40624b14610aae57610502565b8063653a151b11610361578063653a151b1461091b57806366ce72711461094b57806367b399a514610960578063690480051461098a5780636d9ff157146109b45780637048027514610a0957610502565b806351d28a7e146108b257806351ebde6d146108c75780635c60da1b146108dc57806361a33427146108f157806363a8fd891461090657610502565b8063256019d61161043657806337bf0719116103fa57806337bf07191461076e5780633ef541b51461078357806341c04d5e1461079857806341c0cb77146107ad5780634273ca16146108005780634dd199211461089d57610502565b8063256019d61461069f578063282c51f3146106b45780632f2ff15d146106c957806336568abe146107025780633659cfe61461073b57610502565b80631c53f2561161047d5780631c53f256146105e757806321df0da7146105fc578063226bf1a41461062d578063248a9ca31461064257806324d7806c1461066c57610502565b806301ffc9a71461050c578063039af9eb14610554578063089fe6aa146105905780630b433a12146105bd5780631bfc751e146105d257610502565b36610502576040805162461bcd60e51b815260206004820152601460248201527331b0b73737ba103932b1b2b4bb329022ba3432b960611b604482015290519081900360640190fd5b61050a611108565b005b34801561051857600080fd5b506105406004803603602081101561052f57600080fd5b50356001600160e01b03191661118e565b604080519115158252519081900360200190f35b34801561056057600080fd5b5061057e6004803603602081101561057757600080fd5b50356111ad565b60408051918252519081900360200190f35b34801561059c57600080fd5b506105a56111bf565b6040805162ffffff9092168252519081900360200190f35b3480156105c957600080fd5b5061057e6111c5565b3480156105de57600080fd5b5061057e6111cb565b3480156105f357600080fd5b5061057e6111d1565b34801561060857600080fd5b506106116111d7565b604080516001600160a01b039092168252519081900360200190f35b34801561063957600080fd5b5061057e6111e6565b34801561064e57600080fd5b5061057e6004803603602081101561066557600080fd5b50356111ec565b34801561067857600080fd5b506105406004803603602081101561068f57600080fd5b50356001600160a01b0316611201565b3480156106ab57600080fd5b5061057e611221565b3480156106c057600080fd5b5061057e611227565b3480156106d557600080fd5b5061050a600480360360408110156106ec57600080fd5b50803590602001356001600160a01b031661124b565b34801561070e57600080fd5b5061050a6004803603604081101561072557600080fd5b50803590602001356001600160a01b03166112b7565b34801561074757600080fd5b5061050a6004803603602081101561075e57600080fd5b50356001600160a01b0316611318565b34801561077a57600080fd5b5061061161145d565b34801561078f57600080fd5b5061057e61146c565b3480156107a457600080fd5b5061057e611472565b3480156107b957600080fd5b506107e0600480360360208110156107d057600080fd5b50356001600160a01b0316611484565b604080519315158452602084019290925282820152519081900360600190f35b34801561080c57600080fd5b506105406004803603608081101561082357600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561085e57600080fd5b82018360208201111561087057600080fd5b8035906020019184600183028401116401000000008311171561089257600080fd5b5090925090506114a9565b3480156108a957600080fd5b50610611611a3c565b3480156108be57600080fd5b5061057e611a4b565b3480156108d357600080fd5b5061057e611a51565b3480156108e857600080fd5b50610611611a57565b3480156108fd57600080fd5b5061057e611a66565b34801561091257600080fd5b50610540611a6c565b34801561092757600080fd5b5061050a6004803603604081101561093e57600080fd5b5080359060200135611a75565b34801561095757600080fd5b5061057e611b09565b34801561096c57600080fd5b5061057e6004803603602081101561098357600080fd5b5035611b0f565b34801561099657600080fd5b5061057e600480360360208110156109ad57600080fd5b5035611b21565b3480156109c057600080fd5b5061050a600480360360a08110156109d757600080fd5b506001600160a01b03813581169160208101358216916040820135811691606081013582169160809091013516611b33565b348015610a1557600080fd5b5061050a60048036036020811015610a2c57600080fd5b50356001600160a01b0316611d14565b348015610a4857600080fd5b50610611611d73565b348015610a5d57600080fd5b5061050a60048036036020811015610a7457600080fd5b50356001600160a01b0316611d82565b348015610a9057600080fd5b5061057e611eb2565b348015610aa557600080fd5b5061057e611ed6565b348015610aba57600080fd5b5061057e611edc565b348015610acf57600080fd5b5061050a60048036036020811015610ae657600080fd5b50351515611ee2565b348015610afb57600080fd5b5061057e611f7e565b348015610b1057600080fd5b5061057e611f84565b348015610b2557600080fd5b5061057e611f8a565b348015610b3a57600080fd5b5061050a60048036036020811015610b5157600080fd5b50356001600160a01b0316611f90565b348015610b6d57600080fd5b5061050a60048036036020811015610b8457600080fd5b5035612097565b348015610b9757600080fd5b506106116120e0565b348015610bac57600080fd5b506106116120ef565b348015610bc157600080fd5b5061057e60048036036020811015610bd857600080fd5b50356120fe565b348015610beb57600080fd5b5061061160048036036040811015610c0257600080fd5b5080359060200135612110565b348015610c1b57600080fd5b5061054060048036036040811015610c3257600080fd5b50803590602001356001600160a01b031661212f565b348015610c5457600080fd5b5061057e612147565b348015610c6957600080fd5b5061057e61214d565b348015610c7e57600080fd5b5061050a60048036036020811015610c9557600080fd5b50356001600160a01b0316612153565b348015610cb157600080fd5b5061057e6121a2565b348015610cc657600080fd5b5061050a6121a8565b348015610cdb57600080fd5b5061057e612215565b348015610cf057600080fd5b5061057e61221b565b348015610d0557600080fd5b5061057e612221565b348015610d1a57600080fd5b5061057e612227565b348015610d2f57600080fd5b5061057e61222c565b348015610d4457600080fd5b5061057e612232565b348015610d5957600080fd5b5061050a60048036036080811015610d7057600080fd5b5080359060208101359060408101359060600135612238565b348015610d9557600080fd5b506106116122eb565b348015610daa57600080fd5b5061057e6122fa565b348015610dbf57600080fd5b5061050a612300565b348015610dd457600080fd5b5061057e61234f565b348015610de957600080fd5b5061057e612355565b348015610dfe57600080fd5b5061050a60048036036060811015610e1557600080fd5b506001600160a01b03813581169160208101358216916040909101351661235b565b348015610e4357600080fd5b5061057e612421565b348015610e5857600080fd5b5061057e612427565b348015610e6d57600080fd5b5061057e60048036036020811015610e8457600080fd5b503561242d565b348015610e9757600080fd5b50610ebe60048036036020811015610eae57600080fd5b50356001600160a01b0316612444565b6040805194151585526020850193909352838301919091526060830152519081900360800190f35b348015610ef257600080fd5b5061057e61246f565b348015610f0757600080fd5b5061050a60048036036040811015610f1e57600080fd5b50803590602001356001600160a01b0316612493565b348015610f4057600080fd5b5061050a60048036036020811015610f5757600080fd5b50356001600160a01b03166124ec565b348015610f7357600080fd5b5061057e612594565b348015610f8857600080fd5b5061057e61259a565b348015610f9d57600080fd5b5061061160048036036020811015610fb457600080fd5b50356125a0565b348015610fc757600080fd5b506106116125ca565b348015610fdc57600080fd5b5061057e6125d9565b348015610ff157600080fd5b5061057e6125df565b34801561100657600080fd5b5061057e6004803603602081101561101d57600080fd5b50356125e5565b34801561103057600080fd5b50610540612606565b34801561104557600080fd5b506105406004803603602081101561105c57600080fd5b50356001600160a01b031661260f565b34801561107857600080fd5b5061057e61261b565b34801561108d57600080fd5b5061057e600480360360208110156110a457600080fd5b5035612621565b3480156110b757600080fd5b50610611600480360360208110156110ce57600080fd5b5035612631565b3480156110e157600080fd5b506107e0600480360360208110156110f857600080fd5b50356001600160a01b0316612641565b600061111261267b565b90506001600160a01b0381161580159061112f575060005460ff16155b61116a5760405162461bcd60e51b8152600401808060200182810382526027815260200180612b446027913960400191505060405180910390fd5b3660008037600080366000845af43d6000803e808015611189573d6000f35b3d6000fd5b6001600160e01b03191660009081526037602052604090205460ff1690565b60326020526000908152604090205481565b610bb881565b60165481565b600a5481565b601c5481565b6025546001600160a01b031681565b60155481565b60009081526036602052604090206002015490565b600061121b600080516020612a078339815191528361212f565b92915050565b602c5481565b7f9667e80708b6eeeb0053fa0cca44e028ff548e2a9f029edfeac87c118b08b7c881565b60008281526036602052604090206002015461126e906112696126a0565b61212f565b6112a95760405162461bcd60e51b815260040180806020018281038252602f8152602001806129d8602f913960400191505060405180910390fd5b6112b382826126a4565b5050565b6112bf6126a0565b6001600160a01b0316816001600160a01b03161461130e5760405162461bcd60e51b815260040180806020018281038252602f815260200180612b6b602f913960400191505060405180910390fd5b6112b3828261270d565b6113213361260f565b61135c5760405162461bcd60e51b8152600401808060200182810382526028815260200180612aa66028913960400191505060405180910390fd5b6001600160a01b0381166113b7576040805162461bcd60e51b815260206004820152601e60248201527f5075626c696353616c6550726f78793a20696e707574206973207a65726f0000604482015290519081900360640190fd5b806001600160a01b03166113c961267b565b6001600160a01b0316141561141d576040805162461bcd60e51b81526020600482015260156024820152745075626c696353616c6550726f78793a2073616d6560581b604482015290519081900360640190fd5b61142681612776565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b6028546001600160a01b031681565b60095481565b600080516020612a0783398151915281565b60306020526000908152604090208054600182015460029092015460ff909116919083565b6025546000906001600160a01b03163314806114cf57506024546001600160a01b031633145b61150a5760405162461bcd60e51b8152600401808060200182810382526035815260200180612a716035913960400191505060405180910390fd5b6025546001600160a01b031633141561185d5760405163aa5bbf5560e01b815260206004820190815260248201849052600091309163aa5bbf5591879187918190604401848480828437600083820152604051601f909101601f191690920195506020945090925050508083038186803b15801561158757600080fd5b505afa15801561159b573d6000803e3d6000fd5b505050506040513d60208110156115b157600080fd5b50519050806117085760065442101580156115cd575060075442105b1561163d576040805163f0fbf32d60e01b81526001600160a01b0389166004820152602481018790529051309163f0fbf32d91604480830192600092919082900301818387803b15801561162057600080fd5b505af1158015611634573d6000803e3d6000fd5b50505050611703565b6008544210158015611650575060095442105b61169c576040805162461bcd60e51b81526020600482015260186024820152775075626c696353616c653a206e6f742053616c6554696d6560401b604482015290519081900360640190fd5b604080516311f9fbc960e21b81526001600160a01b038916600482015260248101879052905130916347e7ef2491604480830192600092919082900301818387803b1580156116ea57600080fd5b505af11580156116fe573d6000803e3d6000fd5b505050505b611857565b60065485820190421080159061171f575060075442105b1561178f576040805163f0fbf32d60e01b81526001600160a01b038a166004820152602481018390529051309163f0fbf32d91604480830192600092919082900301818387803b15801561177257600080fd5b505af1158015611786573d6000803e3d6000fd5b50505050611855565b60085442101580156117a2575060095442105b6117ee576040805162461bcd60e51b81526020600482015260186024820152775075626c696353616c653a206e6f742053616c6554696d6560401b604482015290519081900360640190fd5b604080516311f9fbc960e21b81526001600160a01b038a16600482015260248101839052905130916347e7ef2491604480830192600092919082900301818387803b15801561183c57600080fd5b505af1158015611850573d6000803e3d6000fd5b505050505b505b50611a30565b6024546001600160a01b0316331415611a30576000306001600160a01b0316636bbe48af866040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156118b657600080fd5b505afa1580156118ca573d6000803e3d6000fd5b505050506040513d60208110156118e057600080fd5b505160065490915042108015906118f8575060075442105b15611968576040805163f0fbf32d60e01b81526001600160a01b0389166004820152602481018390529051309163f0fbf32d91604480830192600092919082900301818387803b15801561194b57600080fd5b505af115801561195f573d6000803e3d6000fd5b50505050611a2e565b600854421015801561197b575060095442105b6119c7576040805162461bcd60e51b81526020600482015260186024820152775075626c696353616c653a206e6f742053616c6554696d6560401b604482015290519081900360640190fd5b604080516311f9fbc960e21b81526001600160a01b038916600482015260248101839052905130916347e7ef2491604480830192600092919082900301818387803b158015611a1557600080fd5b505af1158015611a29573d6000803e3d6000fd5b505050505b505b50600195945050505050565b6021546001600160a01b031681565b60145481565b601f5481565b6000611a6161267b565b905090565b600e5481565b60005460ff1681565b611a7e3361260f565b611ab95760405162461bcd60e51b8152600401808060200182810382526028815260200180612aa66028913960400191505060405180910390fd5b808210611afe576040805162461bcd60e51b815260206004820152600e60248201526d0dccacac840dad2dc407840dac2f60931b604482015290519081900360640190fd5b601b91909155601c55565b60075481565b60336020526000908152604090205481565b60356020526000908152604090205481565b611b3c3361260f565b611b775760405162461bcd60e51b8152600401808060200182810382526028815260200180612aa66028913960400191505060405180910390fd5b60045415611bb65760405162461bcd60e51b8152600401808060200182810382526028815260200180612a496028913960400191505060405180910390fd5b602580546001600160a01b03199081166001600160a01b038881169190911790925560288054821687841617905560248054821686841617808255602280548416878616179081905560278054909416868616179093556040805163095ea7b360e01b8152938516600485015260001992840192909252905192169163095ea7b3916044808201926020929091908290030181600087803b158015611c5a57600080fd5b505af1158015611c6e573d6000803e3d6000fd5b505050506040513d6020811015611c8457600080fd5b5050602554602480546040805163095ea7b360e01b81526001600160a01b039283166004820152600019938101939093525192169163095ea7b3916044808201926020929091908290030181600087803b158015611ce157600080fd5b505af1158015611cf5573d6000803e3d6000fd5b505050506040513d6020811015611d0b57600080fd5b50505050505050565b611d1d3361260f565b611d585760405162461bcd60e51b8152600401808060200182810382526028815260200180612aa66028913960400191505060405180910390fd5b611d70600080516020612a078339815191528261124b565b50565b6022546001600160a01b031681565b611d8b33611201565b80611d9a5750611d9a3361260f565b611dd55760405162461bcd60e51b8152600401808060200182810382526022815260200180612a276022913960400191505060405180910390fd5b6001600160a01b038116611e2b576040805162461bcd60e51b815260206004820152601860248201527741636365737369626c653a207a65726f206164647265737360401b604482015290519081900360640190fd5b336001600160a01b0382161415611e82576040805162461bcd60e51b815260206004820152601660248201527520b1b1b2b9b9b4b136329d1039b0b6b29030b236b4b760511b604482015290519081900360640190fd5b611e9a600080516020612a078339815191528261124b565b611d70600080516020612a07833981519152336112b7565b7fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec4281565b601e5481565b60025481565b611eeb33611201565b80611efa5750611efa3361260f565b611f355760405162461bcd60e51b8152600401808060200182810382526022815260200180612a276022913960400191505060405180910390fd5b6000805482151560ff1990911617905560408051428152905133917f0cc81ffa7ae14c1e9e3f3a07c8ba11c5ce48258aca115fb150d8aea6d3095bd7919081900360200190a250565b60175481565b60035481565b60085481565b611f993361260f565b611fd45760405162461bcd60e51b8152600401808060200182810382526028815260200180612aa66028913960400191505060405180910390fd5b6001600160a01b03811661202a576040805162461bcd60e51b815260206004820152601860248201527741636365737369626c653a207a65726f206164647265737360401b604482015290519081900360640190fd5b336001600160a01b0382161415612081576040805162461bcd60e51b815260206004820152601660248201527520b1b1b2b9b9b4b136329d1039b0b6b29030b236b4b760511b604482015290519081900360640190fd5b61208c60008261124b565b611d706000336112b7565b6120a03361260f565b6120db5760405162461bcd60e51b8152600401808060200182810382526028815260200180612aa66028913960400191505060405180910390fd5b600355565b6027546001600160a01b031681565b6024546001600160a01b031681565b60346020526000908152604090205481565b600082815260366020526040812061212890836127de565b9392505050565b600082815260366020526040812061212890836127ea565b600d5481565b60045481565b61215c3361260f565b6121975760405162461bcd60e51b8152600401808060200182810382526028815260200180612aa66028913960400191505060405180910390fd5b611d706000826112a9565b60015481565b6121b133611201565b806121c057506121c03361260f565b6121fb5760405162461bcd60e51b8152600401808060200182810382526022815260200180612a276022913960400191505060405180910390fd5b612213600080516020612a07833981519152336112b7565b565b601a5481565b601d5481565b600c5481565b600081565b601b5481565b60105481565b6122413361260f565b61227c5760405162461bcd60e51b8152600401808060200182810382526028815260200180612aa66028913960400191505060405180910390fd5b828410801561228a57508183105b801561229557508082105b6122d7576040805162461bcd60e51b815260206004820152600e60248201526d3a34b2b91039b2ba1032b93937b960911b604482015290519081900360640190fd5b601d93909355601e91909155601f55602055565b6023546001600160a01b031681565b60125481565b6123093361260f565b6123445760405162461bcd60e51b8152600401808060200182810382526028815260200180612aa66028913960400191505060405180910390fd5b6122136000336112b7565b60135481565b600b5481565b6123643361260f565b61239f5760405162461bcd60e51b8152600401808060200182810382526028815260200180612aa66028913960400191505060405180910390fd5b600454156123de5760405162461bcd60e51b8152600401808060200182810382526028815260200180612a496028913960400191505060405180910390fd5b602680546001600160a01b039485166001600160a01b03199182161790915560238054938516938216939093179092556021805491909316911617905542600255565b60055481565b60115481565b600081815260366020526040812061121b906127ff565b602f60205260009081526040902080546001820154600283015460039093015460ff90921692909184565b7ff0887ba65ee2024ea881d91b74c2450ef19e1557f03bed3ea9f16b037cbe2dc981565b6000828152603660205260409020600201546124b1906112696126a0565b61130e5760405162461bcd60e51b8152600401808060200182810382526030815260200180612ace6030913960400191505060405180910390fd5b6124f53361260f565b6125305760405162461bcd60e51b8152600401808060200182810382526028815260200180612aa66028913960400191505060405180910390fd5b6001600160a01b03811661258b576040805162461bcd60e51b815260206004820152601e60248201527f5075626c696353616c6550726f78793a206c6f676963206973207a65726f0000604482015290519081900360640190fd5b611d7081612776565b60205481565b60065481565b602981815481106125b057600080fd5b6000918252602090912001546001600160a01b0316905081565b6026546001600160a01b031681565b60185481565b600f5481565b602d81815481106125f557600080fd5b600091825260209091200154905081565b602b5460ff1681565b600061121b818361212f565b60195481565b602e81815481106125f557600080fd5b602a81815481106125b057600080fd5b60316020526000908152604090208054600182015460029092015460ff909116919083565b6000612128836001600160a01b03841661280a565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3390565b60008281526036602052604090206126bc9082612666565b156112b3576126c96126a0565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526036602052604090206127259082612854565b156112b3576127326126a0565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b61277f81612869565b6127ba5760405162461bcd60e51b8152600401808060200182810382526046815260200180612afe6046913960600191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b6000612128838361286f565b6000612128836001600160a01b0384166128d3565b600061121b826128eb565b600061281683836128d3565b61284c5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561121b565b50600061121b565b6000612128836001600160a01b0384166128ef565b3b151590565b815460009082106128b15760405162461bcd60e51b81526004018080602001828103825260228152602001806129b66022913960400191505060405180910390fd5b8260000182815481106128c057fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b600081815260018301602052604081205480156129ab578354600019808301919081019060009087908390811061292257fe5b906000526020600020015490508087600001848154811061293f57fe5b60009182526020808320909101929092558281526001898101909252604090209084019055865487908061296f57fe5b6001900381819060005260206000200160009055905586600101600087815260200190815260200160002060009055600194505050505061121b565b600091505061121b56fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e7452eafc11f6f81f86878bffd31109a0d92f37506527754f00788853ff9f63b13041636365737369626c653a2043616c6c6572206973206e6f7420616e2061646d696e706f737369626c6520746f2073657474696e672074686520776869746554696d65206265666f72655075626c696353616c653a206f6e6c792061636365707420544f4e20616e642057544f4e20617070726f76652063616c6c6261636b41636365737369626c653a2043616c6c6572206973206e6f7420616e2070726f78792061646d696e416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b6550726f7879426173653a2043616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e747261637420616464726573735075626c696353616c6550726f78793a20696d706c204f522070726f78792069732066616c7365416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a26469706673582212204b725a73275a2e5acc8e0730c70498c3cc32dbe7794912c39d39a3c763a24b8364736f6c63430007060033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $1.79 | 2 | $3.58 |
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.