diff --git a/docs/contracts/_interface_ids_table.mdx b/docs/contracts/_interface_ids_table.mdx
index f7dd19f4ad..acba017e97 100644
--- a/docs/contracts/_interface_ids_table.mdx
+++ b/docs/contracts/_interface_ids_table.mdx
@@ -8,8 +8,8 @@
| **LSP1UniversalReceiver** | `0x6bb56a14` | Interface of the LSP1 - Universal Receiver standard, an entry function for a contract to receive arbitrary information. |
| **LSP1UniversalReceiverDelegate** | `0xa245bbda` | Interface of the LSP1 - Universal Receiver Delegate standard. |
| **LSP6KeyManager** | `0x23f34c62` | Interface of the LSP6 - Key Manager standard, a contract acting as a controller of an ERC725 Account using predfined permissions. |
-| **LSP7DigitalAsset** | `0xdaa746b7` | Interface of the LSP7 - Digital Asset standard, a fungible digital asset. |
-| **LSP8IdentifiableDigitalAsset** | `0x30dc5278` | Interface of the LSP8 - Identifiable Digital Asset standard, a non-fungible digital asset. |
+| **LSP7DigitalAsset** | `0xb3c4928f` | Interface of the LSP7 - Digital Asset standard, a fungible digital asset. |
+| **LSP8IdentifiableDigitalAsset** | `0x3a271706` | Interface of the LSP8 - Identifiable Digital Asset standard, a non-fungible digital asset. |
| **LSP9Vault** | `0x28af17e6` | Interface of LSP9 - Vault standard, a blockchain vault that can hold assets and interact with other smart contracts. |
| **LSP11BasicSocialRecovery** | `0x049a28f1` | Interface of the LSP11 - Basic Social Recovery standard, a contract to recover access control into an account. |
| **LSP14Ownable2Step** | `0x94be5999` | Interface of the LSP14 - Ownable 2-step standard, an extension of the [EIP173] (Ownable) standard with 2-step process to transfer or renounce ownership. |
diff --git a/docs/contracts/contracts/ERC725/ERC725.md b/docs/contracts/contracts/ERC725/ERC725.md
index 36739b3150..489649309d 100644
--- a/docs/contracts/contracts/ERC725/ERC725.md
+++ b/docs/contracts/contracts/ERC725/ERC725.md
@@ -723,7 +723,7 @@ mapping(bytes32 => bytes) _store
:::
```solidity
-event ContractCreated(uint256 indexed operationType, address indexed contractAddress, uint256 indexed value, bytes32 salt);
+event ContractCreated(uint256 indexed operationType, address indexed contractAddress, uint256 value, bytes32 indexed salt);
```
_Deployed new contract at address `contractAddress` and funded with `value` wei (deployed using opcode: `operationType`)._
@@ -736,8 +736,8 @@ Emitted when a new contract was created and deployed.
| ------------------------------- | :-------: | ----------------------------------------------------------------------------------------------------------------------------------------- |
| `operationType` **`indexed`** | `uint256` | The opcode used to deploy the contract (`CREATE` or `CREATE2`). |
| `contractAddress` **`indexed`** | `address` | The created contract address. |
-| `value` **`indexed`** | `uint256` | The amount of native tokens (in Wei) sent to fund the created contract on deployment. |
-| `salt` | `bytes32` | The salt used to deterministically deploy the contract (`CREATE2` only). If `CREATE` opcode is used, the salt value will be `bytes32(0)`. |
+| `value` | `uint256` | The amount of native tokens (in Wei) sent to fund the created contract on deployment. |
+| `salt` **`indexed`** | `bytes32` | The salt used to deterministically deploy the contract (`CREATE2` only). If `CREATE` opcode is used, the salt value will be `bytes32(0)`. |
@@ -781,7 +781,7 @@ Emitted when data at a specific `dataKey` was changed to a new value `dataValue`
:::
```solidity
-event Executed(uint256 indexed operationType, address indexed target, uint256 indexed value, bytes4 selector);
+event Executed(uint256 indexed operationType, address indexed target, uint256 value, bytes4 indexed selector);
```
_Called address `target` using `operationType` with `value` wei and `data`._
@@ -794,8 +794,8 @@ Emitted when calling an address `target` (EOA or contract) with `value`.
| ----------------------------- | :-------: | ---------------------------------------------------------------------------------------------------- |
| `operationType` **`indexed`** | `uint256` | The low-level call opcode used to call the `target` address (`CALL`, `STATICALL` or `DELEGATECALL`). |
| `target` **`indexed`** | `address` | The address to call. `target` will be unused if a contract is created (operation types 1 and 2). |
-| `value` **`indexed`** | `uint256` | The amount of native tokens transferred along the call (in Wei). |
-| `selector` | `bytes4` | The first 4 bytes (= function selector) of the data sent with the call. |
+| `value` | `uint256` | The amount of native tokens transferred along the call (in Wei). |
+| `selector` **`indexed`** | `bytes4` | The first 4 bytes (= function selector) of the data sent with the call. |
diff --git a/docs/contracts/contracts/LSP0ERC725Account/LSP0ERC725Account.md b/docs/contracts/contracts/LSP0ERC725Account/LSP0ERC725Account.md
index 1f3b9ea8d6..01acdec05e 100644
--- a/docs/contracts/contracts/LSP0ERC725Account/LSP0ERC725Account.md
+++ b/docs/contracts/contracts/LSP0ERC725Account/LSP0ERC725Account.md
@@ -1115,22 +1115,27 @@ mapping(bytes32 => bytes) _store
function _setData(bytes32 dataKey, bytes dataValue) internal nonpayable;
```
-This function overrides the [`ERC725YCore`](#erc725ycore) internal [`_setData`](#_setdata) function to optimize gas usage by emitting only the first 256 bytes of the `dataValue`.
+Write a `dataValue` to the underlying ERC725Y storage, represented as a mapping of
+`bytes32` data keys mapped to their `bytes` data values.
+
+```solidity
+mapping(bytes32 => bytes) _store
+```
**Emitted events:**
-- [`DataChanged`](#datachanged) event with only the first 256 bytes of [`dataValue`](#datavalue).
+- [`DataChanged`](#datachanged) event emitted after a successful `setData` call.
#### Parameters
-| Name | Type | Description |
-| ----------- | :-------: | -------------------------------------- |
-| `dataKey` | `bytes32` | The key to store the data value under. |
-| `dataValue` | `bytes` | The data value to be stored. |
+| Name | Type | Description |
+| ----------- | :-------: | ------------------------------------------------------------------------------- |
+| `dataKey` | `bytes32` | A bytes32 data key to write the associated `bytes` value to the store. |
+| `dataValue` | `bytes` | The `bytes` value to associate with the given `dataKey` in the ERC725Y storage. |
@@ -1286,7 +1291,7 @@ function _revertWithLSP20DefaultError(
:::
```solidity
-event ContractCreated(uint256 indexed operationType, address indexed contractAddress, uint256 indexed value, bytes32 salt);
+event ContractCreated(uint256 indexed operationType, address indexed contractAddress, uint256 value, bytes32 indexed salt);
```
_Deployed new contract at address `contractAddress` and funded with `value` wei (deployed using opcode: `operationType`)._
@@ -1299,8 +1304,8 @@ Emitted when a new contract was created and deployed.
| ------------------------------- | :-------: | ----------------------------------------------------------------------------------------------------------------------------------------- |
| `operationType` **`indexed`** | `uint256` | The opcode used to deploy the contract (`CREATE` or `CREATE2`). |
| `contractAddress` **`indexed`** | `address` | The created contract address. |
-| `value` **`indexed`** | `uint256` | The amount of native tokens (in Wei) sent to fund the created contract on deployment. |
-| `salt` | `bytes32` | The salt used to deterministically deploy the contract (`CREATE2` only). If `CREATE` opcode is used, the salt value will be `bytes32(0)`. |
+| `value` | `uint256` | The amount of native tokens (in Wei) sent to fund the created contract on deployment. |
+| `salt` **`indexed`** | `bytes32` | The salt used to deterministically deploy the contract (`CREATE2` only). If `CREATE` opcode is used, the salt value will be `bytes32(0)`. |
@@ -1344,7 +1349,7 @@ Emitted when data at a specific `dataKey` was changed to a new value `dataValue`
:::
```solidity
-event Executed(uint256 indexed operationType, address indexed target, uint256 indexed value, bytes4 selector);
+event Executed(uint256 indexed operationType, address indexed target, uint256 value, bytes4 indexed selector);
```
_Called address `target` using `operationType` with `value` wei and `data`._
@@ -1357,8 +1362,8 @@ Emitted when calling an address `target` (EOA or contract) with `value`.
| ----------------------------- | :-------: | ---------------------------------------------------------------------------------------------------- |
| `operationType` **`indexed`** | `uint256` | The low-level call opcode used to call the `target` address (`CALL`, `STATICALL` or `DELEGATECALL`). |
| `target` **`indexed`** | `address` | The address to call. `target` will be unused if a contract is created (operation types 1 and 2). |
-| `value` **`indexed`** | `uint256` | The amount of native tokens transferred along the call (in Wei). |
-| `selector` | `bytes4` | The first 4 bytes (= function selector) of the data sent with the call. |
+| `value` | `uint256` | The amount of native tokens transferred along the call (in Wei). |
+| `selector` **`indexed`** | `bytes4` | The first 4 bytes (= function selector) of the data sent with the call. |
diff --git a/docs/contracts/contracts/LSP17Extensions/Extension4337.md b/docs/contracts/contracts/LSP17Extensions/Extension4337.md
index c7632c1f7b..a525bd8eb4 100644
--- a/docs/contracts/contracts/LSP17Extensions/Extension4337.md
+++ b/docs/contracts/contracts/LSP17Extensions/Extension4337.md
@@ -209,3 +209,194 @@ function _extendableMsgValue() internal view returns (uint256);
Returns the original `msg.value` sent to the extendable contract.
+
+
+
+
+
+
+
+[ERC-165]: https://eips.ethereum.org/EIPS/eip-165
+[EIP-165]: https://eips.ethereum.org/EIPS/eip-165
+[ERC-173]: https://eips.ethereum.org/EIPS/eip-173
+[EIP-173]: https://eips.ethereum.org/EIPS/eip-173
+[ERC-191]: https://eips.ethereum.org/EIPS/eip-191
+[EIP-191]: https://eips.ethereum.org/EIPS/eip-191
+[ERC-725X]: https://github.com/ERC725Alliance/ERC725/blob/main/docs/ERC-725.md#ERC725X
+[ERC-725Y]: https://github.com/ERC725Alliance/ERC725/blob/main/docs/ERC-725.md#ERC725Y
+[ERC-725]: https://github.com/ERC725Alliance/ERC725/blob/main/docs/ERC-725.md
+[ERC-1271]: https://eips.ethereum.org/EIPS/eip-1271
+[EIP-1271]: https://eips.ethereum.org/EIPS/eip-1271
+[LSP-0-ERC725Account]: https://github.com/lukso-network/LIPs/tree/main/LSPs/LSP-0-ERC725Account.md
+[LSP-1-UniversalReceiver]: https://github.com/lukso-network/LIPs/tree/main/LSPs/LSP-1-UniversalReceiver.md
+[LSP-2-ERC725YJSONSchema]: https://github.com/lukso-network/LIPs/tree/main/LSPs/LSP-2-ERC725YJSONSchema.md
+[LSP-3-UniversalProfile-Metadata]: https://github.com/lukso-network/LIPs/tree/main/LSPs/LSP-3-UniversalProfile-Metadata.md
+[LSP-4-DigitalAsset-Metadata]: https://github.com/lukso-network/LIPs/tree/main/LSPs/LSP-4-DigitalAsset-Metadata.md
+[LSP-5-ReceivedAssets]: https://github.com/lukso-network/LIPs/tree/main/LSPs/LSP-5-ReceivedAssets.md
+[LSP-6-KeyManager]: https://github.com/lukso-network/LIPs/tree/main/LSPs/LSP-6-KeyManager.md
+[LSP-7-DigitalAsset]: https://github.com/lukso-network/LIPs/tree/main/LSPs/LSP-7-DigitalAsset.md
+[LSP-8-IdentifiableDigitalAsset]: https://github.com/lukso-network/LIPs/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md
+[LSP-9-Vault.md]: https://github.com/lukso-network/LIPs/tree/main/LSPs/LSP-9-Vault.md.md
+[LSP-10-ReceivedVaults]: https://github.com/lukso-network/LIPs/tree/main/LSPs/LSP-10-ReceivedVaults.md
+[LSP-11-BasicSocialRecovery]: https://github.com/lukso-network/LIPs/tree/main/LSPs/LSP-11-BasicSocialRecovery.md
+[LSP-12-IssuedAssets]: https://github.com/lukso-network/LIPs/tree/main/LSPs/LSP-12-IssuedAssets.md
+[LSP-14-Ownable2Step]: https://github.com/lukso-network/LIPs/tree/main/LSPs/LSP-14-Ownable2Step.md
+[LSP-15-TransactionRelayServiceAPI]: https://github.com/lukso-network/LIPs/tree/main/LSPs/LSP-15-TransactionRelayServiceAPI.md
+[LSP-16-UniversalFactory]: https://github.com/lukso-network/LIPs/tree/main/LSPs/LSP-16-UniversalFactory.md
+[LSP-17-ContractExtension]: https://github.com/lukso-network/LIPs/tree/main/LSPs/LSP-17-ContractExtension.md
+[LSP-20-CallVerification]: https://github.com/lukso-network/LIPs/tree/main/LSPs/LSP-20-CallVerification.md
+
+
+
+[ERC725]: https://docs.lukso.tech/standards/lsp-background/erc725
+[UniversalProfile]: https://docs.lukso.tech/standards/universal-profile/introduction
+[LSP0ERC725Account]: https://docs.lukso.tech/standards/universal-profile/lsp0-erc725account
+[LSP1UniversalReceiver]: https://docs.lukso.tech/standards/generic-standards/lsp1-universal-receiver
+[LSP1UniversalReceiverDelegate]: https://docs.lukso.tech/standards/generic-standards/lsp1-universal-receiver-delegate
+[LSP2ERC725YJSONSchema]: https://docs.lukso.tech/standards/generic-standards/lsp2-json-schema
+[LSP4DigitalAssetMetadata]: https://docs.lukso.tech/standards/tokens/LSP4-Digital-Asset-Metadata
+[LSP5ReceivedVaults]: https://docs.lukso.tech/standards/universal-profile/lsp5-received-assets
+[LSP6KeyManager]: https://docs.lukso.tech/standards/universal-profile/lsp6-key-manager
+[LSP7DigitalAsset]: https://docs.lukso.tech/standards/tokens/LSP7-Digital-Asset
+[LSP8IdentifiableDigitalAsset]: https://docs.lukso.tech/standards/tokens/LSP8-Identifiable-Digital-Asset
+[LSP10ReceivedVaults]: https://docs.lukso.tech/standards/universal-profile/lsp10-received-vaults
+[LSP14Ownable2Step]: https://docs.lukso.tech/standards/generic-standards/lsp14-ownable-2-step
+[LSP17ContractExtension]: https://docs.lukso.tech/standards/generic-standards/lsp17-contract-extension
+[LSP20CallVerification]: https://docs.lukso.tech/standards/generic-standards/lsp20-call-verification
+
+
+
+[_LSP17_EXTENSION_PREFIX]: https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-17-ContractExtension.md#lsp17extendable-specification
+[_LSP1_UNIVERSAL_RECEIVER_DELEGATE_KEY]: https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-1-UniversalReceiver.md#specification-1
+[_LSP1_UNIVERSAL_RECEIVER_DELEGATE_PREFIX]: https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-1-UniversalReceiver.md#specification-1
+
+
+
+[LSP0OwnershipTransferStarted]: https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-0-ERC725Account.md#transferownership
+[LSP0OwnershipTransferred_SenderNotification]: https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-0-ERC725Account.md#acceptownership
+[LSP0OwnershipTransferred_RecipientNotification]: https://github.com/lukso-network/LIPs/blob/main/LSPs/LSP-0-ERC725Account.md#acceptownership
+
+
+
+[`ERC725.sol`]: https://github.com/ERC725Alliance/ERC725/blob/v5.1.0/implementations/contracts/ERC725.sol
+[`ERC725Init.sol`]: https://github.com/ERC725Alliance/ERC725/blob/v5.1.0/implementations/contracts/ERC725Init.sol
+[`ERC725InitAbstract.sol`]: https://github.com/ERC725Alliance/ERC725/blob/v5.1.0/implementations/contracts/ERC725InitAbstract
+[`IERC725X.sol`]: https://github.com/ERC725Alliance/ERC725/blob/v5.1.0/implementations/contracts/interfaces/IERC725X.sol
+[`ERC725X.sol`]: https://github.com/ERC725Alliance/ERC725/blob/v5.1.0/implementations/contracts/ERC725X.sol
+[`ERC725XCore.sol`]: https://github.com/ERC725Alliance/ERC725/blob/v5.1.0/implementations/contracts/ERC725XCore.sol
+[`ERC725XInit.sol`]: https://github.com/ERC725Alliance/ERC725/blob/v5.1.0/implementations/contracts/ERC725XInit.sol
+[`ERC725XInitAbstract.sol`]: https://github.com/ERC725Alliance/ERC725/blob/v5.1.0/implementations/contracts/ERC725XInitAbstract.sol
+[`IERC725Y.sol`]: https://github.com/ERC725Alliance/ERC725/blob/v5.1.0/implementations/contracts/interfaces/IERC725Y.sol
+[`ERC725Y.sol`]: https://github.com/ERC725Alliance/ERC725/blob/v5.1.0/implementations/contracts/ERC725Y.sol
+[`ERC725YCore.sol`]: https://github.com/ERC725Alliance/ERC725/blob/v5.1.0/implementations/contracts/ERC725YCore.sol
+[`ERC725YInit.sol`]: https://github.com/ERC725Alliance/ERC725/blob/v5.1.0/implementations/contracts/ERC725YInit.sol
+[`ERC725YInitAbstract.sol`]: https://github.com/ERC725Alliance/ERC725/blob/v5.1.0/implementations/contracts/ERC725YInitAbstract.soll
+[`OwnableUnset.sol`]: https://github.com/ERC725Alliance/ERC725/blob/v5.1.0/implementations/contracts/custom/OwnableUnset.sol
+
+
+
+[`Create2.sol`]: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.2/contracts/utils/Create2.sol
+[`ECDSA.sol`]: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.2/contracts/utils/cryptography/ECDSA.sol
+[`ERC165Checker.sol`]: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.2/contracts/utils/introspection/ERC165Checker.sol
+[`Address.sol`]: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.2/contracts/utils/Address.sol
+[`ERC165.sol`]: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.2/contracts/utils/introspection/ERC165.sol
+[`EnumerableSet.sol`]: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.2/contracts/utils/structs/EnumerableSet.so
+[`Initializable.sol`]: https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/v4.9.2/contracts/proxy/utils/Initializable.sol
+[`BytesLib.sol`]: https://github.com/GNSPS/solidity-bytes-utils/blob/v0.8.0/contracts/BytesLib.sol
+
+
+
+[`LSP0ERC725AccountCore.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP0ERC725Account/LSP0ERC725AccountCore.sol
+[`LSP0Utils.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP0ERC725Account/LSP0Utils.sol
+[`LSP0ERC725AccountInitAbstract.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP0ERC725Account/LSP0ERC725AccountInitAbstract.sol
+[`ILSP0ERC725Account.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP0ERC725Account/ILSP0ERC725Account.sol
+[`LSP0ERC725Account.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP0ERC725Account/LSP0ERC725Account.sol
+[`LSP0ERC725AccountInit.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP0ERC725Account/LSP0ERC725AccountInit.sol
+[`LSP0Constants.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP0ERC725Account/LSP0Constants.sol
+[`UniversalProfileInitAbstract.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/UniversalProfileInitAbstract.sol
+[`UniversalProfile.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/UniversalProfile.sol
+[`UniversalProfileInit.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/UniversalProfileInit.sol
+[`LSP1UniversalReceiverDelegateUP.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateUP/LSP1UniversalReceiverDelegateUP.sol
+[`LSP1Utils.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP1UniversalReceiver/LSP1Utils.sol
+[`LSP1UniversalReceiverDelegateVault.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP1UniversalReceiver/LSP1UniversalReceiverDelegateVault/LSP1UniversalReceiverDelegateVault.sol
+[`ILSP1UniversalReceiver.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP1UniversalReceiver/ILSP1UniversalReceiver.sol
+[`LSP1Constants.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP1UniversalReceiver/LSP1Constants.sol
+[`LSP1Errors.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP1UniversalReceiver/LSP1Errors.sol
+[`LSP4DigitalAssetMetadataInitAbstract.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadataInitAbstract.sol
+[`LSP4DigitalAssetMetadata.sol`]: chttps://github.com/code-423n4/2023-06-lukso/tree/main/ontracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadata.sol
+[`LSP4Compatibility.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP4DigitalAssetMetadata/LSP4Compatibility.sol
+[`LSP4Constants.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP4DigitalAssetMetadata/LSP4Constants.sol
+[`ILSP4Compatibility.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP4DigitalAssetMetadata/ILSP4Compatibility.sol
+[`LSP4Errors.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP4DigitalAssetMetadata/LSP4Errors.sol
+[`LSP6SetDataModule.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP6KeyManager/LSP6Modules/LSP6SetDataModule.sol
+[`LSP6KeyManagerCore.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP6KeyManager/LSP6KeyManagerCore.sol
+[`LSP6ExecuteModule.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP6KeyManager/LSP6Modules/LSP6ExecuteModule.sol
+[`LSP6Utils.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP6KeyManager/LSP6Utils.sol
+[`LSP6Constants.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP6KeyManager/LSP6Constants.sol
+[`ILSP6KeyManager.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP6KeyManager/ILSP6KeyManager.sol
+[`LSP6Errors.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP6KeyManager/LSP6Errors.sol
+[`LSP6OwnershipModule.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP6KeyManager/LSP6Modules/LSP6OwnershipModule.sol
+[`LSP6KeyManagerInitAbstract.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP6KeyManager/LSP6KeyManagerInitAbstract.sol
+[`LSP6KeyManager.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP6KeyManager/LSP6KeyManager.sol
+[`LSP6KeyManagerInit.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP6KeyManager/LSP6KeyManagerInit.sol
+[`LSP7DigitalAssetCore.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP7DigitalAsset/LSP7DigitalAssetCore.sol
+[`LSP7CompatibleERC20InitAbstract.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20InitAbstract.sol
+[`LSP7CompatibleERC20.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol
+[`ILSP7DigitalAsset.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP7DigitalAsset/ILSP7DigitalAsset.sol
+[`LSP7DigitalAssetInitAbstract.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP7DigitalAsset/LSP7DigitalAssetInitAbstract.sol
+[`LSP7CappedSupply.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol
+[`LSP7CappedSupplyInitAbstract.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupplyInitAbstract.sol
+[`LSP7DigitalAsset.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol
+[`LSP7MintableInitAbstract.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP7DigitalAsset/presets/LSP7MintableInitAbstract.sol
+[`LSP7CompatibleERC20MintableInitAbstract.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20MintableInitAbstract.sol
+[`LSP7Mintable.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol
+[`LSP7CompatibleERC20Mintable.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol
+[`LSP7Errors.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP7DigitalAsset/LSP7Errors.sol
+[`LSP7CompatibleERC20MintableInit.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20MintableInit.sol
+[`LSP7MintableInit.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP7DigitalAsset/presets/LSP7MintableInit.sol
+[`ILSP7CompatibleERC20.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP7DigitalAsset/extensions/ILSP7CompatibleERC20.sol
+[`ILSP7Mintable.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP7DigitalAsset/presets/ILSP7Mintable.sol
+[`LSP7Burnable.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol
+[`LSP7BurnableInitAbstract.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP7DigitalAsset/extensions/LSP7BurnableInitAbstract.sol
+[`LSP7Constants.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP7DigitalAsset/LSP7Constants.sol
+[`LSP8IdentifiableDigitalAssetCore.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetCore.sol
+[`LSP8CompatibleERC721InitAbstract.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721InitAbstract.sol
+[`LSP8CompatibleERC721.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol
+[`ILSP8IdentifiableDigitalAsset.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP8IdentifiableDigitalAsset/ILSP8IdentifiableDigitalAsset.sol
+[`LSP8EnumerableInitAbstract.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8EnumerableInitAbstract.sol
+[`LSP8Enumerable.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol
+[`LSP8CappedSupplyInitAbstract.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupplyInitAbstract.sol
+[`LSP8CappedSupply.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol
+[`LSP8IdentifiableDigitalAssetInitAbstract.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetInitAbstract.sol
+[`LSP8MintableInitAbstract.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInitAbstract.sol
+[`ILSP8CompatibleERC721.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP8IdentifiableDigitalAsset/extensions/ILSP8CompatibleERC721.sol
+[`LSP8IdentifiableDigitalAsset.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol
+[`LSP8CompatibleERC721MintableInitAbstract.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721MintableInitAbstract.s
+[`LSP8Mintable.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol
+[`LSP8CompatibleERC721Mintable.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol
+[`LSP8CompatibleERC721MintableInit.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721MintableInit.sol
+[`LSP8Errors.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP8IdentifiableDigitalAsset/LSP8Errors.sol
+[`LSP8MintableInit.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInit.sol
+[`LSP8Burnable.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol
+[`ILSP8Mintable.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP8IdentifiableDigitalAsset/presets/ILSP8Mintable.sol
+[`LSP8Constants.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP8IdentifiableDigitalAsset/LSP8Constants.s
+[`LSP14Ownable2Step.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP14Ownable2Step/LSP14Ownable2Step.sol
+[`ILSP14Ownable2Step.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP14Ownable2Step/ILSP14Ownable2Step.sol
+[`LSP14Constants.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP14Ownable2Step/LSP14Constants.sol
+[`LSP14Errors.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP14Ownable2Step/LSP14Errors.sol
+[`LSP17Extendable.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP17ContractExtension/LSP17Extendable.sol
+[`LSP17Extension.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP17ContractExtension/LSP17Extension.sol
+[`LSP17Constants.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP17ContractExtension/LSP17Constants.sol
+[`LSP17Errors.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP17ContractExtension/LSP17Errors.sol
+[`LSP17Utils.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP17ContractExtension/LSP17Utils.sol
+[`LSP20CallVerification.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP20CallVerification/LSP20CallVerification.sol
+[`ILSP20CallVerifier.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP20CallVerification/ILSP20CallVerifier.sol
+[`LSP20Constants.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP20CallVerification/LSP20Constants.sol
+[`LSP20Errors.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP20CallVerification/LSP20Errors.sol
+[`LSP2Utils.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP2ERC725YJSONSchema/LSP2Utils.sol
+[`LSP5Utils.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP5ReceivedAssets/LSP5Utils.sol
+[`LSP5Constants.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP5ReceivedAssets/LSP5Constants.sol
+[`LSP10Utils.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP10ReceivedVaults/LSP10Utils.sol
+[`LSP10Constants.sol`]: https://github.com/lukso-network/lsp-smart-contracts/tree/main/contracts/LSP10ReceivedVaults/LSP10Constants.sol
+
+
diff --git a/docs/contracts/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadata.md b/docs/contracts/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadata.md
index 17b81da38c..7cdc727132 100644
--- a/docs/contracts/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadata.md
+++ b/docs/contracts/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadata.md
@@ -351,7 +351,8 @@ mapping(bytes32 => bytes) _store
function _setData(bytes32 dataKey, bytes dataValue) internal nonpayable;
```
-Save gas by emitting the [`DataChanged`](#datachanged) event with only the first 256 bytes of dataValue
+The ERC725Y data keys `LSP4TokenName` and `LSP4TokenSymbol` cannot be changed
+via this function once the digital asset contract has been deployed.
@@ -483,7 +484,7 @@ Reverts when sending value to the [`setData`](#setdata) or [`setDataBatch`](#set
error LSP4TokenNameNotEditable();
```
-Reverts when trying to edit the data key `LSP4TokenName` after the digital asset contract has been deployed. The `LSP4TokenName` data key is located inside the ERC725Y Data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed.
+Reverts when trying to edit the data key `LSP4TokenName` after the digital asset contract has been deployed / initialized. The `LSP4TokenName` data key is located inside the ERC725Y data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed / initialized.
@@ -502,7 +503,26 @@ Reverts when trying to edit the data key `LSP4TokenName` after the digital asset
error LSP4TokenSymbolNotEditable();
```
-Reverts when trying to edit the data key `LSP4TokenSymbol` after the digital asset contract has been deployed. The `LSP4TokenSymbol` data key is located inside the ERC725Y Data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed.
+Reverts when trying to edit the data key `LSP4TokenSymbol` after the digital asset contract has been deployed / initialized. The `LSP4TokenSymbol` data key is located inside the ERC725Y data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed / initialized.
+
+
+
+### LSP4TokenTypeNotEditable
+
+:::note References
+
+- Specification details: [**LSP-4-DigitalAssetMetadata**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-4-DigitalAssetMetadata.md#lsp4tokentypenoteditable)
+- Solidity implementation: [`LSP4DigitalAssetMetadata.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP4DigitalAssetMetadata/LSP4DigitalAssetMetadata.sol)
+- Error signature: `LSP4TokenTypeNotEditable()`
+- Error hash: `0x4ef6d7fb`
+
+:::
+
+```solidity
+error LSP4TokenTypeNotEditable();
+```
+
+Reverts when trying to edit the data key `LSP4TokenType` after the digital asset contract has been deployed / initialized. The `LSP4TokenType` data key is located inside the ERC725Y data key-value store of the digital asset contract. It can be set only once inside the constructor / initializer when the digital asset contract is being deployed / initialized.
diff --git a/docs/contracts/contracts/LSP7DigitalAsset/LSP7DigitalAsset.md b/docs/contracts/contracts/LSP7DigitalAsset/LSP7DigitalAsset.md
index 7071169cde..d3475ec9c0 100644
--- a/docs/contracts/contracts/LSP7DigitalAsset/LSP7DigitalAsset.md
+++ b/docs/contracts/contracts/LSP7DigitalAsset/LSP7DigitalAsset.md
@@ -180,6 +180,45 @@ Get the number of tokens owned by `tokenOwner`. If the token is divisible (the [
+### batchCalls
+
+:::note References
+
+- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#batchcalls)
+- Solidity implementation: [`LSP7DigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol)
+- Function signature: `batchCalls(bytes[])`
+- Function selector: `0x6963d438`
+
+:::
+
+:::info
+
+It's not possible to send value along the functions call due to the use of `delegatecall`.
+
+:::
+
+```solidity
+function batchCalls(bytes[] data) external nonpayable returns (bytes[] results);
+```
+
+_Executing the following batch of abi-encoded function calls on the contract: `data`._
+
+Allows a caller to batch different function calls in one call. Perform a `delegatecall` on self, to call different functions with preserving the context.
+
+#### Parameters
+
+| Name | Type | Description |
+| ------ | :-------: | -------------------------------------------------------------------- |
+| `data` | `bytes[]` | An array of ABI encoded function calls to be called on the contract. |
+
+#### Returns
+
+| Name | Type | Description |
+| --------- | :-------: | ---------------------------------------------------------------- |
+| `results` | `bytes[]` | An array of abi-encoded data returned by the functions executed. |
+
+
+
### decimals
:::note References
@@ -756,7 +795,8 @@ mapping(bytes32 => bytes) _store
function _setData(bytes32 dataKey, bytes dataValue) internal nonpayable;
```
-Save gas by emitting the [`DataChanged`](#datachanged) event with only the first 256 bytes of dataValue
+The ERC725Y data keys `LSP4TokenName` and `LSP4TokenSymbol` cannot be changed
+via this function once the digital asset contract has been deployed.
@@ -995,6 +1035,47 @@ Allows to run custom logic after updating balances, but **before notifiying send
+### \_notifyTokenOperator
+
+```solidity
+function _notifyTokenOperator(
+ address operator,
+ bytes lsp1Data
+) internal nonpayable;
+```
+
+Attempt to notify the operator `operator` about the `amount` tokens being authorized with.
+This is done by calling its [`universalReceiver`](#universalreceiver) function with the `_TYPEID_LSP7_TOKENOPERATOR` as typeId, if `operator` is a contract that supports the LSP1 interface.
+If `operator` is an EOA or a contract that does not support the LSP1 interface, nothing will happen and no notification will be sent.
+
+#### Parameters
+
+| Name | Type | Description |
+| ---------- | :-------: | ------------------------------------------------------------------------------ |
+| `operator` | `address` | The address to call the [`universalReceiver`](#universalreceiver) function on. |
+| `lsp1Data` | `bytes` | the data to be sent to the `operator` address in the `universalReceiver` call. |
+
+
+
+### \_notifyTokenSender
+
+```solidity
+function _notifyTokenSender(address from, bytes lsp1Data) internal nonpayable;
+```
+
+Attempt to notify the token sender `from` about the `amount` of tokens being transferred.
+This is done by calling its [`universalReceiver`](#universalreceiver) function with the `_TYPEID_LSP7_TOKENSSENDER` as typeId, if `from` is a contract that supports the LSP1 interface.
+If `from` is an EOA or a contract that does not support the LSP1 interface, nothing will happen and no notification will be sent.
+
+#### Parameters
+
+| Name | Type | Description |
+| ---------- | :-------: | ------------------------------------------------------------------------------ |
+| `from` | `address` | The address to call the [`universalReceiver`](#universalreceiver) function on. |
+| `lsp1Data` | `bytes` | the data to be sent to the `from` address in the `universalReceiver` call. |
+
+
+
### \_notifyTokenReceiver
```solidity
@@ -1085,34 +1166,6 @@ CALL opcode, passing the [`msg.data`](#msg.data) appended with the 20 bytes of t
## Events
-### AuthorizedOperator
-
-:::note References
-
-- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#authorizedoperator)
-- Solidity implementation: [`LSP7DigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol)
-- Event signature: `AuthorizedOperator(address,address,uint256,bytes)`
-- Event topic hash: `0x0744b3de98efaff36606a0e67662fb8697adb0ed49d90730bdb4bbf885f30597`
-
-:::
-
-```solidity
-event AuthorizedOperator(address indexed operator, address indexed tokenOwner, uint256 indexed amount, bytes operatorNotificationData);
-```
-
-Emitted when `tokenOwner` enables `operator` for `amount` tokens.
-
-#### Parameters
-
-| Name | Type | Description |
-| -------------------------- | :-------: | ----------------------------------------------------------------------- |
-| `operator` **`indexed`** | `address` | The address authorized as an operator |
-| `tokenOwner` **`indexed`** | `address` | The token owner |
-| `amount` **`indexed`** | `uint256` | The amount of tokens `operator` address has access to from `tokenOwner` |
-| `operatorNotificationData` | `bytes` | The data to notify the operator about via LSP1. |
-
-
-
### DataChanged
:::note References
@@ -1141,43 +1194,47 @@ Emitted when data at a specific `dataKey` was changed to a new value `dataValue`
-### OwnershipTransferred
+### OperatorAuthorizationChanged
:::note References
-- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#ownershiptransferred)
+- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#operatorauthorizationchanged)
- Solidity implementation: [`LSP7DigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol)
-- Event signature: `OwnershipTransferred(address,address)`
-- Event topic hash: `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0`
+- Event signature: `OperatorAuthorizationChanged(address,address,uint256,bytes)`
+- Event topic hash: `0xf772a43bfdf4729b196e3fb54a818b91a2ca6c49d10b2e16278752f9f515c25d`
:::
```solidity
-event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
+event OperatorAuthorizationChanged(address indexed operator, address indexed tokenOwner, uint256 indexed amount, bytes operatorNotificationData);
```
+Emitted when `tokenOwner` enables `operator` for `amount` tokens.
+
#### Parameters
-| Name | Type | Description |
-| ----------------------------- | :-------: | ----------- |
-| `previousOwner` **`indexed`** | `address` | - |
-| `newOwner` **`indexed`** | `address` | - |
+| Name | Type | Description |
+| -------------------------- | :-------: | ----------------------------------------------------------------------- |
+| `operator` **`indexed`** | `address` | The address authorized as an operator |
+| `tokenOwner` **`indexed`** | `address` | The token owner |
+| `amount` **`indexed`** | `uint256` | The amount of tokens `operator` address has access to from `tokenOwner` |
+| `operatorNotificationData` | `bytes` | The data to notify the operator about via LSP1. |
-### RevokedOperator
+### OperatorRevoked
:::note References
-- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#revokedoperator)
+- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#operatorrevoked)
- Solidity implementation: [`LSP7DigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol)
-- Event signature: `RevokedOperator(address,address,bool,bytes)`
-- Event topic hash: `0x66015c8835ee443e5bc280176609215a5035da4bae05bdef994596d7e43aae22`
+- Event signature: `OperatorRevoked(address,address,bool,bytes)`
+- Event topic hash: `0x0ebf5762d8855cbe012d2ca42fb33a81175e17c8a8751f8859931ba453bd4167`
:::
```solidity
-event RevokedOperator(address indexed operator, address indexed tokenOwner, bool notified, bytes operatorNotificationData);
+event OperatorRevoked(address indexed operator, address indexed tokenOwner, bool indexed notified, bytes operatorNotificationData);
```
Emitted when `tokenOwner` disables `operator` for `amount` tokens and set its [`authorizedAmountFor(...)`](#`authorizedamountfor) to `0`.
@@ -1188,11 +1245,35 @@ Emitted when `tokenOwner` disables `operator` for `amount` tokens and set its [`
| -------------------------- | :-------: | ------------------------------------------------------------- |
| `operator` **`indexed`** | `address` | The address revoked from operating |
| `tokenOwner` **`indexed`** | `address` | The token owner |
-| `notified` | `bool` | Bool indicating whether the operator has been notified or not |
+| `notified` **`indexed`** | `bool` | Bool indicating whether the operator has been notified or not |
| `operatorNotificationData` | `bytes` | The data to notify the operator about via LSP1. |
+### OwnershipTransferred
+
+:::note References
+
+- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#ownershiptransferred)
+- Solidity implementation: [`LSP7DigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol)
+- Event signature: `OwnershipTransferred(address,address)`
+- Event topic hash: `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0`
+
+:::
+
+```solidity
+event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
+```
+
+#### Parameters
+
+| Name | Type | Description |
+| ----------------------------- | :-------: | ----------- |
+| `previousOwner` **`indexed`** | `address` | - |
+| `newOwner` **`indexed`** | `address` | - |
+
+
+
### Transfer
:::note References
@@ -1347,7 +1428,7 @@ reverts when the contract is called with a function selector not valid (less tha
error LSP4TokenNameNotEditable();
```
-Reverts when trying to edit the data key `LSP4TokenName` after the digital asset contract has been deployed. The `LSP4TokenName` data key is located inside the ERC725Y Data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed.
+Reverts when trying to edit the data key `LSP4TokenName` after the digital asset contract has been deployed / initialized. The `LSP4TokenName` data key is located inside the ERC725Y data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed / initialized.
@@ -1366,7 +1447,26 @@ Reverts when trying to edit the data key `LSP4TokenName` after the digital asset
error LSP4TokenSymbolNotEditable();
```
-Reverts when trying to edit the data key `LSP4TokenSymbol` after the digital asset contract has been deployed. The `LSP4TokenSymbol` data key is located inside the ERC725Y Data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed.
+Reverts when trying to edit the data key `LSP4TokenSymbol` after the digital asset contract has been deployed / initialized. The `LSP4TokenSymbol` data key is located inside the ERC725Y data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed / initialized.
+
+
+
+### LSP4TokenTypeNotEditable
+
+:::note References
+
+- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp4tokentypenoteditable)
+- Solidity implementation: [`LSP7DigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol)
+- Error signature: `LSP4TokenTypeNotEditable()`
+- Error hash: `0x4ef6d7fb`
+
+:::
+
+```solidity
+error LSP4TokenTypeNotEditable();
+```
+
+Reverts when trying to edit the data key `LSP4TokenType` after the digital asset contract has been deployed / initialized. The `LSP4TokenType` data key is located inside the ERC725Y data key-value store of the digital asset contract. It can be set only once inside the constructor / initializer when the digital asset contract is being deployed / initialized.
@@ -1434,6 +1534,33 @@ reverts when sending an `amount` of tokens larger than the current `balance` of
+### LSP7BatchCallFailed
+
+:::note References
+
+- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7batchcallfailed)
+- Solidity implementation: [`LSP7DigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol)
+- Error signature: `LSP7BatchCallFailed(uint256)`
+- Error hash: `0xb774c284`
+
+:::
+
+```solidity
+error LSP7BatchCallFailed(uint256 callIndex);
+```
+
+_Batch call failed._
+
+Reverts when a batch call failed.
+
+#### Parameters
+
+| Name | Type | Description |
+| ----------- | :-------: | ----------- |
+| `callIndex` | `uint256` | - |
+
+
+
### LSP7CannotSendToSelf
:::note References
diff --git a/docs/contracts/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.md b/docs/contracts/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.md
index 1979177df9..c53234b94b 100644
--- a/docs/contracts/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.md
+++ b/docs/contracts/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.md
@@ -178,6 +178,45 @@ Get the number of tokens owned by `tokenOwner`. If the token is divisible (the [
+### batchCalls
+
+:::note References
+
+- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#batchcalls)
+- Solidity implementation: [`LSP7Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol)
+- Function signature: `batchCalls(bytes[])`
+- Function selector: `0x6963d438`
+
+:::
+
+:::info
+
+It's not possible to send value along the functions call due to the use of `delegatecall`.
+
+:::
+
+```solidity
+function batchCalls(bytes[] data) external nonpayable returns (bytes[] results);
+```
+
+_Executing the following batch of abi-encoded function calls on the contract: `data`._
+
+Allows a caller to batch different function calls in one call. Perform a `delegatecall` on self, to call different functions with preserving the context.
+
+#### Parameters
+
+| Name | Type | Description |
+| ------ | :-------: | -------------------------------------------------------------------- |
+| `data` | `bytes[]` | An array of ABI encoded function calls to be called on the contract. |
+
+#### Returns
+
+| Name | Type | Description |
+| --------- | :-------: | ---------------------------------------------------------------- |
+| `results` | `bytes[]` | An array of abi-encoded data returned by the functions executed. |
+
+
+
### burn
:::note References
@@ -781,7 +820,8 @@ mapping(bytes32 => bytes) _store
function _setData(bytes32 dataKey, bytes dataValue) internal nonpayable;
```
-Save gas by emitting the [`DataChanged`](#datachanged) event with only the first 256 bytes of dataValue
+The ERC725Y data keys `LSP4TokenName` and `LSP4TokenSymbol` cannot be changed
+via this function once the digital asset contract has been deployed.
@@ -1020,6 +1060,47 @@ Allows to run custom logic after updating balances, but **before notifiying send
+### \_notifyTokenOperator
+
+```solidity
+function _notifyTokenOperator(
+ address operator,
+ bytes lsp1Data
+) internal nonpayable;
+```
+
+Attempt to notify the operator `operator` about the `amount` tokens being authorized with.
+This is done by calling its [`universalReceiver`](#universalreceiver) function with the `_TYPEID_LSP7_TOKENOPERATOR` as typeId, if `operator` is a contract that supports the LSP1 interface.
+If `operator` is an EOA or a contract that does not support the LSP1 interface, nothing will happen and no notification will be sent.
+
+#### Parameters
+
+| Name | Type | Description |
+| ---------- | :-------: | ------------------------------------------------------------------------------ |
+| `operator` | `address` | The address to call the [`universalReceiver`](#universalreceiver) function on. |
+| `lsp1Data` | `bytes` | the data to be sent to the `operator` address in the `universalReceiver` call. |
+
+
+
+### \_notifyTokenSender
+
+```solidity
+function _notifyTokenSender(address from, bytes lsp1Data) internal nonpayable;
+```
+
+Attempt to notify the token sender `from` about the `amount` of tokens being transferred.
+This is done by calling its [`universalReceiver`](#universalreceiver) function with the `_TYPEID_LSP7_TOKENSSENDER` as typeId, if `from` is a contract that supports the LSP1 interface.
+If `from` is an EOA or a contract that does not support the LSP1 interface, nothing will happen and no notification will be sent.
+
+#### Parameters
+
+| Name | Type | Description |
+| ---------- | :-------: | ------------------------------------------------------------------------------ |
+| `from` | `address` | The address to call the [`universalReceiver`](#universalreceiver) function on. |
+| `lsp1Data` | `bytes` | the data to be sent to the `from` address in the `universalReceiver` call. |
+
+
+
### \_notifyTokenReceiver
```solidity
@@ -1110,34 +1191,6 @@ CALL opcode, passing the [`msg.data`](#msg.data) appended with the 20 bytes of t
## Events
-### AuthorizedOperator
-
-:::note References
-
-- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#authorizedoperator)
-- Solidity implementation: [`LSP7Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol)
-- Event signature: `AuthorizedOperator(address,address,uint256,bytes)`
-- Event topic hash: `0x0744b3de98efaff36606a0e67662fb8697adb0ed49d90730bdb4bbf885f30597`
-
-:::
-
-```solidity
-event AuthorizedOperator(address indexed operator, address indexed tokenOwner, uint256 indexed amount, bytes operatorNotificationData);
-```
-
-Emitted when `tokenOwner` enables `operator` for `amount` tokens.
-
-#### Parameters
-
-| Name | Type | Description |
-| -------------------------- | :-------: | ----------------------------------------------------------------------- |
-| `operator` **`indexed`** | `address` | The address authorized as an operator |
-| `tokenOwner` **`indexed`** | `address` | The token owner |
-| `amount` **`indexed`** | `uint256` | The amount of tokens `operator` address has access to from `tokenOwner` |
-| `operatorNotificationData` | `bytes` | The data to notify the operator about via LSP1. |
-
-
-
### DataChanged
:::note References
@@ -1166,43 +1219,47 @@ Emitted when data at a specific `dataKey` was changed to a new value `dataValue`
-### OwnershipTransferred
+### OperatorAuthorizationChanged
:::note References
-- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#ownershiptransferred)
+- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#operatorauthorizationchanged)
- Solidity implementation: [`LSP7Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol)
-- Event signature: `OwnershipTransferred(address,address)`
-- Event topic hash: `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0`
+- Event signature: `OperatorAuthorizationChanged(address,address,uint256,bytes)`
+- Event topic hash: `0xf772a43bfdf4729b196e3fb54a818b91a2ca6c49d10b2e16278752f9f515c25d`
:::
```solidity
-event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
+event OperatorAuthorizationChanged(address indexed operator, address indexed tokenOwner, uint256 indexed amount, bytes operatorNotificationData);
```
+Emitted when `tokenOwner` enables `operator` for `amount` tokens.
+
#### Parameters
-| Name | Type | Description |
-| ----------------------------- | :-------: | ----------- |
-| `previousOwner` **`indexed`** | `address` | - |
-| `newOwner` **`indexed`** | `address` | - |
+| Name | Type | Description |
+| -------------------------- | :-------: | ----------------------------------------------------------------------- |
+| `operator` **`indexed`** | `address` | The address authorized as an operator |
+| `tokenOwner` **`indexed`** | `address` | The token owner |
+| `amount` **`indexed`** | `uint256` | The amount of tokens `operator` address has access to from `tokenOwner` |
+| `operatorNotificationData` | `bytes` | The data to notify the operator about via LSP1. |
-### RevokedOperator
+### OperatorRevoked
:::note References
-- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#revokedoperator)
+- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#operatorrevoked)
- Solidity implementation: [`LSP7Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol)
-- Event signature: `RevokedOperator(address,address,bool,bytes)`
-- Event topic hash: `0x66015c8835ee443e5bc280176609215a5035da4bae05bdef994596d7e43aae22`
+- Event signature: `OperatorRevoked(address,address,bool,bytes)`
+- Event topic hash: `0x0ebf5762d8855cbe012d2ca42fb33a81175e17c8a8751f8859931ba453bd4167`
:::
```solidity
-event RevokedOperator(address indexed operator, address indexed tokenOwner, bool notified, bytes operatorNotificationData);
+event OperatorRevoked(address indexed operator, address indexed tokenOwner, bool indexed notified, bytes operatorNotificationData);
```
Emitted when `tokenOwner` disables `operator` for `amount` tokens and set its [`authorizedAmountFor(...)`](#`authorizedamountfor) to `0`.
@@ -1213,11 +1270,35 @@ Emitted when `tokenOwner` disables `operator` for `amount` tokens and set its [`
| -------------------------- | :-------: | ------------------------------------------------------------- |
| `operator` **`indexed`** | `address` | The address revoked from operating |
| `tokenOwner` **`indexed`** | `address` | The token owner |
-| `notified` | `bool` | Bool indicating whether the operator has been notified or not |
+| `notified` **`indexed`** | `bool` | Bool indicating whether the operator has been notified or not |
| `operatorNotificationData` | `bytes` | The data to notify the operator about via LSP1. |
+### OwnershipTransferred
+
+:::note References
+
+- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#ownershiptransferred)
+- Solidity implementation: [`LSP7Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol)
+- Event signature: `OwnershipTransferred(address,address)`
+- Event topic hash: `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0`
+
+:::
+
+```solidity
+event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
+```
+
+#### Parameters
+
+| Name | Type | Description |
+| ----------------------------- | :-------: | ----------- |
+| `previousOwner` **`indexed`** | `address` | - |
+| `newOwner` **`indexed`** | `address` | - |
+
+
+
### Transfer
:::note References
@@ -1372,7 +1453,7 @@ reverts when the contract is called with a function selector not valid (less tha
error LSP4TokenNameNotEditable();
```
-Reverts when trying to edit the data key `LSP4TokenName` after the digital asset contract has been deployed. The `LSP4TokenName` data key is located inside the ERC725Y Data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed.
+Reverts when trying to edit the data key `LSP4TokenName` after the digital asset contract has been deployed / initialized. The `LSP4TokenName` data key is located inside the ERC725Y data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed / initialized.
@@ -1391,7 +1472,26 @@ Reverts when trying to edit the data key `LSP4TokenName` after the digital asset
error LSP4TokenSymbolNotEditable();
```
-Reverts when trying to edit the data key `LSP4TokenSymbol` after the digital asset contract has been deployed. The `LSP4TokenSymbol` data key is located inside the ERC725Y Data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed.
+Reverts when trying to edit the data key `LSP4TokenSymbol` after the digital asset contract has been deployed / initialized. The `LSP4TokenSymbol` data key is located inside the ERC725Y data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed / initialized.
+
+
+
+### LSP4TokenTypeNotEditable
+
+:::note References
+
+- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp4tokentypenoteditable)
+- Solidity implementation: [`LSP7Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol)
+- Error signature: `LSP4TokenTypeNotEditable()`
+- Error hash: `0x4ef6d7fb`
+
+:::
+
+```solidity
+error LSP4TokenTypeNotEditable();
+```
+
+Reverts when trying to edit the data key `LSP4TokenType` after the digital asset contract has been deployed / initialized. The `LSP4TokenType` data key is located inside the ERC725Y data key-value store of the digital asset contract. It can be set only once inside the constructor / initializer when the digital asset contract is being deployed / initialized.
@@ -1459,6 +1559,33 @@ reverts when sending an `amount` of tokens larger than the current `balance` of
+### LSP7BatchCallFailed
+
+:::note References
+
+- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7batchcallfailed)
+- Solidity implementation: [`LSP7Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol)
+- Error signature: `LSP7BatchCallFailed(uint256)`
+- Error hash: `0xb774c284`
+
+:::
+
+```solidity
+error LSP7BatchCallFailed(uint256 callIndex);
+```
+
+_Batch call failed._
+
+Reverts when a batch call failed.
+
+#### Parameters
+
+| Name | Type | Description |
+| ----------- | :-------: | ----------- |
+| `callIndex` | `uint256` | - |
+
+
+
### LSP7CannotSendToSelf
:::note References
diff --git a/docs/contracts/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.md b/docs/contracts/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.md
index d69b08eff5..16a39f574f 100644
--- a/docs/contracts/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.md
+++ b/docs/contracts/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.md
@@ -178,6 +178,45 @@ Get the number of tokens owned by `tokenOwner`. If the token is divisible (the [
+### batchCalls
+
+:::note References
+
+- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#batchcalls)
+- Solidity implementation: [`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol)
+- Function signature: `batchCalls(bytes[])`
+- Function selector: `0x6963d438`
+
+:::
+
+:::info
+
+It's not possible to send value along the functions call due to the use of `delegatecall`.
+
+:::
+
+```solidity
+function batchCalls(bytes[] data) external nonpayable returns (bytes[] results);
+```
+
+_Executing the following batch of abi-encoded function calls on the contract: `data`._
+
+Allows a caller to batch different function calls in one call. Perform a `delegatecall` on self, to call different functions with preserving the context.
+
+#### Parameters
+
+| Name | Type | Description |
+| ------ | :-------: | -------------------------------------------------------------------- |
+| `data` | `bytes[]` | An array of ABI encoded function calls to be called on the contract. |
+
+#### Returns
+
+| Name | Type | Description |
+| --------- | :-------: | ---------------------------------------------------------------- |
+| `results` | `bytes[]` | An array of abi-encoded data returned by the functions executed. |
+
+
+
### decimals
:::note References
@@ -781,7 +820,8 @@ mapping(bytes32 => bytes) _store
function _setData(bytes32 dataKey, bytes dataValue) internal nonpayable;
```
-Save gas by emitting the [`DataChanged`](#datachanged) event with only the first 256 bytes of dataValue
+The ERC725Y data keys `LSP4TokenName` and `LSP4TokenSymbol` cannot be changed
+via this function once the digital asset contract has been deployed.
@@ -994,6 +1034,47 @@ Allows to run custom logic after updating balances, but **before notifiying send
+### \_notifyTokenOperator
+
+```solidity
+function _notifyTokenOperator(
+ address operator,
+ bytes lsp1Data
+) internal nonpayable;
+```
+
+Attempt to notify the operator `operator` about the `amount` tokens being authorized with.
+This is done by calling its [`universalReceiver`](#universalreceiver) function with the `_TYPEID_LSP7_TOKENOPERATOR` as typeId, if `operator` is a contract that supports the LSP1 interface.
+If `operator` is an EOA or a contract that does not support the LSP1 interface, nothing will happen and no notification will be sent.
+
+#### Parameters
+
+| Name | Type | Description |
+| ---------- | :-------: | ------------------------------------------------------------------------------ |
+| `operator` | `address` | The address to call the [`universalReceiver`](#universalreceiver) function on. |
+| `lsp1Data` | `bytes` | the data to be sent to the `operator` address in the `universalReceiver` call. |
+
+
+
+### \_notifyTokenSender
+
+```solidity
+function _notifyTokenSender(address from, bytes lsp1Data) internal nonpayable;
+```
+
+Attempt to notify the token sender `from` about the `amount` of tokens being transferred.
+This is done by calling its [`universalReceiver`](#universalreceiver) function with the `_TYPEID_LSP7_TOKENSSENDER` as typeId, if `from` is a contract that supports the LSP1 interface.
+If `from` is an EOA or a contract that does not support the LSP1 interface, nothing will happen and no notification will be sent.
+
+#### Parameters
+
+| Name | Type | Description |
+| ---------- | :-------: | ------------------------------------------------------------------------------ |
+| `from` | `address` | The address to call the [`universalReceiver`](#universalreceiver) function on. |
+| `lsp1Data` | `bytes` | the data to be sent to the `from` address in the `universalReceiver` call. |
+
+
+
### \_notifyTokenReceiver
```solidity
@@ -1084,34 +1165,6 @@ CALL opcode, passing the [`msg.data`](#msg.data) appended with the 20 bytes of t
## Events
-### AuthorizedOperator
-
-:::note References
-
-- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#authorizedoperator)
-- Solidity implementation: [`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol)
-- Event signature: `AuthorizedOperator(address,address,uint256,bytes)`
-- Event topic hash: `0x0744b3de98efaff36606a0e67662fb8697adb0ed49d90730bdb4bbf885f30597`
-
-:::
-
-```solidity
-event AuthorizedOperator(address indexed operator, address indexed tokenOwner, uint256 indexed amount, bytes operatorNotificationData);
-```
-
-Emitted when `tokenOwner` enables `operator` for `amount` tokens.
-
-#### Parameters
-
-| Name | Type | Description |
-| -------------------------- | :-------: | ----------------------------------------------------------------------- |
-| `operator` **`indexed`** | `address` | The address authorized as an operator |
-| `tokenOwner` **`indexed`** | `address` | The token owner |
-| `amount` **`indexed`** | `uint256` | The amount of tokens `operator` address has access to from `tokenOwner` |
-| `operatorNotificationData` | `bytes` | The data to notify the operator about via LSP1. |
-
-
-
### DataChanged
:::note References
@@ -1140,43 +1193,47 @@ Emitted when data at a specific `dataKey` was changed to a new value `dataValue`
-### OwnershipTransferred
+### OperatorAuthorizationChanged
:::note References
-- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#ownershiptransferred)
+- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#operatorauthorizationchanged)
- Solidity implementation: [`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol)
-- Event signature: `OwnershipTransferred(address,address)`
-- Event topic hash: `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0`
+- Event signature: `OperatorAuthorizationChanged(address,address,uint256,bytes)`
+- Event topic hash: `0xf772a43bfdf4729b196e3fb54a818b91a2ca6c49d10b2e16278752f9f515c25d`
:::
```solidity
-event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
+event OperatorAuthorizationChanged(address indexed operator, address indexed tokenOwner, uint256 indexed amount, bytes operatorNotificationData);
```
+Emitted when `tokenOwner` enables `operator` for `amount` tokens.
+
#### Parameters
-| Name | Type | Description |
-| ----------------------------- | :-------: | ----------- |
-| `previousOwner` **`indexed`** | `address` | - |
-| `newOwner` **`indexed`** | `address` | - |
+| Name | Type | Description |
+| -------------------------- | :-------: | ----------------------------------------------------------------------- |
+| `operator` **`indexed`** | `address` | The address authorized as an operator |
+| `tokenOwner` **`indexed`** | `address` | The token owner |
+| `amount` **`indexed`** | `uint256` | The amount of tokens `operator` address has access to from `tokenOwner` |
+| `operatorNotificationData` | `bytes` | The data to notify the operator about via LSP1. |
-### RevokedOperator
+### OperatorRevoked
:::note References
-- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#revokedoperator)
+- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#operatorrevoked)
- Solidity implementation: [`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol)
-- Event signature: `RevokedOperator(address,address,bool,bytes)`
-- Event topic hash: `0x66015c8835ee443e5bc280176609215a5035da4bae05bdef994596d7e43aae22`
+- Event signature: `OperatorRevoked(address,address,bool,bytes)`
+- Event topic hash: `0x0ebf5762d8855cbe012d2ca42fb33a81175e17c8a8751f8859931ba453bd4167`
:::
```solidity
-event RevokedOperator(address indexed operator, address indexed tokenOwner, bool notified, bytes operatorNotificationData);
+event OperatorRevoked(address indexed operator, address indexed tokenOwner, bool indexed notified, bytes operatorNotificationData);
```
Emitted when `tokenOwner` disables `operator` for `amount` tokens and set its [`authorizedAmountFor(...)`](#`authorizedamountfor) to `0`.
@@ -1187,11 +1244,35 @@ Emitted when `tokenOwner` disables `operator` for `amount` tokens and set its [`
| -------------------------- | :-------: | ------------------------------------------------------------- |
| `operator` **`indexed`** | `address` | The address revoked from operating |
| `tokenOwner` **`indexed`** | `address` | The token owner |
-| `notified` | `bool` | Bool indicating whether the operator has been notified or not |
+| `notified` **`indexed`** | `bool` | Bool indicating whether the operator has been notified or not |
| `operatorNotificationData` | `bytes` | The data to notify the operator about via LSP1. |
+### OwnershipTransferred
+
+:::note References
+
+- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#ownershiptransferred)
+- Solidity implementation: [`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol)
+- Event signature: `OwnershipTransferred(address,address)`
+- Event topic hash: `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0`
+
+:::
+
+```solidity
+event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
+```
+
+#### Parameters
+
+| Name | Type | Description |
+| ----------------------------- | :-------: | ----------- |
+| `previousOwner` **`indexed`** | `address` | - |
+| `newOwner` **`indexed`** | `address` | - |
+
+
+
### Transfer
:::note References
@@ -1346,7 +1427,7 @@ reverts when the contract is called with a function selector not valid (less tha
error LSP4TokenNameNotEditable();
```
-Reverts when trying to edit the data key `LSP4TokenName` after the digital asset contract has been deployed. The `LSP4TokenName` data key is located inside the ERC725Y Data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed.
+Reverts when trying to edit the data key `LSP4TokenName` after the digital asset contract has been deployed / initialized. The `LSP4TokenName` data key is located inside the ERC725Y data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed / initialized.
@@ -1365,7 +1446,26 @@ Reverts when trying to edit the data key `LSP4TokenName` after the digital asset
error LSP4TokenSymbolNotEditable();
```
-Reverts when trying to edit the data key `LSP4TokenSymbol` after the digital asset contract has been deployed. The `LSP4TokenSymbol` data key is located inside the ERC725Y Data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed.
+Reverts when trying to edit the data key `LSP4TokenSymbol` after the digital asset contract has been deployed / initialized. The `LSP4TokenSymbol` data key is located inside the ERC725Y data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed / initialized.
+
+
+
+### LSP4TokenTypeNotEditable
+
+:::note References
+
+- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp4tokentypenoteditable)
+- Solidity implementation: [`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol)
+- Error signature: `LSP4TokenTypeNotEditable()`
+- Error hash: `0x4ef6d7fb`
+
+:::
+
+```solidity
+error LSP4TokenTypeNotEditable();
+```
+
+Reverts when trying to edit the data key `LSP4TokenType` after the digital asset contract has been deployed / initialized. The `LSP4TokenType` data key is located inside the ERC725Y data key-value store of the digital asset contract. It can be set only once inside the constructor / initializer when the digital asset contract is being deployed / initialized.
@@ -1433,6 +1533,33 @@ reverts when sending an `amount` of tokens larger than the current `balance` of
+### LSP7BatchCallFailed
+
+:::note References
+
+- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7batchcallfailed)
+- Solidity implementation: [`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol)
+- Error signature: `LSP7BatchCallFailed(uint256)`
+- Error hash: `0xb774c284`
+
+:::
+
+```solidity
+error LSP7BatchCallFailed(uint256 callIndex);
+```
+
+_Batch call failed._
+
+Reverts when a batch call failed.
+
+#### Parameters
+
+| Name | Type | Description |
+| ----------- | :-------: | ----------- |
+| `callIndex` | `uint256` | - |
+
+
+
### LSP7CannotSendToSelf
:::note References
diff --git a/docs/contracts/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.md b/docs/contracts/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.md
index b1669e7d61..0e36d9b66d 100644
--- a/docs/contracts/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.md
+++ b/docs/contracts/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.md
@@ -248,6 +248,45 @@ Get the number of tokens owned by `tokenOwner`. If the token is divisible (the [
+### batchCalls
+
+:::note References
+
+- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#batchcalls)
+- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol)
+- Function signature: `batchCalls(bytes[])`
+- Function selector: `0x6963d438`
+
+:::
+
+:::info
+
+It's not possible to send value along the functions call due to the use of `delegatecall`.
+
+:::
+
+```solidity
+function batchCalls(bytes[] data) external nonpayable returns (bytes[] results);
+```
+
+_Executing the following batch of abi-encoded function calls on the contract: `data`._
+
+Allows a caller to batch different function calls in one call. Perform a `delegatecall` on self, to call different functions with preserving the context.
+
+#### Parameters
+
+| Name | Type | Description |
+| ------ | :-------: | -------------------------------------------------------------------- |
+| `data` | `bytes[]` | An array of ABI encoded function calls to be called on the contract. |
+
+#### Returns
+
+| Name | Type | Description |
+| --------- | :-------: | ---------------------------------------------------------------- |
+| `results` | `bytes[]` | An array of abi-encoded data returned by the functions executed. |
+
+
+
### decimals
:::note References
@@ -958,7 +997,8 @@ mapping(bytes32 => bytes) _store
function _setData(bytes32 dataKey, bytes dataValue) internal nonpayable;
```
-Save gas by emitting the [`DataChanged`](#datachanged) event with only the first 256 bytes of dataValue
+The ERC725Y data keys `LSP4TokenName` and `LSP4TokenSymbol` cannot be changed
+via this function once the digital asset contract has been deployed.
@@ -1083,6 +1123,47 @@ Allows to run custom logic after updating balances, but **before notifiying send
+### \_notifyTokenOperator
+
+```solidity
+function _notifyTokenOperator(
+ address operator,
+ bytes lsp1Data
+) internal nonpayable;
+```
+
+Attempt to notify the operator `operator` about the `amount` tokens being authorized with.
+This is done by calling its [`universalReceiver`](#universalreceiver) function with the `_TYPEID_LSP7_TOKENOPERATOR` as typeId, if `operator` is a contract that supports the LSP1 interface.
+If `operator` is an EOA or a contract that does not support the LSP1 interface, nothing will happen and no notification will be sent.
+
+#### Parameters
+
+| Name | Type | Description |
+| ---------- | :-------: | ------------------------------------------------------------------------------ |
+| `operator` | `address` | The address to call the [`universalReceiver`](#universalreceiver) function on. |
+| `lsp1Data` | `bytes` | the data to be sent to the `operator` address in the `universalReceiver` call. |
+
+
+
+### \_notifyTokenSender
+
+```solidity
+function _notifyTokenSender(address from, bytes lsp1Data) internal nonpayable;
+```
+
+Attempt to notify the token sender `from` about the `amount` of tokens being transferred.
+This is done by calling its [`universalReceiver`](#universalreceiver) function with the `_TYPEID_LSP7_TOKENSSENDER` as typeId, if `from` is a contract that supports the LSP1 interface.
+If `from` is an EOA or a contract that does not support the LSP1 interface, nothing will happen and no notification will be sent.
+
+#### Parameters
+
+| Name | Type | Description |
+| ---------- | :-------: | ------------------------------------------------------------------------------ |
+| `from` | `address` | The address to call the [`universalReceiver`](#universalreceiver) function on. |
+| `lsp1Data` | `bytes` | the data to be sent to the `from` address in the `universalReceiver` call. |
+
+
+
### \_notifyTokenReceiver
```solidity
@@ -1200,34 +1281,6 @@ Emitted when the allowance of a `spender` for an `owner` is set by a call to [`a
-### AuthorizedOperator
-
-:::note References
-
-- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#authorizedoperator)
-- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol)
-- Event signature: `AuthorizedOperator(address,address,uint256,bytes)`
-- Event topic hash: `0x0744b3de98efaff36606a0e67662fb8697adb0ed49d90730bdb4bbf885f30597`
-
-:::
-
-```solidity
-event AuthorizedOperator(address indexed operator, address indexed tokenOwner, uint256 indexed amount, bytes operatorNotificationData);
-```
-
-Emitted when `tokenOwner` enables `operator` for `amount` tokens.
-
-#### Parameters
-
-| Name | Type | Description |
-| -------------------------- | :-------: | ----------------------------------------------------------------------- |
-| `operator` **`indexed`** | `address` | The address authorized as an operator |
-| `tokenOwner` **`indexed`** | `address` | The token owner |
-| `amount` **`indexed`** | `uint256` | The amount of tokens `operator` address has access to from `tokenOwner` |
-| `operatorNotificationData` | `bytes` | The data to notify the operator about via LSP1. |
-
-
-
### DataChanged
:::note References
@@ -1256,43 +1309,47 @@ Emitted when data at a specific `dataKey` was changed to a new value `dataValue`
-### OwnershipTransferred
+### OperatorAuthorizationChanged
:::note References
-- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#ownershiptransferred)
+- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#operatorauthorizationchanged)
- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol)
-- Event signature: `OwnershipTransferred(address,address)`
-- Event topic hash: `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0`
+- Event signature: `OperatorAuthorizationChanged(address,address,uint256,bytes)`
+- Event topic hash: `0xf772a43bfdf4729b196e3fb54a818b91a2ca6c49d10b2e16278752f9f515c25d`
:::
```solidity
-event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
+event OperatorAuthorizationChanged(address indexed operator, address indexed tokenOwner, uint256 indexed amount, bytes operatorNotificationData);
```
+Emitted when `tokenOwner` enables `operator` for `amount` tokens.
+
#### Parameters
-| Name | Type | Description |
-| ----------------------------- | :-------: | ----------- |
-| `previousOwner` **`indexed`** | `address` | - |
-| `newOwner` **`indexed`** | `address` | - |
+| Name | Type | Description |
+| -------------------------- | :-------: | ----------------------------------------------------------------------- |
+| `operator` **`indexed`** | `address` | The address authorized as an operator |
+| `tokenOwner` **`indexed`** | `address` | The token owner |
+| `amount` **`indexed`** | `uint256` | The amount of tokens `operator` address has access to from `tokenOwner` |
+| `operatorNotificationData` | `bytes` | The data to notify the operator about via LSP1. |
-### RevokedOperator
+### OperatorRevoked
:::note References
-- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#revokedoperator)
+- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#operatorrevoked)
- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol)
-- Event signature: `RevokedOperator(address,address,bool,bytes)`
-- Event topic hash: `0x66015c8835ee443e5bc280176609215a5035da4bae05bdef994596d7e43aae22`
+- Event signature: `OperatorRevoked(address,address,bool,bytes)`
+- Event topic hash: `0x0ebf5762d8855cbe012d2ca42fb33a81175e17c8a8751f8859931ba453bd4167`
:::
```solidity
-event RevokedOperator(address indexed operator, address indexed tokenOwner, bool notified, bytes operatorNotificationData);
+event OperatorRevoked(address indexed operator, address indexed tokenOwner, bool indexed notified, bytes operatorNotificationData);
```
Emitted when `tokenOwner` disables `operator` for `amount` tokens and set its [`authorizedAmountFor(...)`](#`authorizedamountfor) to `0`.
@@ -1303,11 +1360,35 @@ Emitted when `tokenOwner` disables `operator` for `amount` tokens and set its [`
| -------------------------- | :-------: | ------------------------------------------------------------- |
| `operator` **`indexed`** | `address` | The address revoked from operating |
| `tokenOwner` **`indexed`** | `address` | The token owner |
-| `notified` | `bool` | Bool indicating whether the operator has been notified or not |
+| `notified` **`indexed`** | `bool` | Bool indicating whether the operator has been notified or not |
| `operatorNotificationData` | `bytes` | The data to notify the operator about via LSP1. |
+### OwnershipTransferred
+
+:::note References
+
+- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#ownershiptransferred)
+- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol)
+- Event signature: `OwnershipTransferred(address,address)`
+- Event topic hash: `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0`
+
+:::
+
+```solidity
+event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
+```
+
+#### Parameters
+
+| Name | Type | Description |
+| ----------------------------- | :-------: | ----------- |
+| `previousOwner` **`indexed`** | `address` | - |
+| `newOwner` **`indexed`** | `address` | - |
+
+
+
### Transfer
:::note References
@@ -1489,7 +1570,7 @@ reverts when the contract is called with a function selector not valid (less tha
error LSP4TokenNameNotEditable();
```
-Reverts when trying to edit the data key `LSP4TokenName` after the digital asset contract has been deployed. The `LSP4TokenName` data key is located inside the ERC725Y Data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed.
+Reverts when trying to edit the data key `LSP4TokenName` after the digital asset contract has been deployed / initialized. The `LSP4TokenName` data key is located inside the ERC725Y data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed / initialized.
@@ -1508,7 +1589,26 @@ Reverts when trying to edit the data key `LSP4TokenName` after the digital asset
error LSP4TokenSymbolNotEditable();
```
-Reverts when trying to edit the data key `LSP4TokenSymbol` after the digital asset contract has been deployed. The `LSP4TokenSymbol` data key is located inside the ERC725Y Data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed.
+Reverts when trying to edit the data key `LSP4TokenSymbol` after the digital asset contract has been deployed / initialized. The `LSP4TokenSymbol` data key is located inside the ERC725Y data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed / initialized.
+
+
+
+### LSP4TokenTypeNotEditable
+
+:::note References
+
+- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp4tokentypenoteditable)
+- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol)
+- Error signature: `LSP4TokenTypeNotEditable()`
+- Error hash: `0x4ef6d7fb`
+
+:::
+
+```solidity
+error LSP4TokenTypeNotEditable();
+```
+
+Reverts when trying to edit the data key `LSP4TokenType` after the digital asset contract has been deployed / initialized. The `LSP4TokenType` data key is located inside the ERC725Y data key-value store of the digital asset contract. It can be set only once inside the constructor / initializer when the digital asset contract is being deployed / initialized.
@@ -1576,6 +1676,33 @@ reverts when sending an `amount` of tokens larger than the current `balance` of
+### LSP7BatchCallFailed
+
+:::note References
+
+- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7batchcallfailed)
+- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol)
+- Error signature: `LSP7BatchCallFailed(uint256)`
+- Error hash: `0xb774c284`
+
+:::
+
+```solidity
+error LSP7BatchCallFailed(uint256 callIndex);
+```
+
+_Batch call failed._
+
+Reverts when a batch call failed.
+
+#### Parameters
+
+| Name | Type | Description |
+| ----------- | :-------: | ----------- |
+| `callIndex` | `uint256` | - |
+
+
+
### LSP7CannotSendToSelf
:::note References
diff --git a/docs/contracts/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.md b/docs/contracts/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.md
index 3cb8ba241c..7ef5aeaf34 100644
--- a/docs/contracts/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.md
+++ b/docs/contracts/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.md
@@ -31,18 +31,24 @@ When marked as 'public', a method can be called both externally and internally,
:::
```solidity
-constructor(string name_, string symbol_, address newOwner_);
+constructor(
+ string name_,
+ string symbol_,
+ address newOwner_,
+ uint256 lsp4TokenType_
+);
```
_Deploying a `LSP7CompatibleERC20Mintable` token contract with: token name = `name_`, token symbol = `symbol_`, and address `newOwner_` as the token contract owner._
#### Parameters
-| Name | Type | Description |
-| ----------- | :-------: | -------------------------------- |
-| `name_` | `string` | The name of the token. |
-| `symbol_` | `string` | The symbol of the token. |
-| `newOwner_` | `address` | The owner of the token contract. |
+| Name | Type | Description |
+| ---------------- | :-------: | ---------------------------------------------------------------------------------------------------- |
+| `name_` | `string` | The name of the token. |
+| `symbol_` | `string` | The symbol of the token. |
+| `newOwner_` | `address` | The owner of the token contract. |
+| `lsp4TokenType_` | `uint256` | The type of token this digital asset contract represents (`0` = Token, `1` = NFT, `2` = Collection). |
@@ -249,6 +255,45 @@ Get the number of tokens owned by `tokenOwner`. If the token is divisible (the [
+### batchCalls
+
+:::note References
+
+- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#batchcalls)
+- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol)
+- Function signature: `batchCalls(bytes[])`
+- Function selector: `0x6963d438`
+
+:::
+
+:::info
+
+It's not possible to send value along the functions call due to the use of `delegatecall`.
+
+:::
+
+```solidity
+function batchCalls(bytes[] data) external nonpayable returns (bytes[] results);
+```
+
+_Executing the following batch of abi-encoded function calls on the contract: `data`._
+
+Allows a caller to batch different function calls in one call. Perform a `delegatecall` on self, to call different functions with preserving the context.
+
+#### Parameters
+
+| Name | Type | Description |
+| ------ | :-------: | -------------------------------------------------------------------- |
+| `data` | `bytes[]` | An array of ABI encoded function calls to be called on the contract. |
+
+#### Returns
+
+| Name | Type | Description |
+| --------- | :-------: | ---------------------------------------------------------------- |
+| `results` | `bytes[]` | An array of abi-encoded data returned by the functions executed. |
+
+
+
### decimals
:::note References
@@ -992,7 +1037,8 @@ mapping(bytes32 => bytes) _store
function _setData(bytes32 dataKey, bytes dataValue) internal nonpayable;
```
-Save gas by emitting the [`DataChanged`](#datachanged) event with only the first 256 bytes of dataValue
+The ERC725Y data keys `LSP4TokenName` and `LSP4TokenSymbol` cannot be changed
+via this function once the digital asset contract has been deployed.
@@ -1117,6 +1163,47 @@ Allows to run custom logic after updating balances, but **before notifiying send
+### \_notifyTokenOperator
+
+```solidity
+function _notifyTokenOperator(
+ address operator,
+ bytes lsp1Data
+) internal nonpayable;
+```
+
+Attempt to notify the operator `operator` about the `amount` tokens being authorized with.
+This is done by calling its [`universalReceiver`](#universalreceiver) function with the `_TYPEID_LSP7_TOKENOPERATOR` as typeId, if `operator` is a contract that supports the LSP1 interface.
+If `operator` is an EOA or a contract that does not support the LSP1 interface, nothing will happen and no notification will be sent.
+
+#### Parameters
+
+| Name | Type | Description |
+| ---------- | :-------: | ------------------------------------------------------------------------------ |
+| `operator` | `address` | The address to call the [`universalReceiver`](#universalreceiver) function on. |
+| `lsp1Data` | `bytes` | the data to be sent to the `operator` address in the `universalReceiver` call. |
+
+
+
+### \_notifyTokenSender
+
+```solidity
+function _notifyTokenSender(address from, bytes lsp1Data) internal nonpayable;
+```
+
+Attempt to notify the token sender `from` about the `amount` of tokens being transferred.
+This is done by calling its [`universalReceiver`](#universalreceiver) function with the `_TYPEID_LSP7_TOKENSSENDER` as typeId, if `from` is a contract that supports the LSP1 interface.
+If `from` is an EOA or a contract that does not support the LSP1 interface, nothing will happen and no notification will be sent.
+
+#### Parameters
+
+| Name | Type | Description |
+| ---------- | :-------: | ------------------------------------------------------------------------------ |
+| `from` | `address` | The address to call the [`universalReceiver`](#universalreceiver) function on. |
+| `lsp1Data` | `bytes` | the data to be sent to the `from` address in the `universalReceiver` call. |
+
+
+
### \_notifyTokenReceiver
```solidity
@@ -1234,34 +1321,6 @@ Emitted when the allowance of a `spender` for an `owner` is set by a call to [`a
-### AuthorizedOperator
-
-:::note References
-
-- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#authorizedoperator)
-- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol)
-- Event signature: `AuthorizedOperator(address,address,uint256,bytes)`
-- Event topic hash: `0x0744b3de98efaff36606a0e67662fb8697adb0ed49d90730bdb4bbf885f30597`
-
-:::
-
-```solidity
-event AuthorizedOperator(address indexed operator, address indexed tokenOwner, uint256 indexed amount, bytes operatorNotificationData);
-```
-
-Emitted when `tokenOwner` enables `operator` for `amount` tokens.
-
-#### Parameters
-
-| Name | Type | Description |
-| -------------------------- | :-------: | ----------------------------------------------------------------------- |
-| `operator` **`indexed`** | `address` | The address authorized as an operator |
-| `tokenOwner` **`indexed`** | `address` | The token owner |
-| `amount` **`indexed`** | `uint256` | The amount of tokens `operator` address has access to from `tokenOwner` |
-| `operatorNotificationData` | `bytes` | The data to notify the operator about via LSP1. |
-
-
-
### DataChanged
:::note References
@@ -1290,43 +1349,47 @@ Emitted when data at a specific `dataKey` was changed to a new value `dataValue`
-### OwnershipTransferred
+### OperatorAuthorizationChanged
:::note References
-- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#ownershiptransferred)
+- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#operatorauthorizationchanged)
- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol)
-- Event signature: `OwnershipTransferred(address,address)`
-- Event topic hash: `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0`
+- Event signature: `OperatorAuthorizationChanged(address,address,uint256,bytes)`
+- Event topic hash: `0xf772a43bfdf4729b196e3fb54a818b91a2ca6c49d10b2e16278752f9f515c25d`
:::
```solidity
-event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
+event OperatorAuthorizationChanged(address indexed operator, address indexed tokenOwner, uint256 indexed amount, bytes operatorNotificationData);
```
+Emitted when `tokenOwner` enables `operator` for `amount` tokens.
+
#### Parameters
-| Name | Type | Description |
-| ----------------------------- | :-------: | ----------- |
-| `previousOwner` **`indexed`** | `address` | - |
-| `newOwner` **`indexed`** | `address` | - |
+| Name | Type | Description |
+| -------------------------- | :-------: | ----------------------------------------------------------------------- |
+| `operator` **`indexed`** | `address` | The address authorized as an operator |
+| `tokenOwner` **`indexed`** | `address` | The token owner |
+| `amount` **`indexed`** | `uint256` | The amount of tokens `operator` address has access to from `tokenOwner` |
+| `operatorNotificationData` | `bytes` | The data to notify the operator about via LSP1. |
-### RevokedOperator
+### OperatorRevoked
:::note References
-- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#revokedoperator)
+- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#operatorrevoked)
- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol)
-- Event signature: `RevokedOperator(address,address,bool,bytes)`
-- Event topic hash: `0x66015c8835ee443e5bc280176609215a5035da4bae05bdef994596d7e43aae22`
+- Event signature: `OperatorRevoked(address,address,bool,bytes)`
+- Event topic hash: `0x0ebf5762d8855cbe012d2ca42fb33a81175e17c8a8751f8859931ba453bd4167`
:::
```solidity
-event RevokedOperator(address indexed operator, address indexed tokenOwner, bool notified, bytes operatorNotificationData);
+event OperatorRevoked(address indexed operator, address indexed tokenOwner, bool indexed notified, bytes operatorNotificationData);
```
Emitted when `tokenOwner` disables `operator` for `amount` tokens and set its [`authorizedAmountFor(...)`](#`authorizedamountfor) to `0`.
@@ -1337,11 +1400,35 @@ Emitted when `tokenOwner` disables `operator` for `amount` tokens and set its [`
| -------------------------- | :-------: | ------------------------------------------------------------- |
| `operator` **`indexed`** | `address` | The address revoked from operating |
| `tokenOwner` **`indexed`** | `address` | The token owner |
-| `notified` | `bool` | Bool indicating whether the operator has been notified or not |
+| `notified` **`indexed`** | `bool` | Bool indicating whether the operator has been notified or not |
| `operatorNotificationData` | `bytes` | The data to notify the operator about via LSP1. |
+### OwnershipTransferred
+
+:::note References
+
+- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#ownershiptransferred)
+- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol)
+- Event signature: `OwnershipTransferred(address,address)`
+- Event topic hash: `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0`
+
+:::
+
+```solidity
+event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
+```
+
+#### Parameters
+
+| Name | Type | Description |
+| ----------------------------- | :-------: | ----------- |
+| `previousOwner` **`indexed`** | `address` | - |
+| `newOwner` **`indexed`** | `address` | - |
+
+
+
### Transfer
:::note References
@@ -1523,7 +1610,7 @@ reverts when the contract is called with a function selector not valid (less tha
error LSP4TokenNameNotEditable();
```
-Reverts when trying to edit the data key `LSP4TokenName` after the digital asset contract has been deployed. The `LSP4TokenName` data key is located inside the ERC725Y Data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed.
+Reverts when trying to edit the data key `LSP4TokenName` after the digital asset contract has been deployed / initialized. The `LSP4TokenName` data key is located inside the ERC725Y data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed / initialized.
@@ -1542,7 +1629,26 @@ Reverts when trying to edit the data key `LSP4TokenName` after the digital asset
error LSP4TokenSymbolNotEditable();
```
-Reverts when trying to edit the data key `LSP4TokenSymbol` after the digital asset contract has been deployed. The `LSP4TokenSymbol` data key is located inside the ERC725Y Data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed.
+Reverts when trying to edit the data key `LSP4TokenSymbol` after the digital asset contract has been deployed / initialized. The `LSP4TokenSymbol` data key is located inside the ERC725Y data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed / initialized.
+
+
+
+### LSP4TokenTypeNotEditable
+
+:::note References
+
+- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp4tokentypenoteditable)
+- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol)
+- Error signature: `LSP4TokenTypeNotEditable()`
+- Error hash: `0x4ef6d7fb`
+
+:::
+
+```solidity
+error LSP4TokenTypeNotEditable();
+```
+
+Reverts when trying to edit the data key `LSP4TokenType` after the digital asset contract has been deployed / initialized. The `LSP4TokenType` data key is located inside the ERC725Y data key-value store of the digital asset contract. It can be set only once inside the constructor / initializer when the digital asset contract is being deployed / initialized.
@@ -1610,6 +1716,33 @@ reverts when sending an `amount` of tokens larger than the current `balance` of
+### LSP7BatchCallFailed
+
+:::note References
+
+- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7batchcallfailed)
+- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol)
+- Error signature: `LSP7BatchCallFailed(uint256)`
+- Error hash: `0xb774c284`
+
+:::
+
+```solidity
+error LSP7BatchCallFailed(uint256 callIndex);
+```
+
+_Batch call failed._
+
+Reverts when a batch call failed.
+
+#### Parameters
+
+| Name | Type | Description |
+| ----------- | :-------: | ----------- |
+| `callIndex` | `uint256` | - |
+
+
+
### LSP7CannotSendToSelf
:::note References
diff --git a/docs/contracts/contracts/LSP7DigitalAsset/presets/LSP7Mintable.md b/docs/contracts/contracts/LSP7DigitalAsset/presets/LSP7Mintable.md
index 4998d6f025..74d5eaed59 100644
--- a/docs/contracts/contracts/LSP7DigitalAsset/presets/LSP7Mintable.md
+++ b/docs/contracts/contracts/LSP7DigitalAsset/presets/LSP7Mintable.md
@@ -35,6 +35,7 @@ constructor(
string name_,
string symbol_,
address newOwner_,
+ uint256 lsp4TokenType_,
bool isNonDivisible_
);
```
@@ -43,12 +44,13 @@ _Deploying a `LSP7Mintable` token contract with: token name = `name_`, token sym
#### Parameters
-| Name | Type | Description |
-| ----------------- | :-------: | -------------------------------- |
-| `name_` | `string` | The name of the token. |
-| `symbol_` | `string` | The symbol of the token. |
-| `newOwner_` | `address` | The owner of the token contract. |
-| `isNonDivisible_` | `bool` | - |
+| Name | Type | Description |
+| ----------------- | :-------: | ---------------------------------------------------------------------------------------------------- |
+| `name_` | `string` | The name of the token. |
+| `symbol_` | `string` | The symbol of the token. |
+| `newOwner_` | `address` | The owner of the token contract. |
+| `lsp4TokenType_` | `uint256` | The type of token this digital asset contract represents (`0` = Token, `1` = NFT, `2` = Collection). |
+| `isNonDivisible_` | `bool` | Specify if the LSP7 token is a fungible or non-fungible token. |
@@ -209,6 +211,45 @@ Get the number of tokens owned by `tokenOwner`. If the token is divisible (the [
+### batchCalls
+
+:::note References
+
+- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#batchcalls)
+- Solidity implementation: [`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol)
+- Function signature: `batchCalls(bytes[])`
+- Function selector: `0x6963d438`
+
+:::
+
+:::info
+
+It's not possible to send value along the functions call due to the use of `delegatecall`.
+
+:::
+
+```solidity
+function batchCalls(bytes[] data) external nonpayable returns (bytes[] results);
+```
+
+_Executing the following batch of abi-encoded function calls on the contract: `data`._
+
+Allows a caller to batch different function calls in one call. Perform a `delegatecall` on self, to call different functions with preserving the context.
+
+#### Parameters
+
+| Name | Type | Description |
+| ------ | :-------: | -------------------------------------------------------------------- |
+| `data` | `bytes[]` | An array of ABI encoded function calls to be called on the contract. |
+
+#### Returns
+
+| Name | Type | Description |
+| --------- | :-------: | ---------------------------------------------------------------- |
+| `results` | `bytes[]` | An array of abi-encoded data returned by the functions executed. |
+
+
+
### decimals
:::note References
@@ -818,7 +859,8 @@ mapping(bytes32 => bytes) _store
function _setData(bytes32 dataKey, bytes dataValue) internal nonpayable;
```
-Save gas by emitting the [`DataChanged`](#datachanged) event with only the first 256 bytes of dataValue
+The ERC725Y data keys `LSP4TokenName` and `LSP4TokenSymbol` cannot be changed
+via this function once the digital asset contract has been deployed.
@@ -1057,6 +1099,47 @@ Allows to run custom logic after updating balances, but **before notifiying send
+### \_notifyTokenOperator
+
+```solidity
+function _notifyTokenOperator(
+ address operator,
+ bytes lsp1Data
+) internal nonpayable;
+```
+
+Attempt to notify the operator `operator` about the `amount` tokens being authorized with.
+This is done by calling its [`universalReceiver`](#universalreceiver) function with the `_TYPEID_LSP7_TOKENOPERATOR` as typeId, if `operator` is a contract that supports the LSP1 interface.
+If `operator` is an EOA or a contract that does not support the LSP1 interface, nothing will happen and no notification will be sent.
+
+#### Parameters
+
+| Name | Type | Description |
+| ---------- | :-------: | ------------------------------------------------------------------------------ |
+| `operator` | `address` | The address to call the [`universalReceiver`](#universalreceiver) function on. |
+| `lsp1Data` | `bytes` | the data to be sent to the `operator` address in the `universalReceiver` call. |
+
+
+
+### \_notifyTokenSender
+
+```solidity
+function _notifyTokenSender(address from, bytes lsp1Data) internal nonpayable;
+```
+
+Attempt to notify the token sender `from` about the `amount` of tokens being transferred.
+This is done by calling its [`universalReceiver`](#universalreceiver) function with the `_TYPEID_LSP7_TOKENSSENDER` as typeId, if `from` is a contract that supports the LSP1 interface.
+If `from` is an EOA or a contract that does not support the LSP1 interface, nothing will happen and no notification will be sent.
+
+#### Parameters
+
+| Name | Type | Description |
+| ---------- | :-------: | ------------------------------------------------------------------------------ |
+| `from` | `address` | The address to call the [`universalReceiver`](#universalreceiver) function on. |
+| `lsp1Data` | `bytes` | the data to be sent to the `from` address in the `universalReceiver` call. |
+
+
+
### \_notifyTokenReceiver
```solidity
@@ -1147,34 +1230,6 @@ CALL opcode, passing the [`msg.data`](#msg.data) appended with the 20 bytes of t
## Events
-### AuthorizedOperator
-
-:::note References
-
-- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#authorizedoperator)
-- Solidity implementation: [`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol)
-- Event signature: `AuthorizedOperator(address,address,uint256,bytes)`
-- Event topic hash: `0x0744b3de98efaff36606a0e67662fb8697adb0ed49d90730bdb4bbf885f30597`
-
-:::
-
-```solidity
-event AuthorizedOperator(address indexed operator, address indexed tokenOwner, uint256 indexed amount, bytes operatorNotificationData);
-```
-
-Emitted when `tokenOwner` enables `operator` for `amount` tokens.
-
-#### Parameters
-
-| Name | Type | Description |
-| -------------------------- | :-------: | ----------------------------------------------------------------------- |
-| `operator` **`indexed`** | `address` | The address authorized as an operator |
-| `tokenOwner` **`indexed`** | `address` | The token owner |
-| `amount` **`indexed`** | `uint256` | The amount of tokens `operator` address has access to from `tokenOwner` |
-| `operatorNotificationData` | `bytes` | The data to notify the operator about via LSP1. |
-
-
-
### DataChanged
:::note References
@@ -1203,43 +1258,47 @@ Emitted when data at a specific `dataKey` was changed to a new value `dataValue`
-### OwnershipTransferred
+### OperatorAuthorizationChanged
:::note References
-- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#ownershiptransferred)
+- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#operatorauthorizationchanged)
- Solidity implementation: [`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol)
-- Event signature: `OwnershipTransferred(address,address)`
-- Event topic hash: `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0`
+- Event signature: `OperatorAuthorizationChanged(address,address,uint256,bytes)`
+- Event topic hash: `0xf772a43bfdf4729b196e3fb54a818b91a2ca6c49d10b2e16278752f9f515c25d`
:::
```solidity
-event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
+event OperatorAuthorizationChanged(address indexed operator, address indexed tokenOwner, uint256 indexed amount, bytes operatorNotificationData);
```
+Emitted when `tokenOwner` enables `operator` for `amount` tokens.
+
#### Parameters
-| Name | Type | Description |
-| ----------------------------- | :-------: | ----------- |
-| `previousOwner` **`indexed`** | `address` | - |
-| `newOwner` **`indexed`** | `address` | - |
+| Name | Type | Description |
+| -------------------------- | :-------: | ----------------------------------------------------------------------- |
+| `operator` **`indexed`** | `address` | The address authorized as an operator |
+| `tokenOwner` **`indexed`** | `address` | The token owner |
+| `amount` **`indexed`** | `uint256` | The amount of tokens `operator` address has access to from `tokenOwner` |
+| `operatorNotificationData` | `bytes` | The data to notify the operator about via LSP1. |
-### RevokedOperator
+### OperatorRevoked
:::note References
-- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#revokedoperator)
+- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#operatorrevoked)
- Solidity implementation: [`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol)
-- Event signature: `RevokedOperator(address,address,bool,bytes)`
-- Event topic hash: `0x66015c8835ee443e5bc280176609215a5035da4bae05bdef994596d7e43aae22`
+- Event signature: `OperatorRevoked(address,address,bool,bytes)`
+- Event topic hash: `0x0ebf5762d8855cbe012d2ca42fb33a81175e17c8a8751f8859931ba453bd4167`
:::
```solidity
-event RevokedOperator(address indexed operator, address indexed tokenOwner, bool notified, bytes operatorNotificationData);
+event OperatorRevoked(address indexed operator, address indexed tokenOwner, bool indexed notified, bytes operatorNotificationData);
```
Emitted when `tokenOwner` disables `operator` for `amount` tokens and set its [`authorizedAmountFor(...)`](#`authorizedamountfor) to `0`.
@@ -1250,11 +1309,35 @@ Emitted when `tokenOwner` disables `operator` for `amount` tokens and set its [`
| -------------------------- | :-------: | ------------------------------------------------------------- |
| `operator` **`indexed`** | `address` | The address revoked from operating |
| `tokenOwner` **`indexed`** | `address` | The token owner |
-| `notified` | `bool` | Bool indicating whether the operator has been notified or not |
+| `notified` **`indexed`** | `bool` | Bool indicating whether the operator has been notified or not |
| `operatorNotificationData` | `bytes` | The data to notify the operator about via LSP1. |
+### OwnershipTransferred
+
+:::note References
+
+- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#ownershiptransferred)
+- Solidity implementation: [`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol)
+- Event signature: `OwnershipTransferred(address,address)`
+- Event topic hash: `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0`
+
+:::
+
+```solidity
+event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
+```
+
+#### Parameters
+
+| Name | Type | Description |
+| ----------------------------- | :-------: | ----------- |
+| `previousOwner` **`indexed`** | `address` | - |
+| `newOwner` **`indexed`** | `address` | - |
+
+
+
### Transfer
:::note References
@@ -1409,7 +1492,7 @@ reverts when the contract is called with a function selector not valid (less tha
error LSP4TokenNameNotEditable();
```
-Reverts when trying to edit the data key `LSP4TokenName` after the digital asset contract has been deployed. The `LSP4TokenName` data key is located inside the ERC725Y Data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed.
+Reverts when trying to edit the data key `LSP4TokenName` after the digital asset contract has been deployed / initialized. The `LSP4TokenName` data key is located inside the ERC725Y data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed / initialized.
@@ -1428,7 +1511,26 @@ Reverts when trying to edit the data key `LSP4TokenName` after the digital asset
error LSP4TokenSymbolNotEditable();
```
-Reverts when trying to edit the data key `LSP4TokenSymbol` after the digital asset contract has been deployed. The `LSP4TokenSymbol` data key is located inside the ERC725Y Data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed.
+Reverts when trying to edit the data key `LSP4TokenSymbol` after the digital asset contract has been deployed / initialized. The `LSP4TokenSymbol` data key is located inside the ERC725Y data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed / initialized.
+
+
+
+### LSP4TokenTypeNotEditable
+
+:::note References
+
+- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp4tokentypenoteditable)
+- Solidity implementation: [`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol)
+- Error signature: `LSP4TokenTypeNotEditable()`
+- Error hash: `0x4ef6d7fb`
+
+:::
+
+```solidity
+error LSP4TokenTypeNotEditable();
+```
+
+Reverts when trying to edit the data key `LSP4TokenType` after the digital asset contract has been deployed / initialized. The `LSP4TokenType` data key is located inside the ERC725Y data key-value store of the digital asset contract. It can be set only once inside the constructor / initializer when the digital asset contract is being deployed / initialized.
@@ -1496,6 +1598,33 @@ reverts when sending an `amount` of tokens larger than the current `balance` of
+### LSP7BatchCallFailed
+
+:::note References
+
+- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7batchcallfailed)
+- Solidity implementation: [`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol)
+- Error signature: `LSP7BatchCallFailed(uint256)`
+- Error hash: `0xb774c284`
+
+:::
+
+```solidity
+error LSP7BatchCallFailed(uint256 callIndex);
+```
+
+_Batch call failed._
+
+Reverts when a batch call failed.
+
+#### Parameters
+
+| Name | Type | Description |
+| ----------- | :-------: | ----------- |
+| `callIndex` | `uint256` | - |
+
+
+
### LSP7CannotSendToSelf
:::note References
diff --git a/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.md b/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.md
index 9a162cb7a8..5cbd8014a9 100644
--- a/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.md
+++ b/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.md
@@ -139,6 +139,45 @@ Get the number of token IDs owned by `tokenOwner`.
+### batchCalls
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#batchcalls)
+- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol)
+- Function signature: `batchCalls(bytes[])`
+- Function selector: `0x6963d438`
+
+:::
+
+:::info
+
+It's not possible to send value along the functions call due to the use of `delegatecall`.
+
+:::
+
+```solidity
+function batchCalls(bytes[] data) external nonpayable returns (bytes[] results);
+```
+
+_Executing the following batch of abi-encoded function calls on the contract: `data`._
+
+Allows a caller to batch different function calls in one call. Perform a `delegatecall` on self, to call different functions with preserving the context.
+
+#### Parameters
+
+| Name | Type | Description |
+| ------ | :-------: | -------------------------------------------------------------------- |
+| `data` | `bytes[]` | An array of ABI encoded function calls to be called on the contract. |
+
+#### Returns
+
+| Name | Type | Description |
+| --------- | :-------: | ---------------------------------------------------------------- |
+| `results` | `bytes[]` | An array of abi-encoded data returned by the functions executed. |
+
+
+
### getData
:::note References
@@ -207,6 +246,76 @@ Get in the ERC725Y storage the bytes data stored at multiple data keys `dataKeys
+### getDataBatchForTokenIds
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#getdatabatchfortokenids)
+- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol)
+- Function signature: `getDataBatchForTokenIds(bytes32[],bytes32[])`
+- Function selector: `0x1d26fce6`
+
+:::
+
+```solidity
+function getDataBatchForTokenIds(
+ bytes32[] tokenIds,
+ bytes32[] dataKeys
+) external view returns (bytes[] dataValues);
+```
+
+_Retrieves data in batch for multiple `tokenId` and `dataKey` pairs._
+
+#### Parameters
+
+| Name | Type | Description |
+| ---------- | :---------: | ----------------------------------------------------- |
+| `tokenIds` | `bytes32[]` | An array of token IDs. |
+| `dataKeys` | `bytes32[]` | An array of data keys corresponding to the token IDs. |
+
+#### Returns
+
+| Name | Type | Description |
+| ------------ | :-------: | ----------------------------------------------------------------- |
+| `dataValues` | `bytes[]` | An array of data values for each pair of `tokenId` and `dataKey`. |
+
+
+
+### getDataForTokenId
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#getdatafortokenid)
+- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol)
+- Function signature: `getDataForTokenId(bytes32,bytes32)`
+- Function selector: `0x16e023b3`
+
+:::
+
+```solidity
+function getDataForTokenId(
+ bytes32 tokenId,
+ bytes32 dataKey
+) external view returns (bytes dataValue);
+```
+
+_Retrieves data for a specific `tokenId` and `dataKey`._
+
+#### Parameters
+
+| Name | Type | Description |
+| --------- | :-------: | ---------------------------------- |
+| `tokenId` | `bytes32` | The unique identifier for a token. |
+| `dataKey` | `bytes32` | The key for the data to retrieve. |
+
+#### Returns
+
+| Name | Type | Description |
+| ----------- | :-----: | ----------------------------------------------------------------- |
+| `dataValue` | `bytes` | The data value associated with the given `tokenId` and `dataKey`. |
+
+
+
### getOperatorsOf
:::note References
@@ -450,6 +559,68 @@ Batch data setting function that behaves the same as [`setData`](#setdata) but a
+### setDataBatchForTokenIds
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#setdatabatchfortokenids)
+- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol)
+- Function signature: `setDataBatchForTokenIds(bytes32[],bytes32[],bytes[])`
+- Function selector: `0xbe9f0e6f`
+
+:::
+
+```solidity
+function setDataBatchForTokenIds(
+ bytes32[] tokenIds,
+ bytes32[] dataKeys,
+ bytes[] dataValues
+) external nonpayable;
+```
+
+_Sets data in batch for multiple `tokenId` and `dataKey` pairs._
+
+#### Parameters
+
+| Name | Type | Description |
+| ------------ | :---------: | ----------------------------------------------------- |
+| `tokenIds` | `bytes32[]` | An array of token IDs. |
+| `dataKeys` | `bytes32[]` | An array of data keys corresponding to the token IDs. |
+| `dataValues` | `bytes[]` | An array of values to set for the given data keys. |
+
+
+
+### setDataForTokenId
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#setdatafortokenid)
+- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol)
+- Function signature: `setDataForTokenId(bytes32,bytes32,bytes)`
+- Function selector: `0xd6c1407c`
+
+:::
+
+```solidity
+function setDataForTokenId(
+ bytes32 tokenId,
+ bytes32 dataKey,
+ bytes dataValue
+) external nonpayable;
+```
+
+_Sets data for a specific `tokenId` and `dataKey`._
+
+#### Parameters
+
+| Name | Type | Description |
+| ----------- | :-------: | ---------------------------------------- |
+| `tokenId` | `bytes32` | The unique identifier for a token. |
+| `dataKey` | `bytes32` | The key for the data to set. |
+| `dataValue` | `bytes` | The value to set for the given data key. |
+
+
+
### supportsInterface
:::note References
@@ -723,7 +894,7 @@ mapping(bytes32 => bytes) _store
function _setData(bytes32 dataKey, bytes dataValue) internal nonpayable;
```
-The ERC725Y data key `_LSP8_TOKENID_TYPE_KEY` cannot be changed
+The ERC725Y data key `_LSP8_TOKENID_FORMAT_KEY` cannot be changed
once the identifiable digital asset contract has been deployed.
@@ -944,6 +1115,64 @@ all the parameters in the calldata packed encoded.
+### \_setDataForTokenId
+
+```solidity
+function _setDataForTokenId(
+ bytes32 tokenId,
+ bytes32 dataKey,
+ bytes dataValue
+) internal nonpayable;
+```
+
+Sets data for a specific `tokenId` and `dataKey` in the ERC725Y storage
+The ERC725Y data key is the hash of the `tokenId` and `dataKey` concatenated
+
+
+
+#### Parameters
+
+| Name | Type | Description |
+| ----------- | :-------: | ---------------------------------------- |
+| `tokenId` | `bytes32` | The unique identifier for a token. |
+| `dataKey` | `bytes32` | The key for the data to set. |
+| `dataValue` | `bytes` | The value to set for the given data key. |
+
+
+
+### \_getDataForTokenId
+
+```solidity
+function _getDataForTokenId(
+ bytes32 tokenId,
+ bytes32 dataKey
+) internal view returns (bytes dataValues);
+```
+
+Retrieves data for a specific `tokenId` and `dataKey` from the ERC725Y storage
+The ERC725Y data key is the hash of the `tokenId` and `dataKey` concatenated
+
+#### Parameters
+
+| Name | Type | Description |
+| --------- | :-------: | ---------------------------------- |
+| `tokenId` | `bytes32` | The unique identifier for a token. |
+| `dataKey` | `bytes32` | The key for the data to retrieve. |
+
+#### Returns
+
+| Name | Type | Description |
+| ------------ | :-----: | ----------------------------------------------------------------- |
+| `dataValues` | `bytes` | The data value associated with the given `tokenId` and `dataKey`. |
+
+
+
### \_beforeTokenTransfer
```solidity
@@ -994,6 +1223,47 @@ Allows to run custom logic after updating balances, but **before notifiying send
+### \_notifyTokenOperator
+
+```solidity
+function _notifyTokenOperator(
+ address operator,
+ bytes lsp1Data
+) internal nonpayable;
+```
+
+Attempt to notify the operator `operator` about the `tokenId` being authorized.
+This is done by calling its [`universalReceiver`](#universalreceiver) function with the `_TYPEID_LSP8_TOKENOPERATOR` as typeId, if `operator` is a contract that supports the LSP1 interface.
+If `operator` is an EOA or a contract that does not support the LSP1 interface, nothing will happen and no notification will be sent.
+
+#### Parameters
+
+| Name | Type | Description |
+| ---------- | :-------: | ------------------------------------------------------------------------------ |
+| `operator` | `address` | The address to call the [`universalReceiver`](#universalreceiver) function on. |
+| `lsp1Data` | `bytes` | the data to be sent to the `operator` address in the `universalReceiver` call. |
+
+
+
+### \_notifyTokenSender
+
+```solidity
+function _notifyTokenSender(address from, bytes lsp1Data) internal nonpayable;
+```
+
+Attempt to notify the token sender `from` about the `tokenId` being transferred.
+This is done by calling its [`universalReceiver`](#universalreceiver) function with the `_TYPEID_LSP8_TOKENSSENDER` as typeId, if `from` is a contract that supports the LSP1 interface.
+If `from` is an EOA or a contract that does not support the LSP1 interface, nothing will happen and no notification will be sent.
+
+#### Parameters
+
+| Name | Type | Description |
+| ---------- | :-------: | ------------------------------------------------------------------------------ |
+| `from` | `address` | The address to call the [`universalReceiver`](#universalreceiver) function on. |
+| `lsp1Data` | `bytes` | the data to be sent to the `from` address in the `universalReceiver` call. |
+
+
+
### \_notifyTokenReceiver
```solidity
@@ -1004,9 +1274,21 @@ function _notifyTokenReceiver(
) internal nonpayable;
```
-An attempt is made to notify the token receiver about the `tokenId` changing owners
-using LSP1 interface. When force is FALSE the token receiver MUST support LSP1.
-The receiver may revert when the token being sent is not wanted.
+Attempt to notify the token receiver `to` about the `tokenId` being received.
+This is done by calling its [`universalReceiver`](#universalreceiver) function with the `_TYPEID_LSP8_TOKENSRECIPIENT` as typeId, if `to` is a contract that supports the LSP1 interface.
+If `to` is is an EOA or a contract that does not support the LSP1 interface, the behaviour will depend on the `force` boolean flag.
+
+- if `force` is set to `true`, nothing will happen and no notification will be sent.
+
+- if `force` is set to `false, the transaction will revert.
+
+#### Parameters
+
+| Name | Type | Description |
+| ---------- | :-------: | --------------------------------------------------------------------------------------------------- |
+| `to` | `address` | The address to call the [`universalReceiver`](#universalreceiver) function on. |
+| `force` | `bool` | A boolean that describe if transfer to a `to` address that does not support LSP1 is allowed or not. |
+| `lsp1Data` | `bytes` | The data to be sent to the `to` address in the `universalReceiver(...)` call. |
@@ -1070,19 +1352,47 @@ CALL opcode, passing the [`msg.data`](#msg.data) appended with the 20 bytes of t
## Events
-### AuthorizedOperator
+### DataChanged
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#datachanged)
+- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol)
+- Event signature: `DataChanged(bytes32,bytes)`
+- Event topic hash: `0xece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2`
+
+:::
+
+```solidity
+event DataChanged(bytes32 indexed dataKey, bytes dataValue);
+```
+
+_The following data key/value pair has been changed in the ERC725Y storage: Data key: `dataKey`, data value: `dataValue`._
+
+Emitted when data at a specific `dataKey` was changed to a new value `dataValue`.
+
+#### Parameters
+
+| Name | Type | Description |
+| ----------------------- | :-------: | -------------------------------------------- |
+| `dataKey` **`indexed`** | `bytes32` | The data key for which a bytes value is set. |
+| `dataValue` | `bytes` | The value to set for the given data key. |
+
+
+
+### OperatorAuthorizationChanged
:::note References
-- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#authorizedoperator)
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#operatorauthorizationchanged)
- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol)
-- Event signature: `AuthorizedOperator(address,address,bytes32,bytes)`
-- Event topic hash: `0x0052e433f2d4225671bc164dd1cdc9a76044356091f27ad234798bd0cbf08349`
+- Event signature: `OperatorAuthorizationChanged(address,address,bytes32,bytes)`
+- Event topic hash: `0x1b1b58aa2ec0cec2228b2d37124556d41f5a1f7b12f089171f896cc236671215`
:::
```solidity
-event AuthorizedOperator(address indexed operator, address indexed tokenOwner, bytes32 indexed tokenId, bytes operatorNotificationData);
+event OperatorAuthorizationChanged(address indexed operator, address indexed tokenOwner, bytes32 indexed tokenId, bytes operatorNotificationData);
```
Emitted when `tokenOwner` enables `operator` to transfer or burn the `tokenId`.
@@ -1098,31 +1408,32 @@ Emitted when `tokenOwner` enables `operator` to transfer or burn the `tokenId`.
-### DataChanged
+### OperatorRevoked
:::note References
-- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#datachanged)
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#operatorrevoked)
- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol)
-- Event signature: `DataChanged(bytes32,bytes)`
-- Event topic hash: `0xece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2`
+- Event signature: `OperatorRevoked(address,address,bytes32,bool,bytes)`
+- Event topic hash: `0xc78cd419d6136f9f1c1c6aec1d3fae098cffaf8bc86314a8f2685e32fe574e3c`
:::
```solidity
-event DataChanged(bytes32 indexed dataKey, bytes dataValue);
+event OperatorRevoked(address indexed operator, address indexed tokenOwner, bytes32 indexed tokenId, bool notified, bytes operatorNotificationData);
```
-_The following data key/value pair has been changed in the ERC725Y storage: Data key: `dataKey`, data value: `dataValue`._
-
-Emitted when data at a specific `dataKey` was changed to a new value `dataValue`.
+Emitted when `tokenOwner` disables `operator` to transfer or burn `tokenId` on its behalf.
#### Parameters
-| Name | Type | Description |
-| ----------------------- | :-------: | -------------------------------------------- |
-| `dataKey` **`indexed`** | `bytes32` | The data key for which a bytes value is set. |
-| `dataValue` | `bytes` | The value to set for the given data key. |
+| Name | Type | Description |
+| -------------------------- | :-------: | ---------------------------------------------------------------------------------- |
+| `operator` **`indexed`** | `address` | The address revoked from the operator array ([`getOperatorsOf`](#getoperatorsof)). |
+| `tokenOwner` **`indexed`** | `address` | The owner of the `tokenId`. |
+| `tokenId` **`indexed`** | `bytes32` | The tokenId `operator` is revoked from operating on. |
+| `notified` | `bool` | Bool indicating whether the operator has been notified or not |
+| `operatorNotificationData` | `bytes` | The data to notify the operator about via LSP1. |
@@ -1150,32 +1461,30 @@ event OwnershipTransferred(address indexed previousOwner, address indexed newOwn
-### RevokedOperator
+### TokenIdDataChanged
:::note References
-- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#revokedoperator)
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#tokeniddatachanged)
- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol)
-- Event signature: `RevokedOperator(address,address,bytes32,bool,bytes)`
-- Event topic hash: `0x3ee932cea40ebbbfd8577d47156cc17cce8683802c57bbd1fb8c131c6f07af0a`
+- Event signature: `TokenIdDataChanged(bytes32,bytes32,bytes)`
+- Event topic hash: `0xa6e4251f855f750545fe414f120db91c76b88def14d120969e5bb2d3f05debbb`
:::
```solidity
-event RevokedOperator(address indexed operator, address indexed tokenOwner, bytes32 indexed tokenId, bool notified, bytes operatorNotificationData);
+event TokenIdDataChanged(bytes32 indexed tokenId, bytes32 indexed dataKey, bytes dataValue);
```
-Emitted when `tokenOwner` disables `operator` to transfer or burn `tokenId` on its behalf.
+Emitted when setting data for `tokenId`.
#### Parameters
-| Name | Type | Description |
-| -------------------------- | :-------: | ---------------------------------------------------------------------------------- |
-| `operator` **`indexed`** | `address` | The address revoked from the operator array ([`getOperatorsOf`](#getoperatorsof)). |
-| `tokenOwner` **`indexed`** | `address` | The owner of the `tokenId`. |
-| `tokenId` **`indexed`** | `bytes32` | The tokenId `operator` is revoked from operating on. |
-| `notified` | `bool` | Bool indicating whether the operator has been notified or not |
-| `operatorNotificationData` | `bytes` | The data to notify the operator about via LSP1. |
+| Name | Type | Description |
+| ----------------------- | :-------: | -------------------------------------------- |
+| `tokenId` **`indexed`** | `bytes32` | The tokenId which data is set for. |
+| `dataKey` **`indexed`** | `bytes32` | The data key for which a bytes value is set. |
+| `dataValue` | `bytes` | The value to set for the given data key. |
@@ -1333,7 +1642,7 @@ reverts when the contract is called with a function selector not valid (less tha
error LSP4TokenNameNotEditable();
```
-Reverts when trying to edit the data key `LSP4TokenName` after the digital asset contract has been deployed. The `LSP4TokenName` data key is located inside the ERC725Y Data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed.
+Reverts when trying to edit the data key `LSP4TokenName` after the digital asset contract has been deployed / initialized. The `LSP4TokenName` data key is located inside the ERC725Y data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed / initialized.
@@ -1352,7 +1661,53 @@ Reverts when trying to edit the data key `LSP4TokenName` after the digital asset
error LSP4TokenSymbolNotEditable();
```
-Reverts when trying to edit the data key `LSP4TokenSymbol` after the digital asset contract has been deployed. The `LSP4TokenSymbol` data key is located inside the ERC725Y Data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed.
+Reverts when trying to edit the data key `LSP4TokenSymbol` after the digital asset contract has been deployed / initialized. The `LSP4TokenSymbol` data key is located inside the ERC725Y data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed / initialized.
+
+
+
+### LSP4TokenTypeNotEditable
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp4tokentypenoteditable)
+- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol)
+- Error signature: `LSP4TokenTypeNotEditable()`
+- Error hash: `0x4ef6d7fb`
+
+:::
+
+```solidity
+error LSP4TokenTypeNotEditable();
+```
+
+Reverts when trying to edit the data key `LSP4TokenType` after the digital asset contract has been deployed / initialized. The `LSP4TokenType` data key is located inside the ERC725Y data key-value store of the digital asset contract. It can be set only once inside the constructor / initializer when the digital asset contract is being deployed / initialized.
+
+
+
+### LSP8BatchCallFailed
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8batchcallfailed)
+- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol)
+- Error signature: `LSP8BatchCallFailed(uint256)`
+- Error hash: `0x234eb819`
+
+:::
+
+```solidity
+error LSP8BatchCallFailed(uint256 callIndex);
+```
+
+_Batch call failed._
+
+Reverts when a batch call failed.
+
+#### Parameters
+
+| Name | Type | Description |
+| ----------- | :-------: | ----------- |
+| `callIndex` | `uint256` | - |
@@ -1635,22 +1990,60 @@ Error occurs when sending native tokens to the LSP8 contract without sending any
-### LSP8TokenIdTypeNotEditable
+### LSP8TokenIdFormatNotEditable
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenidformatnoteditable)
+- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol)
+- Error signature: `LSP8TokenIdFormatNotEditable()`
+- Error hash: `0x3664800a`
+
+:::
+
+```solidity
+error LSP8TokenIdFormatNotEditable();
+```
+
+Reverts when trying to edit the data key `LSP8TokenIdFormat` after the identifiable digital asset contract has been deployed. The `LSP8TokenIdFormat` data key is located inside the ERC725Y Data key-value store of the identifiable digital asset contract. It can be set only once inside the constructor/initializer when the identifiable digital asset contract is being deployed.
+
+
+
+### LSP8TokenIdsDataEmptyArray
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenidsdataemptyarray)
+- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol)
+- Error signature: `LSP8TokenIdsDataEmptyArray()`
+- Error hash: `0x80c98305`
+
+:::
+
+```solidity
+error LSP8TokenIdsDataEmptyArray();
+```
+
+Reverts when empty arrays is passed to the function
+
+
+
+### LSP8TokenIdsDataLengthMismatch
:::note References
-- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenidtypenoteditable)
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenidsdatalengthmismatch)
- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol)
-- Error signature: `LSP8TokenIdTypeNotEditable()`
-- Error hash: `0x53bc1122`
+- Error signature: `LSP8TokenIdsDataLengthMismatch()`
+- Error hash: `0x2fa71dfe`
:::
```solidity
-error LSP8TokenIdTypeNotEditable();
+error LSP8TokenIdsDataLengthMismatch();
```
-Reverts when trying to edit the data key `LSP8TokenIdType` after the identifiable digital asset contract has been deployed. The `LSP8TokenIdType` data key is located inside the ERC725Y Data key-value store of the identifiable digital asset contract. It can be set only once inside the constructor/initializer when the identifiable digital asset contract is being deployed.
+Reverts when the length of the token IDs data arrays is not equal
diff --git a/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.md b/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.md
index 444e18139c..b6ac5fb1b0 100644
--- a/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.md
+++ b/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.md
@@ -137,6 +137,45 @@ Get the number of token IDs owned by `tokenOwner`.
+### batchCalls
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#batchcalls)
+- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol)
+- Function signature: `batchCalls(bytes[])`
+- Function selector: `0x6963d438`
+
+:::
+
+:::info
+
+It's not possible to send value along the functions call due to the use of `delegatecall`.
+
+:::
+
+```solidity
+function batchCalls(bytes[] data) external nonpayable returns (bytes[] results);
+```
+
+_Executing the following batch of abi-encoded function calls on the contract: `data`._
+
+Allows a caller to batch different function calls in one call. Perform a `delegatecall` on self, to call different functions with preserving the context.
+
+#### Parameters
+
+| Name | Type | Description |
+| ------ | :-------: | -------------------------------------------------------------------- |
+| `data` | `bytes[]` | An array of ABI encoded function calls to be called on the contract. |
+
+#### Returns
+
+| Name | Type | Description |
+| --------- | :-------: | ---------------------------------------------------------------- |
+| `results` | `bytes[]` | An array of abi-encoded data returned by the functions executed. |
+
+
+
### burn
:::note References
@@ -233,6 +272,76 @@ Get in the ERC725Y storage the bytes data stored at multiple data keys `dataKeys
+### getDataBatchForTokenIds
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#getdatabatchfortokenids)
+- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol)
+- Function signature: `getDataBatchForTokenIds(bytes32[],bytes32[])`
+- Function selector: `0x1d26fce6`
+
+:::
+
+```solidity
+function getDataBatchForTokenIds(
+ bytes32[] tokenIds,
+ bytes32[] dataKeys
+) external view returns (bytes[] dataValues);
+```
+
+_Retrieves data in batch for multiple `tokenId` and `dataKey` pairs._
+
+#### Parameters
+
+| Name | Type | Description |
+| ---------- | :---------: | ----------------------------------------------------- |
+| `tokenIds` | `bytes32[]` | An array of token IDs. |
+| `dataKeys` | `bytes32[]` | An array of data keys corresponding to the token IDs. |
+
+#### Returns
+
+| Name | Type | Description |
+| ------------ | :-------: | ----------------------------------------------------------------- |
+| `dataValues` | `bytes[]` | An array of data values for each pair of `tokenId` and `dataKey`. |
+
+
+
+### getDataForTokenId
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#getdatafortokenid)
+- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol)
+- Function signature: `getDataForTokenId(bytes32,bytes32)`
+- Function selector: `0x16e023b3`
+
+:::
+
+```solidity
+function getDataForTokenId(
+ bytes32 tokenId,
+ bytes32 dataKey
+) external view returns (bytes dataValue);
+```
+
+_Retrieves data for a specific `tokenId` and `dataKey`._
+
+#### Parameters
+
+| Name | Type | Description |
+| --------- | :-------: | ---------------------------------- |
+| `tokenId` | `bytes32` | The unique identifier for a token. |
+| `dataKey` | `bytes32` | The key for the data to retrieve. |
+
+#### Returns
+
+| Name | Type | Description |
+| ----------- | :-----: | ----------------------------------------------------------------- |
+| `dataValue` | `bytes` | The data value associated with the given `tokenId` and `dataKey`. |
+
+
+
### getOperatorsOf
:::note References
@@ -476,6 +585,68 @@ Batch data setting function that behaves the same as [`setData`](#setdata) but a
+### setDataBatchForTokenIds
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#setdatabatchfortokenids)
+- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol)
+- Function signature: `setDataBatchForTokenIds(bytes32[],bytes32[],bytes[])`
+- Function selector: `0xbe9f0e6f`
+
+:::
+
+```solidity
+function setDataBatchForTokenIds(
+ bytes32[] tokenIds,
+ bytes32[] dataKeys,
+ bytes[] dataValues
+) external nonpayable;
+```
+
+_Sets data in batch for multiple `tokenId` and `dataKey` pairs._
+
+#### Parameters
+
+| Name | Type | Description |
+| ------------ | :---------: | ----------------------------------------------------- |
+| `tokenIds` | `bytes32[]` | An array of token IDs. |
+| `dataKeys` | `bytes32[]` | An array of data keys corresponding to the token IDs. |
+| `dataValues` | `bytes[]` | An array of values to set for the given data keys. |
+
+
+
+### setDataForTokenId
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#setdatafortokenid)
+- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol)
+- Function signature: `setDataForTokenId(bytes32,bytes32,bytes)`
+- Function selector: `0xd6c1407c`
+
+:::
+
+```solidity
+function setDataForTokenId(
+ bytes32 tokenId,
+ bytes32 dataKey,
+ bytes dataValue
+) external nonpayable;
+```
+
+_Sets data for a specific `tokenId` and `dataKey`._
+
+#### Parameters
+
+| Name | Type | Description |
+| ----------- | :-------: | ---------------------------------------- |
+| `tokenId` | `bytes32` | The unique identifier for a token. |
+| `dataKey` | `bytes32` | The key for the data to set. |
+| `dataValue` | `bytes` | The value to set for the given data key. |
+
+
+
### supportsInterface
:::note References
@@ -749,7 +920,7 @@ mapping(bytes32 => bytes) _store
function _setData(bytes32 dataKey, bytes dataValue) internal nonpayable;
```
-The ERC725Y data key `_LSP8_TOKENID_TYPE_KEY` cannot be changed
+The ERC725Y data key `_LSP8_TOKENID_FORMAT_KEY` cannot be changed
once the identifiable digital asset contract has been deployed.
@@ -970,6 +1141,64 @@ all the parameters in the calldata packed encoded.
+### \_setDataForTokenId
+
+```solidity
+function _setDataForTokenId(
+ bytes32 tokenId,
+ bytes32 dataKey,
+ bytes dataValue
+) internal nonpayable;
+```
+
+Sets data for a specific `tokenId` and `dataKey` in the ERC725Y storage
+The ERC725Y data key is the hash of the `tokenId` and `dataKey` concatenated
+
+
+
+#### Parameters
+
+| Name | Type | Description |
+| ----------- | :-------: | ---------------------------------------- |
+| `tokenId` | `bytes32` | The unique identifier for a token. |
+| `dataKey` | `bytes32` | The key for the data to set. |
+| `dataValue` | `bytes` | The value to set for the given data key. |
+
+
+
+### \_getDataForTokenId
+
+```solidity
+function _getDataForTokenId(
+ bytes32 tokenId,
+ bytes32 dataKey
+) internal view returns (bytes dataValues);
+```
+
+Retrieves data for a specific `tokenId` and `dataKey` from the ERC725Y storage
+The ERC725Y data key is the hash of the `tokenId` and `dataKey` concatenated
+
+#### Parameters
+
+| Name | Type | Description |
+| --------- | :-------: | ---------------------------------- |
+| `tokenId` | `bytes32` | The unique identifier for a token. |
+| `dataKey` | `bytes32` | The key for the data to retrieve. |
+
+#### Returns
+
+| Name | Type | Description |
+| ------------ | :-----: | ----------------------------------------------------------------- |
+| `dataValues` | `bytes` | The data value associated with the given `tokenId` and `dataKey`. |
+
+
+
### \_beforeTokenTransfer
```solidity
@@ -1020,6 +1249,47 @@ Allows to run custom logic after updating balances, but **before notifiying send
+### \_notifyTokenOperator
+
+```solidity
+function _notifyTokenOperator(
+ address operator,
+ bytes lsp1Data
+) internal nonpayable;
+```
+
+Attempt to notify the operator `operator` about the `tokenId` being authorized.
+This is done by calling its [`universalReceiver`](#universalreceiver) function with the `_TYPEID_LSP8_TOKENOPERATOR` as typeId, if `operator` is a contract that supports the LSP1 interface.
+If `operator` is an EOA or a contract that does not support the LSP1 interface, nothing will happen and no notification will be sent.
+
+#### Parameters
+
+| Name | Type | Description |
+| ---------- | :-------: | ------------------------------------------------------------------------------ |
+| `operator` | `address` | The address to call the [`universalReceiver`](#universalreceiver) function on. |
+| `lsp1Data` | `bytes` | the data to be sent to the `operator` address in the `universalReceiver` call. |
+
+
+
+### \_notifyTokenSender
+
+```solidity
+function _notifyTokenSender(address from, bytes lsp1Data) internal nonpayable;
+```
+
+Attempt to notify the token sender `from` about the `tokenId` being transferred.
+This is done by calling its [`universalReceiver`](#universalreceiver) function with the `_TYPEID_LSP8_TOKENSSENDER` as typeId, if `from` is a contract that supports the LSP1 interface.
+If `from` is an EOA or a contract that does not support the LSP1 interface, nothing will happen and no notification will be sent.
+
+#### Parameters
+
+| Name | Type | Description |
+| ---------- | :-------: | ------------------------------------------------------------------------------ |
+| `from` | `address` | The address to call the [`universalReceiver`](#universalreceiver) function on. |
+| `lsp1Data` | `bytes` | the data to be sent to the `from` address in the `universalReceiver` call. |
+
+
+
### \_notifyTokenReceiver
```solidity
@@ -1030,9 +1300,21 @@ function _notifyTokenReceiver(
) internal nonpayable;
```
-An attempt is made to notify the token receiver about the `tokenId` changing owners
-using LSP1 interface. When force is FALSE the token receiver MUST support LSP1.
-The receiver may revert when the token being sent is not wanted.
+Attempt to notify the token receiver `to` about the `tokenId` being received.
+This is done by calling its [`universalReceiver`](#universalreceiver) function with the `_TYPEID_LSP8_TOKENSRECIPIENT` as typeId, if `to` is a contract that supports the LSP1 interface.
+If `to` is is an EOA or a contract that does not support the LSP1 interface, the behaviour will depend on the `force` boolean flag.
+
+- if `force` is set to `true`, nothing will happen and no notification will be sent.
+
+- if `force` is set to `false, the transaction will revert.
+
+#### Parameters
+
+| Name | Type | Description |
+| ---------- | :-------: | --------------------------------------------------------------------------------------------------- |
+| `to` | `address` | The address to call the [`universalReceiver`](#universalreceiver) function on. |
+| `force` | `bool` | A boolean that describe if transfer to a `to` address that does not support LSP1 is allowed or not. |
+| `lsp1Data` | `bytes` | The data to be sent to the `to` address in the `universalReceiver(...)` call. |
@@ -1096,19 +1378,47 @@ CALL opcode, passing the [`msg.data`](#msg.data) appended with the 20 bytes of t
## Events
-### AuthorizedOperator
+### DataChanged
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#datachanged)
+- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol)
+- Event signature: `DataChanged(bytes32,bytes)`
+- Event topic hash: `0xece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2`
+
+:::
+
+```solidity
+event DataChanged(bytes32 indexed dataKey, bytes dataValue);
+```
+
+_The following data key/value pair has been changed in the ERC725Y storage: Data key: `dataKey`, data value: `dataValue`._
+
+Emitted when data at a specific `dataKey` was changed to a new value `dataValue`.
+
+#### Parameters
+
+| Name | Type | Description |
+| ----------------------- | :-------: | -------------------------------------------- |
+| `dataKey` **`indexed`** | `bytes32` | The data key for which a bytes value is set. |
+| `dataValue` | `bytes` | The value to set for the given data key. |
+
+
+
+### OperatorAuthorizationChanged
:::note References
-- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#authorizedoperator)
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#operatorauthorizationchanged)
- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol)
-- Event signature: `AuthorizedOperator(address,address,bytes32,bytes)`
-- Event topic hash: `0x0052e433f2d4225671bc164dd1cdc9a76044356091f27ad234798bd0cbf08349`
+- Event signature: `OperatorAuthorizationChanged(address,address,bytes32,bytes)`
+- Event topic hash: `0x1b1b58aa2ec0cec2228b2d37124556d41f5a1f7b12f089171f896cc236671215`
:::
```solidity
-event AuthorizedOperator(address indexed operator, address indexed tokenOwner, bytes32 indexed tokenId, bytes operatorNotificationData);
+event OperatorAuthorizationChanged(address indexed operator, address indexed tokenOwner, bytes32 indexed tokenId, bytes operatorNotificationData);
```
Emitted when `tokenOwner` enables `operator` to transfer or burn the `tokenId`.
@@ -1124,31 +1434,32 @@ Emitted when `tokenOwner` enables `operator` to transfer or burn the `tokenId`.
-### DataChanged
+### OperatorRevoked
:::note References
-- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#datachanged)
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#operatorrevoked)
- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol)
-- Event signature: `DataChanged(bytes32,bytes)`
-- Event topic hash: `0xece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2`
+- Event signature: `OperatorRevoked(address,address,bytes32,bool,bytes)`
+- Event topic hash: `0xc78cd419d6136f9f1c1c6aec1d3fae098cffaf8bc86314a8f2685e32fe574e3c`
:::
```solidity
-event DataChanged(bytes32 indexed dataKey, bytes dataValue);
+event OperatorRevoked(address indexed operator, address indexed tokenOwner, bytes32 indexed tokenId, bool notified, bytes operatorNotificationData);
```
-_The following data key/value pair has been changed in the ERC725Y storage: Data key: `dataKey`, data value: `dataValue`._
-
-Emitted when data at a specific `dataKey` was changed to a new value `dataValue`.
+Emitted when `tokenOwner` disables `operator` to transfer or burn `tokenId` on its behalf.
#### Parameters
-| Name | Type | Description |
-| ----------------------- | :-------: | -------------------------------------------- |
-| `dataKey` **`indexed`** | `bytes32` | The data key for which a bytes value is set. |
-| `dataValue` | `bytes` | The value to set for the given data key. |
+| Name | Type | Description |
+| -------------------------- | :-------: | ---------------------------------------------------------------------------------- |
+| `operator` **`indexed`** | `address` | The address revoked from the operator array ([`getOperatorsOf`](#getoperatorsof)). |
+| `tokenOwner` **`indexed`** | `address` | The owner of the `tokenId`. |
+| `tokenId` **`indexed`** | `bytes32` | The tokenId `operator` is revoked from operating on. |
+| `notified` | `bool` | Bool indicating whether the operator has been notified or not |
+| `operatorNotificationData` | `bytes` | The data to notify the operator about via LSP1. |
@@ -1176,32 +1487,30 @@ event OwnershipTransferred(address indexed previousOwner, address indexed newOwn
-### RevokedOperator
+### TokenIdDataChanged
:::note References
-- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#revokedoperator)
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#tokeniddatachanged)
- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol)
-- Event signature: `RevokedOperator(address,address,bytes32,bool,bytes)`
-- Event topic hash: `0x3ee932cea40ebbbfd8577d47156cc17cce8683802c57bbd1fb8c131c6f07af0a`
+- Event signature: `TokenIdDataChanged(bytes32,bytes32,bytes)`
+- Event topic hash: `0xa6e4251f855f750545fe414f120db91c76b88def14d120969e5bb2d3f05debbb`
:::
```solidity
-event RevokedOperator(address indexed operator, address indexed tokenOwner, bytes32 indexed tokenId, bool notified, bytes operatorNotificationData);
+event TokenIdDataChanged(bytes32 indexed tokenId, bytes32 indexed dataKey, bytes dataValue);
```
-Emitted when `tokenOwner` disables `operator` to transfer or burn `tokenId` on its behalf.
+Emitted when setting data for `tokenId`.
#### Parameters
-| Name | Type | Description |
-| -------------------------- | :-------: | ---------------------------------------------------------------------------------- |
-| `operator` **`indexed`** | `address` | The address revoked from the operator array ([`getOperatorsOf`](#getoperatorsof)). |
-| `tokenOwner` **`indexed`** | `address` | The owner of the `tokenId`. |
-| `tokenId` **`indexed`** | `bytes32` | The tokenId `operator` is revoked from operating on. |
-| `notified` | `bool` | Bool indicating whether the operator has been notified or not |
-| `operatorNotificationData` | `bytes` | The data to notify the operator about via LSP1. |
+| Name | Type | Description |
+| ----------------------- | :-------: | -------------------------------------------- |
+| `tokenId` **`indexed`** | `bytes32` | The tokenId which data is set for. |
+| `dataKey` **`indexed`** | `bytes32` | The data key for which a bytes value is set. |
+| `dataValue` | `bytes` | The value to set for the given data key. |
@@ -1359,7 +1668,7 @@ reverts when the contract is called with a function selector not valid (less tha
error LSP4TokenNameNotEditable();
```
-Reverts when trying to edit the data key `LSP4TokenName` after the digital asset contract has been deployed. The `LSP4TokenName` data key is located inside the ERC725Y Data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed.
+Reverts when trying to edit the data key `LSP4TokenName` after the digital asset contract has been deployed / initialized. The `LSP4TokenName` data key is located inside the ERC725Y data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed / initialized.
@@ -1378,7 +1687,53 @@ Reverts when trying to edit the data key `LSP4TokenName` after the digital asset
error LSP4TokenSymbolNotEditable();
```
-Reverts when trying to edit the data key `LSP4TokenSymbol` after the digital asset contract has been deployed. The `LSP4TokenSymbol` data key is located inside the ERC725Y Data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed.
+Reverts when trying to edit the data key `LSP4TokenSymbol` after the digital asset contract has been deployed / initialized. The `LSP4TokenSymbol` data key is located inside the ERC725Y data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed / initialized.
+
+
+
+### LSP4TokenTypeNotEditable
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp4tokentypenoteditable)
+- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol)
+- Error signature: `LSP4TokenTypeNotEditable()`
+- Error hash: `0x4ef6d7fb`
+
+:::
+
+```solidity
+error LSP4TokenTypeNotEditable();
+```
+
+Reverts when trying to edit the data key `LSP4TokenType` after the digital asset contract has been deployed / initialized. The `LSP4TokenType` data key is located inside the ERC725Y data key-value store of the digital asset contract. It can be set only once inside the constructor / initializer when the digital asset contract is being deployed / initialized.
+
+
+
+### LSP8BatchCallFailed
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8batchcallfailed)
+- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol)
+- Error signature: `LSP8BatchCallFailed(uint256)`
+- Error hash: `0x234eb819`
+
+:::
+
+```solidity
+error LSP8BatchCallFailed(uint256 callIndex);
+```
+
+_Batch call failed._
+
+Reverts when a batch call failed.
+
+#### Parameters
+
+| Name | Type | Description |
+| ----------- | :-------: | ----------- |
+| `callIndex` | `uint256` | - |
@@ -1661,22 +2016,60 @@ Error occurs when sending native tokens to the LSP8 contract without sending any
-### LSP8TokenIdTypeNotEditable
+### LSP8TokenIdFormatNotEditable
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenidformatnoteditable)
+- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol)
+- Error signature: `LSP8TokenIdFormatNotEditable()`
+- Error hash: `0x3664800a`
+
+:::
+
+```solidity
+error LSP8TokenIdFormatNotEditable();
+```
+
+Reverts when trying to edit the data key `LSP8TokenIdFormat` after the identifiable digital asset contract has been deployed. The `LSP8TokenIdFormat` data key is located inside the ERC725Y Data key-value store of the identifiable digital asset contract. It can be set only once inside the constructor/initializer when the identifiable digital asset contract is being deployed.
+
+
+
+### LSP8TokenIdsDataEmptyArray
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenidsdataemptyarray)
+- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol)
+- Error signature: `LSP8TokenIdsDataEmptyArray()`
+- Error hash: `0x80c98305`
+
+:::
+
+```solidity
+error LSP8TokenIdsDataEmptyArray();
+```
+
+Reverts when empty arrays is passed to the function
+
+
+
+### LSP8TokenIdsDataLengthMismatch
:::note References
-- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenidtypenoteditable)
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenidsdatalengthmismatch)
- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol)
-- Error signature: `LSP8TokenIdTypeNotEditable()`
-- Error hash: `0x53bc1122`
+- Error signature: `LSP8TokenIdsDataLengthMismatch()`
+- Error hash: `0x2fa71dfe`
:::
```solidity
-error LSP8TokenIdTypeNotEditable();
+error LSP8TokenIdsDataLengthMismatch();
```
-Reverts when trying to edit the data key `LSP8TokenIdType` after the identifiable digital asset contract has been deployed. The `LSP8TokenIdType` data key is located inside the ERC725Y Data key-value store of the identifiable digital asset contract. It can be set only once inside the constructor/initializer when the identifiable digital asset contract is being deployed.
+Reverts when the length of the token IDs data arrays is not equal
diff --git a/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.md b/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.md
index 8ff5da68ed..cd7d4f6bd3 100644
--- a/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.md
+++ b/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.md
@@ -137,6 +137,45 @@ Get the number of token IDs owned by `tokenOwner`.
+### batchCalls
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#batchcalls)
+- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol)
+- Function signature: `batchCalls(bytes[])`
+- Function selector: `0x6963d438`
+
+:::
+
+:::info
+
+It's not possible to send value along the functions call due to the use of `delegatecall`.
+
+:::
+
+```solidity
+function batchCalls(bytes[] data) external nonpayable returns (bytes[] results);
+```
+
+_Executing the following batch of abi-encoded function calls on the contract: `data`._
+
+Allows a caller to batch different function calls in one call. Perform a `delegatecall` on self, to call different functions with preserving the context.
+
+#### Parameters
+
+| Name | Type | Description |
+| ------ | :-------: | -------------------------------------------------------------------- |
+| `data` | `bytes[]` | An array of ABI encoded function calls to be called on the contract. |
+
+#### Returns
+
+| Name | Type | Description |
+| --------- | :-------: | ---------------------------------------------------------------- |
+| `results` | `bytes[]` | An array of abi-encoded data returned by the functions executed. |
+
+
+
### getData
:::note References
@@ -205,6 +244,76 @@ Get in the ERC725Y storage the bytes data stored at multiple data keys `dataKeys
+### getDataBatchForTokenIds
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#getdatabatchfortokenids)
+- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol)
+- Function signature: `getDataBatchForTokenIds(bytes32[],bytes32[])`
+- Function selector: `0x1d26fce6`
+
+:::
+
+```solidity
+function getDataBatchForTokenIds(
+ bytes32[] tokenIds,
+ bytes32[] dataKeys
+) external view returns (bytes[] dataValues);
+```
+
+_Retrieves data in batch for multiple `tokenId` and `dataKey` pairs._
+
+#### Parameters
+
+| Name | Type | Description |
+| ---------- | :---------: | ----------------------------------------------------- |
+| `tokenIds` | `bytes32[]` | An array of token IDs. |
+| `dataKeys` | `bytes32[]` | An array of data keys corresponding to the token IDs. |
+
+#### Returns
+
+| Name | Type | Description |
+| ------------ | :-------: | ----------------------------------------------------------------- |
+| `dataValues` | `bytes[]` | An array of data values for each pair of `tokenId` and `dataKey`. |
+
+
+
+### getDataForTokenId
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#getdatafortokenid)
+- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol)
+- Function signature: `getDataForTokenId(bytes32,bytes32)`
+- Function selector: `0x16e023b3`
+
+:::
+
+```solidity
+function getDataForTokenId(
+ bytes32 tokenId,
+ bytes32 dataKey
+) external view returns (bytes dataValue);
+```
+
+_Retrieves data for a specific `tokenId` and `dataKey`._
+
+#### Parameters
+
+| Name | Type | Description |
+| --------- | :-------: | ---------------------------------- |
+| `tokenId` | `bytes32` | The unique identifier for a token. |
+| `dataKey` | `bytes32` | The key for the data to retrieve. |
+
+#### Returns
+
+| Name | Type | Description |
+| ----------- | :-----: | ----------------------------------------------------------------- |
+| `dataValue` | `bytes` | The data value associated with the given `tokenId` and `dataKey`. |
+
+
+
### getOperatorsOf
:::note References
@@ -448,6 +557,68 @@ Batch data setting function that behaves the same as [`setData`](#setdata) but a
+### setDataBatchForTokenIds
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#setdatabatchfortokenids)
+- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol)
+- Function signature: `setDataBatchForTokenIds(bytes32[],bytes32[],bytes[])`
+- Function selector: `0xbe9f0e6f`
+
+:::
+
+```solidity
+function setDataBatchForTokenIds(
+ bytes32[] tokenIds,
+ bytes32[] dataKeys,
+ bytes[] dataValues
+) external nonpayable;
+```
+
+_Sets data in batch for multiple `tokenId` and `dataKey` pairs._
+
+#### Parameters
+
+| Name | Type | Description |
+| ------------ | :---------: | ----------------------------------------------------- |
+| `tokenIds` | `bytes32[]` | An array of token IDs. |
+| `dataKeys` | `bytes32[]` | An array of data keys corresponding to the token IDs. |
+| `dataValues` | `bytes[]` | An array of values to set for the given data keys. |
+
+
+
+### setDataForTokenId
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#setdatafortokenid)
+- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol)
+- Function signature: `setDataForTokenId(bytes32,bytes32,bytes)`
+- Function selector: `0xd6c1407c`
+
+:::
+
+```solidity
+function setDataForTokenId(
+ bytes32 tokenId,
+ bytes32 dataKey,
+ bytes dataValue
+) external nonpayable;
+```
+
+_Sets data for a specific `tokenId` and `dataKey`._
+
+#### Parameters
+
+| Name | Type | Description |
+| ----------- | :-------: | ---------------------------------------- |
+| `tokenId` | `bytes32` | The unique identifier for a token. |
+| `dataKey` | `bytes32` | The key for the data to set. |
+| `dataValue` | `bytes` | The value to set for the given data key. |
+
+
+
### supportsInterface
:::note References
@@ -748,7 +919,7 @@ mapping(bytes32 => bytes) _store
function _setData(bytes32 dataKey, bytes dataValue) internal nonpayable;
```
-The ERC725Y data key `_LSP8_TOKENID_TYPE_KEY` cannot be changed
+The ERC725Y data key `_LSP8_TOKENID_FORMAT_KEY` cannot be changed
once the identifiable digital asset contract has been deployed.
@@ -944,6 +1115,64 @@ all the parameters in the calldata packed encoded.
+### \_setDataForTokenId
+
+```solidity
+function _setDataForTokenId(
+ bytes32 tokenId,
+ bytes32 dataKey,
+ bytes dataValue
+) internal nonpayable;
+```
+
+Sets data for a specific `tokenId` and `dataKey` in the ERC725Y storage
+The ERC725Y data key is the hash of the `tokenId` and `dataKey` concatenated
+
+
+
+#### Parameters
+
+| Name | Type | Description |
+| ----------- | :-------: | ---------------------------------------- |
+| `tokenId` | `bytes32` | The unique identifier for a token. |
+| `dataKey` | `bytes32` | The key for the data to set. |
+| `dataValue` | `bytes` | The value to set for the given data key. |
+
+
+
+### \_getDataForTokenId
+
+```solidity
+function _getDataForTokenId(
+ bytes32 tokenId,
+ bytes32 dataKey
+) internal view returns (bytes dataValues);
+```
+
+Retrieves data for a specific `tokenId` and `dataKey` from the ERC725Y storage
+The ERC725Y data key is the hash of the `tokenId` and `dataKey` concatenated
+
+#### Parameters
+
+| Name | Type | Description |
+| --------- | :-------: | ---------------------------------- |
+| `tokenId` | `bytes32` | The unique identifier for a token. |
+| `dataKey` | `bytes32` | The key for the data to retrieve. |
+
+#### Returns
+
+| Name | Type | Description |
+| ------------ | :-----: | ----------------------------------------------------------------- |
+| `dataValues` | `bytes` | The data value associated with the given `tokenId` and `dataKey`. |
+
+
+
### \_beforeTokenTransfer
```solidity
@@ -994,6 +1223,47 @@ Allows to run custom logic after updating balances, but **before notifiying send
+### \_notifyTokenOperator
+
+```solidity
+function _notifyTokenOperator(
+ address operator,
+ bytes lsp1Data
+) internal nonpayable;
+```
+
+Attempt to notify the operator `operator` about the `tokenId` being authorized.
+This is done by calling its [`universalReceiver`](#universalreceiver) function with the `_TYPEID_LSP8_TOKENOPERATOR` as typeId, if `operator` is a contract that supports the LSP1 interface.
+If `operator` is an EOA or a contract that does not support the LSP1 interface, nothing will happen and no notification will be sent.
+
+#### Parameters
+
+| Name | Type | Description |
+| ---------- | :-------: | ------------------------------------------------------------------------------ |
+| `operator` | `address` | The address to call the [`universalReceiver`](#universalreceiver) function on. |
+| `lsp1Data` | `bytes` | the data to be sent to the `operator` address in the `universalReceiver` call. |
+
+
+
+### \_notifyTokenSender
+
+```solidity
+function _notifyTokenSender(address from, bytes lsp1Data) internal nonpayable;
+```
+
+Attempt to notify the token sender `from` about the `tokenId` being transferred.
+This is done by calling its [`universalReceiver`](#universalreceiver) function with the `_TYPEID_LSP8_TOKENSSENDER` as typeId, if `from` is a contract that supports the LSP1 interface.
+If `from` is an EOA or a contract that does not support the LSP1 interface, nothing will happen and no notification will be sent.
+
+#### Parameters
+
+| Name | Type | Description |
+| ---------- | :-------: | ------------------------------------------------------------------------------ |
+| `from` | `address` | The address to call the [`universalReceiver`](#universalreceiver) function on. |
+| `lsp1Data` | `bytes` | the data to be sent to the `from` address in the `universalReceiver` call. |
+
+
+
### \_notifyTokenReceiver
```solidity
@@ -1004,9 +1274,21 @@ function _notifyTokenReceiver(
) internal nonpayable;
```
-An attempt is made to notify the token receiver about the `tokenId` changing owners
-using LSP1 interface. When force is FALSE the token receiver MUST support LSP1.
-The receiver may revert when the token being sent is not wanted.
+Attempt to notify the token receiver `to` about the `tokenId` being received.
+This is done by calling its [`universalReceiver`](#universalreceiver) function with the `_TYPEID_LSP8_TOKENSRECIPIENT` as typeId, if `to` is a contract that supports the LSP1 interface.
+If `to` is is an EOA or a contract that does not support the LSP1 interface, the behaviour will depend on the `force` boolean flag.
+
+- if `force` is set to `true`, nothing will happen and no notification will be sent.
+
+- if `force` is set to `false, the transaction will revert.
+
+#### Parameters
+
+| Name | Type | Description |
+| ---------- | :-------: | --------------------------------------------------------------------------------------------------- |
+| `to` | `address` | The address to call the [`universalReceiver`](#universalreceiver) function on. |
+| `force` | `bool` | A boolean that describe if transfer to a `to` address that does not support LSP1 is allowed or not. |
+| `lsp1Data` | `bytes` | The data to be sent to the `to` address in the `universalReceiver(...)` call. |
@@ -1070,19 +1352,47 @@ CALL opcode, passing the [`msg.data`](#msg.data) appended with the 20 bytes of t
## Events
-### AuthorizedOperator
+### DataChanged
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#datachanged)
+- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol)
+- Event signature: `DataChanged(bytes32,bytes)`
+- Event topic hash: `0xece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2`
+
+:::
+
+```solidity
+event DataChanged(bytes32 indexed dataKey, bytes dataValue);
+```
+
+_The following data key/value pair has been changed in the ERC725Y storage: Data key: `dataKey`, data value: `dataValue`._
+
+Emitted when data at a specific `dataKey` was changed to a new value `dataValue`.
+
+#### Parameters
+
+| Name | Type | Description |
+| ----------------------- | :-------: | -------------------------------------------- |
+| `dataKey` **`indexed`** | `bytes32` | The data key for which a bytes value is set. |
+| `dataValue` | `bytes` | The value to set for the given data key. |
+
+
+
+### OperatorAuthorizationChanged
:::note References
-- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#authorizedoperator)
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#operatorauthorizationchanged)
- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol)
-- Event signature: `AuthorizedOperator(address,address,bytes32,bytes)`
-- Event topic hash: `0x0052e433f2d4225671bc164dd1cdc9a76044356091f27ad234798bd0cbf08349`
+- Event signature: `OperatorAuthorizationChanged(address,address,bytes32,bytes)`
+- Event topic hash: `0x1b1b58aa2ec0cec2228b2d37124556d41f5a1f7b12f089171f896cc236671215`
:::
```solidity
-event AuthorizedOperator(address indexed operator, address indexed tokenOwner, bytes32 indexed tokenId, bytes operatorNotificationData);
+event OperatorAuthorizationChanged(address indexed operator, address indexed tokenOwner, bytes32 indexed tokenId, bytes operatorNotificationData);
```
Emitted when `tokenOwner` enables `operator` to transfer or burn the `tokenId`.
@@ -1098,31 +1408,32 @@ Emitted when `tokenOwner` enables `operator` to transfer or burn the `tokenId`.
-### DataChanged
+### OperatorRevoked
:::note References
-- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#datachanged)
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#operatorrevoked)
- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol)
-- Event signature: `DataChanged(bytes32,bytes)`
-- Event topic hash: `0xece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2`
+- Event signature: `OperatorRevoked(address,address,bytes32,bool,bytes)`
+- Event topic hash: `0xc78cd419d6136f9f1c1c6aec1d3fae098cffaf8bc86314a8f2685e32fe574e3c`
:::
```solidity
-event DataChanged(bytes32 indexed dataKey, bytes dataValue);
+event OperatorRevoked(address indexed operator, address indexed tokenOwner, bytes32 indexed tokenId, bool notified, bytes operatorNotificationData);
```
-_The following data key/value pair has been changed in the ERC725Y storage: Data key: `dataKey`, data value: `dataValue`._
-
-Emitted when data at a specific `dataKey` was changed to a new value `dataValue`.
+Emitted when `tokenOwner` disables `operator` to transfer or burn `tokenId` on its behalf.
#### Parameters
-| Name | Type | Description |
-| ----------------------- | :-------: | -------------------------------------------- |
-| `dataKey` **`indexed`** | `bytes32` | The data key for which a bytes value is set. |
-| `dataValue` | `bytes` | The value to set for the given data key. |
+| Name | Type | Description |
+| -------------------------- | :-------: | ---------------------------------------------------------------------------------- |
+| `operator` **`indexed`** | `address` | The address revoked from the operator array ([`getOperatorsOf`](#getoperatorsof)). |
+| `tokenOwner` **`indexed`** | `address` | The owner of the `tokenId`. |
+| `tokenId` **`indexed`** | `bytes32` | The tokenId `operator` is revoked from operating on. |
+| `notified` | `bool` | Bool indicating whether the operator has been notified or not |
+| `operatorNotificationData` | `bytes` | The data to notify the operator about via LSP1. |
@@ -1150,32 +1461,30 @@ event OwnershipTransferred(address indexed previousOwner, address indexed newOwn
-### RevokedOperator
+### TokenIdDataChanged
:::note References
-- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#revokedoperator)
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#tokeniddatachanged)
- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol)
-- Event signature: `RevokedOperator(address,address,bytes32,bool,bytes)`
-- Event topic hash: `0x3ee932cea40ebbbfd8577d47156cc17cce8683802c57bbd1fb8c131c6f07af0a`
+- Event signature: `TokenIdDataChanged(bytes32,bytes32,bytes)`
+- Event topic hash: `0xa6e4251f855f750545fe414f120db91c76b88def14d120969e5bb2d3f05debbb`
:::
```solidity
-event RevokedOperator(address indexed operator, address indexed tokenOwner, bytes32 indexed tokenId, bool notified, bytes operatorNotificationData);
+event TokenIdDataChanged(bytes32 indexed tokenId, bytes32 indexed dataKey, bytes dataValue);
```
-Emitted when `tokenOwner` disables `operator` to transfer or burn `tokenId` on its behalf.
+Emitted when setting data for `tokenId`.
#### Parameters
-| Name | Type | Description |
-| -------------------------- | :-------: | ---------------------------------------------------------------------------------- |
-| `operator` **`indexed`** | `address` | The address revoked from the operator array ([`getOperatorsOf`](#getoperatorsof)). |
-| `tokenOwner` **`indexed`** | `address` | The owner of the `tokenId`. |
-| `tokenId` **`indexed`** | `bytes32` | The tokenId `operator` is revoked from operating on. |
-| `notified` | `bool` | Bool indicating whether the operator has been notified or not |
-| `operatorNotificationData` | `bytes` | The data to notify the operator about via LSP1. |
+| Name | Type | Description |
+| ----------------------- | :-------: | -------------------------------------------- |
+| `tokenId` **`indexed`** | `bytes32` | The tokenId which data is set for. |
+| `dataKey` **`indexed`** | `bytes32` | The data key for which a bytes value is set. |
+| `dataValue` | `bytes` | The value to set for the given data key. |
@@ -1333,7 +1642,7 @@ reverts when the contract is called with a function selector not valid (less tha
error LSP4TokenNameNotEditable();
```
-Reverts when trying to edit the data key `LSP4TokenName` after the digital asset contract has been deployed. The `LSP4TokenName` data key is located inside the ERC725Y Data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed.
+Reverts when trying to edit the data key `LSP4TokenName` after the digital asset contract has been deployed / initialized. The `LSP4TokenName` data key is located inside the ERC725Y data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed / initialized.
@@ -1352,7 +1661,53 @@ Reverts when trying to edit the data key `LSP4TokenName` after the digital asset
error LSP4TokenSymbolNotEditable();
```
-Reverts when trying to edit the data key `LSP4TokenSymbol` after the digital asset contract has been deployed. The `LSP4TokenSymbol` data key is located inside the ERC725Y Data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed.
+Reverts when trying to edit the data key `LSP4TokenSymbol` after the digital asset contract has been deployed / initialized. The `LSP4TokenSymbol` data key is located inside the ERC725Y data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed / initialized.
+
+
+
+### LSP4TokenTypeNotEditable
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp4tokentypenoteditable)
+- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol)
+- Error signature: `LSP4TokenTypeNotEditable()`
+- Error hash: `0x4ef6d7fb`
+
+:::
+
+```solidity
+error LSP4TokenTypeNotEditable();
+```
+
+Reverts when trying to edit the data key `LSP4TokenType` after the digital asset contract has been deployed / initialized. The `LSP4TokenType` data key is located inside the ERC725Y data key-value store of the digital asset contract. It can be set only once inside the constructor / initializer when the digital asset contract is being deployed / initialized.
+
+
+
+### LSP8BatchCallFailed
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8batchcallfailed)
+- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol)
+- Error signature: `LSP8BatchCallFailed(uint256)`
+- Error hash: `0x234eb819`
+
+:::
+
+```solidity
+error LSP8BatchCallFailed(uint256 callIndex);
+```
+
+_Batch call failed._
+
+Reverts when a batch call failed.
+
+#### Parameters
+
+| Name | Type | Description |
+| ----------- | :-------: | ----------- |
+| `callIndex` | `uint256` | - |
@@ -1677,22 +2032,60 @@ Error occurs when sending native tokens to the LSP8 contract without sending any
-### LSP8TokenIdTypeNotEditable
+### LSP8TokenIdFormatNotEditable
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenidformatnoteditable)
+- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol)
+- Error signature: `LSP8TokenIdFormatNotEditable()`
+- Error hash: `0x3664800a`
+
+:::
+
+```solidity
+error LSP8TokenIdFormatNotEditable();
+```
+
+Reverts when trying to edit the data key `LSP8TokenIdFormat` after the identifiable digital asset contract has been deployed. The `LSP8TokenIdFormat` data key is located inside the ERC725Y Data key-value store of the identifiable digital asset contract. It can be set only once inside the constructor/initializer when the identifiable digital asset contract is being deployed.
+
+
+
+### LSP8TokenIdsDataEmptyArray
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenidsdataemptyarray)
+- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol)
+- Error signature: `LSP8TokenIdsDataEmptyArray()`
+- Error hash: `0x80c98305`
+
+:::
+
+```solidity
+error LSP8TokenIdsDataEmptyArray();
+```
+
+Reverts when empty arrays is passed to the function
+
+
+
+### LSP8TokenIdsDataLengthMismatch
:::note References
-- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenidtypenoteditable)
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenidsdatalengthmismatch)
- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol)
-- Error signature: `LSP8TokenIdTypeNotEditable()`
-- Error hash: `0x53bc1122`
+- Error signature: `LSP8TokenIdsDataLengthMismatch()`
+- Error hash: `0x2fa71dfe`
:::
```solidity
-error LSP8TokenIdTypeNotEditable();
+error LSP8TokenIdsDataLengthMismatch();
```
-Reverts when trying to edit the data key `LSP8TokenIdType` after the identifiable digital asset contract has been deployed. The `LSP8TokenIdType` data key is located inside the ERC725Y Data key-value store of the identifiable digital asset contract. It can be set only once inside the constructor/initializer when the identifiable digital asset contract is being deployed.
+Reverts when the length of the token IDs data arrays is not equal
diff --git a/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.md b/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.md
index dda3eb65b2..885463cc7e 100644
--- a/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.md
+++ b/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.md
@@ -128,7 +128,7 @@ Allow an `operator` address to transfer or burn a specific `tokenId` on behalf o
**Emitted events:**
-- LSP7 [`AuthorizedOperator`](#authorizedoperator) event.
+- LSP7 [`OperatorAuthorizationChanged`](#operatorauthorizationchanged) event.
- ERC721 [`Approval`](#approval) event.
@@ -174,6 +174,45 @@ Get the number of token IDs owned by `tokenOwner`.
+### batchCalls
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#batchcalls)
+- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol)
+- Function signature: `batchCalls(bytes[])`
+- Function selector: `0x6963d438`
+
+:::
+
+:::info
+
+It's not possible to send value along the functions call due to the use of `delegatecall`.
+
+:::
+
+```solidity
+function batchCalls(bytes[] data) external nonpayable returns (bytes[] results);
+```
+
+_Executing the following batch of abi-encoded function calls on the contract: `data`._
+
+Allows a caller to batch different function calls in one call. Perform a `delegatecall` on self, to call different functions with preserving the context.
+
+#### Parameters
+
+| Name | Type | Description |
+| ------ | :-------: | -------------------------------------------------------------------- |
+| `data` | `bytes[]` | An array of ABI encoded function calls to be called on the contract. |
+
+#### Returns
+
+| Name | Type | Description |
+| --------- | :-------: | ---------------------------------------------------------------- |
+| `results` | `bytes[]` | An array of abi-encoded data returned by the functions executed. |
+
+
+
### getApproved
:::note References
@@ -275,6 +314,76 @@ Get in the ERC725Y storage the bytes data stored at multiple data keys `dataKeys
+### getDataBatchForTokenIds
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#getdatabatchfortokenids)
+- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol)
+- Function signature: `getDataBatchForTokenIds(bytes32[],bytes32[])`
+- Function selector: `0x1d26fce6`
+
+:::
+
+```solidity
+function getDataBatchForTokenIds(
+ bytes32[] tokenIds,
+ bytes32[] dataKeys
+) external view returns (bytes[] dataValues);
+```
+
+_Retrieves data in batch for multiple `tokenId` and `dataKey` pairs._
+
+#### Parameters
+
+| Name | Type | Description |
+| ---------- | :---------: | ----------------------------------------------------- |
+| `tokenIds` | `bytes32[]` | An array of token IDs. |
+| `dataKeys` | `bytes32[]` | An array of data keys corresponding to the token IDs. |
+
+#### Returns
+
+| Name | Type | Description |
+| ------------ | :-------: | ----------------------------------------------------------------- |
+| `dataValues` | `bytes[]` | An array of data values for each pair of `tokenId` and `dataKey`. |
+
+
+
+### getDataForTokenId
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#getdatafortokenid)
+- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol)
+- Function signature: `getDataForTokenId(bytes32,bytes32)`
+- Function selector: `0x16e023b3`
+
+:::
+
+```solidity
+function getDataForTokenId(
+ bytes32 tokenId,
+ bytes32 dataKey
+) external view returns (bytes dataValue);
+```
+
+_Retrieves data for a specific `tokenId` and `dataKey`._
+
+#### Parameters
+
+| Name | Type | Description |
+| --------- | :-------: | ---------------------------------- |
+| `tokenId` | `bytes32` | The unique identifier for a token. |
+| `dataKey` | `bytes32` | The key for the data to retrieve. |
+
+#### Returns
+
+| Name | Type | Description |
+| ----------- | :-----: | ----------------------------------------------------------------- |
+| `dataValue` | `bytes` | The data value associated with the given `tokenId` and `dataKey`. |
+
+
+
### getOperatorsOf
:::note References
@@ -729,6 +838,68 @@ Batch data setting function that behaves the same as [`setData`](#setdata) but a
+### setDataBatchForTokenIds
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#setdatabatchfortokenids)
+- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol)
+- Function signature: `setDataBatchForTokenIds(bytes32[],bytes32[],bytes[])`
+- Function selector: `0xbe9f0e6f`
+
+:::
+
+```solidity
+function setDataBatchForTokenIds(
+ bytes32[] tokenIds,
+ bytes32[] dataKeys,
+ bytes[] dataValues
+) external nonpayable;
+```
+
+_Sets data in batch for multiple `tokenId` and `dataKey` pairs._
+
+#### Parameters
+
+| Name | Type | Description |
+| ------------ | :---------: | ----------------------------------------------------- |
+| `tokenIds` | `bytes32[]` | An array of token IDs. |
+| `dataKeys` | `bytes32[]` | An array of data keys corresponding to the token IDs. |
+| `dataValues` | `bytes[]` | An array of values to set for the given data keys. |
+
+
+
+### setDataForTokenId
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#setdatafortokenid)
+- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol)
+- Function signature: `setDataForTokenId(bytes32,bytes32,bytes)`
+- Function selector: `0xd6c1407c`
+
+:::
+
+```solidity
+function setDataForTokenId(
+ bytes32 tokenId,
+ bytes32 dataKey,
+ bytes dataValue
+) external nonpayable;
+```
+
+_Sets data for a specific `tokenId` and `dataKey`._
+
+#### Parameters
+
+| Name | Type | Description |
+| ----------- | :-------: | ---------------------------------------- |
+| `tokenId` | `bytes32` | The unique identifier for a token. |
+| `dataKey` | `bytes32` | The key for the data to set. |
+| `dataValue` | `bytes` | The value to set for the given data key. |
+
+
+
### supportsInterface
:::note References
@@ -1099,7 +1270,7 @@ mapping(bytes32 => bytes) _store
function _setData(bytes32 dataKey, bytes dataValue) internal nonpayable;
```
-The ERC725Y data key `_LSP8_TOKENID_TYPE_KEY` cannot be changed
+The ERC725Y data key `_LSP8_TOKENID_FORMAT_KEY` cannot be changed
once the identifiable digital asset contract has been deployed.
@@ -1215,6 +1386,64 @@ function _transfer(
+### \_setDataForTokenId
+
+```solidity
+function _setDataForTokenId(
+ bytes32 tokenId,
+ bytes32 dataKey,
+ bytes dataValue
+) internal nonpayable;
+```
+
+Sets data for a specific `tokenId` and `dataKey` in the ERC725Y storage
+The ERC725Y data key is the hash of the `tokenId` and `dataKey` concatenated
+
+
+
+#### Parameters
+
+| Name | Type | Description |
+| ----------- | :-------: | ---------------------------------------- |
+| `tokenId` | `bytes32` | The unique identifier for a token. |
+| `dataKey` | `bytes32` | The key for the data to set. |
+| `dataValue` | `bytes` | The value to set for the given data key. |
+
+
+
+### \_getDataForTokenId
+
+```solidity
+function _getDataForTokenId(
+ bytes32 tokenId,
+ bytes32 dataKey
+) internal view returns (bytes dataValues);
+```
+
+Retrieves data for a specific `tokenId` and `dataKey` from the ERC725Y storage
+The ERC725Y data key is the hash of the `tokenId` and `dataKey` concatenated
+
+#### Parameters
+
+| Name | Type | Description |
+| --------- | :-------: | ---------------------------------- |
+| `tokenId` | `bytes32` | The unique identifier for a token. |
+| `dataKey` | `bytes32` | The key for the data to retrieve. |
+
+#### Returns
+
+| Name | Type | Description |
+| ------------ | :-----: | ----------------------------------------------------------------- |
+| `dataValues` | `bytes` | The data value associated with the given `tokenId` and `dataKey`. |
+
+
+
### \_beforeTokenTransfer
```solidity
@@ -1265,6 +1494,47 @@ Allows to run custom logic after updating balances, but **before notifiying send
+### \_notifyTokenOperator
+
+```solidity
+function _notifyTokenOperator(
+ address operator,
+ bytes lsp1Data
+) internal nonpayable;
+```
+
+Attempt to notify the operator `operator` about the `tokenId` being authorized.
+This is done by calling its [`universalReceiver`](#universalreceiver) function with the `_TYPEID_LSP8_TOKENOPERATOR` as typeId, if `operator` is a contract that supports the LSP1 interface.
+If `operator` is an EOA or a contract that does not support the LSP1 interface, nothing will happen and no notification will be sent.
+
+#### Parameters
+
+| Name | Type | Description |
+| ---------- | :-------: | ------------------------------------------------------------------------------ |
+| `operator` | `address` | The address to call the [`universalReceiver`](#universalreceiver) function on. |
+| `lsp1Data` | `bytes` | the data to be sent to the `operator` address in the `universalReceiver` call. |
+
+
+
+### \_notifyTokenSender
+
+```solidity
+function _notifyTokenSender(address from, bytes lsp1Data) internal nonpayable;
+```
+
+Attempt to notify the token sender `from` about the `tokenId` being transferred.
+This is done by calling its [`universalReceiver`](#universalreceiver) function with the `_TYPEID_LSP8_TOKENSSENDER` as typeId, if `from` is a contract that supports the LSP1 interface.
+If `from` is an EOA or a contract that does not support the LSP1 interface, nothing will happen and no notification will be sent.
+
+#### Parameters
+
+| Name | Type | Description |
+| ---------- | :-------: | ------------------------------------------------------------------------------ |
+| `from` | `address` | The address to call the [`universalReceiver`](#universalreceiver) function on. |
+| `lsp1Data` | `bytes` | the data to be sent to the `from` address in the `universalReceiver` call. |
+
+
+
### \_notifyTokenReceiver
```solidity
@@ -1275,9 +1545,21 @@ function _notifyTokenReceiver(
) internal nonpayable;
```
-An attempt is made to notify the token receiver about the `tokenId` changing owners
-using LSP1 interface. When force is FALSE the token receiver MUST support LSP1.
-The receiver may revert when the token being sent is not wanted.
+Attempt to notify the token receiver `to` about the `tokenId` being received.
+This is done by calling its [`universalReceiver`](#universalreceiver) function with the `_TYPEID_LSP8_TOKENSRECIPIENT` as typeId, if `to` is a contract that supports the LSP1 interface.
+If `to` is is an EOA or a contract that does not support the LSP1 interface, the behaviour will depend on the `force` boolean flag.
+
+- if `force` is set to `true`, nothing will happen and no notification will be sent.
+
+- if `force` is set to `false, the transaction will revert.
+
+#### Parameters
+
+| Name | Type | Description |
+| ---------- | :-------: | --------------------------------------------------------------------------------------------------- |
+| `to` | `address` | The address to call the [`universalReceiver`](#universalreceiver) function on. |
+| `force` | `bool` | A boolean that describe if transfer to a `to` address that does not support LSP1 is allowed or not. |
+| `lsp1Data` | `bytes` | The data to be sent to the `to` address in the `universalReceiver(...)` call. |
@@ -1434,19 +1716,47 @@ Emitted when `account` grants or revokes permission to `operator` to transfer th
-### AuthorizedOperator
+### DataChanged
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#datachanged)
+- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol)
+- Event signature: `DataChanged(bytes32,bytes)`
+- Event topic hash: `0xece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2`
+
+:::
+
+```solidity
+event DataChanged(bytes32 indexed dataKey, bytes dataValue);
+```
+
+_The following data key/value pair has been changed in the ERC725Y storage: Data key: `dataKey`, data value: `dataValue`._
+
+Emitted when data at a specific `dataKey` was changed to a new value `dataValue`.
+
+#### Parameters
+
+| Name | Type | Description |
+| ----------------------- | :-------: | -------------------------------------------- |
+| `dataKey` **`indexed`** | `bytes32` | The data key for which a bytes value is set. |
+| `dataValue` | `bytes` | The value to set for the given data key. |
+
+
+
+### OperatorAuthorizationChanged
:::note References
-- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#authorizedoperator)
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#operatorauthorizationchanged)
- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol)
-- Event signature: `AuthorizedOperator(address,address,bytes32,bytes)`
-- Event topic hash: `0x0052e433f2d4225671bc164dd1cdc9a76044356091f27ad234798bd0cbf08349`
+- Event signature: `OperatorAuthorizationChanged(address,address,bytes32,bytes)`
+- Event topic hash: `0x1b1b58aa2ec0cec2228b2d37124556d41f5a1f7b12f089171f896cc236671215`
:::
```solidity
-event AuthorizedOperator(address indexed operator, address indexed tokenOwner, bytes32 indexed tokenId, bytes operatorNotificationData);
+event OperatorAuthorizationChanged(address indexed operator, address indexed tokenOwner, bytes32 indexed tokenId, bytes operatorNotificationData);
```
Emitted when `tokenOwner` enables `operator` to transfer or burn the `tokenId`.
@@ -1462,31 +1772,32 @@ Emitted when `tokenOwner` enables `operator` to transfer or burn the `tokenId`.
-### DataChanged
+### OperatorRevoked
:::note References
-- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#datachanged)
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#operatorrevoked)
- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol)
-- Event signature: `DataChanged(bytes32,bytes)`
-- Event topic hash: `0xece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2`
+- Event signature: `OperatorRevoked(address,address,bytes32,bool,bytes)`
+- Event topic hash: `0xc78cd419d6136f9f1c1c6aec1d3fae098cffaf8bc86314a8f2685e32fe574e3c`
:::
```solidity
-event DataChanged(bytes32 indexed dataKey, bytes dataValue);
+event OperatorRevoked(address indexed operator, address indexed tokenOwner, bytes32 indexed tokenId, bool notified, bytes operatorNotificationData);
```
-_The following data key/value pair has been changed in the ERC725Y storage: Data key: `dataKey`, data value: `dataValue`._
-
-Emitted when data at a specific `dataKey` was changed to a new value `dataValue`.
+Emitted when `tokenOwner` disables `operator` to transfer or burn `tokenId` on its behalf.
#### Parameters
-| Name | Type | Description |
-| ----------------------- | :-------: | -------------------------------------------- |
-| `dataKey` **`indexed`** | `bytes32` | The data key for which a bytes value is set. |
-| `dataValue` | `bytes` | The value to set for the given data key. |
+| Name | Type | Description |
+| -------------------------- | :-------: | ---------------------------------------------------------------------------------- |
+| `operator` **`indexed`** | `address` | The address revoked from the operator array ([`getOperatorsOf`](#getoperatorsof)). |
+| `tokenOwner` **`indexed`** | `address` | The owner of the `tokenId`. |
+| `tokenId` **`indexed`** | `bytes32` | The tokenId `operator` is revoked from operating on. |
+| `notified` | `bool` | Bool indicating whether the operator has been notified or not |
+| `operatorNotificationData` | `bytes` | The data to notify the operator about via LSP1. |
@@ -1514,32 +1825,30 @@ event OwnershipTransferred(address indexed previousOwner, address indexed newOwn
-### RevokedOperator
+### TokenIdDataChanged
:::note References
-- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#revokedoperator)
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#tokeniddatachanged)
- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol)
-- Event signature: `RevokedOperator(address,address,bytes32,bool,bytes)`
-- Event topic hash: `0x3ee932cea40ebbbfd8577d47156cc17cce8683802c57bbd1fb8c131c6f07af0a`
+- Event signature: `TokenIdDataChanged(bytes32,bytes32,bytes)`
+- Event topic hash: `0xa6e4251f855f750545fe414f120db91c76b88def14d120969e5bb2d3f05debbb`
:::
```solidity
-event RevokedOperator(address indexed operator, address indexed tokenOwner, bytes32 indexed tokenId, bool notified, bytes operatorNotificationData);
+event TokenIdDataChanged(bytes32 indexed tokenId, bytes32 indexed dataKey, bytes dataValue);
```
-Emitted when `tokenOwner` disables `operator` to transfer or burn `tokenId` on its behalf.
+Emitted when setting data for `tokenId`.
#### Parameters
-| Name | Type | Description |
-| -------------------------- | :-------: | ---------------------------------------------------------------------------------- |
-| `operator` **`indexed`** | `address` | The address revoked from the operator array ([`getOperatorsOf`](#getoperatorsof)). |
-| `tokenOwner` **`indexed`** | `address` | The owner of the `tokenId`. |
-| `tokenId` **`indexed`** | `bytes32` | The tokenId `operator` is revoked from operating on. |
-| `notified` | `bool` | Bool indicating whether the operator has been notified or not |
-| `operatorNotificationData` | `bytes` | The data to notify the operator about via LSP1. |
+| Name | Type | Description |
+| ----------------------- | :-------: | -------------------------------------------- |
+| `tokenId` **`indexed`** | `bytes32` | The tokenId which data is set for. |
+| `dataKey` **`indexed`** | `bytes32` | The data key for which a bytes value is set. |
+| `dataValue` | `bytes` | The value to set for the given data key. |
@@ -1724,7 +2033,7 @@ reverts when the contract is called with a function selector not valid (less tha
error LSP4TokenNameNotEditable();
```
-Reverts when trying to edit the data key `LSP4TokenName` after the digital asset contract has been deployed. The `LSP4TokenName` data key is located inside the ERC725Y Data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed.
+Reverts when trying to edit the data key `LSP4TokenName` after the digital asset contract has been deployed / initialized. The `LSP4TokenName` data key is located inside the ERC725Y data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed / initialized.
@@ -1743,7 +2052,53 @@ Reverts when trying to edit the data key `LSP4TokenName` after the digital asset
error LSP4TokenSymbolNotEditable();
```
-Reverts when trying to edit the data key `LSP4TokenSymbol` after the digital asset contract has been deployed. The `LSP4TokenSymbol` data key is located inside the ERC725Y Data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed.
+Reverts when trying to edit the data key `LSP4TokenSymbol` after the digital asset contract has been deployed / initialized. The `LSP4TokenSymbol` data key is located inside the ERC725Y data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed / initialized.
+
+
+
+### LSP4TokenTypeNotEditable
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp4tokentypenoteditable)
+- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol)
+- Error signature: `LSP4TokenTypeNotEditable()`
+- Error hash: `0x4ef6d7fb`
+
+:::
+
+```solidity
+error LSP4TokenTypeNotEditable();
+```
+
+Reverts when trying to edit the data key `LSP4TokenType` after the digital asset contract has been deployed / initialized. The `LSP4TokenType` data key is located inside the ERC725Y data key-value store of the digital asset contract. It can be set only once inside the constructor / initializer when the digital asset contract is being deployed / initialized.
+
+
+
+### LSP8BatchCallFailed
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8batchcallfailed)
+- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol)
+- Error signature: `LSP8BatchCallFailed(uint256)`
+- Error hash: `0x234eb819`
+
+:::
+
+```solidity
+error LSP8BatchCallFailed(uint256 callIndex);
+```
+
+_Batch call failed._
+
+Reverts when a batch call failed.
+
+#### Parameters
+
+| Name | Type | Description |
+| ----------- | :-------: | ----------- |
+| `callIndex` | `uint256` | - |
@@ -2026,22 +2381,60 @@ Error occurs when sending native tokens to the LSP8 contract without sending any
-### LSP8TokenIdTypeNotEditable
+### LSP8TokenIdFormatNotEditable
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenidformatnoteditable)
+- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol)
+- Error signature: `LSP8TokenIdFormatNotEditable()`
+- Error hash: `0x3664800a`
+
+:::
+
+```solidity
+error LSP8TokenIdFormatNotEditable();
+```
+
+Reverts when trying to edit the data key `LSP8TokenIdFormat` after the identifiable digital asset contract has been deployed. The `LSP8TokenIdFormat` data key is located inside the ERC725Y Data key-value store of the identifiable digital asset contract. It can be set only once inside the constructor/initializer when the identifiable digital asset contract is being deployed.
+
+
+
+### LSP8TokenIdsDataEmptyArray
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenidsdataemptyarray)
+- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol)
+- Error signature: `LSP8TokenIdsDataEmptyArray()`
+- Error hash: `0x80c98305`
+
+:::
+
+```solidity
+error LSP8TokenIdsDataEmptyArray();
+```
+
+Reverts when empty arrays is passed to the function
+
+
+
+### LSP8TokenIdsDataLengthMismatch
:::note References
-- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenidtypenoteditable)
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenidsdatalengthmismatch)
- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol)
-- Error signature: `LSP8TokenIdTypeNotEditable()`
-- Error hash: `0x53bc1122`
+- Error signature: `LSP8TokenIdsDataLengthMismatch()`
+- Error hash: `0x2fa71dfe`
:::
```solidity
-error LSP8TokenIdTypeNotEditable();
+error LSP8TokenIdsDataLengthMismatch();
```
-Reverts when trying to edit the data key `LSP8TokenIdType` after the identifiable digital asset contract has been deployed. The `LSP8TokenIdType` data key is located inside the ERC725Y Data key-value store of the identifiable digital asset contract. It can be set only once inside the constructor/initializer when the identifiable digital asset contract is being deployed.
+Reverts when the length of the token IDs data arrays is not equal
diff --git a/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.md b/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.md
index 24136c3e94..f04d2e4b6b 100644
--- a/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.md
+++ b/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.md
@@ -137,6 +137,45 @@ Get the number of token IDs owned by `tokenOwner`.
+### batchCalls
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#batchcalls)
+- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol)
+- Function signature: `batchCalls(bytes[])`
+- Function selector: `0x6963d438`
+
+:::
+
+:::info
+
+It's not possible to send value along the functions call due to the use of `delegatecall`.
+
+:::
+
+```solidity
+function batchCalls(bytes[] data) external nonpayable returns (bytes[] results);
+```
+
+_Executing the following batch of abi-encoded function calls on the contract: `data`._
+
+Allows a caller to batch different function calls in one call. Perform a `delegatecall` on self, to call different functions with preserving the context.
+
+#### Parameters
+
+| Name | Type | Description |
+| ------ | :-------: | -------------------------------------------------------------------- |
+| `data` | `bytes[]` | An array of ABI encoded function calls to be called on the contract. |
+
+#### Returns
+
+| Name | Type | Description |
+| --------- | :-------: | ---------------------------------------------------------------- |
+| `results` | `bytes[]` | An array of abi-encoded data returned by the functions executed. |
+
+
+
### getData
:::note References
@@ -205,6 +244,76 @@ Get in the ERC725Y storage the bytes data stored at multiple data keys `dataKeys
+### getDataBatchForTokenIds
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#getdatabatchfortokenids)
+- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol)
+- Function signature: `getDataBatchForTokenIds(bytes32[],bytes32[])`
+- Function selector: `0x1d26fce6`
+
+:::
+
+```solidity
+function getDataBatchForTokenIds(
+ bytes32[] tokenIds,
+ bytes32[] dataKeys
+) external view returns (bytes[] dataValues);
+```
+
+_Retrieves data in batch for multiple `tokenId` and `dataKey` pairs._
+
+#### Parameters
+
+| Name | Type | Description |
+| ---------- | :---------: | ----------------------------------------------------- |
+| `tokenIds` | `bytes32[]` | An array of token IDs. |
+| `dataKeys` | `bytes32[]` | An array of data keys corresponding to the token IDs. |
+
+#### Returns
+
+| Name | Type | Description |
+| ------------ | :-------: | ----------------------------------------------------------------- |
+| `dataValues` | `bytes[]` | An array of data values for each pair of `tokenId` and `dataKey`. |
+
+
+
+### getDataForTokenId
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#getdatafortokenid)
+- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol)
+- Function signature: `getDataForTokenId(bytes32,bytes32)`
+- Function selector: `0x16e023b3`
+
+:::
+
+```solidity
+function getDataForTokenId(
+ bytes32 tokenId,
+ bytes32 dataKey
+) external view returns (bytes dataValue);
+```
+
+_Retrieves data for a specific `tokenId` and `dataKey`._
+
+#### Parameters
+
+| Name | Type | Description |
+| --------- | :-------: | ---------------------------------- |
+| `tokenId` | `bytes32` | The unique identifier for a token. |
+| `dataKey` | `bytes32` | The key for the data to retrieve. |
+
+#### Returns
+
+| Name | Type | Description |
+| ----------- | :-----: | ----------------------------------------------------------------- |
+| `dataValue` | `bytes` | The data value associated with the given `tokenId` and `dataKey`. |
+
+
+
### getOperatorsOf
:::note References
@@ -448,6 +557,68 @@ Batch data setting function that behaves the same as [`setData`](#setdata) but a
+### setDataBatchForTokenIds
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#setdatabatchfortokenids)
+- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol)
+- Function signature: `setDataBatchForTokenIds(bytes32[],bytes32[],bytes[])`
+- Function selector: `0xbe9f0e6f`
+
+:::
+
+```solidity
+function setDataBatchForTokenIds(
+ bytes32[] tokenIds,
+ bytes32[] dataKeys,
+ bytes[] dataValues
+) external nonpayable;
+```
+
+_Sets data in batch for multiple `tokenId` and `dataKey` pairs._
+
+#### Parameters
+
+| Name | Type | Description |
+| ------------ | :---------: | ----------------------------------------------------- |
+| `tokenIds` | `bytes32[]` | An array of token IDs. |
+| `dataKeys` | `bytes32[]` | An array of data keys corresponding to the token IDs. |
+| `dataValues` | `bytes[]` | An array of values to set for the given data keys. |
+
+
+
+### setDataForTokenId
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#setdatafortokenid)
+- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol)
+- Function signature: `setDataForTokenId(bytes32,bytes32,bytes)`
+- Function selector: `0xd6c1407c`
+
+:::
+
+```solidity
+function setDataForTokenId(
+ bytes32 tokenId,
+ bytes32 dataKey,
+ bytes dataValue
+) external nonpayable;
+```
+
+_Sets data for a specific `tokenId` and `dataKey`._
+
+#### Parameters
+
+| Name | Type | Description |
+| ----------- | :-------: | ---------------------------------------- |
+| `tokenId` | `bytes32` | The unique identifier for a token. |
+| `dataKey` | `bytes32` | The key for the data to set. |
+| `dataValue` | `bytes` | The value to set for the given data key. |
+
+
+
### supportsInterface
:::note References
@@ -754,7 +925,7 @@ mapping(bytes32 => bytes) _store
function _setData(bytes32 dataKey, bytes dataValue) internal nonpayable;
```
-The ERC725Y data key `_LSP8_TOKENID_TYPE_KEY` cannot be changed
+The ERC725Y data key `_LSP8_TOKENID_FORMAT_KEY` cannot be changed
once the identifiable digital asset contract has been deployed.
@@ -975,6 +1146,64 @@ all the parameters in the calldata packed encoded.
+### \_setDataForTokenId
+
+```solidity
+function _setDataForTokenId(
+ bytes32 tokenId,
+ bytes32 dataKey,
+ bytes dataValue
+) internal nonpayable;
+```
+
+Sets data for a specific `tokenId` and `dataKey` in the ERC725Y storage
+The ERC725Y data key is the hash of the `tokenId` and `dataKey` concatenated
+
+
+
+#### Parameters
+
+| Name | Type | Description |
+| ----------- | :-------: | ---------------------------------------- |
+| `tokenId` | `bytes32` | The unique identifier for a token. |
+| `dataKey` | `bytes32` | The key for the data to set. |
+| `dataValue` | `bytes` | The value to set for the given data key. |
+
+
+
+### \_getDataForTokenId
+
+```solidity
+function _getDataForTokenId(
+ bytes32 tokenId,
+ bytes32 dataKey
+) internal view returns (bytes dataValues);
+```
+
+Retrieves data for a specific `tokenId` and `dataKey` from the ERC725Y storage
+The ERC725Y data key is the hash of the `tokenId` and `dataKey` concatenated
+
+#### Parameters
+
+| Name | Type | Description |
+| --------- | :-------: | ---------------------------------- |
+| `tokenId` | `bytes32` | The unique identifier for a token. |
+| `dataKey` | `bytes32` | The key for the data to retrieve. |
+
+#### Returns
+
+| Name | Type | Description |
+| ------------ | :-----: | ----------------------------------------------------------------- |
+| `dataValues` | `bytes` | The data value associated with the given `tokenId` and `dataKey`. |
+
+
+
### \_beforeTokenTransfer
```solidity
@@ -1022,6 +1251,47 @@ Allows to run custom logic after updating balances, but **before notifiying send
+### \_notifyTokenOperator
+
+```solidity
+function _notifyTokenOperator(
+ address operator,
+ bytes lsp1Data
+) internal nonpayable;
+```
+
+Attempt to notify the operator `operator` about the `tokenId` being authorized.
+This is done by calling its [`universalReceiver`](#universalreceiver) function with the `_TYPEID_LSP8_TOKENOPERATOR` as typeId, if `operator` is a contract that supports the LSP1 interface.
+If `operator` is an EOA or a contract that does not support the LSP1 interface, nothing will happen and no notification will be sent.
+
+#### Parameters
+
+| Name | Type | Description |
+| ---------- | :-------: | ------------------------------------------------------------------------------ |
+| `operator` | `address` | The address to call the [`universalReceiver`](#universalreceiver) function on. |
+| `lsp1Data` | `bytes` | the data to be sent to the `operator` address in the `universalReceiver` call. |
+
+
+
+### \_notifyTokenSender
+
+```solidity
+function _notifyTokenSender(address from, bytes lsp1Data) internal nonpayable;
+```
+
+Attempt to notify the token sender `from` about the `tokenId` being transferred.
+This is done by calling its [`universalReceiver`](#universalreceiver) function with the `_TYPEID_LSP8_TOKENSSENDER` as typeId, if `from` is a contract that supports the LSP1 interface.
+If `from` is an EOA or a contract that does not support the LSP1 interface, nothing will happen and no notification will be sent.
+
+#### Parameters
+
+| Name | Type | Description |
+| ---------- | :-------: | ------------------------------------------------------------------------------ |
+| `from` | `address` | The address to call the [`universalReceiver`](#universalreceiver) function on. |
+| `lsp1Data` | `bytes` | the data to be sent to the `from` address in the `universalReceiver` call. |
+
+
+
### \_notifyTokenReceiver
```solidity
@@ -1032,9 +1302,21 @@ function _notifyTokenReceiver(
) internal nonpayable;
```
-An attempt is made to notify the token receiver about the `tokenId` changing owners
-using LSP1 interface. When force is FALSE the token receiver MUST support LSP1.
-The receiver may revert when the token being sent is not wanted.
+Attempt to notify the token receiver `to` about the `tokenId` being received.
+This is done by calling its [`universalReceiver`](#universalreceiver) function with the `_TYPEID_LSP8_TOKENSRECIPIENT` as typeId, if `to` is a contract that supports the LSP1 interface.
+If `to` is is an EOA or a contract that does not support the LSP1 interface, the behaviour will depend on the `force` boolean flag.
+
+- if `force` is set to `true`, nothing will happen and no notification will be sent.
+
+- if `force` is set to `false, the transaction will revert.
+
+#### Parameters
+
+| Name | Type | Description |
+| ---------- | :-------: | --------------------------------------------------------------------------------------------------- |
+| `to` | `address` | The address to call the [`universalReceiver`](#universalreceiver) function on. |
+| `force` | `bool` | A boolean that describe if transfer to a `to` address that does not support LSP1 is allowed or not. |
+| `lsp1Data` | `bytes` | The data to be sent to the `to` address in the `universalReceiver(...)` call. |
@@ -1098,19 +1380,47 @@ CALL opcode, passing the [`msg.data`](#msg.data) appended with the 20 bytes of t
## Events
-### AuthorizedOperator
+### DataChanged
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#datachanged)
+- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol)
+- Event signature: `DataChanged(bytes32,bytes)`
+- Event topic hash: `0xece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2`
+
+:::
+
+```solidity
+event DataChanged(bytes32 indexed dataKey, bytes dataValue);
+```
+
+_The following data key/value pair has been changed in the ERC725Y storage: Data key: `dataKey`, data value: `dataValue`._
+
+Emitted when data at a specific `dataKey` was changed to a new value `dataValue`.
+
+#### Parameters
+
+| Name | Type | Description |
+| ----------------------- | :-------: | -------------------------------------------- |
+| `dataKey` **`indexed`** | `bytes32` | The data key for which a bytes value is set. |
+| `dataValue` | `bytes` | The value to set for the given data key. |
+
+
+
+### OperatorAuthorizationChanged
:::note References
-- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#authorizedoperator)
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#operatorauthorizationchanged)
- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol)
-- Event signature: `AuthorizedOperator(address,address,bytes32,bytes)`
-- Event topic hash: `0x0052e433f2d4225671bc164dd1cdc9a76044356091f27ad234798bd0cbf08349`
+- Event signature: `OperatorAuthorizationChanged(address,address,bytes32,bytes)`
+- Event topic hash: `0x1b1b58aa2ec0cec2228b2d37124556d41f5a1f7b12f089171f896cc236671215`
:::
```solidity
-event AuthorizedOperator(address indexed operator, address indexed tokenOwner, bytes32 indexed tokenId, bytes operatorNotificationData);
+event OperatorAuthorizationChanged(address indexed operator, address indexed tokenOwner, bytes32 indexed tokenId, bytes operatorNotificationData);
```
Emitted when `tokenOwner` enables `operator` to transfer or burn the `tokenId`.
@@ -1126,31 +1436,32 @@ Emitted when `tokenOwner` enables `operator` to transfer or burn the `tokenId`.
-### DataChanged
+### OperatorRevoked
:::note References
-- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#datachanged)
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#operatorrevoked)
- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol)
-- Event signature: `DataChanged(bytes32,bytes)`
-- Event topic hash: `0xece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2`
+- Event signature: `OperatorRevoked(address,address,bytes32,bool,bytes)`
+- Event topic hash: `0xc78cd419d6136f9f1c1c6aec1d3fae098cffaf8bc86314a8f2685e32fe574e3c`
:::
```solidity
-event DataChanged(bytes32 indexed dataKey, bytes dataValue);
+event OperatorRevoked(address indexed operator, address indexed tokenOwner, bytes32 indexed tokenId, bool notified, bytes operatorNotificationData);
```
-_The following data key/value pair has been changed in the ERC725Y storage: Data key: `dataKey`, data value: `dataValue`._
-
-Emitted when data at a specific `dataKey` was changed to a new value `dataValue`.
+Emitted when `tokenOwner` disables `operator` to transfer or burn `tokenId` on its behalf.
#### Parameters
-| Name | Type | Description |
-| ----------------------- | :-------: | -------------------------------------------- |
-| `dataKey` **`indexed`** | `bytes32` | The data key for which a bytes value is set. |
-| `dataValue` | `bytes` | The value to set for the given data key. |
+| Name | Type | Description |
+| -------------------------- | :-------: | ---------------------------------------------------------------------------------- |
+| `operator` **`indexed`** | `address` | The address revoked from the operator array ([`getOperatorsOf`](#getoperatorsof)). |
+| `tokenOwner` **`indexed`** | `address` | The owner of the `tokenId`. |
+| `tokenId` **`indexed`** | `bytes32` | The tokenId `operator` is revoked from operating on. |
+| `notified` | `bool` | Bool indicating whether the operator has been notified or not |
+| `operatorNotificationData` | `bytes` | The data to notify the operator about via LSP1. |
@@ -1178,32 +1489,30 @@ event OwnershipTransferred(address indexed previousOwner, address indexed newOwn
-### RevokedOperator
+### TokenIdDataChanged
:::note References
-- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#revokedoperator)
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#tokeniddatachanged)
- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol)
-- Event signature: `RevokedOperator(address,address,bytes32,bool,bytes)`
-- Event topic hash: `0x3ee932cea40ebbbfd8577d47156cc17cce8683802c57bbd1fb8c131c6f07af0a`
+- Event signature: `TokenIdDataChanged(bytes32,bytes32,bytes)`
+- Event topic hash: `0xa6e4251f855f750545fe414f120db91c76b88def14d120969e5bb2d3f05debbb`
:::
```solidity
-event RevokedOperator(address indexed operator, address indexed tokenOwner, bytes32 indexed tokenId, bool notified, bytes operatorNotificationData);
+event TokenIdDataChanged(bytes32 indexed tokenId, bytes32 indexed dataKey, bytes dataValue);
```
-Emitted when `tokenOwner` disables `operator` to transfer or burn `tokenId` on its behalf.
+Emitted when setting data for `tokenId`.
#### Parameters
-| Name | Type | Description |
-| -------------------------- | :-------: | ---------------------------------------------------------------------------------- |
-| `operator` **`indexed`** | `address` | The address revoked from the operator array ([`getOperatorsOf`](#getoperatorsof)). |
-| `tokenOwner` **`indexed`** | `address` | The owner of the `tokenId`. |
-| `tokenId` **`indexed`** | `bytes32` | The tokenId `operator` is revoked from operating on. |
-| `notified` | `bool` | Bool indicating whether the operator has been notified or not |
-| `operatorNotificationData` | `bytes` | The data to notify the operator about via LSP1. |
+| Name | Type | Description |
+| ----------------------- | :-------: | -------------------------------------------- |
+| `tokenId` **`indexed`** | `bytes32` | The tokenId which data is set for. |
+| `dataKey` **`indexed`** | `bytes32` | The data key for which a bytes value is set. |
+| `dataValue` | `bytes` | The value to set for the given data key. |
@@ -1361,7 +1670,7 @@ reverts when the contract is called with a function selector not valid (less tha
error LSP4TokenNameNotEditable();
```
-Reverts when trying to edit the data key `LSP4TokenName` after the digital asset contract has been deployed. The `LSP4TokenName` data key is located inside the ERC725Y Data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed.
+Reverts when trying to edit the data key `LSP4TokenName` after the digital asset contract has been deployed / initialized. The `LSP4TokenName` data key is located inside the ERC725Y data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed / initialized.
@@ -1380,7 +1689,53 @@ Reverts when trying to edit the data key `LSP4TokenName` after the digital asset
error LSP4TokenSymbolNotEditable();
```
-Reverts when trying to edit the data key `LSP4TokenSymbol` after the digital asset contract has been deployed. The `LSP4TokenSymbol` data key is located inside the ERC725Y Data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed.
+Reverts when trying to edit the data key `LSP4TokenSymbol` after the digital asset contract has been deployed / initialized. The `LSP4TokenSymbol` data key is located inside the ERC725Y data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed / initialized.
+
+
+
+### LSP4TokenTypeNotEditable
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp4tokentypenoteditable)
+- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol)
+- Error signature: `LSP4TokenTypeNotEditable()`
+- Error hash: `0x4ef6d7fb`
+
+:::
+
+```solidity
+error LSP4TokenTypeNotEditable();
+```
+
+Reverts when trying to edit the data key `LSP4TokenType` after the digital asset contract has been deployed / initialized. The `LSP4TokenType` data key is located inside the ERC725Y data key-value store of the digital asset contract. It can be set only once inside the constructor / initializer when the digital asset contract is being deployed / initialized.
+
+
+
+### LSP8BatchCallFailed
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8batchcallfailed)
+- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol)
+- Error signature: `LSP8BatchCallFailed(uint256)`
+- Error hash: `0x234eb819`
+
+:::
+
+```solidity
+error LSP8BatchCallFailed(uint256 callIndex);
+```
+
+_Batch call failed._
+
+Reverts when a batch call failed.
+
+#### Parameters
+
+| Name | Type | Description |
+| ----------- | :-------: | ----------- |
+| `callIndex` | `uint256` | - |
@@ -1663,22 +2018,60 @@ Error occurs when sending native tokens to the LSP8 contract without sending any
-### LSP8TokenIdTypeNotEditable
+### LSP8TokenIdFormatNotEditable
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenidformatnoteditable)
+- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol)
+- Error signature: `LSP8TokenIdFormatNotEditable()`
+- Error hash: `0x3664800a`
+
+:::
+
+```solidity
+error LSP8TokenIdFormatNotEditable();
+```
+
+Reverts when trying to edit the data key `LSP8TokenIdFormat` after the identifiable digital asset contract has been deployed. The `LSP8TokenIdFormat` data key is located inside the ERC725Y Data key-value store of the identifiable digital asset contract. It can be set only once inside the constructor/initializer when the identifiable digital asset contract is being deployed.
+
+
+
+### LSP8TokenIdsDataEmptyArray
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenidsdataemptyarray)
+- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol)
+- Error signature: `LSP8TokenIdsDataEmptyArray()`
+- Error hash: `0x80c98305`
+
+:::
+
+```solidity
+error LSP8TokenIdsDataEmptyArray();
+```
+
+Reverts when empty arrays is passed to the function
+
+
+
+### LSP8TokenIdsDataLengthMismatch
:::note References
-- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenidtypenoteditable)
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenidsdatalengthmismatch)
- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol)
-- Error signature: `LSP8TokenIdTypeNotEditable()`
-- Error hash: `0x53bc1122`
+- Error signature: `LSP8TokenIdsDataLengthMismatch()`
+- Error hash: `0x2fa71dfe`
:::
```solidity
-error LSP8TokenIdTypeNotEditable();
+error LSP8TokenIdsDataLengthMismatch();
```
-Reverts when trying to edit the data key `LSP8TokenIdType` after the identifiable digital asset contract has been deployed. The `LSP8TokenIdType` data key is located inside the ERC725Y Data key-value store of the identifiable digital asset contract. It can be set only once inside the constructor/initializer when the identifiable digital asset contract is being deployed.
+Reverts when the length of the token IDs data arrays is not equal
diff --git a/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.md b/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.md
index 27faa9f0de..01b0bfd1f7 100644
--- a/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.md
+++ b/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.md
@@ -35,7 +35,8 @@ constructor(
string name_,
string symbol_,
address newOwner_,
- uint256 tokenIdType_
+ uint256 lsp4TokenType_,
+ uint256 lsp8TokenIdFormat_
);
```
@@ -43,12 +44,13 @@ _Deploying a `LSP8CompatibleERC721Mintable` token contract with: token name = `n
#### Parameters
-| Name | Type | Description |
-| -------------- | :-------: | -------------------------------- |
-| `name_` | `string` | The name of the token. |
-| `symbol_` | `string` | The symbol of the token. |
-| `newOwner_` | `address` | The owner of the token contract. |
-| `tokenIdType_` | `uint256` | - |
+| Name | Type | Description |
+| -------------------- | :-------: | ---------------------------------------------------------------------------------------------------- |
+| `name_` | `string` | The name of the token. |
+| `symbol_` | `string` | The symbol of the token. |
+| `newOwner_` | `address` | The owner of the token contract. |
+| `lsp4TokenType_` | `uint256` | The type of token this digital asset contract represents (`0` = Token, `1` = NFT, `2` = Collection). |
+| `lsp8TokenIdFormat_` | `uint256` | The format of tokenIds (= NFTs) that this contract will create. |
@@ -135,7 +137,7 @@ Allow an `operator` address to transfer or burn a specific `tokenId` on behalf o
**Emitted events:**
-- LSP7 [`AuthorizedOperator`](#authorizedoperator) event.
+- LSP7 [`OperatorAuthorizationChanged`](#operatorauthorizationchanged) event.
- ERC721 [`Approval`](#approval) event.
@@ -181,6 +183,45 @@ Get the number of token IDs owned by `tokenOwner`.
+### batchCalls
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#batchcalls)
+- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol)
+- Function signature: `batchCalls(bytes[])`
+- Function selector: `0x6963d438`
+
+:::
+
+:::info
+
+It's not possible to send value along the functions call due to the use of `delegatecall`.
+
+:::
+
+```solidity
+function batchCalls(bytes[] data) external nonpayable returns (bytes[] results);
+```
+
+_Executing the following batch of abi-encoded function calls on the contract: `data`._
+
+Allows a caller to batch different function calls in one call. Perform a `delegatecall` on self, to call different functions with preserving the context.
+
+#### Parameters
+
+| Name | Type | Description |
+| ------ | :-------: | -------------------------------------------------------------------- |
+| `data` | `bytes[]` | An array of ABI encoded function calls to be called on the contract. |
+
+#### Returns
+
+| Name | Type | Description |
+| --------- | :-------: | ---------------------------------------------------------------- |
+| `results` | `bytes[]` | An array of abi-encoded data returned by the functions executed. |
+
+
+
### getApproved
:::note References
@@ -282,6 +323,76 @@ Get in the ERC725Y storage the bytes data stored at multiple data keys `dataKeys
+### getDataBatchForTokenIds
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#getdatabatchfortokenids)
+- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol)
+- Function signature: `getDataBatchForTokenIds(bytes32[],bytes32[])`
+- Function selector: `0x1d26fce6`
+
+:::
+
+```solidity
+function getDataBatchForTokenIds(
+ bytes32[] tokenIds,
+ bytes32[] dataKeys
+) external view returns (bytes[] dataValues);
+```
+
+_Retrieves data in batch for multiple `tokenId` and `dataKey` pairs._
+
+#### Parameters
+
+| Name | Type | Description |
+| ---------- | :---------: | ----------------------------------------------------- |
+| `tokenIds` | `bytes32[]` | An array of token IDs. |
+| `dataKeys` | `bytes32[]` | An array of data keys corresponding to the token IDs. |
+
+#### Returns
+
+| Name | Type | Description |
+| ------------ | :-------: | ----------------------------------------------------------------- |
+| `dataValues` | `bytes[]` | An array of data values for each pair of `tokenId` and `dataKey`. |
+
+
+
+### getDataForTokenId
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#getdatafortokenid)
+- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol)
+- Function signature: `getDataForTokenId(bytes32,bytes32)`
+- Function selector: `0x16e023b3`
+
+:::
+
+```solidity
+function getDataForTokenId(
+ bytes32 tokenId,
+ bytes32 dataKey
+) external view returns (bytes dataValue);
+```
+
+_Retrieves data for a specific `tokenId` and `dataKey`._
+
+#### Parameters
+
+| Name | Type | Description |
+| --------- | :-------: | ---------------------------------- |
+| `tokenId` | `bytes32` | The unique identifier for a token. |
+| `dataKey` | `bytes32` | The key for the data to retrieve. |
+
+#### Returns
+
+| Name | Type | Description |
+| ----------- | :-----: | ----------------------------------------------------------------- |
+| `dataValue` | `bytes` | The data value associated with the given `tokenId` and `dataKey`. |
+
+
+
### getOperatorsOf
:::note References
@@ -771,6 +882,68 @@ Batch data setting function that behaves the same as [`setData`](#setdata) but a
+### setDataBatchForTokenIds
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#setdatabatchfortokenids)
+- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol)
+- Function signature: `setDataBatchForTokenIds(bytes32[],bytes32[],bytes[])`
+- Function selector: `0xbe9f0e6f`
+
+:::
+
+```solidity
+function setDataBatchForTokenIds(
+ bytes32[] tokenIds,
+ bytes32[] dataKeys,
+ bytes[] dataValues
+) external nonpayable;
+```
+
+_Sets data in batch for multiple `tokenId` and `dataKey` pairs._
+
+#### Parameters
+
+| Name | Type | Description |
+| ------------ | :---------: | ----------------------------------------------------- |
+| `tokenIds` | `bytes32[]` | An array of token IDs. |
+| `dataKeys` | `bytes32[]` | An array of data keys corresponding to the token IDs. |
+| `dataValues` | `bytes[]` | An array of values to set for the given data keys. |
+
+
+
+### setDataForTokenId
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#setdatafortokenid)
+- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol)
+- Function signature: `setDataForTokenId(bytes32,bytes32,bytes)`
+- Function selector: `0xd6c1407c`
+
+:::
+
+```solidity
+function setDataForTokenId(
+ bytes32 tokenId,
+ bytes32 dataKey,
+ bytes dataValue
+) external nonpayable;
+```
+
+_Sets data for a specific `tokenId` and `dataKey`._
+
+#### Parameters
+
+| Name | Type | Description |
+| ----------- | :-------: | ---------------------------------------- |
+| `tokenId` | `bytes32` | The unique identifier for a token. |
+| `dataKey` | `bytes32` | The key for the data to set. |
+| `dataValue` | `bytes` | The value to set for the given data key. |
+
+
+
### supportsInterface
:::note References
@@ -1141,7 +1314,7 @@ mapping(bytes32 => bytes) _store
function _setData(bytes32 dataKey, bytes dataValue) internal nonpayable;
```
-The ERC725Y data key `_LSP8_TOKENID_TYPE_KEY` cannot be changed
+The ERC725Y data key `_LSP8_TOKENID_FORMAT_KEY` cannot be changed
once the identifiable digital asset contract has been deployed.
@@ -1257,6 +1430,64 @@ function _transfer(
+### \_setDataForTokenId
+
+```solidity
+function _setDataForTokenId(
+ bytes32 tokenId,
+ bytes32 dataKey,
+ bytes dataValue
+) internal nonpayable;
+```
+
+Sets data for a specific `tokenId` and `dataKey` in the ERC725Y storage
+The ERC725Y data key is the hash of the `tokenId` and `dataKey` concatenated
+
+
+
+#### Parameters
+
+| Name | Type | Description |
+| ----------- | :-------: | ---------------------------------------- |
+| `tokenId` | `bytes32` | The unique identifier for a token. |
+| `dataKey` | `bytes32` | The key for the data to set. |
+| `dataValue` | `bytes` | The value to set for the given data key. |
+
+
+
+### \_getDataForTokenId
+
+```solidity
+function _getDataForTokenId(
+ bytes32 tokenId,
+ bytes32 dataKey
+) internal view returns (bytes dataValues);
+```
+
+Retrieves data for a specific `tokenId` and `dataKey` from the ERC725Y storage
+The ERC725Y data key is the hash of the `tokenId` and `dataKey` concatenated
+
+#### Parameters
+
+| Name | Type | Description |
+| --------- | :-------: | ---------------------------------- |
+| `tokenId` | `bytes32` | The unique identifier for a token. |
+| `dataKey` | `bytes32` | The key for the data to retrieve. |
+
+#### Returns
+
+| Name | Type | Description |
+| ------------ | :-----: | ----------------------------------------------------------------- |
+| `dataValues` | `bytes` | The data value associated with the given `tokenId` and `dataKey`. |
+
+
+
### \_beforeTokenTransfer
```solidity
@@ -1307,6 +1538,47 @@ Allows to run custom logic after updating balances, but **before notifiying send
+### \_notifyTokenOperator
+
+```solidity
+function _notifyTokenOperator(
+ address operator,
+ bytes lsp1Data
+) internal nonpayable;
+```
+
+Attempt to notify the operator `operator` about the `tokenId` being authorized.
+This is done by calling its [`universalReceiver`](#universalreceiver) function with the `_TYPEID_LSP8_TOKENOPERATOR` as typeId, if `operator` is a contract that supports the LSP1 interface.
+If `operator` is an EOA or a contract that does not support the LSP1 interface, nothing will happen and no notification will be sent.
+
+#### Parameters
+
+| Name | Type | Description |
+| ---------- | :-------: | ------------------------------------------------------------------------------ |
+| `operator` | `address` | The address to call the [`universalReceiver`](#universalreceiver) function on. |
+| `lsp1Data` | `bytes` | the data to be sent to the `operator` address in the `universalReceiver` call. |
+
+
+
+### \_notifyTokenSender
+
+```solidity
+function _notifyTokenSender(address from, bytes lsp1Data) internal nonpayable;
+```
+
+Attempt to notify the token sender `from` about the `tokenId` being transferred.
+This is done by calling its [`universalReceiver`](#universalreceiver) function with the `_TYPEID_LSP8_TOKENSSENDER` as typeId, if `from` is a contract that supports the LSP1 interface.
+If `from` is an EOA or a contract that does not support the LSP1 interface, nothing will happen and no notification will be sent.
+
+#### Parameters
+
+| Name | Type | Description |
+| ---------- | :-------: | ------------------------------------------------------------------------------ |
+| `from` | `address` | The address to call the [`universalReceiver`](#universalreceiver) function on. |
+| `lsp1Data` | `bytes` | the data to be sent to the `from` address in the `universalReceiver` call. |
+
+
+
### \_notifyTokenReceiver
```solidity
@@ -1317,9 +1589,21 @@ function _notifyTokenReceiver(
) internal nonpayable;
```
-An attempt is made to notify the token receiver about the `tokenId` changing owners
-using LSP1 interface. When force is FALSE the token receiver MUST support LSP1.
-The receiver may revert when the token being sent is not wanted.
+Attempt to notify the token receiver `to` about the `tokenId` being received.
+This is done by calling its [`universalReceiver`](#universalreceiver) function with the `_TYPEID_LSP8_TOKENSRECIPIENT` as typeId, if `to` is a contract that supports the LSP1 interface.
+If `to` is is an EOA or a contract that does not support the LSP1 interface, the behaviour will depend on the `force` boolean flag.
+
+- if `force` is set to `true`, nothing will happen and no notification will be sent.
+
+- if `force` is set to `false, the transaction will revert.
+
+#### Parameters
+
+| Name | Type | Description |
+| ---------- | :-------: | --------------------------------------------------------------------------------------------------- |
+| `to` | `address` | The address to call the [`universalReceiver`](#universalreceiver) function on. |
+| `force` | `bool` | A boolean that describe if transfer to a `to` address that does not support LSP1 is allowed or not. |
+| `lsp1Data` | `bytes` | The data to be sent to the `to` address in the `universalReceiver(...)` call. |
@@ -1476,19 +1760,47 @@ Emitted when `account` grants or revokes permission to `operator` to transfer th
-### AuthorizedOperator
+### DataChanged
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#datachanged)
+- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol)
+- Event signature: `DataChanged(bytes32,bytes)`
+- Event topic hash: `0xece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2`
+
+:::
+
+```solidity
+event DataChanged(bytes32 indexed dataKey, bytes dataValue);
+```
+
+_The following data key/value pair has been changed in the ERC725Y storage: Data key: `dataKey`, data value: `dataValue`._
+
+Emitted when data at a specific `dataKey` was changed to a new value `dataValue`.
+
+#### Parameters
+
+| Name | Type | Description |
+| ----------------------- | :-------: | -------------------------------------------- |
+| `dataKey` **`indexed`** | `bytes32` | The data key for which a bytes value is set. |
+| `dataValue` | `bytes` | The value to set for the given data key. |
+
+
+
+### OperatorAuthorizationChanged
:::note References
-- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#authorizedoperator)
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#operatorauthorizationchanged)
- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol)
-- Event signature: `AuthorizedOperator(address,address,bytes32,bytes)`
-- Event topic hash: `0x0052e433f2d4225671bc164dd1cdc9a76044356091f27ad234798bd0cbf08349`
+- Event signature: `OperatorAuthorizationChanged(address,address,bytes32,bytes)`
+- Event topic hash: `0x1b1b58aa2ec0cec2228b2d37124556d41f5a1f7b12f089171f896cc236671215`
:::
```solidity
-event AuthorizedOperator(address indexed operator, address indexed tokenOwner, bytes32 indexed tokenId, bytes operatorNotificationData);
+event OperatorAuthorizationChanged(address indexed operator, address indexed tokenOwner, bytes32 indexed tokenId, bytes operatorNotificationData);
```
Emitted when `tokenOwner` enables `operator` to transfer or burn the `tokenId`.
@@ -1504,31 +1816,32 @@ Emitted when `tokenOwner` enables `operator` to transfer or burn the `tokenId`.
-### DataChanged
+### OperatorRevoked
:::note References
-- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#datachanged)
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#operatorrevoked)
- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol)
-- Event signature: `DataChanged(bytes32,bytes)`
-- Event topic hash: `0xece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2`
+- Event signature: `OperatorRevoked(address,address,bytes32,bool,bytes)`
+- Event topic hash: `0xc78cd419d6136f9f1c1c6aec1d3fae098cffaf8bc86314a8f2685e32fe574e3c`
:::
```solidity
-event DataChanged(bytes32 indexed dataKey, bytes dataValue);
+event OperatorRevoked(address indexed operator, address indexed tokenOwner, bytes32 indexed tokenId, bool notified, bytes operatorNotificationData);
```
-_The following data key/value pair has been changed in the ERC725Y storage: Data key: `dataKey`, data value: `dataValue`._
-
-Emitted when data at a specific `dataKey` was changed to a new value `dataValue`.
+Emitted when `tokenOwner` disables `operator` to transfer or burn `tokenId` on its behalf.
#### Parameters
-| Name | Type | Description |
-| ----------------------- | :-------: | -------------------------------------------- |
-| `dataKey` **`indexed`** | `bytes32` | The data key for which a bytes value is set. |
-| `dataValue` | `bytes` | The value to set for the given data key. |
+| Name | Type | Description |
+| -------------------------- | :-------: | ---------------------------------------------------------------------------------- |
+| `operator` **`indexed`** | `address` | The address revoked from the operator array ([`getOperatorsOf`](#getoperatorsof)). |
+| `tokenOwner` **`indexed`** | `address` | The owner of the `tokenId`. |
+| `tokenId` **`indexed`** | `bytes32` | The tokenId `operator` is revoked from operating on. |
+| `notified` | `bool` | Bool indicating whether the operator has been notified or not |
+| `operatorNotificationData` | `bytes` | The data to notify the operator about via LSP1. |
@@ -1556,32 +1869,30 @@ event OwnershipTransferred(address indexed previousOwner, address indexed newOwn
-### RevokedOperator
+### TokenIdDataChanged
:::note References
-- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#revokedoperator)
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#tokeniddatachanged)
- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol)
-- Event signature: `RevokedOperator(address,address,bytes32,bool,bytes)`
-- Event topic hash: `0x3ee932cea40ebbbfd8577d47156cc17cce8683802c57bbd1fb8c131c6f07af0a`
+- Event signature: `TokenIdDataChanged(bytes32,bytes32,bytes)`
+- Event topic hash: `0xa6e4251f855f750545fe414f120db91c76b88def14d120969e5bb2d3f05debbb`
:::
```solidity
-event RevokedOperator(address indexed operator, address indexed tokenOwner, bytes32 indexed tokenId, bool notified, bytes operatorNotificationData);
+event TokenIdDataChanged(bytes32 indexed tokenId, bytes32 indexed dataKey, bytes dataValue);
```
-Emitted when `tokenOwner` disables `operator` to transfer or burn `tokenId` on its behalf.
+Emitted when setting data for `tokenId`.
#### Parameters
-| Name | Type | Description |
-| -------------------------- | :-------: | ---------------------------------------------------------------------------------- |
-| `operator` **`indexed`** | `address` | The address revoked from the operator array ([`getOperatorsOf`](#getoperatorsof)). |
-| `tokenOwner` **`indexed`** | `address` | The owner of the `tokenId`. |
-| `tokenId` **`indexed`** | `bytes32` | The tokenId `operator` is revoked from operating on. |
-| `notified` | `bool` | Bool indicating whether the operator has been notified or not |
-| `operatorNotificationData` | `bytes` | The data to notify the operator about via LSP1. |
+| Name | Type | Description |
+| ----------------------- | :-------: | -------------------------------------------- |
+| `tokenId` **`indexed`** | `bytes32` | The tokenId which data is set for. |
+| `dataKey` **`indexed`** | `bytes32` | The data key for which a bytes value is set. |
+| `dataValue` | `bytes` | The value to set for the given data key. |
@@ -1766,7 +2077,7 @@ reverts when the contract is called with a function selector not valid (less tha
error LSP4TokenNameNotEditable();
```
-Reverts when trying to edit the data key `LSP4TokenName` after the digital asset contract has been deployed. The `LSP4TokenName` data key is located inside the ERC725Y Data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed.
+Reverts when trying to edit the data key `LSP4TokenName` after the digital asset contract has been deployed / initialized. The `LSP4TokenName` data key is located inside the ERC725Y data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed / initialized.
@@ -1785,7 +2096,53 @@ Reverts when trying to edit the data key `LSP4TokenName` after the digital asset
error LSP4TokenSymbolNotEditable();
```
-Reverts when trying to edit the data key `LSP4TokenSymbol` after the digital asset contract has been deployed. The `LSP4TokenSymbol` data key is located inside the ERC725Y Data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed.
+Reverts when trying to edit the data key `LSP4TokenSymbol` after the digital asset contract has been deployed / initialized. The `LSP4TokenSymbol` data key is located inside the ERC725Y data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed / initialized.
+
+
+
+### LSP4TokenTypeNotEditable
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp4tokentypenoteditable)
+- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol)
+- Error signature: `LSP4TokenTypeNotEditable()`
+- Error hash: `0x4ef6d7fb`
+
+:::
+
+```solidity
+error LSP4TokenTypeNotEditable();
+```
+
+Reverts when trying to edit the data key `LSP4TokenType` after the digital asset contract has been deployed / initialized. The `LSP4TokenType` data key is located inside the ERC725Y data key-value store of the digital asset contract. It can be set only once inside the constructor / initializer when the digital asset contract is being deployed / initialized.
+
+
+
+### LSP8BatchCallFailed
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8batchcallfailed)
+- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol)
+- Error signature: `LSP8BatchCallFailed(uint256)`
+- Error hash: `0x234eb819`
+
+:::
+
+```solidity
+error LSP8BatchCallFailed(uint256 callIndex);
+```
+
+_Batch call failed._
+
+Reverts when a batch call failed.
+
+#### Parameters
+
+| Name | Type | Description |
+| ----------- | :-------: | ----------- |
+| `callIndex` | `uint256` | - |
@@ -2093,22 +2450,60 @@ Reverts when `tokenId` has already been minted.
-### LSP8TokenIdTypeNotEditable
+### LSP8TokenIdFormatNotEditable
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenidformatnoteditable)
+- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol)
+- Error signature: `LSP8TokenIdFormatNotEditable()`
+- Error hash: `0x3664800a`
+
+:::
+
+```solidity
+error LSP8TokenIdFormatNotEditable();
+```
+
+Reverts when trying to edit the data key `LSP8TokenIdFormat` after the identifiable digital asset contract has been deployed. The `LSP8TokenIdFormat` data key is located inside the ERC725Y Data key-value store of the identifiable digital asset contract. It can be set only once inside the constructor/initializer when the identifiable digital asset contract is being deployed.
+
+
+
+### LSP8TokenIdsDataEmptyArray
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenidsdataemptyarray)
+- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol)
+- Error signature: `LSP8TokenIdsDataEmptyArray()`
+- Error hash: `0x80c98305`
+
+:::
+
+```solidity
+error LSP8TokenIdsDataEmptyArray();
+```
+
+Reverts when empty arrays is passed to the function
+
+
+
+### LSP8TokenIdsDataLengthMismatch
:::note References
-- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenidtypenoteditable)
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenidsdatalengthmismatch)
- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol)
-- Error signature: `LSP8TokenIdTypeNotEditable()`
-- Error hash: `0x53bc1122`
+- Error signature: `LSP8TokenIdsDataLengthMismatch()`
+- Error hash: `0x2fa71dfe`
:::
```solidity
-error LSP8TokenIdTypeNotEditable();
+error LSP8TokenIdsDataLengthMismatch();
```
-Reverts when trying to edit the data key `LSP8TokenIdType` after the identifiable digital asset contract has been deployed. The `LSP8TokenIdType` data key is located inside the ERC725Y Data key-value store of the identifiable digital asset contract. It can be set only once inside the constructor/initializer when the identifiable digital asset contract is being deployed.
+Reverts when the length of the token IDs data arrays is not equal
diff --git a/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.md b/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.md
index 12cc1672a9..e5d4d8dd9e 100644
--- a/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.md
+++ b/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.md
@@ -35,7 +35,8 @@ constructor(
string name_,
string symbol_,
address newOwner_,
- uint256 tokenIdType_
+ uint256 lsp4TokenType_,
+ uint256 lsp8TokenIdFormat_
);
```
@@ -43,12 +44,13 @@ _Deploying a `LSP8Mintable` token contract with: token name = `name_`, token sym
#### Parameters
-| Name | Type | Description |
-| -------------- | :-------: | -------------------------------- |
-| `name_` | `string` | The name of the token. |
-| `symbol_` | `string` | The symbol of the token. |
-| `newOwner_` | `address` | The owner of the token contract. |
-| `tokenIdType_` | `uint256` | - |
+| Name | Type | Description |
+| -------------------- | :-------: | ---------------------------------------------------------------------------------------------------- |
+| `name_` | `string` | The name of the token. |
+| `symbol_` | `string` | The symbol of the token. |
+| `newOwner_` | `address` | The owner of the token contract. |
+| `lsp4TokenType_` | `uint256` | The type of token this digital asset contract represents (`0` = Token, `1` = NFT, `2` = Collection). |
+| `lsp8TokenIdFormat_` | `uint256` | The format of tokenIds (= NFTs) that this contract will create. |
@@ -168,6 +170,45 @@ Get the number of token IDs owned by `tokenOwner`.
+### batchCalls
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#batchcalls)
+- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol)
+- Function signature: `batchCalls(bytes[])`
+- Function selector: `0x6963d438`
+
+:::
+
+:::info
+
+It's not possible to send value along the functions call due to the use of `delegatecall`.
+
+:::
+
+```solidity
+function batchCalls(bytes[] data) external nonpayable returns (bytes[] results);
+```
+
+_Executing the following batch of abi-encoded function calls on the contract: `data`._
+
+Allows a caller to batch different function calls in one call. Perform a `delegatecall` on self, to call different functions with preserving the context.
+
+#### Parameters
+
+| Name | Type | Description |
+| ------ | :-------: | -------------------------------------------------------------------- |
+| `data` | `bytes[]` | An array of ABI encoded function calls to be called on the contract. |
+
+#### Returns
+
+| Name | Type | Description |
+| --------- | :-------: | ---------------------------------------------------------------- |
+| `results` | `bytes[]` | An array of abi-encoded data returned by the functions executed. |
+
+
+
### getData
:::note References
@@ -236,6 +277,76 @@ Get in the ERC725Y storage the bytes data stored at multiple data keys `dataKeys
+### getDataBatchForTokenIds
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#getdatabatchfortokenids)
+- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol)
+- Function signature: `getDataBatchForTokenIds(bytes32[],bytes32[])`
+- Function selector: `0x1d26fce6`
+
+:::
+
+```solidity
+function getDataBatchForTokenIds(
+ bytes32[] tokenIds,
+ bytes32[] dataKeys
+) external view returns (bytes[] dataValues);
+```
+
+_Retrieves data in batch for multiple `tokenId` and `dataKey` pairs._
+
+#### Parameters
+
+| Name | Type | Description |
+| ---------- | :---------: | ----------------------------------------------------- |
+| `tokenIds` | `bytes32[]` | An array of token IDs. |
+| `dataKeys` | `bytes32[]` | An array of data keys corresponding to the token IDs. |
+
+#### Returns
+
+| Name | Type | Description |
+| ------------ | :-------: | ----------------------------------------------------------------- |
+| `dataValues` | `bytes[]` | An array of data values for each pair of `tokenId` and `dataKey`. |
+
+
+
+### getDataForTokenId
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#getdatafortokenid)
+- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol)
+- Function signature: `getDataForTokenId(bytes32,bytes32)`
+- Function selector: `0x16e023b3`
+
+:::
+
+```solidity
+function getDataForTokenId(
+ bytes32 tokenId,
+ bytes32 dataKey
+) external view returns (bytes dataValue);
+```
+
+_Retrieves data for a specific `tokenId` and `dataKey`._
+
+#### Parameters
+
+| Name | Type | Description |
+| --------- | :-------: | ---------------------------------- |
+| `tokenId` | `bytes32` | The unique identifier for a token. |
+| `dataKey` | `bytes32` | The key for the data to retrieve. |
+
+#### Returns
+
+| Name | Type | Description |
+| ----------- | :-----: | ----------------------------------------------------------------- |
+| `dataValue` | `bytes` | The data value associated with the given `tokenId` and `dataKey`. |
+
+
+
### getOperatorsOf
:::note References
@@ -514,6 +625,68 @@ Batch data setting function that behaves the same as [`setData`](#setdata) but a
+### setDataBatchForTokenIds
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#setdatabatchfortokenids)
+- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol)
+- Function signature: `setDataBatchForTokenIds(bytes32[],bytes32[],bytes[])`
+- Function selector: `0xbe9f0e6f`
+
+:::
+
+```solidity
+function setDataBatchForTokenIds(
+ bytes32[] tokenIds,
+ bytes32[] dataKeys,
+ bytes[] dataValues
+) external nonpayable;
+```
+
+_Sets data in batch for multiple `tokenId` and `dataKey` pairs._
+
+#### Parameters
+
+| Name | Type | Description |
+| ------------ | :---------: | ----------------------------------------------------- |
+| `tokenIds` | `bytes32[]` | An array of token IDs. |
+| `dataKeys` | `bytes32[]` | An array of data keys corresponding to the token IDs. |
+| `dataValues` | `bytes[]` | An array of values to set for the given data keys. |
+
+
+
+### setDataForTokenId
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#setdatafortokenid)
+- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol)
+- Function signature: `setDataForTokenId(bytes32,bytes32,bytes)`
+- Function selector: `0xd6c1407c`
+
+:::
+
+```solidity
+function setDataForTokenId(
+ bytes32 tokenId,
+ bytes32 dataKey,
+ bytes dataValue
+) external nonpayable;
+```
+
+_Sets data for a specific `tokenId` and `dataKey`._
+
+#### Parameters
+
+| Name | Type | Description |
+| ----------- | :-------: | ---------------------------------------- |
+| `tokenId` | `bytes32` | The unique identifier for a token. |
+| `dataKey` | `bytes32` | The key for the data to set. |
+| `dataValue` | `bytes` | The value to set for the given data key. |
+
+
+
### supportsInterface
:::note References
@@ -787,7 +960,7 @@ mapping(bytes32 => bytes) _store
function _setData(bytes32 dataKey, bytes dataValue) internal nonpayable;
```
-The ERC725Y data key `_LSP8_TOKENID_TYPE_KEY` cannot be changed
+The ERC725Y data key `_LSP8_TOKENID_FORMAT_KEY` cannot be changed
once the identifiable digital asset contract has been deployed.
@@ -1008,6 +1181,64 @@ all the parameters in the calldata packed encoded.
+### \_setDataForTokenId
+
+```solidity
+function _setDataForTokenId(
+ bytes32 tokenId,
+ bytes32 dataKey,
+ bytes dataValue
+) internal nonpayable;
+```
+
+Sets data for a specific `tokenId` and `dataKey` in the ERC725Y storage
+The ERC725Y data key is the hash of the `tokenId` and `dataKey` concatenated
+
+
+
+#### Parameters
+
+| Name | Type | Description |
+| ----------- | :-------: | ---------------------------------------- |
+| `tokenId` | `bytes32` | The unique identifier for a token. |
+| `dataKey` | `bytes32` | The key for the data to set. |
+| `dataValue` | `bytes` | The value to set for the given data key. |
+
+
+
+### \_getDataForTokenId
+
+```solidity
+function _getDataForTokenId(
+ bytes32 tokenId,
+ bytes32 dataKey
+) internal view returns (bytes dataValues);
+```
+
+Retrieves data for a specific `tokenId` and `dataKey` from the ERC725Y storage
+The ERC725Y data key is the hash of the `tokenId` and `dataKey` concatenated
+
+#### Parameters
+
+| Name | Type | Description |
+| --------- | :-------: | ---------------------------------- |
+| `tokenId` | `bytes32` | The unique identifier for a token. |
+| `dataKey` | `bytes32` | The key for the data to retrieve. |
+
+#### Returns
+
+| Name | Type | Description |
+| ------------ | :-----: | ----------------------------------------------------------------- |
+| `dataValues` | `bytes` | The data value associated with the given `tokenId` and `dataKey`. |
+
+
+
### \_beforeTokenTransfer
```solidity
@@ -1058,6 +1289,47 @@ Allows to run custom logic after updating balances, but **before notifiying send
+### \_notifyTokenOperator
+
+```solidity
+function _notifyTokenOperator(
+ address operator,
+ bytes lsp1Data
+) internal nonpayable;
+```
+
+Attempt to notify the operator `operator` about the `tokenId` being authorized.
+This is done by calling its [`universalReceiver`](#universalreceiver) function with the `_TYPEID_LSP8_TOKENOPERATOR` as typeId, if `operator` is a contract that supports the LSP1 interface.
+If `operator` is an EOA or a contract that does not support the LSP1 interface, nothing will happen and no notification will be sent.
+
+#### Parameters
+
+| Name | Type | Description |
+| ---------- | :-------: | ------------------------------------------------------------------------------ |
+| `operator` | `address` | The address to call the [`universalReceiver`](#universalreceiver) function on. |
+| `lsp1Data` | `bytes` | the data to be sent to the `operator` address in the `universalReceiver` call. |
+
+
+
+### \_notifyTokenSender
+
+```solidity
+function _notifyTokenSender(address from, bytes lsp1Data) internal nonpayable;
+```
+
+Attempt to notify the token sender `from` about the `tokenId` being transferred.
+This is done by calling its [`universalReceiver`](#universalreceiver) function with the `_TYPEID_LSP8_TOKENSSENDER` as typeId, if `from` is a contract that supports the LSP1 interface.
+If `from` is an EOA or a contract that does not support the LSP1 interface, nothing will happen and no notification will be sent.
+
+#### Parameters
+
+| Name | Type | Description |
+| ---------- | :-------: | ------------------------------------------------------------------------------ |
+| `from` | `address` | The address to call the [`universalReceiver`](#universalreceiver) function on. |
+| `lsp1Data` | `bytes` | the data to be sent to the `from` address in the `universalReceiver` call. |
+
+
+
### \_notifyTokenReceiver
```solidity
@@ -1068,9 +1340,21 @@ function _notifyTokenReceiver(
) internal nonpayable;
```
-An attempt is made to notify the token receiver about the `tokenId` changing owners
-using LSP1 interface. When force is FALSE the token receiver MUST support LSP1.
-The receiver may revert when the token being sent is not wanted.
+Attempt to notify the token receiver `to` about the `tokenId` being received.
+This is done by calling its [`universalReceiver`](#universalreceiver) function with the `_TYPEID_LSP8_TOKENSRECIPIENT` as typeId, if `to` is a contract that supports the LSP1 interface.
+If `to` is is an EOA or a contract that does not support the LSP1 interface, the behaviour will depend on the `force` boolean flag.
+
+- if `force` is set to `true`, nothing will happen and no notification will be sent.
+
+- if `force` is set to `false, the transaction will revert.
+
+#### Parameters
+
+| Name | Type | Description |
+| ---------- | :-------: | --------------------------------------------------------------------------------------------------- |
+| `to` | `address` | The address to call the [`universalReceiver`](#universalreceiver) function on. |
+| `force` | `bool` | A boolean that describe if transfer to a `to` address that does not support LSP1 is allowed or not. |
+| `lsp1Data` | `bytes` | The data to be sent to the `to` address in the `universalReceiver(...)` call. |
@@ -1134,19 +1418,47 @@ CALL opcode, passing the [`msg.data`](#msg.data) appended with the 20 bytes of t
## Events
-### AuthorizedOperator
+### DataChanged
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#datachanged)
+- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol)
+- Event signature: `DataChanged(bytes32,bytes)`
+- Event topic hash: `0xece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2`
+
+:::
+
+```solidity
+event DataChanged(bytes32 indexed dataKey, bytes dataValue);
+```
+
+_The following data key/value pair has been changed in the ERC725Y storage: Data key: `dataKey`, data value: `dataValue`._
+
+Emitted when data at a specific `dataKey` was changed to a new value `dataValue`.
+
+#### Parameters
+
+| Name | Type | Description |
+| ----------------------- | :-------: | -------------------------------------------- |
+| `dataKey` **`indexed`** | `bytes32` | The data key for which a bytes value is set. |
+| `dataValue` | `bytes` | The value to set for the given data key. |
+
+
+
+### OperatorAuthorizationChanged
:::note References
-- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#authorizedoperator)
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#operatorauthorizationchanged)
- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol)
-- Event signature: `AuthorizedOperator(address,address,bytes32,bytes)`
-- Event topic hash: `0x0052e433f2d4225671bc164dd1cdc9a76044356091f27ad234798bd0cbf08349`
+- Event signature: `OperatorAuthorizationChanged(address,address,bytes32,bytes)`
+- Event topic hash: `0x1b1b58aa2ec0cec2228b2d37124556d41f5a1f7b12f089171f896cc236671215`
:::
```solidity
-event AuthorizedOperator(address indexed operator, address indexed tokenOwner, bytes32 indexed tokenId, bytes operatorNotificationData);
+event OperatorAuthorizationChanged(address indexed operator, address indexed tokenOwner, bytes32 indexed tokenId, bytes operatorNotificationData);
```
Emitted when `tokenOwner` enables `operator` to transfer or burn the `tokenId`.
@@ -1162,31 +1474,32 @@ Emitted when `tokenOwner` enables `operator` to transfer or burn the `tokenId`.
-### DataChanged
+### OperatorRevoked
:::note References
-- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#datachanged)
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#operatorrevoked)
- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol)
-- Event signature: `DataChanged(bytes32,bytes)`
-- Event topic hash: `0xece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2`
+- Event signature: `OperatorRevoked(address,address,bytes32,bool,bytes)`
+- Event topic hash: `0xc78cd419d6136f9f1c1c6aec1d3fae098cffaf8bc86314a8f2685e32fe574e3c`
:::
```solidity
-event DataChanged(bytes32 indexed dataKey, bytes dataValue);
+event OperatorRevoked(address indexed operator, address indexed tokenOwner, bytes32 indexed tokenId, bool notified, bytes operatorNotificationData);
```
-_The following data key/value pair has been changed in the ERC725Y storage: Data key: `dataKey`, data value: `dataValue`._
-
-Emitted when data at a specific `dataKey` was changed to a new value `dataValue`.
+Emitted when `tokenOwner` disables `operator` to transfer or burn `tokenId` on its behalf.
#### Parameters
-| Name | Type | Description |
-| ----------------------- | :-------: | -------------------------------------------- |
-| `dataKey` **`indexed`** | `bytes32` | The data key for which a bytes value is set. |
-| `dataValue` | `bytes` | The value to set for the given data key. |
+| Name | Type | Description |
+| -------------------------- | :-------: | ---------------------------------------------------------------------------------- |
+| `operator` **`indexed`** | `address` | The address revoked from the operator array ([`getOperatorsOf`](#getoperatorsof)). |
+| `tokenOwner` **`indexed`** | `address` | The owner of the `tokenId`. |
+| `tokenId` **`indexed`** | `bytes32` | The tokenId `operator` is revoked from operating on. |
+| `notified` | `bool` | Bool indicating whether the operator has been notified or not |
+| `operatorNotificationData` | `bytes` | The data to notify the operator about via LSP1. |
@@ -1214,32 +1527,30 @@ event OwnershipTransferred(address indexed previousOwner, address indexed newOwn
-### RevokedOperator
+### TokenIdDataChanged
:::note References
-- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#revokedoperator)
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#tokeniddatachanged)
- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol)
-- Event signature: `RevokedOperator(address,address,bytes32,bool,bytes)`
-- Event topic hash: `0x3ee932cea40ebbbfd8577d47156cc17cce8683802c57bbd1fb8c131c6f07af0a`
+- Event signature: `TokenIdDataChanged(bytes32,bytes32,bytes)`
+- Event topic hash: `0xa6e4251f855f750545fe414f120db91c76b88def14d120969e5bb2d3f05debbb`
:::
```solidity
-event RevokedOperator(address indexed operator, address indexed tokenOwner, bytes32 indexed tokenId, bool notified, bytes operatorNotificationData);
+event TokenIdDataChanged(bytes32 indexed tokenId, bytes32 indexed dataKey, bytes dataValue);
```
-Emitted when `tokenOwner` disables `operator` to transfer or burn `tokenId` on its behalf.
+Emitted when setting data for `tokenId`.
#### Parameters
-| Name | Type | Description |
-| -------------------------- | :-------: | ---------------------------------------------------------------------------------- |
-| `operator` **`indexed`** | `address` | The address revoked from the operator array ([`getOperatorsOf`](#getoperatorsof)). |
-| `tokenOwner` **`indexed`** | `address` | The owner of the `tokenId`. |
-| `tokenId` **`indexed`** | `bytes32` | The tokenId `operator` is revoked from operating on. |
-| `notified` | `bool` | Bool indicating whether the operator has been notified or not |
-| `operatorNotificationData` | `bytes` | The data to notify the operator about via LSP1. |
+| Name | Type | Description |
+| ----------------------- | :-------: | -------------------------------------------- |
+| `tokenId` **`indexed`** | `bytes32` | The tokenId which data is set for. |
+| `dataKey` **`indexed`** | `bytes32` | The data key for which a bytes value is set. |
+| `dataValue` | `bytes` | The value to set for the given data key. |
@@ -1397,7 +1708,7 @@ reverts when the contract is called with a function selector not valid (less tha
error LSP4TokenNameNotEditable();
```
-Reverts when trying to edit the data key `LSP4TokenName` after the digital asset contract has been deployed. The `LSP4TokenName` data key is located inside the ERC725Y Data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed.
+Reverts when trying to edit the data key `LSP4TokenName` after the digital asset contract has been deployed / initialized. The `LSP4TokenName` data key is located inside the ERC725Y data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed / initialized.
@@ -1416,7 +1727,53 @@ Reverts when trying to edit the data key `LSP4TokenName` after the digital asset
error LSP4TokenSymbolNotEditable();
```
-Reverts when trying to edit the data key `LSP4TokenSymbol` after the digital asset contract has been deployed. The `LSP4TokenSymbol` data key is located inside the ERC725Y Data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed.
+Reverts when trying to edit the data key `LSP4TokenSymbol` after the digital asset contract has been deployed / initialized. The `LSP4TokenSymbol` data key is located inside the ERC725Y data key-value store of the digital asset contract. It can be set only once inside the constructor/initializer when the digital asset contract is being deployed / initialized.
+
+
+
+### LSP4TokenTypeNotEditable
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp4tokentypenoteditable)
+- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol)
+- Error signature: `LSP4TokenTypeNotEditable()`
+- Error hash: `0x4ef6d7fb`
+
+:::
+
+```solidity
+error LSP4TokenTypeNotEditable();
+```
+
+Reverts when trying to edit the data key `LSP4TokenType` after the digital asset contract has been deployed / initialized. The `LSP4TokenType` data key is located inside the ERC725Y data key-value store of the digital asset contract. It can be set only once inside the constructor / initializer when the digital asset contract is being deployed / initialized.
+
+
+
+### LSP8BatchCallFailed
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8batchcallfailed)
+- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol)
+- Error signature: `LSP8BatchCallFailed(uint256)`
+- Error hash: `0x234eb819`
+
+:::
+
+```solidity
+error LSP8BatchCallFailed(uint256 callIndex);
+```
+
+_Batch call failed._
+
+Reverts when a batch call failed.
+
+#### Parameters
+
+| Name | Type | Description |
+| ----------- | :-------: | ----------- |
+| `callIndex` | `uint256` | - |
@@ -1724,22 +2081,60 @@ Reverts when `tokenId` has already been minted.
-### LSP8TokenIdTypeNotEditable
+### LSP8TokenIdFormatNotEditable
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenidformatnoteditable)
+- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol)
+- Error signature: `LSP8TokenIdFormatNotEditable()`
+- Error hash: `0x3664800a`
+
+:::
+
+```solidity
+error LSP8TokenIdFormatNotEditable();
+```
+
+Reverts when trying to edit the data key `LSP8TokenIdFormat` after the identifiable digital asset contract has been deployed. The `LSP8TokenIdFormat` data key is located inside the ERC725Y Data key-value store of the identifiable digital asset contract. It can be set only once inside the constructor/initializer when the identifiable digital asset contract is being deployed.
+
+
+
+### LSP8TokenIdsDataEmptyArray
+
+:::note References
+
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenidsdataemptyarray)
+- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol)
+- Error signature: `LSP8TokenIdsDataEmptyArray()`
+- Error hash: `0x80c98305`
+
+:::
+
+```solidity
+error LSP8TokenIdsDataEmptyArray();
+```
+
+Reverts when empty arrays is passed to the function
+
+
+
+### LSP8TokenIdsDataLengthMismatch
:::note References
-- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenidtypenoteditable)
+- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenidsdatalengthmismatch)
- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol)
-- Error signature: `LSP8TokenIdTypeNotEditable()`
-- Error hash: `0x53bc1122`
+- Error signature: `LSP8TokenIdsDataLengthMismatch()`
+- Error hash: `0x2fa71dfe`
:::
```solidity
-error LSP8TokenIdTypeNotEditable();
+error LSP8TokenIdsDataLengthMismatch();
```
-Reverts when trying to edit the data key `LSP8TokenIdType` after the identifiable digital asset contract has been deployed. The `LSP8TokenIdType` data key is located inside the ERC725Y Data key-value store of the identifiable digital asset contract. It can be set only once inside the constructor/initializer when the identifiable digital asset contract is being deployed.
+Reverts when the length of the token IDs data arrays is not equal
diff --git a/docs/contracts/contracts/LSP9Vault/LSP9Vault.md b/docs/contracts/contracts/LSP9Vault/LSP9Vault.md
index 9d5972f5c6..da88fdca9e 100644
--- a/docs/contracts/contracts/LSP9Vault/LSP9Vault.md
+++ b/docs/contracts/contracts/LSP9Vault/LSP9Vault.md
@@ -1046,22 +1046,27 @@ mapping(bytes32 => bytes) _store
function _setData(bytes32 dataKey, bytes dataValue) internal nonpayable;
```
-This function overrides the [`ERC725YCore`](#erc725ycore) internal [`_setData`](#_setdata) function to optimize gas usage by emitting only the first 256 bytes of the `dataValue`.
+Write a `dataValue` to the underlying ERC725Y storage, represented as a mapping of
+`bytes32` data keys mapped to their `bytes` data values.
+
+```solidity
+mapping(bytes32 => bytes) _store
+```
**Emitted events:**
-- [`DataChanged`](#datachanged) event with only the first 256 bytes of [`dataValue`](#datavalue).
+- [`DataChanged`](#datachanged) event emitted after a successful `setData` call.
#### Parameters
-| Name | Type | Description |
-| ----------- | :-------: | -------------------------------------- |
-| `dataKey` | `bytes32` | The key to store the data value under. |
-| `dataValue` | `bytes` | The data value to be stored. |
+| Name | Type | Description |
+| ----------- | :-------: | ------------------------------------------------------------------------------- |
+| `dataKey` | `bytes32` | A bytes32 data key to write the associated `bytes` value to the store. |
+| `dataValue` | `bytes` | The `bytes` value to associate with the given `dataKey` in the ERC725Y storage. |
@@ -1196,7 +1201,7 @@ Internal method restricting the call to the owner of the contract and the Univer
:::
```solidity
-event ContractCreated(uint256 indexed operationType, address indexed contractAddress, uint256 indexed value, bytes32 salt);
+event ContractCreated(uint256 indexed operationType, address indexed contractAddress, uint256 value, bytes32 indexed salt);
```
_Deployed new contract at address `contractAddress` and funded with `value` wei (deployed using opcode: `operationType`)._
@@ -1209,8 +1214,8 @@ Emitted when a new contract was created and deployed.
| ------------------------------- | :-------: | ----------------------------------------------------------------------------------------------------------------------------------------- |
| `operationType` **`indexed`** | `uint256` | The opcode used to deploy the contract (`CREATE` or `CREATE2`). |
| `contractAddress` **`indexed`** | `address` | The created contract address. |
-| `value` **`indexed`** | `uint256` | The amount of native tokens (in Wei) sent to fund the created contract on deployment. |
-| `salt` | `bytes32` | The salt used to deterministically deploy the contract (`CREATE2` only). If `CREATE` opcode is used, the salt value will be `bytes32(0)`. |
+| `value` | `uint256` | The amount of native tokens (in Wei) sent to fund the created contract on deployment. |
+| `salt` **`indexed`** | `bytes32` | The salt used to deterministically deploy the contract (`CREATE2` only). If `CREATE` opcode is used, the salt value will be `bytes32(0)`. |
@@ -1254,7 +1259,7 @@ Emitted when data at a specific `dataKey` was changed to a new value `dataValue`
:::
```solidity
-event Executed(uint256 indexed operationType, address indexed target, uint256 indexed value, bytes4 selector);
+event Executed(uint256 indexed operationType, address indexed target, uint256 value, bytes4 indexed selector);
```
_Called address `target` using `operationType` with `value` wei and `data`._
@@ -1267,8 +1272,8 @@ Emitted when calling an address `target` (EOA or contract) with `value`.
| ----------------------------- | :-------: | ---------------------------------------------------------------------------------------------------- |
| `operationType` **`indexed`** | `uint256` | The low-level call opcode used to call the `target` address (`CALL`, `STATICALL` or `DELEGATECALL`). |
| `target` **`indexed`** | `address` | The address to call. `target` will be unused if a contract is created (operation types 1 and 2). |
-| `value` **`indexed`** | `uint256` | The amount of native tokens transferred along the call (in Wei). |
-| `selector` | `bytes4` | The first 4 bytes (= function selector) of the data sent with the call. |
+| `value` | `uint256` | The amount of native tokens transferred along the call (in Wei). |
+| `selector` **`indexed`** | `bytes4` | The first 4 bytes (= function selector) of the data sent with the call. |
diff --git a/docs/contracts/contracts/UniversalProfile.md b/docs/contracts/contracts/UniversalProfile.md
index 5cb62121b7..0af3ab61c4 100644
--- a/docs/contracts/contracts/UniversalProfile.md
+++ b/docs/contracts/contracts/UniversalProfile.md
@@ -1044,22 +1044,27 @@ mapping(bytes32 => bytes) _store
function _setData(bytes32 dataKey, bytes dataValue) internal nonpayable;
```
-This function overrides the [`ERC725YCore`](#erc725ycore) internal [`_setData`](#_setdata) function to optimize gas usage by emitting only the first 256 bytes of the `dataValue`.
+Write a `dataValue` to the underlying ERC725Y storage, represented as a mapping of
+`bytes32` data keys mapped to their `bytes` data values.
+
+```solidity
+mapping(bytes32 => bytes) _store
+```
**Emitted events:**
-- [`DataChanged`](#datachanged) event with only the first 256 bytes of [`dataValue`](#datavalue).
+- [`DataChanged`](#datachanged) event emitted after a successful `setData` call.
#### Parameters
-| Name | Type | Description |
-| ----------- | :-------: | -------------------------------------- |
-| `dataKey` | `bytes32` | The key to store the data value under. |
-| `dataValue` | `bytes` | The data value to be stored. |
+| Name | Type | Description |
+| ----------- | :-------: | ------------------------------------------------------------------------------- |
+| `dataKey` | `bytes32` | A bytes32 data key to write the associated `bytes` value to the store. |
+| `dataValue` | `bytes` | The `bytes` value to associate with the given `dataKey` in the ERC725Y storage. |
@@ -1215,7 +1220,7 @@ function _revertWithLSP20DefaultError(
:::
```solidity
-event ContractCreated(uint256 indexed operationType, address indexed contractAddress, uint256 indexed value, bytes32 salt);
+event ContractCreated(uint256 indexed operationType, address indexed contractAddress, uint256 value, bytes32 indexed salt);
```
_Deployed new contract at address `contractAddress` and funded with `value` wei (deployed using opcode: `operationType`)._
@@ -1228,8 +1233,8 @@ Emitted when a new contract was created and deployed.
| ------------------------------- | :-------: | ----------------------------------------------------------------------------------------------------------------------------------------- |
| `operationType` **`indexed`** | `uint256` | The opcode used to deploy the contract (`CREATE` or `CREATE2`). |
| `contractAddress` **`indexed`** | `address` | The created contract address. |
-| `value` **`indexed`** | `uint256` | The amount of native tokens (in Wei) sent to fund the created contract on deployment. |
-| `salt` | `bytes32` | The salt used to deterministically deploy the contract (`CREATE2` only). If `CREATE` opcode is used, the salt value will be `bytes32(0)`. |
+| `value` | `uint256` | The amount of native tokens (in Wei) sent to fund the created contract on deployment. |
+| `salt` **`indexed`** | `bytes32` | The salt used to deterministically deploy the contract (`CREATE2` only). If `CREATE` opcode is used, the salt value will be `bytes32(0)`. |
@@ -1273,7 +1278,7 @@ Emitted when data at a specific `dataKey` was changed to a new value `dataValue`
:::
```solidity
-event Executed(uint256 indexed operationType, address indexed target, uint256 indexed value, bytes4 selector);
+event Executed(uint256 indexed operationType, address indexed target, uint256 value, bytes4 indexed selector);
```
_Called address `target` using `operationType` with `value` wei and `data`._
@@ -1286,8 +1291,8 @@ Emitted when calling an address `target` (EOA or contract) with `value`.
| ----------------------------- | :-------: | ---------------------------------------------------------------------------------------------------- |
| `operationType` **`indexed`** | `uint256` | The low-level call opcode used to call the `target` address (`CALL`, `STATICALL` or `DELEGATECALL`). |
| `target` **`indexed`** | `address` | The address to call. `target` will be unused if a contract is created (operation types 1 and 2). |
-| `value` **`indexed`** | `uint256` | The amount of native tokens transferred along the call (in Wei). |
-| `selector` | `bytes4` | The first 4 bytes (= function selector) of the data sent with the call. |
+| `value` | `uint256` | The amount of native tokens transferred along the call (in Wei). |
+| `selector` **`indexed`** | `bytes4` | The first 4 bytes (= function selector) of the data sent with the call. |
diff --git a/docs/contracts/overview/KeyManager.md b/docs/contracts/overview/KeyManager.md
index dd1b30df9b..34097e8521 100644
--- a/docs/contracts/overview/KeyManager.md
+++ b/docs/contracts/overview/KeyManager.md
@@ -73,6 +73,30 @@ It can be decoded as:
| First allowed call | **Call Types** - `0x00000002` (Call) **Address** - `0xcafecafecafecafecafecafecafecafecafecafe` **Standard** - `0x24871b3d` (LSP0) **Function** - `0x7f23690c` (`setData(bytes32,bytes)`) | - This allowed call permits the controller to use the function `setData(bytes32,bytes)` in the contract deployed at address `0xcafecafecafecafecafecafecafecafecafecafe`. - When calling that function the operation type has to be `CALL` with no value being sent. - The address `0xcafecafecafecafecafecafecafecafecafecafe` has to return true to `ERC165.supportsInterface(0x24871b3d)`. |
| Second allowed call | **Call Types** - `0x00000003` (Transfervalue & Call) **Address** - `0xcafecafecafecafecafecafecafecafecafecafe` **Standard** - `0x24871b3d` (LSP0) **Function** - `0x44c028fe` (`execute(uint256,address,uint256,bytes)`) | - This allowed call permits the controller to use the function `execute(uint256,address,uint256,bytes)` in the contract deployed at address `0xcafecafecafecafecafecafecafecafecafecafe`. - When calling that function the operation type has to be `CALL`, you can send value as well. - The address `0xcafecafecafecafecafecafecafecafecafecafe` has to return true to `ERC165.supportsInterface(0x24871b3d)`. |
+## Sequential relay calls in the same channel
+
+When executing 3 sequential relay calls with sequential nonces in a single channel (= nonces from the KeyManager retrieved via [`getNonce`](../contracts/LSP6KeyManager/LSP6KeyManager.md#getnonce), keep in mind that **if the first transaction does revert, the next 2 will revert in turns**. That happens because a Key Manager nonce is assigned to each relay call.
+
+E.g.:
+
+- First relay call - nonce is 4
+- Second relay call - nonce is 5
+- Third relay call - nonce is 6
+
+One of the requirements for executing a relay call is that **the latest nonce (for a specific signer) stored on-chain in the Key Manager contract must be the same as the one used when signing the executed relay call**. After each successful execution, the on-chain nonce is incremented.
+
+Given the example above, the on-chain nonce is 4 and we are executing the relay calls.
+
+**If the first relay call pass ✅**
+- First relay call: nonce was 4 -> incremented to 5
+- Second relay call: nonce was 5 -> incremented to 6
+- Third relay call: nonce was 6 -> incremented to 7
+
+**If the first relay call fails ❌**
+- **First relay call reverts ❌** nonce was 4 -> nonce remains 4
+- Second relay call: nonce on-chain is 4 -> nonce used to sign was 5 = reverts ❌ with [`InvalidRelayNonce`](../contracts//LSP6KeyManager/LSP6KeyManager.md#invalidrelaynonce)
+- Third relay call: nonce on-chain is 5 -> nonce used to sign was 6 = reverts ❌ with [`InvalidRelayNonce`](../contracts//LSP6KeyManager/LSP6KeyManager.md#invalidrelaynonce)
+
## Further Reading
- [The Bytecode episode #4 (Youtube) - overview of the Solidity code of the `LSP6KeyManagerCore.sol` by Jean Cavallera](https://www.youtube.com/watch?v=2Sm9LsCPjdE)
\ No newline at end of file
diff --git a/docs/contracts/overview/LSP17ContractExtension.md b/docs/contracts/overview/LSP17ContractExtension.md
index 857917c362..c2698e2971 100644
--- a/docs/contracts/overview/LSP17ContractExtension.md
+++ b/docs/contracts/overview/LSP17ContractExtension.md
@@ -3,6 +3,9 @@ title: Extendable Contracts & Extensions Contracts
sidebar_position: 4
---
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+
# Extendable & Extension Contracts
Contracts that use the LSP17 standard are called **Extendable Contracts**. Meaning they can extend their functionalities by linking **Extension Contracts** to them for specific functionalities that they do not support natively.
@@ -14,6 +17,59 @@ The list of extensions for specific functions are stored under the specific data
You can inherit the [`LSP17Extendable.sol`](../contracts/LSP17ContractExtension/LSP17Extendable.md) contract to create an extendable contract.
+To add an extension handler for a specific function selector, you can set the address of the extension contract under the `LSP17Extension:` data key as follow:
+- 10 bytes (= 20 hexadecimal characters): `LSP17Extension` Mapping data key prefix
+- 20 bytes (= 40 hexadecimal characters): the `bytes4` function selector right padded with 16 zero bytes.
+
+Now whenever a call is made to this function selector on the extendable contract, it will land in its `fallback` function. From there, the calldata will be forwarded to the retrieved extension contract address set above.
+
+
+
+
+
+```solidity
+// SPDX-License-Identifier: MIT
+pragma solidity ~0.8.4;
+
+// libraries
+import {
+ LSP2Utils
+} from "@lukso/lsp-smart-contracts/contracts/LSP2ERC725YJSONSchema/LSP2Utils.sol";
+
+// constants
+import {
+ _LSP17_EXTENSION_PREFIX
+} from "@lukso/lsp-smart-contracts/contracts/LSP17ContractExtension/LSP17Constants.sol";
+
+function generateLSP17ExtensionDataKey(bytes4 extensionSelector) pure returns (bytes32) {
+ return
+ LSP2Utils.generateMappingKey(
+ _LSP17_EXTENSION_PREFIX,
+ bytes20(extensionSelector)
+ );
+}
+```
+
+
+
+
+
+```js
+import { ERC725YDataKeys } from "@lukso/lsp-smart-contracts";
+import { concat, zeroPadBytes } from "ethers"
+
+const extensionSelector = zeroPadBytes("0xcafecafe", 20);
+
+const dataKey = concat([
+ ERC725YDataKeys.LSP17.LSP17ExtensionPrefix,
+ extensionSelector
+]);
+```
+
+
+
+
+
:::warning
Be aware that adding an extension that can `selfdestruct` itself can be dangerous. This can make the [`LSP17Extendable`](../contracts/LSP17ContractExtension/LSP17Extendable.md) contract vulnerable to [metamorphic contracts](https://twitter.com/samczsun/status/1660012956632104960).
diff --git a/docs/learn/dapp-developer/connect-profile.md b/docs/learn/dapp-developer/connect-profile.md
index 9e9aa05c33..4367c17e46 100644
--- a/docs/learn/dapp-developer/connect-profile.md
+++ b/docs/learn/dapp-developer/connect-profile.md
@@ -3,36 +3,26 @@ sidebar_label: '🔗 Connect a Universal Profile'
sidebar_position: 1
---
-# Connect Your Universal Profile to a dApp
+# Connect a Universal Profile
-To allow your users to connect to your dApp with their [Universal Profile](../../standards/universal-profile/introduction.md), they need to:
+To interact with a [Universal Profile](../../standards/universal-profile/introduction.md), your dApp can call the `window.ethereum` object, similar to other wallets. Before a connection can be established, users have to create their Universal Profile by:
-- install the 🖥️ [Universal Profile Browser Extension](/install-up-browser-extension)
-- and ✨ [create a Universal Profile](https://my.universalprofile.cloud)
+1. [Installing the Universal Profile Browser Extension](/install-up-browser-extension)
+2. [Deploying their Universal Profile](https://my.universalprofile.cloud)
:::note Manual Deployment
-Optionally you can ⚒️ [deploy a Universal Profile programmatically](../../learn/expert-guides/universal-profile/create-profile.md) for your users, but then they will not benefit from free transactions through the LUKSO Transaction Relay Service.
+Optionally, you can create new [Universal Profiles](../../standards/universal-profile/introduction.md) by ⚒️ [deploying them programmatically](../../learn/expert-guides/universal-profile/create-profile.md). Please keep in mind that you would also have to deploy your own [Transaction Relay Service](../../standards/relayer-api.md) to allow gasless onboarding, as customly deployed profiles will not receive free monthly transaction quota through the LUKSO Transaction Relay Service.
:::
-:::note
-
-If you expect your users to have MetaMask or other similar browser extensions installed, you can also connect to the Universal Profile Browser Extension directly, using the `window.lukso` object.
-
-:::
-
-