Unable to verify contracts on Etherscan programatically, manually works
See original GitHub issueI’m unable to verify my contract via the plugin, but if I copy the source directly into the verifier on Rinkeby Etherscan the verification works perfectly.
I noticed the API call is stripping the multiline comments from the “sourceCode” field in the API call, but that is the only thing I can see that’s different. The compiler version, runs, etc. are all the same. Here’s the output of the debug call if it helps:
DEBUG logging is turned ON
Verifying PromotedPool@0x3D0Cb6CC9ddc16e96B26b4a0613bb46667ff2928
Reading artifact file at /Users/chrispiatt/workspace/blocklytics/promoted-pools/contracts/build/contracts/PromotedPool.json
Custom address 0x3D0Cb6CC9ddc16e96B26b4a0613bb46667ff2928 specified
Retrieving constructor parameters from https://api-rinkeby.etherscan.io/api?module=account&action=txlist&address=0x3D0Cb6CC9ddc16e96B26b4a0613bb46667ff2928&page=1&sort=asc&offset=1
Constructor parameters received: 0x000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000f57b2c51ded3a29e6891aba85459d600256cf317000000000000000000000000000000000000000000000000000000000000000f506f6f6c732e6679692050726f6d6f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034659490000000000000000000000000000000000000000000000000000000000
Flattening source file /Users/chrispiatt/workspace/blocklytics/promoted-pools/contracts/contracts/PromotedPool.sol
Sending verify request with POST arguments:
{
"apikey": "27M9WCQP64YCKCZ74ENNVKCVR771X76BZM",
"module": "contract",
"action": "verifysourcecode",
"contractaddress": "0x3D0Cb6CC9ddc16e96B26b4a0613bb46667ff2928",
"sourceCode": "pragma solidity ^0.5.0;\n\n\ncontract Context {\n // Empty internal constructor, to prevent people from mistakenly deploying\n // an instance of this contract, which should be used via inheritance.\n constructor () internal { }\n // solhint-disable-previous-line no-empty-blocks\n\n function _msgSender() internal view returns (address payable) {\n return msg.sender;\n }\n\n function _msgData() internal view returns (bytes memory) {\n this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n return msg.data;\n }\n}\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\ncontract IERC721 is IERC165 {\n event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);\n event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\n\n /**\n * @dev Returns the number of NFTs in `owner`'s account.\n */\n function balanceOf(address owner) public view returns (uint256 balance);\n\n /**\n * @dev Returns the owner of the NFT specified by `tokenId`.\n */\n function ownerOf(uint256 tokenId) public view returns (address owner);\n\n /**\n * @dev Transfers a specific NFT (`tokenId`) from one account (`from`) to\n * another (`to`).\n *\n *\n *\n * Requirements:\n * - `from`, `to` cannot be zero.\n * - `tokenId` must be owned by `from`.\n * - If the caller is not `from`, it must be have been allowed to move this\n * NFT by either {approve} or {setApprovalForAll}.\n */\n function safeTransferFrom(address from, address to, uint256 tokenId) public;\n /**\n * @dev Transfers a specific NFT (`tokenId`) from one account (`from`) to\n * another (`to`).\n *\n * Requirements:\n * - If the caller is not `from`, it must be approved to move this NFT by\n * either {approve} or {setApprovalForAll}.\n */\n function transferFrom(address from, address to, uint256 tokenId) public;\n function approve(address to, uint256 tokenId) public;\n function getApproved(uint256 tokenId) public view returns (address operator);\n\n function setApprovalForAll(address operator, bool _approved) public;\n function isApprovedForAll(address owner, address operator) public view returns (bool);\n\n\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public;\n}\n\ncontract IERC721Receiver {\n /**\n * @notice Handle the receipt of an NFT\n * @dev The ERC721 smart contract calls this function on the recipient\n * after a {IERC721-safeTransferFrom}. This function MUST return the function selector,\n * otherwise the caller will revert the transaction. The selector to be\n * returned can be obtained as `this.onERC721Received.selector`. This\n * function MAY throw to revert and reject the transfer.\n * Note: the ERC721 contract address is always the message sender.\n * @param operator The address which called `safeTransferFrom` function\n * @param from The address which previously owned the token\n * @param tokenId The NFT identifier which is being transferred\n * @param data Additional data with no specified format\n * @return bytes4 `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`\n */\n function onERC721Received(address operator, address from, uint256 tokenId, bytes memory data)\n public returns (bytes4);\n}\n\nlibrary SafeMath {\n /**\n * @dev Returns the addition of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `+` operator.\n *\n * Requirements:\n * - Addition cannot overflow.\n */\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\n uint256 c = a + b;\n require(c >= a, \"SafeMath: addition overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n */\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n return sub(a, b, \"SafeMath: subtraction overflow\");\n }\n\n /**\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n * overflow (when the result is negative).\n *\n * Counterpart to Solidity's `-` operator.\n *\n * Requirements:\n * - Subtraction cannot overflow.\n *\n * _Available since v2.4.0._\n */\n function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b <= a, errorMessage);\n uint256 c = a - b;\n\n return c;\n }\n\n /**\n * @dev Returns the multiplication of two unsigned integers, reverting on\n * overflow.\n *\n * Counterpart to Solidity's `*` operator.\n *\n * Requirements:\n * - Multiplication cannot overflow.\n */\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n // benefit is lost if 'b' is also tested.\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n if (a == 0) {\n return 0;\n }\n\n uint256 c = a * b;\n require(c / a == b, \"SafeMath: multiplication overflow\");\n\n return c;\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\n return div(a, b, \"SafeMath: division by zero\");\n }\n\n /**\n * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\n * division by zero. The result is rounded towards zero.\n *\n * Counterpart to Solidity's `/` operator. Note: this function uses a\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\n * uses an invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n *\n * _Available since v2.4.0._\n */\n function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n // Solidity only automatically asserts when dividing by 0\n require(b > 0, errorMessage);\n uint256 c = a / b;\n // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n return c;\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n */\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n return mod(a, b, \"SafeMath: modulo by zero\");\n }\n\n /**\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n * Reverts with custom message when dividing by zero.\n *\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\n * opcode (which leaves remaining gas untouched) while Solidity uses an\n * invalid opcode to revert (consuming all remaining gas).\n *\n * Requirements:\n * - The divisor cannot be zero.\n *\n * _Available since v2.4.0._\n */\n function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n require(b != 0, errorMessage);\n return a % b;\n }\n}\n\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * This test is non-exhaustive, and there may be false-negatives: during the\n * execution of a contract's constructor, its address will be reported as\n * not containing a contract.\n *\n * IMPORTANT: It is unsafe to assume that an address for which this\n * function returns false is an externally-owned account (EOA) and not a\n * contract.\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies in extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n // According to EIP-1052, 0x0 is the value returned for not-yet created accounts\n // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned\n // for accounts without code, i.e. `keccak256('')`\n bytes32 codehash;\n bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;\n // solhint-disable-next-line no-inline-assembly\n assembly { codehash := extcodehash(account) }\n return (codehash != 0x0 && codehash != accountHash);\n }\n\n /**\n * @dev Converts an `address` into `address payable`. Note that this is\n * simply a type cast: the actual underlying value is not changed.\n *\n * _Available since v2.4.0._\n */\n function toPayable(address account) internal pure returns (address payable) {\n return address(uint160(account));\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n *\n * _Available since v2.4.0._\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n // solhint-disable-next-line avoid-call-value\n (bool success, ) = recipient.call.value(amount)(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n}\n\nlibrary Counters {\n using SafeMath for uint256;\n\n struct Counter {\n // This variable should never be directly accessed by users of the library: interactions must be restricted to\n // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add\n // this feature: see https://github.com/ethereum/solidity/issues/4637\n uint256 _value; // default: 0\n }\n\n function current(Counter storage counter) internal view returns (uint256) {\n return counter._value;\n }\n\n function increment(Counter storage counter) internal {\n counter._value += 1;\n }\n\n function decrement(Counter storage counter) internal {\n counter._value = counter._value.sub(1);\n }\n}\n\ncontract ERC165 is IERC165 {\n /*\n * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7\n */\n bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;\n\n /**\n * @dev Mapping of interface ids to whether or not it's supported.\n */\n mapping(bytes4 => bool) private _supportedInterfaces;\n\n constructor () internal {\n // Derived contracts need only register support for their own interfaces,\n // we register support for ERC165 itself here\n _registerInterface(_INTERFACE_ID_ERC165);\n }\n\n /**\n * @dev See {IERC165-supportsInterface}.\n *\n * Time complexity O(1), guaranteed to always use less than 30 000 gas.\n */\n function supportsInterface(bytes4 interfaceId) external view returns (bool) {\n return _supportedInterfaces[interfaceId];\n }\n\n /**\n * @dev Registers the contract as an implementer of the interface defined by\n * `interfaceId`. Support of the actual ERC165 interface is automatic and\n * registering its interface id is not required.\n *\n * See {IERC165-supportsInterface}.\n *\n * Requirements:\n *\n * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`).\n */\n function _registerInterface(bytes4 interfaceId) internal {\n require(interfaceId != 0xffffffff, \"ERC165: invalid interface id\");\n _supportedInterfaces[interfaceId] = true;\n }\n}\n\ncontract ERC721 is Context, ERC165, IERC721 {\n using SafeMath for uint256;\n using Address for address;\n using Counters for Counters.Counter;\n\n // Equals to `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`\n // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector`\n bytes4 private constant _ERC721_RECEIVED = 0x150b7a02;\n\n // Mapping from token ID to owner\n mapping (uint256 => address) private _tokenOwner;\n\n // Mapping from token ID to approved address\n mapping (uint256 => address) private _tokenApprovals;\n\n // Mapping from owner to number of owned token\n mapping (address => Counters.Counter) private _ownedTokensCount;\n\n // Mapping from owner to operator approvals\n mapping (address => mapping (address => bool)) private _operatorApprovals;\n\n /*\n * bytes4(keccak256('balanceOf(address)')) == 0x70a08231\n * bytes4(keccak256('ownerOf(uint256)')) == 0x6352211e\n * bytes4(keccak256('approve(address,uint256)')) == 0x095ea7b3\n * bytes4(keccak256('getApproved(uint256)')) == 0x081812fc\n * bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465\n * bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c5\n * bytes4(keccak256('transferFrom(address,address,uint256)')) == 0x23b872dd\n * bytes4(keccak256('safeTransferFrom(address,address,uint256)')) == 0x42842e0e\n * bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)')) == 0xb88d4fde\n *\n * => 0x70a08231 ^ 0x6352211e ^ 0x095ea7b3 ^ 0x081812fc ^\n * 0xa22cb465 ^ 0xe985e9c ^ 0x23b872dd ^ 0x42842e0e ^ 0xb88d4fde == 0x80ac58cd\n */\n bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd;\n\n constructor () public {\n // register the supported interfaces to conform to ERC721 via ERC165\n _registerInterface(_INTERFACE_ID_ERC721);\n }\n\n /**\n * @dev Gets the balance of the specified address.\n * @param owner address to query the balance of\n * @return uint256 representing the amount owned by the passed address\n */\n function balanceOf(address owner) public view returns (uint256) {\n require(owner != address(0), \"ERC721: balance query for the zero address\");\n\n return _ownedTokensCount[owner].current();\n }\n\n /**\n * @dev Gets the owner of the specified token ID.\n * @param tokenId uint256 ID of the token to query the owner of\n * @return address currently marked as the owner of the given token ID\n */\n function ownerOf(uint256 tokenId) public view returns (address) {\n address owner = _tokenOwner[tokenId];\n require(owner != address(0), \"ERC721: owner query for nonexistent token\");\n\n return owner;\n }\n\n /**\n * @dev Approves another address to transfer the given token ID\n * The zero address indicates there is no approved address.\n * There can only be one approved address per token at a given time.\n * Can only be called by the token owner or an approved operator.\n * @param to address to be approved for the given token ID\n * @param tokenId uint256 ID of the token to be approved\n */\n function approve(address to, uint256 tokenId) public {\n address owner = ownerOf(tokenId);\n require(to != owner, \"ERC721: approval to current owner\");\n\n require(_msgSender() == owner || isApprovedForAll(owner, _msgSender()),\n \"ERC721: approve caller is not owner nor approved for all\"\n );\n\n _tokenApprovals[tokenId] = to;\n emit Approval(owner, to, tokenId);\n }\n\n /**\n * @dev Gets the approved address for a token ID, or zero if no address set\n * Reverts if the token ID does not exist.\n * @param tokenId uint256 ID of the token to query the approval of\n * @return address currently approved for the given token ID\n */\n function getApproved(uint256 tokenId) public view returns (address) {\n require(_exists(tokenId), \"ERC721: approved query for nonexistent token\");\n\n return _tokenApprovals[tokenId];\n }\n\n /**\n * @dev Sets or unsets the approval of a given operator\n * An operator is allowed to transfer all tokens of the sender on their behalf.\n * @param to operator address to set the approval\n * @param approved representing the status of the approval to be set\n */\n function setApprovalForAll(address to, bool approved) public {\n require(to != _msgSender(), \"ERC721: approve to caller\");\n\n _operatorApprovals[_msgSender()][to] = approved;\n emit ApprovalForAll(_msgSender(), to, approved);\n }\n\n /**\n * @dev Tells whether an operator is approved by a given owner.\n * @param owner owner address which you want to query the approval of\n * @param operator operator address which you want to query the approval of\n * @return bool whether the given operator is approved by the given owner\n */\n function isApprovedForAll(address owner, address operator) public view returns (bool) {\n return _operatorApprovals[owner][operator];\n }\n\n /**\n * @dev Transfers the ownership of a given token ID to another address.\n * Usage of this method is discouraged, use {safeTransferFrom} whenever possible.\n * Requires the msg.sender to be the owner, approved, or operator.\n * @param from current owner of the token\n * @param to address to receive the ownership of the given token ID\n * @param tokenId uint256 ID of the token to be transferred\n */\n function transferFrom(address from, address to, uint256 tokenId) public {\n //solhint-disable-next-line max-line-length\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"ERC721: transfer caller is not owner nor approved\");\n\n _transferFrom(from, to, tokenId);\n }\n\n /**\n * @dev Safely transfers the ownership of a given token ID to another address\n * If the target address is a contract, it must implement {IERC721Receiver-onERC721Received},\n * which is called upon a safe transfer, and return the magic value\n * `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`; otherwise,\n * the transfer is reverted.\n * Requires the msg.sender to be the owner, approved, or operator\n * @param from current owner of the token\n * @param to address to receive the ownership of the given token ID\n * @param tokenId uint256 ID of the token to be transferred\n */\n function safeTransferFrom(address from, address to, uint256 tokenId) public {\n safeTransferFrom(from, to, tokenId, \"\");\n }\n\n /**\n * @dev Safely transfers the ownership of a given token ID to another address\n * If the target address is a contract, it must implement {IERC721Receiver-onERC721Received},\n * which is called upon a safe transfer, and return the magic value\n * `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`; otherwise,\n * the transfer is reverted.\n * Requires the _msgSender() to be the owner, approved, or operator\n * @param from current owner of the token\n * @param to address to receive the ownership of the given token ID\n * @param tokenId uint256 ID of the token to be transferred\n * @param _data bytes data to send along with a safe transfer check\n */\n function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public {\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"ERC721: transfer caller is not owner nor approved\");\n _safeTransferFrom(from, to, tokenId, _data);\n }\n\n /**\n * @dev Safely transfers the ownership of a given token ID to another address\n * If the target address is a contract, it must implement `onERC721Received`,\n * which is called upon a safe transfer, and return the magic value\n * `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`; otherwise,\n * the transfer is reverted.\n * Requires the msg.sender to be the owner, approved, or operator\n * @param from current owner of the token\n * @param to address to receive the ownership of the given token ID\n * @param tokenId uint256 ID of the token to be transferred\n * @param _data bytes data to send along with a safe transfer check\n */\n function _safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) internal {\n _transferFrom(from, to, tokenId);\n require(_checkOnERC721Received(from, to, tokenId, _data), \"ERC721: transfer to non ERC721Receiver implementer\");\n }\n\n /**\n * @dev Returns whether the specified token exists.\n * @param tokenId uint256 ID of the token to query the existence of\n * @return bool whether the token exists\n */\n function _exists(uint256 tokenId) internal view returns (bool) {\n address owner = _tokenOwner[tokenId];\n return owner != address(0);\n }\n\n /**\n * @dev Returns whether the given spender can transfer a given token ID.\n * @param spender address of the spender to query\n * @param tokenId uint256 ID of the token to be transferred\n * @return bool whether the msg.sender is approved for the given token ID,\n * is an operator of the owner, or is the owner of the token\n */\n function _isApprovedOrOwner(address spender, uint256 tokenId) internal view returns (bool) {\n require(_exists(tokenId), \"ERC721: operator query for nonexistent token\");\n address owner = ownerOf(tokenId);\n return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));\n }\n\n /**\n * @dev Internal function to safely mint a new token.\n * Reverts if the given token ID already exists.\n * If the target address is a contract, it must implement `onERC721Received`,\n * which is called upon a safe transfer, and return the magic value\n * `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`; otherwise,\n * the transfer is reverted.\n * @param to The address that will own the minted token\n * @param tokenId uint256 ID of the token to be minted\n */\n function _safeMint(address to, uint256 tokenId) internal {\n _safeMint(to, tokenId, \"\");\n }\n\n /**\n * @dev Internal function to safely mint a new token.\n * Reverts if the given token ID already exists.\n * If the target address is a contract, it must implement `onERC721Received`,\n * which is called upon a safe transfer, and return the magic value\n * `bytes4(keccak256(\"onERC721Received(address,address,uint256,bytes)\"))`; otherwise,\n * the transfer is reverted.\n * @param to The address that will own the minted token\n * @param tokenId uint256 ID of the token to be minted\n * @param _data bytes data to send along with a safe transfer check\n */\n function _safeMint(address to, uint256 tokenId, bytes memory _data) internal {\n _mint(to, tokenId);\n require(_checkOnERC721Received(address(0), to, tokenId, _data), \"ERC721: transfer to non ERC721Receiver implementer\");\n }\n\n /**\n * @dev Internal function to mint a new token.\n * Reverts if the given token ID already exists.\n * @param to The address that will own the minted token\n * @param tokenId uint256 ID of the token to be minted\n */\n function _mint(address to, uint256 tokenId) internal {\n require(to != address(0), \"ERC721: mint to the zero address\");\n require(!_exists(tokenId), \"ERC721: token already minted\");\n\n _tokenOwner[tokenId] = to;\n _ownedTokensCount[to].increment();\n\n emit Transfer(address(0), to, tokenId);\n }\n\n /**\n * @dev Internal function to burn a specific token.\n * Reverts if the token does not exist.\n * Deprecated, use {_burn} instead.\n * @param owner owner of the token to burn\n * @param tokenId uint256 ID of the token being burned\n */\n function _burn(address owner, uint256 tokenId) internal {\n require(ownerOf(tokenId) == owner, \"ERC721: burn of token that is not own\");\n\n _clearApproval(tokenId);\n\n _ownedTokensCount[owner].decrement();\n _tokenOwner[tokenId] = address(0);\n\n emit Transfer(owner, address(0), tokenId);\n }\n\n /**\n * @dev Internal function to burn a specific token.\n * Reverts if the token does not exist.\n * @param tokenId uint256 ID of the token being burned\n */\n function _burn(uint256 tokenId) internal {\n _burn(ownerOf(tokenId), tokenId);\n }\n\n /**\n * @dev Internal function to transfer ownership of a given token ID to another address.\n * As opposed to {transferFrom}, this imposes no restrictions on msg.sender.\n * @param from current owner of the token\n * @param to address to receive the ownership of the given token ID\n * @param tokenId uint256 ID of the token to be transferred\n */\n function _transferFrom(address from, address to, uint256 tokenId) internal {\n require(ownerOf(tokenId) == from, \"ERC721: transfer of token that is not own\");\n require(to != address(0), \"ERC721: transfer to the zero address\");\n\n _clearApproval(tokenId);\n\n _ownedTokensCount[from].decrement();\n _ownedTokensCount[to].increment();\n\n _tokenOwner[tokenId] = to;\n\n emit Transfer(from, to, tokenId);\n }\n\n /**\n * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.\n * The call is not executed if the target address is not a contract.\n *\n * This function is deprecated.\n * @param from address representing the previous owner of the given token ID\n * @param to target address that will receive the tokens\n * @param tokenId uint256 ID of the token to be transferred\n * @param _data bytes optional data to send along with the call\n * @return bool whether the call correctly returned the expected magic value\n */\n function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory _data)\n internal returns (bool)\n {\n if (!to.isContract()) {\n return true;\n }\n\n bytes4 retval = IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data);\n return (retval == _ERC721_RECEIVED);\n }\n\n /**\n * @dev Private function to clear current approval of a given token ID.\n * @param tokenId uint256 ID of the token to be transferred\n */\n function _clearApproval(uint256 tokenId) private {\n if (_tokenApprovals[tokenId] != address(0)) {\n _tokenApprovals[tokenId] = address(0);\n }\n }\n}\n\ncontract IERC721Enumerable is IERC721 {\n function totalSupply() public view returns (uint256);\n function tokenOfOwnerByIndex(address owner, uint256 index) public view returns (uint256 tokenId);\n\n function tokenByIndex(uint256 index) public view returns (uint256);\n}\n\ncontract ERC721Enumerable is Context, ERC165, ERC721, IERC721Enumerable {\n // Mapping from owner to list of owned token IDs\n mapping(address => uint256[]) private _ownedTokens;\n\n // Mapping from token ID to index of the owner tokens list\n mapping(uint256 => uint256) private _ownedTokensIndex;\n\n // Array with all token ids, used for enumeration\n uint256[] private _allTokens;\n\n // Mapping from token id to position in the allTokens array\n mapping(uint256 => uint256) private _allTokensIndex;\n\n /*\n * bytes4(keccak256('totalSupply()')) == 0x18160ddd\n * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) == 0x2f745c59\n * bytes4(keccak256('tokenByIndex(uint256)')) == 0x4f6ccce7\n *\n * => 0x18160ddd ^ 0x2f745c59 ^ 0x4f6ccce7 == 0x780e9d63\n */\n bytes4 private constant _INTERFACE_ID_ERC721_ENUMERABLE = 0x780e9d63;\n\n /**\n * @dev Constructor function.\n */\n constructor () public {\n // register the supported interface to conform to ERC721Enumerable via ERC165\n _registerInterface(_INTERFACE_ID_ERC721_ENUMERABLE);\n }\n\n /**\n * @dev Gets the token ID at a given index of the tokens list of the requested owner.\n * @param owner address owning the tokens list to be accessed\n * @param index uint256 representing the index to be accessed of the requested tokens list\n * @return uint256 token ID at the given index of the tokens list owned by the requested address\n */\n function tokenOfOwnerByIndex(address owner, uint256 index) public view returns (uint256) {\n require(index < balanceOf(owner), \"ERC721Enumerable: owner index out of bounds\");\n return _ownedTokens[owner][index];\n }\n\n /**\n * @dev Gets the total amount of tokens stored by the contract.\n * @return uint256 representing the total amount of tokens\n */\n function totalSupply() public view returns (uint256) {\n return _allTokens.length;\n }\n\n /**\n * @dev Gets the token ID at a given index of all the tokens in this contract\n * Reverts if the index is greater or equal to the total number of tokens.\n * @param index uint256 representing the index to be accessed of the tokens list\n * @return uint256 token ID at the given index of the tokens list\n */\n function tokenByIndex(uint256 index) public view returns (uint256) {\n require(index < totalSupply(), \"ERC721Enumerable: global index out of bounds\");\n return _allTokens[index];\n }\n\n /**\n * @dev Internal function to transfer ownership of a given token ID to another address.\n * As opposed to transferFrom, this imposes no restrictions on msg.sender.\n * @param from current owner of the token\n * @param to address to receive the ownership of the given token ID\n * @param tokenId uint256 ID of the token to be transferred\n */\n function _transferFrom(address from, address to, uint256 tokenId) internal {\n super._transferFrom(from, to, tokenId);\n\n _removeTokenFromOwnerEnumeration(from, tokenId);\n\n _addTokenToOwnerEnumeration(to, tokenId);\n }\n\n /**\n * @dev Internal function to mint a new token.\n * Reverts if the given token ID already exists.\n * @param to address the beneficiary that will own the minted token\n * @param tokenId uint256 ID of the token to be minted\n */\n function _mint(address to, uint256 tokenId) internal {\n super._mint(to, tokenId);\n\n _addTokenToOwnerEnumeration(to, tokenId);\n\n _addTokenToAllTokensEnumeration(tokenId);\n }\n\n /**\n * @dev Internal function to burn a specific token.\n * Reverts if the token does not exist.\n * Deprecated, use {ERC721-_burn} instead.\n * @param owner owner of the token to burn\n * @param tokenId uint256 ID of the token being burned\n */\n function _burn(address owner, uint256 tokenId) internal {\n super._burn(owner, tokenId);\n\n _removeTokenFromOwnerEnumeration(owner, tokenId);\n // Since tokenId will be deleted, we can clear its slot in _ownedTokensIndex to trigger a gas refund\n _ownedTokensIndex[tokenId] = 0;\n\n _removeTokenFromAllTokensEnumeration(tokenId);\n }\n\n /**\n * @dev Gets the list of token IDs of the requested owner.\n * @param owner address owning the tokens\n * @return uint256[] List of token IDs owned by the requested address\n */\n function _tokensOfOwner(address owner) internal view returns (uint256[] storage) {\n return _ownedTokens[owner];\n }\n\n /**\n * @dev Private function to add a token to this extension's ownership-tracking data structures.\n * @param to address representing the new owner of the given token ID\n * @param tokenId uint256 ID of the token to be added to the tokens list of the given address\n */\n function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {\n _ownedTokensIndex[tokenId] = _ownedTokens[to].length;\n _ownedTokens[to].push(tokenId);\n }\n\n /**\n * @dev Private function to add a token to this extension's token tracking data structures.\n * @param tokenId uint256 ID of the token to be added to the tokens list\n */\n function _addTokenToAllTokensEnumeration(uint256 tokenId) private {\n _allTokensIndex[tokenId] = _allTokens.length;\n _allTokens.push(tokenId);\n }\n\n /**\n * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that\n * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for\n * gas optimizations e.g. when performing a transfer operation (avoiding double writes).\n * This has O(1) time complexity, but alters the order of the _ownedTokens array.\n * @param from address representing the previous owner of the given token ID\n * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address\n */\n function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {\n // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and\n // then delete the last slot (swap and pop).\n\n uint256 lastTokenIndex = _ownedTokens[from].length.sub(1);\n uint256 tokenIndex = _ownedTokensIndex[tokenId];\n\n // When the token to delete is the last token, the swap operation is unnecessary\n if (tokenIndex != lastTokenIndex) {\n uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];\n\n _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token\n _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index\n }\n\n // This also deletes the contents at the last position of the array\n _ownedTokens[from].length--;\n\n // Note that _ownedTokensIndex[tokenId] hasn't been cleared: it still points to the old slot (now occupied by\n // lastTokenId, or just over the end of the array if the token was the last one).\n }\n\n /**\n * @dev Private function to remove a token from this extension's token tracking data structures.\n * This has O(1) time complexity, but alters the order of the _allTokens array.\n * @param tokenId uint256 ID of the token to be removed from the tokens list\n */\n function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {\n // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and\n // then delete the last slot (swap and pop).\n\n uint256 lastTokenIndex = _allTokens.length.sub(1);\n uint256 tokenIndex = _allTokensIndex[tokenId];\n\n // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so\n // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding\n // an 'if' statement (like in _removeTokenFromOwnerEnumeration)\n uint256 lastTokenId = _allTokens[lastTokenIndex];\n\n _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token\n _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index\n\n // This also deletes the contents at the last position of the array\n _allTokens.length--;\n _allTokensIndex[tokenId] = 0;\n }\n}\n\ncontract IERC721Metadata is IERC721 {\n function name() external view returns (string memory);\n function symbol() external view returns (string memory);\n function tokenURI(uint256 tokenId) external view returns (string memory);\n}\n\ncontract ERC721Metadata is Context, ERC165, ERC721, IERC721Metadata {\n // Token name\n string private _name;\n\n // Token symbol\n string private _symbol;\n\n // Optional mapping for token URIs\n mapping(uint256 => string) private _tokenURIs;\n\n /*\n * bytes4(keccak256('name()')) == 0x06fdde03\n * bytes4(keccak256('symbol()')) == 0x95d89b41\n * bytes4(keccak256('tokenURI(uint256)')) == 0xc87b56dd\n *\n * => 0x06fdde03 ^ 0x95d89b41 ^ 0xc87b56dd == 0x5b5e139f\n */\n bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f;\n\n /**\n * @dev Constructor function\n */\n constructor (string memory name, string memory symbol) public {\n _name = name;\n _symbol = symbol;\n\n // register the supported interfaces to conform to ERC721 via ERC165\n _registerInterface(_INTERFACE_ID_ERC721_METADATA);\n }\n\n /**\n * @dev Gets the token name.\n * @return string representing the token name\n */\n function name() external view returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Gets the token symbol.\n * @return string representing the token symbol\n */\n function symbol() external view returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns an URI for a given token ID.\n * Throws if the token ID does not exist. May return an empty string.\n * @param tokenId uint256 ID of the token to query\n */\n function tokenURI(uint256 tokenId) external view returns (string memory) {\n require(_exists(tokenId), \"ERC721Metadata: URI query for nonexistent token\");\n return _tokenURIs[tokenId];\n }\n\n /**\n * @dev Internal function to set the token URI for a given token.\n * Reverts if the token ID does not exist.\n * @param tokenId uint256 ID of the token to set its URI\n * @param uri string URI to assign\n */\n function _setTokenURI(uint256 tokenId, string memory uri) internal {\n require(_exists(tokenId), \"ERC721Metadata: URI set of nonexistent token\");\n _tokenURIs[tokenId] = uri;\n }\n\n /**\n * @dev Internal function to burn a specific token.\n * Reverts if the token does not exist.\n * Deprecated, use _burn(uint256) instead.\n * @param owner owner of the token to burn\n * @param tokenId uint256 ID of the token being burned by the msg.sender\n */\n function _burn(address owner, uint256 tokenId) internal {\n super._burn(owner, tokenId);\n\n // Clear metadata (if any)\n if (bytes(_tokenURIs[tokenId]).length != 0) {\n delete _tokenURIs[tokenId];\n }\n }\n}\n\ncontract ERC721Full is ERC721, ERC721Enumerable, ERC721Metadata {\n constructor (string memory name, string memory symbol) public ERC721Metadata(name, symbol) {\n // solhint-disable-previous-line no-empty-blocks\n }\n}\n\ncontract ERC721Burnable is Context, ERC721 {\n /**\n * @dev Burns a specific ERC721 token.\n * @param tokenId uint256 id of the ERC721 token to be burned.\n */\n function burn(uint256 tokenId) public {\n //solhint-disable-next-line max-line-length\n require(_isApprovedOrOwner(_msgSender(), tokenId), \"ERC721Burnable: caller is not owner nor approved\");\n _burn(tokenId);\n }\n}\n\ncontract 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 () internal {\n _owner = _msgSender();\n emit OwnershipTransferred(address(0), _owner);\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view 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(isOwner(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Returns true if the caller is the current owner.\n */\n function isOwner() public view returns (bool) {\n return _msgSender() == _owner;\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 onlyOwner {\n emit OwnershipTransferred(_owner, address(0));\n _owner = 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 onlyOwner {\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n */\n function _transferOwnership(address newOwner) internal {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n emit OwnershipTransferred(_owner, newOwner);\n _owner = newOwner;\n }\n}\n\nlibrary Strings {\n // via https://github.com/oraclize/ethereum-api/blob/master/oraclizeAPI_0.5.sol\n function strConcat(string memory _a, string memory _b, string memory _c, string memory _d, string memory _e) internal pure returns (string memory) {\n bytes memory _ba = bytes(_a);\n bytes memory _bb = bytes(_b);\n bytes memory _bc = bytes(_c);\n bytes memory _bd = bytes(_d);\n bytes memory _be = bytes(_e);\n string memory abcde = new string(_ba.length + _bb.length + _bc.length + _bd.length + _be.length);\n bytes memory babcde = bytes(abcde);\n uint k = 0;\n for (uint i = 0; i < _ba.length; i++) babcde[k++] = _ba[i];\n for (uint i = 0; i < _bb.length; i++) babcde[k++] = _bb[i];\n for (uint i = 0; i < _bc.length; i++) babcde[k++] = _bc[i];\n for (uint i = 0; i < _bd.length; i++) babcde[k++] = _bd[i];\n for (uint i = 0; i < _be.length; i++) babcde[k++] = _be[i];\n return string(babcde);\n }\n\n function strConcat(string memory _a, string memory _b, string memory _c, string memory _d) internal pure returns (string memory) {\n return strConcat(_a, _b, _c, _d, \"\");\n }\n\n function strConcat(string memory _a, string memory _b, string memory _c) internal pure returns (string memory) {\n return strConcat(_a, _b, _c, \"\", \"\");\n }\n\n function strConcat(string memory _a, string memory _b) internal pure returns (string memory) {\n return strConcat(_a, _b, \"\", \"\", \"\");\n }\n\n function uint2str(uint _i) internal pure returns (string memory _uintAsString) {\n if (_i == 0) {\n return \"0\";\n }\n uint j = _i;\n uint len;\n while (j != 0) {\n len++;\n j /= 10;\n }\n bytes memory bstr = new bytes(len);\n uint k = len - 1;\n while (_i != 0) {\n bstr[k--] = byte(uint8(48 + _i % 10));\n _i /= 10;\n }\n return string(bstr);\n }\n}\n\ncontract OwnableDelegateProxy { }\n\ncontract ProxyRegistry {\n mapping(address => OwnableDelegateProxy) public proxies;\n}\n\ncontract PromotedPool is ERC721Full, ERC721Burnable, Ownable {\n using Strings for string;\n\n address proxyRegistryAddress;\n uint256 private _currentTokenId;\n uint256 private _activeTokenId;\n uint8 public currentTermsVersion;\n\n struct PromotionPeriod {\n uint256 startTime;\n uint256 endTime;\n }\n\n struct PoolProposal {\n address proposedPool;\n address approvedPool;\n }\n\n mapping (uint256 => PromotionPeriod) promotionPeriods;\n mapping (uint256 => PoolProposal) proposedPools;\n mapping (uint256 => uint8) termsVersions;\n mapping (uint8 => string) terms;\n\n event MintedToken(uint256 indexed tokenId, address indexed tokenOwner, uint256 indexed startTime, uint256 endTime);\n event PromotedPoolProposed(address indexed poolAddress, uint256 indexed tokenId, uint256 indexed startTime, uint256 endTime);\n event PromotedPoolApproved(address indexed poolAddress, uint256 indexed tokenId, uint256 indexed startTime, uint256 endTime);\n event ActiveTokenUpdated(uint256 indexed tokenId);\n event PromotedPoolReset(uint256 indexed tokenId);\n\n constructor(string memory _name, string memory _symbol, address _proxyRegistryAddress) ERC721Full(_name, _symbol) public {\n proxyRegistryAddress = _proxyRegistryAddress;\n }\n\n /**\n * @dev Mints a token to an address with a tokenURI.\n * @param _to address of the future owner of the token\n */\n function mintTo(address _to, uint256 _startTime, uint256 _endTime, string memory _termsHash, uint8 _termsVersion) public onlyOwner {\n require(_startTime > now, \"Token must have start time in the future.\");\n require(_startTime > promotionPeriods[_currentTokenId].endTime, \"Token must have start time > most recent token's end time\");\n if(promotionPeriods[_currentTokenId].endTime != 0) {\n require(_startTime - promotionPeriods[_currentTokenId].endTime < 7890000 , \"Token must have start time < 1 year after the most recent token's end time\");\n }\n uint256 newTokenId = _getNextTokenId();\n _mint(_to, newTokenId);\n _incrementTokenId();\n promotionPeriods[newTokenId] = PromotionPeriod(_startTime, _endTime);\n proposedPools[newTokenId] = PoolProposal(address(0), address(0));\n if(_termsVersion > currentTermsVersion) {\n terms[_termsVersion] = _termsHash;\n currentTermsVersion = _termsVersion;\n }\n termsVersions[newTokenId] = _termsVersion;\n emit MintedToken(newTokenId, _to, _startTime, _endTime);\n }\n\n function proposePromotedPool(uint256 _tokenId, address _poolAddress) public {\n require(msg.sender == ownerOf(_tokenId), \"You must be the owner of a valid token to propose a promoted pool\");\n require(promotionPeriods[_tokenId].endTime > now, \"Sorry, this token has expired\");\n proposedPools[_tokenId].proposedPool = _poolAddress;\n emit PromotedPoolProposed(_poolAddress, _tokenId, promotionPeriods[_tokenId].startTime, promotionPeriods[_tokenId].endTime);\n }\n\n function approvePromotedPool(uint256 _tokenId, address _poolAddress) public onlyOwner {\n require(proposedPools[_tokenId].proposedPool == _poolAddress, \"Pool address must match pool proposed by token holder\");\n require(promotionPeriods[_tokenId].endTime > now, \"This token has expired\");\n proposedPools[_tokenId].approvedPool = _poolAddress;\n emit PromotedPoolApproved(_poolAddress, _tokenId, promotionPeriods[_tokenId].startTime, promotionPeriods[_tokenId].endTime);\n }\n\n function resetPromotedPool(uint256 _tokenId) public onlyOwner {\n proposedPools[_tokenId].approvedPool = address(0);\n emit PromotedPoolReset(_tokenId);\n }\n\n function getPromotedPool() public view returns (address) {\n return proposedPools[_activeTokenId].approvedPool;\n }\n\n function setPromotedPool() public {\n require(_currentTokenId > _activeTokenId, \"Mint new token first.\");\n if (now >= promotionPeriods[_activeTokenId].endTime) {\n ++_activeTokenId;\n emit ActiveTokenUpdated(_activeTokenId);\n }\n }\n\n function getTermsHash(uint8 _termsVersion) public view returns(string memory) {\n return terms[_termsVersion];\n }\n\n function getTermsVersion(uint256 _tokenId) public view returns(uint8) {\n return termsVersions[_tokenId];\n }\n\n /**\n * @dev calculates the next token ID based on value of _currentTokenId \n * @return uint256 for the next token ID\n */\n function _getNextTokenId() private view returns (uint256) {\n return _currentTokenId.add(1);\n }\n\n /**\n * @dev increments the value of _currentTokenId \n */\n function _incrementTokenId() private {\n _currentTokenId++;\n }\n\n function baseTokenURI() public view returns (string memory) {\n return \"https://promoted-pools.herokuapp.com/\";\n }\n\n function tokenURI(uint256 _tokenId) external view returns (string memory) {\n return Strings.strConcat(\n baseTokenURI(),\n Strings.uint2str(_tokenId)\n );\n }\n\n /**\n * Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings.\n */\n function isApprovedForAll(\n address owner,\n address operator\n )\n public\n view\n returns (bool)\n {\n // Whitelist OpenSea proxy contract for easy trading.\n ProxyRegistry proxyRegistry = ProxyRegistry(proxyRegistryAddress);\n if (address(proxyRegistry.proxies(owner)) == operator) {\n return true;\n }\n\n return super.isApprovedForAll(owner, operator);\n }\n}",
"codeformat": "solidity-single-file",
"contractname": "PromotedPool",
"compilerversion": "v0.5.12+commit.7709ece9",
"optimizationUsed": 0,
"runs": 200,
"constructorArguements": "000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000f57b2c51ded3a29e6891aba85459d600256cf317000000000000000000000000000000000000000000000000000000000000000f506f6f6c732e6679692050726f6d6f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034659490000000000000000000000000000000000000000000000000000000000"
}
Checking status of verification request g1n6nymenzuc4aim5qfyzwird8nmbh4z8nmwnuy96zb9rxrarb
Fail - Unable to verify
Failed to verify 1 contract(s): PromotedPool@0x3D0Cb6CC9ddc16e96B26b4a0613bb46667ff2928
Any thoughts/additional checks I can do?
Issue Analytics
- State:
- Created 4 years ago
- Comments:38 (9 by maintainers)
Top Results From Across the Web
Contract Troubleshooting - Unable to Verify Contract Source
Follow these steps to in order to verify the contract source and ensures the compiled contract byte code matches the input creation code....
Read more >Can't verify contract on etherscan.io - Ethereum Stack Exchange
I was able to successfully verify the contract code you linked in a new deployment. Are you sure the parameters and source code...
Read more >Sol-verifier Constructor Arguments - Fail - Unable to verify
I am using ether.js for solidity smart contract deployment, and sol-verifier library verifying the smart contract on etherscan.io.
Read more >How To Verify a Smart Contract on Etherscan Using Hardhat
Option 1: Verify Your Contract Using the hardhat-etherscan Plugin Inside the Deployment Script ... With Hardhat, you can verify your smart ...
Read more >5 Important Reasons to Verify Smart Contracts & How to Do It
Want to learn all about Smart Contract verification? Learn why you should verify your contracts, where to do it & what methods Etherscan...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hey @pyython, sorry for dropping the ball on this for so long!
I cloned your repository, added in the correct
.envparameters, then ran:And I got similar results. The
truffle run verifydidn’t work.I tried copy-pasting these values into the Etherscan verify web form. This worked correctly.
So then I tried copy-pasting these values into the Etherscan verify API demo. This did not work.
This leads me to believe that there might be an issue with the Etherscan verify API at the moment, since both truffle-plugin-verify and the API demo did not work, while the web form did work.
@mtbitcoin, could you guys look into this?
For the record about the missing leading zeroes in commit hashes in https://github.com/ethereum/solc-bin/ - we added the missing leading zeroes everywhere now, and changed e.g. lists.txt accordingly - but we still provide symlinks to the historic names without the leading zeroes.