Skip to main content

LSP1UniversalReceiverDelegateVault

The LSP1UniversalReceiverDelegateVault is a contract called by the universalReceiver(...) function of the LSP9Vault contract that:

The requirements stated in the LSP1UniversalReceiverDelegateUP contract doesn't apply in this contract to execute the logic above correctly, as the address registred under the LSP1UniversalReceiverDelegate data key has write access to the storage.

note

LSP1UniversalReceiverDelegateVault contract also contains the methods from the ERC165 Standard:

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

Functions​

universalReceiverDelegate​

function universalReceiverDelegate(
address caller,
uint256 value,
bytes32 typeId,
bytes memory data
) public payable returns (bytes memory result)

Writes the received LSP7-DigitalAsset or LSP8-IdentifiableDigitalAsset assets into the vault storage according to the LSP5-ReceivedAssets standard.

note

The data key representing an asset is cleared when the asset is not owned by the vault anymore.

Parameters:​

NameTypeDescription
calleraddressThe token smart contract address.
valueuint256The amount of value sent to the universalReceiver function.
typeIdbytes32The token hooks.
databytesThe data associated with the asset transfer (concatenated).

Return Values:​

NameTypeDescription
resultbytesEmpty bytes

References​