Skip to content

Commit

Permalink
Merge pull request #147 from lukso-network/develop
Browse files Browse the repository at this point in the history
chore: release v2.3.3
  • Loading branch information
Hugoo authored Jul 25, 2022
2 parents e721dac + dba6771 commit 571425b
Show file tree
Hide file tree
Showing 12 changed files with 82 additions and 82 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [2.3.3](https://github.com/lukso-network/tools-lsp-factory/compare/v2.3.2...v2.3.3) (2022-07-25)


### improvement

* get chainId from provider ([d2db829](https://github.com/lukso-network/tools-lsp-factory/commit/d2db829a47ca429befc4cfd9505d45316cf16fd4))


### [2.3.2](https://github.com/lukso-network/tools-lsp-factory/compare/v2.3.1...v2.3.2) (2022-06-24)


Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ npm install @lukso/lsp-factory.js
```javascript
import { LSPFactory } from '@lukso/lsp-factory.js';

const provider = 'https://rpc.l14.lukso.network'; // RPC url used to connect to the network
const provider = 'https://rpc.l16.lukso.network'; // RPC url used to connect to the network

const lspFactory = new LSPFactory(provider, {
deployKey: '0x...'; // Private key of the account which will deploy UPs
chainId: 22, // Chain Id of the network you want to connect to
chainId: 2828, // Chain Id of the network you want to connect to
});
```

Expand Down
8 changes: 1 addition & 7 deletions docs/classes/lsp7-digital-asset.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,7 @@ You can read more about the `options` object specification on [its official page

| Type | Description |
| :----------- | :------------------------------------------------------------------------------------------- |
| `Promise` | Resolves to an object containing deployed contract details. Default return value. |
| `Observable` | An [RxJS Observable]. Returned if `deployReactive` is set to `true` inside `options` object. |

:::info
The `deployReactive` flag can be set in the `options` object to return an [RxJS Observable] of deployment events.
:::
| `Promise` | Resolves to an object containing deployed contract details. |

### Example

Expand Down Expand Up @@ -209,6 +204,5 @@ Deployment Complete
[uploading lsp4 digital asset metadata]: ./lsp4-digital-asset-metadata#uploadMetadata
[lsp-smart-contracts]: https://github.com/lukso-network/lsp-smart-contracts
[eip1167]: https://eips.ethereum.org/EIPS/eip-1167
[rxjs observable]: https://rxjs.dev/guide/observable
[ipfs-http-client]: https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#createoptions
[lsp7 decimals]: https://github.com/lukso-network/lsp-smart-contracts/blob/develop/docs/ILSP7DigitalAsset.md#decimals
9 changes: 1 addition & 8 deletions docs/classes/lsp8-identifiable-digital-asset.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,7 @@ You can read more about the `options` object specification on [its official page

| Type | Description |
| :----------- | :------------------------------------------------------------------------------------------- |
| `Promise` | Resolves to an object containing deployed contract details. Default return value. |
| `Observable` | An [RxJS Observable]. Returned if `deployReactive` is set to `true` inside `options` object. |

:::info
The `deployReactive` flag can be set in the `options` object to return an [RxJS Observable] of deployment events.
:::
| `Promise` | Resolves to an object containing deployed contract details. |

### Example

Expand Down Expand Up @@ -207,12 +202,10 @@ Deployment Complete
```

[contract deployment options]: ../deployment/digital-asset/#deployment-configuration
[rxjs observable]: https://rxjs.dev/guide/observable
[constructor parameters]: ../../../../../standards/smart-contracts/lsp7-digital-asset#constructor
[contract deployment options]: ../deployment/digital-asset.md
[lsp4]: https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-4-DigitalAsset-Metadata.md
[uploading lsp4 digital asset metadata]: ./lsp4-digital-asset-metadata#uploadMetadata
[lsp-smart-contracts]: https://github.com/lukso-network/lsp-smart-contracts
[eip1167]: https://eips.ethereum.org/EIPS/eip-1167
[rxjs observable]: https://rxjs.dev/guide/observable
[ipfs-http-client]: https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#createoptions
5 changes: 2 additions & 3 deletions docs/classes/universal-profile.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ See the [configuration specification](../deployment/universal-profile#deployment

```javascript title="Deploying a Universal Profile"
await lspFactory.UniversalProfile.deploy({
controllingAccounts: ['0xb74a88C43BCf691bd7A851f6603cb1868f6fc147'],
controllerAddresses: ['0xb74a88C43BCf691bd7A851f6603cb1868f6fc147'],
lsp3Profile: {
name: 'My Universal Profile',
description: 'My cool Universal Profile',
Expand Down Expand Up @@ -159,7 +159,7 @@ await lspFactory.UniversalProfile.deploy({
```javascript title="Reactive Universal Profile Deployment"
await lspFactory.UniversalProfile.deploy(
{
controllingAccounts: ['0x9Fba07e245B415cC9580BD6c890a9fd7D22e20db'],
controllerAddresses: ['0x9Fba07e245B415cC9580BD6c890a9fd7D22e20db'],
},
{
onDeployEvents: {
Expand Down Expand Up @@ -559,5 +559,4 @@ await UniversalProfile.uploadProfileData(
```

[all permissions]: ../../../../../standards/universal-profile/lsp6-key-manager#-address-permissions
[rxjs observable]: https://rxjs.dev/guide/observable
[lsp3]: ../../../standards/universal-profile/lsp3-universal-profile-metadata
8 changes: 4 additions & 4 deletions docs/deployment/universal-profile.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ const myUniversalProfileData = {
};

await lspFactory.UniversalProfile.deploy({
controllingAccounts: ['0x...'],
controllerAddresses: ['0x...'],
lsp3Profile: myUniversalProfileData
});
};
Expand Down Expand Up @@ -232,7 +232,7 @@ Avatar files passed as a metadata objects will be set directly on the [LSP3 Prof
};

await lspFactory.UniversalProfile.deploy({
controllingAccounts: ['0x...'],
controllerAddresses: ['0x...'],
lsp3Profile: myUniversalProfileData
});

Expand Down Expand Up @@ -266,7 +266,7 @@ Javascript's `File` object is only available when using javascript in the browse
};

await lspFactory.UniversalProfile.deploy({
controllingAccounts: ['0x...'],
controllerAddresses: ['0x...'],
lsp3Profile: myUniversalProfileData
});
};
Expand Down Expand Up @@ -305,7 +305,7 @@ const myUniversalProfileData = {
};
await lspFactory.UniversalProfile.deploy({
controllingAccounts: ['0x...'],
controllerAddresses: ['0x...'],
lsp3Profile: myUniversalProfileData,
});
``` -->
Expand Down
27 changes: 14 additions & 13 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ npm install @lukso/lsp-factory.js
```javascript
import { LSPFactory } from '@lukso/lsp-factory.js';

const provider = 'https://rpc.l14.lukso.network'; // RPC provider url
const provider = 'https://rpc.l16.lukso.network';

const lspFactory = new LSPFactory(provider, {
deployKey: '0x...', // Private key of the account which will deploy any smart contract,
chainId: 22, // Chain Id of the network you want to deploy to
deployKey: '0x...', // Private key of the account which will deploy smart contracts
chainId: 2828,
});
```

Expand All @@ -35,7 +35,9 @@ If used in the browser on a dApp's page, pass the ethereum object as the provide
```javascript
await ethereum.request({ method: 'eth_requestAccounts', params: [] });

const lspFactory = new LSPFactory(ethereum);
const lspFactory = new LSPFactory(ethereum, {
chainId: 2828,
});
```

## Usage
Expand All @@ -44,10 +46,9 @@ Deploying a Universal Profile is as simple as running:

```javascript
const myContracts = await lspFactory.UniversalProfile.deploy({
controllingAccounts: ['0x...'], // Account addresses which will control the UP
lsp3Profile: myLSP3MetaData
});
};
controllerAddresses: ['0x...'], // Account addresses which will control the UP
lsp3Profile: myLSP3MetaData,
});
```

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.
Expand Down Expand Up @@ -115,9 +116,9 @@ const myUPAddress = myContracts.LSP0ERC725Account.address;
When instantiating LSPFactory options can be passed to specify parameters such as `chainId` and `ipfsGateway`.

```javascript title="Instantiating LSPFactory with custom options set"
const lspFactory = new LSPFactory(provider, {
const lspFactory = new LSPFactory('https://rpc.l16.lukso.network', {
deployKey: '0x...',
chainId: 22,
chainId: 2828,
ipfsGateway: 'https://ipfs.infura.io:5001',
});
```
Expand All @@ -130,16 +131,16 @@ If no value is set here, LSPFactory will attempt to sign transactions via a brow

#### Chain Id

`chainId` is used to specify the network that LSPFactory is interacting with. This is used in the [versions file](https://github.com/lukso-network/tools-lsp-factory/blob/main/src/versions.json) to reference base contracts deployed on the network used for [proxy deployment](./getting-started.md#proxy-deployment). Defaults to 22.
`chainId` is used to specify the network that LSPFactory is interacting with. The provided `chainId` will be used to determine which base contracts to use when using [proxy deployment](./deployment/options.md#deploy-proxy). Previously deployed base contract addresses are stored in the [versions file](https://github.com/lukso-network/tools-lsp-factory/blob/main/src/versions.json) and accessed using the provided chainId. Defaults to 22 (l14 testnet).

#### IPFS Gateway

`ipfsGateway` is used to specify the IPFS node which should be interacted with for uploading and retrieving metadata. `ipfsGateway` can be either a URL string or an object as defined by the [IPFS-HTTP Client](https://github.com/ipfs/js-ipfs/tree/master/packages/ipfs-http-client#createoptions) library which is used internally to interact with the IPFS node.

```javascript title="Instantiating LSPFactory with custom ipfsGateway options set"
const lspFactory = new LSPFactory(provider, {
const lspFactory = new LSPFactory('https://rpc.l16.lukso.network', {
deployKey: '0x...',
chainId: 22,
chainId: 2828,
ipfsGateway: {
host: 'ipfs.infura.io',
port: 5001,
Expand Down
84 changes: 42 additions & 42 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lukso/lsp-factory.js",
"version": "2.3.2",
"version": "2.3.3",
"description": "Helper Library to allow simple deployments of UniversalProfiles and LSP7 and LSP8 Digital Assets.",
"main": "build/main/src/index.js",
"typings": "build/main/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/lib/classes/universal-profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export class UniversalProfile {
* @example
* ```javascript
*lspFactory.UniversalProfile.deploy({
* controllingAccounts: ['0xb74a88C43BCf691bd7A851f6603cb1868f6fc147'],
* controllerAddresses: ['0xb74a88C43BCf691bd7A851f6603cb1868f6fc147'],
* lsp3Profile: myUniversalProfileData
* });
*};
Expand Down
1 change: 1 addition & 0 deletions src/lib/interfaces/deployment-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export type EthersExternalProvider = {
isStatus?: boolean;
host?: string;
path?: string;
chainId?: string;
sendAsync?: (
request: { method: string; params?: Array<any> },
callback: (error: any, response: any) => void
Expand Down
Loading

0 comments on commit 571425b

Please sign in to comment.