Contract Overview
My Name Tag:
Not Available, login to update
[ Download CSV Export ]
Contract Name:
CityNftSale
Compiler Version
v0.6.7+commit.b8d736ae
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity 0.6.7; import "./../openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./../openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "./../openzeppelin/contracts/token/ERC721/IERC721.sol"; import "./../openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "./../openzeppelin/contracts/access/Ownable.sol"; import "./LighthouseTierInterface.sol"; /// @title CityNftSale is nft selling platform /// Users with tier can buy single nft per sale. /// Nfts are replenished in intervals of limited amount and period. contract CityNftSale is IERC721Receiver, Ownable { using SafeERC20 for IERC20; bool public tradeEnabled = true; // enable/disable buy function uint256 public sessionId; // current sessionId address private priceReceiver; // this address receives the money from bought tokens address private verifier; // address to verify digital signature against /// TODO move outside struct, to global vars (and to constructor): // currencyAddress, nftAddress, lighthouseTierAddress // add function setAddresses() to set the 3 values struct Session{ address currencyAddress; // currency address address nftAddress; // nft address used for sending address lighthouseTierAddress; // address of LighthouseTier external contract uint256 startPrice; // nft price in the initial interval uint256 priceIncrease; // how much nftPrice increase every interval uint32 startTime; // session start timestamp uint32 intervalDuration; // duration of single interval – in seconds uint32 intervalsAmount; // total of intervals int8 tierRequirement; // required tier rank // if tier is not required, tierRequirement should be -1 } /// @dev session id => Session struct mapping(uint256 => Session) public sessions; /// @dev keep track of sold nfts while session is active /// sessionId => buyerAddress => bool mapping(uint256 => mapping(address => bool)) public nftMinters; event Buy( uint256 indexed sessionId, uint256 intervalNumber, uint256 price, uint256 nftId, address indexed buyer ); event StartSession( uint256 indexed sessionId, uint256 startPrice, uint256 priceIncrease, uint32 startTime, uint32 intervalDuration, uint32 intervalsAmount, address nftAddress ); event ApproveUnsoldNfts( uint256 indexed sessionId, address indexed nftAddress, address receiverAddress ); /// @dev initialize the contract /// @param _priceReceiver recipient of the price during nft buy constructor(address _priceReceiver, address _verifier) public { require(_priceReceiver != address(0), "Invalid price receiver address"); priceReceiver = _priceReceiver; require(_verifier != address(0), "Invalid verifier address"); verifier = _verifier; } //-------------------------------------------------------------------- // external onlyOwner functions //-------------------------------------------------------------------- /// @notice enable/disable buy function /// @param _tradeEnabled set tradeEnabled to true/false function enableTrade(bool _tradeEnabled) external onlyOwner { tradeEnabled = _tradeEnabled; } /// @notice change price receiver address /// @param _priceReceiver address of new receiver function setPriceReceiver(address _priceReceiver) external onlyOwner { require(_priceReceiver != address(0), "Invalid price receiver address"); priceReceiver = _priceReceiver; } /// @notice change verifier address /// @param _verifier address of new verifier function setVerifier(address _verifier) external onlyOwner { require(_verifier != address(0), "Invalid verifier address"); verifier = _verifier; } /// @dev start a new session, during which players are allowed to buy nfts /// @param _currencyAddress ERC20 token to be used during the session /// @param _nftAddress address of nft /// @param _lighthouseTierAddress tier contract address, if 0x0 tier is not requirement /// @param _startPrice nfts price in the first interval /// @param _priceIncrease how much price increases each interval /// @param _startTime timestamp at which session becomes active /// @param _intervalDuration duration of each interval /// @param _intervalsAmount how many intervals are in a session /// @param _tierRequirement required tier rank function startSession( address _currencyAddress, address _nftAddress, address _lighthouseTierAddress, uint256 _startPrice, uint256 _priceIncrease, uint32 _startTime, uint32 _intervalDuration, uint32 _intervalsAmount, int8 _tierRequirement ) external onlyOwner { require(_currencyAddress != address(0), "invalid currency address"); require(_nftAddress != address(0), "invalid nft address"); require(_startPrice > 0, "start price can't be 0"); require(_startTime > now, "session should start in future"); require(_intervalDuration > 0, "interval duration can't be 0"); require(_intervalsAmount > 0, "intervals amount can't be 0"); require(_tierRequirement > -2, "invalid tier requirement"); sessionId++; sessions[sessionId] = Session( _currencyAddress, _nftAddress, _lighthouseTierAddress, _startPrice, _priceIncrease, _startTime, _intervalDuration, _intervalsAmount, _tierRequirement ); emit StartSession( sessionId, _startPrice, _priceIncrease, _startTime, _intervalDuration, _intervalsAmount, _nftAddress ); } /// @dev after session is finished owner can approve withdrawal of remaining nfts /// @param _sessionId session unique identifier /// @param _receiverAddress address which will receive the nfts function approveUnsoldNfts(uint256 _sessionId, address _receiverAddress) external onlyOwner { require(_receiverAddress != address(0), "invalid receiver address"); IERC721(sessions[_sessionId].nftAddress).setApprovalForAll(_receiverAddress, true); emit ApproveUnsoldNfts(_sessionId, sessions[_sessionId].nftAddress, _receiverAddress); } //-------------------------------------------------------------------- // External functions //-------------------------------------------------------------------- /// @notice buy nft at selected slot /// @param _sessionId session unique identifier /// @param _nftId id of nft function buy(uint256 _sessionId, uint256 _nftId, uint8 _v, bytes32 _r, bytes32 _s) external { Session storage _session = sessions[_sessionId]; //require stamements uint256 _currentInterval = getCurrentInterval(_sessionId); uint256 _currentPrice = getCurrentPrice(_sessionId, _currentInterval); require(IERC721(_session.nftAddress).ownerOf(_nftId) == address(this), "contract not owner of this nft"); require(!nftMinters[_sessionId][msg.sender], "cant buy more nfts this session"); require(tradeEnabled, "trade is disabled"); /// @dev make sure msg.sender has obtained tier in LighthouseTier.sol /// LighthouseTier.sol is external but trusted contract maintained by Seascape if(_session.tierRequirement >= 0){ LighthouseTierInterface tier = LighthouseTierInterface(_session .lighthouseTierAddress); require(tier.getTierLevel(msg.sender) >= _session.tierRequirement, "insufficient tier rank"); } /// @dev digital signature part bytes32 _messageNoPrefix = keccak256(abi.encodePacked( _sessionId, _nftId, _currentInterval, getChainId(), _currentPrice, address(this), _session.currencyAddress, _session.nftAddress )); bytes32 _message = keccak256(abi.encodePacked( "\x19Ethereum Signed Message:\n32", _messageNoPrefix)); address _recover = ecrecover(_message, _v, _r, _s); require(_recover == verifier, "Verification failed"); // update state nftMinters[_sessionId][msg.sender] = true; /// make transactions IERC20(_session.currencyAddress).safeTransferFrom(msg.sender, priceReceiver, _currentPrice); IERC721(_session.nftAddress).safeTransferFrom(address(this), msg.sender, _nftId); /// emit events emit Buy( _sessionId, _currentInterval, _currentPrice, _nftId, msg.sender ); } /// @dev encrypt token data /// @return encrypted data function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external override returns (bytes4) { return bytes4(keccak256("onERC721Received(address,address,uint256,bytes)")); } /// @notice get remaining time in current interval /// @param _sessionId session unique identifier /// @return time in seconds function getIntervalTime(uint256 _sessionId) external view returns(uint) { if(!isActive(_sessionId)) { return 0; } else { return (now - sessions[_sessionId] .startTime) % sessions[_sessionId].intervalDuration; } } //-------------------------------------------------------------------- // public functions //-------------------------------------------------------------------- /// @dev calculate current interval number /// @param _sessionId session unique identifier /// @return current interval number function getCurrentInterval(uint256 _sessionId) public view returns(uint) { require(isActive(_sessionId), "session is not active"); uint256 _currentInterval = (now - sessions[_sessionId] .startTime) / sessions[_sessionId].intervalDuration; // @dev _currentInterval will start with 0 so last interval should be intervalsAmoun-1 require(_currentInterval < sessions[_sessionId].intervalsAmount, "_currentInterval > intervalsAmount, session is finished"); return _currentInterval; } /// @dev calculate current nft price /// @param _sessionId session unique identifier /// @param _currentInterval number of the current interval /// @return nft price for the current interval function getCurrentPrice(uint256 _sessionId, uint256 _currentInterval) public view returns (uint) { // if _currentInterval = 0, session.startPrice will be returned uint256 _currentPrice = sessions[_sessionId].startPrice + sessions[_sessionId] .priceIncrease * _currentInterval; return _currentPrice; } /// @dev check if session is currently active /// @param _sessionId id to verify /// @return true/false depending on timestamp period of the sesson function isActive(uint256 _sessionId) internal view returns (bool){ Session storage session = sessions[_sessionId]; if(now >= session.startTime && now < session .startTime + session.intervalsAmount * session.intervalDuration){ return true; } return false; } //-------------------------------------------------------------------- // private functions //-------------------------------------------------------------------- /// @dev retrieve executing chain id /// @return network identifier function getChainId() public pure returns (uint256) { uint256 id; assembly { id := chainid() } return id; } }
// 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) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } /** * @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; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4); }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.2; import "../../introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transfered from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 tokenId) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; import "./IERC20.sol"; import "../../math/SafeMath.sol"; import "../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line max-line-length require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; /** * @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.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 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); }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; import "../GSN/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; /* * @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; } }
pragma solidity ^0.6.7; /// @dev Interface of the nftSwapParams interface LighthouseTierInterface { /// @dev returns investors tier rank 0 - 4; -1 if none function getTierLevel(address _investor) external view returns (int8); }
{ "remappings": [], "optimizer": { "enabled": false, "runs": 200 }, "evmVersion": "istanbul", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
[{"inputs":[{"internalType":"address","name":"_priceReceiver","type":"address"},{"internalType":"address","name":"_verifier","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"sessionId","type":"uint256"},{"indexed":true,"internalType":"address","name":"nftAddress","type":"address"},{"indexed":false,"internalType":"address","name":"receiverAddress","type":"address"}],"name":"ApproveUnsoldNfts","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"sessionId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"intervalNumber","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"nftId","type":"uint256"},{"indexed":true,"internalType":"address","name":"buyer","type":"address"}],"name":"Buy","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"sessionId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"startPrice","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"priceIncrease","type":"uint256"},{"indexed":false,"internalType":"uint32","name":"startTime","type":"uint32"},{"indexed":false,"internalType":"uint32","name":"intervalDuration","type":"uint32"},{"indexed":false,"internalType":"uint32","name":"intervalsAmount","type":"uint32"},{"indexed":false,"internalType":"address","name":"nftAddress","type":"address"}],"name":"StartSession","type":"event"},{"inputs":[{"internalType":"uint256","name":"_sessionId","type":"uint256"},{"internalType":"address","name":"_receiverAddress","type":"address"}],"name":"approveUnsoldNfts","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_sessionId","type":"uint256"},{"internalType":"uint256","name":"_nftId","type":"uint256"},{"internalType":"uint8","name":"_v","type":"uint8"},{"internalType":"bytes32","name":"_r","type":"bytes32"},{"internalType":"bytes32","name":"_s","type":"bytes32"}],"name":"buy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_tradeEnabled","type":"bool"}],"name":"enableTrade","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getChainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_sessionId","type":"uint256"}],"name":"getCurrentInterval","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_sessionId","type":"uint256"},{"internalType":"uint256","name":"_currentInterval","type":"uint256"}],"name":"getCurrentPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_sessionId","type":"uint256"}],"name":"getIntervalTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"nftMinters","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sessionId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"sessions","outputs":[{"internalType":"address","name":"currencyAddress","type":"address"},{"internalType":"address","name":"nftAddress","type":"address"},{"internalType":"address","name":"lighthouseTierAddress","type":"address"},{"internalType":"uint256","name":"startPrice","type":"uint256"},{"internalType":"uint256","name":"priceIncrease","type":"uint256"},{"internalType":"uint32","name":"startTime","type":"uint32"},{"internalType":"uint32","name":"intervalDuration","type":"uint32"},{"internalType":"uint32","name":"intervalsAmount","type":"uint32"},{"internalType":"int8","name":"tierRequirement","type":"int8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_priceReceiver","type":"address"}],"name":"setPriceReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_verifier","type":"address"}],"name":"setVerifier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_currencyAddress","type":"address"},{"internalType":"address","name":"_nftAddress","type":"address"},{"internalType":"address","name":"_lighthouseTierAddress","type":"address"},{"internalType":"uint256","name":"_startPrice","type":"uint256"},{"internalType":"uint256","name":"_priceIncrease","type":"uint256"},{"internalType":"uint32","name":"_startTime","type":"uint32"},{"internalType":"uint32","name":"_intervalDuration","type":"uint32"},{"internalType":"uint32","name":"_intervalsAmount","type":"uint32"},{"internalType":"int8","name":"_tierRequirement","type":"int8"}],"name":"startSession","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tradeEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040526001600060146101000a81548160ff0219169083151502179055503480156200002c57600080fd5b506040516200302538038062003025833981810160405260408110156200005257600080fd5b81019080805190602001909291908051906020019092919050505060006200007f620002ef60201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a350600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415620001c1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f496e76616c69642070726963652072656365697665722061646472657373000081525060200191505060405180910390fd5b81600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415620002a6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f496e76616c69642076657269666965722061646472657373000000000000000081525060200191505060405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050620002f7565b600033905090565b612d1e80620003076000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c80637f0554f9116100a2578063c00f04d111610071578063c00f04d114610609578063d621e81314610639578063f2fde38b1461065b578063fdd5567e1461069f578063fdda53061461077557610116565b80637f0554f91461043757806383c4b7a3146104795780638da5cb5b146105a15780639648c9f4146105eb57610116565b806346fdcb46116100e957806346fdcb46146102dc57806352182dd1146103355780635437988d1461039b578063715018a6146103df5780637b081a43146103e957610116565b8063046733681461011b578063150b7a021461016757806320f194e91461027c5780633408e470146102be575b600080fd5b6101516004803603604081101561013157600080fd5b8101908080359060200190929190803590602001909291905050506107b9565b6040518082815260200191505060405180910390f35b6102286004803603608081101561017d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156101e457600080fd5b8201836020820111156101f657600080fd5b8035906020019184600183028401116401000000008311171561021857600080fd5b90919293919293905050506107f9565b60405180827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200191505060405180910390f35b6102a86004803603602081101561029257600080fd5b810190808035906020019092919050505061081f565b6040518082815260200191505060405180910390f35b6102c66108a3565b6040518082815260200191505060405180910390f35b610333600480360360a08110156102f257600080fd5b810190808035906020019092919080359060200190929190803560ff16906020019092919080359060200190929190803590602001909291905050506108b0565b005b6103816004803603604081101561034b57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061120f565b604051808215151515815260200191505060405180910390f35b6103dd600480360360208110156103b157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061123e565b005b6103e76113ee565b005b610435600480360360408110156103ff57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611576565b005b6104636004803603602081101561044d57600080fd5b8101908080359060200190929190505050611871565b6040518082815260200191505060405180910390f35b6104a56004803603602081101561048f57600080fd5b81019080803590602001909291905050506119e3565b604051808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018563ffffffff1663ffffffff1681526020018463ffffffff1663ffffffff1681526020018363ffffffff1663ffffffff1681526020018260000b60000b8152602001995050505050505050505060405180910390f35b6105a9611ace565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105f3611af7565b6040518082815260200191505060405180910390f35b6106376004803603602081101561061f57600080fd5b81019080803515159060200190929190505050611afd565b005b610641611be3565b604051808215151515815260200191505060405180910390f35b61069d6004803603602081101561067157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611bf6565b005b61077360048036036101208110156106b657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190803563ffffffff169060200190929190803563ffffffff169060200190929190803563ffffffff169060200190929190803560000b9060200190929190505050611e03565b005b6107b76004803603602081101561078b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612594565b005b6000808260046000868152602001908152602001600020600401540260046000868152602001908152602001600020600301540190508091505092915050565b60006040518080612c33602f9139602f0190506040518091039020905095945050505050565b600061082a82612744565b610837576000905061089e565b6004600083815260200190815260200160002060050160049054906101000a900463ffffffff1663ffffffff166004600084815260200190815260200160002060050160009054906101000a900463ffffffff1663ffffffff1642038161089a57fe5b0690505b919050565b6000804690508091505090565b600060046000878152602001908152602001600020905060006108d287611871565b905060006108e088836107b9565b90503073ffffffffffffffffffffffffffffffffffffffff168360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e896040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561096e57600080fd5b505afa158015610982573d6000803e3d6000fd5b505050506040513d602081101561099857600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1614610a32576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f636f6e7472616374206e6f74206f776e6572206f662074686973206e6674000081525060200191505060405180910390fd5b6005600089815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610b03576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f63616e7420627579206d6f7265206e66747320746869732073657373696f6e0081525060200191505060405180910390fd5b600060149054906101000a900460ff16610b85576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f74726164652069732064697361626c656400000000000000000000000000000081525060200191505060405180910390fd5b600083600501600c9054906101000a900460000b60000b12610d105760008360020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905083600501600c9054906101000a900460000b60000b8173ffffffffffffffffffffffffffffffffffffffff166328fc4c3c336040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610c5c57600080fd5b505afa158015610c70573d6000803e3d6000fd5b505050506040513d6020811015610c8657600080fd5b810190808051906020019092919050505060000b1215610d0e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f696e73756666696369656e7420746965722072616e6b0000000000000000000081525060200191505060405180910390fd5b505b6000888884610d1d6108a3565b85308960000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168a60010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051602001808981526020018881526020018781526020018681526020018581526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b81526014018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b81526014018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1660601b81526014019850505050505050505060405160208183030381529060405280519060200120905060008160405160200180807f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250601c0182815260200191505060405160208183030381529060405280519060200120905060006001828a8a8a60405160008152602001604052604051808581526020018460ff1660ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015610f01573d6000803e3d6000fd5b505050602060405103519050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610fd0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f566572696669636174696f6e206661696c65640000000000000000000000000081525060200191505060405180910390fd5b6001600560008d815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506110ac33600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16868960000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166127e5909392919063ffffffff16565b8560010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342842e0e30338d6040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050600060405180830381600087803b15801561118b57600080fd5b505af115801561119f573d6000803e3d6000fd5b505050503373ffffffffffffffffffffffffffffffffffffffff168b7f13daf4f46be9b49e0ed381f019cfbe532277d3ea9e371947951f7d36dbe6287287878e60405180848152602001838152602001828152602001935050505060405180910390a35050505050505050505050565b60056020528160005260406000206020528060005260406000206000915091509054906101000a900460ff1681565b6112466128d2565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611307576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156113aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f496e76616c69642076657269666965722061646472657373000000000000000081525060200191505060405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6113f66128d2565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146114b7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b61157e6128d2565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461163f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156116e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f696e76616c69642072656365697665722061646472657373000000000000000081525060200191505060405180910390fd5b6004600083815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a22cb4658260016040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018215151515815260200192505050600060405180830381600087803b1580156117a457600080fd5b505af11580156117b8573d6000803e3d6000fd5b505050506004600083815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16827fd484f3602898662d8c34da560e9da1d9de6f05b52c3f0cb77d74b3246d21a78283604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a35050565b600061187c82612744565b6118ee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f73657373696f6e206973206e6f7420616374697665000000000000000000000081525060200191505060405180910390fd5b60006004600084815260200190815260200160002060050160049054906101000a900463ffffffff1663ffffffff166004600085815260200190815260200160002060050160009054906101000a900463ffffffff1663ffffffff1642038161195357fe5b0490506004600084815260200190815260200160002060050160089054906101000a900463ffffffff1663ffffffff1681106119da576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526037815260200180612cb26037913960400191505060405180910390fd5b80915050919050565b60046020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060030154908060040154908060050160009054906101000a900463ffffffff16908060050160049054906101000a900463ffffffff16908060050160089054906101000a900463ffffffff169080600501600c9054906101000a900460000b905089565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60015481565b611b056128d2565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611bc6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600060146101000a81548160ff02191690831515021790555050565b600060149054906101000a900460ff1681565b611bfe6128d2565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611cbf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611d45576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180612c626026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b611e0b6128d2565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611ecc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff161415611f6f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f696e76616c69642063757272656e63792061646472657373000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff161415612012576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f696e76616c6964206e667420616464726573730000000000000000000000000081525060200191505060405180910390fd5b60008611612088576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f73746172742070726963652063616e277420626520300000000000000000000081525060200191505060405180910390fd5b428463ffffffff1611612103576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f73657373696f6e2073686f756c6420737461727420696e20667574757265000081525060200191505060405180910390fd5b60008363ffffffff161161217f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f696e74657276616c206475726174696f6e2063616e277420626520300000000081525060200191505060405180910390fd5b60008263ffffffff16116121fb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f696e74657276616c7320616d6f756e742063616e27742062652030000000000081525060200191505060405180910390fd5b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe8160000b13612293576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f696e76616c6964207469657220726571756972656d656e74000000000000000081525060200191505060405180910390fd5b6001600081548092919060010191905055506040518061012001604052808a73ffffffffffffffffffffffffffffffffffffffff1681526020018973ffffffffffffffffffffffffffffffffffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1681526020018781526020018681526020018563ffffffff1681526020018463ffffffff1681526020018363ffffffff1681526020018260000b81525060046000600154815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550606082015181600301556080820151816004015560a08201518160050160006101000a81548163ffffffff021916908363ffffffff16021790555060c08201518160050160046101000a81548163ffffffff021916908363ffffffff16021790555060e08201518160050160086101000a81548163ffffffff021916908363ffffffff16021790555061010082015181600501600c6101000a81548160ff021916908360000b60ff1602179055509050506001547f9ec705052e4fc099cd3fa1459672797fb189d2ab883323e6714e40612cffbaff87878787878e604051808781526020018681526020018563ffffffff1663ffffffff1681526020018463ffffffff1663ffffffff1681526020018363ffffffff1663ffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001965050505050505060405180910390a2505050505050505050565b61259c6128d2565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461265d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612700576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f496e76616c69642070726963652072656365697665722061646472657373000081525060200191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000806004600084815260200190815260200160002090508060050160009054906101000a900463ffffffff1663ffffffff1642101580156127cb57508060050160049054906101000a900463ffffffff168160050160089054906101000a900463ffffffff16028160050160009054906101000a900463ffffffff160163ffffffff1642105b156127da5760019150506127e0565b60009150505b919050565b6128cc846323b872dd60e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506128da565b50505050565b600033905090565b606061293c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166129c99092919063ffffffff16565b90506000815111156129c45780806020019051602081101561295d57600080fd5b81019080805190602001909291905050506129c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180612c88602a913960400191505060405180910390fd5b5b505050565b60606129d884846000856129e1565b90509392505050565b60606129ec85612be7565b612a5e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000081525060200191505060405180910390fd5b600060608673ffffffffffffffffffffffffffffffffffffffff1685876040518082805190602001908083835b60208310612aae5780518252602082019150602081019050602083039250612a8b565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114612b10576040519150601f19603f3d011682016040523d82523d6000602084013e612b15565b606091505b50915091508115612b2a578092505050612bdf565b600081511115612b3d5780518082602001fd5b836040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612ba4578082015181840152602081019050612b89565b50505050905090810190601f168015612bd15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b949350505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f9150808214158015612c2957506000801b8214155b9250505091905056fe6f6e455243373231526563656976656428616464726573732c616464726573732c75696e743235362c6279746573294f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573735361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645f63757272656e74496e74657276616c203e20696e74657276616c73416d6f756e742c2073657373696f6e2069732066696e6973686564a26469706673582212203dc2f98e002505d59992d39e18eb0ad9ae6dc0dfa6f722a2048fa7a68b48a87c64736f6c6343000607003300000000000000000000000042360f7a29196813cfc48c1724ee8d498e64a3ae0000000000000000000000001476e2069503fc7a1c8969f920d786fccdfa5b78
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000042360f7a29196813cfc48c1724ee8d498e64a3ae0000000000000000000000001476e2069503fc7a1c8969f920d786fccdfa5b78
-----Decoded View---------------
Arg [0] : _priceReceiver (address): 0x42360f7a29196813cfc48c1724ee8d498e64a3ae
Arg [1] : _verifier (address): 0x1476e2069503fc7a1c8969f920d786fccdfa5b78
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000042360f7a29196813cfc48c1724ee8d498e64a3ae
Arg [1] : 0000000000000000000000001476e2069503fc7a1c8969f920d786fccdfa5b78
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.