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
transfer
Transfers amount
tokens from the caller's account to to
The transfer is done on the local chain
Parameters
Name | Type | Description |
---|---|---|
to | address | Address to transfer tokens to |
amount | uint256 | Amount of tokens to transfer |
Return Values
Name | Type | Description |
---|---|---|
[0] | bool | True if the transfer was successful, reverts otherwise |
transferFrom
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
Name | Type | Description |
---|---|---|
from | address | Address to transfer tokens from |
to | address | Address to transfer tokens to |
amount | uint256 | Amount of tokens to transfer |
Return Values
Name | Type | Description |
---|---|---|
[0] | bool | True if the transfer was successful, reverts otherwise |
transfer
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
Name | Type | Description |
---|---|---|
to | OmnichainAddress | Omnichain address to transfer tokens to |
amount | uint256 | Amount of tokens to transfer |
Return Values
Name | Type | Description |
---|---|---|
[0] | bool | True if the transfer was successful, reverts otherwise |
transferFrom
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
Name | Type | Description |
---|---|---|
from | address | Address to transfer tokens from |
to | OmnichainAddress | Address to transfer tokens to |
amount | uint256 | Amount of tokens to transfer |
Return Values
Name | Type | Description |
---|---|---|
[0] | bool | True if the transfer was successful, reverts otherwise |