Skip to main content

LSP1UniversalReceiverDelegateUP

The LSP1UniversalReceiverDelegateUP is a contract called by the universalReceiver(...) function of the LSP0ERC725Account contract that:

The following two requirements are required to execute the logic above correctly:

  1. The owner of the LSP0ERC725Account contract should be an LSP6KeyManager contract.
  2. The LSP1UniversalReceiverDelegateUP contract should be granted permission to SETDATA on the account (otherwise, the transaction will pass but will not write any data keys to the storage).
note

LSP1UniversalReceiverDelegateUP 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 data keys of the received LSP7DigitalAsset, LSP8IdentifiableDigitalAsset, and LSP9Vault contract addresses into the account storage according to the LSP5ReceivedAssets and LSP10-ReceivedVaults Standard.

The data keys representing an asset/vault are cleared when the asset/vault is no longer owned by the account.

Parameters:​

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

Return Values:​

NameTypeDescription
resultbytesThe value that is returned by the Key Manager's execute(...) function.

References​