Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 31 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw | 14890190 | 935 days ago | IN | 0 ETH | 0.00116126 | ||||
Withdraw | 14890185 | 935 days ago | IN | 0 ETH | 0.00124581 | ||||
Royalty Payout | 14890155 | 935 days ago | IN | 0 ETH | 0.09280501 | ||||
Royalty Payout | 14890149 | 935 days ago | IN | 0 ETH | 0.14100438 | ||||
Royalty Payout | 14890141 | 935 days ago | IN | 0 ETH | 0.11427997 | ||||
Royalty Payout | 14890133 | 935 days ago | IN | 0 ETH | 0.13325064 | ||||
Transfer | 14890130 | 935 days ago | IN | 2 ETH | 0.00104945 | ||||
Royalty Payout | 14890125 | 935 days ago | IN | 0 ETH | 0.00125711 | ||||
Royalty Payout | 14890121 | 935 days ago | IN | 0 ETH | 0.12275864 | ||||
Royalty Payout | 14890112 | 935 days ago | IN | 0 ETH | 0.15868701 | ||||
Royalty Payout | 14890105 | 935 days ago | IN | 0 ETH | 0.20424219 | ||||
Royalty Payout | 14890094 | 935 days ago | IN | 0 ETH | 0.23276479 | ||||
Royalty Payout | 14890093 | 935 days ago | IN | 0 ETH | 0.20238336 | ||||
Royalty Payout | 14890081 | 935 days ago | IN | 0 ETH | 0.15169745 | ||||
Royalty Payout | 14890078 | 935 days ago | IN | 0 ETH | 0.1311883 | ||||
Transfer | 14890074 | 935 days ago | IN | 5 ETH | 0.00099421 | ||||
Royalty Payout | 14890065 | 935 days ago | IN | 0 ETH | 0.00141889 | ||||
Royalty Payout | 14890065 | 935 days ago | IN | 0 ETH | 0.14854776 | ||||
Royalty Payout | 14890060 | 935 days ago | IN | 0 ETH | 0.10455049 | ||||
Royalty Payout | 14890055 | 935 days ago | IN | 0 ETH | 0.10630464 | ||||
Royalty Payout | 14890049 | 935 days ago | IN | 0 ETH | 0.1220709 | ||||
Royalty Payout | 14890046 | 935 days ago | IN | 0 ETH | 0.14165634 | ||||
Royalty Payout | 14890041 | 935 days ago | IN | 0 ETH | 0.17718012 | ||||
Royalty Payout | 14890041 | 935 days ago | IN | 0 ETH | 0.18053592 | ||||
Transfer | 14890038 | 935 days ago | IN | 5 ETH | 0.00112412 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
14890185 | 935 days ago | 0.05 ETH | ||||
14890155 | 935 days ago | 0.0035 ETH | ||||
14890155 | 935 days ago | 0.0035 ETH | ||||
14890155 | 935 days ago | 0.0035 ETH | ||||
14890155 | 935 days ago | 0.0035 ETH | ||||
14890155 | 935 days ago | 0.0035 ETH | ||||
14890155 | 935 days ago | 0.0035 ETH | ||||
14890155 | 935 days ago | 0.0035 ETH | ||||
14890155 | 935 days ago | 0.0035 ETH | ||||
14890155 | 935 days ago | 0.0035 ETH | ||||
14890155 | 935 days ago | 0.0035 ETH | ||||
14890155 | 935 days ago | 0.0035 ETH | ||||
14890155 | 935 days ago | 0.0035 ETH | ||||
14890155 | 935 days ago | 0.0035 ETH | ||||
14890155 | 935 days ago | 0.0035 ETH | ||||
14890155 | 935 days ago | 0.0035 ETH | ||||
14890155 | 935 days ago | 0.0035 ETH | ||||
14890155 | 935 days ago | 0.0035 ETH | ||||
14890155 | 935 days ago | 0.0035 ETH | ||||
14890155 | 935 days ago | 0.0035 ETH | ||||
14890155 | 935 days ago | 0.0035 ETH | ||||
14890155 | 935 days ago | 0.0035 ETH | ||||
14890155 | 935 days ago | 0.0035 ETH | ||||
14890155 | 935 days ago | 0.0035 ETH | ||||
14890155 | 935 days ago | 0.0035 ETH |
Loading...
Loading
Contract Name:
PharaGoddessRoyaltyReward
Compiler Version
v0.8.9+commit.e5eed63a
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2022-06-02 */ // SPDX-License-Identifier: GPL-3.0 // File: @openzeppelin/contracts/utils/Context.sol pragma solidity ^0.8.9; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } } // File: @openzeppelin/contracts/access/Ownable.sol pragma solidity ^0.8.9; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _setOwner(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _setOwner(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } // File: @openzeppelin/contracts/utils/Address.sol pragma solidity ^0.8.9; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } // File: @openzeppelin/contracts/utils/introspection/IERC165.sol pragma solidity ^0.8.9; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); } // File: @openzeppelin/contracts/token/ERC721/IERC721.sol pragma solidity ^0.8.9; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; } pragma solidity ^0.8.9; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } } pragma solidity ^0.8.9; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); } // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b > a) return (false, 0); return (true, a - b); } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a / b); } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a % b); } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) return 0; uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: division by zero"); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: modulo by zero"); return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); return a - b; } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryDiv}. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); return a % b; } } contract PharaGoddessRoyaltyReward is Ownable, ReentrancyGuard{ using SafeMath for uint256; IERC721Enumerable goddessContract = IERC721Enumerable(0x147aA9ADa01B70c4c8C8B89B06aFe767908acEd7); // Royalty uint public amountOfTokensGotPayout = 0; //in case somebody accidentaly sends funds or transaction to contract receive() payable external {} fallback() payable external { revert(); } function royaltyPayout(uint number, uint256 payout) public onlyOwner { uint256 balance = address(this).balance; require(balance > number * payout, "Insufficient Funds to pay out Royalties!"); require(amountOfTokensGotPayout + number <= goddessContract.totalSupply()); for (uint i; i < number; i++) { (bool success, ) = payable(goddessContract.ownerOf(amountOfTokensGotPayout + i)).call{value: payout}(""); require(success, "Address: unable to send value, recipient may have reverted"); } if (goddessContract.totalSupply() == amountOfTokensGotPayout + number) { amountOfTokensGotPayout = 0; } else { amountOfTokensGotPayout += number; } } function withdraw() public onlyOwner { payable(owner()).transfer(address(this).balance); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"amountOfTokensGotPayout","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":"uint256","name":"number","type":"uint256"},{"internalType":"uint256","name":"payout","type":"uint256"}],"name":"royaltyPayout","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
6080604052600280546001600160a01b03191673147aa9ada01b70c4c8c8b89b06afe767908aced7179055600060035534801561003b57600080fd5b506100453361004e565b6001805561009e565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61077a806100ad6000396000f3fe6080604052600436106100595760003560e01c80633ccfd60b14610065578063715018a61461007c57806382cdc73f146100915780638da5cb5b146100b1578063b3ee44c6146100de578063f2fde38b1461010257600080fd5b3661006057005b600080fd5b34801561007157600080fd5b5061007a610122565b005b34801561008857600080fd5b5061007a610192565b34801561009d57600080fd5b5061007a6100ac366004610616565b6101c8565b3480156100bd57600080fd5b506000546040516001600160a01b0390911681526020015b60405180910390f35b3480156100ea57600080fd5b506100f460035481565b6040519081526020016100d5565b34801561010e57600080fd5b5061007a61011d36600461064d565b610532565b6000546001600160a01b031633146101555760405162461bcd60e51b815260040161014c90610671565b60405180910390fd5b600080546040516001600160a01b03909116914780156108fc02929091818181858888f1935050505015801561018f573d6000803e3d6000fd5b50565b6000546001600160a01b031633146101bc5760405162461bcd60e51b815260040161014c90610671565b6101c660006105c6565b565b6000546001600160a01b031633146101f25760405162461bcd60e51b815260040161014c90610671565b476101fd82846106bc565b811161025c5760405162461bcd60e51b815260206004820152602860248201527f496e73756666696369656e742046756e647320746f20706179206f757420526f60448201526779616c746965732160c01b606482015260840161014c565b600260009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156102aa57600080fd5b505afa1580156102be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102e291906106db565b836003546102f091906106f4565b11156102fb57600080fd5b60005b83811015610471576002546003546000916001600160a01b031690636352211e9061032a9085906106f4565b6040518263ffffffff1660e01b815260040161034891815260200190565b60206040518083038186803b15801561036057600080fd5b505afa158015610374573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610398919061070c565b6001600160a01b03168460405160006040518083038185875af1925050503d80600081146103e2576040519150601f19603f3d011682016040523d82523d6000602084013e6103e7565b606091505b505090508061045e5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d61792068617665207265766572746564000000000000606482015260840161014c565b508061046981610729565b9150506102fe565b508260035461048091906106f4565b600260009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156104ce57600080fd5b505afa1580156104e2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061050691906106db565b1415610516576000600355505050565b826003600082825461052891906106f4565b9091555050505050565b6000546001600160a01b0316331461055c5760405162461bcd60e51b815260040161014c90610671565b6001600160a01b0381166105c15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161014c565b61018f815b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000806040838503121561062957600080fd5b50508035926020909101359150565b6001600160a01b038116811461018f57600080fd5b60006020828403121561065f57600080fd5b813561066a81610638565b9392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156106d6576106d66106a6565b500290565b6000602082840312156106ed57600080fd5b5051919050565b60008219821115610707576107076106a6565b500190565b60006020828403121561071e57600080fd5b815161066a81610638565b600060001982141561073d5761073d6106a6565b506001019056fea2646970667358221220bead3b82ed5e9682009689cb0a370a6b7865d5d39c6e98e65b7d48f74fcb923f64736f6c63430008090033
Deployed Bytecode
0x6080604052600436106100595760003560e01c80633ccfd60b14610065578063715018a61461007c57806382cdc73f146100915780638da5cb5b146100b1578063b3ee44c6146100de578063f2fde38b1461010257600080fd5b3661006057005b600080fd5b34801561007157600080fd5b5061007a610122565b005b34801561008857600080fd5b5061007a610192565b34801561009d57600080fd5b5061007a6100ac366004610616565b6101c8565b3480156100bd57600080fd5b506000546040516001600160a01b0390911681526020015b60405180910390f35b3480156100ea57600080fd5b506100f460035481565b6040519081526020016100d5565b34801561010e57600080fd5b5061007a61011d36600461064d565b610532565b6000546001600160a01b031633146101555760405162461bcd60e51b815260040161014c90610671565b60405180910390fd5b600080546040516001600160a01b03909116914780156108fc02929091818181858888f1935050505015801561018f573d6000803e3d6000fd5b50565b6000546001600160a01b031633146101bc5760405162461bcd60e51b815260040161014c90610671565b6101c660006105c6565b565b6000546001600160a01b031633146101f25760405162461bcd60e51b815260040161014c90610671565b476101fd82846106bc565b811161025c5760405162461bcd60e51b815260206004820152602860248201527f496e73756666696369656e742046756e647320746f20706179206f757420526f60448201526779616c746965732160c01b606482015260840161014c565b600260009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156102aa57600080fd5b505afa1580156102be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102e291906106db565b836003546102f091906106f4565b11156102fb57600080fd5b60005b83811015610471576002546003546000916001600160a01b031690636352211e9061032a9085906106f4565b6040518263ffffffff1660e01b815260040161034891815260200190565b60206040518083038186803b15801561036057600080fd5b505afa158015610374573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610398919061070c565b6001600160a01b03168460405160006040518083038185875af1925050503d80600081146103e2576040519150601f19603f3d011682016040523d82523d6000602084013e6103e7565b606091505b505090508061045e5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d61792068617665207265766572746564000000000000606482015260840161014c565b508061046981610729565b9150506102fe565b508260035461048091906106f4565b600260009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156104ce57600080fd5b505afa1580156104e2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061050691906106db565b1415610516576000600355505050565b826003600082825461052891906106f4565b9091555050505050565b6000546001600160a01b0316331461055c5760405162461bcd60e51b815260040161014c90610671565b6001600160a01b0381166105c15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161014c565b61018f815b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000806040838503121561062957600080fd5b50508035926020909101359150565b6001600160a01b038116811461018f57600080fd5b60006020828403121561065f57600080fd5b813561066a81610638565b9392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156106d6576106d66106a6565b500290565b6000602082840312156106ed57600080fd5b5051919050565b60008219821115610707576107076106a6565b500190565b60006020828403121561071e57600080fd5b815161066a81610638565b600060001982141561073d5761073d6106a6565b506001019056fea2646970667358221220bead3b82ed5e9682009689cb0a370a6b7865d5d39c6e98e65b7d48f74fcb923f64736f6c63430008090033
Deployed Bytecode Sourcemap
27422:1341:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27849:8;;;27422:1341;;;;;;27849:8;;;28656:104;;;;;;;;;;;;;:::i;:::-;;2523:94;;;;;;;;;;;;;:::i;27873:775::-;;;;;;;;;;-1:-1:-1;27873:775:0;;;;;:::i;:::-;;:::i;1872:87::-;;;;;;;;;;-1:-1:-1;1918:7:0;1945:6;1872:87;;-1:-1:-1;;;;;1945:6:0;;;413:51:1;;401:2;386:18;1872:87:0;;;;;;;;27652:39;;;;;;;;;;;;;;;;;;;621:25:1;;;609:2;594:18;27652:39:0;475:177:1;2772:192:0;;;;;;;;;;-1:-1:-1;2772:192:0;;;;;:::i;:::-;;:::i;28656:104::-;1918:7;1945:6;-1:-1:-1;;;;;1945:6:0;740:10;2092:23;2084:68;;;;-1:-1:-1;;;2084:68:0;;;;;;;:::i;:::-;;;;;;;;;1918:7;1945:6;;28704:48:::1;::::0;-1:-1:-1;;;;;1945:6:0;;;;28730:21:::1;28704:48:::0;::::1;;;::::0;28730:21;;28704:48;1918:7;28704:48;28730:21;1945:6;28704:48;::::1;;;;;;;;;;;;;::::0;::::1;;;;;;28656:104::o:0;2523:94::-;1918:7;1945:6;-1:-1:-1;;;;;1945:6:0;740:10;2092:23;2084:68;;;;-1:-1:-1;;;2084:68:0;;;;;;;:::i;:::-;2588:21:::1;2606:1;2588:9;:21::i;:::-;2523:94::o:0;27873:775::-;1918:7;1945:6;-1:-1:-1;;;;;1945:6:0;740:10;2092:23;2084:68;;;;-1:-1:-1;;;2084:68:0;;;;;;;:::i;:::-;27971:21:::1;28021:15;28030:6:::0;28021;:15:::1;:::i;:::-;28011:7;:25;28003:78;;;::::0;-1:-1:-1;;;28003:78:0;;1913:2:1;28003:78:0::1;::::0;::::1;1895:21:1::0;1952:2;1932:18;;;1925:30;1991:34;1971:18;;;1964:62;-1:-1:-1;;;2042:18:1;;;2035:38;2090:19;;28003:78:0::1;1711:404:1::0;28003:78:0::1;28136:15;;;;;;;;;-1:-1:-1::0;;;;;28136:15:0::1;-1:-1:-1::0;;;;;28136:27:0::1;;:29;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;28126:6;28100:23;;:32;;;;:::i;:::-;:65;;28092:74;;;::::0;::::1;;28182:6;28177:254;28194:6;28190:1;:10;28177:254;;;28249:15;::::0;28273:23:::1;::::0;28223:12:::1;::::0;-1:-1:-1;;;;;28249:15:0::1;::::0;:23:::1;::::0;28273:27:::1;::::0;28299:1;;28273:27:::1;:::i;:::-;28249:52;;;;;;;;;;;;;621:25:1::0;;609:2;594:18;;475:177;28249:52:0::1;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;;;;;28241:66:0::1;28315:6;28241:85;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;28222:104;;;28349:7;28341:78;;;::::0;-1:-1:-1;;;28341:78:0;;3110:2:1;28341:78:0::1;::::0;::::1;3092:21:1::0;3149:2;3129:18;;;3122:30;3188:34;3168:18;;;3161:62;3259:28;3239:18;;;3232:56;3305:19;;28341:78:0::1;2908:422:1::0;28341:78:0::1;-1:-1:-1::0;28202:3:0;::::1;::::0;::::1;:::i;:::-;;;;28177:254;;;;28504:6;28478:23;;:32;;;;:::i;:::-;28445:15;;;;;;;;;-1:-1:-1::0;;;;;28445:15:0::1;-1:-1:-1::0;;;;;28445:27:0::1;;:29;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;:65;28441:200;;;28553:1;28527:23;:27:::0;27942:706:::1;27873:775:::0;;:::o;28441:200::-:1;28623:6;28596:23;;:33;;;;;;;:::i;:::-;::::0;;;-1:-1:-1;;27942:706:0::1;27873:775:::0;;:::o;2772:192::-;1918:7;1945:6;-1:-1:-1;;;;;1945:6:0;740:10;2092:23;2084:68;;;;-1:-1:-1;;;2084:68:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;2861:22:0;::::1;2853:73;;;::::0;-1:-1:-1;;;2853:73:0;;3677:2:1;2853:73:0::1;::::0;::::1;3659:21:1::0;3716:2;3696:18;;;3689:30;3755:34;3735:18;;;3728:62;-1:-1:-1;;;3806:18:1;;;3799:36;3852:19;;2853:73:0::1;3475:402:1::0;2853:73:0::1;2937:19;2947:8;2972:173:::0;3028:16;3047:6;;-1:-1:-1;;;;;3064:17:0;;;-1:-1:-1;;;;;;3064:17:0;;;;;;3097:40;;3047:6;;;;;;;3097:40;;3028:16;3097:40;3017:128;2972:173;:::o;14:248:1:-;82:6;90;143:2;131:9;122:7;118:23;114:32;111:52;;;159:1;156;149:12;111:52;-1:-1:-1;;182:23:1;;;252:2;237:18;;;224:32;;-1:-1:-1;14:248:1:o;657:131::-;-1:-1:-1;;;;;732:31:1;;722:42;;712:70;;778:1;775;768:12;793:247;852:6;905:2;893:9;884:7;880:23;876:32;873:52;;;921:1;918;911:12;873:52;960:9;947:23;979:31;1004:5;979:31;:::i;:::-;1029:5;793:247;-1:-1:-1;;;793:247:1:o;1045:356::-;1247:2;1229:21;;;1266:18;;;1259:30;1325:34;1320:2;1305:18;;1298:62;1392:2;1377:18;;1045:356::o;1406:127::-;1467:10;1462:3;1458:20;1455:1;1448:31;1498:4;1495:1;1488:15;1522:4;1519:1;1512:15;1538:168;1578:7;1644:1;1640;1636:6;1632:14;1629:1;1626:21;1621:1;1614:9;1607:17;1603:45;1600:71;;;1651:18;;:::i;:::-;-1:-1:-1;1691:9:1;;1538:168::o;2120:184::-;2190:6;2243:2;2231:9;2222:7;2218:23;2214:32;2211:52;;;2259:1;2256;2249:12;2211:52;-1:-1:-1;2282:16:1;;2120:184;-1:-1:-1;2120:184:1:o;2309:128::-;2349:3;2380:1;2376:6;2373:1;2370:13;2367:39;;;2386:18;;:::i;:::-;-1:-1:-1;2422:9:1;;2309:128::o;2442:251::-;2512:6;2565:2;2553:9;2544:7;2540:23;2536:32;2533:52;;;2581:1;2578;2571:12;2533:52;2613:9;2607:16;2632:31;2657:5;2632:31;:::i;3335:135::-;3374:3;-1:-1:-1;;3395:17:1;;3392:43;;;3415:18;;:::i;:::-;-1:-1:-1;3462:1:1;3451:13;;3335:135::o
Swarm Source
ipfs://bead3b82ed5e9682009689cb0a370a6b7865d5d39c6e98e65b7d48f74fcb923f
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.