ETH Price: $2,733.50 (+2.04%)

Contract

0xA3e495088c2481Fe76F28b16357654fCE13Cc5e9
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Transfer Ownersh...180215162023-08-29 16:39:23539 days ago1693327163IN
0xA3e49508...CE13Cc5e9
0 ETH0.0021546375.26064361

Advanced mode:
Parent Transaction Hash Block
From
To
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
StaticURIDescriptor

Compiler Version
v0.8.18+commit.87f61d96

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 5 : StaticURIDescriptor.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.18;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";

import "../interfaces/INFTDescriptor.sol";

/**
 * @title StaticURIDescriptor
 * @author Non-Fungible Technologies, Inc.
 *
 * Basic descriptor contract for an NFT, that returns the same resource
 * for any requested token.
 */
contract StaticURIDescriptor is INFTDescriptor, Ownable {
    using Strings for uint256;

    event SetBaseURI(address indexed caller, string indexed baseURI);

    // ============================================ STATE ==============================================

    string public baseURI;

    // ========================================= CONSTRUCTOR ===========================================

    /**
     * @dev Creates a descriptor contract that allows a baseURI to be set,
     *      within token URIs enumerated from the base.
     *
     * @param _baseURI              The value of the baseURI state variable.
     */
    constructor(string memory _baseURI) {
        // Empty baseURI is allowed
        baseURI = _baseURI;
    }

    // ===================================== DESCRIPTOR OPERATIONAS ============================================

    /**
     * @notice Getter of specific URI for an ERC721 token ID.
     *
     * @return uri                  The token ID's URI, the contract's baseURI.
     */
    function tokenURI(address, uint256) external view override returns (string memory) {
        return baseURI;
    }

    /**
     * @notice An owner-only function for setting the string value of the base URI.
     *
     * @param newBaseURI              The new value of the base URI.
     */
    function setBaseURI(string memory newBaseURI) external onlyOwner {
        baseURI = newBaseURI;

        emit SetBaseURI(msg.sender, newBaseURI);
    }
}

File 2 of 5 : Ownable.sol
// SPDX-License-Identifier: MIT

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() {
        _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 3 of 5 : Strings.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

File 4 of 5 : INFTDescriptor.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.18;

interface INFTDescriptor {
    function tokenURI(address token, uint256 tokenId) external view returns (string memory);
}

File 5 of 5 : Context.sol
// SPDX-License-Identifier: MIT

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;
    }
}

