From 7faa42c652433e4930ca4675b21e58141a26cf60 Mon Sep 17 00:00:00 2001 From: Maxime Date: Mon, 5 Feb 2024 15:45:21 +0100 Subject: [PATCH] build!: move lsp17 to its own package --- .../Mocks/Tokens/RequireCallbackToken.sol | 2 +- .../LSP17Extensions/Extension4337.md | 211 -- .../OnERC721ReceivedExtension.md | 154 -- .../lsp6/contracts/LSP6KeyManager.md | 1969 +++++++++++++++++ docs/libraries/lsp6/contracts/LSP6Utils.md | 254 +++ dodoc/config.ts | 4 +- package-lock.json | 832 +++---- package.json | 1 + packages/LSP17Extensions/.eslintrc.js | 4 + packages/LSP17Extensions/.solhint.json | 25 + packages/LSP17Extensions/README.md | 6 + .../contracts}/Extension4337.sol | 0 .../contracts}/OnERC721ReceivedExtension.sol | 0 packages/LSP17Extensions/hardhat.config.ts | 128 ++ packages/LSP17Extensions/package.json | 49 + packages/LSP17Extensions/tsconfig.json | 4 + remappings.txt | 1 + 17 files changed, 2901 insertions(+), 743 deletions(-) delete mode 100644 docs/contracts/LSP17Extensions/Extension4337.md delete mode 100644 docs/contracts/LSP17Extensions/OnERC721ReceivedExtension.md create mode 100644 docs/contracts/lsp6/contracts/LSP6KeyManager.md create mode 100644 docs/libraries/lsp6/contracts/LSP6Utils.md create mode 100644 packages/LSP17Extensions/.eslintrc.js create mode 100644 packages/LSP17Extensions/.solhint.json create mode 100644 packages/LSP17Extensions/README.md rename {contracts/LSP17Extensions => packages/LSP17Extensions/contracts}/Extension4337.sol (100%) rename {contracts/LSP17Extensions => packages/LSP17Extensions/contracts}/OnERC721ReceivedExtension.sol (100%) create mode 100644 packages/LSP17Extensions/hardhat.config.ts create mode 100644 packages/LSP17Extensions/package.json create mode 100644 packages/LSP17Extensions/tsconfig.json diff --git a/contracts/Mocks/Tokens/RequireCallbackToken.sol b/contracts/Mocks/Tokens/RequireCallbackToken.sol index e2d7dfaaa..6581adcfb 100644 --- a/contracts/Mocks/Tokens/RequireCallbackToken.sol +++ b/contracts/Mocks/Tokens/RequireCallbackToken.sol @@ -4,7 +4,7 @@ pragma solidity ^0.8.4; import { OnERC721ReceivedExtension -} from "../../LSP17Extensions/OnERC721ReceivedExtension.sol"; +} from "lsp17/contracts/OnERC721ReceivedExtension.sol"; /** * @dev This contract is used only for testing purposes diff --git a/docs/contracts/LSP17Extensions/Extension4337.md b/docs/contracts/LSP17Extensions/Extension4337.md deleted file mode 100644 index c7632c1f7..000000000 --- a/docs/contracts/LSP17Extensions/Extension4337.md +++ /dev/null @@ -1,211 +0,0 @@ - - - -# Extension4337 - -:::info Standard Specifications - -[`LSP-17-Extensions`](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-17-Extensions.md) - -::: -:::info Solidity implementation - -[`Extension4337.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP17Extensions/Extension4337.sol) - -::: - -## Public Methods - -Public methods are accessible externally from users, allowing interaction with this function from dApps or other smart contracts. -When marked as 'public', a method can be called both externally and internally, on the other hand, when marked as 'external', a method can only be called externally. - -### constructor - -:::note References - -- Specification details: [**LSP-17-Extensions**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-17-Extensions.md#constructor) -- Solidity implementation: [`Extension4337.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP17Extensions/Extension4337.sol) - -::: - -```solidity -constructor(address entryPoint_); -``` - -#### Parameters - -| Name | Type | Description | -| ------------- | :-------: | ----------- | -| `entryPoint_` | `address` | - | - -
- -### VERSION - -:::note References - -- Specification details: [**LSP-17-Extensions**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-17-Extensions.md#version) -- Solidity implementation: [`Extension4337.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP17Extensions/Extension4337.sol) -- Function signature: `VERSION()` -- Function selector: `0xffa1ad74` - -::: - -```solidity -function VERSION() external view returns (string); -``` - -_Contract version._ - -#### Returns - -| Name | Type | Description | -| ---- | :------: | ----------- | -| `0` | `string` | - | - -
- -### entryPoint - -:::note References - -- Specification details: [**LSP-17-Extensions**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-17-Extensions.md#entrypoint) -- Solidity implementation: [`Extension4337.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP17Extensions/Extension4337.sol) -- Function signature: `entryPoint()` -- Function selector: `0xb0d691fe` - -::: - -```solidity -function entryPoint() external view returns (address); -``` - -Get the address of the Entry Point contract that will execute the user operation. - -#### Returns - -| Name | Type | Description | -| ---- | :-------: | -------------------------------------- | -| `0` | `address` | The address of the EntryPoint contract | - -
- -### supportsInterface - -:::note References - -- Specification details: [**LSP-17-Extensions**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-17-Extensions.md#supportsinterface) -- Solidity implementation: [`Extension4337.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP17Extensions/Extension4337.sol) -- Function signature: `supportsInterface(bytes4)` -- Function selector: `0x01ffc9a7` - -::: - -```solidity -function supportsInterface(bytes4 interfaceId) external view returns (bool); -``` - -See [`IERC165-supportsInterface`](#ierc165-supportsinterface). - -#### Parameters - -| Name | Type | Description | -| ------------- | :------: | ----------- | -| `interfaceId` | `bytes4` | - | - -#### Returns - -| Name | Type | Description | -| ---- | :----: | ----------- | -| `0` | `bool` | - | - -
- -### validateUserOp - -:::note References - -- Specification details: [**LSP-17-Extensions**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-17-Extensions.md#validateuserop) -- Solidity implementation: [`Extension4337.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP17Extensions/Extension4337.sol) -- Function signature: `validateUserOp(UserOperation,bytes32,uint256)` -- Function selector: `0xe86fc51e` - -::: - -:::info - -In addition to the logic of the `IAccount` interface from 4337, the permissions of the address that signed the user operation are checked to ensure that it has the permission `_4337_PERMISSION`. - -::: - -```solidity -function validateUserOp( - UserOperation userOp, - bytes32 userOpHash, - uint256 -) external nonpayable returns (uint256); -``` - -Validate user's signature and nonce. The entryPoint will make the call to the recipient only if this validation call returns successfully. Signature failure should be reported by returning `SIG_VALIDATION_FAILED` (`1`). This allows making a "simulation call" without a valid signature. Other failures (_e.g. nonce mismatch, or invalid signature format_) should still revert to signal failure. The third parameter (not mentioned but `missingAccountFunds` from the `IAccount` interface) describes the missing funds on the account's deposit in the entrypoint. This is the minimum amount to transfer to the sender(entryPoint) to be able to make the call. The excess is left as a deposit in the entrypoint, for future calls. Can be withdrawn anytime using "entryPoint.withdrawTo()" In case there is a paymaster in the request (or the current deposit is high enough), this value will be zero. - -
- -**Requirements:** - -- caller MUST be the **entrypoint contract**. -- the signature and nonce must be valid. - -
- -#### Parameters - -| Name | Type | Description | -| ------------ | :-------------: | ----------- | -| `userOp` | `UserOperation` | - | -| `userOpHash` | `bytes32` | - | -| `_2` | `uint256` | - | - -#### Returns - -| Name | Type | Description | -| ---- | :-------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `0` | `uint256` | validationData packaged ValidationData structure. use `_packValidationData` and `_unpackValidationData` to encode and decode - `<20-byte>` sigAuthorizer - 0 for valid signature, 1 to mark signature failure, otherwise, an address of an "authorizer" contract. - `<6-byte>` validUntil - last timestamp this operation is valid. 0 for "indefinite" - `<6-byte>` validAfter - first timestamp this operation is valid If an account doesn't use time-range, it is enough to return SIG_VALIDATION_FAILED value (1) for signature failure. Note that the validation code cannot use block.timestamp (or block.number) directly. | - -
- -## Internal Methods - -Any method labeled as `internal` serves as utility function within the contract. They can be used when writing solidity contracts that inherit from this contract. These methods can be extended or modified by overriding their internal behavior to suit specific needs. - -Internal functions cannot be called externally, whether from other smart contracts, dApp interfaces, or backend services. Their restricted accessibility ensures that they remain exclusively available within the context of the current contract, promoting controlled and encapsulated usage of these internal utilities. - -### \_extendableMsgData - -```solidity -function _extendableMsgData() internal view returns (bytes); -``` - -Returns the original `msg.data` passed to the extendable contract -without the appended `msg.sender` and `msg.value`. - -
- -### \_extendableMsgSender - -```solidity -function _extendableMsgSender() internal view returns (address); -``` - -Returns the original `msg.sender` calling the extendable contract. - -
- -### \_extendableMsgValue - -```solidity -function _extendableMsgValue() internal view returns (uint256); -``` - -Returns the original `msg.value` sent to the extendable contract. - -
diff --git a/docs/contracts/LSP17Extensions/OnERC721ReceivedExtension.md b/docs/contracts/LSP17Extensions/OnERC721ReceivedExtension.md deleted file mode 100644 index bd763aff9..000000000 --- a/docs/contracts/LSP17Extensions/OnERC721ReceivedExtension.md +++ /dev/null @@ -1,154 +0,0 @@ - - - -# OnERC721ReceivedExtension - -:::info Standard Specifications - -[`LSP-17-Extensions`](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-17-Extensions.md) - -::: -:::info Solidity implementation - -[`OnERC721ReceivedExtension.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP17Extensions/OnERC721ReceivedExtension.sol) - -::: - -LSP17 Extension that can be attached to a LSP17Extendable contract to allow it to receive ERC721 tokens via `safeTransferFrom`. - -## Public Methods - -Public methods are accessible externally from users, allowing interaction with this function from dApps or other smart contracts. -When marked as 'public', a method can be called both externally and internally, on the other hand, when marked as 'external', a method can only be called externally. - -### VERSION - -:::note References - -- Specification details: [**LSP-17-Extensions**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-17-Extensions.md#version) -- Solidity implementation: [`OnERC721ReceivedExtension.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP17Extensions/OnERC721ReceivedExtension.sol) -- Function signature: `VERSION()` -- Function selector: `0xffa1ad74` - -::: - -```solidity -function VERSION() external view returns (string); -``` - -_Contract version._ - -#### Returns - -| Name | Type | Description | -| ---- | :------: | ----------- | -| `0` | `string` | - | - -
- -### onERC721Received - -:::note References - -- Specification details: [**LSP-17-Extensions**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-17-Extensions.md#onerc721received) -- Solidity implementation: [`OnERC721ReceivedExtension.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP17Extensions/OnERC721ReceivedExtension.sol) -- Function signature: `onERC721Received(address,address,uint256,bytes)` -- Function selector: `0x150b7a02` - -::: - -```solidity -function onERC721Received( - address, - address, - uint256, - bytes -) external nonpayable returns (bytes4); -``` - -See [`IERC721Receiver-onERC721Received`](#ierc721receiver-onerc721received). Always returns `IERC721Receiver.onERC721Received.selector`. - -#### Parameters - -| Name | Type | Description | -| ---- | :-------: | ----------- | -| `_0` | `address` | - | -| `_1` | `address` | - | -| `_2` | `uint256` | - | -| `_3` | `bytes` | - | - -#### Returns - -| Name | Type | Description | -| ---- | :------: | ----------- | -| `0` | `bytes4` | - | - -
- -### supportsInterface - -:::note References - -- Specification details: [**LSP-17-Extensions**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-17-Extensions.md#supportsinterface) -- Solidity implementation: [`OnERC721ReceivedExtension.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP17Extensions/OnERC721ReceivedExtension.sol) -- Function signature: `supportsInterface(bytes4)` -- Function selector: `0x01ffc9a7` - -::: - -```solidity -function supportsInterface(bytes4 interfaceId) external view returns (bool); -``` - -See [`IERC165-supportsInterface`](#ierc165-supportsinterface). - -#### Parameters - -| Name | Type | Description | -| ------------- | :------: | ----------- | -| `interfaceId` | `bytes4` | - | - -#### Returns - -| Name | Type | Description | -| ---- | :----: | ----------- | -| `0` | `bool` | - | - -
- -## Internal Methods - -Any method labeled as `internal` serves as utility function within the contract. They can be used when writing solidity contracts that inherit from this contract. These methods can be extended or modified by overriding their internal behavior to suit specific needs. - -Internal functions cannot be called externally, whether from other smart contracts, dApp interfaces, or backend services. Their restricted accessibility ensures that they remain exclusively available within the context of the current contract, promoting controlled and encapsulated usage of these internal utilities. - -### \_extendableMsgData - -```solidity -function _extendableMsgData() internal view returns (bytes); -``` - -Returns the original `msg.data` passed to the extendable contract -without the appended `msg.sender` and `msg.value`. - -
- -### \_extendableMsgSender - -```solidity -function _extendableMsgSender() internal view returns (address); -``` - -Returns the original `msg.sender` calling the extendable contract. - -
- -### \_extendableMsgValue - -```solidity -function _extendableMsgValue() internal view returns (uint256); -``` - -Returns the original `msg.value` sent to the extendable contract. - -
diff --git a/docs/contracts/lsp6/contracts/LSP6KeyManager.md b/docs/contracts/lsp6/contracts/LSP6KeyManager.md new file mode 100644 index 000000000..2075cdebe --- /dev/null +++ b/docs/contracts/lsp6/contracts/LSP6KeyManager.md @@ -0,0 +1,1969 @@ + + + +# LSP6KeyManager + +:::info Standard Specifications + +[`LSP-6-KeyManager.sol`](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.sol.md) + +::: +:::info Solidity implementation + +[`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/lsp6/contracts/LSP6KeyManager.sol) + +::: + +> Implementation of a contract acting as a controller of an ERC725 Account, using permissions stored in the ERC725Y storage. + +All the permissions can be set on the ERC725 Account using `setData(bytes32,bytes)` or `setData(bytes32[],bytes[])`. + +## Public Methods + +Public methods are accessible externally from users, allowing interaction with this function from dApps or other smart contracts. +When marked as 'public', a method can be called both externally and internally, on the other hand, when marked as 'external', a method can only be called externally. + +### constructor + +:::note References + +- Specification details: [**LSP-6-KeyManager.sol**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.sol.md#constructor) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/lsp6/contracts/LSP6KeyManager.sol) + +::: + +```solidity +constructor(address target_); +``` + +_Deploying a LSP6KeyManager linked to the contract at address `target_`._ + +Deploy a Key Manager and set the `target_` address in the contract storage, making this Key Manager linked to this `target_` contract. + +#### Parameters + +| Name | Type | Description | +| --------- | :-------: | ------------------------------------------------------------------------ | +| `target_` | `address` | The address of the contract to control and forward calldata payloads to. | + +
+ +### VERSION + +:::note References + +- Specification details: [**LSP-6-KeyManager.sol**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.sol.md#version) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/lsp6/contracts/LSP6KeyManager.sol) +- Function signature: `VERSION()` +- Function selector: `0xffa1ad74` + +::: + +```solidity +function VERSION() external view returns (string); +``` + +_Contract version._ + +#### Returns + +| Name | Type | Description | +| ---- | :------: | ----------- | +| `0` | `string` | - | + +
+ +### execute + +:::note References + +- Specification details: [**LSP-6-KeyManager.sol**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.sol.md#execute) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/lsp6/contracts/LSP6KeyManager.sol) +- Function signature: `execute(bytes)` +- Function selector: `0x09c5eabe` + +::: + +```solidity +function execute(bytes payload) external payable returns (bytes); +``` + +_Executing the following payload on the linked contract: `payload`_ + +Execute A `payload` on the linked [`target`](#target) contract after having verified the permissions associated with the function being run. The `payload` MUST be a valid abi-encoded function call of one of the functions present in the linked [`target`](#target), otherwise the call will fail. The linked [`target`](#target) will return some data on successful execution, or revert on failure. + +
+ +**Emitted events:** + +- [`PermissionsVerified`](#permissionsverified) event when the permissions related to `payload` have been verified successfully. + +
+ +#### Parameters + +| Name | Type | Description | +| --------- | :-----: | --------------------------------------------------------------------------- | +| `payload` | `bytes` | The abi-encoded function call to execute on the linked [`target`](#target). | + +#### Returns + +| Name | Type | Description | +| ---- | :-----: | --------------------------------------------------------------------------------------- | +| `0` | `bytes` | The abi-decoded data returned by the function called on the linked [`target`](#target). | + +
+ +### executeBatch + +:::note References + +- Specification details: [**LSP-6-KeyManager.sol**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.sol.md#executebatch) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/lsp6/contracts/LSP6KeyManager.sol) +- Function signature: `executeBatch(uint256[],bytes[])` +- Function selector: `0xbf0176ff` + +::: + +```solidity +function executeBatch( + uint256[] values, + bytes[] payloads +) external payable returns (bytes[]); +``` + +\*Executing the following batch of payloads and sensind on the linked contract. + +- payloads: `payloads` + +- values transferred for each payload: `values`\* + +Same as [`execute`](#execute) but execute a batch of payloads (abi-encoded function calls) in a single transaction. + +
+ +**Emitted events:** + +- [`PermissionsVerified`](#permissionsverified) event for each permissions related to each `payload` that have been verified successfully. + +
+ +#### Parameters + +| Name | Type | Description | +| ---------- | :---------: | ------------------------------------------------------------------------------------------------- | +| `values` | `uint256[]` | An array of amount of native tokens to be transferred for each `payload`. | +| `payloads` | `bytes[]` | An array of abi-encoded function calls to execute successively on the linked [`target`](#target). | + +#### Returns + +| Name | Type | Description | +| ---- | :-------: | ------------------------------------------------------------------------------------------------ | +| `0` | `bytes[]` | An array of abi-decoded data returned by the functions called on the linked [`target`](#target). | + +
+ +### executeRelayCall + +:::note References + +- Specification details: [**LSP-6-KeyManager.sol**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.sol.md#executerelaycall) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/lsp6/contracts/LSP6KeyManager.sol) +- Function signature: `executeRelayCall(bytes,uint256,uint256,bytes)` +- Function selector: `0x4c8a4e74` + +::: + +:::tip Hint + +If you are looking to learn how to sign and execute relay transactions via the Key Manager, see our Javascript step by step guide [_"Execute Relay Transactions"_](../../../learn/expert-guides/key-manager/execute-relay-transactions.md). See the LSP6 Standard page for more details on how to [generate a valid signature for Execute Relay Call](../../../standards/universal-profile/lsp6-key-manager.md#how-to-sign-relay-transactions). + +::: + +```solidity +function executeRelayCall( + bytes signature, + uint256 nonce, + uint256 validityTimestamps, + bytes payload +) external payable returns (bytes); +``` + +_Executing the following payload given the nonce `nonce` and signature `signature`. Payload: `payload`_ + +Allows any address (executor) to execute a payload (= abi-encoded function call), given they have a valid signature from a signer address and a valid `nonce` for this signer. The signature MUST be generated according to the signature format defined by the LSP25 standard. The signer that generated the `signature` MUST be a controller with some permissions on the linked [`target`](#target). The `payload` will be executed on the [`target`](#target) contract once the LSP25 signature and the permissions of the signer have been verified. + +
+ +**Emitted events:** + +- [`PermissionsVerified`](#permissionsverified) event when the permissions related to `payload` have been verified successfully. + +
+ +#### Parameters + +| Name | Type | Description | +| -------------------- | :-------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `signature` | `bytes` | A 65 bytes long signature for a meta transaction according to LSP25. | +| `nonce` | `uint256` | The nonce of the address that signed the calldata (in a specific `_channel`), obtained via [`getNonce`](#getnonce). Used to prevent replay attack. | +| `validityTimestamps` | `uint256` | Two `uint128` timestamps concatenated together that describes when the relay transaction is valid "from" (left `uint128`) and "until" as a deadline (right `uint128`). | +| `payload` | `bytes` | The abi-encoded function call to execute. | + +#### Returns + +| Name | Type | Description | +| ---- | :-----: | ------------------------------------------------- | +| `0` | `bytes` | The data being returned by the function executed. | + +
+ +### executeRelayCallBatch + +:::note References + +- Specification details: [**LSP-6-KeyManager.sol**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.sol.md#executerelaycallbatch) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/lsp6/contracts/LSP6KeyManager.sol) +- Function signature: `executeRelayCallBatch(bytes[],uint256[],uint256[],uint256[],bytes[])` +- Function selector: `0xa20856a5` + +::: + +```solidity +function executeRelayCallBatch( + bytes[] signatures, + uint256[] nonces, + uint256[] validityTimestamps, + uint256[] values, + bytes[] payloads +) external payable returns (bytes[]); +``` + +_Executing a batch of relay calls (= meta-transactions)._ + +Same as [`executeRelayCall`](#executerelaycall) but execute a batch of signed calldata payloads (abi-encoded function calls) in a single transaction. The `signatures` can be from multiple controllers, not necessarely the same controller, as long as each of these controllers that signed have the right permissions related to the calldata `payload` they signed. + +
+ +**Requirements:** + +- the length of `signatures`, `nonces`, `validityTimestamps`, `values` and `payloads` MUST be the same. +- the value sent to this function (`msg.value`) MUST be equal to the sum of all `values` in the batch. There should not be any excess value sent to this function. + +
+ +#### Parameters + +| Name | Type | Description | +| -------------------- | :---------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `signatures` | `bytes[]` | An array of 65 bytes long signatures for meta transactions according to LSP25. | +| `nonces` | `uint256[]` | An array of nonces of the addresses that signed the calldata payloads (in specific channels). Obtained via [`getNonce`](#getnonce). Used to prevent replay attack. | +| `validityTimestamps` | `uint256[]` | An array of two `uint128` concatenated timestamps that describe when the relay transaction is valid "from" (left `uint128`) and "until" (right `uint128`). | +| `values` | `uint256[]` | An array of amount of native tokens to be transferred for each calldata `payload`. | +| `payloads` | `bytes[]` | An array of abi-encoded function calls to be executed successively. | + +#### Returns + +| Name | Type | Description | +| ---- | :-------: | ---------------------------------------------------------------- | +| `0` | `bytes[]` | An array of abi-decoded data returned by the functions executed. | + +
+ +### getNonce + +:::note References + +- Specification details: [**LSP-6-KeyManager.sol**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.sol.md#getnonce) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/lsp6/contracts/LSP6KeyManager.sol) +- Function signature: `getNonce(address,uint128)` +- Function selector: `0xb44581d9` + +::: + +:::tip Hint + +A signer can choose its channel number arbitrarily. The recommended practice is to: + +- use `channelId == 0` for transactions for which the ordering of execution matters.abi _Example: you have two transactions A and B, and transaction A must be executed first and complete successfully before transaction B should be executed)._ +- use any other `channelId` number for transactions that you want to be order independant (out-of-order execution, execution _"in parallel"_). \_Example: you have two transactions A and B. You want transaction B to be executed a) without having to wait for transaction A to complete, or b) regardless if transaction A completed successfully or not. + +::: + +```solidity +function getNonce( + address from, + uint128 channelId +) external view returns (uint256); +``` + +_Reading the latest nonce of address `from` in the channel ID `channelId`._ + +Get the nonce for a specific `from` address that can be used for signing relay transactions via [`executeRelayCall`](#executerelaycall). + +#### Parameters + +| Name | Type | Description | +| ----------- | :-------: | -------------------------------------------------------------------------- | +| `from` | `address` | The address of the signer of the transaction. | +| `channelId` | `uint128` | The channel id that the signer wants to use for executing the transaction. | + +#### Returns + +| Name | Type | Description | +| ---- | :-------: | -------------------------------------------- | +| `0` | `uint256` | The current nonce on a specific `channelId`. | + +
+ +### isValidSignature + +:::note References + +- Specification details: [**LSP-6-KeyManager.sol**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.sol.md#isvalidsignature) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/lsp6/contracts/LSP6KeyManager.sol) +- Function signature: `isValidSignature(bytes32,bytes)` +- Function selector: `0x1626ba7e` + +::: + +:::caution Warning + +This function does not enforce by default the inclusion of the address of this contract in the signature digest. It is recommended that protocols or applications using this contract include the targeted address (= this contract) in the data to sign. To ensure that a signature is valid for a specific LSP6KeyManager and prevent signatures from the same EOA to be replayed across different LSP6KeyManager. + +::: + +```solidity +function isValidSignature( + bytes32 dataHash, + bytes signature +) external view returns (bytes4 returnedStatus); +``` + +Checks if a signature was signed by a controller that has the permission `SIGN`. If the signer is a controller with the permission `SIGN`, it will return the ERC1271 success value. + +#### Parameters + +| Name | Type | Description | +| ----------- | :-------: | ------------------------------------------- | +| `dataHash` | `bytes32` | - | +| `signature` | `bytes` | Signature byte array associated with \_data | + +#### Returns + +| Name | Type | Description | +| ---------------- | :------: | ---------------------------------------------------- | +| `returnedStatus` | `bytes4` | `0x1626ba7e` on success, or `0xffffffff` on failure. | + +
+ +### lsp20VerifyCall + +:::note References + +- Specification details: [**LSP-6-KeyManager.sol**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.sol.md#lsp20verifycall) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/lsp6/contracts/LSP6KeyManager.sol) +- Function signature: `lsp20VerifyCall(address,address,address,uint256,bytes)` +- Function selector: `0xde928f14` + +::: + +:::tip Hint + +This function can call by any other address than the [`target`](#`target`). This allows to verify permissions in a _"read-only"_ manner. Anyone can call this function to verify if the `caller` has the right permissions to perform the abi-encoded function call `data` on the [`target`](#`target`) contract (while sending `msgValue` alongside the call). If the permissions have been verified successfully and `caller` is authorized, one of the following two LSP20 success value will be returned: + +- `0x1a238000`: LSP20 success value **without** post verification (last byte is `0x00`). +- `0x1a238001`: LSP20 success value **with** post-verification (last byte is `0x01`). + +::: + +```solidity +function lsp20VerifyCall( + address, + address targetContract, + address caller, + uint256 msgValue, + bytes callData +) external nonpayable returns (bytes4); +``` + +#### Parameters + +| Name | Type | Description | +| ---------------- | :-------: | ------------------------------------------------------------- | +| `_0` | `address` | - | +| `targetContract` | `address` | - | +| `caller` | `address` | The address who called the function on the `target` contract. | +| `msgValue` | `uint256` | - | +| `callData` | `bytes` | The calldata sent by the caller to the msg.sender | + +#### Returns + +| Name | Type | Description | +| ---- | :------: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `0` | `bytes4` | MUST return the first 3 bytes of `lsp20VerifyCall(address,uint256,bytes)` function selector if the call to the function is allowed, concatened with a byte that determines if the lsp20VerifyCallResult function should be called after the original function call. The byte that invoke the lsp20VerifyCallResult function is strictly `0x01`. | + +
+ +### lsp20VerifyCallResult + +:::note References + +- Specification details: [**LSP-6-KeyManager.sol**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.sol.md#lsp20verifycallresult) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/lsp6/contracts/LSP6KeyManager.sol) +- Function signature: `lsp20VerifyCallResult(bytes32,bytes)` +- Function selector: `0xd3fc45d3` + +::: + +```solidity +function lsp20VerifyCallResult( + bytes32, + bytes +) external nonpayable returns (bytes4); +``` + +#### Parameters + +| Name | Type | Description | +| ---- | :-------: | ----------- | +| `_0` | `bytes32` | - | +| `_1` | `bytes` | - | + +#### Returns + +| Name | Type | Description | +| ---- | :------: | ---------------------------------------------------------------------------------------------- | +| `0` | `bytes4` | MUST return the lsp20VerifyCallResult function selector if the call to the function is allowed | + +
+ +### supportsInterface + +:::note References + +- Specification details: [**LSP-6-KeyManager.sol**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.sol.md#supportsinterface) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/lsp6/contracts/LSP6KeyManager.sol) +- Function signature: `supportsInterface(bytes4)` +- Function selector: `0x01ffc9a7` + +::: + +```solidity +function supportsInterface(bytes4 interfaceId) external view returns (bool); +``` + +See [`IERC165-supportsInterface`](#ierc165-supportsinterface). + +#### Parameters + +| Name | Type | Description | +| ------------- | :------: | ----------- | +| `interfaceId` | `bytes4` | - | + +#### Returns + +| Name | Type | Description | +| ---- | :----: | ----------- | +| `0` | `bool` | - | + +
+ +### target + +:::note References + +- Specification details: [**LSP-6-KeyManager.sol**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.sol.md#target) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/lsp6/contracts/LSP6KeyManager.sol) +- Function signature: `target()` +- Function selector: `0xd4b83992` + +::: + +```solidity +function target() external view returns (address); +``` + +Get The address of the contract linked to this Key Manager. + +#### Returns + +| Name | Type | Description | +| ---- | :-------: | ---------------------------------- | +| `0` | `address` | The address of the linked contract | + +
+ +## Internal Methods + +Any method labeled as `internal` serves as utility function within the contract. They can be used when writing solidity contracts that inherit from this contract. These methods can be extended or modified by overriding their internal behavior to suit specific needs. + +Internal functions cannot be called externally, whether from other smart contracts, dApp interfaces, or backend services. Their restricted accessibility ensures that they remain exclusively available within the context of the current contract, promoting controlled and encapsulated usage of these internal utilities. + +### \_verifyCanSetData + +```solidity +function _verifyCanSetData( + address controlledContract, + address controllerAddress, + bytes32 controllerPermissions, + bytes32 inputDataKey, + bytes inputDataValue +) internal view; +``` + +verify if the `controllerAddress` has the permissions required to set a data key on the ERC725Y storage of the `controlledContract`. + +#### Parameters + +| Name | Type | Description | +| ----------------------- | :-------: | -------------------------------------------------------------- | +| `controlledContract` | `address` | the address of the ERC725Y contract where the data key is set. | +| `controllerAddress` | `address` | the address of the controller who wants to set the data key. | +| `controllerPermissions` | `bytes32` | the permissions of the controller address. | +| `inputDataKey` | `bytes32` | the data key to set on the `controlledContract`. | +| `inputDataValue` | `bytes` | the data value to set for the `inputDataKey`. | + +
+ +### \_verifyCanSetData + +```solidity +function _verifyCanSetData( + address controlledContract, + address controller, + bytes32 permissions, + bytes32[] inputDataKeys, + bytes[] inputDataValues +) internal view; +``` + +verify if the `controllerAddress` has the permissions required to set an array of data keys on the ERC725Y storage of the `controlledContract`. + +#### Parameters + +| Name | Type | Description | +| -------------------- | :---------: | -------------------------------------------------------------- | +| `controlledContract` | `address` | the address of the ERC725Y contract where the data key is set. | +| `controller` | `address` | the address of the controller who wants to set the data key. | +| `permissions` | `bytes32` | the permissions of the controller address. | +| `inputDataKeys` | `bytes32[]` | an array of data keys to set on the `controlledContract`. | +| `inputDataValues` | `bytes[]` | an array of data values to set for the `inputDataKeys`. | + +
+ +### \_getPermissionRequiredToSetDataKey + +```solidity +function _getPermissionRequiredToSetDataKey( + address controlledContract, + bytes32 controllerPermissions, + bytes32 inputDataKey, + bytes inputDataValue +) internal view returns (bytes32); +``` + +retrieve the permission required based on the data key to be set on the `controlledContract`. + +#### Parameters + +| Name | Type | Description | +| ----------------------- | :-------: | ----------------------------------------------------------------------------------------------------------------------- | +| `controlledContract` | `address` | the address of the ERC725Y contract where the data key is verified. | +| `controllerPermissions` | `bytes32` | - | +| `inputDataKey` | `bytes32` | the data key to set on the `controlledContract`. Can be related to LSP6 Permissions, LSP1 Delegate or LSP17 Extensions. | +| `inputDataValue` | `bytes` | the data value to set for the `inputDataKey`. | + +#### Returns + +| Name | Type | Description | +| ---- | :-------: | ------------------------------------------------------------------------------ | +| `0` | `bytes32` | the permission required to set the `inputDataKey` on the `controlledContract`. | + +
+ +### \_getPermissionToSetPermissionsArray + +```solidity +function _getPermissionToSetPermissionsArray( + address controlledContract, + bytes32 inputDataKey, + bytes inputDataValue, + bool hasBothAddControllerAndEditPermissions +) internal view returns (bytes32); +``` + +retrieve the permission required to update the `AddressPermissions[]` array data key defined in LSP6. + +#### Parameters + +| Name | Type | Description | +| ---------------------------------------- | :-------: | ----------------------------------------------------------------------------------------- | +| `controlledContract` | `address` | the address of the ERC725Y contract where the data key is verified. | +| `inputDataKey` | `bytes32` | either `AddressPermissions[]` (array length) or `AddressPermissions[index]` (array index) | +| `inputDataValue` | `bytes` | the updated value for the `inputDataKey`. MUST be: | +| `hasBothAddControllerAndEditPermissions` | `bool` | - | + +#### Returns + +| Name | Type | Description | +| ---- | :-------: | --------------------------------- | +| `0` | `bytes32` | either ADD or CHANGE PERMISSIONS. | + +
+ +### \_getPermissionToSetControllerPermissions + +```solidity +function _getPermissionToSetControllerPermissions( + address controlledContract, + bytes32 inputPermissionDataKey +) internal view returns (bytes32); +``` + +retrieve the permission required to set permissions for a controller address. + +#### Parameters + +| Name | Type | Description | +| ------------------------ | :-------: | ------------------------------------------------------------------- | +| `controlledContract` | `address` | the address of the ERC725Y contract where the data key is verified. | +| `inputPermissionDataKey` | `bytes32` | `AddressPermissions:Permissions:`. | + +#### Returns + +| Name | Type | Description | +| ---- | :-------: | --------------------------------- | +| `0` | `bytes32` | either ADD or CHANGE PERMISSIONS. | + +
+ +### \_getPermissionToSetAllowedCalls + +```solidity +function _getPermissionToSetAllowedCalls( + address controlledContract, + bytes32 dataKey, + bytes dataValue, + bool hasBothAddControllerAndEditPermissions +) internal view returns (bytes32); +``` + +Retrieve the permission required to set some AllowedCalls for a controller. + +#### Parameters + +| Name | Type | Description | +| ---------------------------------------- | :-------: | ------------------------------------------------------------------------------------------- | +| `controlledContract` | `address` | The address of the ERC725Y contract from which to fetch the value of `dataKey`. | +| `dataKey` | `bytes32` | A data key ion the format `AddressPermissions:AllowedCalls:`. | +| `dataValue` | `bytes` | The updated value for the `dataKey`. MUST be a bytes32[CompactBytesArray] of Allowed Calls. | +| `hasBothAddControllerAndEditPermissions` | `bool` | - | + +#### Returns + +| Name | Type | Description | +| ---- | :-------: | ------------------------------- | +| `0` | `bytes32` | Either ADD or EDIT PERMISSIONS. | + +
+ +### \_getPermissionToSetAllowedERC725YDataKeys + +```solidity +function _getPermissionToSetAllowedERC725YDataKeys( + address controlledContract, + bytes32 dataKey, + bytes dataValue, + bool hasBothAddControllerAndEditPermissions +) internal view returns (bytes32); +``` + +Retrieve the permission required to set some Allowed ERC725Y Data Keys for a controller. + +#### Parameters + +| Name | Type | Description | +| ---------------------------------------- | :-------: | ----------------------------------------------------------------------------------------------------- | +| `controlledContract` | `address` | the address of the ERC725Y contract from which to fetch the value of `dataKey`. | +| `dataKey` | `bytes32` | A data key in the format `AddressPermissions:AllowedERC725YDataKeys:`. | +| `dataValue` | `bytes` | The updated value for the `dataKey`. MUST be a bytes[CompactBytesArray] of Allowed ERC725Y Data Keys. | +| `hasBothAddControllerAndEditPermissions` | `bool` | - | + +#### Returns + +| Name | Type | Description | +| ---- | :-------: | ------------------------------- | +| `0` | `bytes32` | Either ADD or EDIT PERMISSIONS. | + +
+ +### \_getPermissionToSetLSP1Delegate + +```solidity +function _getPermissionToSetLSP1Delegate( + address controlledContract, + bytes32 lsp1DelegateDataKey +) internal view returns (bytes32); +``` + +retrieve the permission required to either add or change the address +of a LSP1 Universal Receiver Delegate stored under a specific LSP1 data key. + +#### Parameters + +| Name | Type | Description | +| --------------------- | :-------: | -------------------------------------------------------------------- | +| `controlledContract` | `address` | the address of the ERC725Y contract where the data key is verified. | +| `lsp1DelegateDataKey` | `bytes32` | either the data key for the default `LSP1UniversalReceiverDelegate`, | + +#### Returns + +| Name | Type | Description | +| ---- | :-------: | ----------------------------------------------- | +| `0` | `bytes32` | either ADD or CHANGE UNIVERSALRECEIVERDELEGATE. | + +
+ +### \_getPermissionToSetLSP17Extension + +```solidity +function _getPermissionToSetLSP17Extension( + address controlledContract, + bytes32 lsp17ExtensionDataKey +) internal view returns (bytes32); +``` + +Verify if `controller` has the required permissions to either add or change the address +of an LSP0 Extension stored under a specific LSP17Extension data key + +#### Parameters + +| Name | Type | Description | +| ----------------------- | :-------: | ------------------------------------------------------------------- | +| `controlledContract` | `address` | the address of the ERC725Y contract where the data key is verified. | +| `lsp17ExtensionDataKey` | `bytes32` | the dataKey to set with `_LSP17_EXTENSION_PREFIX` as prefix. | + +
+ +### \_verifyAllowedERC725YSingleKey + +```solidity +function _verifyAllowedERC725YSingleKey( + address controllerAddress, + bytes32 inputDataKey, + bytes allowedERC725YDataKeysCompacted +) internal pure; +``` + +Verify if the `inputKey` is present in the list of `allowedERC725KeysCompacted` for the `controllerAddress`. + +#### Parameters + +| Name | Type | Description | +| --------------------------------- | :-------: | ----------------------------------------------------------------------------------------- | +| `controllerAddress` | `address` | the address of the controller. | +| `inputDataKey` | `bytes32` | the data key to verify against the allowed ERC725Y Data Keys for the `controllerAddress`. | +| `allowedERC725YDataKeysCompacted` | `bytes` | a CompactBytesArray of allowed ERC725Y Data Keys for the `controllerAddress`. | + +
+ +### \_verifyAllowedERC725YDataKeys + +```solidity +function _verifyAllowedERC725YDataKeys( + address controllerAddress, + bytes32[] inputDataKeys, + bytes allowedERC725YDataKeysCompacted, + bool[] validatedInputKeysList, + uint256 allowedDataKeysFound +) internal pure; +``` + +Verify if all the `inputDataKeys` are present in the list of `allowedERC725KeysCompacted` of the `controllerAddress`. + +#### Parameters + +| Name | Type | Description | +| --------------------------------- | :---------: | ---------------------------------------------------------------------------------------------------------------------------- | +| `controllerAddress` | `address` | the address of the controller. | +| `inputDataKeys` | `bytes32[]` | the data keys to verify against the allowed ERC725Y Data Keys of the `controllerAddress`. | +| `allowedERC725YDataKeysCompacted` | `bytes` | a CompactBytesArray of allowed ERC725Y Data Keys of the `controllerAddress`. | +| `validatedInputKeysList` | `bool[]` | an array of booleans to store the result of the verification of each data keys checked. | +| `allowedDataKeysFound` | `uint256` | the number of data keys that were previously validated for other permissions like `ADDCONTROLLER`, `EDITPERMISSIONS`, etc... | + +
+ +### \_requirePermissions + +```solidity +function _requirePermissions( + address controller, + bytes32 addressPermissions, + bytes32 permissionRequired +) internal pure; +``` + +Check if the `controller` has the `permissionRequired` among its permission listed in `controllerPermissions` +If not, this function will revert with the error `NotAuthorised` and the name of the permission missing by the controller. + +#### Parameters + +| Name | Type | Description | +| -------------------- | :-------: | --------------------------------- | +| `controller` | `address` | the caller address | +| `addressPermissions` | `bytes32` | the caller's permissions BitArray | +| `permissionRequired` | `bytes32` | the required permission | + +
+ +### \_verifyCanExecute + +```solidity +function _verifyCanExecute( + address controlledContract, + address controller, + bytes32 permissions, + uint256 operationType, + address to, + uint256 value, + bytes data +) internal view; +``` + +verify if `controllerAddress` has the required permissions to interact with other addresses using the controlledContract. + +#### Parameters + +| Name | Type | Description | +| -------------------- | :-------: | -------------------------------------------------------------------------------------------------------- | +| `controlledContract` | `address` | the address of the ERC725 contract where the payload is executed and where the permissions are verified. | +| `controller` | `address` | the address who want to run the execute function on the ERC725Account. | +| `permissions` | `bytes32` | the permissions of the controller address. | +| `operationType` | `uint256` | - | +| `to` | `address` | - | +| `value` | `uint256` | - | +| `data` | `bytes` | - | + +
+ +### \_verifyCanDeployContract + +```solidity +function _verifyCanDeployContract( + address controller, + bytes32 permissions, + bool isFundingContract +) internal view; +``` + +
+ +### \_verifyCanStaticCall + +```solidity +function _verifyCanStaticCall( + address controlledContract, + address controller, + bytes32 permissions, + address to, + uint256 value, + bytes data +) internal view; +``` + +
+ +### \_verifyCanCall + +```solidity +function _verifyCanCall( + address controlledContract, + address controller, + bytes32 permissions, + address to, + uint256 value, + bytes data +) internal view; +``` + +
+ +### \_verifyAllowedCall + +```solidity +function _verifyAllowedCall( + address controlledContract, + address controllerAddress, + uint256 operationType, + address to, + uint256 value, + bytes data +) internal view; +``` + +
+ +### \_extractCallType + +```solidity +function _extractCallType( + uint256 operationType, + uint256 value, + bytes data +) internal pure returns (bytes4 requiredCallTypes); +``` + +extract the bytes4 representation of a single bit for the type of call according to the `operationType` + +#### Parameters + +| Name | Type | Description | +| --------------- | :-------: | -------------------------------------------- | +| `operationType` | `uint256` | 0 = CALL, 3 = STATICCALL or 3 = DELEGATECALL | +| `value` | `uint256` | - | +| `data` | `bytes` | - | + +#### Returns + +| Name | Type | Description | +| ------------------- | :------: | --------------------------------------------------------- | +| `requiredCallTypes` | `bytes4` | a bytes4 value containing a single 1 bit for the callType | + +
+ +### \_isAllowedAddress + +```solidity +function _isAllowedAddress( + bytes allowedCall, + address to +) internal pure returns (bool); +``` + +
+ +### \_isAllowedStandard + +```solidity +function _isAllowedStandard( + bytes allowedCall, + address to +) internal view returns (bool); +``` + +
+ +### \_isAllowedFunction + +```solidity +function _isAllowedFunction( + bytes allowedCall, + bytes data +) internal pure returns (bool); +``` + +
+ +### \_isAllowedCallType + +```solidity +function _isAllowedCallType( + bytes allowedCall, + bytes4 requiredCallTypes +) internal pure returns (bool); +``` + +
+ +### \_verifyExecuteRelayCallPermission + +```solidity +function _verifyExecuteRelayCallPermission( + address controllerAddress, + bytes32 controllerPermissions +) internal pure; +``` + +
+ +### \_verifyOwnershipPermissions + +```solidity +function _verifyOwnershipPermissions( + address controllerAddress, + bytes32 controllerPermissions +) internal pure; +``` + +
+ +### \_getNonce + +```solidity +function _getNonce( + address from, + uint128 channelId +) internal view returns (uint256 idx); +``` + +Read the nonce for a `from` address on a specific `channelId`. +This will return an `idx`, which is the concatenation of two `uint128` as follow: + +1. the `channelId` where the nonce was queried for. + +2. the actual nonce of the given `channelId`. + For example, if on `channelId` number `5`, the latest nonce is `1`, the `idx` returned by this function will be: + +``` +// in decimals = 1701411834604692317316873037158841057281 +idx = 0x0000000000000000000000000000000500000000000000000000000000000001 +``` + +This idx can be described as follow: + +``` + channelId => 5 nonce in this channel => 1 + v------------------------------v-------------------------------v +0x0000000000000000000000000000000500000000000000000000000000000001 +``` + +#### Parameters + +| Name | Type | Description | +| ----------- | :-------: | ------------------------------------------ | +| `from` | `address` | The address to read the nonce for. | +| `channelId` | `uint128` | The channel in which to extract the nonce. | + +#### Returns + +| Name | Type | Description | +| ----- | :-------: | ---------------------------------------------------------------------------------------------------------------------- | +| `idx` | `uint256` | The idx composed of two `uint128`: the channelId + nonce in channel concatenated together in a single `uint256` value. | + +
+ +### \_recoverSignerFromLSP25Signature + +```solidity +function _recoverSignerFromLSP25Signature( + bytes signature, + uint256 nonce, + uint256 validityTimestamps, + uint256 msgValue, + bytes callData +) internal view returns (address); +``` + +Recover the address of the signer that generated a `signature` using the parameters provided `nonce`, `validityTimestamps`, `msgValue` and `callData`. +The address of the signer will be recovered using the LSP25 signature format. + +#### Parameters + +| Name | Type | Description | +| -------------------- | :-------: | ---------------------------------------------------------------------------------------------------------------------------------------------------- | +| `signature` | `bytes` | A 65 bytes long signature generated according to the signature format specified in the LSP25 standard. | +| `nonce` | `uint256` | The nonce that the signer used to generate the `signature`. | +| `validityTimestamps` | `uint256` | The validity timestamp that the signer used to generate the signature (See [`_verifyValidityTimestamps`](#_verifyvaliditytimestamps) to learn more). | +| `msgValue` | `uint256` | The amount of native tokens intended to be sent for the relay transaction. | +| `callData` | `bytes` | The calldata to execute as a relay transaction that the signer signed for. | + +#### Returns + +| Name | Type | Description | +| ---- | :-------: | -------------------------------------------------------- | +| `0` | `address` | The address that signed, recovered from the `signature`. | + +
+ +### \_verifyValidityTimestamps + +```solidity +function _verifyValidityTimestamps(uint256 validityTimestamps) internal view; +``` + +Verify that the current timestamp is within the date and time range provided by `validityTimestamps`. + +#### Parameters + +| Name | Type | Description | +| -------------------- | :-------: | -------------------------------------------------------------------------------------------------------------------------------------- | +| `validityTimestamps` | `uint256` | Two `uint128` concatenated together, where the left-most `uint128` represent the timestamp from which the transaction can be executed, | + +
+ +### \_isValidNonce + +```solidity +function _isValidNonce(address from, uint256 idx) internal view returns (bool); +``` + +Verify that the nonce `_idx` for `_from` (obtained via [`getNonce`](#getnonce)) is valid in its channel ID. +The "idx" is a 256bits (unsigned) integer, where: + +- the 128 leftmost bits = channelId + +- and the 128 rightmost bits = nonce within the channel + +#### Parameters + +| Name | Type | Description | +| ------ | :-------: | ---------------------------------------------------------------------------- | +| `from` | `address` | The signer's address. | +| `idx` | `uint256` | The concatenation of the `channelId` + `nonce` within a specific channel ID. | + +#### Returns + +| Name | Type | Description | +| ---- | :----: | ------------------------------------------------------------------------ | +| `0` | `bool` | true if the nonce is the latest nonce for the `signer`, false otherwise. | + +
+ +### \_execute + +```solidity +function _execute( + uint256 msgValue, + bytes payload +) internal nonpayable returns (bytes); +``` + +
+ +### \_executeRelayCall + +:::caution Warning + +Be aware that this function can also throw an error if the `callData` was signed incorrectly (not conforming to the signature format defined in the LSP25 standard). +This is because the contract cannot distinguish if the data is signed correctly or not. Instead, it will recover an incorrect signer address from the signature +and throw an [`InvalidRelayNonce`](#invalidrelaynonce) error with the incorrect signer address as the first parameter. + +::: + +```solidity +function _executeRelayCall( + bytes signature, + uint256 nonce, + uint256 validityTimestamps, + uint256 msgValue, + bytes payload +) internal nonpayable returns (bytes); +``` + +Validate that the `nonce` given for the `signature` signed and the `payload` to execute is valid +and conform to the signature format according to the LSP25 standard. + +#### Parameters + +| Name | Type | Description | +| -------------------- | :-------: | -------------------------------------------------------------------------------------------------------------------------------------- | +| `signature` | `bytes` | A valid signature for a signer, generated according to the signature format specified in the LSP25 standard. | +| `nonce` | `uint256` | The nonce that the signer used to generate the `signature`. | +| `validityTimestamps` | `uint256` | Two `uint128` concatenated together, where the left-most `uint128` represent the timestamp from which the transaction can be executed, | +| `msgValue` | `uint256` | - | +| `payload` | `bytes` | The abi-encoded function call to execute. | + +
+ +### \_executePayload + +```solidity +function _executePayload( + address targetContract, + uint256 msgValue, + bytes payload +) internal nonpayable returns (bytes); +``` + +_Execute the `payload` passed to `execute(...)` or `executeRelayCall(...)`_ + +#### Parameters + +| Name | Type | Description | +| ---------------- | :-------: | ----------------------------------------------------------------------------- | +| `targetContract` | `address` | - | +| `msgValue` | `uint256` | - | +| `payload` | `bytes` | The abi-encoded function call to execute on the [`target`](#target) contract. | + +#### Returns + +| Name | Type | Description | +| ---- | :-----: | ------------------------------------------------------------------------------------ | +| `0` | `bytes` | bytes The data returned by the call made to the linked [`target`](#target) contract. | + +
+ +### \_verifyPermissions + +```solidity +function _verifyPermissions( + address targetContract, + address from, + bool isRelayedCall, + bytes payload +) internal view; +``` + +Verify if the `from` address is allowed to execute the `payload` on the [`target`](#target) contract linked to this Key Manager. + +#### Parameters + +| Name | Type | Description | +| ---------------- | :-------: | ---------------------------------------------------------------------------------------------------- | +| `targetContract` | `address` | The contract that is owned by the Key Manager | +| `from` | `address` | Either the caller of [`execute`](#execute) or the signer of [`executeRelayCall`](#executerelaycall). | +| `isRelayedCall` | `bool` | - | +| `payload` | `bytes` | The abi-encoded function call to execute on the [`target`](#target) contract. | + +
+ +### \_nonReentrantBefore + +```solidity +function _nonReentrantBefore( + address targetContract, + bool isSetData, + address from +) internal nonpayable returns (bool reentrancyStatus); +``` + +Check if we are in the context of a reentrant call, by checking if the reentrancy status is `true`. + +- If the status is `true`, the caller (or signer for relay call) MUST have the `REENTRANCY` permission. Otherwise, the call is reverted. + +- If the status is `false`, it is set to `true` only if we are not dealing with a call to the functions `setData` or `setDataBatch`. + Used at the beginning of the [`lsp20VerifyCall`](#`lsp20verifycall`), [`_execute`](#`_execute`) and [`_executeRelayCall`](#`_executerelaycall`) functions, before the methods execution starts. + +
+ +### \_nonReentrantAfter + +```solidity +function _nonReentrantAfter(address targetContract) internal nonpayable; +``` + +Resets the reentrancy status to `false` +Used at the end of the [`lsp20VerifyCall`](#`lsp20verifycall`), [`_execute`](#`_execute`) and [`_executeRelayCall`](#`_executerelaycall`) functions after the functions' execution is terminated. + +
+ +## Events + +### PermissionsVerified + +:::note References + +- Specification details: [**LSP-6-KeyManager.sol**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.sol.md#permissionsverified) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/lsp6/contracts/LSP6KeyManager.sol) +- Event signature: `PermissionsVerified(address,uint256,bytes4)` +- Event topic hash: `0xc0a62328f6bf5e3172bb1fcb2019f54b2c523b6a48e3513a2298fbf0150b781e` + +::: + +```solidity +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._ + +Emitted when the LSP6KeyManager contract verified the permissions of the `signer` successfully. + +#### Parameters + +| Name | Type | Description | +| ------------------------ | :-------: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `signer` **`indexed`** | `address` | The address of the controller that executed the calldata payload (either directly via [`execute`](#execute) or via meta transaction using [`executeRelayCall`](#executerelaycall)). | +| `value` **`indexed`** | `uint256` | The amount of native token to be transferred in the calldata payload. | +| `selector` **`indexed`** | `bytes4` | The bytes4 function of the function that was executed on the linked [`target`](#target) | + +
+ +## Errors + +### BatchExecuteParamsLengthMismatch + +:::note References + +- Specification details: [**LSP-6-KeyManager.sol**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.sol.md#batchexecuteparamslengthmismatch) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/lsp6/contracts/LSP6KeyManager.sol) +- Error signature: `BatchExecuteParamsLengthMismatch()` +- Error hash: `0x55a187db` + +::: + +```solidity +error BatchExecuteParamsLengthMismatch(); +``` + +_The array parameters provided to the function `executeBatch(...)` do not have the same number of elements. (Different array param's length)._ + +Reverts when the array parameters `uint256[] value` and `bytes[] payload` have different sizes. There should be the same number of elements for each array parameters. + +
+ +### BatchExecuteRelayCallParamsLengthMismatch + +:::note References + +- Specification details: [**LSP-6-KeyManager.sol**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.sol.md#batchexecuterelaycallparamslengthmismatch) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/lsp6/contracts/LSP6KeyManager.sol) +- Error signature: `BatchExecuteRelayCallParamsLengthMismatch()` +- Error hash: `0xb4d50d21` + +::: + +```solidity +error BatchExecuteRelayCallParamsLengthMismatch(); +``` + +_The array parameters provided to the function `executeRelayCallBatch(...)` do not have the same number of elements. (Different array param's length)._ + +Reverts when providing array parameters of different sizes to `executeRelayCallBatch(bytes[],uint256[],bytes[])` + +
+ +### CallingKeyManagerNotAllowed + +:::note References + +- Specification details: [**LSP-6-KeyManager.sol**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.sol.md#callingkeymanagernotallowed) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/lsp6/contracts/LSP6KeyManager.sol) +- Error signature: `CallingKeyManagerNotAllowed()` +- Error hash: `0xa431b236` + +::: + +```solidity +error CallingKeyManagerNotAllowed(); +``` + +_Calling the Key Manager address for this transaction is disallowed._ + +Reverts when calling the KeyManager through `execute(uint256,address,uint256,bytes)`. + +
+ +### DelegateCallDisallowedViaKeyManager + +:::note References + +- Specification details: [**LSP-6-KeyManager.sol**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.sol.md#delegatecalldisallowedviakeymanager) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/lsp6/contracts/LSP6KeyManager.sol) +- Error signature: `DelegateCallDisallowedViaKeyManager()` +- Error hash: `0x80d6ebae` + +::: + +```solidity +error DelegateCallDisallowedViaKeyManager(); +``` + +_Performing DELEGATE CALLS via the Key Manager is currently disallowed._ + +Reverts when trying to do a `delegatecall` via the ERC725X.execute(uint256,address,uint256,bytes) (operation type 4) function of the linked [`target`](#target). `DELEGATECALL` is disallowed by default on the LSP6KeyManager. + +
+ +### ERC725X_ExecuteParametersEmptyArray + +:::note References + +- Specification details: [**LSP-6-KeyManager.sol**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.sol.md#erc725x_executeparametersemptyarray) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/lsp6/contracts/LSP6KeyManager.sol) +- Error signature: `ERC725X_ExecuteParametersEmptyArray()` +- Error hash: `0xe9ad2b5f` + +::: + +```solidity +error ERC725X_ExecuteParametersEmptyArray(); +``` + +Reverts when one of the array parameter provided to the [`executeBatch`](#executebatch) function is an empty array. + +
+ +### ERC725X_ExecuteParametersLengthMismatch + +:::note References + +- Specification details: [**LSP-6-KeyManager.sol**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.sol.md#erc725x_executeparameterslengthmismatch) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/lsp6/contracts/LSP6KeyManager.sol) +- Error signature: `ERC725X_ExecuteParametersLengthMismatch()` +- Error hash: `0x3ff55f4d` + +::: + +```solidity +error ERC725X_ExecuteParametersLengthMismatch(); +``` + +Reverts when there is not the same number of elements in the `operationTypes`, `targets` addresses, `values`, and `datas` array parameters provided when calling the [`executeBatch`](#executebatch) function. + +
+ +### ERC725Y_DataKeysValuesLengthMismatch + +:::note References + +- Specification details: [**LSP-6-KeyManager.sol**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.sol.md#erc725y_datakeysvalueslengthmismatch) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/lsp6/contracts/LSP6KeyManager.sol) +- Error signature: `ERC725Y_DataKeysValuesLengthMismatch()` +- Error hash: `0x3bcc8979` + +::: + +```solidity +error ERC725Y_DataKeysValuesLengthMismatch(); +``` + +Reverts when there is not the same number of elements in the `datakeys` and `dataValues` array parameters provided when calling the [`setDataBatch`](#setdatabatch) function. + +
+ +### InvalidDataValuesForDataKeys + +:::note References + +- Specification details: [**LSP-6-KeyManager.sol**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.sol.md#invaliddatavaluesfordatakeys) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/lsp6/contracts/LSP6KeyManager.sol) +- Error signature: `InvalidDataValuesForDataKeys(bytes32,bytes)` +- Error hash: `0x1fa41397` + +::: + +```solidity +error InvalidDataValuesForDataKeys(bytes32 dataKey, bytes dataValue); +``` + +_Data value: `dataValue` length is different from the required length for the data key which is set._ + +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 that has a required length for the data value. | +| `dataValue` | `bytes` | The data value that has an invalid length. | + +
+ +### InvalidERC725Function + +:::note References + +- Specification details: [**LSP-6-KeyManager.sol**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.sol.md#invaliderc725function) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/lsp6/contracts/LSP6KeyManager.sol) +- Error signature: `InvalidERC725Function(bytes4)` +- Error hash: `0x2ba8851c` + +::: + +```solidity +error InvalidERC725Function(bytes4 invalidFunction); +``` + +_The Key Manager could not verify the calldata of the transaction because it could not recognise the function being called. Invalid function selector: `invalidFunction`._ + +Reverts when trying to call a function on the linked [`target`](#target), that is not any of the following: + +- `setData(bytes32,bytes)` (ERC725Y) + +- `setDataBatch(bytes32[],bytes[])` (ERC725Y) + +- `execute(uint256,address,uint256,bytes)` (ERC725X) + +- `transferOwnership(address)` (LSP14) + +- `acceptOwnership()` (LSP14) + +- `renounceOwnership()` (LSP14) + +#### Parameters + +| Name | Type | Description | +| ----------------- | :------: | --------------------------------------------------------------------------------------------------------------------------- | +| `invalidFunction` | `bytes4` | The `bytes4` selector of the function that was attempted to be called on the linked [`target`](#target) but not recognised. | + +
+ +### InvalidEncodedAllowedCalls + +:::note References + +- Specification details: [**LSP-6-KeyManager.sol**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.sol.md#invalidencodedallowedcalls) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/lsp6/contracts/LSP6KeyManager.sol) +- Error signature: `InvalidEncodedAllowedCalls(bytes)` +- Error hash: `0x187e77ab` + +::: + +```solidity +error InvalidEncodedAllowedCalls(bytes allowedCallsValue); +``` + +_Could not decode the Allowed Calls. Value = `allowedCallsValue`._ + +Reverts when `allowedCallsValue` is not properly encoded as a `(bytes4,address,bytes4,bytes4)[CompactBytesArray]` (CompactBytesArray made of tuples that are 32 bytes long each). See LSP2 value type `CompactBytesArray` for more infos. + +#### Parameters + +| Name | Type | Description | +| ------------------- | :-----: | ----------------------------------------------------------------------------------------------------------------- | +| `allowedCallsValue` | `bytes` | The list of allowedCalls that are not encoded correctly as a `(bytes4,address,bytes4,bytes4)[CompactBytesArray]`. | + +
+ +### InvalidEncodedAllowedERC725YDataKeys + +:::note References + +- Specification details: [**LSP-6-KeyManager.sol**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.sol.md#invalidencodedallowederc725ydatakeys) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/lsp6/contracts/LSP6KeyManager.sol) +- Error signature: `InvalidEncodedAllowedERC725YDataKeys(bytes,string)` +- Error hash: `0xae6cbd37` + +::: + +```solidity +error InvalidEncodedAllowedERC725YDataKeys(bytes value, string context); +``` + +_Error when reading the Allowed ERC725Y Data Keys. Reason: `context`, Allowed ERC725Y Data Keys value read: `value`._ + +Reverts when `value` is not encoded properly as a `bytes32[CompactBytesArray]`. The `context` string provides context on when this error occurred (\_e.g: when fetching the `AllowedERC725YDataKeys` to verify the permissions of a controller, or when validating the `AllowedERC725YDataKeys` when setting them for a controller). + +#### Parameters + +| Name | Type | Description | +| --------- | :------: | ---------------------------------------------------------- | +| `value` | `bytes` | The value that is not a valid `bytes32[CompactBytesArray]` | +| `context` | `string` | A brief description of where the error occurred. | + +
+ +### InvalidLSP6Target + +:::note References + +- Specification details: [**LSP-6-KeyManager.sol**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.sol.md#invalidlsp6target) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/lsp6/contracts/LSP6KeyManager.sol) +- Error signature: `InvalidLSP6Target()` +- Error hash: `0xfc854579` + +::: + +```solidity +error InvalidLSP6Target(); +``` + +_Invalid address supplied to link this Key Manager to (`address(0)`)._ + +Reverts when the address provided to set as the [`target`](#target) linked to this KeyManager is invalid (_e.g. `address(0)`_). + +
+ +### InvalidPayload + +:::note References + +- Specification details: [**LSP-6-KeyManager.sol**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.sol.md#invalidpayload) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/lsp6/contracts/LSP6KeyManager.sol) +- Error signature: `InvalidPayload(bytes)` +- Error hash: `0x3621bbcc` + +::: + +```solidity +error InvalidPayload(bytes payload); +``` + +_Invalid calldata payload sent._ + +Reverts when the payload is invalid. + +#### Parameters + +| Name | Type | Description | +| --------- | :-----: | ----------- | +| `payload` | `bytes` | - | + +
+ +### InvalidRelayNonce + +:::note References + +- Specification details: [**LSP-6-KeyManager.sol**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.sol.md#invalidrelaynonce) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/lsp6/contracts/LSP6KeyManager.sol) +- Error signature: `InvalidRelayNonce(address,uint256,bytes)` +- Error hash: `0xc9bd9eb9` + +::: + +```solidity +error InvalidRelayNonce(address signer, uint256 invalidNonce, bytes signature); +``` + +_The relay call failed because an invalid nonce was provided for the address `signer` that signed the execute relay call. Invalid nonce: `invalidNonce`, signature of signer: `signature`._ + +Reverts when the `signer` address retrieved from the `signature` has an invalid nonce: `invalidNonce`. + +#### Parameters + +| Name | Type | Description | +| -------------- | :-------: | ---------------------------------------------------- | +| `signer` | `address` | The address of the signer. | +| `invalidNonce` | `uint256` | The nonce retrieved for the `signer` address. | +| `signature` | `bytes` | The signature used to retrieve the `signer` address. | + +
+ +### InvalidWhitelistedCall + +:::note References + +- Specification details: [**LSP-6-KeyManager.sol**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.sol.md#invalidwhitelistedcall) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/lsp6/contracts/LSP6KeyManager.sol) +- Error signature: `InvalidWhitelistedCall(address)` +- Error hash: `0x6fd203c5` + +::: + +```solidity +error InvalidWhitelistedCall(address from); +``` + +_Invalid allowed calls (`0xffffffffffffffffffffffffffffffffffffffffffffffffffffffff`) set for address `from`. Could not perform external call._ + +Reverts when a `from` address has _"any whitelisted call"_ as allowed call set. This revert happens during the verification of the permissions of the address for its allowed calls. A `from` address is not allowed to have 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffff in its list of `AddressPermissions:AllowedCalls:
`, as this allows any STANDARD:ADDRESS:FUNCTION. This is equivalent to granting the SUPER permission and should never be valid. + +#### Parameters + +| Name | Type | Description | +| ------ | :-------: | ---------------------------------------------------------------------- | +| `from` | `address` | The controller address that has _"any allowed calls"_ whitelisted set. | + +
+ +### KeyManagerCannotBeSetAsExtensionForLSP20Functions + +:::note References + +- Specification details: [**LSP-6-KeyManager.sol**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.sol.md#keymanagercannotbesetasextensionforlsp20functions) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/lsp6/contracts/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 + +
+ +### LSP6BatchExcessiveValueSent + +:::note References + +- Specification details: [**LSP-6-KeyManager.sol**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.sol.md#lsp6batchexcessivevaluesent) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/lsp6/contracts/LSP6KeyManager.sol) +- Error signature: `LSP6BatchExcessiveValueSent(uint256,uint256)` +- Error hash: `0xa51868b6` + +::: + +```solidity +error LSP6BatchExcessiveValueSent(uint256 totalValues, uint256 msgValue); +``` + +_Too much funds sent to forward each amount in the batch. No amount of native tokens should stay in the Key Manager._ + +This error occurs when there was too much funds sent to the batch functions `execute(uint256[],bytes[])` or `executeRelayCall(bytes[],uint256[],uint256[],bytes[])` to cover the sum of all the values forwarded on Reverts to avoid the KeyManager to holds some remaining funds sent to the following batch functions: + +- execute(uint256[],bytes[]) + +- executeRelayCall(bytes[],uint256[],uint256[],bytes[]) This error occurs when `msg.value` is more than the sum of all the values being forwarded on each payloads (`values[]` parameter from the batch functions above). + +#### Parameters + +| Name | Type | Description | +| ------------- | :-------: | ----------- | +| `totalValues` | `uint256` | - | +| `msgValue` | `uint256` | - | + +
+ +### LSP6BatchInsufficientValueSent + +:::note References + +- Specification details: [**LSP-6-KeyManager.sol**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.sol.md#lsp6batchinsufficientvaluesent) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/lsp6/contracts/LSP6KeyManager.sol) +- Error signature: `LSP6BatchInsufficientValueSent(uint256,uint256)` +- Error hash: `0x30a324ac` + +::: + +```solidity +error LSP6BatchInsufficientValueSent(uint256 totalValues, uint256 msgValue); +``` + +_Not enough funds sent to forward each amount in the batch._ + +This error occurs when there was not enough funds sent to the batch functions `execute(uint256[],bytes[])` or `executeRelayCall(bytes[],uint256[],uint256[],bytes[])` to cover the sum of all the values forwarded on each payloads (`values[]` parameter from the batch functions above). This mean that `msg.value` is less than the sum of all the values being forwarded on each payloads (`values[]` parameters). + +#### Parameters + +| Name | Type | Description | +| ------------- | :-------: | ------------------------------------------------------------------------------------------------------------------------------------------------ | +| `totalValues` | `uint256` | The sum of all the values forwarded on each payloads (`values[]` parameter from the batch functions above). | +| `msgValue` | `uint256` | The amount of native tokens sent to the batch functions `execute(uint256[],bytes[])` or `executeRelayCall(bytes[],uint256[],uint256[],bytes[])`. | + +
+ +### NoCallsAllowed + +:::note References + +- Specification details: [**LSP-6-KeyManager.sol**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.sol.md#nocallsallowed) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/lsp6/contracts/LSP6KeyManager.sol) +- Error signature: `NoCallsAllowed(address)` +- Error hash: `0x6cb60587` + +::: + +```solidity +error NoCallsAllowed(address from); +``` + +_The address `from` is not authorised to use the linked account contract to make external calls, because it has no Allowed Calls set._ + +Reverts when the `from` address has no `AllowedCalls` set and cannot interact with any address using the linked [`target`](#target). + +#### Parameters + +| Name | Type | Description | +| ------ | :-------: | ------------------------------------- | +| `from` | `address` | The address that has no AllowedCalls. | + +
+ +### NoERC725YDataKeysAllowed + +:::note References + +- Specification details: [**LSP-6-KeyManager.sol**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.sol.md#noerc725ydatakeysallowed) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/lsp6/contracts/LSP6KeyManager.sol) +- Error signature: `NoERC725YDataKeysAllowed(address)` +- Error hash: `0xed7fa509` + +::: + +```solidity +error NoERC725YDataKeysAllowed(address from); +``` + +_The address `from` is not authorised to set data, because it has no ERC725Y Data Key allowed._ + +Reverts when the `from` address has no AllowedERC725YDataKeys set and cannot set any ERC725Y data key on the ERC725Y storage of the linked [`target`](#target). + +#### Parameters + +| Name | Type | Description | +| ------ | :-------: | ----------------------------------------------------- | +| `from` | `address` | The address that has no `AllowedERC725YDataKeys` set. | + +
+ +### NoPermissionsSet + +:::note References + +- Specification details: [**LSP-6-KeyManager.sol**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.sol.md#nopermissionsset) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/lsp6/contracts/LSP6KeyManager.sol) +- Error signature: `NoPermissionsSet(address)` +- Error hash: `0xf292052a` + +::: + +```solidity +error NoPermissionsSet(address from); +``` + +_The address `from` does not have any permission set on the contract linked to the Key Manager._ + +Reverts when address `from` does not have any permissions set on the account linked to this Key Manager + +#### Parameters + +| Name | Type | Description | +| ------ | :-------: | ------------------------------------------ | +| `from` | `address` | the address that does not have permissions | + +
+ +### NotAllowedCall + +:::note References + +- Specification details: [**LSP-6-KeyManager.sol**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.sol.md#notallowedcall) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/lsp6/contracts/LSP6KeyManager.sol) +- Error signature: `NotAllowedCall(address,address,bytes4)` +- Error hash: `0x45147bce` + +::: + +```solidity +error NotAllowedCall(address from, address to, bytes4 selector); +``` + +_The address `from` is not authorised to call the function `selector` on the `to` address._ + +Reverts when `from` is not authorised to call the `execute(uint256,address,uint256,bytes)` function because of a not allowed callType, address, standard or function. + +#### Parameters + +| Name | Type | Description | +| ---------- | :-------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `from` | `address` | The controller that tried to call the `execute(uint256,address,uint256,bytes)` function. | +| `to` | `address` | The address of an EOA or contract that `from` tried to call using the linked [`target`](#target) | +| `selector` | `bytes4` | If `to` is a contract, the bytes4 selector of the function that `from` is trying to call. If no function is called (_e.g: a native token transfer_), selector = `0x00000000` | + +
+ +### NotAllowedERC725YDataKey + +:::note References + +- Specification details: [**LSP-6-KeyManager.sol**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.sol.md#notallowederc725ydatakey) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/lsp6/contracts/LSP6KeyManager.sol) +- Error signature: `NotAllowedERC725YDataKey(address,bytes32)` +- Error hash: `0x557ae079` + +::: + +```solidity +error NotAllowedERC725YDataKey(address from, bytes32 disallowedKey); +``` + +_The address `from` is not authorised to set the data key `disallowedKey` on the contract linked to the Key Manager._ + +Reverts when address `from` is not authorised to set the key `disallowedKey` on the linked [`target`](#target). + +#### Parameters + +| Name | Type | Description | +| --------------- | :-------: | ----------------------------------------------------------------------------------------------------------------- | +| `from` | `address` | address The controller that tried to `setData` on the linked [`target`](#target). | +| `disallowedKey` | `bytes32` | A bytes32 data key that `from` is not authorised to set on the ERC725Y storage of the linked [`target`](#target). | + +
+ +### NotAuthorised + +:::note References + +- Specification details: [**LSP-6-KeyManager.sol**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.sol.md#notauthorised) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/lsp6/contracts/LSP6KeyManager.sol) +- Error signature: `NotAuthorised(address,string)` +- Error hash: `0x3bdad6e6` + +::: + +```solidity +error NotAuthorised(address from, string permission); +``` + +_The address `from` is not authorised to `permission` on the contract linked to the Key Manager._ + +Reverts when address `from` is not authorised and does not have `permission` on the linked [`target`](#target) + +#### Parameters + +| Name | Type | Description | +| ------------ | :-------: | ------------------------------------------------------------------------------ | +| `from` | `address` | address The address that was not authorised. | +| `permission` | `string` | permission The permission required (\_e.g: `SETDATA`, `CALL`, `TRANSFERVALUE`) | + +
+ +### NotRecognisedPermissionKey + +:::note References + +- Specification details: [**LSP-6-KeyManager.sol**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.sol.md#notrecognisedpermissionkey) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/lsp6/contracts/LSP6KeyManager.sol) +- Error signature: `NotRecognisedPermissionKey(bytes32)` +- Error hash: `0x0f7d735b` + +::: + +```solidity +error NotRecognisedPermissionKey(bytes32 dataKey); +``` + +_The data key `dataKey` starts with `AddressPermissions` prefix but is none of the permission data keys defined in LSP6._ + +Reverts when `dataKey` is a `bytes32` value that does not adhere to any of the permission data keys defined by the LSP6 standard + +#### Parameters + +| Name | Type | Description | +| --------- | :-------: | ------------------------------------------------------------------------------ | +| `dataKey` | `bytes32` | The dataKey that does not match any of the standard LSP6 permission data keys. | + +
+ +### RelayCallBeforeStartTime + +:::note References + +- Specification details: [**LSP-6-KeyManager.sol**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.sol.md#relaycallbeforestarttime) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/lsp6/contracts/LSP6KeyManager.sol) +- Error signature: `RelayCallBeforeStartTime()` +- Error hash: `0x00de4b8a` + +::: + +```solidity +error RelayCallBeforeStartTime(); +``` + +_Relay call not valid yet._ + +Reverts when the relay call is cannot yet bet executed. This mean that the starting timestamp provided to [`executeRelayCall`](#executerelaycall) function is bigger than the current timestamp. + +
+ +### RelayCallExpired + +:::note References + +- Specification details: [**LSP-6-KeyManager.sol**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.sol.md#relaycallexpired) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/lsp6/contracts/LSP6KeyManager.sol) +- Error signature: `RelayCallExpired()` +- Error hash: `0x5c53a98c` + +::: + +```solidity +error RelayCallExpired(); +``` + +_Relay call expired (deadline passed)._ + +Reverts when the period to execute the relay call has expired. + +
diff --git a/docs/libraries/lsp6/contracts/LSP6Utils.md b/docs/libraries/lsp6/contracts/LSP6Utils.md new file mode 100644 index 000000000..566ba984b --- /dev/null +++ b/docs/libraries/lsp6/contracts/LSP6Utils.md @@ -0,0 +1,254 @@ + + + +# LSP6Utils + +:::info Standard Specifications + +[`LSP-6-Utils.sol`](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-Utils.sol.md) + +::: +:::info Solidity implementation + +[`LSP6Utils.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/lsp6/contracts/LSP6Utils.sol) + +::: + +> LSP6 Utility library. + +LSP6Utils is a library of utility functions that can be used to retrieve, check and set LSP6 permissions stored under the ERC725Y storage of a smart contract. Based on the LSP6 Key Manager standard. + +## Internal Methods + +Any method labeled as `internal` serves as utility function within the contract. They can be used when writing solidity contracts that inherit from this contract. These methods can be extended or modified by overriding their internal behavior to suit specific needs. + +Internal functions cannot be called externally, whether from other smart contracts, dApp interfaces, or backend services. Their restricted accessibility ensures that they remain exclusively available within the context of the current contract, promoting controlled and encapsulated usage of these internal utilities. + +### getPermissionsFor + +:::info + +If the raw value fetched from the ERC725Y storage of `target` is not 32 bytes long, this is considered +like _"no permissions are set"_ and will return 32 x `0x00` bytes as `bytes32(0)`. + +::: + +```solidity +function getPermissionsFor(contract IERC725Y target, address caller) internal view returns (bytes32); +``` + +Read the permissions of a `caller` on an ERC725Y `target` contract. + +#### Parameters + +| Name | Type | Description | +| -------- | :-----------------: | ----------------------------------------------------- | +| `target` | `contract IERC725Y` | An `IERC725Y` contract where to read the permissions. | +| `caller` | `address` | The controller address to read the permissions from. | + +#### Returns + +| Name | Type | Description | +| ---- | :-------: | ------------------------------------------------------------------------ | +| `0` | `bytes32` | A `bytes32` BitArray containing the permissions of a controller address. | + +
+ +### getAllowedCallsFor + +```solidity +function getAllowedCallsFor(contract IERC725Y target, address from) internal view returns (bytes); +``` + +
+ +### getAllowedERC725YDataKeysFor + +```solidity +function getAllowedERC725YDataKeysFor(contract IERC725Y target, address caller) internal view returns (bytes); +``` + +Read the Allowed ERC725Y data keys of a `caller` on an ERC725Y `target` contract. + +#### Parameters + +| Name | Type | Description | +| -------- | :-----------------: | ----------------------------------------------------- | +| `target` | `contract IERC725Y` | An `IERC725Y` contract where to read the permissions. | +| `caller` | `address` | The controller address to read the permissions from. | + +#### Returns + +| Name | Type | Description | +| ---- | :-----: | --------------------------------------------------------------------------------------------------------- | +| `0` | `bytes` | An abi-encoded array of allowed ERC725 data keys that the controller address is allowed to interact with. | + +
+ +### hasPermission + +```solidity +function hasPermission( + bytes32 controllerPermissions, + bytes32 permissionToCheck +) internal pure returns (bool); +``` + +Compare the permissions `controllerPermissions` of a controller address to check if they includes the permissions `permissionToCheck`. + +#### Parameters + +| Name | Type | Description | +| ----------------------- | :-------: | --------------------------------------------------------------------------------- | +| `controllerPermissions` | `bytes32` | The permissions of an address. | +| `permissionToCheck` | `bytes32` | The permissions to check if the controller has under its `controllerPermissions`. | + +#### Returns + +| Name | Type | Description | +| ---- | :----: | ---------------------------------------------------------------------------------- | +| `0` | `bool` | `true` if `controllerPermissions` includes `permissionToCheck`, `false` otherwise. | + +
+ +### isCompactBytesArrayOfAllowedCalls + +```solidity +function isCompactBytesArrayOfAllowedCalls( + bytes allowedCallsCompacted +) internal pure returns (bool); +``` + +Same as `LSP2Utils.isCompactBytesArray` with the additional requirement that each element must be 32 bytes long. + +#### Parameters + +| Name | Type | Description | +| ----------------------- | :-----: | --------------------------------------------------------------------------------------------------------------------------------------------------- | +| `allowedCallsCompacted` | `bytes` | A compact bytes array of tuples `(bytes4,address,bytes4,bytes4)` to check (defined as `(bytes4,address,bytes4,bytes4)[CompactBytesArray]` in LSP6). | + +#### Returns + +| Name | Type | Description | +| ---- | :----: | -------------------------------------------------------------------------------------------------------------- | +| `0` | `bool` | `true` if the value passed is a valid compact bytes array of bytes32 AllowedCalls elements, `false` otherwise. | + +
+ +### isCompactBytesArrayOfAllowedERC725YDataKeys + +```solidity +function isCompactBytesArrayOfAllowedERC725YDataKeys( + bytes allowedERC725YDataKeysCompacted +) internal pure returns (bool); +``` + +Same as `LSP2Utils.isCompactBytesArray` with the additional requirement that each element must be from 1 to 32 bytes long. + +#### Parameters + +| Name | Type | Description | +| --------------------------------- | :-----: | -------------------------------------------------------------------------------------------------------------------------------------- | +| `allowedERC725YDataKeysCompacted` | `bytes` | a compact bytes array of ERC725Y data Keys (full bytes32 data keys or bytesN prefix) to check (defined as `bytes[CompactBytesArray]`). | + +#### Returns + +| Name | Type | Description | +| ---- | :----: | ------------------------------------------------------------------------------------------------------------------ | +| `0` | `bool` | `true` if the value passed is a valid compact bytes array of bytes32 Allowed ERC725Y data keys, `false` otherwise. | + +
+ +### setDataViaKeyManager + +```solidity +function setDataViaKeyManager( + address keyManagerAddress, + bytes32[] keys, + bytes[] values +) internal nonpayable returns (bytes result); +``` + +Use the `setData(bytes32[],bytes[])` function via the KeyManager on the target contract. + +#### Parameters + +| Name | Type | Description | +| ------------------- | :---------: | ----------------------------------- | +| `keyManagerAddress` | `address` | The address of the KeyManager. | +| `keys` | `bytes32[]` | The array of `bytes32[]` data keys. | +| `values` | `bytes[]` | The array of `bytes[]` data values. | + +
+ +### combinePermissions + +```solidity +function combinePermissions( + bytes32[] permissions +) internal pure returns (bytes32); +``` + +Combine multiple permissions into a single `bytes32`. +Make sure that the sum of the values of the input array is less than `2^256-1 to avoid overflow. + +#### Parameters + +| Name | Type | Description | +| ------------- | :---------: | ------------------------------------ | +| `permissions` | `bytes32[]` | The array of permissions to combine. | + +#### Returns + +| Name | Type | Description | +| ---- | :-------: | ------------------------------------------------------ | +| `0` | `bytes32` | A `bytes32` value containing the combined permissions. | + +
+ +### generateNewPermissionsKeys + +```solidity +function generateNewPermissionsKeys(contract IERC725Y account, address controller, bytes32 permissions) internal view returns (bytes32[] keys, bytes[] values); +``` + +Generate a new set of 3 x LSP6 permission data keys to add a new `controller` on `account`. + +#### Parameters + +| Name | Type | Description | +| ------------- | :-----------------: | ----------------------------------------------------------------------------------------------- | +| `account` | `contract IERC725Y` | The ERC725Y contract to add the controller into (used to fetch the `LSP6Permissions[]` length). | +| `controller` | `address` | The address of the controller to grant permissions to. | +| `permissions` | `bytes32` | The `BitArray` of permissions to grant to the controller. | + +#### Returns + +| Name | Type | Description | +| -------- | :---------: | --------------------------------------- | +| `keys` | `bytes32[]` | An array of 3 x data keys containing: | +| `values` | `bytes[]` | An array of 3 x data values containing: | + +
+ +### getPermissionName + +```solidity +function getPermissionName(bytes32 permission) internal pure returns (string); +``` + +Returns the name of the permission as a string. + +#### Parameters + +| Name | Type | Description | +| ------------ | :-------: | ----------------------------------------------------------------------------------- | +| `permission` | `bytes32` | The low-level `bytes32` permission as a `BitArray` to get the permission name from. | + +#### Returns + +| Name | Type | Description | +| ---- | :------: | -------------------------------------------------- | +| `0` | `string` | The string name of the `bytes32` permission value. | + +
diff --git a/dodoc/config.ts b/dodoc/config.ts index a0867a008..a42843076 100644 --- a/dodoc/config.ts +++ b/dodoc/config.ts @@ -15,8 +15,8 @@ export const dodocConfig = { 'contracts/LSP16UniversalFactory/LSP16UniversalFactory.sol', 'lsp17contractextension/contracts/LSP17Extendable.sol', 'lsp17contractextension/contracts/LSP17Extension.sol', - 'contracts/LSP17Extensions/Extension4337.sol', - 'contracts/LSP17Extensions/OnERC721ReceivedExtension.sol', + 'lsp17/Extension4337.sol', + 'lsp17/OnERC721ReceivedExtension.sol', 'lsp20/contracts/LSP20CallVerification.sol', 'contracts/LSP23LinkedContractsFactory/LSP23LinkedContractsFactory.sol', 'contracts/LSP23LinkedContractsFactory/IPostDeploymentModule.sol', diff --git a/package-lock.json b/package-lock.json index c4e18013d..0745263c5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,6 +21,7 @@ "lsp1": "*", "lsp10": "*", "lsp14": "*", + "lsp17": "*", "lsp17contractextension": "*", "lsp2": "*", "lsp20": "*", @@ -4343,9 +4344,9 @@ "peer": true }, "node_modules/@types/node": { - "version": "20.11.15", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.15.tgz", - "integrity": "sha512-gscmuADZfvNULx1eyirVbr3kVOVZtpQtzKMCZpeSZcN6MfbkRXAR4s9/gsQ4CzxLHw6EStDtKLNtSDL3vbq05A==", + "version": "20.11.16", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.16.tgz", + "integrity": "sha512-gKb0enTmRCzXSSUJDq6/sPcqrfCv2mkkG6Jt/clpn5eiCbKTY+SgZUxo+p8ZKMof5dCp9vHQUAB7wOUTod22wQ==", "dependencies": { "undici-types": "~5.26.4" } @@ -5120,13 +5121,16 @@ } }, "node_modules/array-buffer-byte-length": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", - "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", + "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "is-array-buffer": "^3.0.1" + "call-bind": "^1.0.5", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -5164,17 +5168,18 @@ } }, "node_modules/arraybuffer.prototype.slice": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz", - "integrity": "sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", + "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", "dev": true, "dependencies": { - "array-buffer-byte-length": "^1.0.0", - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "get-intrinsic": "^1.2.1", - "is-array-buffer": "^3.0.2", + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.2.1", + "get-intrinsic": "^1.2.3", + "is-array-buffer": "^3.0.4", "is-shared-array-buffer": "^1.0.2" }, "engines": { @@ -6150,9 +6155,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001582", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001582.tgz", - "integrity": "sha512-vsJG3V5vgfduaQGVxL53uSX/HUzxyr2eA8xCo36OLal7sRcSZbibJtLeh0qja4sFOr/QQGt4opB4tOy+eOgAxg==", + "version": "1.0.30001584", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001584.tgz", + "integrity": "sha512-LOz7CCQ9M1G7OjJOF9/mzmqmj3jE/7VOmrfw6Mgs0E8cjOsbRXQJHsPBfmBOXDskXKrHLyyW3n7kpDW/4BsfpQ==", "funding": [ { "type": "opencollective", @@ -7657,9 +7662,9 @@ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, "node_modules/electron-to-chromium": { - "version": "1.4.653", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.653.tgz", - "integrity": "sha512-wA2A2LQCqnEwQAvwADQq3KpMpNwgAUBnRmrFgRzHnPhbQUFArTR32Ab46f4p0MovDLcg4uqd4nCsN2hTltslpA==" + "version": "1.4.656", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.656.tgz", + "integrity": "sha512-9AQB5eFTHyR3Gvt2t/NwR0le2jBSUNwCnMbUCejFWHD+so4tH40/dRLgoE+jxlPeWS43XJewyvCv+I8LPMl49Q==" }, "node_modules/elliptic": { "version": "6.5.4", @@ -7813,6 +7818,14 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es-module-lexer": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.4.1.tgz", @@ -9561,9 +9574,9 @@ "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==" }, "node_modules/fastq": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.0.tgz", - "integrity": "sha512-zGygtijUMT7jnk3h26kUms3BkSDp4IfIKjmnqI2tvx6nuBfiF1UqOxbnLfzdv+apBy+53oaImsKtMw/xYbW+1w==", + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", "dependencies": { "reusify": "^1.0.4" } @@ -9937,15 +9950,19 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz", - "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.3.tgz", + "integrity": "sha512-JIcZczvcMVE7AUOP+X72bh8HqHBRxFdz5PDHYtNG/lE3yk9b3KZBJlwFcTyPYjg3L4RLLmZJzvjxhaZVapxFrQ==", "dependencies": { + "es-errors": "^1.0.0", "function-bind": "^1.1.2", "has-proto": "^1.0.1", "has-symbols": "^1.0.3", "hasown": "^2.0.0" }, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -11618,11 +11635,11 @@ } }, "node_modules/has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", "dependencies": { - "has-symbols": "^1.0.2" + "has-symbols": "^1.0.3" }, "engines": { "node": ">= 0.4" @@ -12222,14 +12239,16 @@ } }, "node_modules/is-array-buffer": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", - "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", + "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", "dev": true, "dependencies": { "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.0", - "is-typed-array": "^1.1.10" + "get-intrinsic": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -12636,11 +12655,11 @@ } }, "node_modules/is-typed-array": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", - "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", + "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", "dependencies": { - "which-typed-array": "^1.1.11" + "which-typed-array": "^1.1.14" }, "engines": { "node": ">= 0.4" @@ -13519,6 +13538,10 @@ "resolved": "packages/LSP14Ownable2Step", "link": true }, + "node_modules/lsp17": { + "resolved": "packages/LSP17Extensions", + "link": true + }, "node_modules/lsp17contractextension": { "resolved": "packages/LSP17ContractExtension", "link": true @@ -20159,11 +20182,11 @@ } }, "node_modules/ts-api-utils": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.3.tgz", - "integrity": "sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.2.0.tgz", + "integrity": "sha512-d+3WxW4r8WQy2cZWpNRPPGExX8ffOLGcIhheUANKbL5Sqjbhkneki76fRAWeXkaslV2etTb4tSJBSxOsH5+CJw==", "engines": { - "node": ">=16.13.0" + "node": ">=18" }, "peerDependencies": { "typescript": ">=4.2.0" @@ -21230,9 +21253,9 @@ } }, "node_modules/undici": { - "version": "5.28.2", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.2.tgz", - "integrity": "sha512-wh1pHJHnUeQV5Xa8/kyQhO7WFa8M34l026L5P/+2TYiakvGy5Rdc8jWZVyG7ieht/0WgJLEd3kcU5gKx+6GC8w==", + "version": "5.28.3", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.3.tgz", + "integrity": "sha512-3ItfzbrhDlINjaP0duwnNsKpDQk3acHI3gVJ1z4fmwMK31k5G9OVIAMLSIaP6w4FaGkaAkN6zaQO9LUvZ1t7VA==", "dev": true, "dependencies": { "@fastify/busboy": "^2.0.0" @@ -22578,28 +22601,28 @@ } }, "node_modules/web3": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3/-/web3-1.10.3.tgz", - "integrity": "sha512-DgUdOOqC/gTqW+VQl1EdPxrVRPB66xVNtuZ5KD4adVBtko87hkgM8BTZ0lZ8IbUfnQk6DyjcDujMiH3oszllAw==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3/-/web3-1.10.4.tgz", + "integrity": "sha512-kgJvQZjkmjOEKimx/tJQsqWfRDPTTcBfYPa9XletxuHLpHcXdx67w8EFn5AW3eVxCutE9dTVHgGa9VYe8vgsEA==", "dev": true, "hasInstallScript": true, "dependencies": { - "web3-bzz": "1.10.3", - "web3-core": "1.10.3", - "web3-eth": "1.10.3", - "web3-eth-personal": "1.10.3", - "web3-net": "1.10.3", - "web3-shh": "1.10.3", - "web3-utils": "1.10.3" + "web3-bzz": "1.10.4", + "web3-core": "1.10.4", + "web3-eth": "1.10.4", + "web3-eth-personal": "1.10.4", + "web3-net": "1.10.4", + "web3-shh": "1.10.4", + "web3-utils": "1.10.4" }, "engines": { "node": ">=8.0.0" } }, "node_modules/web3-bzz": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.10.3.tgz", - "integrity": "sha512-XDIRsTwekdBXtFytMpHBuun4cK4x0ZMIDXSoo1UVYp+oMyZj07c7gf7tNQY5qZ/sN+CJIas4ilhN25VJcjSijQ==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.10.4.tgz", + "integrity": "sha512-ZZ/X4sJ0Uh2teU9lAGNS8EjveEppoHNQiKlOXAjedsrdWuaMErBPdLQjXfcrYvN6WM6Su9PMsAxf3FXXZ+HwQw==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -22801,56 +22824,56 @@ } }, "node_modules/web3-core": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.10.3.tgz", - "integrity": "sha512-Vbk0/vUNZxJlz3RFjAhNNt7qTpX8yE3dn3uFxfX5OHbuon5u65YEOd3civ/aQNW745N0vGUlHFNxxmn+sG9DIw==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.10.4.tgz", + "integrity": "sha512-B6elffYm81MYZDTrat7aEhnhdtVE3lDBUZft16Z8awYMZYJDbnykEbJVS+l3mnA7AQTnSDr/1MjWofGDLBJPww==", "dev": true, "dependencies": { "@types/bn.js": "^5.1.1", "@types/node": "^12.12.6", "bignumber.js": "^9.0.0", - "web3-core-helpers": "1.10.3", - "web3-core-method": "1.10.3", - "web3-core-requestmanager": "1.10.3", - "web3-utils": "1.10.3" + "web3-core-helpers": "1.10.4", + "web3-core-method": "1.10.4", + "web3-core-requestmanager": "1.10.4", + "web3-utils": "1.10.4" }, "engines": { "node": ">=8.0.0" } }, "node_modules/web3-core-helpers": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.3.tgz", - "integrity": "sha512-Yv7dQC3B9ipOc5sWm3VAz1ys70Izfzb8n9rSiQYIPjpqtJM+3V4EeK6ghzNR6CO2es0+Yu9CtCkw0h8gQhrTxA==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.4.tgz", + "integrity": "sha512-r+L5ylA17JlD1vwS8rjhWr0qg7zVoVMDvWhajWA5r5+USdh91jRUYosp19Kd1m2vE034v7Dfqe1xYRoH2zvG0g==", "dev": true, "dependencies": { - "web3-eth-iban": "1.10.3", - "web3-utils": "1.10.3" + "web3-eth-iban": "1.10.4", + "web3-utils": "1.10.4" }, "engines": { "node": ">=8.0.0" } }, "node_modules/web3-core-method": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.10.3.tgz", - "integrity": "sha512-VZ/Dmml4NBmb0ep5PTSg9oqKoBtG0/YoMPei/bq/tUdlhB2dMB79sbeJPwx592uaV0Vpk7VltrrrBv5hTM1y4Q==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.10.4.tgz", + "integrity": "sha512-uZTb7flr+Xl6LaDsyTeE2L1TylokCJwTDrIVfIfnrGmnwLc6bmTWCCrm71sSrQ0hqs6vp/MKbQYIYqUN0J8WyA==", "dev": true, "dependencies": { "@ethersproject/transactions": "^5.6.2", - "web3-core-helpers": "1.10.3", - "web3-core-promievent": "1.10.3", - "web3-core-subscriptions": "1.10.3", - "web3-utils": "1.10.3" + "web3-core-helpers": "1.10.4", + "web3-core-promievent": "1.10.4", + "web3-core-subscriptions": "1.10.4", + "web3-utils": "1.10.4" }, "engines": { "node": ">=8.0.0" } }, "node_modules/web3-core-promievent": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.10.3.tgz", - "integrity": "sha512-HgjY+TkuLm5uTwUtaAfkTgRx/NzMxvVradCi02gy17NxDVdg/p6svBHcp037vcNpkuGeFznFJgULP+s2hdVgUQ==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.10.4.tgz", + "integrity": "sha512-2de5WnJQ72YcIhYwV/jHLc4/cWJnznuoGTJGD29ncFQHAfwW/MItHFSVKPPA5v8AhJe+r6y4Y12EKvZKjQVBvQ==", "dev": true, "dependencies": { "eventemitter3": "4.0.4" @@ -22860,29 +22883,29 @@ } }, "node_modules/web3-core-requestmanager": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.10.3.tgz", - "integrity": "sha512-VT9sKJfgM2yBOIxOXeXiDuFMP4pxzF6FT+y8KTLqhDFHkbG3XRe42Vm97mB/IvLQCJOmokEjl3ps8yP1kbggyw==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.10.4.tgz", + "integrity": "sha512-vqP6pKH8RrhT/2MoaU+DY/OsYK9h7HmEBNCdoMj+4ZwujQtw/Mq2JifjwsJ7gits7Q+HWJwx8q6WmQoVZAWugg==", "dev": true, "dependencies": { "util": "^0.12.5", - "web3-core-helpers": "1.10.3", - "web3-providers-http": "1.10.3", - "web3-providers-ipc": "1.10.3", - "web3-providers-ws": "1.10.3" + "web3-core-helpers": "1.10.4", + "web3-providers-http": "1.10.4", + "web3-providers-ipc": "1.10.4", + "web3-providers-ws": "1.10.4" }, "engines": { "node": ">=8.0.0" } }, "node_modules/web3-core-subscriptions": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.10.3.tgz", - "integrity": "sha512-KW0Mc8sgn70WadZu7RjQ4H5sNDJ5Lx8JMI3BWos+f2rW0foegOCyWhRu33W1s6ntXnqeBUw5rRCXZRlA3z+HNA==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.10.4.tgz", + "integrity": "sha512-o0lSQo/N/f7/L76C0HV63+S54loXiE9fUPfHFcTtpJRQNDBVsSDdWRdePbWwR206XlsBqD5VHApck1//jEafTw==", "dev": true, "dependencies": { "eventemitter3": "4.0.4", - "web3-core-helpers": "1.10.3" + "web3-core-helpers": "1.10.4" }, "engines": { "node": ">=8.0.0" @@ -22895,45 +22918,45 @@ "dev": true }, "node_modules/web3-eth": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.10.3.tgz", - "integrity": "sha512-Uk1U2qGiif2mIG8iKu23/EQJ2ksB1BQXy3wF3RvFuyxt8Ft9OEpmGlO7wOtAyJdoKzD5vcul19bJpPcWSAYZhA==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.10.4.tgz", + "integrity": "sha512-Sql2kYKmgt+T/cgvg7b9ce24uLS7xbFrxE4kuuor1zSCGrjhTJ5rRNG8gTJUkAJGKJc7KgnWmgW+cOfMBPUDSA==", "dev": true, "dependencies": { - "web3-core": "1.10.3", - "web3-core-helpers": "1.10.3", - "web3-core-method": "1.10.3", - "web3-core-subscriptions": "1.10.3", - "web3-eth-abi": "1.10.3", - "web3-eth-accounts": "1.10.3", - "web3-eth-contract": "1.10.3", - "web3-eth-ens": "1.10.3", - "web3-eth-iban": "1.10.3", - "web3-eth-personal": "1.10.3", - "web3-net": "1.10.3", - "web3-utils": "1.10.3" + "web3-core": "1.10.4", + "web3-core-helpers": "1.10.4", + "web3-core-method": "1.10.4", + "web3-core-subscriptions": "1.10.4", + "web3-eth-abi": "1.10.4", + "web3-eth-accounts": "1.10.4", + "web3-eth-contract": "1.10.4", + "web3-eth-ens": "1.10.4", + "web3-eth-iban": "1.10.4", + "web3-eth-personal": "1.10.4", + "web3-net": "1.10.4", + "web3-utils": "1.10.4" }, "engines": { "node": ">=8.0.0" } }, "node_modules/web3-eth-abi": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.10.3.tgz", - "integrity": "sha512-O8EvV67uhq0OiCMekqYsDtb6FzfYzMXT7VMHowF8HV6qLZXCGTdB/NH4nJrEh2mFtEwVdS6AmLFJAQd2kVyoMQ==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.10.4.tgz", + "integrity": "sha512-cZ0q65eJIkd/jyOlQPDjr8X4fU6CRL1eWgdLwbWEpo++MPU/2P4PFk5ZLAdye9T5Sdp+MomePPJ/gHjLMj2VfQ==", "dev": true, "dependencies": { "@ethersproject/abi": "^5.6.3", - "web3-utils": "1.10.3" + "web3-utils": "1.10.4" }, "engines": { "node": ">=8.0.0" } }, "node_modules/web3-eth-accounts": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.10.3.tgz", - "integrity": "sha512-8MipGgwusDVgn7NwKOmpeo3gxzzd+SmwcWeBdpXknuyDiZSQy9tXe+E9LeFGrmys/8mLLYP79n3jSbiTyv+6pQ==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.10.4.tgz", + "integrity": "sha512-ysy5sVTg9snYS7tJjxVoQAH6DTOTkRGR8emEVCWNGLGiB9txj+qDvSeT0izjurS/g7D5xlMAgrEHLK1Vi6I3yg==", "dev": true, "dependencies": { "@ethereumjs/common": "2.6.5", @@ -22942,10 +22965,10 @@ "eth-lib": "0.2.8", "scrypt-js": "^3.0.1", "uuid": "^9.0.0", - "web3-core": "1.10.3", - "web3-core-helpers": "1.10.3", - "web3-core-method": "1.10.3", - "web3-utils": "1.10.3" + "web3-core": "1.10.4", + "web3-core-helpers": "1.10.4", + "web3-core-method": "1.10.4", + "web3-utils": "1.10.4" }, "engines": { "node": ">=8.0.0" @@ -22982,68 +23005,68 @@ } }, "node_modules/web3-eth-contract": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.10.3.tgz", - "integrity": "sha512-Y2CW61dCCyY4IoUMD4JsEQWrILX4FJWDWC/Txx/pr3K/+fGsBGvS9kWQN5EsVXOp4g7HoFOfVh9Lf7BmVVSRmg==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.10.4.tgz", + "integrity": "sha512-Q8PfolOJ4eV9TvnTj1TGdZ4RarpSLmHnUnzVxZ/6/NiTfe4maJz99R0ISgwZkntLhLRtw0C7LRJuklzGYCNN3A==", "dev": true, "dependencies": { "@types/bn.js": "^5.1.1", - "web3-core": "1.10.3", - "web3-core-helpers": "1.10.3", - "web3-core-method": "1.10.3", - "web3-core-promievent": "1.10.3", - "web3-core-subscriptions": "1.10.3", - "web3-eth-abi": "1.10.3", - "web3-utils": "1.10.3" + "web3-core": "1.10.4", + "web3-core-helpers": "1.10.4", + "web3-core-method": "1.10.4", + "web3-core-promievent": "1.10.4", + "web3-core-subscriptions": "1.10.4", + "web3-eth-abi": "1.10.4", + "web3-utils": "1.10.4" }, "engines": { "node": ">=8.0.0" } }, "node_modules/web3-eth-ens": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.10.3.tgz", - "integrity": "sha512-hR+odRDXGqKemw1GFniKBEXpjYwLgttTES+bc7BfTeoUyUZXbyDHe5ifC+h+vpzxh4oS0TnfcIoarK0Z9tFSiQ==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.10.4.tgz", + "integrity": "sha512-LLrvxuFeVooRVZ9e5T6OWKVflHPFgrVjJ/jtisRWcmI7KN/b64+D/wJzXqgmp6CNsMQcE7rpmf4CQmJCrTdsgg==", "dev": true, "dependencies": { "content-hash": "^2.5.2", "eth-ens-namehash": "2.0.8", - "web3-core": "1.10.3", - "web3-core-helpers": "1.10.3", - "web3-core-promievent": "1.10.3", - "web3-eth-abi": "1.10.3", - "web3-eth-contract": "1.10.3", - "web3-utils": "1.10.3" + "web3-core": "1.10.4", + "web3-core-helpers": "1.10.4", + "web3-core-promievent": "1.10.4", + "web3-eth-abi": "1.10.4", + "web3-eth-contract": "1.10.4", + "web3-utils": "1.10.4" }, "engines": { "node": ">=8.0.0" } }, "node_modules/web3-eth-iban": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.3.tgz", - "integrity": "sha512-ZCfOjYKAjaX2TGI8uif5ah+J3BYFuo+47JOIV1RIz2l7kD9VfnxvRH5UiQDRyMALQC7KFd2hUqIEtHklapNyKA==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.4.tgz", + "integrity": "sha512-0gE5iNmOkmtBmbKH2aTodeompnNE8jEyvwFJ6s/AF6jkw9ky9Op9cqfzS56AYAbrqEFuClsqB/AoRves7LDELw==", "dev": true, "dependencies": { "bn.js": "^5.2.1", - "web3-utils": "1.10.3" + "web3-utils": "1.10.4" }, "engines": { "node": ">=8.0.0" } }, "node_modules/web3-eth-personal": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.10.3.tgz", - "integrity": "sha512-avrQ6yWdADIvuNQcFZXmGLCEzulQa76hUOuVywN7O3cklB4nFc/Gp3yTvD3bOAaE7DhjLQfhUTCzXL7WMxVTsw==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.10.4.tgz", + "integrity": "sha512-BRa/hs6jU1hKHz+AC/YkM71RP3f0Yci1dPk4paOic53R4ZZG4MgwKRkJhgt3/GPuPliwS46f/i5A7fEGBT4F9w==", "dev": true, "dependencies": { "@types/node": "^12.12.6", - "web3-core": "1.10.3", - "web3-core-helpers": "1.10.3", - "web3-core-method": "1.10.3", - "web3-net": "1.10.3", - "web3-utils": "1.10.3" + "web3-core": "1.10.4", + "web3-core-helpers": "1.10.4", + "web3-core-method": "1.10.4", + "web3-net": "1.10.4", + "web3-utils": "1.10.4" }, "engines": { "node": ">=8.0.0" @@ -23056,14 +23079,14 @@ "dev": true }, "node_modules/web3-net": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.10.3.tgz", - "integrity": "sha512-IoSr33235qVoI1vtKssPUigJU9Fc/Ph0T9CgRi15sx+itysmvtlmXMNoyd6Xrgm9LuM4CIhxz7yDzH93B79IFg==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.10.4.tgz", + "integrity": "sha512-mKINnhOOnZ4koA+yV2OT5s5ztVjIx7IY9a03w6s+yao/BUn+Luuty0/keNemZxTr1E8Ehvtn28vbOtW7Ids+Ow==", "dev": true, "dependencies": { - "web3-core": "1.10.3", - "web3-core-method": "1.10.3", - "web3-utils": "1.10.3" + "web3-core": "1.10.4", + "web3-core-method": "1.10.4", + "web3-utils": "1.10.4" }, "engines": { "node": ">=8.0.0" @@ -23177,15 +23200,15 @@ } }, "node_modules/web3-providers-http": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.10.3.tgz", - "integrity": "sha512-6dAgsHR3MxJ0Qyu3QLFlQEelTapVfWNTu5F45FYh8t7Y03T1/o+YAkVxsbY5AdmD+y5bXG/XPJ4q8tjL6MgZHw==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.10.4.tgz", + "integrity": "sha512-m2P5Idc8hdiO0l60O6DSCPw0kw64Zgi0pMjbEFRmxKIck2Py57RQMu4bxvkxJwkF06SlGaEQF8rFZBmuX7aagQ==", "dev": true, "dependencies": { "abortcontroller-polyfill": "^1.7.5", "cross-fetch": "^4.0.0", "es6-promise": "^4.2.8", - "web3-core-helpers": "1.10.3" + "web3-core-helpers": "1.10.4" }, "engines": { "node": ">=8.0.0" @@ -23201,26 +23224,26 @@ } }, "node_modules/web3-providers-ipc": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.10.3.tgz", - "integrity": "sha512-vP5WIGT8FLnGRfswTxNs9rMfS1vCbMezj/zHbBe/zB9GauBRTYVrUo2H/hVrhLg8Ut7AbsKZ+tCJ4mAwpKi2hA==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.10.4.tgz", + "integrity": "sha512-YRF/bpQk9z3WwjT+A6FI/GmWRCASgd+gC0si7f9zbBWLXjwzYAKG73bQBaFRAHex1hl4CVcM5WUMaQXf3Opeuw==", "dev": true, "dependencies": { "oboe": "2.1.5", - "web3-core-helpers": "1.10.3" + "web3-core-helpers": "1.10.4" }, "engines": { "node": ">=8.0.0" } }, "node_modules/web3-providers-ws": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.10.3.tgz", - "integrity": "sha512-/filBXRl48INxsh6AuCcsy4v5ndnTZ/p6bl67kmO9aK1wffv7CT++DrtclDtVMeDGCgB3van+hEf9xTAVXur7Q==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.10.4.tgz", + "integrity": "sha512-j3FBMifyuFFmUIPVQR4pj+t5ILhAexAui0opgcpu9R5LxQrLRUZxHSnU+YO25UycSOa/NAX8A+qkqZNpcFAlxA==", "dev": true, "dependencies": { "eventemitter3": "4.0.4", - "web3-core-helpers": "1.10.3", + "web3-core-helpers": "1.10.4", "websocket": "^1.0.32" }, "engines": { @@ -23228,25 +23251,25 @@ } }, "node_modules/web3-shh": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.10.3.tgz", - "integrity": "sha512-cAZ60CPvs9azdwMSQ/PSUdyV4PEtaW5edAZhu3rCXf6XxQRliBboic+AvwUvB6j3eswY50VGa5FygfVmJ1JVng==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.10.4.tgz", + "integrity": "sha512-cOH6iFFM71lCNwSQrC3niqDXagMqrdfFW85hC9PFUrAr3PUrIem8TNstTc3xna2bwZeWG6OBy99xSIhBvyIACw==", "dev": true, "hasInstallScript": true, "dependencies": { - "web3-core": "1.10.3", - "web3-core-method": "1.10.3", - "web3-core-subscriptions": "1.10.3", - "web3-net": "1.10.3" + "web3-core": "1.10.4", + "web3-core-method": "1.10.4", + "web3-core-subscriptions": "1.10.4", + "web3-net": "1.10.4" }, "engines": { "node": ">=8.0.0" } }, "node_modules/web3-utils": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.3.tgz", - "integrity": "sha512-OqcUrEE16fDBbGoQtZXWdavsPzbGIDc5v3VrRTZ0XrIpefC/viZ1ZU9bGEemazyS0catk/3rkOOxpzTfY+XsyQ==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.4.tgz", + "integrity": "sha512-tsu8FiKJLk2PzhDl9fXbGUWTkkVXYhtTA+SmEFkKft+9BgwLxfCRpU96sWv7ICC8zixBNd3JURVoiR3dUXgP8A==", "dev": true, "dependencies": { "@ethereumjs/util": "^8.1.0", @@ -23359,15 +23382,15 @@ "dev": true }, "node_modules/which-typed-array": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.13.tgz", - "integrity": "sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==", + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.14.tgz", + "integrity": "sha512-VnXFiIW8yNn9kIHN88xvZ4yOWchftKDsRJ8fEPacX/wl1lOvBrhsJ/OeJCXq7B0AaijRuqgzSKalJoPk+D8MPg==", "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.4", + "available-typed-arrays": "^1.0.6", + "call-bind": "^1.0.5", "for-each": "^0.3.3", "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0" + "has-tostringtag": "^1.0.1" }, "engines": { "node": ">= 0.4" @@ -23782,9 +23805,8 @@ }, "packages/LSP0ERC725Account/node_modules/typescript": { "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", "dev": true, + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -23880,6 +23902,36 @@ "typescript": "^5.3.3" } }, + "packages/LSP17Extensions": { + "name": "lsp17", + "version": "0.12.1", + "license": "Apache-2.0", + "dependencies": { + "@account-abstraction/contracts": "^0.6.0", + "@erc725/smart-contracts": "^7.0.0", + "@openzeppelin/contracts": "^4.9.3", + "lsp14": "*", + "lsp17contractextension": "*", + "lsp20": "*" + }, + "devDependencies": { + "@nomicfoundation/hardhat-toolbox": "^2.0.2", + "@typechain/ethers-v5": "^10.2.0", + "dotenv": "^16.0.3", + "eslint-config-custom": "*", + "ethers": "^5.7.2", + "hardhat": "^2.13.0", + "hardhat-contract-sizer": "^2.8.0", + "hardhat-deploy": "^0.11.25", + "hardhat-gas-reporter": "^1.0.9", + "hardhat-packager": "^1.4.2", + "solhint": "^3.3.6", + "ts-node": "^10.2.0", + "tsconfig": "*", + "typechain": "^8.0.0", + "typescript": "^5.3.3" + } + }, "packages/LSP1UniversalReceiver": { "name": "lsp1", "version": "0.12.1", @@ -27045,9 +27097,9 @@ "peer": true }, "@types/node": { - "version": "20.11.15", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.15.tgz", - "integrity": "sha512-gscmuADZfvNULx1eyirVbr3kVOVZtpQtzKMCZpeSZcN6MfbkRXAR4s9/gsQ4CzxLHw6EStDtKLNtSDL3vbq05A==", + "version": "20.11.16", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.16.tgz", + "integrity": "sha512-gKb0enTmRCzXSSUJDq6/sPcqrfCv2mkkG6Jt/clpn5eiCbKTY+SgZUxo+p8ZKMof5dCp9vHQUAB7wOUTod22wQ==", "requires": { "undici-types": "~5.26.4" } @@ -27619,13 +27671,13 @@ "dev": true }, "array-buffer-byte-length": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", - "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", + "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "is-array-buffer": "^3.0.1" + "call-bind": "^1.0.5", + "is-array-buffer": "^3.0.4" } }, "array-flatten": { @@ -27651,17 +27703,18 @@ "dev": true }, "arraybuffer.prototype.slice": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz", - "integrity": "sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", + "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", "dev": true, "requires": { - "array-buffer-byte-length": "^1.0.0", - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "get-intrinsic": "^1.2.1", - "is-array-buffer": "^3.0.2", + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.2.1", + "get-intrinsic": "^1.2.3", + "is-array-buffer": "^3.0.4", "is-shared-array-buffer": "^1.0.2" } }, @@ -28401,9 +28454,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001582", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001582.tgz", - "integrity": "sha512-vsJG3V5vgfduaQGVxL53uSX/HUzxyr2eA8xCo36OLal7sRcSZbibJtLeh0qja4sFOr/QQGt4opB4tOy+eOgAxg==" + "version": "1.0.30001584", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001584.tgz", + "integrity": "sha512-LOz7CCQ9M1G7OjJOF9/mzmqmj3jE/7VOmrfw6Mgs0E8cjOsbRXQJHsPBfmBOXDskXKrHLyyW3n7kpDW/4BsfpQ==" }, "case": { "version": "1.6.3", @@ -29556,9 +29609,9 @@ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, "electron-to-chromium": { - "version": "1.4.653", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.653.tgz", - "integrity": "sha512-wA2A2LQCqnEwQAvwADQq3KpMpNwgAUBnRmrFgRzHnPhbQUFArTR32Ab46f4p0MovDLcg4uqd4nCsN2hTltslpA==" + "version": "1.4.656", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.656.tgz", + "integrity": "sha512-9AQB5eFTHyR3Gvt2t/NwR0le2jBSUNwCnMbUCejFWHD+so4tH40/dRLgoE+jxlPeWS43XJewyvCv+I8LPMl49Q==" }, "elliptic": { "version": "6.5.4", @@ -29690,6 +29743,11 @@ "which-typed-array": "^1.1.13" } }, + "es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==" + }, "es-module-lexer": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.4.1.tgz", @@ -31178,9 +31236,9 @@ "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==" }, "fastq": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.0.tgz", - "integrity": "sha512-zGygtijUMT7jnk3h26kUms3BkSDp4IfIKjmnqI2tvx6nuBfiF1UqOxbnLfzdv+apBy+53oaImsKtMw/xYbW+1w==", + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", "requires": { "reusify": "^1.0.4" } @@ -31458,10 +31516,11 @@ "peer": true }, "get-intrinsic": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz", - "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.3.tgz", + "integrity": "sha512-JIcZczvcMVE7AUOP+X72bh8HqHBRxFdz5PDHYtNG/lE3yk9b3KZBJlwFcTyPYjg3L4RLLmZJzvjxhaZVapxFrQ==", "requires": { + "es-errors": "^1.0.0", "function-bind": "^1.1.2", "has-proto": "^1.0.1", "has-symbols": "^1.0.3", @@ -32803,11 +32862,11 @@ "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==" }, "has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", "requires": { - "has-symbols": "^1.0.2" + "has-symbols": "^1.0.3" } }, "has-value": { @@ -33276,14 +33335,13 @@ } }, "is-array-buffer": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", - "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", + "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", "dev": true, "requires": { "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.0", - "is-typed-array": "^1.1.10" + "get-intrinsic": "^1.2.1" } }, "is-arrayish": { @@ -33549,11 +33607,11 @@ } }, "is-typed-array": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", - "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", + "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", "requires": { - "which-typed-array": "^1.1.11" + "which-typed-array": "^1.1.14" } }, "is-typedarray": { @@ -34296,8 +34354,6 @@ "dependencies": { "typescript": { "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", "dev": true } } @@ -34378,6 +34434,32 @@ "typescript": "^5.3.3" } }, + "lsp17": { + "version": "file:packages/LSP17Extensions", + "requires": { + "@account-abstraction/contracts": "^0.6.0", + "@erc725/smart-contracts": "^7.0.0", + "@nomicfoundation/hardhat-toolbox": "^2.0.2", + "@openzeppelin/contracts": "^4.9.3", + "@typechain/ethers-v5": "^10.2.0", + "dotenv": "^16.0.3", + "eslint-config-custom": "*", + "ethers": "^5.7.2", + "hardhat": "^2.13.0", + "hardhat-contract-sizer": "^2.8.0", + "hardhat-deploy": "^0.11.25", + "hardhat-gas-reporter": "^1.0.9", + "hardhat-packager": "^1.4.2", + "lsp14": "*", + "lsp17contractextension": "*", + "lsp20": "*", + "solhint": "^3.3.6", + "ts-node": "^10.2.0", + "tsconfig": "*", + "typechain": "^8.0.0", + "typescript": "^5.3.3" + } + }, "lsp17contractextension": { "version": "file:packages/LSP17ContractExtension", "requires": { @@ -39408,9 +39490,9 @@ "dev": true }, "ts-api-utils": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.3.tgz", - "integrity": "sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.2.0.tgz", + "integrity": "sha512-d+3WxW4r8WQy2cZWpNRPPGExX8ffOLGcIhheUANKbL5Sqjbhkneki76fRAWeXkaslV2etTb4tSJBSxOsH5+CJw==", "requires": {} }, "ts-command-line-args": { @@ -40059,9 +40141,9 @@ } }, "undici": { - "version": "5.28.2", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.2.tgz", - "integrity": "sha512-wh1pHJHnUeQV5Xa8/kyQhO7WFa8M34l026L5P/+2TYiakvGy5Rdc8jWZVyG7ieht/0WgJLEd3kcU5gKx+6GC8w==", + "version": "5.28.3", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.3.tgz", + "integrity": "sha512-3ItfzbrhDlINjaP0duwnNsKpDQk3acHI3gVJ1z4fmwMK31k5G9OVIAMLSIaP6w4FaGkaAkN6zaQO9LUvZ1t7VA==", "dev": true, "requires": { "@fastify/busboy": "^2.0.0" @@ -40933,24 +41015,24 @@ } }, "web3": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3/-/web3-1.10.3.tgz", - "integrity": "sha512-DgUdOOqC/gTqW+VQl1EdPxrVRPB66xVNtuZ5KD4adVBtko87hkgM8BTZ0lZ8IbUfnQk6DyjcDujMiH3oszllAw==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3/-/web3-1.10.4.tgz", + "integrity": "sha512-kgJvQZjkmjOEKimx/tJQsqWfRDPTTcBfYPa9XletxuHLpHcXdx67w8EFn5AW3eVxCutE9dTVHgGa9VYe8vgsEA==", "dev": true, "requires": { - "web3-bzz": "1.10.3", - "web3-core": "1.10.3", - "web3-eth": "1.10.3", - "web3-eth-personal": "1.10.3", - "web3-net": "1.10.3", - "web3-shh": "1.10.3", - "web3-utils": "1.10.3" + "web3-bzz": "1.10.4", + "web3-core": "1.10.4", + "web3-eth": "1.10.4", + "web3-eth-personal": "1.10.4", + "web3-net": "1.10.4", + "web3-shh": "1.10.4", + "web3-utils": "1.10.4" } }, "web3-bzz": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.10.3.tgz", - "integrity": "sha512-XDIRsTwekdBXtFytMpHBuun4cK4x0ZMIDXSoo1UVYp+oMyZj07c7gf7tNQY5qZ/sN+CJIas4ilhN25VJcjSijQ==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-bzz/-/web3-bzz-1.10.4.tgz", + "integrity": "sha512-ZZ/X4sJ0Uh2teU9lAGNS8EjveEppoHNQiKlOXAjedsrdWuaMErBPdLQjXfcrYvN6WM6Su9PMsAxf3FXXZ+HwQw==", "dev": true, "requires": { "@types/node": "^12.12.6", @@ -41091,18 +41173,18 @@ } }, "web3-core": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.10.3.tgz", - "integrity": "sha512-Vbk0/vUNZxJlz3RFjAhNNt7qTpX8yE3dn3uFxfX5OHbuon5u65YEOd3civ/aQNW745N0vGUlHFNxxmn+sG9DIw==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-core/-/web3-core-1.10.4.tgz", + "integrity": "sha512-B6elffYm81MYZDTrat7aEhnhdtVE3lDBUZft16Z8awYMZYJDbnykEbJVS+l3mnA7AQTnSDr/1MjWofGDLBJPww==", "dev": true, "requires": { "@types/bn.js": "^5.1.1", "@types/node": "^12.12.6", "bignumber.js": "^9.0.0", - "web3-core-helpers": "1.10.3", - "web3-core-method": "1.10.3", - "web3-core-requestmanager": "1.10.3", - "web3-utils": "1.10.3" + "web3-core-helpers": "1.10.4", + "web3-core-method": "1.10.4", + "web3-core-requestmanager": "1.10.4", + "web3-utils": "1.10.4" }, "dependencies": { "@types/node": { @@ -41114,94 +41196,94 @@ } }, "web3-core-helpers": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.3.tgz", - "integrity": "sha512-Yv7dQC3B9ipOc5sWm3VAz1ys70Izfzb8n9rSiQYIPjpqtJM+3V4EeK6ghzNR6CO2es0+Yu9CtCkw0h8gQhrTxA==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-core-helpers/-/web3-core-helpers-1.10.4.tgz", + "integrity": "sha512-r+L5ylA17JlD1vwS8rjhWr0qg7zVoVMDvWhajWA5r5+USdh91jRUYosp19Kd1m2vE034v7Dfqe1xYRoH2zvG0g==", "dev": true, "requires": { - "web3-eth-iban": "1.10.3", - "web3-utils": "1.10.3" + "web3-eth-iban": "1.10.4", + "web3-utils": "1.10.4" } }, "web3-core-method": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.10.3.tgz", - "integrity": "sha512-VZ/Dmml4NBmb0ep5PTSg9oqKoBtG0/YoMPei/bq/tUdlhB2dMB79sbeJPwx592uaV0Vpk7VltrrrBv5hTM1y4Q==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-core-method/-/web3-core-method-1.10.4.tgz", + "integrity": "sha512-uZTb7flr+Xl6LaDsyTeE2L1TylokCJwTDrIVfIfnrGmnwLc6bmTWCCrm71sSrQ0hqs6vp/MKbQYIYqUN0J8WyA==", "dev": true, "requires": { "@ethersproject/transactions": "^5.6.2", - "web3-core-helpers": "1.10.3", - "web3-core-promievent": "1.10.3", - "web3-core-subscriptions": "1.10.3", - "web3-utils": "1.10.3" + "web3-core-helpers": "1.10.4", + "web3-core-promievent": "1.10.4", + "web3-core-subscriptions": "1.10.4", + "web3-utils": "1.10.4" } }, "web3-core-promievent": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.10.3.tgz", - "integrity": "sha512-HgjY+TkuLm5uTwUtaAfkTgRx/NzMxvVradCi02gy17NxDVdg/p6svBHcp037vcNpkuGeFznFJgULP+s2hdVgUQ==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-core-promievent/-/web3-core-promievent-1.10.4.tgz", + "integrity": "sha512-2de5WnJQ72YcIhYwV/jHLc4/cWJnznuoGTJGD29ncFQHAfwW/MItHFSVKPPA5v8AhJe+r6y4Y12EKvZKjQVBvQ==", "dev": true, "requires": { "eventemitter3": "4.0.4" } }, "web3-core-requestmanager": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.10.3.tgz", - "integrity": "sha512-VT9sKJfgM2yBOIxOXeXiDuFMP4pxzF6FT+y8KTLqhDFHkbG3XRe42Vm97mB/IvLQCJOmokEjl3ps8yP1kbggyw==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-core-requestmanager/-/web3-core-requestmanager-1.10.4.tgz", + "integrity": "sha512-vqP6pKH8RrhT/2MoaU+DY/OsYK9h7HmEBNCdoMj+4ZwujQtw/Mq2JifjwsJ7gits7Q+HWJwx8q6WmQoVZAWugg==", "dev": true, "requires": { "util": "^0.12.5", - "web3-core-helpers": "1.10.3", - "web3-providers-http": "1.10.3", - "web3-providers-ipc": "1.10.3", - "web3-providers-ws": "1.10.3" + "web3-core-helpers": "1.10.4", + "web3-providers-http": "1.10.4", + "web3-providers-ipc": "1.10.4", + "web3-providers-ws": "1.10.4" } }, "web3-core-subscriptions": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.10.3.tgz", - "integrity": "sha512-KW0Mc8sgn70WadZu7RjQ4H5sNDJ5Lx8JMI3BWos+f2rW0foegOCyWhRu33W1s6ntXnqeBUw5rRCXZRlA3z+HNA==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-core-subscriptions/-/web3-core-subscriptions-1.10.4.tgz", + "integrity": "sha512-o0lSQo/N/f7/L76C0HV63+S54loXiE9fUPfHFcTtpJRQNDBVsSDdWRdePbWwR206XlsBqD5VHApck1//jEafTw==", "dev": true, "requires": { "eventemitter3": "4.0.4", - "web3-core-helpers": "1.10.3" + "web3-core-helpers": "1.10.4" } }, "web3-eth": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.10.3.tgz", - "integrity": "sha512-Uk1U2qGiif2mIG8iKu23/EQJ2ksB1BQXy3wF3RvFuyxt8Ft9OEpmGlO7wOtAyJdoKzD5vcul19bJpPcWSAYZhA==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-eth/-/web3-eth-1.10.4.tgz", + "integrity": "sha512-Sql2kYKmgt+T/cgvg7b9ce24uLS7xbFrxE4kuuor1zSCGrjhTJ5rRNG8gTJUkAJGKJc7KgnWmgW+cOfMBPUDSA==", "dev": true, "requires": { - "web3-core": "1.10.3", - "web3-core-helpers": "1.10.3", - "web3-core-method": "1.10.3", - "web3-core-subscriptions": "1.10.3", - "web3-eth-abi": "1.10.3", - "web3-eth-accounts": "1.10.3", - "web3-eth-contract": "1.10.3", - "web3-eth-ens": "1.10.3", - "web3-eth-iban": "1.10.3", - "web3-eth-personal": "1.10.3", - "web3-net": "1.10.3", - "web3-utils": "1.10.3" + "web3-core": "1.10.4", + "web3-core-helpers": "1.10.4", + "web3-core-method": "1.10.4", + "web3-core-subscriptions": "1.10.4", + "web3-eth-abi": "1.10.4", + "web3-eth-accounts": "1.10.4", + "web3-eth-contract": "1.10.4", + "web3-eth-ens": "1.10.4", + "web3-eth-iban": "1.10.4", + "web3-eth-personal": "1.10.4", + "web3-net": "1.10.4", + "web3-utils": "1.10.4" } }, "web3-eth-abi": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.10.3.tgz", - "integrity": "sha512-O8EvV67uhq0OiCMekqYsDtb6FzfYzMXT7VMHowF8HV6qLZXCGTdB/NH4nJrEh2mFtEwVdS6AmLFJAQd2kVyoMQ==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-eth-abi/-/web3-eth-abi-1.10.4.tgz", + "integrity": "sha512-cZ0q65eJIkd/jyOlQPDjr8X4fU6CRL1eWgdLwbWEpo++MPU/2P4PFk5ZLAdye9T5Sdp+MomePPJ/gHjLMj2VfQ==", "dev": true, "requires": { "@ethersproject/abi": "^5.6.3", - "web3-utils": "1.10.3" + "web3-utils": "1.10.4" } }, "web3-eth-accounts": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.10.3.tgz", - "integrity": "sha512-8MipGgwusDVgn7NwKOmpeo3gxzzd+SmwcWeBdpXknuyDiZSQy9tXe+E9LeFGrmys/8mLLYP79n3jSbiTyv+6pQ==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-eth-accounts/-/web3-eth-accounts-1.10.4.tgz", + "integrity": "sha512-ysy5sVTg9snYS7tJjxVoQAH6DTOTkRGR8emEVCWNGLGiB9txj+qDvSeT0izjurS/g7D5xlMAgrEHLK1Vi6I3yg==", "dev": true, "requires": { "@ethereumjs/common": "2.6.5", @@ -41210,10 +41292,10 @@ "eth-lib": "0.2.8", "scrypt-js": "^3.0.1", "uuid": "^9.0.0", - "web3-core": "1.10.3", - "web3-core-helpers": "1.10.3", - "web3-core-method": "1.10.3", - "web3-utils": "1.10.3" + "web3-core": "1.10.4", + "web3-core-helpers": "1.10.4", + "web3-core-method": "1.10.4", + "web3-utils": "1.10.4" }, "dependencies": { "bn.js": { @@ -41242,59 +41324,59 @@ } }, "web3-eth-contract": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.10.3.tgz", - "integrity": "sha512-Y2CW61dCCyY4IoUMD4JsEQWrILX4FJWDWC/Txx/pr3K/+fGsBGvS9kWQN5EsVXOp4g7HoFOfVh9Lf7BmVVSRmg==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-eth-contract/-/web3-eth-contract-1.10.4.tgz", + "integrity": "sha512-Q8PfolOJ4eV9TvnTj1TGdZ4RarpSLmHnUnzVxZ/6/NiTfe4maJz99R0ISgwZkntLhLRtw0C7LRJuklzGYCNN3A==", "dev": true, "requires": { "@types/bn.js": "^5.1.1", - "web3-core": "1.10.3", - "web3-core-helpers": "1.10.3", - "web3-core-method": "1.10.3", - "web3-core-promievent": "1.10.3", - "web3-core-subscriptions": "1.10.3", - "web3-eth-abi": "1.10.3", - "web3-utils": "1.10.3" + "web3-core": "1.10.4", + "web3-core-helpers": "1.10.4", + "web3-core-method": "1.10.4", + "web3-core-promievent": "1.10.4", + "web3-core-subscriptions": "1.10.4", + "web3-eth-abi": "1.10.4", + "web3-utils": "1.10.4" } }, "web3-eth-ens": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.10.3.tgz", - "integrity": "sha512-hR+odRDXGqKemw1GFniKBEXpjYwLgttTES+bc7BfTeoUyUZXbyDHe5ifC+h+vpzxh4oS0TnfcIoarK0Z9tFSiQ==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-eth-ens/-/web3-eth-ens-1.10.4.tgz", + "integrity": "sha512-LLrvxuFeVooRVZ9e5T6OWKVflHPFgrVjJ/jtisRWcmI7KN/b64+D/wJzXqgmp6CNsMQcE7rpmf4CQmJCrTdsgg==", "dev": true, "requires": { "content-hash": "^2.5.2", "eth-ens-namehash": "2.0.8", - "web3-core": "1.10.3", - "web3-core-helpers": "1.10.3", - "web3-core-promievent": "1.10.3", - "web3-eth-abi": "1.10.3", - "web3-eth-contract": "1.10.3", - "web3-utils": "1.10.3" + "web3-core": "1.10.4", + "web3-core-helpers": "1.10.4", + "web3-core-promievent": "1.10.4", + "web3-eth-abi": "1.10.4", + "web3-eth-contract": "1.10.4", + "web3-utils": "1.10.4" } }, "web3-eth-iban": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.3.tgz", - "integrity": "sha512-ZCfOjYKAjaX2TGI8uif5ah+J3BYFuo+47JOIV1RIz2l7kD9VfnxvRH5UiQDRyMALQC7KFd2hUqIEtHklapNyKA==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-eth-iban/-/web3-eth-iban-1.10.4.tgz", + "integrity": "sha512-0gE5iNmOkmtBmbKH2aTodeompnNE8jEyvwFJ6s/AF6jkw9ky9Op9cqfzS56AYAbrqEFuClsqB/AoRves7LDELw==", "dev": true, "requires": { "bn.js": "^5.2.1", - "web3-utils": "1.10.3" + "web3-utils": "1.10.4" } }, "web3-eth-personal": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.10.3.tgz", - "integrity": "sha512-avrQ6yWdADIvuNQcFZXmGLCEzulQa76hUOuVywN7O3cklB4nFc/Gp3yTvD3bOAaE7DhjLQfhUTCzXL7WMxVTsw==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-eth-personal/-/web3-eth-personal-1.10.4.tgz", + "integrity": "sha512-BRa/hs6jU1hKHz+AC/YkM71RP3f0Yci1dPk4paOic53R4ZZG4MgwKRkJhgt3/GPuPliwS46f/i5A7fEGBT4F9w==", "dev": true, "requires": { "@types/node": "^12.12.6", - "web3-core": "1.10.3", - "web3-core-helpers": "1.10.3", - "web3-core-method": "1.10.3", - "web3-net": "1.10.3", - "web3-utils": "1.10.3" + "web3-core": "1.10.4", + "web3-core-helpers": "1.10.4", + "web3-core-method": "1.10.4", + "web3-net": "1.10.4", + "web3-utils": "1.10.4" }, "dependencies": { "@types/node": { @@ -41306,14 +41388,14 @@ } }, "web3-net": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.10.3.tgz", - "integrity": "sha512-IoSr33235qVoI1vtKssPUigJU9Fc/Ph0T9CgRi15sx+itysmvtlmXMNoyd6Xrgm9LuM4CIhxz7yDzH93B79IFg==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-net/-/web3-net-1.10.4.tgz", + "integrity": "sha512-mKINnhOOnZ4koA+yV2OT5s5ztVjIx7IY9a03w6s+yao/BUn+Luuty0/keNemZxTr1E8Ehvtn28vbOtW7Ids+Ow==", "dev": true, "requires": { - "web3-core": "1.10.3", - "web3-core-method": "1.10.3", - "web3-utils": "1.10.3" + "web3-core": "1.10.4", + "web3-core-method": "1.10.4", + "web3-utils": "1.10.4" } }, "web3-provider-engine": { @@ -41420,15 +41502,15 @@ } }, "web3-providers-http": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.10.3.tgz", - "integrity": "sha512-6dAgsHR3MxJ0Qyu3QLFlQEelTapVfWNTu5F45FYh8t7Y03T1/o+YAkVxsbY5AdmD+y5bXG/XPJ4q8tjL6MgZHw==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-providers-http/-/web3-providers-http-1.10.4.tgz", + "integrity": "sha512-m2P5Idc8hdiO0l60O6DSCPw0kw64Zgi0pMjbEFRmxKIck2Py57RQMu4bxvkxJwkF06SlGaEQF8rFZBmuX7aagQ==", "dev": true, "requires": { "abortcontroller-polyfill": "^1.7.5", "cross-fetch": "^4.0.0", "es6-promise": "^4.2.8", - "web3-core-helpers": "1.10.3" + "web3-core-helpers": "1.10.4" }, "dependencies": { "cross-fetch": { @@ -41443,42 +41525,42 @@ } }, "web3-providers-ipc": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.10.3.tgz", - "integrity": "sha512-vP5WIGT8FLnGRfswTxNs9rMfS1vCbMezj/zHbBe/zB9GauBRTYVrUo2H/hVrhLg8Ut7AbsKZ+tCJ4mAwpKi2hA==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-providers-ipc/-/web3-providers-ipc-1.10.4.tgz", + "integrity": "sha512-YRF/bpQk9z3WwjT+A6FI/GmWRCASgd+gC0si7f9zbBWLXjwzYAKG73bQBaFRAHex1hl4CVcM5WUMaQXf3Opeuw==", "dev": true, "requires": { "oboe": "2.1.5", - "web3-core-helpers": "1.10.3" + "web3-core-helpers": "1.10.4" } }, "web3-providers-ws": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.10.3.tgz", - "integrity": "sha512-/filBXRl48INxsh6AuCcsy4v5ndnTZ/p6bl67kmO9aK1wffv7CT++DrtclDtVMeDGCgB3van+hEf9xTAVXur7Q==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-providers-ws/-/web3-providers-ws-1.10.4.tgz", + "integrity": "sha512-j3FBMifyuFFmUIPVQR4pj+t5ILhAexAui0opgcpu9R5LxQrLRUZxHSnU+YO25UycSOa/NAX8A+qkqZNpcFAlxA==", "dev": true, "requires": { "eventemitter3": "4.0.4", - "web3-core-helpers": "1.10.3", + "web3-core-helpers": "1.10.4", "websocket": "^1.0.32" } }, "web3-shh": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.10.3.tgz", - "integrity": "sha512-cAZ60CPvs9azdwMSQ/PSUdyV4PEtaW5edAZhu3rCXf6XxQRliBboic+AvwUvB6j3eswY50VGa5FygfVmJ1JVng==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-shh/-/web3-shh-1.10.4.tgz", + "integrity": "sha512-cOH6iFFM71lCNwSQrC3niqDXagMqrdfFW85hC9PFUrAr3PUrIem8TNstTc3xna2bwZeWG6OBy99xSIhBvyIACw==", "dev": true, "requires": { - "web3-core": "1.10.3", - "web3-core-method": "1.10.3", - "web3-core-subscriptions": "1.10.3", - "web3-net": "1.10.3" + "web3-core": "1.10.4", + "web3-core-method": "1.10.4", + "web3-core-subscriptions": "1.10.4", + "web3-net": "1.10.4" } }, "web3-utils": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.3.tgz", - "integrity": "sha512-OqcUrEE16fDBbGoQtZXWdavsPzbGIDc5v3VrRTZ0XrIpefC/viZ1ZU9bGEemazyS0catk/3rkOOxpzTfY+XsyQ==", + "version": "1.10.4", + "resolved": "https://registry.npmjs.org/web3-utils/-/web3-utils-1.10.4.tgz", + "integrity": "sha512-tsu8FiKJLk2PzhDl9fXbGUWTkkVXYhtTA+SmEFkKft+9BgwLxfCRpU96sWv7ICC8zixBNd3JURVoiR3dUXgP8A==", "dev": true, "requires": { "@ethereumjs/util": "^8.1.0", @@ -41580,15 +41662,15 @@ "dev": true }, "which-typed-array": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.13.tgz", - "integrity": "sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==", + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.14.tgz", + "integrity": "sha512-VnXFiIW8yNn9kIHN88xvZ4yOWchftKDsRJ8fEPacX/wl1lOvBrhsJ/OeJCXq7B0AaijRuqgzSKalJoPk+D8MPg==", "requires": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.4", + "available-typed-arrays": "^1.0.6", + "call-bind": "^1.0.5", "for-each": "^0.3.3", "gopd": "^1.0.1", - "has-tostringtag": "^1.0.0" + "has-tostringtag": "^1.0.1" } }, "widest-line": { diff --git a/package.json b/package.json index ca92260e4..9f0f27c1e 100644 --- a/package.json +++ b/package.json @@ -120,6 +120,7 @@ "lsp6": "*", "lsp10": "*", "lsp14": "*", + "lsp17": "*", "lsp17contractextension": "*", "lsp20": "*", "lsp25": "*" diff --git a/packages/LSP17Extensions/.eslintrc.js b/packages/LSP17Extensions/.eslintrc.js new file mode 100644 index 000000000..03ee7431b --- /dev/null +++ b/packages/LSP17Extensions/.eslintrc.js @@ -0,0 +1,4 @@ +module.exports = { + root: true, + extends: ['custom'], +}; diff --git a/packages/LSP17Extensions/.solhint.json b/packages/LSP17Extensions/.solhint.json new file mode 100644 index 000000000..26e01c48a --- /dev/null +++ b/packages/LSP17Extensions/.solhint.json @@ -0,0 +1,25 @@ +{ + "extends": "solhint:recommended", + "rules": { + "avoid-sha3": "error", + "avoid-suicide": "error", + "avoid-throw": "error", + "avoid-tx-origin": "error", + "check-send-result": "error", + "compiler-version": ["error", "^0.8.0"], + "func-visibility": ["error", { "ignoreConstructors": true }], + "not-rely-on-block-hash": "error", + "not-rely-on-time": "error", + "reentrancy": "error", + "constructor-syntax": "error", + "private-vars-leading-underscore": ["error", { "strict": false }], + "imports-on-top": "error", + "visibility-modifier-order": "error", + "no-unused-import": "error", + "no-global-import": "error", + "reason-string": ["warn", { "maxLength": 120 }], + "avoid-low-level-calls": "off", + "no-empty-blocks": ["error", { "ignoreConstructors": true }], + "custom-errors": "off" + } +} diff --git a/packages/LSP17Extensions/README.md b/packages/LSP17Extensions/README.md new file mode 100644 index 000000000..b20e99c1b --- /dev/null +++ b/packages/LSP17Extensions/README.md @@ -0,0 +1,6 @@ +# LSP17 Extensions Package + +Package for the LSP17 Extensions, that includes the following extensions: + +- the `Extension4337` extension, which contains the `validateUserOp` function from the [`ERC4337` standard](https://eips.ethereum.org/EIPS/eip-4337). +- the `OnERC721ReceivedExtension` extension that contains the `onERC721Received` function from the [`ERC721` standard](https://eips.ethereum.org/EIPS/eip-721). diff --git a/contracts/LSP17Extensions/Extension4337.sol b/packages/LSP17Extensions/contracts/Extension4337.sol similarity index 100% rename from contracts/LSP17Extensions/Extension4337.sol rename to packages/LSP17Extensions/contracts/Extension4337.sol diff --git a/contracts/LSP17Extensions/OnERC721ReceivedExtension.sol b/packages/LSP17Extensions/contracts/OnERC721ReceivedExtension.sol similarity index 100% rename from contracts/LSP17Extensions/OnERC721ReceivedExtension.sol rename to packages/LSP17Extensions/contracts/OnERC721ReceivedExtension.sol diff --git a/packages/LSP17Extensions/hardhat.config.ts b/packages/LSP17Extensions/hardhat.config.ts new file mode 100644 index 000000000..d818a205d --- /dev/null +++ b/packages/LSP17Extensions/hardhat.config.ts @@ -0,0 +1,128 @@ +import { HardhatUserConfig } from 'hardhat/config'; +import { NetworkUserConfig } from 'hardhat/types'; +import { config as dotenvConfig } from 'dotenv'; +import { resolve } from 'path'; + +/** + * this package includes: + * - @nomiclabs/hardhat-ethers + * - @nomicfoundation/hardhat-chai-matchers + * - @nomicfoundation/hardhat-network-helpers + * - @nomiclabs/hardhat-etherscan + * - hardhat-gas-reporter (is this true? Why do we have it as a separate dependency?) + * - @typechain/hardhat + * - solidity-coverage + */ +import '@nomicfoundation/hardhat-toolbox'; + +// additional hardhat plugins +import 'hardhat-packager'; +import 'hardhat-contract-sizer'; +import 'hardhat-deploy'; + +// custom built hardhat plugins and scripts +// can be imported here (e.g: docs generation, gas benchmark, etc...) + +dotenvConfig({ path: resolve(__dirname, './.env') }); + +function getTestnetChainConfig(): NetworkUserConfig { + const config: NetworkUserConfig = { + live: true, + url: 'https://rpc.testnet.lukso.network', + chainId: 4201, + }; + + if (process.env.CONTRACT_VERIFICATION_TESTNET_PK !== undefined) { + config['accounts'] = [process.env.CONTRACT_VERIFICATION_TESTNET_PK]; + } + + return config; +} + +const config: HardhatUserConfig = { + defaultNetwork: 'hardhat', + networks: { + hardhat: { + live: false, + saveDeployments: false, + allowBlocksWithSameTimestamp: true, + }, + luksoTestnet: getTestnetChainConfig(), + }, + namedAccounts: { + owner: 0, + }, + // uncomment if the contracts from this LSP package must be deployed at deterministic + // // addresses across multiple chains + // deterministicDeployment: { + // luksoTestnet: { + // // Nick Factory. See https://github.com/Arachnid/deterministic-deployment-proxy + // factory: '0x4e59b44847b379578588920ca78fbf26c0b4956c', + // deployer: '0x3fab184622dc19b6109349b94811493bf2a45362', + // funding: '0x0000000000000000000000000000000000000000000000000000000000000000', + // signedTx: + // '0xf8a58085174876e800830186a08080b853604580600e600039806000f350fe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe03601600081602082378035828234f58015156039578182fd5b8082525050506014600cf31ba02222222222222222222222222222222222222222222222222222222222222222a02222222222222222222222222222222222222222222222222222222222222222', + // }, + // }, + etherscan: { + apiKey: 'no-api-key-needed', + customChains: [ + { + network: 'luksoTestnet', + chainId: 4201, + urls: { + apiURL: 'https://api.explorer.execution.testnet.lukso.network/api', + browserURL: 'https://explorer.execution.testnet.lukso.network/', + }, + }, + ], + }, + gasReporter: { + enabled: true, + currency: 'USD', + gasPrice: 21, + excludeContracts: ['Helpers/'], + src: './contracts', + showMethodSig: true, + }, + solidity: { + version: '0.8.17', + settings: { + optimizer: { + enabled: true, + /** + * Optimize for how many times you intend to run the code. + * Lower values will optimize more for initial deployment cost, higher + * values will optimize more for high-frequency usage. + * @see https://docs.soliditylang.org/en/v0.8.6/internals/optimizer.html#opcode-based-optimizer-module + */ + runs: 1000, + }, + outputSelection: { + '*': { + '*': ['storageLayout'], + }, + }, + }, + }, + packager: { + // What contracts to keep the artifacts and the bindings for. + contracts: [], + // Whether to include the TypeChain factories or not. + // If this is enabled, you need to run the TypeChain files through the TypeScript compiler before shipping to the registry. + includeFactories: true, + }, + paths: { + artifacts: 'artifacts', + tests: 'tests', + }, + typechain: { + outDir: 'types', + target: 'ethers-v5', + }, + mocha: { + timeout: 10000000, + }, +}; + +export default config; diff --git a/packages/LSP17Extensions/package.json b/packages/LSP17Extensions/package.json new file mode 100644 index 000000000..de9e1c1bf --- /dev/null +++ b/packages/LSP17Extensions/package.json @@ -0,0 +1,49 @@ +{ + "name": "lsp17", + "version": "0.12.1", + "description": "Package for the LSP17 extensions", + "license": "Apache-2.0", + "author": "", + "keywords": [ + "LUKSO", + "LSP", + "Blockchain", + "Standards", + "Smart Contracts", + "Ethereum", + "EVM", + "Solidity" + ], + "scripts": { + "build": "hardhat compile --show-stack-traces", + "clean": "hardhat clean", + "format": "prettier --write .", + "lint": "eslint . --ext .ts,.js", + "lint:solidity": "solhint 'contracts/**/*.sol' && prettier --check 'contracts/**/*.sol'" + }, + "dependencies": { + "@erc725/smart-contracts": "^7.0.0", + "@openzeppelin/contracts": "^4.9.3", + "@account-abstraction/contracts": "^0.6.0", + "lsp14": "*", + "lsp17contractextension": "*", + "lsp20": "*" + }, + "devDependencies": { + "@nomicfoundation/hardhat-toolbox": "^2.0.2", + "@typechain/ethers-v5": "^10.2.0", + "dotenv": "^16.0.3", + "eslint-config-custom": "*", + "ethers": "^5.7.2", + "hardhat": "^2.13.0", + "hardhat-contract-sizer": "^2.8.0", + "hardhat-deploy": "^0.11.25", + "hardhat-gas-reporter": "^1.0.9", + "hardhat-packager": "^1.4.2", + "solhint": "^3.3.6", + "ts-node": "^10.2.0", + "tsconfig": "*", + "typechain": "^8.0.0", + "typescript": "^5.3.3" + } +} diff --git a/packages/LSP17Extensions/tsconfig.json b/packages/LSP17Extensions/tsconfig.json new file mode 100644 index 000000000..b7a34e03f --- /dev/null +++ b/packages/LSP17Extensions/tsconfig.json @@ -0,0 +1,4 @@ +{ + "extends": "tsconfig/contracts.json", + "include": ["**/*.ts"] +} diff --git a/remappings.txt b/remappings.txt index c295d48e6..a048d3728 100644 --- a/remappings.txt +++ b/remappings.txt @@ -16,5 +16,6 @@ lsp6/=packages/LSP6KeyManager/ lsp10/=packages/LSP10ReceivedVaults/ lsp14/=packages/LSP14Ownable2Step/ lsp17contractextension/=packages/LSP17ContractExtension/ +lsp17/=packages/LSP17Extensions lsp20/=packages/LSP20CallVerification/ lsp25/=packages/LSP25ExecuteRelayCall/