More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 6,615 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw | 14364383 | 988 days ago | IN | 0 ETH | 0.0059545 | ||||
Withdraw | 14330792 | 993 days ago | IN | 0 ETH | 0.00742899 | ||||
Withdraw | 14330792 | 993 days ago | IN | 0 ETH | 0.00637983 | ||||
Withdraw | 14203253 | 1013 days ago | IN | 0 ETH | 0.00148811 | ||||
Withdraw | 12635297 | 1258 days ago | IN | 0 ETH | 0.00945364 | ||||
Withdraw | 12635297 | 1258 days ago | IN | 0 ETH | 0.0097873 | ||||
Withdraw | 12622932 | 1259 days ago | IN | 0 ETH | 0.00333487 | ||||
Withdraw | 12573128 | 1267 days ago | IN | 0 ETH | 0.00701781 | ||||
Transfer | 11751345 | 1394 days ago | IN | 0.12699483 ETH | 0.003822 | ||||
Bet | 11744241 | 1395 days ago | IN | 0.04068941 ETH | 0.00899015 | ||||
Withdraw | 11518365 | 1430 days ago | IN | 0 ETH | 0.00498876 | ||||
Bet | 11483060 | 1435 days ago | IN | 3 ETH | 0.00736355 | ||||
Bet | 11483060 | 1435 days ago | IN | 1 ETH | 0.00586588 | ||||
Bet | 11483060 | 1435 days ago | IN | 4 ETH | 0.00693297 | ||||
Bet | 11483059 | 1435 days ago | IN | 4 ETH | 0.00723874 | ||||
Bet | 11483059 | 1435 days ago | IN | 2 ETH | 0.00723874 | ||||
Withdraw | 11480126 | 1436 days ago | IN | 0 ETH | 0.00252692 | ||||
Withdraw | 11474014 | 1436 days ago | IN | 0 ETH | 0.03570145 | ||||
Withdraw | 11469459 | 1437 days ago | IN | 0 ETH | 0.03763752 | ||||
Withdraw | 11468798 | 1437 days ago | IN | 0 ETH | 0.04323085 | ||||
Withdraw | 11467738 | 1437 days ago | IN | 0 ETH | 0.03592949 | ||||
Withdraw | 11467415 | 1437 days ago | IN | 0 ETH | 0.02948715 | ||||
Withdraw | 11466961 | 1438 days ago | IN | 0 ETH | 0.01543696 | ||||
Bet | 11466948 | 1438 days ago | IN | 0.1 ETH | 0.01595536 | ||||
Withdraw | 11466488 | 1438 days ago | IN | 0 ETH | 0.00995303 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
11744241 | 1395 days ago | 0.03255152 ETH | ||||
11483060 | 1435 days ago | 2.4 ETH | ||||
11483060 | 1435 days ago | 0.8 ETH | ||||
11483060 | 1435 days ago | 3.2 ETH | ||||
11483059 | 1435 days ago | 3.2 ETH | ||||
11483059 | 1435 days ago | 1.6 ETH | ||||
11466948 | 1438 days ago | 0.02 ETH | ||||
11466948 | 1438 days ago | 0.08 ETH | ||||
11466478 | 1438 days ago | 0.012 ETH | ||||
11466478 | 1438 days ago | 0.048 ETH | ||||
11465017 | 1438 days ago | 0.11746743 ETH | ||||
11465017 | 1438 days ago | 0.46986973 ETH | ||||
11462320 | 1438 days ago | 0.0164 ETH | ||||
11462320 | 1438 days ago | 0.0656 ETH | ||||
11461099 | 1438 days ago | 0.01176311 ETH | ||||
11461099 | 1438 days ago | 0.04705247 ETH | ||||
11461086 | 1438 days ago | 0.0018 ETH | ||||
11461086 | 1438 days ago | 0.0072 ETH | ||||
11460277 | 1439 days ago | 0.63350352 ETH | ||||
11460277 | 1439 days ago | 2.53401411 ETH | ||||
11458635 | 1439 days ago | 0.42 ETH | ||||
11458635 | 1439 days ago | 1.68 ETH | ||||
11458558 | 1439 days ago | 0.0016 ETH | ||||
11458558 | 1439 days ago | 0.0064 ETH | ||||
11455319 | 1439 days ago | 0.00439088 ETH |
Loading...
Loading
Contract Name:
Auction
Compiler Version
v0.6.6+commit.6c089d02
Optimization Enabled:
Yes with 0 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity >=0.4.25 <0.7.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol"; import "./interfaces/IToken.sol"; import "./interfaces/IAuction.sol"; import "./interfaces/IStaking.sol"; contract Auction is IAuction, AccessControl { using SafeMath for uint256; event Bet( address indexed account, uint256 value, uint256 indexed auctionId, uint256 indexed time ); event Withdraval( address indexed account, uint256 value, uint256 indexed auctionId, uint256 indexed time ); event AuctionIsOver(uint256 eth, uint256 token, uint256 indexed auctionId); bytes32 public constant MANAGER_ROLE = keccak256("MANAGER_ROLE"); bytes32 public constant CALLER_ROLE = keccak256("CALLER_ROLE"); struct AuctionReserves { uint256 eth; uint256 token; uint256 uniswapLastPrice; uint256 uniswapMiddlePrice; } struct UserBet { uint256 eth; address ref; } mapping(uint256 => AuctionReserves) public reservesOf; mapping(address => uint256[]) public auctionsOf; mapping(uint256 => mapping(address => UserBet)) public auctionBetOf; mapping(uint256 => mapping(address => bool)) public existAuctionsOf; uint256 public lastAuctionEventId; uint256 public start; uint256 public stepTimestamp; uint256 public uniswapPercent; address public mainToken; address public staking; address payable public uniswap; address payable public recipient; bool public init_; modifier onlyCaller() { require( hasRole(CALLER_ROLE, _msgSender()), "Caller is not a caller role" ); _; } modifier onlyManager() { require( hasRole(MANAGER_ROLE, _msgSender()), "Caller is not a caller role" ); _; } constructor() public { init_ = false; } function init( uint256 _stepTimestamp, address _manager, address _mainToken, address _staking, address payable _uniswap, address payable _recipient, address _nativeSwap, address _foreignSwap, address _subbalances ) external { require(!init_, "init is active"); _setupRole(MANAGER_ROLE, _manager); _setupRole(CALLER_ROLE, _nativeSwap); _setupRole(CALLER_ROLE, _foreignSwap); _setupRole(CALLER_ROLE, _staking); _setupRole(CALLER_ROLE, _subbalances); start = now; stepTimestamp = _stepTimestamp; uniswapPercent = 20; mainToken = _mainToken; staking = _staking; uniswap = _uniswap; recipient = _recipient; init_ = true; } function auctionsOf_(address account) public view returns (uint256[] memory) { return auctionsOf[account]; } function setUniswapPercent(uint256 percent) external onlyManager { uniswapPercent = percent; } function getUniswapLastPrice() public view returns (uint256) { address[] memory path = new address[](2); path[0] = IUniswapV2Router02(uniswap).WETH(); path[1] = mainToken; uint256 price = IUniswapV2Router02(uniswap).getAmountsOut( 1e18, path )[1]; return price; } function getUniswapMiddlePriceForSevenDays() public view returns (uint256) { uint256 stepsFromStart = calculateStepsFromStart(); uint256 index = stepsFromStart; uint256 sum; uint256 points; while (points != 7) { if (reservesOf[index].uniswapLastPrice != 0) { sum = sum.add(reservesOf[index].uniswapLastPrice); points = points.add(1); } if (index == 0) break; index = index.sub(1); } if (sum == 0) return getUniswapLastPrice(); else return sum.div(points); } function _updatePrice() internal { uint256 stepsFromStart = calculateStepsFromStart(); reservesOf[stepsFromStart].uniswapLastPrice = getUniswapLastPrice(); reservesOf[stepsFromStart] .uniswapMiddlePrice = getUniswapMiddlePriceForSevenDays(); } function bet(uint256 deadline, address ref) external payable { _saveAuctionData(); _updatePrice(); require(_msgSender() != ref, "msg.sender == ref"); ( uint256 toRecipient, uint256 toUniswap ) = _calculateRecipientAndUniswapAmountsToSend(); _swapEth(toUniswap, deadline); uint256 stepsFromStart = calculateStepsFromStart(); auctionBetOf[stepsFromStart][_msgSender()].ref = ref; auctionBetOf[stepsFromStart][_msgSender()] .eth = auctionBetOf[stepsFromStart][_msgSender()].eth.add( msg.value ); if (!existAuctionsOf[stepsFromStart][_msgSender()]) { auctionsOf[_msgSender()].push(stepsFromStart); existAuctionsOf[stepsFromStart][_msgSender()] = true; } reservesOf[stepsFromStart].eth = reservesOf[stepsFromStart].eth.add( msg.value ); recipient.transfer(toRecipient); emit Bet(msg.sender, msg.value, stepsFromStart, now); } function withdraw(uint256 auctionId) external { _saveAuctionData(); _updatePrice(); uint256 stepsFromStart = calculateStepsFromStart(); require(stepsFromStart > auctionId, "auction is active"); uint256 auctionETHUserBalance = auctionBetOf[auctionId][_msgSender()] .eth; auctionBetOf[auctionId][_msgSender()].eth = 0; require(auctionETHUserBalance > 0, "zero balance in auction"); uint256 payout = _calculatePayout(auctionId, auctionETHUserBalance); uint256 uniswapPayoutWithPercent = _calculatePayoutWithUniswap( auctionId, auctionETHUserBalance, payout ); if (payout > uniswapPayoutWithPercent) { uint256 nextWeeklyAuction = calculateNearestWeeklyAuction(); reservesOf[nextWeeklyAuction].token = reservesOf[nextWeeklyAuction] .token .add(payout.sub(uniswapPayoutWithPercent)); payout = uniswapPayoutWithPercent; } if (address(auctionBetOf[auctionId][_msgSender()].ref) == address(0)) { IToken(mainToken).burn(address(this), payout); IStaking(staking).externalStake(payout, 14, _msgSender()); emit Withdraval(msg.sender, payout, stepsFromStart, now); } else { IToken(mainToken).burn(address(this), payout); ( uint256 toRefMintAmount, uint256 toUserMintAmount ) = _calculateRefAndUserAmountsToMint(payout); payout = payout.add(toUserMintAmount); IStaking(staking).externalStake(payout, 14, _msgSender()); emit Withdraval(msg.sender, payout, stepsFromStart, now); IStaking(staking).externalStake( toRefMintAmount, 14, auctionBetOf[auctionId][_msgSender()].ref ); } } function callIncomeDailyTokensTrigger(uint256 amount) external override onlyCaller { uint256 stepsFromStart = calculateStepsFromStart(); uint256 nextAuctionId = stepsFromStart.add(1); reservesOf[nextAuctionId].token = reservesOf[nextAuctionId].token.add( amount ); } function callIncomeWeeklyTokensTrigger(uint256 amount) external override onlyCaller { uint256 nearestWeeklyAuction = calculateNearestWeeklyAuction(); reservesOf[nearestWeeklyAuction] .token = reservesOf[nearestWeeklyAuction].token.add(amount); } function calculateNearestWeeklyAuction() public view returns (uint256) { uint256 stepsFromStart = calculateStepsFromStart(); return stepsFromStart.add(uint256(7).sub(stepsFromStart.mod(7))); } function calculateStepsFromStart() public view returns (uint256) { return now.sub(start).div(stepTimestamp); } function _calculatePayoutWithUniswap( uint256 auctionId, uint256 amount, uint256 payout ) internal view returns (uint256) { uint256 uniswapPayout = reservesOf[auctionId] .uniswapMiddlePrice .mul(amount) .div(1e18); uint256 uniswapPayoutWithPercent = uniswapPayout.add( uniswapPayout.mul(uniswapPercent).div(100) ); if (payout > uniswapPayoutWithPercent) { return uniswapPayoutWithPercent; } else { return payout; } } function _calculatePayout(uint256 auctionId, uint256 amount) internal view returns (uint256) { return amount.mul(reservesOf[auctionId].token).div( reservesOf[auctionId].eth ); } function _calculateRecipientAndUniswapAmountsToSend() private returns (uint256, uint256) { uint256 toRecipient = msg.value.mul(20).div(100); uint256 toUniswap = msg.value.sub(toRecipient); return (toRecipient, toUniswap); } function _calculateRefAndUserAmountsToMint(uint256 amount) private pure returns (uint256, uint256) { uint256 toRefMintAmount = amount.mul(20).div(100); uint256 toUserMintAmount = amount.mul(10).div(100); return (toRefMintAmount, toUserMintAmount); } function _swapEth(uint256 amount, uint256 deadline) private { address[] memory path = new address[](2); path[0] = IUniswapV2Router02(uniswap).WETH(); path[1] = mainToken; IUniswapV2Router02(uniswap).swapExactETHForTokens{value: amount}( 0, path, staking, deadline ); } function _saveAuctionData() internal { uint256 stepsFromStart = calculateStepsFromStart(); AuctionReserves memory reserves = reservesOf[stepsFromStart]; if (lastAuctionEventId < stepsFromStart) { emit AuctionIsOver(reserves.eth, reserves.token, stepsFromStart); lastAuctionEventId = stepsFromStart; } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; interface IAuction { function callIncomeDailyTokensTrigger(uint256 amount) external; function callIncomeWeeklyTokensTrigger(uint256 amount) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; interface IStaking { function externalStake( uint256 amount, uint256 stakingDays, address staker ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; interface IToken { function mint(address to, uint256 amount) external; function burn(address from, uint256 amount) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.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; import "../utils/EnumerableSet.sol"; import "../utils/Address.sol"; import "../GSN/Context.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context { using EnumerableSet for EnumerableSet.AddressSet; using Address for address; struct RoleData { EnumerableSet.AddressSet members; bytes32 adminRole; } mapping (bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view returns (bool) { return _roles[role].members.contains(account); } /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) public view returns (uint256) { return _roles[role].members.length(); } /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) public view returns (address) { return _roles[role].members.at(index); } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) public virtual { require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to grant"); _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) public virtual { require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to revoke"); _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) public virtual { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { emit RoleAdminChanged(role, _roles[role].adminRole, adminRole); _roles[role].adminRole = adminRole; } function _grantRole(bytes32 role, address account) private { if (_roles[role].members.add(account)) { emit RoleGranted(role, account, _msgSender()); } } function _revokeRole(bytes32 role, address account) private { if (_roles[role].members.remove(account)) { emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.2; /** * @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 in 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"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); 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; /** * @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.0.0, only sets of type `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]; } // 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)); } }
pragma solidity >=0.6.2; interface IUniswapV2Router01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); }
pragma solidity >=0.6.2; import './IUniswapV2Router01.sol'; interface IUniswapV2Router02 is IUniswapV2Router01 { function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 0 }, "evmVersion": "istanbul", "libraries": { "": {} }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"eth","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"token","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"auctionId","type":"uint256"}],"name":"AuctionIsOver","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"auctionId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"time","type":"uint256"}],"name":"Bet","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":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"auctionId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"time","type":"uint256"}],"name":"Withdraval","type":"event"},{"inputs":[],"name":"CALLER_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":"MANAGER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"auctionBetOf","outputs":[{"internalType":"uint256","name":"eth","type":"uint256"},{"internalType":"address","name":"ref","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"auctionsOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"auctionsOf_","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"address","name":"ref","type":"address"}],"name":"bet","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"calculateNearestWeeklyAuction","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"calculateStepsFromStart","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"callIncomeDailyTokensTrigger","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"callIncomeWeeklyTokensTrigger","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"existAuctionsOf","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"getUniswapLastPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getUniswapMiddlePriceForSevenDays","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_stepTimestamp","type":"uint256"},{"internalType":"address","name":"_manager","type":"address"},{"internalType":"address","name":"_mainToken","type":"address"},{"internalType":"address","name":"_staking","type":"address"},{"internalType":"address payable","name":"_uniswap","type":"address"},{"internalType":"address payable","name":"_recipient","type":"address"},{"internalType":"address","name":"_nativeSwap","type":"address"},{"internalType":"address","name":"_foreignSwap","type":"address"},{"internalType":"address","name":"_subbalances","type":"address"}],"name":"init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"init_","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastAuctionEventId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mainToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"recipient","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"reservesOf","outputs":[{"internalType":"uint256","name":"eth","type":"uint256"},{"internalType":"uint256","name":"token","type":"uint256"},{"internalType":"uint256","name":"uniswapLastPrice","type":"uint256"},{"internalType":"uint256","name":"uniswapMiddlePrice","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"percent","type":"uint256"}],"name":"setUniswapPercent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"staking","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"start","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stepTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"uniswap","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"uniswapPercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"auctionId","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50600c805460ff60a01b1916905561250d8061002d6000396000f3fe6080604052600436106101895760003560e01c8063248a9ca31461018e5780632681f7e4146101ca5780632e1a7d4d146101fb5780632f2ff15d1461022757806336568abe146102605780633fc15f15146102995780634bc2e48d146102ae5780634cf088d9146102c3578063586f7c3a146102d85780635ae6ea70146102ed5780635f9406b4146103705780635f9b71ce146103ca57806366d003ac146103f65780637492ec691461040b57806375954a951461045b578063774237fc146104705780638501313f146104855780639010d07c146104be57806391d14854146104ee578063982e52fb1461053b5780639d8cd33714610550578063a217fddf14610565578063a2e6f9bf1461057a578063be9a65551461058f578063c1c93a73146105a4578063c22fd76f146105b9578063ca15c873146105e3578063ccbbc9b31461060d578063cd7c141c14610646578063d4b22c0a14610670578063d547741f14610685578063d7e6bef8146106be578063ec87621c146106e8578063fba6fc98146106fd575b600080fd5b34801561019a57600080fd5b506101b8600480360360208110156101b157600080fd5b5035610770565b60408051918252519081900360200190f35b3480156101d657600080fd5b506101df610785565b604080516001600160a01b039092168252519081900360200190f35b34801561020757600080fd5b506102256004803603602081101561021e57600080fd5b5035610794565b005b34801561023357600080fd5b506102256004803603604081101561024a57600080fd5b50803590602001356001600160a01b0316610c95565b34801561026c57600080fd5b506102256004803603604081101561028357600080fd5b50803590602001356001600160a01b0316610d01565b3480156102a557600080fd5b506101df610d62565b3480156102ba57600080fd5b506101b8610d71565b3480156102cf57600080fd5b506101df610da0565b3480156102e457600080fd5b506101b8610daf565b3480156102f957600080fd5b506103206004803603602081101561031057600080fd5b50356001600160a01b0316610df4565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561035c578181015183820152602001610344565b505050509050019250505060405180910390f35b34801561037c57600080fd5b506103a96004803603604081101561039357600080fd5b50803590602001356001600160a01b0316610e60565b604080519283526001600160a01b0390911660208301528051918290030190f35b610225600480360360408110156103e057600080fd5b50803590602001356001600160a01b0316610e8d565b34801561040257600080fd5b506101df61115f565b34801561041757600080fd5b506104356004803603602081101561042e57600080fd5b503561116e565b604080519485526020850193909352838301919091526060830152519081900360800190f35b34801561046757600080fd5b506101b8611196565b34801561047c57600080fd5b506101b861119c565b34801561049157600080fd5b506101b8600480360360408110156104a857600080fd5b506001600160a01b0381351690602001356111bf565b3480156104ca57600080fd5b506101df600480360360408110156104e157600080fd5b50803590602001356111ed565b3480156104fa57600080fd5b506105276004803603604081101561051157600080fd5b50803590602001356001600160a01b0316611214565b604080519115158252519081900360200190f35b34801561054757600080fd5b50610527611232565b34801561055c57600080fd5b506101b8611242565b34801561057157600080fd5b506101b8611248565b34801561058657600080fd5b506101b861124d565b34801561059b57600080fd5b506101b8611253565b3480156105b057600080fd5b506101b8611259565b3480156105c557600080fd5b50610225600480360360208110156105dc57600080fd5b50356114b7565b3480156105ef57600080fd5b506101b86004803603602081101561060657600080fd5b5035611580565b34801561061957600080fd5b506105276004803603604081101561063057600080fd5b50803590602001356001600160a01b0316611597565b34801561065257600080fd5b506102256004803603602081101561066957600080fd5b50356115b7565b34801561067c57600080fd5b506101b861166a565b34801561069157600080fd5b50610225600480360360408110156106a857600080fd5b50803590602001356001600160a01b031661171e565b3480156106ca57600080fd5b50610225600480360360208110156106e157600080fd5b5035611777565b3480156106f457600080fd5b506101b86117e8565b34801561070957600080fd5b50610225600480360361012081101561072157600080fd5b508035906001600160a01b03602082013581169160408101358216916060820135811691608081013582169160a082013581169160c081013582169160e082013581169161010001351661180c565b60009081526020819052604090206002015490565b600b546001600160a01b031681565b61079c6119a0565b6107a4611a4c565b60006107ae610d71565b90508181116107f8576040805162461bcd60e51b815260206004820152601160248201527061756374696f6e2069732061637469766560781b604482015290519081900360640190fd5b60008281526003602052604081208161080f611a8f565b6001600160a01b03166001600160a01b031681526020019081526020016000206000015490506000600360008581526020019081526020016000206000610854611a8f565b6001600160a01b03168152602081019190915260400160002055806108ba576040805162461bcd60e51b81526020600482015260176024820152763d32b937903130b630b731b29034b71030bab1ba34b7b760491b604482015290519081900360640190fd5b60006108c68483611a93565b905060006108d5858484611abe565b9050808211156109365760006108e9610daf565b905061091d6108fe848463ffffffff611b3e16565b600083815260016020819052604090912001549063ffffffff611b8016565b6000918252600160208190526040909220909101559050805b60008581526003602052604081208161094d611a8f565b6001600160a01b039081168252602082019290925260400160002060010154161415610a975760095460408051632770a7eb60e21b81523060048201526024810185905290516001600160a01b0390921691639dc29fac9160448082019260009290919082900301818387803b1580156109c657600080fd5b505af11580156109da573d6000803e3d6000fd5b5050600a546001600160a01b03169150631f5a56a8905083600e6109fc611a8f565b6040518463ffffffff1660e01b815260040180848152602001838152602001826001600160a01b03166001600160a01b031681526020019350505050600060405180830381600087803b158015610a5257600080fd5b505af1158015610a66573d6000803e3d6000fd5b50506040805185815290514293508792503391600080516020612489833981519152919081900360200190a4610c8e565b60095460408051632770a7eb60e21b81523060048201526024810185905290516001600160a01b0390921691639dc29fac9160448082019260009290919082900301818387803b158015610aea57600080fd5b505af1158015610afe573d6000803e3d6000fd5b50505050600080610b0e84611bd8565b9092509050610b23848263ffffffff611b8016565b600a549094506001600160a01b0316631f5a56a885600e610b42611a8f565b6040518463ffffffff1660e01b815260040180848152602001838152602001826001600160a01b03166001600160a01b031681526020019350505050600060405180830381600087803b158015610b9857600080fd5b505af1158015610bac573d6000803e3d6000fd5b50506040805187815290514293508992503391600080516020612489833981519152919081900360200190a4600a5460008881526003602052604081206001600160a01b0390921691631f5a56a8918591600e91610c08611a8f565b6001600160a01b0390811682526020820192909252604090810160009081206001015482516001600160e01b031960e089901b168152600481019690965260248601949094529290911660448401525160648084019382900301818387803b158015610c7357600080fd5b505af1158015610c87573d6000803e3d6000fd5b5050505050505b5050505050565b600082815260208190526040902060020154610cb890610cb3611a8f565b611214565b610cf35760405162461bcd60e51b815260040180806020018281038252602f8152602001806123e9602f913960400191505060405180910390fd5b610cfd8282611c18565b5050565b610d09611a8f565b6001600160a01b0316816001600160a01b031614610d585760405162461bcd60e51b815260040180806020018281038252602f8152602001806124a9602f913960400191505060405180910390fd5b610cfd8282611c87565b6009546001600160a01b031681565b6000610d9a600754610d8e60065442611b3e90919063ffffffff16565b9063ffffffff611cf616565b90505b90565b600a546001600160a01b031681565b600080610dba610d71565b9050610dee610de1610dd383600763ffffffff611d3516565b60079063ffffffff611b3e16565b829063ffffffff611b8016565b91505090565b6001600160a01b038116600090815260026020908152604091829020805483518184028101840190945280845260609392830182828015610e5457602002820191906000526020600020905b815481526020019060010190808311610e40575b50505050509050919050565b6003602090815260009283526040808420909152908252902080546001909101546001600160a01b031682565b610e956119a0565b610e9d611a4c565b806001600160a01b0316610eaf611a8f565b6001600160a01b03161415610eff576040805162461bcd60e51b815260206004820152601160248201527036b9b39739b2b73232b9101e9e903932b360791b604482015290519081900360640190fd5b600080610f0a611d72565b91509150610f188185611dab565b6000610f22610d71565b6000818152600360205260408120919250859190610f3e611a8f565b6001600160a01b03166001600160a01b0316815260200190815260200160002060010160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550610fcc34600360008481526020019081526020016000206000610fa6611a8f565b6001600160a01b031681526020810191909152604001600020549063ffffffff611b8016565b600082815260036020526040812090610fe3611a8f565b6001600160a01b0316815260208082019290925260409081016000908120939093558383526004909152812090611018611a8f565b6001600160a01b0316815260208101919091526040016000205460ff166110b35760026000611045611a8f565b6001600160a01b03168152602080820192909252604090810160009081208054600181810183559183528483200185905584825260049093529081209061108a611a8f565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790555b6000818152600160205260409020546110d2903463ffffffff611b8016565b60008281526001602052604080822092909255600c5491516001600160a01b039092169185156108fc0291869190818181858888f1935050505015801561111d573d6000803e3d6000fd5b506040805134815290514291839133917f97371a3349bea11f577edf6e64350a3dfb9de665d1154c7e6d08eb0805aa0430919081900360200190a45050505050565b600c546001600160a01b031681565b6001602081905260009182526040909120805491810154600282015460039092015490919084565b60085481565b604080516a43414c4c45525f524f4c4560a81b8152905190819003600b01902081565b600260205281600052604060002081815481106111d857fe5b90600052602060002001600091509150505481565b600082815260208190526040812061120b908363ffffffff61200116565b90505b92915050565b600082815260208190526040812061120b908363ffffffff61200d16565b600c54600160a01b900460ff1681565b60055481565b600081565b60075481565b60065481565b60408051600280825260608083018452600093909291906020830190803683375050600b54604080516315ab88c960e31b815290519394506001600160a01b039091169263ad5c464892506004808301926020929190829003018186803b1580156112c357600080fd5b505afa1580156112d7573d6000803e3d6000fd5b505050506040513d60208110156112ed57600080fd5b5051815182906000906112fc57fe5b6001600160a01b03928316602091820292909201015260095482519116908290600190811061132757fe5b6001600160a01b03928316602091820292909201810191909152600b546040805163d06ca61f60e01b8152670de0b6b3a76400006004820181815260248301938452875160448401528751600097959095169563d06ca61f9592948994929390926064019185810191028083838c5b838110156113ae578181015183820152602001611396565b50505050905001935050505060006040518083038186803b1580156113d257600080fd5b505afa1580156113e6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561140f57600080fd5b8101908080516040519392919084600160201b82111561142e57600080fd5b90830190602082018581111561144357600080fd5b82518660208202830111600160201b8211171561145f57600080fd5b82525081516020918201928201910280838360005b8381101561148c578181015183820152602001611474565b505050509050016040525050506001815181106114a557fe5b60200260200101519050809250505090565b604080516a43414c4c45525f524f4c4560a81b8152905190819003600b0190206114e390610cb3611a8f565b611522576040805162461bcd60e51b815260206004820152601b6024820152600080516020612418833981519152604482015290519081900360640190fd5b600061152c610d71565b9050600061154182600163ffffffff611b8016565b60008181526001602081905260409091200154909150611567908463ffffffff611b8016565b6000918252600160208190526040909220909101555050565b600081815260208190526040812061120e90612022565b600460209081526000928352604080842090915290825290205460ff1681565b604080516a43414c4c45525f524f4c4560a81b8152905190819003600b0190206115e390610cb3611a8f565b611622576040805162461bcd60e51b815260206004820152601b6024820152600080516020612418833981519152604482015290519081900360640190fd5b600061162c610daf565b60008181526001602081905260409091200154909150611652908363ffffffff611b8016565b60009182526001602081905260409092209091015550565b600080611675610d71565b9050806000805b806007146116f657600083815260016020526040902060020154156116d4576000838152600160205260409020600201546116be90839063ffffffff611b8016565b91506116d181600163ffffffff611b8016565b90505b826116de576116f6565b6116ef83600163ffffffff611b3e16565b925061167c565b8161170e57611703611259565b945050505050610d9d565b611703828263ffffffff611cf616565b60008281526020819052604090206002015461173c90610cb3611a8f565b610d585760405162461bcd60e51b81526004018080602001828103825260308152602001806124386030913960400191505060405180910390fd5b604080516b4d414e414745525f524f4c4560a01b8152905190819003600c0190206117a490610cb3611a8f565b6117e3576040805162461bcd60e51b815260206004820152601b6024820152600080516020612418833981519152604482015290519081900360640190fd5b600855565b604080516b4d414e414745525f524f4c4560a01b8152905190819003600c01902081565b600c54600160a01b900460ff161561185c576040805162461bcd60e51b815260206004820152600e60248201526d696e69742069732061637469766560901b604482015290519081900360640190fd5b604080516b4d414e414745525f524f4c4560a01b8152905190819003600c0190206118879089610cf3565b604080516a43414c4c45525f524f4c4560a81b8152905190819003600b0190206118b19084610cf3565b604080516a43414c4c45525f524f4c4560a81b8152905190819003600b0190206118db9083610cf3565b604080516a43414c4c45525f524f4c4560a81b8152905190819003600b0190206119059087610cf3565b604080516a43414c4c45525f524f4c4560a81b8152905190819003600b01902061192f9082610cf3565b505042600655506007959095556014600855600980546001600160a01b03199081166001600160a01b0395861617909155600a8054821693851693909317909255600b80548316918416919091179055600c8054600160a01b9216929094169190911760ff60a01b19161790915550565b60006119aa610d71565b90506119b461239e565b600160008381526020019081526020016000206040518060800160405290816000820154815260200160018201548152602001600282015481526020016003820154815250509050816005541015610cfd5780516020808301516040805193845291830152805184927fffb09ad5e94e90b2d6b7665b8971615b9cc37b1aa053b4e6d3bf02ffcda1449d92908290030190a250600555565b6000611a56610d71565b9050611a60611259565b600082815260016020526040902060020155611a7a61166a565b60009182526001602052604090912060030155565b3390565b60008281526001602081905260408220805491015461120b9190610d8e90859063ffffffff61202d16565b6000838152600160205260408120600301548190611af090670de0b6b3a764000090610d8e908763ffffffff61202d16565b90506000611b1e611b116064610d8e6008548661202d90919063ffffffff16565b839063ffffffff611b8016565b905080841115611b31579150611b379050565b83925050505b9392505050565b600061120b83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612086565b60008282018381101561120b576040805162461bcd60e51b815260206004820152601b60248201527a536166654d6174683a206164646974696f6e206f766572666c6f7760281b604482015290519081900360640190fd5b60008080611bf26064610d8e86601463ffffffff61202d16565b90506000611c0c6064610d8e87600a63ffffffff61202d16565b91935090915050915091565b6000828152602081905260409020611c36908263ffffffff61211d16565b15610cfd57611c43611a8f565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081905260409020611ca5908263ffffffff61213216565b15610cfd57611cb2611a8f565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b600061120b83836040518060400160405280601a815260200179536166654d6174683a206469766973696f6e206279207a65726f60301b815250612147565b600061120b838360405180604001604052806018815260200177536166654d6174683a206d6f64756c6f206279207a65726f60401b8152506121ac565b60008080611d8c6064610d8e34601463ffffffff61202d16565b90506000611da0348363ffffffff611b3e16565b919350909150509091565b60408051600280825260608083018452926020830190803683375050600b54604080516315ab88c960e31b815290519394506001600160a01b039091169263ad5c464892506004808301926020929190829003018186803b158015611e0f57600080fd5b505afa158015611e23573d6000803e3d6000fd5b505050506040513d6020811015611e3957600080fd5b505181518290600090611e4857fe5b6001600160a01b039283166020918202929092010152600954825191169082906001908110611e7357fe5b6001600160a01b03928316602091820292909201810191909152600b54600a54604051637ff36ab560e01b815260006004820181815292861660448301819052606483018990526080602484019081528851608485015288519590971696637ff36ab5968b9693958a9593948c9491939260a49092019187810191028083838b5b83811015611f0c578181015183820152602001611ef4565b50505050905001955050505050506000604051808303818588803b158015611f3357600080fd5b505af1158015611f47573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f191682016040526020811015611f7157600080fd5b8101908080516040519392919084600160201b821115611f9057600080fd5b908301906020820185811115611fa557600080fd5b82518660208202830111600160201b82111715611fc157600080fd5b82525081516020918201928201910280838360005b83811015611fee578181015183820152602001611fd6565b5050505090500160405250505050505050565b600061120b838361220e565b600061120b836001600160a01b038416612272565b600061120e8261228a565b60008261203c5750600061120e565b8282028284828161204957fe5b041461120b5760405162461bcd60e51b81526004018080602001828103825260218152602001806124686021913960400191505060405180910390fd5b600081848411156121155760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156120da5781810151838201526020016120c2565b50505050905090810190601f1680156121075780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600061120b836001600160a01b03841661228e565b600061120b836001600160a01b0384166122d8565b600081836121965760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156120da5781810151838201526020016120c2565b5060008385816121a257fe5b0495945050505050565b600081836121fb5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156120da5781810151838201526020016120c2565b5082848161220557fe5b06949350505050565b815460009082106122505760405162461bcd60e51b81526004018080602001828103825260228152602001806123c76022913960400191505060405180910390fd5b82600001828154811061225f57fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b600061229a8383612272565b6122d05750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561120e565b50600061120e565b60008181526001830160205260408120548015612394578354600019808301919081019060009087908390811061230b57fe5b906000526020600020015490508087600001848154811061232857fe5b60009182526020808320909101929092558281526001898101909252604090209084019055865487908061235857fe5b6001900381819060005260206000200160009055905586600101600087815260200190815260200160002060009055600194505050505061120e565b600091505061120e565b604051806080016040528060008152602001600081526020016000815260200160008152509056fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e7443616c6c6572206973206e6f7420612063616c6c657220726f6c650000000000416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77f2b908368f09f0315cc777a5e0b356c3524778809e0f218bd7e7fe86752bd262416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220e48d70f338cecd766e93fe3f56fbdb1fac89cd71894f28259f3e46131c64ebe164736f6c63430006060033
Deployed Bytecode
0x6080604052600436106101895760003560e01c8063248a9ca31461018e5780632681f7e4146101ca5780632e1a7d4d146101fb5780632f2ff15d1461022757806336568abe146102605780633fc15f15146102995780634bc2e48d146102ae5780634cf088d9146102c3578063586f7c3a146102d85780635ae6ea70146102ed5780635f9406b4146103705780635f9b71ce146103ca57806366d003ac146103f65780637492ec691461040b57806375954a951461045b578063774237fc146104705780638501313f146104855780639010d07c146104be57806391d14854146104ee578063982e52fb1461053b5780639d8cd33714610550578063a217fddf14610565578063a2e6f9bf1461057a578063be9a65551461058f578063c1c93a73146105a4578063c22fd76f146105b9578063ca15c873146105e3578063ccbbc9b31461060d578063cd7c141c14610646578063d4b22c0a14610670578063d547741f14610685578063d7e6bef8146106be578063ec87621c146106e8578063fba6fc98146106fd575b600080fd5b34801561019a57600080fd5b506101b8600480360360208110156101b157600080fd5b5035610770565b60408051918252519081900360200190f35b3480156101d657600080fd5b506101df610785565b604080516001600160a01b039092168252519081900360200190f35b34801561020757600080fd5b506102256004803603602081101561021e57600080fd5b5035610794565b005b34801561023357600080fd5b506102256004803603604081101561024a57600080fd5b50803590602001356001600160a01b0316610c95565b34801561026c57600080fd5b506102256004803603604081101561028357600080fd5b50803590602001356001600160a01b0316610d01565b3480156102a557600080fd5b506101df610d62565b3480156102ba57600080fd5b506101b8610d71565b3480156102cf57600080fd5b506101df610da0565b3480156102e457600080fd5b506101b8610daf565b3480156102f957600080fd5b506103206004803603602081101561031057600080fd5b50356001600160a01b0316610df4565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561035c578181015183820152602001610344565b505050509050019250505060405180910390f35b34801561037c57600080fd5b506103a96004803603604081101561039357600080fd5b50803590602001356001600160a01b0316610e60565b604080519283526001600160a01b0390911660208301528051918290030190f35b610225600480360360408110156103e057600080fd5b50803590602001356001600160a01b0316610e8d565b34801561040257600080fd5b506101df61115f565b34801561041757600080fd5b506104356004803603602081101561042e57600080fd5b503561116e565b604080519485526020850193909352838301919091526060830152519081900360800190f35b34801561046757600080fd5b506101b8611196565b34801561047c57600080fd5b506101b861119c565b34801561049157600080fd5b506101b8600480360360408110156104a857600080fd5b506001600160a01b0381351690602001356111bf565b3480156104ca57600080fd5b506101df600480360360408110156104e157600080fd5b50803590602001356111ed565b3480156104fa57600080fd5b506105276004803603604081101561051157600080fd5b50803590602001356001600160a01b0316611214565b604080519115158252519081900360200190f35b34801561054757600080fd5b50610527611232565b34801561055c57600080fd5b506101b8611242565b34801561057157600080fd5b506101b8611248565b34801561058657600080fd5b506101b861124d565b34801561059b57600080fd5b506101b8611253565b3480156105b057600080fd5b506101b8611259565b3480156105c557600080fd5b50610225600480360360208110156105dc57600080fd5b50356114b7565b3480156105ef57600080fd5b506101b86004803603602081101561060657600080fd5b5035611580565b34801561061957600080fd5b506105276004803603604081101561063057600080fd5b50803590602001356001600160a01b0316611597565b34801561065257600080fd5b506102256004803603602081101561066957600080fd5b50356115b7565b34801561067c57600080fd5b506101b861166a565b34801561069157600080fd5b50610225600480360360408110156106a857600080fd5b50803590602001356001600160a01b031661171e565b3480156106ca57600080fd5b50610225600480360360208110156106e157600080fd5b5035611777565b3480156106f457600080fd5b506101b86117e8565b34801561070957600080fd5b50610225600480360361012081101561072157600080fd5b508035906001600160a01b03602082013581169160408101358216916060820135811691608081013582169160a082013581169160c081013582169160e082013581169161010001351661180c565b60009081526020819052604090206002015490565b600b546001600160a01b031681565b61079c6119a0565b6107a4611a4c565b60006107ae610d71565b90508181116107f8576040805162461bcd60e51b815260206004820152601160248201527061756374696f6e2069732061637469766560781b604482015290519081900360640190fd5b60008281526003602052604081208161080f611a8f565b6001600160a01b03166001600160a01b031681526020019081526020016000206000015490506000600360008581526020019081526020016000206000610854611a8f565b6001600160a01b03168152602081019190915260400160002055806108ba576040805162461bcd60e51b81526020600482015260176024820152763d32b937903130b630b731b29034b71030bab1ba34b7b760491b604482015290519081900360640190fd5b60006108c68483611a93565b905060006108d5858484611abe565b9050808211156109365760006108e9610daf565b905061091d6108fe848463ffffffff611b3e16565b600083815260016020819052604090912001549063ffffffff611b8016565b6000918252600160208190526040909220909101559050805b60008581526003602052604081208161094d611a8f565b6001600160a01b039081168252602082019290925260400160002060010154161415610a975760095460408051632770a7eb60e21b81523060048201526024810185905290516001600160a01b0390921691639dc29fac9160448082019260009290919082900301818387803b1580156109c657600080fd5b505af11580156109da573d6000803e3d6000fd5b5050600a546001600160a01b03169150631f5a56a8905083600e6109fc611a8f565b6040518463ffffffff1660e01b815260040180848152602001838152602001826001600160a01b03166001600160a01b031681526020019350505050600060405180830381600087803b158015610a5257600080fd5b505af1158015610a66573d6000803e3d6000fd5b50506040805185815290514293508792503391600080516020612489833981519152919081900360200190a4610c8e565b60095460408051632770a7eb60e21b81523060048201526024810185905290516001600160a01b0390921691639dc29fac9160448082019260009290919082900301818387803b158015610aea57600080fd5b505af1158015610afe573d6000803e3d6000fd5b50505050600080610b0e84611bd8565b9092509050610b23848263ffffffff611b8016565b600a549094506001600160a01b0316631f5a56a885600e610b42611a8f565b6040518463ffffffff1660e01b815260040180848152602001838152602001826001600160a01b03166001600160a01b031681526020019350505050600060405180830381600087803b158015610b9857600080fd5b505af1158015610bac573d6000803e3d6000fd5b50506040805187815290514293508992503391600080516020612489833981519152919081900360200190a4600a5460008881526003602052604081206001600160a01b0390921691631f5a56a8918591600e91610c08611a8f565b6001600160a01b0390811682526020820192909252604090810160009081206001015482516001600160e01b031960e089901b168152600481019690965260248601949094529290911660448401525160648084019382900301818387803b158015610c7357600080fd5b505af1158015610c87573d6000803e3d6000fd5b5050505050505b5050505050565b600082815260208190526040902060020154610cb890610cb3611a8f565b611214565b610cf35760405162461bcd60e51b815260040180806020018281038252602f8152602001806123e9602f913960400191505060405180910390fd5b610cfd8282611c18565b5050565b610d09611a8f565b6001600160a01b0316816001600160a01b031614610d585760405162461bcd60e51b815260040180806020018281038252602f8152602001806124a9602f913960400191505060405180910390fd5b610cfd8282611c87565b6009546001600160a01b031681565b6000610d9a600754610d8e60065442611b3e90919063ffffffff16565b9063ffffffff611cf616565b90505b90565b600a546001600160a01b031681565b600080610dba610d71565b9050610dee610de1610dd383600763ffffffff611d3516565b60079063ffffffff611b3e16565b829063ffffffff611b8016565b91505090565b6001600160a01b038116600090815260026020908152604091829020805483518184028101840190945280845260609392830182828015610e5457602002820191906000526020600020905b815481526020019060010190808311610e40575b50505050509050919050565b6003602090815260009283526040808420909152908252902080546001909101546001600160a01b031682565b610e956119a0565b610e9d611a4c565b806001600160a01b0316610eaf611a8f565b6001600160a01b03161415610eff576040805162461bcd60e51b815260206004820152601160248201527036b9b39739b2b73232b9101e9e903932b360791b604482015290519081900360640190fd5b600080610f0a611d72565b91509150610f188185611dab565b6000610f22610d71565b6000818152600360205260408120919250859190610f3e611a8f565b6001600160a01b03166001600160a01b0316815260200190815260200160002060010160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550610fcc34600360008481526020019081526020016000206000610fa6611a8f565b6001600160a01b031681526020810191909152604001600020549063ffffffff611b8016565b600082815260036020526040812090610fe3611a8f565b6001600160a01b0316815260208082019290925260409081016000908120939093558383526004909152812090611018611a8f565b6001600160a01b0316815260208101919091526040016000205460ff166110b35760026000611045611a8f565b6001600160a01b03168152602080820192909252604090810160009081208054600181810183559183528483200185905584825260049093529081209061108a611a8f565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790555b6000818152600160205260409020546110d2903463ffffffff611b8016565b60008281526001602052604080822092909255600c5491516001600160a01b039092169185156108fc0291869190818181858888f1935050505015801561111d573d6000803e3d6000fd5b506040805134815290514291839133917f97371a3349bea11f577edf6e64350a3dfb9de665d1154c7e6d08eb0805aa0430919081900360200190a45050505050565b600c546001600160a01b031681565b6001602081905260009182526040909120805491810154600282015460039092015490919084565b60085481565b604080516a43414c4c45525f524f4c4560a81b8152905190819003600b01902081565b600260205281600052604060002081815481106111d857fe5b90600052602060002001600091509150505481565b600082815260208190526040812061120b908363ffffffff61200116565b90505b92915050565b600082815260208190526040812061120b908363ffffffff61200d16565b600c54600160a01b900460ff1681565b60055481565b600081565b60075481565b60065481565b60408051600280825260608083018452600093909291906020830190803683375050600b54604080516315ab88c960e31b815290519394506001600160a01b039091169263ad5c464892506004808301926020929190829003018186803b1580156112c357600080fd5b505afa1580156112d7573d6000803e3d6000fd5b505050506040513d60208110156112ed57600080fd5b5051815182906000906112fc57fe5b6001600160a01b03928316602091820292909201015260095482519116908290600190811061132757fe5b6001600160a01b03928316602091820292909201810191909152600b546040805163d06ca61f60e01b8152670de0b6b3a76400006004820181815260248301938452875160448401528751600097959095169563d06ca61f9592948994929390926064019185810191028083838c5b838110156113ae578181015183820152602001611396565b50505050905001935050505060006040518083038186803b1580156113d257600080fd5b505afa1580156113e6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561140f57600080fd5b8101908080516040519392919084600160201b82111561142e57600080fd5b90830190602082018581111561144357600080fd5b82518660208202830111600160201b8211171561145f57600080fd5b82525081516020918201928201910280838360005b8381101561148c578181015183820152602001611474565b505050509050016040525050506001815181106114a557fe5b60200260200101519050809250505090565b604080516a43414c4c45525f524f4c4560a81b8152905190819003600b0190206114e390610cb3611a8f565b611522576040805162461bcd60e51b815260206004820152601b6024820152600080516020612418833981519152604482015290519081900360640190fd5b600061152c610d71565b9050600061154182600163ffffffff611b8016565b60008181526001602081905260409091200154909150611567908463ffffffff611b8016565b6000918252600160208190526040909220909101555050565b600081815260208190526040812061120e90612022565b600460209081526000928352604080842090915290825290205460ff1681565b604080516a43414c4c45525f524f4c4560a81b8152905190819003600b0190206115e390610cb3611a8f565b611622576040805162461bcd60e51b815260206004820152601b6024820152600080516020612418833981519152604482015290519081900360640190fd5b600061162c610daf565b60008181526001602081905260409091200154909150611652908363ffffffff611b8016565b60009182526001602081905260409092209091015550565b600080611675610d71565b9050806000805b806007146116f657600083815260016020526040902060020154156116d4576000838152600160205260409020600201546116be90839063ffffffff611b8016565b91506116d181600163ffffffff611b8016565b90505b826116de576116f6565b6116ef83600163ffffffff611b3e16565b925061167c565b8161170e57611703611259565b945050505050610d9d565b611703828263ffffffff611cf616565b60008281526020819052604090206002015461173c90610cb3611a8f565b610d585760405162461bcd60e51b81526004018080602001828103825260308152602001806124386030913960400191505060405180910390fd5b604080516b4d414e414745525f524f4c4560a01b8152905190819003600c0190206117a490610cb3611a8f565b6117e3576040805162461bcd60e51b815260206004820152601b6024820152600080516020612418833981519152604482015290519081900360640190fd5b600855565b604080516b4d414e414745525f524f4c4560a01b8152905190819003600c01902081565b600c54600160a01b900460ff161561185c576040805162461bcd60e51b815260206004820152600e60248201526d696e69742069732061637469766560901b604482015290519081900360640190fd5b604080516b4d414e414745525f524f4c4560a01b8152905190819003600c0190206118879089610cf3565b604080516a43414c4c45525f524f4c4560a81b8152905190819003600b0190206118b19084610cf3565b604080516a43414c4c45525f524f4c4560a81b8152905190819003600b0190206118db9083610cf3565b604080516a43414c4c45525f524f4c4560a81b8152905190819003600b0190206119059087610cf3565b604080516a43414c4c45525f524f4c4560a81b8152905190819003600b01902061192f9082610cf3565b505042600655506007959095556014600855600980546001600160a01b03199081166001600160a01b0395861617909155600a8054821693851693909317909255600b80548316918416919091179055600c8054600160a01b9216929094169190911760ff60a01b19161790915550565b60006119aa610d71565b90506119b461239e565b600160008381526020019081526020016000206040518060800160405290816000820154815260200160018201548152602001600282015481526020016003820154815250509050816005541015610cfd5780516020808301516040805193845291830152805184927fffb09ad5e94e90b2d6b7665b8971615b9cc37b1aa053b4e6d3bf02ffcda1449d92908290030190a250600555565b6000611a56610d71565b9050611a60611259565b600082815260016020526040902060020155611a7a61166a565b60009182526001602052604090912060030155565b3390565b60008281526001602081905260408220805491015461120b9190610d8e90859063ffffffff61202d16565b6000838152600160205260408120600301548190611af090670de0b6b3a764000090610d8e908763ffffffff61202d16565b90506000611b1e611b116064610d8e6008548661202d90919063ffffffff16565b839063ffffffff611b8016565b905080841115611b31579150611b379050565b83925050505b9392505050565b600061120b83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612086565b60008282018381101561120b576040805162461bcd60e51b815260206004820152601b60248201527a536166654d6174683a206164646974696f6e206f766572666c6f7760281b604482015290519081900360640190fd5b60008080611bf26064610d8e86601463ffffffff61202d16565b90506000611c0c6064610d8e87600a63ffffffff61202d16565b91935090915050915091565b6000828152602081905260409020611c36908263ffffffff61211d16565b15610cfd57611c43611a8f565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081905260409020611ca5908263ffffffff61213216565b15610cfd57611cb2611a8f565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b600061120b83836040518060400160405280601a815260200179536166654d6174683a206469766973696f6e206279207a65726f60301b815250612147565b600061120b838360405180604001604052806018815260200177536166654d6174683a206d6f64756c6f206279207a65726f60401b8152506121ac565b60008080611d8c6064610d8e34601463ffffffff61202d16565b90506000611da0348363ffffffff611b3e16565b919350909150509091565b60408051600280825260608083018452926020830190803683375050600b54604080516315ab88c960e31b815290519394506001600160a01b039091169263ad5c464892506004808301926020929190829003018186803b158015611e0f57600080fd5b505afa158015611e23573d6000803e3d6000fd5b505050506040513d6020811015611e3957600080fd5b505181518290600090611e4857fe5b6001600160a01b039283166020918202929092010152600954825191169082906001908110611e7357fe5b6001600160a01b03928316602091820292909201810191909152600b54600a54604051637ff36ab560e01b815260006004820181815292861660448301819052606483018990526080602484019081528851608485015288519590971696637ff36ab5968b9693958a9593948c9491939260a49092019187810191028083838b5b83811015611f0c578181015183820152602001611ef4565b50505050905001955050505050506000604051808303818588803b158015611f3357600080fd5b505af1158015611f47573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f191682016040526020811015611f7157600080fd5b8101908080516040519392919084600160201b821115611f9057600080fd5b908301906020820185811115611fa557600080fd5b82518660208202830111600160201b82111715611fc157600080fd5b82525081516020918201928201910280838360005b83811015611fee578181015183820152602001611fd6565b5050505090500160405250505050505050565b600061120b838361220e565b600061120b836001600160a01b038416612272565b600061120e8261228a565b60008261203c5750600061120e565b8282028284828161204957fe5b041461120b5760405162461bcd60e51b81526004018080602001828103825260218152602001806124686021913960400191505060405180910390fd5b600081848411156121155760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156120da5781810151838201526020016120c2565b50505050905090810190601f1680156121075780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600061120b836001600160a01b03841661228e565b600061120b836001600160a01b0384166122d8565b600081836121965760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156120da5781810151838201526020016120c2565b5060008385816121a257fe5b0495945050505050565b600081836121fb5760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156120da5781810151838201526020016120c2565b5082848161220557fe5b06949350505050565b815460009082106122505760405162461bcd60e51b81526004018080602001828103825260228152602001806123c76022913960400191505060405180910390fd5b82600001828154811061225f57fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b600061229a8383612272565b6122d05750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561120e565b50600061120e565b60008181526001830160205260408120548015612394578354600019808301919081019060009087908390811061230b57fe5b906000526020600020015490508087600001848154811061232857fe5b60009182526020808320909101929092558281526001898101909252604090209084019055865487908061235857fe5b6001900381819060005260206000200160009055905586600101600087815260200190815260200160002060009055600194505050505061120e565b600091505061120e565b604051806080016040528060008152602001600081526020016000815260200160008152509056fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e7443616c6c6572206973206e6f7420612063616c6c657220726f6c650000000000416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77f2b908368f09f0315cc777a5e0b356c3524778809e0f218bd7e7fe86752bd262416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220e48d70f338cecd766e93fe3f56fbdb1fac89cd71894f28259f3e46131c64ebe164736f6c63430006060033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.