Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/clsx-2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
CJ42 authored Oct 4, 2023
2 parents b071918 + f0b7ab7 commit d4546a1
Show file tree
Hide file tree
Showing 29 changed files with 1,875 additions and 815 deletions.
4 changes: 2 additions & 2 deletions docs/contracts/_interface_ids_table.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
| **ERC725Y** | `0x629aa694` | General Data key-value store. |
| **LSP0ERC725Account** | `0x24871b3d` | Interface of the [LSP-0-ERC725Account] standard, an account based smart contract that represents an identity on-chain. |
| **LSP1UniversalReceiver** | `0x6bb56a14` | Interface of the LSP1 - Universal Receiver standard, an entry function for a contract to receive arbitrary information. |
| **LSP6KeyManager** | `0x66918867` | Interface of the LSP6 - Key Manager standard, a contract acting as a controller of an ERC725 Account using predfined permissions. |
| **LSP6KeyManager** | `0xe7424397` | Interface of the LSP6 - Key Manager standard, a contract acting as a controller of an ERC725 Account using predfined permissions. |
| **LSP7DigitalAsset** | `0x05519512` | Interface of the LSP7 - Digital Asset standard, a fungible digital asset. |
| **LSP8IdentifiableDigitalAsset** | `0x1ae9ba1f` | Interface of the LSP8 - Identifiable Digital Asset standard, a non-fungible digital asset. |
| **LSP9Vault** | `0x28af17e6` | Interface of LSP9 - Vault standard, a blockchain vault that can hold assets and interact with other smart contracts. |
Expand All @@ -15,5 +15,5 @@
| **LSP17Extendable** | `0xa918fa6b` | Module to add more functionalities to a contract using extensions. |
| **LSP17Extension** | `0xcee78b40` | Module to create a contract that can act as an extension. |
| **LSP20CallVerification** | `0x1a0eb6a5` | Implementation of a contract calling the verification functions according to LSP20 - Call Verification standard. |
| **LSP20CallVerifier** | `0x480c0ec2` | Interface for the LSP20 Call Verification standard, a set of functions intended to perform verifications on behalf of another contract. |
| **LSP20CallVerifier** | `0xc9dfc532` | Interface for the LSP20 Call Verification standard, a set of functions intended to perform verifications on behalf of another contract. |
| **LSP25ExecuteRelayCall** | `0x5ac79908` | |
75 changes: 70 additions & 5 deletions docs/contracts/contracts/LSP0ERC725Account/LSP0ERC725Account.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ _`msg.sender` is accepting ownership of contract: `address(this)`._

