Skip to main content

OnERC721ReceivedExtension

Standard Specifications
Solidity implementation

LSP17 Extension that can be attached to a LSP17Extendable contract to allow it to receive ERC721 tokens via safeTransferFrom.

Public Methods

Public methods are accessible externally from users, allowing interaction with this function from dApps or other smart contracts. When marked as 'public', a method can be called both externally and internally, on the other hand, when marked as 'external', a method can only be called externally.

VERSION

References
function VERSION() external view returns (string);

Contract version.

Returns

NameTypeDescription
0string-

onERC721Received

References
function onERC721Received(
address,
address,
uint256,
bytes
) external nonpayable returns (bytes4);

See IERC721Receiver-onERC721Received. Always returns IERC721Receiver.onERC721Received.selector.

Parameters

NameTypeDescription
_0address-
_1address-
_2uint256-
_3bytes-

Returns

NameTypeDescription
0bytes4-

supportsInterface

References
function supportsInterface(bytes4 interfaceId) external view returns (bool);

See IERC165-supportsInterface.

Parameters

NameTypeDescription
interfaceIdbytes4-

Returns

NameTypeDescription
0bool-

Internal Methods

Any method labeled as internal serves as utility function within the contract. They can be used when writing solidity contracts that inherit from this contract. These methods can be extended or modified by overriding their internal behavior to suit specific needs.

Internal functions cannot be called externally, whether from other smart contracts, dApp interfaces, or backend services. Their restricted accessibility ensures that they remain exclusively available within the context of the current contract, promoting controlled and encapsulated usage of these internal utilities.

_extendableMsgData

function _extendableMsgData() internal view returns (bytes);

Returns the original msg.data passed to the extendable contract without the appended msg.sender and msg.value.


_extendableMsgSender

function _extendableMsgSender() internal view returns (address);

Returns the original msg.sender calling the extendable contract.


_extendableMsgValue

function _extendableMsgValue() internal view returns (uint256);

Returns the original msg.value sent to the extendable contract.