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 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Transfer Ownersh... | 15416718 | 865 days ago | IN | 0 ETH | 0.00086241 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
RoyaltyFeeRegistry
Compiler Version
v0.8.7+commit.e28d00a7
Optimization Enabled:
Yes with 888888 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {IRoyaltyFeeRegistry} from "../interfaces/IRoyaltyFeeRegistry.sol"; /** * @title RoyaltyFeeRegistry * @notice It is a royalty fee registry for the Spume exchange. */ contract RoyaltyFeeRegistry is IRoyaltyFeeRegistry, Ownable { struct FeeInfo { address setter; address receiver; uint256 fee; } // Limit (if enforced for fee royalty in percentage (10,000 = 100%) uint256 public royaltyFeeLimit; mapping(address => FeeInfo) private _royaltyFeeInfoCollection; event NewRoyaltyFeeLimit(uint256 royaltyFeeLimit); event RoyaltyFeeUpdate(address indexed collection, address indexed setter, address indexed receiver, uint256 fee); /** * @notice Constructor * @param _royaltyFeeLimit new royalty fee limit (500 = 5%, 1,000 = 10%) */ constructor(uint256 _royaltyFeeLimit) { require(_royaltyFeeLimit <= 9500, "Owner: Royalty fee limit too high"); royaltyFeeLimit = _royaltyFeeLimit; } /** * @notice Update royalty info for collection * @param _royaltyFeeLimit new royalty fee limit (500 = 5%, 1,000 = 10%) */ function updateRoyaltyFeeLimit(uint256 _royaltyFeeLimit) external override onlyOwner { require(_royaltyFeeLimit <= 9500, "Owner: Royalty fee limit too high"); royaltyFeeLimit = _royaltyFeeLimit; emit NewRoyaltyFeeLimit(_royaltyFeeLimit); } /** * @notice Update royalty info for collection * @param collection address of the NFT contract * @param setter address that sets the receiver * @param receiver receiver for the royalty fee * @param fee fee (500 = 5%, 1,000 = 10%) */ function updateRoyaltyInfoForCollection( address collection, address setter, address receiver, uint256 fee ) external override onlyOwner { require(fee <= royaltyFeeLimit, "Registry: Royalty fee too high"); _royaltyFeeInfoCollection[collection] = FeeInfo({setter: setter, receiver: receiver, fee: fee}); emit RoyaltyFeeUpdate(collection, setter, receiver, fee); } /** * @notice Calculate royalty info for a collection address and a sale gross amount * @param collection collection address * @param amount amount * @return receiver address and amount received by royalty recipient */ function royaltyInfo(address collection, uint256 amount) external view override returns (address, uint256) { return ( _royaltyFeeInfoCollection[collection].receiver, (amount * _royaltyFeeInfoCollection[collection].fee) / 10000 ); } /** * @notice View royalty info for a collection address * @param collection collection address */ function royaltyFeeInfoCollection(address collection) external view override returns ( address, address, uint256 ) { return ( _royaltyFeeInfoCollection[collection].setter, _royaltyFeeInfoCollection[collection].receiver, _royaltyFeeInfoCollection[collection].fee ); } }
// 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 pragma solidity ^0.8.0; interface IRoyaltyFeeRegistry { function updateRoyaltyInfoForCollection( address collection, address setter, address receiver, uint256 fee ) external; function updateRoyaltyFeeLimit(uint256 _royaltyFeeLimit) external; function royaltyInfo(address collection, uint256 amount) external view returns (address, uint256); function royaltyFeeInfoCollection(address collection) external view returns ( address, address, uint256 ); }
// 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": 888888 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"uint256","name":"_royaltyFeeLimit","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"royaltyFeeLimit","type":"uint256"}],"name":"NewRoyaltyFeeLimit","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":"address","name":"collection","type":"address"},{"indexed":true,"internalType":"address","name":"setter","type":"address"},{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"RoyaltyFeeUpdate","type":"event"},{"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":"collection","type":"address"}],"name":"royaltyFeeInfoCollection","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"royaltyFeeLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_royaltyFeeLimit","type":"uint256"}],"name":"updateRoyaltyFeeLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"collection","type":"address"},{"internalType":"address","name":"setter","type":"address"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"fee","type":"uint256"}],"name":"updateRoyaltyInfoForCollection","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b506040516108ca3803806108ca83398101604081905261002f916100f0565b610038336100a0565b61251c8111156100985760405162461bcd60e51b815260206004820152602160248201527f4f776e65723a20526f79616c747920666565206c696d697420746f6f206869676044820152600d60fb1b606482015260840160405180910390fd5b600155610109565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121561010257600080fd5b5051919050565b6107b2806101186000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063b9223c9d1161005b578063b9223c9d1461011a578063bbdf9b681461012d578063e31ef91c14610140578063f2fde38b146101bf57600080fd5b80632782d6c71461008d5780634fb7d3f9146100d1578063715018a6146100e85780638da5cb5b146100f2575b600080fd5b6100a061009b36600461069a565b6101d2565b6040805173ffffffffffffffffffffffffffffffffffffffff90931683526020830191909152015b60405180910390f35b6100da60015481565b6040519081526020016100c8565b6100f061022c565b005b60005460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100c8565b6100f06101283660046106c4565b610240565b6100f061013b36600461064f565b61031a565b61018c61014e36600461062d565b73ffffffffffffffffffffffffffffffffffffffff908116600090815260026020819052604090912080546001820154919092015491831693921691565b6040805173ffffffffffffffffffffffffffffffffffffffff9485168152939092166020840152908201526060016100c8565b6100f06101cd36600461062d565b610457565b73ffffffffffffffffffffffffffffffffffffffff80831660009081526002602081905260408220600181015491015491928392911690612710906102179086610718565b61022191906106dd565b915091509250929050565b61023461050e565b61023e600061058f565b565b61024861050e565b61251c8111156102df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f4f776e65723a20526f79616c747920666565206c696d697420746f6f2068696760448201527f680000000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60018190556040518181527f2da7166c72ef3860ef4fb2571105533c40615269a6dbc38ce0b264910df1c2569060200160405180910390a150565b61032261050e565b60015481111561038e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f52656769737472793a20526f79616c74792066656520746f6f2068696768000060448201526064016102d6565b6040805160608101825273ffffffffffffffffffffffffffffffffffffffff85811680835285821660208085018281528587018881528b861660008181526002808652908a9020985189549089167fffffffffffffffffffffffff0000000000000000000000000000000000000000918216178a55935160018a0180549190991694169390931790965551950194909455935185815290927fd01984afa6e37420452e575e7d99dd7e632b3ec8ea2adec998475b76ca494d64910160405180910390a450505050565b61045f61050e565b73ffffffffffffffffffffffffffffffffffffffff8116610502576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016102d6565b61050b8161058f565b50565b60005473ffffffffffffffffffffffffffffffffffffffff16331461023e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102d6565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461062857600080fd5b919050565b60006020828403121561063f57600080fd5b61064882610604565b9392505050565b6000806000806080858703121561066557600080fd5b61066e85610604565b935061067c60208601610604565b925061068a60408601610604565b9396929550929360600135925050565b600080604083850312156106ad57600080fd5b6106b683610604565b946020939093013593505050565b6000602082840312156106d657600080fd5b5035919050565b600082610713577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615610777577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b50029056fea264697066735822122065a9e3bc34ebeac3af14cda5ca89f60cce4bb715aad26ad4eb4c6b3d6acabc1964736f6c63430008070033000000000000000000000000000000000000000000000000000000000000251c
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100885760003560e01c8063b9223c9d1161005b578063b9223c9d1461011a578063bbdf9b681461012d578063e31ef91c14610140578063f2fde38b146101bf57600080fd5b80632782d6c71461008d5780634fb7d3f9146100d1578063715018a6146100e85780638da5cb5b146100f2575b600080fd5b6100a061009b36600461069a565b6101d2565b6040805173ffffffffffffffffffffffffffffffffffffffff90931683526020830191909152015b60405180910390f35b6100da60015481565b6040519081526020016100c8565b6100f061022c565b005b60005460405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100c8565b6100f06101283660046106c4565b610240565b6100f061013b36600461064f565b61031a565b61018c61014e36600461062d565b73ffffffffffffffffffffffffffffffffffffffff908116600090815260026020819052604090912080546001820154919092015491831693921691565b6040805173ffffffffffffffffffffffffffffffffffffffff9485168152939092166020840152908201526060016100c8565b6100f06101cd36600461062d565b610457565b73ffffffffffffffffffffffffffffffffffffffff80831660009081526002602081905260408220600181015491015491928392911690612710906102179086610718565b61022191906106dd565b915091509250929050565b61023461050e565b61023e600061058f565b565b61024861050e565b61251c8111156102df576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f4f776e65723a20526f79616c747920666565206c696d697420746f6f2068696760448201527f680000000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60018190556040518181527f2da7166c72ef3860ef4fb2571105533c40615269a6dbc38ce0b264910df1c2569060200160405180910390a150565b61032261050e565b60015481111561038e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f52656769737472793a20526f79616c74792066656520746f6f2068696768000060448201526064016102d6565b6040805160608101825273ffffffffffffffffffffffffffffffffffffffff85811680835285821660208085018281528587018881528b861660008181526002808652908a9020985189549089167fffffffffffffffffffffffff0000000000000000000000000000000000000000918216178a55935160018a0180549190991694169390931790965551950194909455935185815290927fd01984afa6e37420452e575e7d99dd7e632b3ec8ea2adec998475b76ca494d64910160405180910390a450505050565b61045f61050e565b73ffffffffffffffffffffffffffffffffffffffff8116610502576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016102d6565b61050b8161058f565b50565b60005473ffffffffffffffffffffffffffffffffffffffff16331461023e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102d6565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461062857600080fd5b919050565b60006020828403121561063f57600080fd5b61064882610604565b9392505050565b6000806000806080858703121561066557600080fd5b61066e85610604565b935061067c60208601610604565b925061068a60408601610604565b9396929550929360600135925050565b600080604083850312156106ad57600080fd5b6106b683610604565b946020939093013593505050565b6000602082840312156106d657600080fd5b5035919050565b600082610713577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615610777577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b50029056fea264697066735822122065a9e3bc34ebeac3af14cda5ca89f60cce4bb715aad26ad4eb4c6b3d6acabc1964736f6c63430008070033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000251c
-----Decoded View---------------
Arg [0] : _royaltyFeeLimit (uint256): 9500
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000000000000000000000000000000000000000251c
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 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.