Skip to main content

Functions


claimScope

Claim a scope, with owner set to caller.
Parameters

transferScopeOwnership

Transfer ownership of a scope to a new entity.
Must be accepted by transferee (see acceptScopeTransfer)
Parameters

cancelScopeTransfer

Cancel a pending scope transfer
Parameters

acceptScopeTransfer

Accept a scope transfer
Parameters

getScopeOwnerElect

Get owner-elect of a scope
Parameters Returns

getScopeOwner

Get owner of a scope
Parameters Returns

addOperator

Add an operator to a scope
Parameters

removeOperator

Remove an operator from a scope
Parameters

setScopeRules

Set rules for a scope
Parameters

addWhitelist

Add an address to a scope’s whitelist
Parameters

removeWhitelist

Remove an address from a scope’s whitelist
Parameters

setMintConfiguration

Set the mint configuration for a given address
Parameters

getMintConfiguration

Get the mint configuration for a given address
Parameters Returns

setPatchFee

Set the patch fee for a given address
Must be banker of scope claimed by addr to call
Parameters

getPatchFee

Get the patch fee for a given address
Parameters Returns

setAssignFee

Set the assign fee for a given fragment address
Must be Banker of scope claimed by fragmentAddress to call.
Parameters

getAssignFee

Get the assign fee for a given fragment address
Parameters Returns

addBanker

Add a banker to a given scope
Must be owner of scope to call.
Parameters

removeBanker

Remove a banker from a given scope
Must be owner of scope to call.
Parameters

withdraw

Withdraw an amount from the balance of a given scope
Must be owner of scope or Banker of scope to call.
Transfers amount to the msg.sender
Parameters

balanceOf

Get the balance of a given scope
Parameters Returns

mint

Mint a new token
Parameters Returns

mintBatch

Mint a batch of new tokens
Parameters Returns

proposeProtocolFeeConfig

Proposes a protocol fee configuration
Must be protocol owner or Banker to call.
Configuration does not apply until commitProtocolFeeConfig is called.
Parameters

commitProtocolFeeConfig

Commits the current proposed protocol fee configuration
Must be protocol owner or Banker to call.
May only be called after timelock has passed.

getProtocolFeeConfig

Get the current protocol fee configuration
Returns

proposeScopeFeeOverride

Proposes a protocol fee override for a scope
Must be protocol owner or Banker to call.
Parameters

commitScopeFeeOverride

Commits the current proposed protocol fee override configuration for a scope
Must be protocol owner or Banker to call.
May only be called after timelock has passed.

getScopeFeeOverride

Get the protocol fee override for a scope
Returns

addProtocolBanker

Add a banker to the protocol
Must be protocol owner to call.
Parameters

removeProtocolBanker

Remove a banker from the protocol
Must be protocol owner to call.
Parameters

withdrawFromProtocol

Withdraw a specified amount from the protocol balance
Must be protocol owner or Banker to call.
Transfers to the msg.sender
Parameters

balanceOfProtocol

Get the current balance of the protocol
Returns

patch

Create a new patch
Parameters Returns

patchBurned

Callback for when a patch is burned
Can only be called from the patchAddress.
Parameters

patch1155

Create a new 1155 patch
Parameters Returns

patchBurned1155

Callback for when an 1155 patch is burned
Can only be called from the patchAddress.
Parameters

patchAccount

Create a new account patch
Parameters Returns

patchBurnedAccount

Callback for when an account patch is burned
Can only be called from the patchAddress.
Parameters

assign

Assigns a relation to have an IPatchworkLiteRef form a LiteRef to a IPatchworkAssignable
Parameters

assign

Assigns a relation to have an IPatchworkLiteRef form a LiteRef to a IPatchworkAssignable
Parameters

assignBatch

Assign multiple fragments to a target in batch
Parameters

assignBatch

Assign multiple fragments to a target in batch
Parameters

unassignSingle

Unassign a fragment from a target
Reverts if Fragment is not an IPatchworkSingleAssignable.
Parameters

unassignSingle

Unassign a fragment from a target
Reverts if Fragment is not an IPatchworkSingleAssignable.
Parameters

unassignMulti

Unassigns a multi relation
Reverts if Fragment is not an IPatchworkMultiAssignable.
Parameters

unassignMulti

Unassigns a multi relation
Reverts if Fragment is not an IPatchworkMultiAssignable.
Parameters

unassign

Unassigns a relation (single or multi)
Parameters

unassign

Unassigns a relation (single or multi)
Parameters

applyTransfer

Apply transfer rules and actions of a specific token from one address to another
Parameters

updateOwnershipTree

Update the ownership tree of a specific Patchwork 721
Parameters

proposeAssignerDelegate

Propose an assigner delegate module
Parameters

commitAssignerDelegate

Commit the proposed assigner delegate module
Must be called at a later datetime than timelock.

Events


Assign

Emitted when a fragment is assigned
Parameters

Unassign

Emitted when a fragment is unassigned
Parameters

Patch

Emitted when a patch is minted
Parameters

ERC1155Patch

Emitted when a patch is minted
Parameters

AccountPatch

Emitted when an account patch is minted
Parameters

ScopeClaim

Emitted when a new scope is claimed
Parameters

ScopeTransferElect

Emitted when a scope has elected a new owner to transfer to
Parameters