Transfer ownership of the contract from the current [`owner()`](#owner) to the [`pendingOwner()`](#pendingowner). Once this function is called:

- The current [`owner()`](#owner) will loose access to the functions restricted to the [`owner()`](#owner) only.
- The current [`owner()`](#owner) will lose access to the functions restricted to the [`owner()`](#owner) only.

- The [`pendingOwner()`](#pendingowner) will gain access to the functions restricted to the [`owner()`](#owner) only.

Expand Down Expand Up @@ -350,6 +350,12 @@ Generic executor function to:

:::

:::caution Warning

- The `msg.value` should not be trusted for any method called within the batch with `operationType`: `DELEGATECALL` (4).

:::

```solidity
function executeBatch(
uint256[] operationsType,
Expand Down Expand Up @@ -588,7 +594,7 @@ The address that ownership of the contract is transferred to. This address may u

:::danger

Leaves the contract without an owner. Once ownership of the contract has been renounced, any functions that are restricted to be called by the owner will be permanently inaccessible, making these functions not callable anymore and unusable.
Leaves the contract without an owner. Once ownership of the contract has been renounced, any functions that are restricted to be called by the owner or an address allowed by the owner will be permanently inaccessible, making these functions not callable anymore and unusable.

:::

Expand Down Expand Up @@ -1149,16 +1155,31 @@ Returns the extension address stored under the following data key:

### \_fallbackLSP17Extendable

:::tip Hint

This function does not forward to the extension contract the `msg.value` received by the contract that inherits `LSP17Extendable`.
If you would like to forward the `msg.value` to the extension contract, you can override the code of this internal function as follow:

```solidity
(bool success, bytes memory result) = extension.call{value: msg.value}(
abi.encodePacked(callData, msg.sender, msg.value)
);
```

:::

```solidity
function _fallbackLSP17Extendable(
bytes callData
) internal nonpayable returns (bytes);
```

Forwards the call to an extension mapped to a function selector.
Calls [`_getExtension`](#_getextension) to get the address of the extension mapped to the function selector being called on the account. If there is no extension, the `address(0)` will be returned.
Reverts if there is no extension for the function being called, except for the bytes4(0) function selector, which passes even if there is no extension for it.
If there is an extension for the function selector being called, it calls the extension with the CALL opcode, passing the `msg.data` appended with the 20 bytes of the `msg.sender` and 32 bytes of the `msg.value`
Calls [`_getExtension`](#_getextension) to get the address of the extension mapped to the function selector being
called on the account. If there is no extension, the `address(0)` will be returned.
Reverts if there is no extension for the function being called, except for the `bytes4(0)` function selector, which passes even if there is no extension for it.
If there is an extension for the function selector being called, it calls the extension with the
`CALL` opcode, passing the `msg.data` appended with the 20 bytes of the [`msg.sender`](#msg.sender) and 32 bytes of the `msg.value`.

<br/>

Expand Down Expand Up @@ -1665,6 +1686,25 @@ Reverts when the `operationTypeProvided` is none of the default operation types

<br/>

### ERC725Y_DataKeysValuesEmptyArray

:::note References

- Specification details: [**LSP-0-ERC725Account**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-0-ERC725Account.md#erc725y_datakeysvaluesemptyarray)
- Solidity implementation: [`LSP0ERC725Account.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP0ERC725Account/LSP0ERC725Account.sol)
- Error signature: `ERC725Y_DataKeysValuesEmptyArray()`
- Error hash: `0x97da5f95`

:::

```solidity
error ERC725Y_DataKeysValuesEmptyArray();
```

Reverts when one of the array parameter provided to [`setDataBatch`](#setdatabatch) function is an empty array.

<br/>

### ERC725Y_DataKeysValuesLengthMismatch

:::note References
Expand Down Expand Up @@ -1730,6 +1770,31 @@ reverts when the call to the owner fail with no revert reason

<br/>

### LSP20EOACannotVerifyCall

:::note References

- Specification details: [**LSP-0-ERC725Account**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-0-ERC725Account.md#lsp20eoacannotverifycall)
- Solidity implementation: [`LSP0ERC725Account.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP0ERC725Account/LSP0ERC725Account.sol)
- Error signature: `LSP20EOACannotVerifyCall(address)`
- Error hash: `0x0c392301`

:::

```solidity
error LSP20EOACannotVerifyCall(address logicVerifier);
```

Reverts when the logic verifier is an Externally Owned Account (EOA) that cannot return the LSP20 magic value.

#### Parameters

| Name | Type | Description |
| --------------- | :-------: | --------------------------------- |
| `logicVerifier` | `address` | The address of the logic verifier |

<br/>

### LSP20InvalidMagicValue

:::note References
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ _`msg.sender` is accepting ownership of contract: `address(this)`._

Transfer ownership of the contract from the current [`owner()`](#owner) to the [`pendingOwner()`](#pendingowner). Once this function is called:

- The current [`owner()`](#owner) will loose access to the functions restricted to the [`owner()`](#owner) only.
- The current [`owner()`](#owner) will lose access to the functions restricted to the [`owner()`](#owner) only.

- The [`pendingOwner()`](#pendingowner) will gain access to the functions restricted to the [`owner()`](#owner) only.

Expand Down
Loading

0 comments on commit d4546a1

Please sign in to comment.