Skip to content

Commit

Permalink
Merge pull request #723 from lukso-network/fix-typos5
Browse files Browse the repository at this point in the history
Fix typos
  • Loading branch information
Hugoo authored Nov 12, 2023
2 parents 68d57e9 + a14739c commit a0eda50
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
40 changes: 20 additions & 20 deletions docs/learn/expert-guides/key-manager/grant-permissions.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,26 @@ await myUniversalProfile

</Tabs>

## Testing the permissions

We can now check that the permissions have been correctly set by querying the `AddressPermissions:Permissions:<beneficiaryAddress>` data key on the ERC725Y storage of the Universal Profile.

If everything went well, the code snippet below should return you back an object with the permission `SETDATA` set to `true`.

```js
const result = await myUniversalProfile.methods['getData(bytes32)'](
data.keys[0],
).call();
console.log(
`The beneficiary address ${beneficiaryAddress} has now the following permissions:`,
erc725.decodePermissions(result),
);
```

Finally, to test the actual permissions, you can do this guide using a `beneficiaryAddress` that you have control over (created manually via web3.js).

You can then try to do again the **Edit our Universal Profile** guide, using this new 3rd party address that you have control over to test if it can successfull edit the profile details. This will give you guarantee that this `beneficiaryAddress` has the `SETDATA` permission working.

## Final code

<Tabs>
Expand Down Expand Up @@ -449,23 +469,3 @@ grantPermissions();
</TabItem>

</Tabs>

## Testing the permissions

We can now check that the permissions have been correctly set by querying the `AddressPermissions:Permissions:<beneficiaryAddress>` data key on the ERC725Y storage of the Universal Profile.

If everything went well, the code snippet below should return you back an object with the permission `SETDATA` set to `true`.

```js
const result = await myUniversalProfile.methods['getData(bytes32)'](
data.keys[0],
).call();
console.log(
`The beneficiary address ${beneficiaryAddress} has now the following permissions:`,
erc725.decodePermissions(result),
);
```

Finally, to test the actual permissions, you can do this guide using a `beneficiaryAddress` that you have control over (created manually via web3.js).

You can then try to do again the **Edit our Universal Profile** guide, using this new 3rd party address that you have control over to test if it can successfull edit the profile details. This will give you guarantee that this `beneficiaryAddress` has the `SETDATA` permission working.
8 changes: 4 additions & 4 deletions docs/tools/lsp-factoryjs/deployment/digital-asset.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ The [LSP7] standard can be useful for NFT collections where you want all tokens

```javascript
await lspFactory.LSP7DigitalAsset.deploy({
isNFT: true,
controllerAddress: '0x56fE4E7dc2bc0b6397E4609B07b4293482E3F72B',
name: 'MYTOKEN'
symbol: 'DEMO',
isNFT: true,
controllerAddress: '0x56fE4E7dc2bc0b6397E4609B07b4293482E3F72B',
name: 'MYTOKEN',
symbol: 'DEMO',
});
```

Expand Down

0 comments on commit a0eda50

Please sign in to comment.