Source Code
Overview
ETH Balance
0 ETH
More Info
ContractCreator
Multichain Info
N/A
Latest 8 from a total of 8 transactions
| Transaction Hash |
Method
|
Block
|
From
|
To
|
Amount
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Cancel Dispute | 5201389 | 647 days ago | IN | 0 ETH | 0.00331093 | ||||
| Raise Dispute | 5201389 | 647 days ago | IN | 0 ETH | 0.01718249 | ||||
| Resolve Dispute | 5201389 | 647 days ago | IN | 0 ETH | 0.00268187 | ||||
| Set Dispute Judg... | 5201389 | 647 days ago | IN | 0 ETH | 0.00495992 | ||||
| Raise Dispute | 5201389 | 647 days ago | IN | 0 ETH | 0.01854396 | ||||
| Whitelist Arbitr... | 5201388 | 647 days ago | IN | 0 ETH | 0.00333167 | ||||
| Whitelist Arbitr... | 5201388 | 647 days ago | IN | 0 ETH | 0.00327267 | ||||
| Whitelist Disput... | 5201388 | 647 days ago | IN | 0 ETH | 0.00325595 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
DisputeModule
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 { IDisputeModule } from "contracts/interfaces/modules/dispute/IDisputeModule.sol";
import { IArbitrationPolicy } from "contracts/interfaces/modules/dispute/policies/IArbitrationPolicy.sol";
import { Errors } from "contracts/lib/Errors.sol";
import { ShortStringOps } from "contracts/utils/ShortStringOps.sol";
/// @title Story Protocol Dispute Module
/// @notice The Story Protocol dispute module acts as an enforcement layer for
/// that allows to raise disputes and resolve them through arbitration.
contract DisputeModule is IDisputeModule, ReentrancyGuard {
/// @notice Dispute struct
struct Dispute {
address targetIpId; // The ipId that is the target of the dispute
address disputeInitiator; // The address of the dispute initiator
address arbitrationPolicy; // The address of the arbitration policy
bytes32 linkToDisputeEvidence; // The link of the dispute summary
bytes32 targetTag; // The target tag of the dispute
bytes32 currentTag; // The current tag of the dispute
}
// TODO: confirm if contracts will be upgradeable or not
bytes32 public constant IN_DISPUTE = bytes32("IN_DISPUTE");
/// @notice Dispute id
uint256 public disputeId;
/// @notice Contains the dispute struct info for a given dispute id
mapping(uint256 disputeId => Dispute dispute) public disputes;
/// @notice Indicates if a dispute tag is whitelisted
mapping(bytes32 tag => bool allowed) public isWhitelistedDisputeTag;
/// @notice Indicates if an arbitration policy is whitelisted
mapping(address arbitrationPolicy => bool allowed) public isWhitelistedArbitrationPolicy;
/// @notice Indicates if an arbitration relayer is whitelisted for a given arbitration policy
mapping(address arbitrationPolicy => mapping(address arbitrationRelayer => bool allowed)) public
isWhitelistedArbitrationRelayer;
/// @notice Restricts the calls to the governance address
modifier onlyGovernance() {
// TODO: where is governance address defined?
_;
}
/// @notice Whitelists a dispute tag
/// @param _tag The dispute tag
/// @param _allowed Indicates if the dispute tag is whitelisted or not
function whitelistDisputeTags(bytes32 _tag, bool _allowed) external onlyGovernance {
if (_tag == bytes32(0)) revert Errors.DisputeModule__ZeroDisputeTag();
isWhitelistedDisputeTag[_tag] = _allowed;
emit TagWhitelistUpdated(_tag, _allowed);
}
/// @notice Whitelists an arbitration policy
/// @param _arbitrationPolicy The address of the arbitration policy
/// @param _allowed Indicates if the arbitration policy is whitelisted or not
function whitelistArbitrationPolicy(address _arbitrationPolicy, bool _allowed) external onlyGovernance {
if (_arbitrationPolicy == address(0)) revert Errors.DisputeModule__ZeroArbitrationPolicy();
isWhitelistedArbitrationPolicy[_arbitrationPolicy] = _allowed;
emit ArbitrationPolicyWhitelistUpdated(_arbitrationPolicy, _allowed);
}
/// @notice Whitelists an arbitration relayer for a given arbitration policy
/// @param _arbitrationPolicy The address of the arbitration policy
/// @param _arbPolicyRelayer The address of the arbitration relayer
/// @param _allowed Indicates if the arbitration relayer is whitelisted or not
function whitelistArbitrationRelayer(address _arbitrationPolicy, address _arbPolicyRelayer, bool _allowed)
external
onlyGovernance
{
if (_arbitrationPolicy == address(0)) revert Errors.DisputeModule__ZeroArbitrationPolicy();
if (_arbPolicyRelayer == address(0)) revert Errors.DisputeModule__ZeroArbitrationRelayer();
isWhitelistedArbitrationRelayer[_arbitrationPolicy][_arbPolicyRelayer] = _allowed;
emit ArbitrationRelayerWhitelistUpdated(_arbitrationPolicy, _arbPolicyRelayer, _allowed);
}
/// @notice Raises a dispute
/// @param _targetIpId The ipId that is the target of the dispute
/// @param _arbitrationPolicy The address of the arbitration policy
/// @param _linkToDisputeEvidence The link of the dispute evidence
/// @param _targetTag The target tag of the dispute
/// @param _data The data to initialize the policy
/// @return disputeId The dispute id
function raiseDispute(
address _targetIpId,
address _arbitrationPolicy,
string memory _linkToDisputeEvidence,
bytes32 _targetTag,
bytes calldata _data
) external nonReentrant returns (uint256) {
// TODO: ensure the _targetIpId address is an existing/valid IPAccount
if (!isWhitelistedArbitrationPolicy[_arbitrationPolicy]) {
revert Errors.DisputeModule__NotWhitelistedArbitrationPolicy();
}
if (!isWhitelistedDisputeTag[_targetTag]) revert Errors.DisputeModule__NotWhitelistedDisputeTag();
bytes32 linkToDisputeEvidence = ShortStringOps.stringToBytes32(_linkToDisputeEvidence);
if (linkToDisputeEvidence == bytes32(0)) revert Errors.DisputeModule__ZeroLinkToDisputeEvidence();
uint256 disputeId_ = ++disputeId;
disputes[disputeId_] = Dispute({
targetIpId: _targetIpId,
disputeInitiator: msg.sender,
arbitrationPolicy: _arbitrationPolicy,
linkToDisputeEvidence: linkToDisputeEvidence,
targetTag: _targetTag,
currentTag: IN_DISPUTE
});
IArbitrationPolicy(_arbitrationPolicy).onRaiseDispute(msg.sender, _data);
emit DisputeRaised(
disputeId_, _targetIpId, msg.sender, _arbitrationPolicy, linkToDisputeEvidence, _targetTag, _data
);
return disputeId_;
}
/// @notice Sets the dispute judgement
/// @param _disputeId The dispute id
/// @param _decision The decision of the dispute
/// @param _data The data to set the dispute judgement
function setDisputeJudgement(uint256 _disputeId, bool _decision, bytes calldata _data) external nonReentrant {
Dispute memory dispute = disputes[_disputeId];
if (dispute.currentTag != IN_DISPUTE) revert Errors.DisputeModule__NotInDisputeState();
if (!isWhitelistedArbitrationRelayer[dispute.arbitrationPolicy][msg.sender]) {
revert Errors.DisputeModule__NotWhitelistedArbitrationRelayer();
}
if (_decision) {
disputes[_disputeId].currentTag = dispute.targetTag;
} else {
disputes[_disputeId].currentTag = bytes32(0);
}
IArbitrationPolicy(dispute.arbitrationPolicy).onDisputeJudgement(_disputeId, _decision, _data);
emit DisputeJudgementSet(_disputeId, _decision, _data);
}
/// @notice Cancels an ongoing dispute
/// @param _disputeId The dispute id
/// @param _data The data to cancel the dispute
function cancelDispute(uint256 _disputeId, bytes calldata _data) external nonReentrant {
Dispute memory dispute = disputes[_disputeId];
if (dispute.currentTag != IN_DISPUTE) revert Errors.DisputeModule__NotInDisputeState();
if (msg.sender != dispute.disputeInitiator) revert Errors.DisputeModule__NotDisputeInitiator();
IArbitrationPolicy(dispute.arbitrationPolicy).onDisputeCancel(msg.sender, _disputeId, _data);
disputes[_disputeId].currentTag = bytes32(0);
emit DisputeCancelled(_disputeId, _data);
}
/// @notice Resolves a dispute after it has been judged
/// @param _disputeId The dispute id
function resolveDispute(uint256 _disputeId) external {
Dispute memory dispute = disputes[_disputeId];
if (dispute.currentTag == IN_DISPUTE) revert Errors.DisputeModule__NotAbleToResolve();
if (msg.sender != dispute.disputeInitiator) revert Errors.DisputeModule__NotDisputeInitiator();
disputes[_disputeId].currentTag = bytes32(0);
emit DisputeResolved(_disputeId);
}
}// 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 Dispute Module Interface
interface IDisputeModule {
/// @notice Event emitted when a dispute tag whitelist status is updated
/// @param tag The dispute tag
/// @param allowed Indicates if the dispute tag is whitelisted
event TagWhitelistUpdated(bytes32 tag, bool allowed);
/// @notice Event emitted when an arbitration policy whitelist status is updated
/// @param arbitrationPolicy The address of the arbitration policy
/// @param allowed Indicates if the arbitration policy is whitelisted
event ArbitrationPolicyWhitelistUpdated(address arbitrationPolicy, bool allowed);
/// @notice Event emitted when an arbitration relayer whitelist status is updated
/// @param arbitrationPolicy The address of the arbitration policy
/// @param arbitrationRelayer The address of the arbitration relayer
/// @param allowed Indicates if the arbitration relayer is whitelisted
event ArbitrationRelayerWhitelistUpdated(address arbitrationPolicy, address arbitrationRelayer, bool allowed);
/// @notice Event emitted when a dispute is raised
/// @param disputeId The dispute id
/// @param targetIpId The ipId that is the target of the dispute
/// @param disputeInitiator The address of the dispute initiator
/// @param arbitrationPolicy The address of the arbitration policy
/// @param linkToDisputeEvidence The link of the dispute evidence
/// @param targetTag The target tag of the dispute
/// @param data Custom data adjusted to each policy
event DisputeRaised(
uint256 disputeId,
address targetIpId,
address disputeInitiator,
address arbitrationPolicy,
bytes32 linkToDisputeEvidence,
bytes32 targetTag,
bytes data
);
/// @notice Event emitted when a dispute judgement is set
/// @param disputeId The dispute id
/// @param decision The decision of the dispute
/// @param data Custom data adjusted to each policy
event DisputeJudgementSet(uint256 disputeId, bool decision, bytes data);
/// @notice Event emitted when a dispute is cancelled
/// @param disputeId The dispute id
/// @param data Custom data adjusted to each policy
event DisputeCancelled(uint256 disputeId, bytes data);
/// @notice Event emitted when a dispute is resolved
/// @param disputeId The dispute id
event DisputeResolved(uint256 disputeId);
/// @notice Whitelists a dispute tag
/// @param tag The dispute tag
/// @param allowed Indicates if the dispute tag is whitelisted or not
function whitelistDisputeTags(bytes32 tag, bool allowed) external;
/// @notice Whitelists an arbitration policy
/// @param arbitrationPolicy The address of the arbitration policy
/// @param allowed Indicates if the arbitration policy is whitelisted or not
function whitelistArbitrationPolicy(address arbitrationPolicy, bool allowed) external;
/// @notice Whitelists an arbitration relayer for a given arbitration policy
/// @param arbitrationPolicy The address of the arbitration policy
/// @param arbPolicyRelayer The address of the arbitration relayer
/// @param allowed Indicates if the arbitration relayer is whitelisted or not
function whitelistArbitrationRelayer(address arbitrationPolicy, address arbPolicyRelayer, bool allowed) external;
/// @notice Raises a dispute
/// @param targetIpId The ipId that is the target of the dispute
/// @param arbitrationPolicy The address of the arbitration policy
/// @param linkToDisputeEvidence The link of the dispute evidence
/// @param targetTag The target tag of the dispute
/// @param data The data to initialize the policy
/// @return disputeId The dispute id
function raiseDispute(
address targetIpId,
address arbitrationPolicy,
string memory linkToDisputeEvidence,
bytes32 targetTag,
bytes calldata data
) external returns (uint256 disputeId);
/// @notice Sets the dispute judgement
/// @param disputeId The dispute id
/// @param decision The decision of the dispute
/// @param data The data to set the dispute judgement
function setDisputeJudgement(uint256 disputeId, bool decision, bytes calldata data) external;
/// @notice Cancels an ongoing dispute
/// @param disputeId The dispute id
/// @param data The data to cancel the dispute
function cancelDispute(uint256 disputeId, bytes calldata data) external;
/// @notice Resolves a dispute after it has been judged
/// @param disputeId The dispute id
function resolveDispute(uint256 disputeId) external;
/// @notice Gets the dispute struct characteristics
function disputes(uint256 disputeId)
external
view
returns (
address targetIpId, // The ipId that is the target of the dispute
address disputeInitiator, // The address of the dispute initiator
address arbitrationPolicy, // The address of the arbitration policy
bytes32 linkToDisputeEvidence, // The link of the dispute summary
bytes32 targetTag, // The target tag of the dispute
bytes32 currentTag // The current tag of the dispute
);
}// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.23;
/// @title ArbitrationPolicy interface
interface IArbitrationPolicy {
/// @notice Executes custom logic on raise dispute
/// @param caller Address of the caller
function onRaiseDispute(address caller, bytes calldata data) external;
/// @notice Executes custom logic on dispute judgement
/// @param disputeId The dispute id
/// @param decision The decision of the dispute
function onDisputeJudgement(uint256 disputeId, bool decision, bytes calldata data) external;
/// @notice Executes custom logic on dispute cancel
function onDisputeCancel(address caller, uint256 disputeId, bytes calldata data) 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();
}// SPDX-License-Identifier: UNLICENSED
// See https://github.com/storyprotocol/protocol-contracts/blob/main/StoryProtocol-AlphaTestingAgreement-17942166.3.pdf
pragma solidity ^0.8.19;
import { ShortString, ShortStrings } from "@openzeppelin/contracts/utils/ShortStrings.sol";
/// @notice Library for working with Openzeppelin's ShortString data types.
library ShortStringOps {
using ShortStrings for *;
/// @dev Compares whether two ShortStrings are equal.
function equal(ShortString a, ShortString b) internal pure returns (bool) {
return ShortString.unwrap(a) == ShortString.unwrap(b);
}
/// @dev Checks whether a ShortString and a regular string are equal.
function equal(ShortString a, string memory b) internal pure returns (bool) {
return equal(a, b.toShortString());
}
/// @dev Checks whether a regular string and a ShortString are equal.
function equal(string memory a, ShortString b) internal pure returns (bool) {
return equal(a.toShortString(), b);
}
/// @dev Checks whether a bytes32 object and ShortString are equal.
function equal(bytes32 a, ShortString b) internal pure returns (bool) {
return a == ShortString.unwrap(b);
}
/// @dev Checks whether a string and bytes32 object are equal.
function equal(string memory a, bytes32 b) internal pure returns (bool) {
return equal(a, ShortString.wrap(b));
}
/// @dev Checks whether a bytes32 object and string are equal.
function equal(bytes32 a, string memory b) internal pure returns (bool) {
return equal(ShortString.wrap(a), b);
}
function stringToBytes32(string memory s) internal pure returns (bytes32) {
return ShortString.unwrap(s.toShortString());
}
function bytes32ToString(bytes32 b) internal pure returns (string memory) {
return ShortString.wrap(b).toString();
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/ShortStrings.sol)
pragma solidity ^0.8.20;
import {StorageSlot} from "./StorageSlot.sol";
// | string | 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA |
// | length | 0x BB |
type ShortString is bytes32;
/**
* @dev This library provides functions to convert short memory strings
* into a `ShortString` type that can be used as an immutable variable.
*
* Strings of arbitrary length can be optimized using this library if
* they are short enough (up to 31 bytes) by packing them with their
* length (1 byte) in a single EVM word (32 bytes). Additionally, a
* fallback mechanism can be used for every other case.
*
* Usage example:
*
* ```solidity
* contract Named {
* using ShortStrings for *;
*
* ShortString private immutable _name;
* string private _nameFallback;
*
* constructor(string memory contractName) {
* _name = contractName.toShortStringWithFallback(_nameFallback);
* }
*
* function name() external view returns (string memory) {
* return _name.toStringWithFallback(_nameFallback);
* }
* }
* ```
*/
library ShortStrings {
// Used as an identifier for strings longer than 31 bytes.
bytes32 private constant FALLBACK_SENTINEL = 0x00000000000000000000000000000000000000000000000000000000000000FF;
error StringTooLong(string str);
error InvalidShortString();
/**
* @dev Encode a string of at most 31 chars into a `ShortString`.
*
* This will trigger a `StringTooLong` error is the input string is too long.
*/
function toShortString(string memory str) internal pure returns (ShortString) {
bytes memory bstr = bytes(str);
if (bstr.length > 31) {
revert StringTooLong(str);
}
return ShortString.wrap(bytes32(uint256(bytes32(bstr)) | bstr.length));
}
/**
* @dev Decode a `ShortString` back to a "normal" string.
*/
function toString(ShortString sstr) internal pure returns (string memory) {
uint256 len = byteLength(sstr);
// using `new string(len)` would work locally but is not memory safe.
string memory str = new string(32);
/// @solidity memory-safe-assembly
assembly {
mstore(str, len)
mstore(add(str, 0x20), sstr)
}
return str;
}
/**
* @dev Return the length of a `ShortString`.
*/
function byteLength(ShortString sstr) internal pure returns (uint256) {
uint256 result = uint256(ShortString.unwrap(sstr)) & 0xFF;
if (result > 31) {
revert InvalidShortString();
}
return result;
}
/**
* @dev Encode a string into a `ShortString`, or write it to storage if it is too long.
*/
function toShortStringWithFallback(string memory value, string storage store) internal returns (ShortString) {
if (bytes(value).length < 32) {
return toShortString(value);
} else {
StorageSlot.getStringSlot(store).value = value;
return ShortString.wrap(FALLBACK_SENTINEL);
}
}
/**
* @dev Decode a string that was encoded to `ShortString` or written to storage using {setWithFallback}.
*/
function toStringWithFallback(ShortString value, string storage store) internal pure returns (string memory) {
if (ShortString.unwrap(value) != FALLBACK_SENTINEL) {
return toString(value);
} else {
return store;
}
}
/**
* @dev Return the length of a string that was encoded to `ShortString` or written to storage using
* {setWithFallback}.
*
* WARNING: This will return the "byte length" of the string. This may not reflect the actual length in terms of
* actual characters as the UTF-8 encoding of a single character can span over multiple bytes.
*/
function byteLengthWithFallback(ShortString value, string storage store) internal view returns (uint256) {
if (ShortString.unwrap(value) != FALLBACK_SENTINEL) {
return byteLength(value);
} else {
return bytes(store).length;
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/StorageSlot.sol)
// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.
pragma solidity ^0.8.20;
/**
* @dev Library for reading and writing primitive types to specific storage slots.
*
* Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
* This library helps with reading and writing to such slots without the need for inline assembly.
*
* The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
*
* Example usage to set ERC1967 implementation slot:
* ```solidity
* contract ERC1967 {
* bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
*
* function _getImplementation() internal view returns (address) {
* return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
* }
*
* function _setImplementation(address newImplementation) internal {
* require(newImplementation.code.length > 0);
* StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
* }
* }
* ```
*/
library StorageSlot {
struct AddressSlot {
address value;
}
struct BooleanSlot {
bool value;
}
struct Bytes32Slot {
bytes32 value;
}
struct Uint256Slot {
uint256 value;
}
struct StringSlot {
string value;
}
struct BytesSlot {
bytes value;
}
/**
* @dev Returns an `AddressSlot` with member `value` located at `slot`.
*/
function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `BooleanSlot` with member `value` located at `slot`.
*/
function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `Bytes32Slot` with member `value` located at `slot`.
*/
function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `Uint256Slot` with member `value` located at `slot`.
*/
function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `StringSlot` with member `value` located at `slot`.
*/
function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `StringSlot` representation of the string storage pointer `store`.
*/
function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := store.slot
}
}
/**
* @dev Returns an `BytesSlot` with member `value` located at `slot`.
*/
function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.
*/
function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := store.slot
}
}
}{
"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":"DisputeModule__NotAbleToResolve","type":"error"},{"inputs":[],"name":"DisputeModule__NotDisputeInitiator","type":"error"},{"inputs":[],"name":"DisputeModule__NotInDisputeState","type":"error"},{"inputs":[],"name":"DisputeModule__NotWhitelistedArbitrationPolicy","type":"error"},{"inputs":[],"name":"DisputeModule__NotWhitelistedArbitrationRelayer","type":"error"},{"inputs":[],"name":"DisputeModule__NotWhitelistedDisputeTag","type":"error"},{"inputs":[],"name":"DisputeModule__ZeroArbitrationPolicy","type":"error"},{"inputs":[],"name":"DisputeModule__ZeroArbitrationRelayer","type":"error"},{"inputs":[],"name":"DisputeModule__ZeroDisputeTag","type":"error"},{"inputs":[],"name":"DisputeModule__ZeroLinkToDisputeEvidence","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[{"internalType":"string","name":"str","type":"string"}],"name":"StringTooLong","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"arbitrationPolicy","type":"address"},{"indexed":false,"internalType":"bool","name":"allowed","type":"bool"}],"name":"ArbitrationPolicyWhitelistUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"arbitrationPolicy","type":"address"},{"indexed":false,"internalType":"address","name":"arbitrationRelayer","type":"address"},{"indexed":false,"internalType":"bool","name":"allowed","type":"bool"}],"name":"ArbitrationRelayerWhitelistUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"disputeId","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"DisputeCancelled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"disputeId","type":"uint256"},{"indexed":false,"internalType":"bool","name":"decision","type":"bool"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"DisputeJudgementSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"disputeId","type":"uint256"},{"indexed":false,"internalType":"address","name":"targetIpId","type":"address"},{"indexed":false,"internalType":"address","name":"disputeInitiator","type":"address"},{"indexed":false,"internalType":"address","name":"arbitrationPolicy","type":"address"},{"indexed":false,"internalType":"bytes32","name":"linkToDisputeEvidence","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"targetTag","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"}],"name":"DisputeRaised","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"disputeId","type":"uint256"}],"name":"DisputeResolved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"tag","type":"bytes32"},{"indexed":false,"internalType":"bool","name":"allowed","type":"bool"}],"name":"TagWhitelistUpdated","type":"event"},{"inputs":[],"name":"IN_DISPUTE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_disputeId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"cancelDispute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"disputeId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"disputeId","type":"uint256"}],"name":"disputes","outputs":[{"internalType":"address","name":"targetIpId","type":"address"},{"internalType":"address","name":"disputeInitiator","type":"address"},{"internalType":"address","name":"arbitrationPolicy","type":"address"},{"internalType":"bytes32","name":"linkToDisputeEvidence","type":"bytes32"},{"internalType":"bytes32","name":"targetTag","type":"bytes32"},{"internalType":"bytes32","name":"currentTag","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"arbitrationPolicy","type":"address"}],"name":"isWhitelistedArbitrationPolicy","outputs":[{"internalType":"bool","name":"allowed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"arbitrationPolicy","type":"address"},{"internalType":"address","name":"arbitrationRelayer","type":"address"}],"name":"isWhitelistedArbitrationRelayer","outputs":[{"internalType":"bool","name":"allowed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"tag","type":"bytes32"}],"name":"isWhitelistedDisputeTag","outputs":[{"internalType":"bool","name":"allowed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_targetIpId","type":"address"},{"internalType":"address","name":"_arbitrationPolicy","type":"address"},{"internalType":"string","name":"_linkToDisputeEvidence","type":"string"},{"internalType":"bytes32","name":"_targetTag","type":"bytes32"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"raiseDispute","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_disputeId","type":"uint256"}],"name":"resolveDispute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_disputeId","type":"uint256"},{"internalType":"bool","name":"_decision","type":"bool"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"setDisputeJudgement","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_arbitrationPolicy","type":"address"},{"internalType":"bool","name":"_allowed","type":"bool"}],"name":"whitelistArbitrationPolicy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_arbitrationPolicy","type":"address"},{"internalType":"address","name":"_arbPolicyRelayer","type":"address"},{"internalType":"bool","name":"_allowed","type":"bool"}],"name":"whitelistArbitrationRelayer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_tag","type":"bytes32"},{"internalType":"bool","name":"_allowed","type":"bool"}],"name":"whitelistDisputeTags","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
608060405234801561001057600080fd5b50600160005561159e806100256000396000f3fe608060405234801561001057600080fd5b50600436106100df5760003560e01c8063bdcae24e1161008c578063cbf1ac7b11610066578063cbf1ac7b1461026d578063d4dd12a014610280578063dab83d29146102a7578063ee414b18146102ca57600080fd5b8063bdcae24e14610234578063c2b7b86814610247578063c844825d1461025a57600080fd5b8063684b69e3116100bd578063684b69e3146101c057806369d31e0a146101f3578063b33b74571461022157600080fd5b80632e77c8d2146100e45780634da0412d14610100578063564a565d14610115575b600080fd5b6100ed60015481565b6040519081526020015b60405180910390f35b61011361010e366004610fc0565b6102dd565b005b610175610123366004611003565b600260208190526000918252604090912080546001820154928201546003830154600484015460059094015473ffffffffffffffffffffffffffffffffffffffff938416958416949390921692909186565b6040805173ffffffffffffffffffffffffffffffffffffffff9788168152958716602087015293909516928401929092526060830152608082015260a081019190915260c0016100f7565b6101e36101ce36600461101c565b60046020526000908152604090205460ff1681565b60405190151581526020016100f7565b6101e361020136600461103e565b600560209081526000928352604080842090915290825290205460ff1681565b61011361022f366004611071565b61041e565b6101136102423660046110e4565b6104fa565b610113610255366004611003565b610730565b61011361026836600461113e565b6108aa565b61011361027b36600461118a565b610abb565b6100ed7f494e5f444953505554450000000000000000000000000000000000000000000081565b6101e36102b5366004611003565b60036020526000908152604090205460ff1681565b6100ed6102d83660046111dc565b610b62565b73ffffffffffffffffffffffffffffffffffffffff831661032a576040517fde9bb34100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216610377576040517f2be8a15d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83811660008181526005602090815260408083209487168084529482529182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168615159081179091558251938452908301939093528101919091527f3091225105935f5e841d2cadc9f01173855cb3bf3d1256fe6800dfbfb01bf0249060600160405180910390a1505050565b73ffffffffffffffffffffffffffffffffffffffff821661046b576040517fde9bb34100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff821660008181526004602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168515159081179091558251938452908301527f885460c0afe5f6abcf1f90909e90d012f750eef87d1865d3ce1f683ca0262aa791015b60405180910390a15050565b610502610ed3565b600084815260026020818152604092839020835160c081018552815473ffffffffffffffffffffffffffffffffffffffff908116825260018301548116938201939093529281015490911692820192909252600382015460608201526004820154608082015260059091015460a082018190527f494e5f4449535055544500000000000000000000000000000000000000000000146105cd576040517fc954abf600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408082015173ffffffffffffffffffffffffffffffffffffffff166000908152600560209081528282203383529052205460ff16610638576040517fca97282700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b831561065a57608081015160008681526002602052604090206005015561066d565b6000858152600260205260408120600501555b806040015173ffffffffffffffffffffffffffffffffffffffff16636152325c868686866040518563ffffffff1660e01b81526004016106b0949392919061134a565b600060405180830381600087803b1580156106ca57600080fd5b505af11580156106de573d6000803e3d6000fd5b505050507ffa3dcf1b0e225a1550712d56af15c1babdd6997813dfe7559f127361edeb31e385858585604051610717949392919061134a565b60405180910390a15061072a6001600055565b50505050565b600081815260026020818152604092839020835160c081018552815473ffffffffffffffffffffffffffffffffffffffff908116825260018301548116938201939093529281015490911692820192909252600382015460608201526004820154608082015260059091015460a082018190527fb6b1a0bbb6acafaaabbb00000000000000000000000000000000000000000000016107fb576040517feafe3a4100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806020015173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610864576040517fb9e311aa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526002602052604080822060050191909155517f57cce005d496355471bb5269f1dea3d6c81b6ac14c1d74ba28aefb022357013b906104ee9084815260200190565b6108b2610ed3565b600083815260026020818152604092839020835160c081018552815473ffffffffffffffffffffffffffffffffffffffff908116825260018301548116938201939093529281015490911692820192909252600382015460608201526004820154608082015260059091015460a082018190527f494e5f44495350555445000000000000000000000000000000000000000000001461097d576040517fc954abf600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806020015173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109e6576040517fb9e311aa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806040015173ffffffffffffffffffffffffffffffffffffffff1663f52a5233338686866040518563ffffffff1660e01b8152600401610a29949392919061136c565b600060405180830381600087803b158015610a4357600080fd5b505af1158015610a57573d6000803e3d6000fd5b50505060008581526002602052604080822060050191909155517ffebcb1416e54dcfc6be64b1ad5531b7ffe4733b94972361567dd8da40e404c039150610aa3908690869086906113a2565b60405180910390a150610ab66001600055565b505050565b81610af2576040517ff0733b8300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526003602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168415159081179091558251858152918201527f77c61a8340e1bfca879eccd7c9871e46054a007c801e334363af5d0fe6d922cb91016104ee565b6000610b6c610ed3565b73ffffffffffffffffffffffffffffffffffffffff861660009081526004602052604090205460ff16610bcb576040517f15d0d81b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008481526003602052604090205460ff16610c13576040517f47d1d67600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610c1e86610f16565b905080610c57576040517fc512100d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600160008154610c68906113c5565b91905081905590506040518060c001604052808a73ffffffffffffffffffffffffffffffffffffffff1681526020013373ffffffffffffffffffffffffffffffffffffffff1681526020018973ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018781526020017f494e5f44495350555445000000000000000000000000000000000000000000008152506002600083815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550606082015181600301556080820151816004015560a082015181600501559050508773ffffffffffffffffffffffffffffffffffffffff1663f60be8543387876040518463ffffffff1660e01b8152600401610e4593929190611424565b600060405180830381600087803b158015610e5f57600080fd5b505af1158015610e73573d6000803e3d6000fd5b505050507fd466c7d88a6d4c3d388b42d422c7ddc5908f8a3c0f338a3c0afcea8594630023818a338b868b8b8b604051610eb4989796959493929190611454565b60405180910390a1915050610ec96001600055565b9695505050505050565b600260005403610f0f576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600055565b6000610f2182610f27565b92915050565b600080829050601f81511115610f7457826040517f305a27a9000000000000000000000000000000000000000000000000000000008152600401610f6b91906114b6565b60405180910390fd5b8051610f7f82611523565b179392505050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610fab57600080fd5b919050565b80358015158114610fab57600080fd5b600080600060608486031215610fd557600080fd5b610fde84610f87565b9250610fec60208501610f87565b9150610ffa60408501610fb0565b90509250925092565b60006020828403121561101557600080fd5b5035919050565b60006020828403121561102e57600080fd5b61103782610f87565b9392505050565b6000806040838503121561105157600080fd5b61105a83610f87565b915061106860208401610f87565b90509250929050565b6000806040838503121561108457600080fd5b61108d83610f87565b915061106860208401610fb0565b60008083601f8401126110ad57600080fd5b50813567ffffffffffffffff8111156110c557600080fd5b6020830191508360208285010111156110dd57600080fd5b9250929050565b600080600080606085870312156110fa57600080fd5b8435935061110a60208601610fb0565b9250604085013567ffffffffffffffff81111561112657600080fd5b6111328782880161109b565b95989497509550505050565b60008060006040848603121561115357600080fd5b83359250602084013567ffffffffffffffff81111561117157600080fd5b61117d8682870161109b565b9497909650939450505050565b6000806040838503121561119d57600080fd5b8235915061106860208401610fb0565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008060008060008060a087890312156111f557600080fd5b6111fe87610f87565b955061120c60208801610f87565b9450604087013567ffffffffffffffff8082111561122957600080fd5b818901915089601f83011261123d57600080fd5b81358181111561124f5761124f6111ad565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908382118183101715611295576112956111ad565b816040528281528c60208487010111156112ae57600080fd5b826020860160208301376000602084830101528098505050506060890135945060808901359150808211156112e257600080fd5b506112ef89828a0161109b565b979a9699509497509295939492505050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b8481528315156020820152606060408201526000610ec9606083018486611301565b73ffffffffffffffffffffffffffffffffffffffff85168152836020820152606060408201526000610ec9606083018486611301565b8381526040602082015260006113bc604083018486611301565b95945050505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361141d577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b73ffffffffffffffffffffffffffffffffffffffff841681526040602082015260006113bc604083018486611301565b888152600073ffffffffffffffffffffffffffffffffffffffff808a16602084015280891660408401528088166060840152508560808301528460a083015260e060c08301526114a860e083018486611301565b9a9950505050505050505050565b60006020808352835180602085015260005b818110156114e4578581018301518582016040015282016114c8565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b80516020808301519190811015611562577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8160200360031b1b821691505b5091905056fea264697066735822122056e0a39dbdd762c1556f2e7675d03cb1eb5f1ddb60d509f9f9e47873c2acc1bc64736f6c63430008170033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100df5760003560e01c8063bdcae24e1161008c578063cbf1ac7b11610066578063cbf1ac7b1461026d578063d4dd12a014610280578063dab83d29146102a7578063ee414b18146102ca57600080fd5b8063bdcae24e14610234578063c2b7b86814610247578063c844825d1461025a57600080fd5b8063684b69e3116100bd578063684b69e3146101c057806369d31e0a146101f3578063b33b74571461022157600080fd5b80632e77c8d2146100e45780634da0412d14610100578063564a565d14610115575b600080fd5b6100ed60015481565b6040519081526020015b60405180910390f35b61011361010e366004610fc0565b6102dd565b005b610175610123366004611003565b600260208190526000918252604090912080546001820154928201546003830154600484015460059094015473ffffffffffffffffffffffffffffffffffffffff938416958416949390921692909186565b6040805173ffffffffffffffffffffffffffffffffffffffff9788168152958716602087015293909516928401929092526060830152608082015260a081019190915260c0016100f7565b6101e36101ce36600461101c565b60046020526000908152604090205460ff1681565b60405190151581526020016100f7565b6101e361020136600461103e565b600560209081526000928352604080842090915290825290205460ff1681565b61011361022f366004611071565b61041e565b6101136102423660046110e4565b6104fa565b610113610255366004611003565b610730565b61011361026836600461113e565b6108aa565b61011361027b36600461118a565b610abb565b6100ed7f494e5f444953505554450000000000000000000000000000000000000000000081565b6101e36102b5366004611003565b60036020526000908152604090205460ff1681565b6100ed6102d83660046111dc565b610b62565b73ffffffffffffffffffffffffffffffffffffffff831661032a576040517fde9bb34100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8216610377576040517f2be8a15d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83811660008181526005602090815260408083209487168084529482529182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168615159081179091558251938452908301939093528101919091527f3091225105935f5e841d2cadc9f01173855cb3bf3d1256fe6800dfbfb01bf0249060600160405180910390a1505050565b73ffffffffffffffffffffffffffffffffffffffff821661046b576040517fde9bb34100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff821660008181526004602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168515159081179091558251938452908301527f885460c0afe5f6abcf1f90909e90d012f750eef87d1865d3ce1f683ca0262aa791015b60405180910390a15050565b610502610ed3565b600084815260026020818152604092839020835160c081018552815473ffffffffffffffffffffffffffffffffffffffff908116825260018301548116938201939093529281015490911692820192909252600382015460608201526004820154608082015260059091015460a082018190527f494e5f4449535055544500000000000000000000000000000000000000000000146105cd576040517fc954abf600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60408082015173ffffffffffffffffffffffffffffffffffffffff166000908152600560209081528282203383529052205460ff16610638576040517fca97282700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b831561065a57608081015160008681526002602052604090206005015561066d565b6000858152600260205260408120600501555b806040015173ffffffffffffffffffffffffffffffffffffffff16636152325c868686866040518563ffffffff1660e01b81526004016106b0949392919061134a565b600060405180830381600087803b1580156106ca57600080fd5b505af11580156106de573d6000803e3d6000fd5b505050507ffa3dcf1b0e225a1550712d56af15c1babdd6997813dfe7559f127361edeb31e385858585604051610717949392919061134a565b60405180910390a15061072a6001600055565b50505050565b600081815260026020818152604092839020835160c081018552815473ffffffffffffffffffffffffffffffffffffffff908116825260018301548116938201939093529281015490911692820192909252600382015460608201526004820154608082015260059091015460a082018190527fb6b1a0bbb6acafaaabbb00000000000000000000000000000000000000000000016107fb576040517feafe3a4100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806020015173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610864576040517fb9e311aa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526002602052604080822060050191909155517f57cce005d496355471bb5269f1dea3d6c81b6ac14c1d74ba28aefb022357013b906104ee9084815260200190565b6108b2610ed3565b600083815260026020818152604092839020835160c081018552815473ffffffffffffffffffffffffffffffffffffffff908116825260018301548116938201939093529281015490911692820192909252600382015460608201526004820154608082015260059091015460a082018190527f494e5f44495350555445000000000000000000000000000000000000000000001461097d576040517fc954abf600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806020015173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109e6576040517fb9e311aa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806040015173ffffffffffffffffffffffffffffffffffffffff1663f52a5233338686866040518563ffffffff1660e01b8152600401610a29949392919061136c565b600060405180830381600087803b158015610a4357600080fd5b505af1158015610a57573d6000803e3d6000fd5b50505060008581526002602052604080822060050191909155517ffebcb1416e54dcfc6be64b1ad5531b7ffe4733b94972361567dd8da40e404c039150610aa3908690869086906113a2565b60405180910390a150610ab66001600055565b505050565b81610af2576040517ff0733b8300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526003602090815260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168415159081179091558251858152918201527f77c61a8340e1bfca879eccd7c9871e46054a007c801e334363af5d0fe6d922cb91016104ee565b6000610b6c610ed3565b73ffffffffffffffffffffffffffffffffffffffff861660009081526004602052604090205460ff16610bcb576040517f15d0d81b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008481526003602052604090205460ff16610c13576040517f47d1d67600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610c1e86610f16565b905080610c57576040517fc512100d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000600160008154610c68906113c5565b91905081905590506040518060c001604052808a73ffffffffffffffffffffffffffffffffffffffff1681526020013373ffffffffffffffffffffffffffffffffffffffff1681526020018973ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018781526020017f494e5f44495350555445000000000000000000000000000000000000000000008152506002600083815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550606082015181600301556080820151816004015560a082015181600501559050508773ffffffffffffffffffffffffffffffffffffffff1663f60be8543387876040518463ffffffff1660e01b8152600401610e4593929190611424565b600060405180830381600087803b158015610e5f57600080fd5b505af1158015610e73573d6000803e3d6000fd5b505050507fd466c7d88a6d4c3d388b42d422c7ddc5908f8a3c0f338a3c0afcea8594630023818a338b868b8b8b604051610eb4989796959493929190611454565b60405180910390a1915050610ec96001600055565b9695505050505050565b600260005403610f0f576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600055565b6000610f2182610f27565b92915050565b600080829050601f81511115610f7457826040517f305a27a9000000000000000000000000000000000000000000000000000000008152600401610f6b91906114b6565b60405180910390fd5b8051610f7f82611523565b179392505050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610fab57600080fd5b919050565b80358015158114610fab57600080fd5b600080600060608486031215610fd557600080fd5b610fde84610f87565b9250610fec60208501610f87565b9150610ffa60408501610fb0565b90509250925092565b60006020828403121561101557600080fd5b5035919050565b60006020828403121561102e57600080fd5b61103782610f87565b9392505050565b6000806040838503121561105157600080fd5b61105a83610f87565b915061106860208401610f87565b90509250929050565b6000806040838503121561108457600080fd5b61108d83610f87565b915061106860208401610fb0565b60008083601f8401126110ad57600080fd5b50813567ffffffffffffffff8111156110c557600080fd5b6020830191508360208285010111156110dd57600080fd5b9250929050565b600080600080606085870312156110fa57600080fd5b8435935061110a60208601610fb0565b9250604085013567ffffffffffffffff81111561112657600080fd5b6111328782880161109b565b95989497509550505050565b60008060006040848603121561115357600080fd5b83359250602084013567ffffffffffffffff81111561117157600080fd5b61117d8682870161109b565b9497909650939450505050565b6000806040838503121561119d57600080fd5b8235915061106860208401610fb0565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008060008060008060a087890312156111f557600080fd5b6111fe87610f87565b955061120c60208801610f87565b9450604087013567ffffffffffffffff8082111561122957600080fd5b818901915089601f83011261123d57600080fd5b81358181111561124f5761124f6111ad565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908382118183101715611295576112956111ad565b816040528281528c60208487010111156112ae57600080fd5b826020860160208301376000602084830101528098505050506060890135945060808901359150808211156112e257600080fd5b506112ef89828a0161109b565b979a9699509497509295939492505050565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b8481528315156020820152606060408201526000610ec9606083018486611301565b73ffffffffffffffffffffffffffffffffffffffff85168152836020820152606060408201526000610ec9606083018486611301565b8381526040602082015260006113bc604083018486611301565b95945050505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361141d577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b73ffffffffffffffffffffffffffffffffffffffff841681526040602082015260006113bc604083018486611301565b888152600073ffffffffffffffffffffffffffffffffffffffff808a16602084015280891660408401528088166060840152508560808301528460a083015260e060c08301526114a860e083018486611301565b9a9950505050505050505050565b60006020808352835180602085015260005b818110156114e4578581018301518582016040015282016114c8565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b80516020808301519190811015611562577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8160200360031b1b821691505b5091905056fea264697066735822122056e0a39dbdd762c1556f2e7675d03cb1eb5f1ddb60d509f9f9e47873c2acc1bc64736f6c63430008170033
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.