ETH Price: $3,036.49 (-2.04%)
Gas: 8 Gwei

Contract

0x2C39BB41E2af6BeC6c3Bb102c07C15eda648A366
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Set Token Uri Re...176952392023-07-15 0:25:59280 days ago1689380759IN
0x2C39BB41...da648A366
0 ETH0.0006892913.39221279
Set Token Uri Re...172032402023-05-06 18:09:23349 days ago1683396563IN
0x2C39BB41...da648A366
0 ETH0.00826716160.62102101
Transfer Ownersh...168797022023-03-22 0:55:59395 days ago1679446559IN
0x2C39BB41...da648A366
0 ETH0.0003948313.78288408
0x60c06040168783122023-03-21 20:14:35395 days ago1679429675IN
 Create: TokenUriResolver
0 ETH0.0131831421

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TokenUriResolver

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 13 : TokenUriResolver.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {IJBTokenUriResolver} from "@jbx-protocol/juice-contracts-v3/contracts/interfaces/IJBTokenUriResolver.sol";
import {IJBProjects} from "@jbx-protocol/juice-contracts-v3/contracts/interfaces/IJBProjects.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {JBUriOperations} from "./Libraries/JBUriOperations.sol";
import {JBOperatable, IJBOperatorStore} from "@jbx-protocol/juice-contracts-v3/contracts/abstract/JBOperatable.sol";

/**
 * @title Juicebox TokenUriResolver Registry
 * @notice The registry serves metadata for all Juciebox Protocol v2 projects.
 * @dev The default metadata for all projects can be updated by the contract owner.
 * @dev Juicebox project owners and operators can override the default metadata for their project with their own IJBTokenUriResolver contracts.
 */
contract TokenUriResolver is IJBTokenUriResolver, JBOperatable, Ownable {
    /**
     * @notice The address of the Juicebox Projects contract.
     */
    IJBProjects public immutable projects;

    /**
     * @notice The maximum amount of gas used by a resolver, to allow falling back on the default resolver.
     */
    uint256 constant MAX_RESOLVER_GAS_USAGE = 50_000_000;

    /**
     * @notice Emitted when the default IJBTokenUriResolver is set.
     */
    event DefaultTokenUriResolverSet(IJBTokenUriResolver indexed tokenUriResolver);

    /**
     * @notice Emitted when the Token Uri Resolver for a project is set.
     */
    event ProjectTokenUriResolverSet(uint256 indexed projectId, IJBTokenUriResolver indexed tokenUriResolver);

    /**
     * @notice Each project's IJBTokenUriResolver metadata contract.
     * @dev Mapping of projectId => tokenUriResolver
     * @dev projectId 0 returns the default resolver address.
     * @return IJBTokenUriResolver The address of the IJBTokenUriResolver for the project, or 0 if none is set.
     */
    mapping(uint256 => IJBTokenUriResolver) public tokenUriResolvers;

    /**
     * @notice TokenUriResolver constructor.
     * @dev Sets the default IJBTokenUriResolver. This resolver is used for all projects that do not have a custom resolver. 
     * @dev Sets immutable references to JBProjects and JBOperatorStore contracts.
     * @param _projects The address of the Juicebox Projects contract.
     * @param _operatorStore The address of the JBOperatorStore contract.
     * @param _defaultTokenUriResolver The address of the default IJBTokenUriResolver.
     */
    constructor(
        IJBProjects _projects,
        IJBOperatorStore _operatorStore,
        IJBTokenUriResolver _defaultTokenUriResolver
    ) JBOperatable(_operatorStore) {
        projects = _projects;
        tokenUriResolvers[0] = IJBTokenUriResolver(_defaultTokenUriResolver);
    }
    
    /**
     *  @notice Get the token uri for a project.
     *  @dev Called by `JBProjects.tokenUri(uint256)`. If a project has a custom IJBTokenUriResolver, it is used instead of the default resolver.
     *  @param _projectId The id of the project.
     *  @return tokenUri The token uri for the project.
     *  @inheritdoc IJBTokenUriResolver
     */
    function getUri(uint256 _projectId) external view override returns (string memory tokenUri) {
        address _resolver = address(tokenUriResolvers[_projectId]);

        if (_resolver == address(0)) {
            return tokenUriResolvers[0].getUri(_projectId);
        }

        // If the getUri call to _resolver exceeds the MAX_RESOLVER_GAS_USAGE, fall back to the default resolver. 
        try IJBTokenUriResolver(_resolver).getUri{gas: MAX_RESOLVER_GAS_USAGE}(_projectId) returns (
            string memory _tokenUri
        ) {
            return _tokenUri;
        } catch {
            return tokenUriResolvers[0].getUri(_projectId);
        }
    }

    /**
     * @notice Set the IJBTokenUriResolver for a project. This function is restricted to the project's owner and operators.
     * @dev Set the IJBTokenUriResolver for a project to 0 to use the default resolver.
     * @param _projectId The id of the project.
     * @param _resolver The address of the IJBTokenUriResolver, or 0 to restore the default setting.
     */
    function setTokenUriResolverForProject(
        uint256 _projectId,
        IJBTokenUriResolver _resolver
    ) external requirePermission(projects.ownerOf(_projectId), _projectId, JBUriOperations.SET_TOKEN_URI) {
        tokenUriResolvers[_projectId] = _resolver;
        emit ProjectTokenUriResolverSet(_projectId, _resolver);
    }

    /**
     * @notice Set the default IJBTokenUriResolver.
     * @dev Only available to this contract's owner.
     * @param _resolver The address of the default token uri resolver.
     */
    function setDefaultTokenUriResolver(IJBTokenUriResolver _resolver) external onlyOwner {
        tokenUriResolvers[0] = IJBTokenUriResolver(_resolver);

        emit DefaultTokenUriResolverSet(_resolver);
    }

    /**
     * @notice Get the default IJBTokenUriResolver address.
     * @dev Convenience function for browsing contracts on block explorers.
     * @return IJBTokenURiResolver The address of the default token uri resolver.
     */
    function defaultTokenUriResolver() external view returns (IJBTokenUriResolver) {
        return tokenUriResolvers[0];
    }
}

