Skip to main content

LSP5ReceivedAssets

generateReceivedAssetKeys

generateReceivedAssetKeys(erc725YContract, assetAddress, assetInterfaceId): Promise<{ lsp5DataKeys: BytesLike[] ; lsp5DataValues: BytesLike[] }>

Generate an array of Data Key/Value pairs to be set on the receiver address after receiving assets.

Parameters

NameTypeDescription
erc725YContractUniversalProfileThe contract instance of the asset reciever.
assetAddressBytesLikeThe address of the asset being received (e.g: an LSP7 or LSP8 token).
assetInterfaceIdBytesLikeThe interfaceID of the asset being received.

Returns

Promise<{ lsp5DataKeys: BytesLike[] ; lsp5DataValues: BytesLike[] }>

A set of LSP5 data keys & data values that can be used to update an array and map in ERC725Y storage.

Since

v0.0.1

See

https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-5-ReceivedAssets.md

Example

generateReceivedAssetKeys(...) => { lsp5DataKeys: BytesLike[], lsp5DataValues: BytesLike[] }

Defined in

LSP5ReceivedAssets/generateReceivedAssetKeys/generateReceivedAssetKeys.ts:32


generateSentAssetKeys

generateSentAssetKeys(erc725YContract, assetAddress): Promise<{ dataKeys: BytesLike[] ; dataValues: BytesLike[] }>

Generate an array of Data Key/Value pairs to be set on the sender address after sending assets.

Parameters

NameTypeDescription
erc725YContractUniversalProfileThe contract instance of the asset sender.
assetAddressBytesLikeThe address of the asset that is being sent.

Returns

Promise<{ dataKeys: BytesLike[] ; dataValues: BytesLike[] }>

A set of LSP5 data keys & data values that can be used to update an array and map in ERC725Y storage.

Since

v0.0.1

See

https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-5-ReceivedAssets.md

Example

generateSentAssetKeys(...) => { lsp5DataKeys: BytesLike[], lsp5DataValues: BytesLike[] }

Defined in

LSP5ReceivedAssets/generateSentAssetKeys/generateSentAssetKeys.ts:34