ODCdataManagersfractionalizersERC1155Fraction

FractionERC1155PausableDataManager

Contract for managing fractions of a Wrapper NFT using an ERC20 token with pausable option. Transfers where either:

  • owner is msg.sender
  • owner id the receiver of funds will NOT be paused! Note: since owner is local address, omnichain transfers only allow owner to be msg.sender in paused state

initialize

function initialize(struct IFractionERC1155DataManager.OmnichainERC1155InitData omnichainERC1155InitData, address beneficiary_, address wrapper_, uint256 nftId_, uint256 amountToBeMinted_, uint256 upperGenesisId_, bool userUnlockEnabled_) external

safeTransferFrom

function safeTransferFrom(address from, address to, uint256 id, uint256 value, bytes data) public virtual

safeBatchTransferFrom

function safeBatchTransferFrom(address from, address to, uint256[] ids, uint256[] values, bytes data) public virtual

safeTransferFrom

function safeTransferFrom(address from, OmnichainAddress to, uint256 id, uint256 value, bytes data) public payable virtual

Transfers value amount of an id from from to to in another chain

The caller must have allowance for from's tokens of at least value or be from Caller may receive native coin refund, so if it's a contract it MUST have receive() or payable fallback()

Parameters

NameTypeDescription
fromaddressSource address
toOmnichainAddressDestination omnichain address
iduint256Token ID
valueuint256Amount of tokens to transfer
databytesAdditional data with no specified format

safeTransferFrom

function safeTransferFrom(address from, OmnichainAddress to, uint256 id, uint256 value, bytes data, address payable refundAddress) public payable virtual

SafeTransferFrom

Parameters

NameTypeDescription
fromaddressAddress to get the token from
toOmnichainAddressAddress to provide tokens to
iduint256The id of the token
valueuint256The amount of the tokens to transfer
databytesExtra data needed
refundAddressaddress payableAddress to send native coin refund to

safeBatchTransferFrom

function safeBatchTransferFrom(address from, OmnichainAddress to, uint256[] ids, uint256[] values, bytes data) public payable virtual

Transfers values amount of multiple ids from from to to in another chain

The caller must have allowance for from's tokens of at least value for each id or be from Caller may receive native coin refund, so if it's a contract it MUST have receive() or payable fallback()

Parameters

NameTypeDescription
fromaddressSource address
toOmnichainAddressDestination omnichain address
idsuint256[]Array of token IDs
valuesuint256[]Array of amounts of tokens to transfer
databytesAdditional data with no specified format

safeBatchTransferFrom

function safeBatchTransferFrom(address from, OmnichainAddress to, uint256[] ids, uint256[] values, bytes data, address payable refundAddress) public payable virtual

Transfers values amount of multiple ids from from to to in another chain

The caller must have allowance for from's tokens of at least value for each id or be from

Parameters

NameTypeDescription
fromaddressSource address
toOmnichainAddressDestination omnichain address
idsuint256[]Array of token IDs
valuesuint256[]Array of amounts of tokens to transfer
databytesAdditional data with no specified format
refundAddressaddress payableAddress to send native coin refund to

transferOwnership

function transferOwnership(address newOwner) public virtual

_msgSender

function _msgSender() internal view virtual returns (address)

_msgData

function _msgData() internal view virtual returns (bytes)

_contextSuffixLength

function _contextSuffixLength() internal view virtual returns (uint256)

On this page