ETH Price: $3,387.30 (-1.73%)
Gas: 1 Gwei

Contract

0xe666CA2f5ab01a5E8ca19E505B2dE3475A39D7d2
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
0x60a06040147967982022-05-18 4:41:13772 days ago1652848873IN
 Create: ZoraFeeManager
0 ETH0.0076314318.71161589

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ZoraFeeManager

Compiler Version
v0.8.10+commit.fc410830

Optimization Enabled:
Yes with 5000 runs

Other Settings:
default evmVersion
File 1 of 4 : ZoraFeeManager.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;

import {IZoraFeeManager} from "./interfaces/IZoraFeeManager.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";

contract ZoraFeeManager is Ownable, IZoraFeeManager {
    mapping(address => uint256) private feeOverride;
    uint256 private immutable defaultFeeBPS;

    event FeeOverrideSet(address indexed, uint256 indexed);

    constructor(uint256 _defaultFeeBPS, address feeManagerAdmin) {
        defaultFeeBPS = _defaultFeeBPS;
        _transferOwnership(feeManagerAdmin);
    }

    function setFeeOverride(address mediaContract, uint256 amountBPS)
        external
        onlyOwner
    {
        require(amountBPS < 2001, "Fee too high (not greater than 20%)");
        feeOverride[mediaContract] = amountBPS;
        emit FeeOverrideSet(mediaContract, amountBPS);
    }

    function getZORAWithdrawFeesBPS(address mediaContract)
        external
        view
        returns (address payable, uint256)
    {
        if (feeOverride[mediaContract] > 0) {
            return (payable(owner()), feeOverride[mediaContract]);
        }
        return (payable(owner()), defaultFeeBPS);
    }
}

File 2 of 4 : IZoraFeeManager.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;

interface IZoraFeeManager {
    function getZORAWithdrawFeesBPS(address sender) external returns (address payable, uint256);
}

File 3 of 4 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 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 {
        _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 4 of 4 : 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;
    }
}

