UNPKG

@levxdao/ve

Version:

VE and Gauge Voting for NFTs

374 lines 66.1 kB
{ "address": "0x1c82dfc2AE70E7465889785fA2cd4110087803bf", "abi": [ { "inputs": [ { "internalType": "uint256", "name": "_amount", "type": "uint256" }, { "internalType": "uint256", "name": "_limit", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "collection", "type": "address" } ], "name": "AddCollection", "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": "address", "name": "collection", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "tokenId", "type": "uint256" } ], "name": "WhitelistNFT", "type": "event" }, { "inputs": [ { "internalType": "address[]", "name": "_collections", "type": "address[]" } ], "name": "addCollections", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "amount", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "", "type": "address" } ], "name": "collections", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "factory", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "launch", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "launchedAt", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "limit", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "maxDuration", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_factory", "type": "address" } ], "name": "setFactory", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "totalNumberWhitelisted", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "votingEscrow", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "collection", "type": "address" }, { "internalType": "uint256[]", "name": "tokenIds", "type": "uint256[]" } ], "name": "whitelistNFTs", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "", "type": "address" }, { "internalType": "uint256", "name": "", "type": "uint256" } ], "name": "whitelisted", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "collection", "type": "address" }, { "internalType": "uint256", "name": "tokenId", "type": "uint256" }, { "internalType": "uint256", "name": "dividendRatio", "type": "uint256" } ], "name": "wrapNFT", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "", "type": "address" }, { "internalType": "uint256", "name": "", "type": "uint256" } ], "name": "wrapped", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" } ], "transactionHash": "0xee67e9e3d4cecc4c2d548bee0d7934c3c962d15899c4393ea2fb6fa3067d6ac1", "receipt": { "to": null, "from": "0x5b8C253517b6Bd003369173109693B01cb6841B5", "contractAddress": "0x1c82dfc2AE70E7465889785fA2cd4110087803bf", "transactionIndex": 25, "gasUsed": "988351", "logsBloom": "0x00000000000000000100000000000000000000000000000000900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000800020000000000000000000800000000000000000000000000000000400001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000200000000000020000000000000000000000000000000000000000000000000000000000000000000", "blockHash": "0xbecb81dd63b66840e911e934a67bb93ec7d1fac9eb83da971941c0b18cca88f3", "transactionHash": "0xee67e9e3d4cecc4c2d548bee0d7934c3c962d15899c4393ea2fb6fa3067d6ac1", "logs": [ { "transactionIndex": 25, "blockNumber": 15409945, "transactionHash": "0xee67e9e3d4cecc4c2d548bee0d7934c3c962d15899c4393ea2fb6fa3067d6ac1", "address": "0x1c82dfc2AE70E7465889785fA2cd4110087803bf", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000005b8c253517b6bd003369173109693b01cb6841b5" ], "data": "0x", "logIndex": 33, "blockHash": "0xbecb81dd63b66840e911e934a67bb93ec7d1fac9eb83da971941c0b18cca88f3" } ], "blockNumber": 15409945, "cumulativeGasUsed": "2299094", "status": 1, "byzantium": true }, "args": [ "33300000000000000000", 300 ], "solcInputHash": "937b9eced0f8dd1c968e2fb9c7871914", "metadata": "{\"compiler\":{\"version\":\"0.8.15+commit.e14f2714\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_limit\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"collection\",\"type\":\"address\"}],\"name\":\"AddCollection\",\"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\":\"address\",\"name\":\"collection\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"WhitelistNFT\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_collections\",\"type\":\"address[]\"}],\"name\":\"addCollections\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"amount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"collections\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"factory\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"launch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"launchedAt\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"limit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxDuration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_factory\",\"type\":\"address\"}],\"name\":\"setFactory\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalNumberWhitelisted\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"votingEscrow\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collection\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"tokenIds\",\"type\":\"uint256[]\"}],\"name\":\"whitelistNFTs\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"whitelisted\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"collection\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"dividendRatio\",\"type\":\"uint256\"}],\"name\":\"wrapNFT\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"wrapped\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"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.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/EarlyAccess.sol\":\"EarlyAccess\"},\"evmVersion\":\"london\",\"libraries\":{\":__CACHE_BREAKER__\":\"0x00000000d41867734bbee4c6863d9255b2b06ac1\"},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n _;\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0x24e0364e503a9bbde94c715d26573a76f14cd2a202d45f96f52134ab806b67b9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/IERC721.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC721 compliant contract.\\n */\\ninterface IERC721 is IERC165 {\\n /**\\n * @dev Emitted when `tokenId` token is transferred from `from` to `to`.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.\\n */\\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\\n\\n /**\\n * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.\\n */\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /**\\n * @dev Returns the number of tokens in ``owner``'s account.\\n */\\n function balanceOf(address owner) external view returns (uint256 balance);\\n\\n /**\\n * @dev Returns the owner of the `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function ownerOf(uint256 tokenId) external view returns (address owner);\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes calldata data\\n ) external;\\n\\n /**\\n * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients\\n * are aware of the ERC721 protocol to prevent tokens from being forever locked.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must exist and be owned by `from`.\\n * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.\\n * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.\\n *\\n * Emits a {Transfer} event.\\n */\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n /**\\n * @dev Transfers `tokenId` token from `from` to `to`.\\n *\\n * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `tokenId` token must be owned by `from`.\\n * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 tokenId\\n ) external;\\n\\n /**\\n * @dev Gives permission to `to` to transfer `tokenId` token to another account.\\n * The approval is cleared when the token is transferred.\\n *\\n * Only a single account can be approved at a time, so approving the zero address clears previous approvals.\\n *\\n * Requirements:\\n *\\n * - The caller must own the token or be an approved operator.\\n * - `tokenId` must exist.\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address to, uint256 tokenId) external;\\n\\n /**\\n * @dev Approve or remove `operator` as an operator for the caller.\\n * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.\\n *\\n * Requirements:\\n *\\n * - The `operator` cannot be the caller.\\n *\\n * Emits an {ApprovalForAll} event.\\n */\\n function setApprovalForAll(address operator, bool _approved) external;\\n\\n /**\\n * @dev Returns the account approved for `tokenId` token.\\n *\\n * Requirements:\\n *\\n * - `tokenId` must exist.\\n */\\n function getApproved(uint256 tokenId) external view returns (address operator);\\n\\n /**\\n * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.\\n *\\n * See {setApprovalForAll}\\n */\\n function isApprovedForAll(address owner, address operator) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x0d4de01fe5360c38b4ad2b0822a12722958428f5138a7ff47c1720eb6fa52bba\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC721.sol\\\";\\n\\n/**\\n * @title ERC-721 Non-Fungible Token Standard, optional metadata extension\\n * @dev See https://eips.ethereum.org/EIPS/eip-721\\n */\\ninterface IERC721Metadata is IERC721 {\\n /**\\n * @dev Returns the token collection name.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the token collection symbol.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.\\n */\\n function tokenURI(uint256 tokenId) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0x75b829ff2f26c14355d1cba20e16fe7b29ca58eb5fef665ede48bc0f9c6c74b9\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n /**\\n * @dev Returns true if this contract implements the interface defined by\\n * `interfaceId`. See the corresponding\\n * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n * to learn more about how these ids are created.\\n *\\n * This function call must use less than 30 000 gas.\\n */\\n function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"contracts/EarlyAccess.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.15;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"./interfaces/INFTGaugeFactory.sol\\\";\\nimport \\\"./interfaces/INFTGauge.sol\\\";\\nimport \\\"./interfaces/IVotingEscrow.sol\\\";\\nimport \\\"./libraries/NFTs.sol\\\";\\n\\ncontract EarlyAccess is Ownable {\\n event AddCollection(address indexed collection);\\n event WhitelistNFT(address indexed collection, uint256 tokenId);\\n\\n uint256 public immutable amount;\\n uint256 public immutable limit;\\n address public factory;\\n address public votingEscrow;\\n uint256 public maxDuration;\\n\\n uint256 public totalNumberWhitelisted;\\n uint256 public launchedAt;\\n mapping(address => bool) public collections;\\n mapping(address => mapping(uint256 => bool)) public whitelisted;\\n mapping(address => mapping(uint256 => bool)) public wrapped;\\n\\n constructor(uint256 _amount, uint256 _limit) {\\n amount = _amount;\\n limit = _limit;\\n }\\n\\n function setFactory(address _factory) external onlyOwner {\\n factory = _factory;\\n\\n votingEscrow = INFTGaugeFactory(_factory).votingEscrow();\\n maxDuration = IVotingEscrow(_factory).maxDuration();\\n }\\n\\n function launch() external onlyOwner {\\n require(launchedAt == 0, \\\"EA: LAUNCHED\\\");\\n\\n launchedAt = block.timestamp;\\n }\\n\\n function addCollections(address[] calldata _collections) external onlyOwner {\\n require(launchedAt == 0, \\\"EA: LAUNCHED\\\");\\n for (uint256 i; i < _collections.length; i++) {\\n collections[_collections[i]] = true;\\n emit AddCollection(_collections[i]);\\n }\\n }\\n\\n function whitelistNFTs(address collection, uint256[] calldata tokenIds) external {\\n require(launchedAt == 0, \\\"EA: LAUNCHED\\\");\\n require(collections[collection], \\\"EA: COLLECTION_NOT_ALLOWED\\\");\\n require(totalNumberWhitelisted + tokenIds.length <= limit, \\\"EA: LIMIT_REACHED\\\");\\n\\n for (uint256 i; i < tokenIds.length; i++) {\\n require(NFTs.ownerOf(collection, tokenIds[i]) == msg.sender, \\\"EA: FORBIDDEN\\\");\\n whitelisted[collection][tokenIds[i]] = true;\\n\\n emit WhitelistNFT(collection, tokenIds[i]);\\n }\\n totalNumberWhitelisted += tokenIds.length;\\n }\\n\\n function wrapNFT(\\n address collection,\\n uint256 tokenId,\\n uint256 dividendRatio\\n ) external {\\n require(launchedAt > 0, \\\"EA: NOT_LAUNCHED\\\");\\n require(whitelisted[collection][tokenId], \\\"EA: NOT_WHITELISTED\\\");\\n require(!wrapped[collection][tokenId], \\\"EA: WRAPPED\\\");\\n\\n wrapped[collection][tokenId] = true;\\n\\n NFTs.safeTransferFrom(collection, msg.sender, address(this), tokenId);\\n\\n address gauge = INFTGaugeFactory(factory).gauges(collection);\\n INFTGauge(gauge).wrap(tokenId, dividendRatio, msg.sender, 0);\\n\\n IVotingEscrow(votingEscrow).createLockFor(msg.sender, amount, amount, maxDuration);\\n }\\n}\\n\",\"keccak256\":\"0x126b4893900dd2a949d11e95fc653cfffbf5748bdc6fdb39d8c56e02c4b9c0e5\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/ICryptoPunksMarket.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.0;\\n\\ninterface ICryptoPunksMarket {\\n function offerPunkForSaleToAddress(\\n uint256 punkIndex,\\n uint256 minSalePriceInWei,\\n address toAddress\\n ) external;\\n\\n function punkIndexToAddress(uint256 punkIndex) external view returns (address);\\n\\n function transferPunk(address to, uint256 punkIndex) external;\\n\\n function buyPunk(uint256 punkIndex) external;\\n}\\n\",\"keccak256\":\"0xc6103a01e490c7ff26d2f84b31916347cebb6e201bd6ace76150e1a0d3bf91fa\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/IGauge.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.0;\\n\\ninterface IGauge {\\n function killMe() external;\\n}\\n\",\"keccak256\":\"0x29e36f274a44f644fab11c1ff1ecf5aaf9df778f43a675c1a85bf0b66becc176\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/INFTGauge.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IWrappedERC721.sol\\\";\\nimport \\\"./IGauge.sol\\\";\\n\\ninterface INFTGauge is IWrappedERC721, IGauge {\\n event Wrap(uint256 indexed tokenId, address indexed to);\\n event Unwrap(uint256 indexed tokenId, address indexed to);\\n event Vote(uint256 indexed tokenId, address indexed user, uint256 weight);\\n event DistributeDividend(address indexed token, uint256 indexed tokenId, uint256 amount);\\n event ClaimDividends(address indexed token, uint256 indexed tokenId, uint256 amount, address indexed to);\\n\\n function initialize(\\n address _nftContract,\\n address _tokenURIRenderer,\\n address _minter\\n ) external;\\n\\n function controller() external view returns (address);\\n\\n function minter() external view returns (address);\\n\\n function votingEscrow() external view returns (address);\\n\\n function futureEpochTime() external view returns (uint256);\\n\\n function dividendRatios(uint256 tokenId) external view returns (uint256);\\n\\n function dividends(\\n address token,\\n uint256 tokenId,\\n uint256 id\\n ) external view returns (uint64 blockNumber, uint192 amountPerShare);\\n\\n function lastDividendClaimed(\\n address token,\\n uint256 tokenId,\\n address user\\n ) external view returns (uint256);\\n\\n function integrateCheckpoint() external view returns (uint256);\\n\\n function period() external view returns (int128);\\n\\n function periodTimestamp(int128 period) external view returns (uint256);\\n\\n function integrateInvSupply(int128 period) external view returns (uint256);\\n\\n function periodOf(uint256 tokenId, address user) external view returns (int128);\\n\\n function integrateFraction(uint256 tokenId, address user) external view returns (uint256);\\n\\n function inflationRate() external view returns (uint256);\\n\\n function isKilled() external view returns (bool);\\n\\n function userWeight(address user, uint256 tokenId) external view returns (uint256);\\n\\n function userWeightSum(address user) external view returns (uint256);\\n\\n function points(uint256 tokenId, address user) external view returns (uint256);\\n\\n function pointsAt(\\n uint256 tokenId,\\n address user,\\n uint256 _block\\n ) external view returns (uint256);\\n\\n function pointsSum(uint256 tokenId) external view returns (uint256);\\n\\n function pointsSumAt(uint256 tokenId, uint256 _block) external view returns (uint256);\\n\\n function pointsTotal() external view returns (uint256);\\n\\n function pointsTotalAt(uint256 _block) external view returns (uint256);\\n\\n function dividendsLength(address token, uint256 tokenId) external view returns (uint256);\\n\\n function userCheckpoint(uint256 tokenId, address user) external;\\n\\n function wrap(\\n uint256 tokenId,\\n uint256 ratio,\\n address to,\\n uint256 _userWeight\\n ) external;\\n\\n function unwrap(uint256 tokenId, address to) external;\\n\\n function vote(uint256 tokenId, uint256 _userWeight) external;\\n\\n function claimDividends(address token, uint256 tokenId) external;\\n}\\n\",\"keccak256\":\"0x47d1f8df84abf661155acd321996299dfe2ea6ce790cc47ddc244cfb328cdbbc\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/INFTGaugeFactory.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.0;\\n\\ninterface INFTGaugeFactory {\\n event UpgradeTarget(address target, uint256 indexed version);\\n event UpdateCurrencyConverter(address indexed token, address indexed converter);\\n event CreateNFTGauge(address indexed nftContract, address indexed gauge);\\n event UpdateFeeRatio(uint256 feeRatio);\\n event DistributeFees(address indexed token, uint256 indexed id, uint256 amount);\\n event ClaimFees(address indexed token, uint256 amount, address indexed to);\\n\\n function tokenURIRenderer() external view returns (address);\\n\\n function minter() external view returns (address);\\n\\n function votingEscrow() external view returns (address);\\n\\n function target() external view returns (address);\\n\\n function targetVersion() external view returns (uint256);\\n\\n function feeRatio() external view returns (uint256);\\n\\n function currencyConverter(address currency) external view returns (address);\\n\\n function gauges(address nftContract) external view returns (address);\\n\\n function isGauge(address addr) external view returns (bool);\\n\\n function fees(address token, uint256 id) external view returns (uint64 timestamp, uint192 amountPerShare);\\n\\n function lastFeeClaimed(address token, address user) external view returns (uint256);\\n\\n function feesLength(address token) external view returns (uint256);\\n\\n function upgradeTarget(address target) external;\\n\\n function updateCurrencyConverter(address token, address converter) external;\\n\\n function updateFeeRatio(uint256 feeRatio) external;\\n\\n function createNFTGauge(address nftContract) external returns (address gauge);\\n\\n function executePayment(\\n address currency,\\n address from,\\n uint256 amount\\n ) external;\\n\\n function distributeFeesETH() external payable returns (uint256 amountFee);\\n\\n function distributeFees(address token, uint256 amount) external returns (uint256 amountFee);\\n\\n function claimFees(address token, uint256 to) external;\\n}\\n\",\"keccak256\":\"0x81abfc0b987b791a9c5a8b11d1d7283452c28870acd950aaf90337457783aee8\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/IVotingEscrow.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.0;\\n\\ninterface IVotingEscrow {\\n event SetMigrator(address indexed account);\\n event SetDelegate(address indexed account, bool isDelegate);\\n event Deposit(\\n address indexed provider,\\n uint256 value,\\n uint256 discount,\\n uint256 indexed unlockTime,\\n int128 indexed _type,\\n uint256 ts\\n );\\n event Cancel(address indexed provider, uint256 value, uint256 discount, uint256 penaltyRate, uint256 ts);\\n event Withdraw(address indexed provider, uint256 value, uint256 discount, uint256 ts);\\n event Migrate(address indexed provider, uint256 value, uint256 discount, uint256 ts);\\n event Supply(uint256 prevSupply, uint256 supply);\\n\\n function interval() external view returns (uint256);\\n\\n function maxDuration() external view returns (uint256);\\n\\n function token() external view returns (address);\\n\\n function name() external view returns (string memory);\\n\\n function symbol() external view returns (string memory);\\n\\n function decimals() external view returns (uint8);\\n\\n function migrator() external view returns (address);\\n\\n function isDelegate(address account) external view returns (bool);\\n\\n function supply() external view returns (uint256);\\n\\n function migrated(address account) external view returns (bool);\\n\\n function delegateAt(address account, uint256 index) external view returns (address);\\n\\n function locked(address account)\\n external\\n view\\n returns (\\n int128 amount,\\n int128 discount,\\n uint256 start,\\n uint256 end\\n );\\n\\n function epoch() external view returns (uint256);\\n\\n function pointHistory(uint256 epoch)\\n external\\n view\\n returns (\\n int128 bias,\\n int128 slope,\\n uint256 ts,\\n uint256 blk\\n );\\n\\n function userPointHistory(address account, uint256 epoch)\\n external\\n view\\n returns (\\n int128 bias,\\n int128 slope,\\n uint256 ts,\\n uint256 blk\\n );\\n\\n function userPointEpoch(address account) external view returns (uint256);\\n\\n function slopeChanges(uint256 epoch) external view returns (int128);\\n\\n function delegateLength(address addr) external view returns (uint256);\\n\\n function getLastUserSlope(address addr) external view returns (int128);\\n\\n function getCheckpointTime(address _addr, uint256 _idx) external view returns (uint256);\\n\\n function unlockTime(address _addr) external view returns (uint256);\\n\\n function setMigrator(address _migrator) external;\\n\\n function setDelegate(address account, bool _isDelegate) external;\\n\\n function checkpoint() external;\\n\\n function depositFor(address _addr, uint256 _value) external;\\n\\n function createLockFor(\\n address _addr,\\n uint256 _value,\\n uint256 _discount,\\n uint256 _duration\\n ) external;\\n\\n function createLock(uint256 _value, uint256 _duration) external;\\n\\n function increaseAmountFor(\\n address _addr,\\n uint256 _value,\\n uint256 _discount\\n ) external;\\n\\n function increaseAmount(uint256 _value) external;\\n\\n function increaseUnlockTime(uint256 _duration) external;\\n\\n function cancel() external;\\n\\n function withdraw() external;\\n\\n function migrate() external;\\n\\n function balanceOf(address addr) external view returns (uint256);\\n\\n function balanceOf(address addr, uint256 _t) external view returns (uint256);\\n\\n function balanceOfAt(address addr, uint256 _block) external view returns (uint256);\\n\\n function totalSupply() external view returns (uint256);\\n\\n function totalSupply(uint256 t) external view returns (uint256);\\n\\n function totalSupplyAt(uint256 _block) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x3ac00d3de6b34a0c5cb777b5e9477af3982061f7e9021848dc662508f1cf0f1b\",\"license\":\"UNLICENSED\"},\"contracts/interfaces/IWrappedERC721.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/utils/introspection/IERC165.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol\\\";\\n\\ninterface IWrappedERC721 is IERC165, IERC721, IERC721Metadata {\\n function nftContract() external view returns (address);\\n\\n function tokenURIRenderer() external view returns (address);\\n\\n function factory() external view returns (address);\\n\\n function sales(uint256 tokenId, address owner)\\n external\\n view\\n returns (\\n uint256 price,\\n address currency,\\n uint64 deadline,\\n bool auction\\n );\\n\\n function currentBids(uint256 tokenId, address owner)\\n external\\n view\\n returns (\\n uint256 price,\\n address bidder,\\n uint64 timestamp\\n );\\n\\n function offers(uint256 tokenId, address maker)\\n external\\n view\\n returns (\\n uint256 price,\\n address currency,\\n uint64 deadline,\\n bool auction\\n );\\n\\n function listForSale(\\n uint256 tokenId,\\n uint256 price,\\n address currency,\\n uint64 deadline,\\n bool auction\\n ) external;\\n\\n function cancelListing(uint256 tokenId) external;\\n\\n function buyETH(uint256 tokenId, address owner) external payable;\\n\\n function buy(\\n uint256 tokenId,\\n address owner,\\n uint256 price\\n ) external;\\n\\n function bidETH(uint256 tokenId, address owner) external payable;\\n\\n function bid(\\n uint256 tokenId,\\n address owner,\\n uint256 price\\n ) external;\\n\\n function claim(uint256 tokenId, address owner) external;\\n\\n function makeOfferETH(uint256 tokenId, uint64 deadline) external payable;\\n\\n function makeOffer(\\n uint256 tokenId,\\n uint256 price,\\n address currency,\\n uint64 deadline\\n ) external;\\n\\n function withdrawOffer(uint256 tokenId) external;\\n\\n function acceptOffer(uint256 tokenId, address maker) external;\\n\\n event ListForSale(\\n uint256 indexed tokenId,\\n address indexed owner,\\n uint256 price,\\n address currency,\\n uint64 deadline,\\n bool indexed auction\\n );\\n event CancelListing(uint256 indexed tokenId, address indexed owner);\\n event MakeOffer(uint256 indexed tokenId, address indexed maker, uint256 price, address currency, uint256 deadline);\\n event WithdrawOffer(uint256 indexed tokenId, address indexed maker);\\n event AcceptOffer(\\n uint256 indexed tokenId,\\n address indexed maker,\\n address indexed taker,\\n uint256 price,\\n address currency,\\n uint256 deadline\\n );\\n event Buy(uint256 indexed tokenId, address indexed owner, address indexed bidder, uint256 price, address currency);\\n event Bid(uint256 indexed tokenId, address indexed owner, address indexed bidder, uint256 price, address currency);\\n event Claim(\\n uint256 indexed tokenId,\\n address indexed owner,\\n address indexed bidder,\\n uint256 price,\\n address currency\\n );\\n}\\n\",\"keccak256\":\"0x59e9d149d62cb86b89039909098b85ec63e5e75de92dc14a859083c3cb7e0066\",\"license\":\"UNLICENSED\"},\"contracts/libraries/NFTs.sol\":{\"content\":\"// SPDX-License-Identifier: UNLICENSED\\npragma solidity ^0.8.15;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC721/IERC721.sol\\\";\\nimport \\\"../interfaces/ICryptoPunksMarket.sol\\\";\\n\\nlibrary NFTs {\\n address constant CRYPTOPUNKS = 0xb47e3cd837dDF8e4c57F05d70Ab865de6e193BBB;\\n\\n function ownerOf(address token, uint256 tokenId) internal view returns (address) {\\n if (token == CRYPTOPUNKS) {\\n return ICryptoPunksMarket(token).punkIndexToAddress(tokenId);\\n } else {\\n return IERC721(token).ownerOf(tokenId);\\n }\\n }\\n\\n function safeTransferFrom(\\n address token,\\n address from,\\n address to,\\n uint256 tokenId\\n ) internal {\\n if (token == CRYPTOPUNKS) {\\n // ICryptoPunksMarket.offerPunkForSaleToAddress() should have been called by the owner prior to this call\\n ICryptoPunksMarket(token).buyPunk(tokenId);\\n if (to != address(this)) {\\n ICryptoPunksMarket(token).transferPunk(to, tokenId);\\n }\\n } else {\\n IERC721(token).safeTransferFrom(from, to, tokenId);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xee54fdc1fb63ed0b67047f19287777b42080f4476e6f4838d294472ba0593d18\",\"license\":\"UNLICENSED\"}},\"version\":1}", "bytecode": "0x60c060405234801561001057600080fd5b5060405161115f38038061115f83398101604081905261002f91610096565b61003833610046565b60809190915260a0526100ba565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080604083850312156100a957600080fd5b505080516020909101519092909150565b60805160a0516110726100ed6000396000818161026e01526106540152600081816102950152610a5e01526110726000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c80638da5cb5b116100a2578063a4d66daf11610071578063a4d66daf14610269578063aa8c217c14610290578063bf56b371146102b7578063c45a0155146102c0578063f2fde38b146102d357600080fd5b80638da5cb5b1461022957806396d162981461023a5780639aa0a466146102435780639e29c9cf1461025657600080fd5b80635bb47808116100e95780635bb478081461019b5780636c1cac4a146101ae5780636db5c8fd146101dc578063715018a6146101f357806386019e1d146101fb57600080fd5b806301339c211461011b57806343add2e61461012557806349919e621461015d5780634f2bfe5b14610170575b600080fd5b6101236102e6565b005b610148610133366004610de6565b60066020526000908152604090205460ff1681565b60405190151581526020015b60405180910390f35b61012361016b366004610e56565b61033f565b600254610183906001600160a01b031681565b6040516001600160a01b039091168152602001610154565b6101236101a9366004610de6565b61045c565b6101486101bc366004610e98565b600760209081526000928352604080842090915290825290205460ff1681565b6101e560035481565b604051908152602001610154565b610123610591565b610148610209366004610e98565b600860209081526000928352604080842090915290825290205460ff1681565b6000546001600160a01b0316610183565b6101e560045481565b610123610251366004610ec4565b6105c7565b610123610264366004610f19565b61081b565b6101e57f000000000000000000000000000000000000000000000000000000000000000081565b6101e57f000000000000000000000000000000000000000000000000000000000000000081565b6101e560055481565b600154610183906001600160a01b031681565b6101236102e1366004610de6565b610ae1565b6000546001600160a01b031633146103195760405162461bcd60e51b815260040161031090610f4e565b60405180910390fd5b600554156103395760405162461bcd60e51b815260040161031090610f83565b42600555565b6000546001600160a01b031633146103695760405162461bcd60e51b815260040161031090610f4e565b600554156103895760405162461bcd60e51b815260040161031090610f83565b60005b81811015610457576001600660008585858181106103ac576103ac610fa9565b90506020020160208101906103c19190610de6565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790558282828181106103fb576103fb610fa9565b90506020020160208101906104109190610de6565b6001600160a01b03167f6077476a981d09a671dcf75f020b16a4a55b5221b00225c895d94cac2c5a431a60405160405180910390a28061044f81610fd5565b91505061038c565b505050565b6000546001600160a01b031633146104865760405162461bcd60e51b815260040161031090610f4e565b600180546001600160a01b0319166001600160a01b03831690811790915560408051634f2bfe5b60e01b81529051634f2bfe5b916004808201926020929091908290030181865afa1580156104df573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105039190610fee565b600260006101000a8154816001600160a01b0302191690836001600160a01b03160217905550806001600160a01b0316636db5c8fd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610567573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061058b919061100b565b60035550565b6000546001600160a01b031633146105bb5760405162461bcd60e51b815260040161031090610f4e565b6105c56000610b7c565b565b600554156105e75760405162461bcd60e51b815260040161031090610f83565b6001600160a01b03831660009081526006602052604090205460ff1661064f5760405162461bcd60e51b815260206004820152601a60248201527f45413a20434f4c4c454354494f4e5f4e4f545f414c4c4f5745440000000000006044820152606401610310565b6004547f00000000000000000000000000000000000000000000000000000000000000009061067f908390611024565b11156106c15760405162461bcd60e51b815260206004820152601160248201527011504e88131253525517d4915050d21151607a1b6044820152606401610310565b60005b818110156107fb57336106ef858585858181106106e3576106e3610fa9565b90506020020135610bcc565b6001600160a01b0316146107355760405162461bcd60e51b815260206004820152600d60248201526c22a09d102327a92124a22222a760991b6044820152606401610310565b6001600160a01b038416600090815260076020526040812060019185858581811061076257610762610fa9565b90506020020135815260200190815260200160002060006101000a81548160ff021916908315150217905550836001600160a01b03167fc8c879fca8136256b50f8a531065e23d65edc1c4e50d34e8b089238493de5d938484848181106107cb576107cb610fa9565b905060200201356040516107e191815260200190565b60405180910390a2806107f381610fd5565b9150506106c4565b5081819050600460008282546108119190611024565b9091555050505050565b6000600554116108605760405162461bcd60e51b815260206004820152601060248201526f11504e881393d517d310555390d2115160821b6044820152606401610310565b6001600160a01b038316600090815260076020908152604080832085845290915290205460ff166108c95760405162461bcd60e51b815260206004820152601360248201527211504e881393d517d5d2125511531254d51151606a1b6044820152606401610310565b6001600160a01b0383166000908152600860209081526040808320858452909152