Skip to content

Commit

Permalink
Merge pull request #757 from lukso-network/fix/lsp3
Browse files Browse the repository at this point in the history
fix: replace old `LSP3UniversalProfile` with `LSP3Profile`
  • Loading branch information
Hugoo authored Dec 1, 2023
2 parents db0398c + 76954c1 commit 84b9f93
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion docs/learn/dapp-developer/read-profile-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ npm install @erc725/erc725.js

<div>

- `SupportedStandards:LSP3Profile` Verifies that the ERC725Y contract contains [LSP3UniversalProfile](../../standards/universal-profile/lsp3-profile-metadata) data keys
- `SupportedStandards:LSP3Profile` Verifies that the ERC725Y contract contains [LSP3Profile](../../standards/universal-profile/lsp3-profile-metadata#supportedstandardslsp3profile) data keys
- `LSP3Profile` contains the JSON file with profile descriptions and images
- `LSP12IssuedAssets[]` contains assets the profile issued
- `LSP5ReceivedAssets[]` contains assets the profile received
Expand Down
16 changes: 8 additions & 8 deletions docs/learn/expert-guides/read-asset-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ If using erc725.js in a NodeJS environment you may need to install and import [`
```javascript title="read_assets.js"
// Import and network setup
import { ERC725 } from '@erc725/erc725.js';
import UniversalProfileSchema from '@erc725/erc725.js/schemas/LSP3UniversalProfileMetadata.json';
import LSP3ProfileSchema from '@erc725/erc725.js/schemas/LSP3ProfileMetadata.json';
import Web3 from 'web3';

// Static variables
Expand All @@ -80,7 +80,7 @@ const config = { ipfsGateway: IPFS_GATEWAY };

// Fetch the LSP5 data of the Universal Profile to get its owned assets
const profile = new ERC725(
UniversalProfileSchema,
LSP3ProfileSchema,
SAMPLE_PROFILE_ADDRESS,
provider,
config,
Expand All @@ -106,7 +106,7 @@ If using erc725.js in a NodeJS environment you may need to install and import [`
```javascript title="read_assets.js"
// Import and network setup
import { ERC725 } from '@erc725/erc725.js';
import UniversalProfileSchema from '@erc725/erc725.js/schemas/LSP3UniversalProfileMetadata.json';
import LSP3ProfileSchema from '@erc725/erc725.js/schemas/LSP3ProfileMetadata.json';
import Web3 from 'web3';

// Static variables
Expand All @@ -120,7 +120,7 @@ const config = { ipfsGateway: IPFS_GATEWAY };

// Fetch the LSP1 data of the Universal Profile to get its Universal Receiver
const profile = new ERC725(
UniversalProfileSchema,
LSP3ProfileSchema,
SAMPLE_PROFILE_ADDRESS,
provider,
config,
Expand Down Expand Up @@ -230,7 +230,7 @@ Below is the complete code snippet of this guide, with all the steps compiled to
```javascript title="read_assets.js"
// Import and network setup
import { ERC725 } from '@erc725/erc725.js';
import UniversalProfileSchema from '@erc725/erc725.js/schemas/LSP3UniversalProfileMetadata.json';
import LSP3ProfileSchema from '@erc725/erc725.js/schemas/LSP3ProfileMetadata.json';
import LSP4Schema from '@erc725/erc725.js/schemas/LSP4DigitalAsset.json';
import Web3 from 'web3';

Expand All @@ -245,7 +245,7 @@ const config = { ipfsGateway: IPFS_GATEWAY };

// Fetch the LSP5 data of the Universal Profile to get its owned assets
const profile = new ERC725(
UniversalProfileSchema,
LSP3ProfileSchema,
SAMPLE_PROFILE_ADDRESS,
provider,
config,
Expand Down Expand Up @@ -295,7 +295,7 @@ console.log(ownedAssetsMetadata);
```javascript title="read_assets.js"
// Import and network setup
import { ERC725 } from '@erc725/erc725.js';
import UniversalProfileSchema from '@erc725/erc725.js/schemas/LSP3UniversalProfileMetadata.json';
import LSP3ProfileSchema from '@erc725/erc725.js/schemas/LSP3ProfileMetadata.json';
import LSP4Schema from '@erc725/erc725.js/schemas/LSP4DigitalAsset.json';
import Web3 from 'web3';
import LSP1MinimalABI from './lsp1_legacy_minimal_abi.json';
Expand All @@ -311,7 +311,7 @@ const config = { ipfsGateway: IPFS_GATEWAY };

// Fetch the LSP1 data of the Universal Profile to get its Universal Receiver
const profile = new ERC725(
UniversalProfileSchema,
LSP3ProfileSchema,
SAMPLE_PROFILE_ADDRESS,
provider,
config,
Expand Down
6 changes: 3 additions & 3 deletions docs/standards/generic-standards/lsp2-json-schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,16 +137,16 @@ The data being mapped can be words that have a specific meaning for the protocol

Below are some examples of the **Mapping** key type.

- mapping to **words:** `SupportedStandards:LSP3UniversalProfile`, `SupportedStandards:LSP4DigitalAsset`, `SupportedStandards:LSP{N}{StandardName}`, etc...
- mapping to **words:** `SupportedStandards:LSP3Profile`, `SupportedStandards:LSP4DigitalAsset`, `SupportedStandards:LSP{N}{StandardName}`, etc...
- mapping to **`<mixed type>`**, like an `address`: `LSP5ReceivedAssetsMap:<address>`
- mapping to **`<mixed type>`**, like a `bytes32`: `LSP8MetadataAddress:<bytes32>`

#### Example 1: Mapping as `FirstWord:SecondWord`

```json
{
"name": "SupportedStandards:LSP3UniversalProfile",
"key": "0xeafec4d89fa9619884b60000abe425d64acd861a49b8ddf5c0b6962110481f38",
"name": "SupportedStandards:LSP3Profile",
"key": "0xeafec4d89fa9619884b600005ef83ad9559033e6e941db7d7c495acdce616347",
"keyType": "Mapping",
"valueType": "bytes4",
"valueContent": "0xabe425d6"
Expand Down
10 changes: 5 additions & 5 deletions docs/standards/universal-profile/lsp3-profile-metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,19 @@ Make sure to understand the **[ERC725Y Generic Key/Value Store](../lsp-backgroun

:::

### `SupportedStandards:LSP3UniversalProfile`
### `SupportedStandards:LSP3Profile`

```json
{
"name": "SupportedStandards:LSP3UniversalProfile",
"key": "0xeafec4d89fa9619884b60000abe425d64acd861a49b8ddf5c0b6962110481f38",
"name": "SupportedStandards:LSP3Profile",
"key": "0xeafec4d89fa9619884b600005ef83ad9559033e6e941db7d7c495acdce616347",
"keyType": "Mapping",
"valueType": "bytes4",
"valueContent": "0xabe425d6"
"valueContent": "0x5ef83ad9"
}
```

This data key is used to know if the contract represents a **Universal Profile**.
This data key is used to know if the contract contains some metadata to display as a profile.

### `LSP3Profile`

Expand Down

0 comments on commit 84b9f93

Please sign in to comment.