Settings
{
  "remappings": [
    "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "ERC721A-Upgradeable/=lib/ERC721A-Upgradeable/contracts/",
    "base64/=lib/base64/",
    "ds-test/=lib/ds-test/src/",
    "erc721a-upgradeable/=lib/ERC721A-Upgradeable/contracts/",
    "forge-std/=lib/forge-std/src/",
    "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "src/=src/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 5000
  },
  "metadata": {
    "bytecodeHash": "ipfs"
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "london"
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"uint256","name":"_defaultFeeBPS","type":"uint256"},{"internalType":"address","name":"feeManagerAdmin","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"","type":"address"},{"indexed":true,"internalType":"uint256","name":"","type":"uint256"}],"name":"FeeOverrideSet","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"},{"inputs":[{"internalType":"address","name":"mediaContract","type":"address"}],"name":"getZORAWithdrawFeesBPS","outputs":[{"internalType":"address payable","name":"","type":"address"},{"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":"address","name":"mediaContract","type":"address"},{"internalType":"uint256","name":"amountBPS","type":"uint256"}],"name":"setFeeOverride","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60a060405234801561001057600080fd5b506040516106e33803806106e383398101604081905261002f9161009d565b6100383361004d565b60808290526100468161004d565b50506100da565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080604083850312156100b057600080fd5b825160208401519092506001600160a01b03811681146100cf57600080fd5b809150509250929050565b6080516105ee6100f560003960006102ee01526105ee6000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c8063715018a611610050578063715018a6146100c55780638da5cb5b146100cd578063f2fde38b146100f557600080fd5b80632b933f811461006c5780632e0c164914610081575b600080fd5b61007f61007a36600461056c565b610108565b005b61009461008f366004610596565b610273565b6040805173ffffffffffffffffffffffffffffffffffffffff90931683526020830191909152015b60405180910390f35b61007f610311565b60005460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100bc565b61007f610103366004610596565b61039e565b60005473ffffffffffffffffffffffffffffffffffffffff16331461018e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6107d1811061021f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f46656520746f6f206869676820286e6f742067726561746572207468616e203260448201527f30252900000000000000000000000000000000000000000000000000000000006064820152608401610185565b73ffffffffffffffffffffffffffffffffffffffff8216600081815260016020526040808220849055518392917fcadc101c03be6a205eb345867605c4824dd58c1660c7c1b6ce4a92ad024c0a8b91a35050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600160205260408120548190156102d05750506000805473ffffffffffffffffffffffffffffffffffffffff92831682526001602052604090912054911691565b505060005473ffffffffffffffffffffffffffffffffffffffff16917f00000000000000000000000000000000000000000000000000000000000000009150565b60005473ffffffffffffffffffffffffffffffffffffffff163314610392576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610185565b61039c60006104ce565b565b60005473ffffffffffffffffffffffffffffffffffffffff16331461041f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610185565b73ffffffffffffffffffffffffffffffffffffffff81166104c2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610185565b6104cb816104ce565b50565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461056757600080fd5b919050565b6000806040838503121561057f57600080fd5b61058883610543565b946020939093013593505050565b6000602082840312156105a857600080fd5b6105b182610543565b939250505056fea2646970667358221220195dbea54f8e03c3c2ed8993e0e143d4115d625a63a05fd40636cd3ca6cf995564736f6c634300080a003300000000000000000000000000000000000000000000000000000000000001f4000000000000000000000000d1d1d4e36117ab794ec5d4c78cbd3a8904e691d0

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100675760003560e01c8063715018a611610050578063715018a6146100c55780638da5cb5b146100cd578063f2fde38b146100f557600080fd5b80632b933f811461006c5780632e0c164914610081575b600080fd5b61007f61007a36600461056c565b610108565b005b61009461008f366004610596565b610273565b6040805173ffffffffffffffffffffffffffffffffffffffff90931683526020830191909152015b60405180910390f35b61007f610311565b60005460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100bc565b61007f610103366004610596565b61039e565b60005473ffffffffffffffffffffffffffffffffffffffff16331461018e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6107d1811061021f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f46656520746f6f206869676820286e6f742067726561746572207468616e203260448201527f30252900000000000000000000000000000000000000000000000000000000006064820152608401610185565b73ffffffffffffffffffffffffffffffffffffffff8216600081815260016020526040808220849055518392917fcadc101c03be6a205eb345867605c4824dd58c1660c7c1b6ce4a92ad024c0a8b91a35050565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600160205260408120548190156102d05750506000805473ffffffffffffffffffffffffffffffffffffffff92831682526001602052604090912054911691565b505060005473ffffffffffffffffffffffffffffffffffffffff16917f00000000000000000000000000000000000000000000000000000000000001f49150565b60005473ffffffffffffffffffffffffffffffffffffffff163314610392576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610185565b61039c60006104ce565b565b60005473ffffffffffffffffffffffffffffffffffffffff16331461041f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610185565b73ffffffffffffffffffffffffffffffffffffffff81166104c2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610185565b6104cb816104ce565b50565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461056757600080fd5b919050565b6000806040838503121561057f57600080fd5b61058883610543565b946020939093013593505050565b6000602082840312156105a857600080fd5b6105b182610543565b939250505056fea2646970667358221220195dbea54f8e03c3c2ed8993e0e143d4115d625a63a05fd40636cd3ca6cf995564736f6c634300080a0033

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

00000000000000000000000000000000000000000000000000000000000001f4000000000000000000000000d1d1d4e36117ab794ec5d4c78cbd3a8904e691d0

-----Decoded View---------------
Arg [0] : _defaultFeeBPS (uint256): 500
Arg [1] : feeManagerAdmin (address): 0xd1d1D4e36117aB794ec5d4c78cBD3a8904E691D0

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000001f4
Arg [1] : 000000000000000000000000d1d1d4e36117ab794ec5d4c78cbd3a8904e691d0


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.