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
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
JuuniExtendedRewardTicket
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; // _ _ _ _ _ _ _ _ // | || | || | || \| || | // n_|||U || U || \\ || | // \__/|___||___||_|\_||_| import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; interface Ticket { function claimForTicket(address to, uint256 quantity) external; } abstract contract QuestReward { // QuestReward contract must implement this function // to is used for mint destination // zodiaTokenId is used for pulling zodia metadata function claimQuestReward( address to, uint256 zodiaTokenId ) external virtual; } contract JuuniExtendedRewardTicket is Ownable, ReentrancyGuard, QuestReward { address public zodiaAddress; address public ticketAddress; string private _tokenUri; error Soulbound(); error InvalidMintSource(); error InvalidTicketAddress(); constructor() {} function claimQuestReward( address to, uint256 zodiaTokenId ) external override nonReentrant { if (ticketAddress == address(0)) revert InvalidTicketAddress(); if (msg.sender != zodiaAddress) revert InvalidMintSource(); Ticket ticketContract = Ticket(ticketAddress); ticketContract.claimForTicket(to, 10); } function setTicketAddress(address newTicketAddress) external onlyOwner { ticketAddress = newTicketAddress; } function setZodiaContract(address newZodiaContract) external onlyOwner { zodiaAddress = newZodiaContract; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @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; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ 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() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { 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 { _transferOwnership(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"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with 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; } }
{ "optimizer": { "enabled": true, "runs": 1000 }, "viaIR": true, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidMintSource","type":"error"},{"inputs":[],"name":"InvalidTicketAddress","type":"error"},{"inputs":[],"name":"Soulbound","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"zodiaTokenId","type":"uint256"}],"name":"claimQuestReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newTicketAddress","type":"address"}],"name":"setTicketAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newZodiaContract","type":"address"}],"name":"setZodiaContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"ticketAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"zodiaAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
6080806040523461005f5760008054336001600160a01b0319821681178355916001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a36001805561050b90816100658239f35b600080fdfe6080604081815260048036101561001557600080fd5b600092833560e01c90816357a8e3fe1461043d57508063715018a6146103d7578063761c3a2d146102545780638da5cb5b1461022e5780639a622e8414610202578063ed9a5bbb146101b6578063ee44dcf3146101675763f2fde38b1461007b57600080fd5b3461016357602036600319011261016357610094610462565b9061009d61047d565b6001600160a01b038092169283156100fa5750506000548273ffffffffffffffffffffffffffffffffffffffff19821617600055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a380f35b906020608492519162461bcd60e51b8352820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b8280fd5b83346101b35760203660031901126101b3576001600160a01b03610189610462565b61019161047d565b1673ffffffffffffffffffffffffffffffffffffffff19600254161760025580f35b80fd5b83346101b35760203660031901126101b3576001600160a01b036101d8610462565b6101e061047d565b1673ffffffffffffffffffffffffffffffffffffffff19600354161760035580f35b50503461022a578160031936011261022a576020906001600160a01b03600254169051908152f35b5080fd5b50503461022a578160031936011261022a576001600160a01b0360209254169051908152f35b50903461016357806003193601126101635761026e610462565b916002600154146103955760026001556001600160a01b03806003541693841561036d578160025416330361034557908591853b156101635760449083865197889485937f88df43440000000000000000000000000000000000000000000000000000000085521687840152600a60248401525af1801561033b576102f6575b836001805580f35b67ffffffffffffffff831161030f5750523880806102ee565b8360416024927f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b82513d86823e3d90fd5b8284517f54d665f4000000000000000000000000000000000000000000000000000000008152fd5b8284517f8e847d68000000000000000000000000000000000000000000000000000000008152fd5b6020606492519162461bcd60e51b8352820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152fd5b83346101b357806003193601126101b3576103f061047d565b806001600160a01b03815473ffffffffffffffffffffffffffffffffffffffff1981168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b84903461022a578160031936011261022a576020906001600160a01b03600354168152f35b600435906001600160a01b038216820361047857565b600080fd5b6001600160a01b0360005416330361049157565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fdfea264697066735822122027cc02552279f99c40d541a8cf956014c879c7dc866a4968bdad0a5e454a594c64736f6c63430008110033
Deployed Bytecode
0x6080604081815260048036101561001557600080fd5b600092833560e01c90816357a8e3fe1461043d57508063715018a6146103d7578063761c3a2d146102545780638da5cb5b1461022e5780639a622e8414610202578063ed9a5bbb146101b6578063ee44dcf3146101675763f2fde38b1461007b57600080fd5b3461016357602036600319011261016357610094610462565b9061009d61047d565b6001600160a01b038092169283156100fa5750506000548273ffffffffffffffffffffffffffffffffffffffff19821617600055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a380f35b906020608492519162461bcd60e51b8352820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b8280fd5b83346101b35760203660031901126101b3576001600160a01b03610189610462565b61019161047d565b1673ffffffffffffffffffffffffffffffffffffffff19600254161760025580f35b80fd5b83346101b35760203660031901126101b3576001600160a01b036101d8610462565b6101e061047d565b1673ffffffffffffffffffffffffffffffffffffffff19600354161760035580f35b50503461022a578160031936011261022a576020906001600160a01b03600254169051908152f35b5080fd5b50503461022a578160031936011261022a576001600160a01b0360209254169051908152f35b50903461016357806003193601126101635761026e610462565b916002600154146103955760026001556001600160a01b03806003541693841561036d578160025416330361034557908591853b156101635760449083865197889485937f88df43440000000000000000000000000000000000000000000000000000000085521687840152600a60248401525af1801561033b576102f6575b836001805580f35b67ffffffffffffffff831161030f5750523880806102ee565b8360416024927f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b82513d86823e3d90fd5b8284517f54d665f4000000000000000000000000000000000000000000000000000000008152fd5b8284517f8e847d68000000000000000000000000000000000000000000000000000000008152fd5b6020606492519162461bcd60e51b8352820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152fd5b83346101b357806003193601126101b3576103f061047d565b806001600160a01b03815473ffffffffffffffffffffffffffffffffffffffff1981168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b84903461022a578160031936011261022a576020906001600160a01b03600354168152f35b600435906001600160a01b038216820361047857565b600080fd5b6001600160a01b0360005416330361049157565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fdfea264697066735822122027cc02552279f99c40d541a8cf956014c879c7dc866a4968bdad0a5e454a594c64736f6c63430008110033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ 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.