Source Code
Overview
ETH Balance
0 ETH
More Info
ContractCreator
Multichain Info
N/A
Loading...
Loading
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x6105ce22...7F75a221E The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
RoyaltyModule
Compiler Version
v0.8.23+commit.f704f362
Optimization Enabled:
Yes with 20000 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.23;
// external
import { ReentrancyGuard } from "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
// contracts
import { IRoyaltyModule } from "contracts/interfaces/modules/royalty/IRoyaltyModule.sol";
import { IRoyaltyPolicy } from "contracts/interfaces/modules/royalty/policies/IRoyaltyPolicy.sol";
import { Errors } from "contracts/lib/Errors.sol";
/// @title Story Protocol Royalty Module
/// @notice The Story Protocol royalty module allows to set royalty policies an ipId
/// and pay royalties as a derivative ip.
contract RoyaltyModule is IRoyaltyModule, ReentrancyGuard {
/// @notice Indicates if a royalty policy is whitelisted
mapping(address royaltyPolicy => bool allowed) public isWhitelistedRoyaltyPolicy;
/// @notice Indicates if a royalty token is whitelisted
mapping(address token => bool) public isWhitelistedRoyaltyToken;
/// @notice Indicates the royalty policy for a given ipId
mapping(address ipId => address royaltyPolicy) public royaltyPolicies;
/// @notice Restricts the calls to the governance address
modifier onlyGovernance() {
// TODO: where is governance address defined?
_;
}
/// @notice Restricts the calls to the license module
modifier onlyLicensingModule() {
// TODO: where is license module address defined?
_;
}
/// @notice Whitelist a royalty policy
/// @param _royaltyPolicy The address of the royalty policy
/// @param _allowed Indicates if the royalty policy is whitelisted or not
function whitelistRoyaltyPolicy(address _royaltyPolicy, bool _allowed) external onlyGovernance {
if (_royaltyPolicy == address(0)) revert Errors.RoyaltyModule__ZeroRoyaltyPolicy();
isWhitelistedRoyaltyPolicy[_royaltyPolicy] = _allowed;
emit RoyaltyPolicyWhitelistUpdated(_royaltyPolicy, _allowed);
}
/// @notice Whitelist a royalty token
/// @param _token The token address
/// @param _allowed Indicates if the token is whitelisted or not
function whitelistRoyaltyToken(address _token, bool _allowed) external onlyGovernance {
if (_token == address(0)) revert Errors.RoyaltyModule__ZeroRoyaltyToken();
isWhitelistedRoyaltyToken[_token] = _allowed;
emit RoyaltyTokenWhitelistUpdated(_token, _allowed);
}
// TODO: Ensure this function is called on ipId registration: root and derivatives registrations
// TODO: Ensure that the ipId that is passed in from license cannot be manipulated - given ipId addresses are deterministic
/// @notice Sets the royalty policy for an ipId
/// @param _ipId The ipId
/// @param _royaltyPolicy The address of the royalty policy
/// @param _parentIpIds The parent ipIds
/// @param _data The data to initialize the policy
function setRoyaltyPolicy(
address _ipId,
address _royaltyPolicy,
address[] calldata _parentIpIds,
bytes calldata _data
) external onlyLicensingModule nonReentrant {
if (royaltyPolicies[_ipId] != address(0)) revert Errors.RoyaltyModule__AlreadySetRoyaltyPolicy();
if (!isWhitelistedRoyaltyPolicy[_royaltyPolicy]) revert Errors.RoyaltyModule__NotWhitelistedRoyaltyPolicy();
for (uint32 i = 0; i < _parentIpIds.length; i++) {
if (royaltyPolicies[_parentIpIds[i]] != _royaltyPolicy) revert Errors.RoyaltyModule__IncompatibleRoyaltyPolicy();
}
royaltyPolicies[_ipId] = _royaltyPolicy;
IRoyaltyPolicy(_royaltyPolicy).initPolicy(_ipId, _parentIpIds, _data);
emit RoyaltyPolicySet(_ipId, _royaltyPolicy, _data);
}
/// @notice Allows a sender to to pay royalties on behalf of an ipId
/// @param _receiverIpId The ipId that receives the royalties
/// @param _payerIpId The ipId that pays the royalties
/// @param _token The token to use to pay the royalties
/// @param _amount The amount to pay
function payRoyaltyOnBehalf(address _receiverIpId, address _payerIpId, address _token, uint256 _amount) external nonReentrant {
address royaltyPolicy = royaltyPolicies[_receiverIpId];
if (royaltyPolicy == address(0)) revert Errors.RoyaltyModule__NoRoyaltyPolicySet();
if (!isWhitelistedRoyaltyToken[_token]) revert Errors.RoyaltyModule__NotWhitelistedRoyaltyToken();
// TODO: check how to handle the below with replacement
if (!isWhitelistedRoyaltyPolicy[royaltyPolicy]) revert Errors.RoyaltyModule__NotWhitelistedRoyaltyPolicy();
IRoyaltyPolicy(royaltyPolicy).onRoyaltyPayment(msg.sender, _receiverIpId, _token, _amount);
// TODO: review event vs variable for royalty tracking
emit RoyaltyPaid(_receiverIpId, _payerIpId, msg.sender, _token, _amount);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)
pragma solidity ^0.8.20;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant NOT_ENTERED = 1;
uint256 private constant ENTERED = 2;
uint256 private _status;
/**
* @dev Unauthorized reentrant call.
*/
error ReentrancyGuardReentrantCall();
constructor() {
_status = NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
// On the first call to nonReentrant, _status will be NOT_ENTERED
if (_status == ENTERED) {
revert ReentrancyGuardReentrantCall();
}
// Any calls to nonReentrant after this point will fail
_status = ENTERED;
}
function _nonReentrantAfter() private {
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = NOT_ENTERED;
}
/**
* @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
* `nonReentrant` function in the call stack.
*/
function _reentrancyGuardEntered() internal view returns (bool) {
return _status == ENTERED;
}
}// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.23;
/// @title RoyaltyModule interface
interface IRoyaltyModule {
/// @notice Event emitted when a royalty policy is whitelisted
/// @param royaltyPolicy The address of the royalty policy
/// @param allowed Indicates if the royalty policy is whitelisted or not
event RoyaltyPolicyWhitelistUpdated(address royaltyPolicy, bool allowed);
/// @notice Event emitted when a royalty token is whitelisted
/// @param token The address of the royalty token
/// @param allowed Indicates if the royalty token is whitelisted or not
event RoyaltyTokenWhitelistUpdated(address token, bool allowed);
/// @notice Event emitted when a royalty policy is set
/// @param ipId The ipId
/// @param royaltyPolicy The address of the royalty policy
/// @param data The data to initialize the policy
event RoyaltyPolicySet(address ipId, address royaltyPolicy, bytes data);
/// @notice Event emitted when royalties are paid
/// @param receiverIpId The ipId that receives the royalties
/// @param payerIpId The ipId that pays the royalties
/// @param sender The address that pays the royalties on behalf of the payer ipId
/// @param token The token that is used to pay the royalties
/// @param amount The amount that is paid
event RoyaltyPaid(address receiverIpId, address payerIpId, address sender, address token, uint256 amount);
/// @notice Whitelist a royalty policy
/// @param royaltyPolicy The address of the royalty policy
/// @param allowed Indicates if the royalty policy is whitelisted or not
function whitelistRoyaltyPolicy(address royaltyPolicy, bool allowed) external;
/// @notice Whitelist a royalty token
/// @param token The token address
/// @param allowed Indicates if the token is whitelisted or not
function whitelistRoyaltyToken(address token, bool allowed) external;
/// @notice Sets the royalty policy for an ipId
/// @param ipId The ipId
/// @param royaltyPolicy The address of the royalty policy
/// @param parentIpIds The parent ipIds
/// @param data The data to initialize the policy
function setRoyaltyPolicy(address ipId, address royaltyPolicy, address[] calldata parentIpIds, bytes calldata data) external;
/// @notice Allows a sender to to pay royalties on behalf of an ipId
/// @param receiverIpId The ipId that receives the royalties
/// @param payerIpId The ipId that pays the royalties
/// @param token The token to use to pay the royalties
/// @param amount The amount to pay
function payRoyaltyOnBehalf(address receiverIpId, address payerIpId, address token, uint256 amount) external;
}// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.23;
/// @title RoyaltyPolicy interface
interface IRoyaltyPolicy {
/// @notice Initializes the royalty policy
/// @param ipId The ipId
/// @param parentsIpIds The parent ipIds
/// @param data The data to initialize the policy
function initPolicy(address ipId, address[] calldata parentsIpIds, bytes calldata data) external;
/// @notice Allows to pay a royalty
/// @param caller The caller
/// @param ipId The ipId
/// @param token The token to pay
/// @param amount The amount to pay
function onRoyaltyPayment(address caller, address ipId, address token, uint256 amount) external;
}// SPDX-License-Identifier: UNLICENSED
// See https://github.com/storyprotocol/protocol-contracts/blob/main/StoryProtocol-AlphaTestingAgreement-17942166.3.pdf
pragma solidity ^0.8.19;
/// @title Errors Library
/// @notice Library for all Story Protocol contract errors.
library Errors {
////////////////////////////////////////////////////////////////////////////
// Governance //
////////////////////////////////////////////////////////////////////////////
error Governance__OnlyProtocolAdmin();
error Governance__ZeroAddress();
error Governance__ProtocolPaused();
error Governance__InconsistentState();
error Governance__NewStateIsTheSameWithOldState();
error Governance__UnsupportedInterface(string interfaceName);
////////////////////////////////////////////////////////////////////////////
// IPAccount //
////////////////////////////////////////////////////////////////////////////
error IPAccount__InvalidSigner();
error IPAccount__InvalidSignature();
error IPAccount__ExpiredSignature();
////////////////////////////////////////////////////////////////////////////
// Module //
////////////////////////////////////////////////////////////////////////////
/// @notice The caller is not allowed to call the provided module.
error Module_Unauthorized();
////////////////////////////////////////////////////////////////////////////
// IPAccountRegistry //
////////////////////////////////////////////////////////////////////////////
error IPAccountRegistry_InvalidIpAccountImpl();
////////////////////////////////////////////////////////////////////////////
// IPAssetRegistry //
////////////////////////////////////////////////////////////////////////////
/// @notice The IP asset has already been registered.
error IPAssetRegistry__AlreadyRegistered();
/// @notice The IP account has already been created.
error IPAssetRegistry__IPAccountAlreadyCreated();
/// @notice The IP asset has not yet been registered.
error IPAssetRegistry__NotYetRegistered();
/// @notice The specified IP resolver is not valid.
error IPAssetRegistry__ResolverInvalid();
/// @notice Caller not authorized to perform the IP registry function call.
error IPAssetRegistry__Unauthorized();
/// @notice The deployed address of account doesn't match with IP ID.
error IPAssetRegistry__InvalidAccount();
/// @notice The metadata provider is not valid.
error IPAssetRegistry__InvalidMetadataProvider();
////////////////////////////////////////////////////////////////////////////
// IPResolver ///
////////////////////////////////////////////////////////////////////////////
/// @notice The targeted IP does not yet have an IP account.
error IPResolver_InvalidIP();
/// @notice Caller not authorized to perform the IP resolver function call.
error IPResolver_Unauthorized();
////////////////////////////////////////////////////////////////////////////
// Metadata Provider ///
////////////////////////////////////////////////////////////////////////////
/// @notice Provided hash metadata is not valid.
error MetadataProvider__HashInvalid();
/// @notice The caller is not the authorized IP asset owner.
error MetadataProvider__IPAssetOwnerInvalid();
/// @notice Provided hash metadata is not valid.
error MetadataProvider__NameInvalid();
/// @notice The new metadata provider is not compatible with the old provider.
error MetadataProvider__MetadataNotCompatible();
/// @notice Provided registrant metadata is not valid.
error MetadataProvider__RegistrantInvalid();
/// @notice Provided registration date is not valid.
error MetadataProvider__RegistrationDateInvalid();
/// @notice Caller does not access to set metadata storage for the provider.
error MetadataProvider__Unauthorized();
/// @notice A metadata provider upgrade is not currently available.
error MetadataProvider__UpgradeUnavailable();
/// @notice The upgrade provider is not valid.
error MetadataProvider__UpgradeProviderInvalid();
/// @notice Provided metadata URI is not valid.
error MetadataProvider__URIInvalid();
////////////////////////////////////////////////////////////////////////////
// LicenseRegistry //
////////////////////////////////////////////////////////////////////////////
error LicenseRegistry__PolicyAlreadySetForIpId();
error LicenseRegistry__FrameworkNotFound();
error LicenseRegistry__EmptyLicenseUrl();
error LicenseRegistry__InvalidPolicyFramework();
error LicenseRegistry__PolicyAlreadyAdded();
error LicenseRegistry__ParamVerifierLengthMismatch();
error LicenseRegistry__PolicyNotFound();
error LicenseRegistry__NotLicensee();
error LicenseRegistry__ParentIdEqualThanChild();
error LicenseRegistry__LicensorDoesntHaveThisPolicy();
error LicenseRegistry__MintLicenseParamFailed();
error LicenseRegistry__LinkParentParamFailed();
error LicenseRegistry__TransferParamFailed();
error LicenseRegistry__InvalidLicensor();
error LicenseRegistry__ParamVerifierAlreadySet();
error LicenseRegistry__CommercialTermInNonCommercialPolicy();
error LicenseRegistry__EmptyParamName();
error LicenseRegistry__UnregisteredFrameworkAddingPolicy();
error LicenseRegistry__UnauthorizedAccess();
error LicenseRegistry__LicensorNotRegistered();
error LicenseRegistry__CallerNotLicensorAndPolicyNotSet();
////////////////////////////////////////////////////////////////////////////
// LicenseRegistryAware //
////////////////////////////////////////////////////////////////////////////
error LicenseRegistryAware__CallerNotLicenseRegistry();
////////////////////////////////////////////////////////////////////////////
// PolicyFrameworkManager //
////////////////////////////////////////////////////////////////////////////
error PolicyFrameworkManager__GettingPolicyWrongFramework();
////////////////////////////////////////////////////////////////////////////
// LicensorApprovalChecker //
////////////////////////////////////////////////////////////////////////////
error LicensorApprovalChecker__Unauthorized();
////////////////////////////////////////////////////////////////////////////
// Dispute Module //
////////////////////////////////////////////////////////////////////////////
error DisputeModule__ZeroArbitrationPolicy();
error DisputeModule__ZeroArbitrationRelayer();
error DisputeModule__ZeroDisputeTag();
error DisputeModule__ZeroLinkToDisputeEvidence();
error DisputeModule__NotWhitelistedArbitrationPolicy();
error DisputeModule__NotWhitelistedDisputeTag();
error DisputeModule__NotWhitelistedArbitrationRelayer();
error DisputeModule__NotDisputeInitiator();
error DisputeModule__NotInDisputeState();
error DisputeModule__NotAbleToResolve();
error ArbitrationPolicySP__ZeroDisputeModule();
error ArbitrationPolicySP__ZeroPaymentToken();
error ArbitrationPolicySP__NotDisputeModule();
////////////////////////////////////////////////////////////////////////////
// Royalty Module //
////////////////////////////////////////////////////////////////////////////
error RoyaltyModule__ZeroRoyaltyPolicy();
error RoyaltyModule__NotWhitelistedRoyaltyPolicy();
error RoyaltyModule__AlreadySetRoyaltyPolicy();
error RoyaltyModule__ZeroRoyaltyToken();
error RoyaltyModule__NotWhitelistedRoyaltyToken();
error RoyaltyModule__NoRoyaltyPolicySet();
error RoyaltyModule__IncompatibleRoyaltyPolicy();
error RoyaltyPolicyLS__ZeroRoyaltyModule();
error RoyaltyPolicyLS__ZeroLiquidSplitFactory();
error RoyaltyPolicyLS__ZeroLiquidSplitMain();
error RoyaltyPolicyLS__NotRoyaltyModule();
error RoyaltyPolicyLS__TransferFailed();
error RoyaltyPolicyLS__InvalidMinRoyalty();
error RoyaltyPolicyLS__InvalidRoyaltyStack();
error RoyaltyPolicyLS__ZeroMinRoyalty();
error RoyaltyPolicyLS__ZeroLicenseRegistry();
error LSClaimer__InvalidPath();
error LSClaimer__InvalidPathFirstPosition();
error LSClaimer__InvalidPathLastPosition();
error LSClaimer__AlreadyClaimed();
error LSClaimer__ZeroRNFT();
error LSClaimer__RNFTAlreadySet();
error LSClaimer__ETHBalanceNotZero();
error LSClaimer__ERC20BalanceNotZero();
error LSClaimer__ZeroIpId();
error LSClaimer__ZeroLicenseRegistry();
error LSClaimer__ZeroRoyaltyPolicyLS();
error LSClaimer__NotRoyaltyPolicyLS();
////////////////////////////////////////////////////////////////////////////
// ModuleRegistry //
////////////////////////////////////////////////////////////////////////////
error ModuleRegistry__ModuleAddressZeroAddress();
error ModuleRegistry__ModuleAddressNotContract();
error ModuleRegistry__ModuleAlreadyRegistered();
error ModuleRegistry__NameEmptyString();
error ModuleRegistry__NameAlreadyRegistered();
error ModuleRegistry__NameDoesNotMatch();
error ModuleRegistry__ModuleNotRegistered();
////////////////////////////////////////////////////////////////////////////
// RegistrationModule //
////////////////////////////////////////////////////////////////////////////
/// @notice The caller is not the owner of the root IP NFT.
error RegistrationModule__InvalidOwner();
////////////////////////////////////////////////////////////////////////////
// AccessController //
////////////////////////////////////////////////////////////////////////////
error AccessController__IPAccountIsZeroAddress();
error AccessController__IPAccountIsNotValid();
error AccessController__SignerIsZeroAddress();
error AccessController__CallerIsNotIPAccount();
error AccessController__PermissionIsNotValid();
////////////////////////////////////////////////////////////////////////////
// TaggingModule //
////////////////////////////////////////////////////////////////////////////
error TaggingModule__InvalidRelationTypeName();
error TaggingModule__RelationTypeAlreadyExists();
error TaggingModule__SrcIpIdDoesNotHaveSrcTag();
error TaggingModule__DstIpIdDoesNotHaveDstTag();
error TaggingModule__RelationTypeDoesNotExist();
}{
"remappings": [
"@openzeppelin/=node_modules/@openzeppelin/",
"base64-sol/=node_modules/base64-sol/",
"ds-test/=lib/forge-std/lib/ds-test/src/",
"forge-std/=lib/forge-std/src/",
"hardhat-deploy/=node_modules/hardhat-deploy/",
"hardhat/=node_modules/hardhat/",
"openzeppelin-contracts/=lib/reference/lib/openzeppelin-contracts/",
"reference/=lib/reference/"
],
"optimizer": {
"enabled": true,
"runs": 20000
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "ipfs",
"appendCBOR": true
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "paris",
"libraries": {
"contracts/lib/registries/IPAccountChecker.sol": {
"IPAccountChecker": "0x4687d14d30ea46a60499c2dcc07a56d2d1590fc3"
}
}
}Contract ABI
API[{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[],"name":"RoyaltyModule__AlreadySetRoyaltyPolicy","type":"error"},{"inputs":[],"name":"RoyaltyModule__IncompatibleRoyaltyPolicy","type":"error"},{"inputs":[],"name":"RoyaltyModule__NoRoyaltyPolicySet","type":"error"},{"inputs":[],"name":"RoyaltyModule__NotWhitelistedRoyaltyPolicy","type":"error"},{"inputs":[],"name":"RoyaltyModule__NotWhitelistedRoyaltyToken","type":"error"},{"inputs":[],"name":"RoyaltyModule__ZeroRoyaltyPolicy","type":"error"},{"inputs":[],"name":"RoyaltyModule__ZeroRoyaltyToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"receiverIpId","type":"address"},{"indexed":false,"internalType":"address","name":"payerIpId","type":"address"},{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RoyaltyPaid","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"ipId","type":"address"},{"indexed":false,"internalType":"address","name":"royaltyPolicy","type":"address"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"RoyaltyPolicySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"royaltyPolicy","type":"address"},{"indexed":false,"internalType":"bool","name":"allowed","type":"bool"}],"name":"RoyaltyPolicyWhitelistUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"bool","name":"allowed","type":"bool"}],"name":"RoyaltyTokenWhitelistUpdated","type":"event"},{"inputs":[{"internalType":"address","name":"royaltyPolicy","type":"address"}],"name":"isWhitelistedRoyaltyPolicy","outputs":[{"internalType":"bool","name":"allowed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"isWhitelistedRoyaltyToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_receiverIpId","type":"address"},{"internalType":"address","name":"_payerIpId","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"payRoyaltyOnBehalf","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"ipId","type":"address"}],"name":"royaltyPolicies","outputs":[{"internalType":"address","name":"royaltyPolicy","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_ipId","type":"address"},{"internalType":"address","name":"_royaltyPolicy","type":"address"},{"internalType":"address[]","name":"_parentIpIds","type":"address[]"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"setRoyaltyPolicy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_royaltyPolicy","type":"address"},{"internalType":"bool","name":"_allowed","type":"bool"}],"name":"whitelistRoyaltyPolicy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"bool","name":"_allowed","type":"bool"}],"name":"whitelistRoyaltyToken","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
0x608060405234801561001057600080fd5b506001600055610be9806100256000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c8063926e04fd1161005b578063926e04fd1461010a578063964678141461013d578063d2577f3b14610160578063f5f76ca81461017357600080fd5b80632930af8b1461008257806349fb4615146100e2578063520cbac6146100f7575b600080fd5b6100b861009036600461087c565b60036020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6100f56100f036600461089e565b610186565b005b6100f561010536600461089e565b610262565b61012d61011836600461087c565b60026020526000908152604090205460ff1681565b60405190151581526020016100d9565b61012d61014b36600461087c565b60016020526000908152604090205460ff1681565b6100f561016e3660046108da565b610336565b6100f561018136600461096e565b610568565b73ffffffffffffffffffffffffffffffffffffffff82166101d3576040517fb3c4f5c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff821660008181526001602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168515159081179091558251938452908301527f1f584640e1aae6441a6deba8d18148f5c9fb11a0bd7640e4b2808383a966269091015b60405180910390a15050565b73ffffffffffffffffffffffffffffffffffffffff82166102af576040517f6bed9b9600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff821660008181526002602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168515159081179091558251938452908301527fb40e5b8c4310e269d81608ec0e28372febb69a03ed8ace904c86459366cc36279101610256565b61033e610810565b73ffffffffffffffffffffffffffffffffffffffff808516600090815260036020526040902054168061039d576040517fd5c3d2f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff831660009081526002602052604090205460ff166103fc576040517f7227c77800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604090205460ff1661045b576040517f06b627fa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f5be8968b00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff8681166024830152848116604483015260648201849052821690635be8968b90608401600060405180830381600087803b1580156104d957600080fd5b505af11580156104ed573d6000803e3d6000fd5b50506040805173ffffffffffffffffffffffffffffffffffffffff898116825288811660208301523382840152871660608201526080810186905290517fe0ee75d70c5bcafc95db3e81961af1375efcd0e19fbfd7cae8a85f41c68e2d2d93509081900360a0019150a1506105626001600055565b50505050565b610570610810565b73ffffffffffffffffffffffffffffffffffffffff86811660009081526003602052604090205416156105cf576040517f16f86d6f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff851660009081526001602052604090205460ff1661062e576040517f06b627fa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b63ffffffff81168411156106fa578573ffffffffffffffffffffffffffffffffffffffff166003600087878563ffffffff1681811061067257610672610a30565b9050602002016020810190610687919061087c565b73ffffffffffffffffffffffffffffffffffffffff908116825260208201929092526040016000205416146106e8576040517f9739ce9100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806106f281610a5f565b915050610631565b5073ffffffffffffffffffffffffffffffffffffffff8681166000908152600360205260409081902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169288169283179055517f2fd0a9bf000000000000000000000000000000000000000000000000000000008152632fd0a9bf9061078f9089908890889088908890600401610af2565b600060405180830381600087803b1580156107a957600080fd5b505af11580156107bd573d6000803e3d6000fd5b505050507fcbe100c36abd13680863f25364d62ee301a90dc5683227134a30e9b60e2161a7868684846040516107f69493929190610b6f565b60405180910390a16108086001600055565b505050505050565b60026000540361084c576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600055565b803573ffffffffffffffffffffffffffffffffffffffff8116811461087757600080fd5b919050565b60006020828403121561088e57600080fd5b61089782610853565b9392505050565b600080604083850312156108b157600080fd5b6108ba83610853565b9150602083013580151581146108cf57600080fd5b809150509250929050565b600080600080608085870312156108f057600080fd5b6108f985610853565b935061090760208601610853565b925061091560408601610853565b9396929550929360600135925050565b60008083601f84011261093757600080fd5b50813567ffffffffffffffff81111561094f57600080fd5b60208301915083602082850101111561096757600080fd5b9250929050565b6000806000806000806080878903121561098757600080fd5b61099087610853565b955061099e60208801610853565b9450604087013567ffffffffffffffff808211156109bb57600080fd5b818901915089601f8301126109cf57600080fd5b8135818111156109de57600080fd5b8a60208260051b85010111156109f357600080fd5b602083019650809550506060890135915080821115610a1157600080fd5b50610a1e89828a01610925565b979a9699509497509295939492505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600063ffffffff808316818103610a9f577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6001019392505050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b73ffffffffffffffffffffffffffffffffffffffff868116825260606020808401829052908301869052600091879160808501845b89811015610b4c5783610b3986610853565b1682529382019390820190600101610b27565b508581036040870152610b6081888a610aa9565b9b9a5050505050505050505050565b600073ffffffffffffffffffffffffffffffffffffffff808716835280861660208401525060606040830152610ba9606083018486610aa9565b969550505050505056fea264697066735822122052bced3d9afb6e102de08516cb3f51f3f353efce9b7aff0d925498d7cb0e90c064736f6c63430008170033
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061007d5760003560e01c8063926e04fd1161005b578063926e04fd1461010a578063964678141461013d578063d2577f3b14610160578063f5f76ca81461017357600080fd5b80632930af8b1461008257806349fb4615146100e2578063520cbac6146100f7575b600080fd5b6100b861009036600461087c565b60036020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6100f56100f036600461089e565b610186565b005b6100f561010536600461089e565b610262565b61012d61011836600461087c565b60026020526000908152604090205460ff1681565b60405190151581526020016100d9565b61012d61014b36600461087c565b60016020526000908152604090205460ff1681565b6100f561016e3660046108da565b610336565b6100f561018136600461096e565b610568565b73ffffffffffffffffffffffffffffffffffffffff82166101d3576040517fb3c4f5c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff821660008181526001602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168515159081179091558251938452908301527f1f584640e1aae6441a6deba8d18148f5c9fb11a0bd7640e4b2808383a966269091015b60405180910390a15050565b73ffffffffffffffffffffffffffffffffffffffff82166102af576040517f6bed9b9600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff821660008181526002602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168515159081179091558251938452908301527fb40e5b8c4310e269d81608ec0e28372febb69a03ed8ace904c86459366cc36279101610256565b61033e610810565b73ffffffffffffffffffffffffffffffffffffffff808516600090815260036020526040902054168061039d576040517fd5c3d2f000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff831660009081526002602052604090205460ff166103fc576040517f7227c77800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff811660009081526001602052604090205460ff1661045b576040517f06b627fa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f5be8968b00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff8681166024830152848116604483015260648201849052821690635be8968b90608401600060405180830381600087803b1580156104d957600080fd5b505af11580156104ed573d6000803e3d6000fd5b50506040805173ffffffffffffffffffffffffffffffffffffffff898116825288811660208301523382840152871660608201526080810186905290517fe0ee75d70c5bcafc95db3e81961af1375efcd0e19fbfd7cae8a85f41c68e2d2d93509081900360a0019150a1506105626001600055565b50505050565b610570610810565b73ffffffffffffffffffffffffffffffffffffffff86811660009081526003602052604090205416156105cf576040517f16f86d6f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff851660009081526001602052604090205460ff1661062e576040517f06b627fa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b63ffffffff81168411156106fa578573ffffffffffffffffffffffffffffffffffffffff166003600087878563ffffffff1681811061067257610672610a30565b9050602002016020810190610687919061087c565b73ffffffffffffffffffffffffffffffffffffffff908116825260208201929092526040016000205416146106e8576040517f9739ce9100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806106f281610a5f565b915050610631565b5073ffffffffffffffffffffffffffffffffffffffff8681166000908152600360205260409081902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169288169283179055517f2fd0a9bf000000000000000000000000000000000000000000000000000000008152632fd0a9bf9061078f9089908890889088908890600401610af2565b600060405180830381600087803b1580156107a957600080fd5b505af11580156107bd573d6000803e3d6000fd5b505050507fcbe100c36abd13680863f25364d62ee301a90dc5683227134a30e9b60e2161a7868684846040516107f69493929190610b6f565b60405180910390a16108086001600055565b505050505050565b60026000540361084c576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600055565b803573ffffffffffffffffffffffffffffffffffffffff8116811461087757600080fd5b919050565b60006020828403121561088e57600080fd5b61089782610853565b9392505050565b600080604083850312156108b157600080fd5b6108ba83610853565b9150602083013580151581146108cf57600080fd5b809150509250929050565b600080600080608085870312156108f057600080fd5b6108f985610853565b935061090760208601610853565b925061091560408601610853565b9396929550929360600135925050565b60008083601f84011261093757600080fd5b50813567ffffffffffffffff81111561094f57600080fd5b60208301915083602082850101111561096757600080fd5b9250929050565b6000806000806000806080878903121561098757600080fd5b61099087610853565b955061099e60208801610853565b9450604087013567ffffffffffffffff808211156109bb57600080fd5b818901915089601f8301126109cf57600080fd5b8135818111156109de57600080fd5b8a60208260051b85010111156109f357600080fd5b602083019650809550506060890135915080821115610a1157600080fd5b50610a1e89828a01610925565b979a9699509497509295939492505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600063ffffffff808316818103610a9f577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6001019392505050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b73ffffffffffffffffffffffffffffffffffffffff868116825260606020808401829052908301869052600091879160808501845b89811015610b4c5783610b3986610853565b1682529382019390820190600101610b27565b508581036040870152610b6081888a610aa9565b9b9a5050505050505050505050565b600073ffffffffffffffffffffffffffffffffffffffff808716835280861660208401525060606040830152610ba9606083018486610aa9565b969550505050505056fea264697066735822122052bced3d9afb6e102de08516cb3f51f3f353efce9b7aff0d925498d7cb0e90c064736f6c63430008170033
Loading...
Loading
Loading...
Loading
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.