Skip to content

Commit

Permalink
docs: update auto-generated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
b00ste committed Aug 15, 2023
1 parent 4f2548c commit 3ce471f
Showing 1 changed file with 60 additions and 37 deletions.
97 changes: 60 additions & 37 deletions docs/contracts/LSP6KeyManager/LSP6KeyManager.md
Original file line number Diff line number Diff line change
Expand Up @@ -1071,19 +1071,19 @@ Used in the end of the `nonReentrant` modifier after the method execution is ter

## Events

### VerifiedCall
### PermissionsVerified

:::note References

- Specification details: [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#verifiedcall)
- Specification details: [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#permissionsverified)
- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP6KeyManager/LSP6KeyManager.sol)
- Event signature: `VerifiedCall(address,uint256,bytes4)`
- Event topic hash: `0xa54458b75709e42f79700ffb6cfc57c7e224d8a77a52c457ee7ecb8e22636280`
- Event signature: `PermissionsVerified(address,uint256,bytes4)`
- Event topic hash: `0xc0a62328f6bf5e3172bb1fcb2019f54b2c523b6a48e3513a2298fbf0150b781e`

:::

```solidity
event VerifiedCall(address indexed signer, uint256 indexed value, bytes4 indexed selector);
event PermissionsVerified(address indexed signer, uint256 indexed value, bytes4 indexed selector);
```

_Verified the permissions of `signer` for calling function `selector` on the linked account and sending `value` of native token._
Expand All @@ -1102,37 +1102,6 @@ Emitted when the LSP6KeyManager contract verified the permissions of the `signer

## Errors

### AddressPermissionArrayIndexValueNotAnAddress

:::note References

- Specification details: [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#addresspermissionarrayindexvaluenotanaddress)
- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP6KeyManager/LSP6KeyManager.sol)
- Error signature: `AddressPermissionArrayIndexValueNotAnAddress(bytes32,bytes)`
- Error hash: `0x8f4afa38`

:::

```solidity
error AddressPermissionArrayIndexValueNotAnAddress(
bytes32 dataKey,
bytes invalidValue
);
```

_Could not store `invalidValue` inside the `AddressPermissions[]` Array at index: `dataKey`._

Reverts when trying to set a value that is not 20 bytes long (not an `address`) under the `AddressPermissions[index]` data key.

#### Parameters

| Name | Type | Description |
| -------------- | :-------: | ----------------------------------------------------------------------------------------------------- |
| `dataKey` | `bytes32` | The `AddressPermissions[index]` data key, that specify the index in the `AddressPermissions[]` array. |
| `invalidValue` | `bytes` | The invalid value that was attempted to be set under `AddressPermissions[index]`. |

<br/>

### BatchExecuteParamsLengthMismatch

:::note References
Expand Down Expand Up @@ -1253,7 +1222,40 @@ Reverts when trying to do a `delegatecall` via the ERC725X.execute(uint256,addre
error ERC725Y_DataKeysValuesLengthMismatch();
```

reverts when there is not the same number of elements in the lists of data keys and data values when calling setDataBatch.
Reverts when there is not the same number of elements in the `datakeys` and `dataValues` array parameters provided when calling the [`setDataBatch`](#setdatabatch) function.

<br/>

### InvalidDataValuesForDataKeys

:::note References

- Specification details: [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#invaliddatavaluesfordatakeys)
- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP6KeyManager/LSP6KeyManager.sol)
- Error signature: `InvalidDataValuesForDataKeys(bytes32,bytes,uint256)`
- Error hash: `0x132d9e67`

:::

```solidity
error InvalidDataValuesForDataKeys(
bytes32 dataKey,
bytes dataValue,
uint256 requiredLength
);
```

_Data value: `dataValue` length is different from `zeroValueRequiredLength` and `normalValueRequiredLength`._

Reverts when the data value length is not one of the required lengths for the specific data key.

#### Parameters

| Name | Type | Description |
| ---------------- | :-------: | --------------------------------------------------------------------------- |
| `dataKey` | `bytes32` | The data key associated with the invalid `dataValue` that was set. |
| `dataValue` | `bytes` | The data value that has an invalid length. |
| `requiredLength` | `uint256` | The `dataValue` length required for the zero value set under the `dataKey`. |

<br/>

Expand Down Expand Up @@ -1453,6 +1455,27 @@ Reverts when a `from` address has _"any whitelisted call"_ as allowed call set.

<br/>

### KeyManagerCannotBeSetAsExtensionForLSP20Functions

:::note References

- Specification details: [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#keymanagercannotbesetasextensionforlsp20functions)
- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP6KeyManager/LSP6KeyManager.sol)
- Error signature: `KeyManagerCannotBeSetAsExtensionForLSP20Functions()`
- Error hash: `0x4a9fa8cf`

:::

```solidity
error KeyManagerCannotBeSetAsExtensionForLSP20Functions();
```

_Key Manager cannot be used as an LSP17 extension for LSP20 functions._

Reverts when the address of the Key Manager is being set as extensions for lsp20 functions

<br/>

### LSP6BatchExcessiveValueSent

:::note References
Expand Down

0 comments on commit 3ce471f

Please sign in to comment.