Skip to content

Warper

Warper

InvalidOriginalTokenInterface

error InvalidOriginalTokenInterface(address original, bytes4 requiredInterfaceId)

Thrown when the original asset contract does not implement the interface, expected by Warper.

receive

receive() external payable virtual

Forwards the current call to the original asset contract. Will run if call data is empty.

fallback

fallback() external payable virtual

Forwards the current call to the original asset contract`. Will run if no other function in the contract matches the call data.

_Warper_init

function _Warper_init(address original, address metahub) internal

Warper initializer.

supportsInterface

function supportsInterface(bytes4 interfaceId) public view virtual returns (bool)

_Returns true if this contract implements the interface defined by `interfaceId`. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created.

This function call must use less than 30 000 gas._

__supportedInterfaces

function __supportedInterfaces(bytes4[] interfaceIds) external view returns (bool[])

Validates if a warper supports multiple interfaces at once.

Name Type Description
[0] bool[] an array of `bool` flags in order as the `interfaceIds` were passed.

__original

function __original() external view returns (address)

Returns the original NFT address.

__metahub

function __metahub() external view returns (address)

Returns the Metahub address.

_fallback

function _fallback() internal virtual

_Forwards the current call to the original asset contract`.

This function does not return to its internal call site, it will return directly to the external caller._

_beforeFallback

function _beforeFallback() internal virtual

_Hook that is called before falling back to the original. Can happen as part of a manual `_fallback` call, or as part of the Solidity `fallback` or `receive` functions.

If overridden should call `super.beforeFallback()`.

_validateOriginal

function _validateOriginal(address original) internal virtual

_Validates the original NFT.

If overridden should call `super.validateOriginal()`.