Settings
{
  "metadata": {
    "bytecodeHash": "none"
  },
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"_baseURI","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":true,"internalType":"string","name":"baseURI","type":"string"}],"name":"SetBaseURI","type":"event"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"string","name":"newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b50604051620009d2380380620009d28339810160408190526200003491620000bb565b6200003f3362000055565b60016200004d82826200021f565b5050620002eb565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b634e487b7160e01b600052604160045260246000fd5b60006020808385031215620000cf57600080fd5b82516001600160401b0380821115620000e757600080fd5b818501915085601f830112620000fc57600080fd5b815181811115620001115762000111620000a5565b604051601f8201601f19908116603f011681019083821181831017156200013c576200013c620000a5565b8160405282815288868487010111156200015557600080fd5b600093505b828410156200017957848401860151818501870152928501926200015a565b600086848301015280965050505050505092915050565b600181811c90821680620001a557607f821691505b602082108103620001c657634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200021a57600081815260208120601f850160051c81016020861015620001f55750805b601f850160051c820191505b81811015620002165782815560010162000201565b5050505b505050565b81516001600160401b038111156200023b576200023b620000a5565b62000253816200024c845462000190565b84620001cc565b602080601f8311600181146200028b5760008415620002725750858301515b600019600386901b1c1916600185901b17855562000216565b600085815260208120601f198616915b82811015620002bc578886015182559484019460019091019084016200029b565b5085821015620002db5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6106d780620002fb6000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c806355f804b3146100675780636c0360eb1461007c578063715018a61461009a5780638da5cb5b146100a2578063e9dc6375146100bd578063f2fde38b146100d0575b600080fd5b61007a6100753660046103c0565b6100e3565b005b610084610166565b6040516100919190610495565b60405180910390f35b61007a6101f4565b6000546040516001600160a01b039091168152602001610091565b6100846100cb3660046104e4565b61022a565b61007a6100de36600461050e565b6102bf565b6000546001600160a01b031633146101165760405162461bcd60e51b815260040161010d90610530565b60405180910390fd5b600161012282826105ee565b508060405161013191906106ae565b6040519081900381209033907fe7e6d2e694e925d1996aaef24328f8c8b026ccc5dd0a1c2397509d5d31de8cbb90600090a350565b6001805461017390610565565b80601f016020809104026020016040519081016040528092919081815260200182805461019f90610565565b80156101ec5780601f106101c1576101008083540402835291602001916101ec565b820191906000526020600020905b8154815290600101906020018083116101cf57829003601f168201915b505050505081565b6000546001600160a01b0316331461021e5760405162461bcd60e51b815260040161010d90610530565b610228600061035a565b565b60606001805461023990610565565b80601f016020809104026020016040519081016040528092919081815260200182805461026590610565565b80156102b25780601f10610287576101008083540402835291602001916102b2565b820191906000526020600020905b81548152906001019060200180831161029557829003601f168201915b5050505050905092915050565b6000546001600160a01b031633146102e95760405162461bcd60e51b815260040161010d90610530565b6001600160a01b03811661034e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161010d565b6103578161035a565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b634e487b7160e01b600052604160045260246000fd5b6000602082840312156103d257600080fd5b813567ffffffffffffffff808211156103ea57600080fd5b818401915084601f8301126103fe57600080fd5b813581811115610410576104106103aa565b604051601f8201601f19908116603f01168101908382118183101715610438576104386103aa565b8160405282815287602084870101111561045157600080fd5b826020860160208301376000928101602001929092525095945050505050565b60005b8381101561048c578181015183820152602001610474565b50506000910152565b60208152600082518060208401526104b4816040850160208701610471565b601f01601f19169190910160400192915050565b80356001600160a01b03811681146104df57600080fd5b919050565b600080604083850312156104f757600080fd5b610500836104c8565b946020939093013593505050565b60006020828403121561052057600080fd5b610529826104c8565b9392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600181811c9082168061057957607f821691505b60208210810361059957634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156105e957600081815260208120601f850160051c810160208610156105c65750805b601f850160051c820191505b818110156105e5578281556001016105d2565b5050505b505050565b815167ffffffffffffffff811115610608576106086103aa565b61061c816106168454610565565b8461059f565b602080601f83116001811461065157600084156106395750858301515b600019600386901b1c1916600185901b1785556105e5565b600085815260208120601f198616915b8281101561068057888601518255948401946001909101908401610661565b508582101561069e5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600082516106c0818460208701610471565b919091019291505056fea164736f6c6343000812000a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000035697066733a2f2f516d4e50566f45506f704b48433173456e6b55437733484a6b78436b6762747739457a4d70753548584a487268330000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100625760003560e01c806355f804b3146100675780636c0360eb1461007c578063715018a61461009a5780638da5cb5b146100a2578063e9dc6375146100bd578063f2fde38b146100d0575b600080fd5b61007a6100753660046103c0565b6100e3565b005b610084610166565b6040516100919190610495565b60405180910390f35b61007a6101f4565b6000546040516001600160a01b039091168152602001610091565b6100846100cb3660046104e4565b61022a565b61007a6100de36600461050e565b6102bf565b6000546001600160a01b031633146101165760405162461bcd60e51b815260040161010d90610530565b60405180910390fd5b600161012282826105ee565b508060405161013191906106ae565b6040519081900381209033907fe7e6d2e694e925d1996aaef24328f8c8b026ccc5dd0a1c2397509d5d31de8cbb90600090a350565b6001805461017390610565565b80601f016020809104026020016040519081016040528092919081815260200182805461019f90610565565b80156101ec5780601f106101c1576101008083540402835291602001916101ec565b820191906000526020600020905b8154815290600101906020018083116101cf57829003601f168201915b505050505081565b6000546001600160a01b0316331461021e5760405162461bcd60e51b815260040161010d90610530565b610228600061035a565b565b60606001805461023990610565565b80601f016020809104026020016040519081016040528092919081815260200182805461026590610565565b80156102b25780601f10610287576101008083540402835291602001916102b2565b820191906000526020600020905b81548152906001019060200180831161029557829003601f168201915b5050505050905092915050565b6000546001600160a01b031633146102e95760405162461bcd60e51b815260040161010d90610530565b6001600160a01b03811661034e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161010d565b6103578161035a565b50565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b634e487b7160e01b600052604160045260246000fd5b6000602082840312156103d257600080fd5b813567ffffffffffffffff808211156103ea57600080fd5b818401915084601f8301126103fe57600080fd5b813581811115610410576104106103aa565b604051601f8201601f19908116603f01168101908382118183101715610438576104386103aa565b8160405282815287602084870101111561045157600080fd5b826020860160208301376000928101602001929092525095945050505050565b60005b8381101561048c578181015183820152602001610474565b50506000910152565b60208152600082518060208401526104b4816040850160208701610471565b601f01601f19169190910160400192915050565b80356001600160a01b03811681146104df57600080fd5b919050565b600080604083850312156104f757600080fd5b610500836104c8565b946020939093013593505050565b60006020828403121561052057600080fd5b610529826104c8565b9392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600181811c9082168061057957607f821691505b60208210810361059957634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156105e957600081815260208120601f850160051c810160208610156105c65750805b601f850160051c820191505b818110156105e5578281556001016105d2565b5050505b505050565b815167ffffffffffffffff811115610608576106086103aa565b61061c816106168454610565565b8461059f565b602080601f83116001811461065157600084156106395750858301515b600019600386901b1c1916600185901b1785556105e5565b600085815260208120601f198616915b8281101561068057888601518255948401946001909101908401610661565b508582101561069e5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600082516106c0818460208701610471565b919091019291505056fea164736f6c6343000812000a

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000035697066733a2f2f516d4e50566f45506f704b48433173456e6b55437733484a6b78436b6762747739457a4d70753548584a487268330000000000000000000000

-----Decoded View---------------
Arg [0] : _baseURI (string): ipfs://QmNPVoEPopKHC1sEnkUCw3HJkxCkgbtw9EzMpu5HXJHrh3

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000020
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000035
Arg [2] : 697066733a2f2f516d4e50566f45506f704b48433173456e6b55437733484a6b
Arg [3] : 78436b6762747739457a4d70753548584a487268330000000000000000000000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
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.