My Name Tag:
Not Available, login to update
[ Download CSV Export ]
Latest 1 internal transaction
Parent Txn Hash | Block | From | To | Value | |||
---|---|---|---|---|---|---|---|
0x6a55d19456bd63dd059051fdb5c39dd6e3749b1dfcd1e0715ca9e7730341caf4 | 16077912 | 523 days 6 hrs ago | PaintSwap Finance: Deployer | Contract Creation | 0 FTM |
[ Download CSV Export ]
Contract Name:
CollectionRoyalties
Compiler Version
v0.8.6+commit.11564f7e
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; contract CollectionRoyalties is Ownable { event AddedCollectionFromRoyalty(address nft, address recipient, uint fee); event RemovedCollectionFromRoyalty(address nft); struct CollectionRoyaltyInfo { address recipient; uint16 fee; } // Contract to recipient royalties mapping(address => CollectionRoyaltyInfo) public collectionRoyalties; uint16 public baseCollectionRoyaltyFeePercentage; uint public maxCollectionRoyalty = 1000; constructor() { baseCollectionRoyaltyFeePercentage = 10; // 0.1% } function setBaseCollectionRoyalty(uint16 _feePercentage) external onlyOwner { require(_feePercentage < maxCollectionRoyalty, "Royalty fee is too high"); baseCollectionRoyaltyFeePercentage = _feePercentage; } function setMaxCollectionRoyalty(uint _maxCollectionRoyalty) external onlyOwner { require(maxCollectionRoyalty <= 1000); maxCollectionRoyalty = _maxCollectionRoyalty; } // function updateRoyalty // TODO If I updated contracts again, otherwise delete and re-add function getCollectionRoyaltyInfo(address _addr) external view returns (CollectionRoyaltyInfo memory) { return collectionRoyalties[_addr]; } function addCollectionRoyaltyFromOwner(address _nft, address _recipient) external { // Add they the owner? require(Ownable(_nft).owner() == msg.sender, "Only the owner can call this"); require(!collectionRoyaltyBlacklist[_nft], "This collection is in the blacklist"); collectionRoyalties[_nft] = CollectionRoyaltyInfo({recipient: _recipient, fee: baseCollectionRoyaltyFeePercentage}); emit AddedCollectionFromRoyalty(_nft, _recipient, baseCollectionRoyaltyFeePercentage); } function removeCollectionRoyaltyFromOwner(address _nft) external onlyOwner { require(Ownable(_nft).owner() == msg.sender, "Only the owner can call this"); delete collectionRoyalties[_nft]; emit RemovedCollectionFromRoyalty(_nft); } function addToCollectionRoyaltyBlacklist(address _nft) external onlyOwner { collectionRoyaltyBlacklist[_nft] = true; } function addCollectionRoyalty( address _nft, address _recipient, uint16 _fee ) external onlyOwner { require(_fee <= maxCollectionRoyalty, "Royalty is too much"); collectionRoyalties[_nft] = CollectionRoyaltyInfo({recipient: _recipient, fee: _fee}); emit AddedCollectionFromRoyalty(_nft, _recipient, _fee); } mapping(address => bool) collectionRoyaltyBlacklist; function removeCollectionRoyalty(address _nft) external onlyOwner { delete collectionRoyalties[_nft]; // Only owner can add them emit RemovedCollectionFromRoyalty(_nft); } }
// 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 () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), 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 { emit OwnershipTransferred(_owner, address(0)); _owner = 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"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } }
// 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) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"nft","type":"address"},{"indexed":false,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"AddedCollectionFromRoyalty","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":false,"internalType":"address","name":"nft","type":"address"}],"name":"RemovedCollectionFromRoyalty","type":"event"},{"inputs":[{"internalType":"address","name":"_nft","type":"address"},{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"uint16","name":"_fee","type":"uint16"}],"name":"addCollectionRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_nft","type":"address"},{"internalType":"address","name":"_recipient","type":"address"}],"name":"addCollectionRoyaltyFromOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_nft","type":"address"}],"name":"addToCollectionRoyaltyBlacklist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"baseCollectionRoyaltyFeePercentage","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"collectionRoyalties","outputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint16","name":"fee","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"getCollectionRoyaltyInfo","outputs":[{"components":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint16","name":"fee","type":"uint16"}],"internalType":"struct CollectionRoyalties.CollectionRoyaltyInfo","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxCollectionRoyalty","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_nft","type":"address"}],"name":"removeCollectionRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_nft","type":"address"}],"name":"removeCollectionRoyaltyFromOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_feePercentage","type":"uint16"}],"name":"setBaseCollectionRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxCollectionRoyalty","type":"uint256"}],"name":"setMaxCollectionRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040526103e860035534801561001657600080fd5b50600080546001600160a01b031916339081178255604051909182917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506002805461ffff1916600a179055610b60806100756000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80637d285aff1161008c578063acecf1a211610066578063acecf1a214610267578063d48ff9f014610288578063f2fde38b1461029b578063f8d614c9146102ae57600080fd5b80637d285aff146102265780638da5cb5b14610239578063a26acbbc1461025457600080fd5b806339310f39116100c857806339310f39146101a057806346167d2d146101b357806357b275b4146101c6578063715018a61461021e57600080fd5b80630d2b98e7146100ef5780631adf7e26146101045780632e64bc4a14610117575b600080fd5b6101026100fd3660046109e8565b6102c5565b005b610102610112366004610a29565b610355565b6101736101253660046109e8565b604080518082018252600080825260209182018190526001600160a01b039384168152600182528290208251808401909352549283168252600160a01b90920461ffff169181019190915290565b6040805182516001600160a01b0316815260209283015161ffff1692810192909252015b60405180910390f35b6101026101ae366004610ac4565b610541565b6101026101c13660046109e8565b610581565b6101fc6101d43660046109e8565b6001602052600090815260409020546001600160a01b03811690600160a01b900461ffff1682565b604080516001600160a01b03909316835261ffff909116602083015201610197565b6101026105cf565b6101026102343660046109e8565b610643565b6000546040516001600160a01b039091168152602001610197565b610102610262366004610a62565b61073e565b6002546102759061ffff1681565b60405161ffff9091168152602001610197565b610102610296366004610aa9565b610850565b6101026102a93660046109e8565b6108e7565b6102b760035481565b604051908152602001610197565b6000546001600160a01b031633146102f85760405162461bcd60e51b81526004016102ef90610add565b60405180910390fd5b6001600160a01b03811660008181526001602090815260409182902080546001600160b01b031916905590519182527f204bff414ab45e964ccd65a5f3ae6070e113d8e96ecc28c10b47a73724380a1a910160405180910390a150565b336001600160a01b0316826001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561039857600080fd5b505afa1580156103ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103d09190610a0c565b6001600160a01b0316146104265760405162461bcd60e51b815260206004820152601c60248201527f4f6e6c7920746865206f776e65722063616e2063616c6c20746869730000000060448201526064016102ef565b6001600160a01b03821660009081526004602052604090205460ff161561049b5760405162461bcd60e51b815260206004820152602360248201527f5468697320636f6c6c656374696f6e20697320696e2074686520626c61636b6c6044820152621a5cdd60ea1b60648201526084016102ef565b6040805180820182526001600160a01b038381168083526002805461ffff908116602080870191825289861660008181526001835289902097518854935197166001600160b01b031990931692909217600160a01b96841696909602959095179095559054855194855292840191909152168183015290517f55aa6b7deac290078b9b3b927ee1472239d9c5a421d40d287a0db8e4d7dcb3249181900360600190a15050565b6000546001600160a01b0316331461056b5760405162461bcd60e51b81526004016102ef90610add565b6103e8600354111561057c57600080fd5b600355565b6000546001600160a01b031633146105ab5760405162461bcd60e51b81526004016102ef90610add565b6001600160a01b03166000908152600460205260409020805460ff19166001179055565b6000546001600160a01b031633146105f95760405162461bcd60e51b81526004016102ef90610add565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b0316331461066d5760405162461bcd60e51b81526004016102ef90610add565b336001600160a01b0316816001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156106b057600080fd5b505afa1580156106c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106e89190610a0c565b6001600160a01b0316146102f85760405162461bcd60e51b815260206004820152601c60248201527f4f6e6c7920746865206f776e65722063616e2063616c6c20746869730000000060448201526064016102ef565b6000546001600160a01b031633146107685760405162461bcd60e51b81526004016102ef90610add565b6003548161ffff1611156107b45760405162461bcd60e51b81526020600482015260136024820152720a4def2c2d8e8f240d2e640e8dede40daeac6d606b1b60448201526064016102ef565b6040805180820182526001600160a01b0384811680835261ffff85811660208086018281528a8616600081815260018452899020975188549251909516600160a01b026001600160b01b03199092169490961693909317929092179094558451928352820152918201527f55aa6b7deac290078b9b3b927ee1472239d9c5a421d40d287a0db8e4d7dcb3249060600160405180910390a1505050565b6000546001600160a01b0316331461087a5760405162461bcd60e51b81526004016102ef90610add565b6003548161ffff16106108cf5760405162461bcd60e51b815260206004820152601760248201527f526f79616c74792066656520697320746f6f206869676800000000000000000060448201526064016102ef565b6002805461ffff191661ffff92909216919091179055565b6000546001600160a01b031633146109115760405162461bcd60e51b81526004016102ef90610add565b6001600160a01b0381166109765760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102ef565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b803561ffff811681146109e357600080fd5b919050565b6000602082840312156109fa57600080fd5b8135610a0581610b12565b9392505050565b600060208284031215610a1e57600080fd5b8151610a0581610b12565b60008060408385031215610a3c57600080fd5b8235610a4781610b12565b91506020830135610a5781610b12565b809150509250929050565b600080600060608486031215610a7757600080fd5b8335610a8281610b12565b92506020840135610a9281610b12565b9150610aa0604085016109d1565b90509250925092565b600060208284031215610abb57600080fd5b610a05826109d1565b600060208284031215610ad657600080fd5b5035919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6001600160a01b0381168114610b2757600080fd5b5056fea26469706673582212200924ff6ccc2ad2dd23f1b93370deaf1ef975ac970d9151ec55a30ae1731290d664736f6c63430008060033
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|
Validator ID :
0 FTM
Amount Staked
0
Amount Delegated
0
Staking Total
0
Staking Start Epoch
0
Staking Start Time
0
Proof of Importance
0
Origination Score
0
Validation Score
0
Active
0
Online
0
Downtime
0 s
Address | Amount | claimed Rewards | Created On Epoch | Created On |
---|
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.