File 2 of 13 : JBOperatable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.16;

import './../interfaces/IJBOperatable.sol';

/** 
  @notice
  Modifiers to allow access to functions based on the message sender's operator status.

  @dev
  Adheres to -
  IJBOperatable: General interface for the methods in this contract that interact with the blockchain's state according to the protocol's rules.
*/
abstract contract JBOperatable is IJBOperatable {
  //*********************************************************************//
  // --------------------------- custom errors -------------------------- //
  //*********************************************************************//
  error UNAUTHORIZED();

  //*********************************************************************//
  // ---------------------------- modifiers ---------------------------- //
  //*********************************************************************//

  /** 
    @notice
    Only allows the speficied account or an operator of the account to proceed. 

    @param _account The account to check for.
    @param _domain The domain namespace to look for an operator within. 
    @param _permissionIndex The index of the permission to check for. 
  */
  modifier requirePermission(
    address _account,
    uint256 _domain,
    uint256 _permissionIndex
  ) {
    _requirePermission(_account, _domain, _permissionIndex);
    _;
  }

  /** 
    @notice
    Only allows the speficied account, an operator of the account to proceed, or a truthy override flag. 

    @param _account The account to check for.
    @param _domain The domain namespace to look for an operator within. 
    @param _permissionIndex The index of the permission to check for. 
    @param _override A condition to force allowance for.
  */
  modifier requirePermissionAllowingOverride(
    address _account,
    uint256 _domain,
    uint256 _permissionIndex,
    bool _override
  ) {
    _requirePermissionAllowingOverride(_account, _domain, _permissionIndex, _override);
    _;
  }

  //*********************************************************************//
  // ---------------- public immutable stored properties --------------- //
  //*********************************************************************//

  /** 
    @notice 
    A contract storing operator assignments.
  */
  IJBOperatorStore public immutable override operatorStore;

  //*********************************************************************//
  // -------------------------- constructor ---------------------------- //
  //*********************************************************************//

  /** 
    @param _operatorStore A contract storing operator assignments.
  */
  constructor(IJBOperatorStore _operatorStore) {
    operatorStore = _operatorStore;
  }

  //*********************************************************************//
  // -------------------------- internal views ------------------------- //
  //*********************************************************************//

  /** 
    @notice
    Require the message sender is either the account or has the specified permission.

    @param _account The account to allow.
    @param _domain The domain namespace within which the permission index will be checked.
    @param _permissionIndex The permission index that an operator must have within the specified domain to be allowed.
  */
  function _requirePermission(
    address _account,
    uint256 _domain,
    uint256 _permissionIndex
  ) internal view {
    if (
      msg.sender != _account &&
      !operatorStore.hasPermission(msg.sender, _account, _domain, _permissionIndex) &&
      !operatorStore.hasPermission(msg.sender, _account, 0, _permissionIndex)
    ) revert UNAUTHORIZED();
  }

  /** 
    @notice
    Require the message sender is either the account, has the specified permission, or the override condition is true.

    @param _account The account to allow.
    @param _domain The domain namespace within which the permission index will be checked.
    @param _domain The permission index that an operator must have within the specified domain to be allowed.
    @param _override The override condition to allow.
  */
  function _requirePermissionAllowingOverride(
    address _account,
    uint256 _domain,
    uint256 _permissionIndex,
    bool _override
  ) internal view {
    if (
      !_override &&
      msg.sender != _account &&
      !operatorStore.hasPermission(msg.sender, _account, _domain, _permissionIndex) &&
      !operatorStore.hasPermission(msg.sender, _account, 0, _permissionIndex)
    ) revert UNAUTHORIZED();
  }
}