ScopeTransferCancel

Emitted when a scope transfer is canceled
Parameters

ScopeTransfer

Emitted when a scope is transferred
Parameters

ScopeAddOperator

Emitted when a scope has an operator added
Parameters

ScopeRemoveOperator

Emitted when a scope has an operator removed
Parameters

ScopeRuleChange

Emitted when a scope’s rules are changed
Parameters

ScopeWhitelistAdd

Emitted when a scope has an address added to the whitelist
Parameters

ScopeWhitelistRemove

Emitted when a scope has an address removed from the whitelist
Parameters

MintConfigure

Emitted when a mint is configured
Parameters

ScopeBankerAdd

Emitted when a banker is added to a scope
Parameters

ScopeBankerRemove

Emitted when a banker is removed from a scope
Parameters

ScopeWithdraw

Emitted when a withdrawl is made from a scope
Parameters

ProtocolBankerAdd

Emitted when a banker is added to the protocol
Parameters

ProtocolBankerRemove

Emitted when a banker is removed from the protocol
Parameters

ProtocolWithdraw

Emitted when a withdrawl is made from the protocol
Parameters

Mint

Emitted on mint
Parameters

MintBatch

Emitted on batch mint
Parameters

ProtocolFeeConfigPropose

Emitted on protocol fee config proposed
Parameters

ProtocolFeeConfigCommit

Emitted on protocol fee config committed
Parameters

ScopeFeeOverridePropose

Emitted on scope fee config override proposed
Parameters

ScopeFeeOverrideCommit

Emitted on scope fee config override committed
Parameters

PatchFeeChange

Emitted on patch fee change
Parameters

AssignFeeChange

Emitted on assign fee change
Parameters

AssignerDelegatePropose

Emitted on assigner delegate propose
Parameters

AssignerDelegateCommit

Emitted on assigner delegate commit
Parameters

Errors

NotAuthorized

The address is not authorized to perform this action
Parameters

ScopeExists

The scope with the provided name already exists
Parameters

ScopeDoesNotExist

The scope with the provided name does not exist
Parameters

ScopeTransferNotAllowed

Transfer of the scope to the provided address is not allowed
Parameters

Frozen

The token with the provided ID at the given address is frozen
Parameters

Locked

The token with the provided ID at the given address is locked
Parameters

NotWhitelisted

The address is not whitelisted for the given scope
Parameters

AccountAlreadyPatched

The address at the given address has already been patched
Parameters

AlreadyPatched

The token at the given address has already been patched
Parameters

ERC1155AlreadyPatched

The ERC1155 path has already been patched
Parameters

BadInputLengths

The provided input lengths are not compatible or valid for any multi array inputs, they must be the same length

FragmentUnregistered

The fragment at the given address is unregistered
Parameters

FragmentRedacted

The fragment at the given address has been redacted
Parameters

FragmentAlreadyAssigned

The fragment with the provided ID at the given address is already assigned
Parameters

RefNotFound

The reference was not found for the given fragment and target
Parameters

FragmentNotAssigned

The fragment with the provided ID at the given address is not assigned
Parameters

FragmentNotAssignedToTarget

The fragment with the provided ID at the given address is not assigned to the target
Parameters

FragmentAlreadyRegistered

The fragment at the given address is already registered
Parameters

OutOfIDs

Ran out of available IDs for allocation
Max 255 IDs per target.

UnsupportedTokenId

The provided token ID is unsupported
TokenIds may only be 56 bits long.
Parameters

CannotLockSoulboundPatch

Cannot lock the soulbound patch at the given address
Parameters

NotFrozen

The token with the provided ID at the given address is not frozen
Parameters

IncorrectNonce

The nonce for the token with the provided ID at the given address is incorrect
It may be incorrect or a newer nonce may be present.
Parameters

SelfAssignmentNotAllowed

Self assignment of the token with the provided ID at the given address is not allowed
Parameters

TransferNotAllowed

Transfer of the token with the provided ID at the given address is not allowed
Parameters

TransferBlockedByAssignment

Transfer of the token with the provided ID at the given address is blocked by an assignment
Parameters

MintNotAllowed

A rule is blocking the mint to this owner address
Parameters

NotPatchworkAssignable

The token at the given address is not IPatchworkAssignable
Parameters

DataIntegrityError

A data integrity error has been detected
addr+tokenId is expected where addr2+tokenId2 is present.
Parameters

InsufficientFunds

The available balance does not satisfy the amount

IncorrectFeeAmount

The supplied fee is not the corret amount

MintNotActive

Minting is not active for this address

FailedToSend

The value could not be sent

UnsupportedContract

The contract is not supported

UnsupportedOperation

The operation is not supported

NoProposedFeeSet

No proposed fee is set

TimelockNotElapsed

Timelock has not elapsed

InvalidFeeValue

Invalid fee value

NoDelegateProposed

No delegate proposed

Structs


FeeConfig

Fee Configuration

FeeConfigOverride

Fee Configuration Override

ProposedFeeConfig

Proposal to change a fee configuration for either protocol or scope override

MintConfig

Mint configuration

ProposedAssignerDelegate

Proposed assigner delegate

Scope

Represents a defined scope within the system
Contains details about the scope ownership, permissions, and mappings for references and assignments.