Skip to content

Commit

Permalink
Merge pull request #245 from lukso-network/develop
Browse files Browse the repository at this point in the history
Sync main
  • Loading branch information
CallumGrindle committed Jan 4, 2024
2 parents 65d4558 + 58edb58 commit a1e4bcf
Show file tree
Hide file tree
Showing 15 changed files with 27,562 additions and 27,081 deletions.
2 changes: 1 addition & 1 deletion docs/classes/lsp7-digital-asset.md
Expand Up @@ -11,7 +11,7 @@ title: LSP7DigitalAsset
lspFactory.LSP7DigitalAsset.deploy(digitalAssetProperties [, options]);
```

Deploys a mintable [LSP7 Digital Asset](../../../standards/nft-2.0/LSP7-Digital-Asset).
Deploys a mintable [LSP7 Digital Asset](../../../standards/tokens/LSP7-Digital-Asset).

:::info

Expand Down
2 changes: 1 addition & 1 deletion docs/classes/lsp8-identifiable-digital-asset.md
Expand Up @@ -11,7 +11,7 @@ title: LSP8IdentifiableDigitalAsset
lspFactory.LSP8IdentifiableDigitalAsset.deploy(digitalAssetProperties [, options]);
```

Deploys a mintable [LSP8 Identifiable Digital Asset](../../../standards/nft-2.0/LSP8-Identifiable-Digital-Asset).
Deploys a mintable [LSP8 Identifiable Digital Asset](../../../standards/tokens/LSP8-Identifiable-Digital-Asset).

:::info