File 3 of 13 : IJBOperatable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import './IJBOperatorStore.sol';

interface IJBOperatable {
  function operatorStore() external view returns (IJBOperatorStore);
}

File 4 of 13 : IJBOperatorStore.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import './../structs/JBOperatorData.sol';

interface IJBOperatorStore {
  event SetOperator(
    address indexed operator,
    address indexed account,
    uint256 indexed domain,
    uint256[] permissionIndexes,
    uint256 packed
  );

  function permissionsOf(
    address _operator,
    address _account,
    uint256 _domain
  ) external view returns (uint256);

  function hasPermission(
    address _operator,
    address _account,
    uint256 _domain,
    uint256 _permissionIndex
  ) external view returns (bool);

  function hasPermissions(
    address _operator,
    address _account,
    uint256 _domain,
    uint256[] calldata _permissionIndexes
  ) external view returns (bool);

  function setOperator(JBOperatorData calldata _operatorData) external;

  function setOperators(JBOperatorData[] calldata _operatorData) external;
}

File 5 of 13 : IJBProjects.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import '@openzeppelin/contracts/token/ERC721/IERC721.sol';
import './../structs/JBProjectMetadata.sol';
import './IJBTokenUriResolver.sol';

interface IJBProjects is IERC721 {
  event Create(
    uint256 indexed projectId,
    address indexed owner,
    JBProjectMetadata metadata,
    address caller
  );

  event SetMetadata(uint256 indexed projectId, JBProjectMetadata metadata, address caller);

  event SetTokenUriResolver(IJBTokenUriResolver indexed resolver, address caller);

  function count() external view returns (uint256);

  function metadataContentOf(uint256 _projectId, uint256 _domain)
    external
    view
    returns (string memory);

  function tokenUriResolver() external view returns (IJBTokenUriResolver);

  function createFor(address _owner, JBProjectMetadata calldata _metadata)
    external
    returns (uint256 projectId);

  function setMetadataOf(uint256 _projectId, JBProjectMetadata calldata _metadata) external;

  function setTokenUriResolver(IJBTokenUriResolver _newResolver) external;
}

File 6 of 13 : IJBTokenUriResolver.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IJBTokenUriResolver {
  function getUri(uint256 _projectId) external view returns (string memory tokenUri);
}

File 7 of 13 : JBOperatorData.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/** 
  @member operator The address of the operator.
  @member domain The domain within which the operator is being given permissions. A domain of 0 is a wildcard domain, which gives an operator access to all domains.
  @member permissionIndexes The indexes of the permissions the operator is being given.
*/
struct JBOperatorData {
  address operator;
  uint256 domain;
  uint256[] permissionIndexes;
}

File 8 of 13 : JBProjectMetadata.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/** 
  @member content The metadata content.
  @member domain The domain within which the metadata applies.
*/
struct JBProjectMetadata {
  string content;
  uint256 domain;
}

File 9 of 13 : Ownable.sol
// 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);
    }
}

