ODCdataManagersfractionalizersERC20Fraction

FractionERC20PausableDataManager

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

  • owner is msg.sender
  • owner is 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(bytes32 dataPoint_, address beneficiary_, address wrapper_, address dataIndex_, address dataObject_, string name_, string symbol_, uint256 nftId_, uint256 amountToBeMinted_, bool userUnlockEnabled_) external

transfer

function transfer(address to, uint256 amount) public virtual returns (bool)

Transfers amount tokens from the caller's account to to

The transfer is done on the local chain

Parameters

NameTypeDescription
toaddressAddress to transfer tokens to
amountuint256Amount of tokens to transfer

Return Values

NameTypeDescription
[0]boolTrue if the transfer was successful, reverts otherwise

transferFrom

function transferFrom(address from, address to, uint256 amount) public virtual returns (bool)

Transfers amount tokens from from to to

The caller must have allowance for from's tokens of at least amount The transfer is done on the local chain

Parameters

NameTypeDescription
fromaddressAddress to transfer tokens from
toaddressAddress to transfer tokens to
amountuint256Amount of tokens to transfer

Return Values

NameTypeDescription
[0]boolTrue if the transfer was successful, reverts otherwise

transfer

function transfer(OmnichainAddress to, uint256 amount) public payable virtual returns (bool)

Transfers amount tokens from the caller's account to to

If the chain ID of to is the same as the current chain ID, the transfer is done on the single chain otherwise, the transfer is done via Omnichain Caller may receive native coin refund, so if it's a contract it MUST have receive() or payable fallback()

Parameters

NameTypeDescription
toOmnichainAddressOmnichain address to transfer tokens to
amountuint256Amount of tokens to transfer

Return Values

NameTypeDescription
[0]boolTrue if the transfer was successful, reverts otherwise

transferFrom

function transferFrom(address from, OmnichainAddress to, uint256 amount) public payable virtual returns (bool)

Transfers amount tokens from from to to

The caller must have allowance for from's tokens of at least amount If the chain ID of to is the same as the current chain ID, the transfer is done on the single chain otherwise, the transfer is done via Omnichain Caller may receive native coin refund, so if it's a contract it MUST have receive() or payable fallback()

Parameters

NameTypeDescription
fromaddressAddress to transfer tokens from
toOmnichainAddressAddress to transfer tokens to
amountuint256Amount of tokens to transfer

Return Values

NameTypeDescription
[0]boolTrue if the transfer was successful, reverts otherwise

transferOwnership

function transferOwnership(address newOwner) public virtual

_msgSender

function _msgSender() internal view returns (address)

_msgData

function _msgData() internal view returns (bytes)

_contextSuffixLength

function _contextSuffixLength() internal view returns (uint256)

On this page