Expand Down
14 changes: 7 additions & 7 deletions docs/deployment/digital-asset.md
Expand Up @@ -113,7 +113,7 @@ Set the address which should own your digital asset contract by passing the `con

### Adding LSP4 Metadata

[LSP7] and [LSP8] both adhere to the [LSP4 Digital Asset Metadata standard](../../../standards/nft-2.0/LSP4-Digital-Asset-Metadata.md). Developers can specify the LSP4Metadata by setting the `name`, `symbol`, `digitalAssetMetadata` and `creators` keys when deploying with LSPFactory.
[LSP7] and [LSP8] both adhere to the [LSP4 Digital Asset Metadata standard](../../../standards/tokens/LSP4-Digital-Asset-Metadata.md). Developers can specify the LSP4Metadata by setting the `name`, `symbol`, `digitalAssetMetadata` and `creators` keys when deploying with LSPFactory.

```javascript
await lspFactory.LSP8IdentifiableDigitalAsset.deploy({
Expand All @@ -128,9 +128,9 @@ await lspFactory.LSP8IdentifiableDigitalAsset.deploy({
});
```

The `name` and `symbol` keys are passed as deployment constructor parameters. These values will set the [`LSP4TokenName`](../../../standards/nft-2.0/LSP4-Digital-Asset-Metadata.md#lsp4tokenname) and [`LSP4TokenSymbol`](../../../standards/nft-2.0/LSP4-Digital-Asset-Metadata.md#lsp4tokensymbol) [ERC725Y] keys directly on the contract during deployment.
The `name` and `symbol` keys are passed as deployment constructor parameters. These values will set the [`LSP4TokenName`](../../../standards/tokens/LSP4-Digital-Asset-Metadata.md#lsp4tokenname) and [`LSP4TokenSymbol`](../../../standards/tokens/LSP4-Digital-Asset-Metadata.md#lsp4tokensymbol) [ERC725Y] keys directly on the contract during deployment.

Addresses passed inside the `creators` array will be set under the [LSP4Creators[]](../../../standards/nft-2.0/LSP4-Digital-Asset-Metadata#lsp4creators) [ERC725Y] key.
Addresses passed inside the `creators` array will be set under the [LSP4Creators[]](../../../standards/tokens/LSP4-Digital-Asset-Metadata#lsp4creators) [ERC725Y] key.

:::warning
LSPFactory does not set the [LSP3IssuedAssets key](https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-3-UniversalProfile-Metadata.md#lsp3issuedassets) on any Universal Profile when deploying a digital asset. This key will have to be updated seperately.
Expand All @@ -139,7 +139,7 @@ LSPFactory does not set the [LSP3IssuedAssets key](https://github.com/lukso-netw

#### Digital Asset Metadata

Further Digital Asset metadata can be added by passing the `digitalAssetMetadata` parameter. This is metadata stored as JSON on a server and referenced from the contract by the [`LSP4Metadata`](../../../standards/nft-2.0/LSP4-Digital-Asset-Metadata.md#lsp4metadata) [ERC725Y] key.
Further Digital Asset metadata can be added by passing the `digitalAssetMetadata` parameter. This is metadata stored as JSON on a server and referenced from the contract by the [`LSP4Metadata`](../../../standards/tokens/LSP4-Digital-Asset-Metadata.md#lsp4metadata) [ERC725Y] key.

:::info Info
Digital Asset Metadata can be passed as either a JSON object containing the [LSP4Metadata](https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-4-DigitalAsset-Metadata.md) you want to upload or a URL of your previously uploaded metadata.
Expand Down Expand Up @@ -181,7 +181,7 @@ await lspFactory.LSP8IdentifiableDigitalAsset.deploy({
});
```

Alternatively `digitalAssetMetadata` can be passed as a URL where the LSP4Metadata JSON file is stored. LSPFactory will download the JSON file before hashing it and generate the [JSONURL](https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-2-ERC725YJSONSchema.md#JSONURL) value to be stored on the token contract's `LSP4Metadata` [ERC725Y] key.
Alternatively `digitalAssetMetadata` can be passed as a URL where the LSP4Metadata JSON file is stored. LSPFactory will download the JSON file before hashing it and generate the [VerifiableURI](https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-2-ERC725YJSONSchema.md#VerifiableURI) value to be stored on the token contract's `LSP4Metadata` [ERC725Y] key.

```javascript title='Providing a previously uploaded LSP4 metadata IPFS URL'
await lspFactory.LSP8IdentifiableDigitalAsset.deploy({
Expand Down Expand Up @@ -632,7 +632,7 @@ Digital Asset deployment completed

```

[lsp7]: ../../../standards/nft-2.0/LSP7-Digital-Asset
[lsp8]: ../../../standards/nft-2.0/LSP8-Identifiable-Digital-Asset
[lsp7]: ../../../standards/tokens/LSP7-Digital-Asset
[lsp8]: ../../../standards/tokens/LSP8-Identifiable-Digital-Asset
[erc20]: https://eips.ethereum.org/EIPS/eip-20
[erc725y]: ../../../standards/generic-standards/lsp2-json-schema.md
26 changes: 13 additions & 13 deletions docs/deployment/universal-profile.md
Expand Up @@ -5,29 +5,29 @@ title: Universal Profile

# Deploying a Universal Profile

LSPFactory allows you to quickly deploy and configure a Universal Profile consisting of an [LSP0 ERC725 Account](../../../standards/universal-profile/lsp0-erc725account), an [LSP6 Key Manager](../../../standards/universal-profile/lsp6-key-manager), and an [LSP1-UniversalReceiver](../../../standards/generic-standards/lsp1-universal-receiver.md) smart contract:
LSPFactory allows you to quickly deploy and configure a Universal Profile consisting of an [LSP0 ERC725 Account](../../../standards/universal-profile/lsp0-erc725account.md), an [LSP6 Key Manager](../../../standards/universal-profile/lsp6-key-manager.md), and an [LSP1-UniversalReceiver](../../../standards/generic-standards/lsp1-universal-receiver.md) smart contract:

```javascript
await lspFactory.UniversalProfile.deploy(profileProperties [, options]);
```

This will deploy the following contracts:

- [LSP0 ERC725 Account](../../../standards/universal-profile/lsp0-erc725account)
- [LSP6 Key Manager](../../../standards/universal-profile/lsp6-key-manager)
- [LSP0 ERC725 Account](../../../standards/universal-profile/lsp0-erc725account.md)
- [LSP6 Key Manager](../../../standards/universal-profile/lsp6-key-manager.md)
- And link to a pre-deployed [LSP1 Universal Receiver](../../../standards/generic-standards/lsp1-universal-receiver.md)

After, it will:

- upload metadata to IPFS and set the [LSP3 Profile](../../../standards/universal-profile/lsp3-profile-metadata) metadata,
- upload metadata to IPFS and set the [LSP3 Profile](../../../standards/universal-profile/lsp3-profile-metadata.md) metadata,
- attach the Universal Receiver Delegate to the ERC725 Account,
- set the Key Manager as the owner of the ERC725 Account, and
- set all [permissions](../../../standards/universal-profile/lsp6-key-manager#-types-of-permissions) for the `controllerAddresses` except `DELEGATECALL`.
- set all [permissions](../../../standards/universal-profile/lsp6-key-manager#-types-of-permissions.md) for the `controllerAddresses` except `DELEGATECALL`.

These smart contracts linked with some [LSP3 Profile Metadata](../../../standards/universal-profile/lsp3-profile-metadata) form a Universal Profile. The metadata is the 'face' of your profile and contains information such as your name, description, and profile image.
These smart contracts linked with some [LSP3 Profile Metadata](../../../standards/universal-profile/lsp3-profile-metadata.md) form a Universal Profile. The metadata is the 'face' of your profile and contains information such as your name, description, and profile image.

:::caution
The deployment key passed to LSPFactory will be given `CHANGEOWNER` and `EDITPERMISSIONS` [LSP6 permissions](../../../standards/universal-profile/lsp6-key-manager#-types-of-permissions) in order to carry out the Universal Profile deployment.
The deployment key passed to LSPFactory will be given `CHANGEOWNER` and `EDITPERMISSIONS` [LSP6 permissions](../../../standards/universal-profile/lsp6-key-manager#-types-of-permissions.md) in order to carry out the Universal Profile deployment.

These permisisons are revoked as the final step of deployment. It is important this step is completed correctly to avoid security risks.

Expand All @@ -39,7 +39,7 @@ Inside the `profileProperties` object, you can set profile configuration options

### Controller Addresses

You can set the addresses which should be able to control your Universal Profile initially by passing in the `controllerAddresses`. The addresses that were passed here will be given all LSP6 KeyManager permissions except `DELEGATECALL` to [prevent accidental misuse](https://solidity-by-example.org/hacks/delegatecall/). If your controller keys require `DELEGATECALL`, you can [change the permission after deployment](../../../guides/key-manager/give-permissions.md).
You can set the addresses which should be able to control your Universal Profile initially by passing in the `controllerAddresses`. The addresses that were passed here will be given all LSP6 KeyManager permissions except `DELEGATECALL` to [prevent accidental misuse](https://solidity-by-example.org/hacks/delegatecall/). If your controller keys require `DELEGATECALL`, you can [change the permission after deployment](../../../learn/expert-guides/key-manager/grant-permissions.md).

The property `controllerAddresses` can be filled with addresses of externally owned accounts (EOAs) or another smart contract that can call the `execute(calldata)` function on the KeyManager.

Expand All @@ -64,13 +64,13 @@ await lspFactory.UniversalProfile.deploy({
```

:::info Info
Profile Metadata can be passed as either a JSON object containing the [LSP3Metadata](https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-3-UniversalProfile-Metadata.md#lsp3profile) you want to upload or a URL of your previously uploaded metadata.
Profile Metadata can be passed as either a JSON object containing the [LSP3Metadata](https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-3-Profile-Metadata.md) you want to upload or a URL of your previously uploaded metadata.
:::

If an LSP3MetaData object is passed, LSPFactory will process and upload your metadata to IPFS.

:::info
See [Upload Options](././universal-profile#ipfs-upload-options) for details on how to specify a custom IPFS gateway.
See [Upload Options](././universal-profile#ipfs-upload-options.md) for details on how to specify a custom IPFS gateway.
:::

```javascript title='Uploading an LSP3 metadata automatically'
Expand Down Expand Up @@ -111,7 +111,7 @@ await lspFactory.UniversalProfile.deploy({
};
```

The following two examples will download the JSON file before hashing it and generating the proper [JSONURL](https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-2-ERC725YJSONSchema.md#JSONURL) value.
The following two examples will download the JSON file before hashing it and generating the proper [VerifiableURI](https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-2-ERC725YJSONSchema.md#VerifiableURI) value.

```javascript title='Providing a previously uploaded LSP3 metadata IPFS URL'
await lspFactory.UniversalProfile.deploy({
Expand Down Expand Up @@ -320,13 +320,13 @@ await lspFactory.UniversalProfile.deploy({

### Uploading LSP3 metadata to IPFS

You can upload your LSP3 metadata before deploying a Universal Profile using the `uploadProfileData()` method. The function uses the same [`lsp3Profile` object schema](./universal-profile#adding-lsp3-metadata) defined above when deploying a Universal Profile. Returns an object containing the IPFS upload location of your metadata and your `lsp3Metdata` as a javascript object.
You can upload your LSP3 metadata before deploying a Universal Profile using the `uploadProfileData()` method. The function uses the same [`lsp3Profile` object schema](./universal-profile#adding-lsp3-metadata.md) defined above when deploying a Universal Profile. Returns an object containing the IPFS upload location of your metadata and your `lsp3Metdata` as a javascript object.

```javascript
await myLSPFactory.UniversalProfile.uploadProfileData(lsp3Profile [, options]);
```

To upload using a custom IPFS gateway, pass the `options` object. The field is the same `options` object used when deploying a Universal Profile. [Read more](./universal-profile#ipfs-upload-options).
To upload using a custom IPFS gateway, pass the `options` object. The field is the same `options` object used when deploying a Universal Profile. [Read more](./universal-profile#ipfs-upload-options.md).

The `uploadProfileData()` function is available as a static or non-static method to be called without instantiating an `LSPFactory` object.

Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started.md
Expand Up @@ -51,7 +51,7 @@ const myContracts = await lspFactory.UniversalProfile.deploy({
});
```

The key `lsp3Profile` contains the [LSP3 Metadata](https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-2-ERC725YJSONSchema.md#JSONURL) of your Universal Profile. This is the "face" of your Universal Profile and contains all the public information people will see when they view your UP like your name, description and profile image.
The key `lsp3Profile` contains the [LSP3 Profile Metadata](https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-3-Profile-Metadata.md#lsp3profile) of your Universal Profile. This is the "face" of your Universal Profile and contains all the public information people will see when they view your UP like your name, description and profile image.

```javascript
const myLSP3MetaData = {
Expand Down

0 comments on commit a1e4bcf

Please sign in to comment.