File 10 of 13 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @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`.
     *
     * 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;

    /**
     * @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 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: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * 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 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 the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @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);
}

File 11 of 13 : Context.sol
// 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;
    }
}

File 12 of 13 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @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 13 of 13 : JBUriOperations.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

library JBUriOperations {
  uint256 public constant SET_TOKEN_URI = 20;
}

Settings
{
  "remappings": [
    "@ensdomains/=node_modules/@ensdomains/",
    "@jbx-protocol/=node_modules/@jbx-protocol/",
    "@openzeppelin/=node_modules/@openzeppelin/",
    "@paulrberg/=node_modules/@paulrberg/",
    "base64-sol/=node_modules/base64-sol/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "forge-std/=lib/forge-std/src/",
    "prb-math/=node_modules/prb-math/",
    "solcolor/=lib/solcolor/",
    "typeface/=lib/typeface/contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "bytecodeHash": "ipfs"
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "london",
  "libraries": {
    "lib/solcolor/src/Color.sol": {
      "LibColor": "0x53aD3C068B6bf487c1bFE8694C8a5b5546b43063"
    },
    "src/Libraries/StringSlicer.sol": {
      "StringSlicer": "0xaDE1ae7bCcc2Cb84De0431a70cceB5f1DE0E2c9b"
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IJBProjects","name":"_projects","type":"address"},{"internalType":"contract IJBOperatorStore","name":"_operatorStore","type":"address"},{"internalType":"contract IJBTokenUriResolver","name":"_defaultTokenUriResolver","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"UNAUTHORIZED","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IJBTokenUriResolver","name":"tokenUriResolver","type":"address"}],"name":"DefaultTokenUriResolverSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"projectId","type":"uint256"},{"indexed":true,"internalType":"contract IJBTokenUriResolver","name":"tokenUriResolver","type":"address"}],"name":"ProjectTokenUriResolverSet","type":"event"},{"inputs":[],"name":"defaultTokenUriResolver","outputs":[{"internalType":"contract IJBTokenUriResolver","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"getUri","outputs":[{"internalType":"string","name":"tokenUri","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operatorStore","outputs":[{"internalType":"contract IJBOperatorStore","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"projects","outputs":[{"internalType":"contract IJBProjects","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IJBTokenUriResolver","name":"_resolver","type":"address"}],"name":"setDefaultTokenUriResolver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"contract IJBTokenUriResolver","name":"_resolver","type":"address"}],"name":"setTokenUriResolverForProject","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenUriResolvers","outputs":[{"internalType":"contract IJBTokenUriResolver","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c060405234801561001057600080fd5b50604051610afd380380610afd83398101604081905261002f916100ff565b6001600160a01b03821660805261004533610097565b6001600160a01b0392831660a0526000805260016020527fa6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb4980546001600160a01b03191691909316179091555061014c565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146100fc57600080fd5b50565b60008060006060848603121561011457600080fd5b835161011f816100e7565b6020850151909350610130816100e7565b6040850151909250610141816100e7565b809150509250925092565b60805160a0516109786101856000396000818160c5015261026401526000818161012d0152818161061701526106be01526109786000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c8063ad007d6311610066578063ad007d6314610128578063c83860c21461014f578063da0544aa14610178578063e96d256214610198578063f2fde38b146101bf57600080fd5b806304e600e9146100a3578063715018a6146100b85780638b79543c146100c05780638da5cb5b146101045780639d86cea214610115575b600080fd5b6100b66100b1366004610763565b6101d2565b005b6100b661023a565b6100e77f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b6000546001600160a01b03166100e7565b6100b6610123366004610780565b61024e565b6100e77f000000000000000000000000000000000000000000000000000000000000000081565b6100e761015d3660046107b0565b6001602052600090815260409020546001600160a01b031681565b61018b6101863660046107b0565b610341565b6040516100fb91906107ed565b600080526001602052600080516020610923833981519152546001600160a01b03166100e7565b6100b66101cd366004610763565b6104a8565b6101da610526565b6000808052600160205260008051602061092383398151915280546001600160a01b0319166001600160a01b03841690811790915560405190917faca8b8d3266054a63f39d7b87b335bc77fca26cdf0b094bf3399440f1865bc4e91a250565b610242610526565b61024c6000610580565b565b6040516331a9108f60e11b8152600481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e90602401602060405180830381865afa1580156102b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102d79190610820565b8260146102e58383836105d0565b60008581526001602052604080822080546001600160a01b0319166001600160a01b0388169081179091559051909187917f4d01e03c224f3f489f4296f363bbab77c22cd9cc87477106d90a61126d4618cd9190a35050505050565b6000818152600160205260409020546060906001600160a01b0316806103f05760008052600160205260008051602061092383398151915254604051636d02a25560e11b8152600481018590526001600160a01b039091169063da0544aa906024015b600060405180830381865afa1580156103c1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526103e99190810190610853565b9392505050565b604051636d02a25560e11b8152600481018490526001600160a01b0382169063da0544aa906302faf080906024016000604051808303818786fa9350505050801561045d57506040513d6000823e601f3d908101601f1916820160405261045a9190810190610853565b60015b6103e95760008052600160205260008051602061092383398151915254604051636d02a25560e11b8152600481018590526001600160a01b039091169063da0544aa906024016103a4565b6104b0610526565b6001600160a01b03811661051a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61052381610580565b50565b6000546001600160a01b0316331461024c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610511565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b336001600160a01b03841614801590610684575060405163c161c93f60e01b81523360048201526001600160a01b03848116602483015260448201849052606482018390527f0000000000000000000000000000000000000000000000000000000000000000169063c161c93f90608401602060405180830381865afa15801561065e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106829190610900565b155b801561072b575060405163c161c93f60e01b81523360048201526001600160a01b03848116602483015260006044830152606482018390527f0000000000000000000000000000000000000000000000000000000000000000169063c161c93f90608401602060405180830381865afa158015610705573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107299190610900565b155b156107495760405163075fd2b160e01b815260040160405180910390fd5b505050565b6001600160a01b038116811461052357600080fd5b60006020828403121561077557600080fd5b81356103e98161074e565b6000806040838503121561079357600080fd5b8235915060208301356107a58161074e565b809150509250929050565b6000602082840312156107c257600080fd5b5035919050565b60005b838110156107e45781810151838201526020016107cc565b50506000910152565b602081526000825180602084015261080c8160408501602087016107c9565b601f01601f19169190910160400192915050565b60006020828403121561083257600080fd5b81516103e98161074e565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561086557600080fd5b815167ffffffffffffffff8082111561087d57600080fd5b818401915084601f83011261089157600080fd5b8151818111156108a3576108a361083d565b604051601f8201601f19908116603f011681019083821181831017156108cb576108cb61083d565b816040528281528760208487010111156108e457600080fd5b6108f58360208301602088016107c9565b979650505050505050565b60006020828403121561091257600080fd5b815180151581146103e957600080fdfea6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb49a2646970667358221220eb959beff0621c247c02e41b3c7cdd1686a76ceea77aa6c2c683eea3077fcc3c64736f6c63430008110033000000000000000000000000d8b4359143eda5b2d763e127ed27c77addbc47d30000000000000000000000006f3c5afca0c9edf3926ef2ddf17c8ae6391afefb00000000000000000000000062bc9f7dae47676b16ee95719c4b78bdb5e9f974

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061009e5760003560e01c8063ad007d6311610066578063ad007d6314610128578063c83860c21461014f578063da0544aa14610178578063e96d256214610198578063f2fde38b146101bf57600080fd5b806304e600e9146100a3578063715018a6146100b85780638b79543c146100c05780638da5cb5b146101045780639d86cea214610115575b600080fd5b6100b66100b1366004610763565b6101d2565b005b6100b661023a565b6100e77f000000000000000000000000d8b4359143eda5b2d763e127ed27c77addbc47d381565b6040516001600160a01b0390911681526020015b60405180910390f35b6000546001600160a01b03166100e7565b6100b6610123366004610780565b61024e565b6100e77f0000000000000000000000006f3c5afca0c9edf3926ef2ddf17c8ae6391afefb81565b6100e761015d3660046107b0565b6001602052600090815260409020546001600160a01b031681565b61018b6101863660046107b0565b610341565b6040516100fb91906107ed565b600080526001602052600080516020610923833981519152546001600160a01b03166100e7565b6100b66101cd366004610763565b6104a8565b6101da610526565b6000808052600160205260008051602061092383398151915280546001600160a01b0319166001600160a01b03841690811790915560405190917faca8b8d3266054a63f39d7b87b335bc77fca26cdf0b094bf3399440f1865bc4e91a250565b610242610526565b61024c6000610580565b565b6040516331a9108f60e11b8152600481018390527f000000000000000000000000d8b4359143eda5b2d763e127ed27c77addbc47d36001600160a01b031690636352211e90602401602060405180830381865afa1580156102b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102d79190610820565b8260146102e58383836105d0565b60008581526001602052604080822080546001600160a01b0319166001600160a01b0388169081179091559051909187917f4d01e03c224f3f489f4296f363bbab77c22cd9cc87477106d90a61126d4618cd9190a35050505050565b6000818152600160205260409020546060906001600160a01b0316806103f05760008052600160205260008051602061092383398151915254604051636d02a25560e11b8152600481018590526001600160a01b039091169063da0544aa906024015b600060405180830381865afa1580156103c1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526103e99190810190610853565b9392505050565b604051636d02a25560e11b8152600481018490526001600160a01b0382169063da0544aa906302faf080906024016000604051808303818786fa9350505050801561045d57506040513d6000823e601f3d908101601f1916820160405261045a9190810190610853565b60015b6103e95760008052600160205260008051602061092383398151915254604051636d02a25560e11b8152600481018590526001600160a01b039091169063da0544aa906024016103a4565b6104b0610526565b6001600160a01b03811661051a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61052381610580565b50565b6000546001600160a01b0316331461024c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610511565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b336001600160a01b03841614801590610684575060405163c161c93f60e01b81523360048201526001600160a01b03848116602483015260448201849052606482018390527f0000000000000000000000006f3c5afca0c9edf3926ef2ddf17c8ae6391afefb169063c161c93f90608401602060405180830381865afa15801561065e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106829190610900565b155b801561072b575060405163c161c93f60e01b81523360048201526001600160a01b03848116602483015260006044830152606482018390527f0000000000000000000000006f3c5afca0c9edf3926ef2ddf17c8ae6391afefb169063c161c93f90608401602060405180830381865afa158015610705573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107299190610900565b155b156107495760405163075fd2b160e01b815260040160405180910390fd5b505050565b6001600160a01b038116811461052357600080fd5b60006020828403121561077557600080fd5b81356103e98161074e565b6000806040838503121561079357600080fd5b8235915060208301356107a58161074e565b809150509250929050565b6000602082840312156107c257600080fd5b5035919050565b60005b838110156107e45781810151838201526020016107cc565b50506000910152565b602081526000825180602084015261080c8160408501602087016107c9565b601f01601f19169190910160400192915050565b60006020828403121561083257600080fd5b81516103e98161074e565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561086557600080fd5b815167ffffffffffffffff8082111561087d57600080fd5b818401915084601f83011261089157600080fd5b8151818111156108a3576108a361083d565b604051601f8201601f19908116603f011681019083821181831017156108cb576108cb61083d565b816040528281528760208487010111156108e457600080fd5b6108f58360208301602088016107c9565b979650505050505050565b60006020828403121561091257600080fd5b815180151581146103e957600080fdfea6eef7e35abe7026729641147f7915573c7e97b47efa546f5f6e3230263bcb49a2646970667358221220eb959beff0621c247c02e41b3c7cdd1686a76ceea77aa6c2c683eea3077fcc3c64736f6c63430008110033

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

000000000000000000000000d8b4359143eda5b2d763e127ed27c77addbc47d30000000000000000000000006f3c5afca0c9edf3926ef2ddf17c8ae6391afefb00000000000000000000000062bc9f7dae47676b16ee95719c4b78bdb5e9f974

-----Decoded View---------------
Arg [0] : _projects (address): 0xD8B4359143eda5B2d763E127Ed27c77addBc47d3
Arg [1] : _operatorStore (address): 0x6F3C5afCa0c9eDf3926eF2dDF17c8ae6391afEfb
Arg [2] : _defaultTokenUriResolver (address): 0x62BC9F7daE47676B16EE95719c4B78Bdb5e9f974

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000d8b4359143eda5b2d763e127ed27c77addbc47d3
Arg [1] : 0000000000000000000000006f3c5afca0c9edf3926ef2ddf17c8ae6391afefb
Arg [2] : 00000000000000000000000062bc9f7dae47676b16ee95719c4b78bdb5e9f974


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
[ 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.