diff --git a/docs/contracts/_interface_ids_table.mdx b/docs/contracts/_interface_ids_table.mdx
index b5de77d4ad..afbc03a90a 100644
--- a/docs/contracts/_interface_ids_table.mdx
+++ b/docs/contracts/_interface_ids_table.mdx
@@ -4,9 +4,9 @@
| **ERC1271** | `0x1626ba7e` | Standard Signature Validation Method for Contracts. |
| **ERC725X** | `0x7545acac` | General executor. |
| **ERC725Y** | `0x629aa694` | General Data key-value store. |
-| **LSP0ERC725Account** | `0x3e89ad98` | Interface of the LSP0 - ERC725Account standard, an account based smart contract that represents an identity on-chain. |
+| **LSP0ERC725Account** | `0x24871b3d` | Interface of the [LSP-0-ERC725Account] standard, an account based smart contract that represents an identity on-chain. |
| **LSP1UniversalReceiver** | `0x6bb56a14` | Interface of the LSP1 - Universal Receiver standard, an entry function for a contract to receive arbitrary information. |
-| **LSP6KeyManager** | `0x38bb3cdb` | Interface of the LSP6 - Key Manager standard, a contract acting as a controller of an ERC725 Account using predfined permissions. |
+| **LSP6KeyManager** | `0x627ca5d3` | Interface of the LSP6 - Key Manager standard, a contract acting as a controller of an ERC725 Account using predfined permissions. |
| **LSP7DigitalAsset** | `0xda1f85e4` | Interface of the LSP7 - Digital Asset standard, a fungible digital asset. |
| **LSP8IdentifiableDigitalAsset** | `0x622e7a01` | 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. |
@@ -16,5 +16,4 @@
| **LSP17Extension** | `0xcee78b40` | Module to create a contract that can act as an extension. |
| **LSP20CallVerification** | `0x1a0eb6a5` | Implementation of a contract calling the verification functions according to LSP20 - Call Verification standard. |
| **LSP20CallVerifier** | `0x480c0ec2` | Interface for the LSP20 Call Verification standard, a set of functions intended to perform verifications on behalf of another contract. |
-
-[eip173]: https://eips.ethereum.org/EIPS/eip-173
+| **LSP25ExecuteRelayCall** | `0x5ac79908` | |
diff --git a/docs/contracts/_links.md b/docs/contracts/_links.md
index 6d27ef70ba..42dca5ef52 100644
--- a/docs/contracts/_links.md
+++ b/docs/contracts/_links.md
@@ -1,3 +1,4 @@
+
diff --git a/docs/contracts/contracts/ERC725/ERC725.md b/docs/contracts/contracts/ERC725/ERC725.md
index 6baa9353e7..13ee244734 100644
--- a/docs/contracts/contracts/ERC725/ERC725.md
+++ b/docs/contracts/contracts/ERC725/ERC725.md
@@ -1,8 +1,16 @@
+
+
+
# ERC725
-:::info Solidity contract
+:::info Standard Specifications
+
+[`ERC-725`](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-725.md)
+
+:::
+:::info Solidity implementation
-[`ERC725.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/ERC725)
+[`ERC725.sol`](https://github.com/ERC725Alliance/ERC725/blob/main/implementations/contracts/ERC725.sol)
:::
@@ -10,14 +18,17 @@
Bundle ERC725X and ERC725Y together into one smart contract. This implementation does not have by default a `receive() external payable {}` or `fallback() external payable {}` function.
-## Methods
+## Public Methods
+
+Public methods are accessible externally from users, allowing interaction with this function from dApps or other smart contracts.
+When marked as 'public', a method can be called both externally and internally, on the other hand, when marked as 'external', a method can only be called externally.
### constructor
-:::note Links
+:::note References
-- Specification details in [**LSP-725-undefined**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-725-undefined.md#constructor)
-- Solidity implementation in [**ERC725**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/ERC725)
+- Specification details: [**ERC-725**](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-725.md#constructor)
+- Solidity implementation: [`ERC725.sol`](https://github.com/ERC725Alliance/ERC725/blob/main/implementations/contracts/ERC725.sol)
:::
@@ -43,12 +54,14 @@ Deploy a new ERC725 contract with the provided `initialOwner` as the contract [`
| -------------- | :-------: | -------------------------- |
| `initialOwner` | `address` | the owner of the contract. |
+
+
### execute
-:::note Links
+:::note References
-- Specification details in [**LSP-725-undefined**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-725-undefined.md#execute)
-- Solidity implementation in [**ERC725**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/ERC725)
+- Specification details: [**ERC-725**](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-725.md#execute)
+- Solidity implementation: [`ERC725.sol`](https://github.com/ERC725Alliance/ERC725/blob/main/implementations/contracts/ERC725.sol)
- Function signature: `execute(uint256,address,uint256,bytes)`
- Function selector: `0x44c028fe`
@@ -108,12 +121,14 @@ Generic executor function to:
| ---- | :-----: | ----------- |
| `0` | `bytes` | - |
+
+
### executeBatch
-:::note Links
+:::note References
-- Specification details in [**LSP-725-undefined**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-725-undefined.md#executebatch)
-- Solidity implementation in [**ERC725**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/ERC725)
+- Specification details: [**ERC-725**](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-725.md#executebatch)
+- Solidity implementation: [`ERC725.sol`](https://github.com/ERC725Alliance/ERC725/blob/main/implementations/contracts/ERC725.sol)
- Function signature: `executeBatch(uint256[],address[],uint256[],bytes[])`
- Function selector: `0x31858452`
@@ -166,12 +181,14 @@ Batch executor function that behaves the same as [`execute`](#execute) but allow
| ---- | :-------: | ----------- |
| `0` | `bytes[]` | - |
+
+
### getData
-:::note Links
+:::note References
-- Specification details in [**LSP-725-undefined**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-725-undefined.md#getdata)
-- Solidity implementation in [**ERC725**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/ERC725)
+- Specification details: [**ERC-725**](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-725.md#getdata)
+- Solidity implementation: [`ERC725.sol`](https://github.com/ERC725Alliance/ERC725/blob/main/implementations/contracts/ERC725.sol)
- Function signature: `getData(bytes32)`
- Function selector: `0x54f6127f`
@@ -197,12 +214,14 @@ Get in the ERC725Y storage the bytes data stored at a specific data key `dataKey
| ----------- | :-----: | ---------------------------------------------------- |
| `dataValue` | `bytes` | The bytes value stored under the specified data key. |
+
+
### getDataBatch
-:::note Links
+:::note References
-- Specification details in [**LSP-725-undefined**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-725-undefined.md#getdatabatch)
-- Solidity implementation in [**ERC725**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/ERC725)
+- Specification details: [**ERC-725**](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-725.md#getdatabatch)
+- Solidity implementation: [`ERC725.sol`](https://github.com/ERC725Alliance/ERC725/blob/main/implementations/contracts/ERC725.sol)
- Function signature: `getDataBatch(bytes32[])`
- Function selector: `0xdedff9c6`
@@ -230,12 +249,14 @@ Get in the ERC725Y storage the bytes data stored at multiple data keys `dataKeys
| ------------ | :-------: | ----------------------------------------- |
| `dataValues` | `bytes[]` | The array of data stored at multiple keys |
+
+
### owner
-:::note Links
+:::note References
-- Specification details in [**LSP-725-undefined**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-725-undefined.md#owner)
-- Solidity implementation in [**ERC725**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/ERC725)
+- Specification details: [**ERC-725**](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-725.md#owner)
+- Solidity implementation: [`ERC725.sol`](https://github.com/ERC725Alliance/ERC725/blob/main/implementations/contracts/ERC725.sol)
- Function signature: `owner()`
- Function selector: `0x8da5cb5b`
@@ -253,12 +274,14 @@ Returns the address of the current owner.
| ---- | :-------: | ----------- |
| `0` | `address` | - |
+
+
### renounceOwnership
-:::note Links
+:::note References
-- Specification details in [**LSP-725-undefined**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-725-undefined.md#renounceownership)
-- Solidity implementation in [**ERC725**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/ERC725)
+- Specification details: [**ERC-725**](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-725.md#renounceownership)
+- Solidity implementation: [`ERC725.sol`](https://github.com/ERC725Alliance/ERC725/blob/main/implementations/contracts/ERC725.sol)
- Function signature: `renounceOwnership()`
- Function selector: `0x715018a6`
@@ -270,12 +293,14 @@ function renounceOwnership() external nonpayable;
Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.
+
+
### setData
-:::note Links
+:::note References
-- Specification details in [**LSP-725-undefined**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-725-undefined.md#setdata)
-- Solidity implementation in [**ERC725**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/ERC725)
+- Specification details: [**ERC-725**](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-725.md#setdata)
+- Solidity implementation: [`ERC725.sol`](https://github.com/ERC725Alliance/ERC725/blob/main/implementations/contracts/ERC725.sol)
- Function signature: `setData(bytes32,bytes)`
- Function selector: `0x7f23690c`
@@ -318,12 +343,14 @@ Sets a single bytes value `dataValue` in the ERC725Y storage for a specific data
| `dataKey` | `bytes32` | The data key for which to set a new value. |
| `dataValue` | `bytes` | The new bytes value to set. |
+
+
### setDataBatch
-:::note Links
+:::note References
-- Specification details in [**LSP-725-undefined**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-725-undefined.md#setdatabatch)
-- Solidity implementation in [**ERC725**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/ERC725)
+- Specification details: [**ERC-725**](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-725.md#setdatabatch)
+- Solidity implementation: [`ERC725.sol`](https://github.com/ERC725Alliance/ERC725/blob/main/implementations/contracts/ERC725.sol)
- Function signature: `setDataBatch(bytes32[],bytes[])`
- Function selector: `0x97902421`
@@ -366,12 +393,14 @@ Batch data setting function that behaves the same as [`setData`](#setdata) but a
| `dataKeys` | `bytes32[]` | An array of data keys to set bytes values for. |
| `dataValues` | `bytes[]` | An array of bytes values to set for each `dataKeys`. |
+
+
### supportsInterface
-:::note Links
+:::note References
-- Specification details in [**LSP-725-undefined**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-725-undefined.md#supportsinterface)
-- Solidity implementation in [**ERC725**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/ERC725)
+- Specification details: [**ERC-725**](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-725.md#supportsinterface)
+- Solidity implementation: [`ERC725.sol`](https://github.com/ERC725Alliance/ERC725/blob/main/implementations/contracts/ERC725.sol)
- Function signature: `supportsInterface(bytes4)`
- Function selector: `0x01ffc9a7`
@@ -395,12 +424,14 @@ See [`IERC165-supportsInterface`](#ierc165-supportsinterface).
| ---- | :----: | ----------- |
| `0` | `bool` | - |
+
+
### transferOwnership
-:::note Links
+:::note References
-- Specification details in [**LSP-725-undefined**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-725-undefined.md#transferownership)
-- Solidity implementation in [**ERC725**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/ERC725)
+- Specification details: [**ERC-725**](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-725.md#transferownership)
+- Solidity implementation: [`ERC725.sol`](https://github.com/ERC725Alliance/ERC725/blob/main/implementations/contracts/ERC725.sol)
- Function signature: `transferOwnership(address)`
- Function selector: `0xf2fde38b`
@@ -418,18 +449,264 @@ Transfers ownership of the contract to a new account (`newOwner`). Can only be c
| ---------- | :-------: | ----------- |
| `newOwner` | `address` | - |
----
+
+
+## Internal Methods
+
+Any method labeled as `internal` serves as utility function within the contract. They can be used when writing solidity contracts that inherit from this contract. These methods can be extended or modified by overriding their internal behavior to suit specific needs.
+
+Internal functions cannot be called externally, whether from other smart contracts, dApp interfaces, or backend services. Their restricted accessibility ensures that they remain exclusively available within the context of the current contract, promoting controlled and encapsulated usage of these internal utilities.
+
+### \_checkOwner
+
+```solidity
+function _checkOwner() internal view;
+```
+
+Throws if the sender is not the owner.
+
+
+
+### \_setOwner
+
+```solidity
+function _setOwner(address newOwner) internal nonpayable;
+```
+
+Changes the owner if `newOwner` and oldOwner are different
+This pattern is useful in inheritance.
+
+
+
+### \_execute
+
+```solidity
+function _execute(
+ uint256 operationType,
+ address target,
+ uint256 value,
+ bytes data
+) internal nonpayable returns (bytes);
+```
+
+check the `operationType` provided and perform the associated low-level opcode after checking for requirements (see [`execute`](#execute)).
+
+
+
+### \_executeBatch
+
+```solidity
+function _executeBatch(
+ uint256[] operationsType,
+ address[] targets,
+ uint256[] values,
+ bytes[] datas
+) internal nonpayable returns (bytes[]);
+```
+
+check each `operationType` provided in the batch and perform the associated low-level opcode after checking for requirements (see [`executeBatch`](#executebatch)).
+
+
+
+### \_executeCall
+
+```solidity
+function _executeCall(
+ address target,
+ uint256 value,
+ bytes data
+) internal nonpayable returns (bytes result);
+```
+
+Perform low-level call (operation type = 0)
+
+#### Parameters
+
+| Name | Type | Description |
+| -------- | :-------: | ------------------------------------- |
+| `target` | `address` | The address on which call is executed |
+| `value` | `uint256` | The value to be sent with the call |
+| `data` | `bytes` | The data to be sent with the call |
+
+#### Returns
+
+| Name | Type | Description |
+| -------- | :-----: | ---------------------- |
+| `result` | `bytes` | The data from the call |
+
+
+
+### \_executeStaticCall
+
+```solidity
+function _executeStaticCall(
+ address target,
+ bytes data
+) internal nonpayable returns (bytes result);
+```
+
+Perform low-level staticcall (operation type = 3)
+
+#### Parameters
+
+| Name | Type | Description |
+| -------- | :-------: | ------------------------------------------- |
+| `target` | `address` | The address on which staticcall is executed |
+| `data` | `bytes` | The data to be sent with the staticcall |
+
+#### Returns
+
+| Name | Type | Description |
+| -------- | :-----: | ------------------------------------- |
+| `result` | `bytes` | The data returned from the staticcall |
+
+
+
+### \_executeDelegateCall
+
+```solidity
+function _executeDelegateCall(
+ address target,
+ bytes data
+) internal nonpayable returns (bytes result);
+```
+
+Perform low-level delegatecall (operation type = 4)
+
+#### Parameters
+
+| Name | Type | Description |
+| -------- | :-------: | --------------------------------------------- |
+| `target` | `address` | The address on which delegatecall is executed |
+| `data` | `bytes` | The data to be sent with the delegatecall |
+
+#### Returns
+
+| Name | Type | Description |
+| -------- | :-----: | --------------------------------------- |
+| `result` | `bytes` | The data returned from the delegatecall |
+
+
+
+### \_deployCreate
+
+```solidity
+function _deployCreate(
+ uint256 value,
+ bytes creationCode
+) internal nonpayable returns (bytes newContract);
+```
+
+Deploy a contract using the `CREATE` opcode (operation type = 1)
+
+#### Parameters
+
+| Name | Type | Description |
+| -------------- | :-------: | ---------------------------------------------------------------------------------- |
+| `value` | `uint256` | The value to be sent to the contract created |
+| `creationCode` | `bytes` | The contract creation bytecode to deploy appended with the constructor argument(s) |
+
+#### Returns
+
+| Name | Type | Description |
+| ------------- | :-----: | -------------------------------------------- |
+| `newContract` | `bytes` | The address of the contract created as bytes |
+
+
+
+### \_deployCreate2
+
+```solidity
+function _deployCreate2(
+ uint256 value,
+ bytes creationCode
+) internal nonpayable returns (bytes newContract);
+```
+
+Deploy a contract using the `CREATE2` opcode (operation type = 2)
+
+#### Parameters
+
+| Name | Type | Description |
+| -------------- | :-------: | ----------------------------------------------------------------------------------------------------- |
+| `value` | `uint256` | The value to be sent to the contract created |
+| `creationCode` | `bytes` | The contract creation bytecode to deploy appended with the constructor argument(s) and a bytes32 salt |
+
+#### Returns
+
+| Name | Type | Description |
+| ------------- | :-----: | -------------------------------------------- |
+| `newContract` | `bytes` | The address of the contract created as bytes |
+
+
+
+### \_getData
+
+```solidity
+function _getData(bytes32 dataKey) internal view returns (bytes dataValue);
+```
+
+Read the value stored under a specific `dataKey` inside the underlying ERC725Y storage,
+represented as a mapping of `bytes32` data keys mapped to their `bytes` data values.
+
+```solidity
+mapping(bytes32 => bytes) _store
+```
+
+#### Parameters
+
+| Name | Type | Description |
+| --------- | :-------: | ----------------------------------------------------------------------- |
+| `dataKey` | `bytes32` | A bytes32 data key to read the associated `bytes` value from the store. |
+
+#### Returns
+
+| Name | Type | Description |
+| ----------- | :-----: | ----------------------------------------------------------------------------- |
+| `dataValue` | `bytes` | The `bytes` value associated with the given `dataKey` in the ERC725Y storage. |
+
+
+
+### \_setData
+
+```solidity
+function _setData(bytes32 dataKey, bytes dataValue) internal nonpayable;
+```
+
+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 emitted after a successful `setData` call. + ++ +#### Parameters + +| 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. | + +
@@ -569,12 +612,14 @@ Renounce ownership of the contract in a 2-step process.+
+ +**Emitted events:** + +- [`DataChanged`](#datachanged) event with only the first 256 bytes of [`dataValue`](#datavalue). + ++ +#### Parameters + +| Name | Type | Description | +| ----------- | :-------: | -------------------------------------- | +| `dataKey` | `bytes32` | The key to store the data value under. | +| `dataValue` | `bytes` | The data value to be stored. | + +
+ +**Requirements:** + +- `newOwner` cannot be the address of the contract itself. + ++ +#### Parameters + +| Name | Type | Description | +| ---------- | :-------: | ------------------------------------- | +| `newOwner` | `address` | The address of the new pending owner. | + +
+ +**Requirements:** + +- `newOwner` cannot be the address of the contract itself. + ++ +#### Parameters + +| Name | Type | Description | +| ---------- | :-------: | ------------------------------------- | +| `newOwner` | `address` | The address of the new pending owner. | + +
-**Emitted events:** +**Requirements:** -- [`ValueReceived`](#valuereceived) when receiving native tokens. -- [`UniversalReceiver`](#universalreceiver) event. +- This contract should be allowed to use the [`setDataBatch(...)`](#setdatabatch) function in order to update the LSP5 and LSP10 Data Keys. +- Cannot accept native tokens#### Parameters -| Name | Type | Description | -| -------- | :-------: | -------------------------- | -| `typeId` | `bytes32` | The type of call received. | -| `_1` | `bytes` | - | +| Name | Type | Description | +| -------- | :-------: | ---------------------------------------------- | +| `typeId` | `bytes32` | Unique identifier for a specific notification. | +| `_1` | `bytes` | - | #### Returns -| Name | Type | Description | -| -------- | :-----: | ----------- | -| `result` | `bytes` | - | +| Name | Type | Description | +| ---- | :-----: | ---------------------------------------- | +| `0` | `bytes` | The result of the reaction for `typeId`. | -## Events +
-**Emitted events:** +**Requirements:** -- [`ValueReceived`](#valuereceived) when receiving native tokens. -- [`UniversalReceiver`](#universalreceiver) event. +- Cannot accept native tokens.#### Parameters -| Name | Type | Description | -| -------- | :-------: | -------------------------- | -| `typeId` | `bytes32` | The type of call received. | -| `_1` | `bytes` | - | +| Name | Type | Description | +| -------- | :-------: | ---------------------------------------------- | +| `typeId` | `bytes32` | Unique identifier for a specific notification. | +| `_1` | `bytes` | - | #### Returns -| Name | Type | Description | -| -------- | :-----: | ----------- | -| `result` | `bytes` | - | +| Name | Type | Description | +| ---- | :-----: | ---------------------------------------- | +| `0` | `bytes` | The result of the reaction for `typeId`. | -## Events +
**Emitted events:** -- VerifiedCall event when the permissions related to `payload` have been verified successfully. +- [`PermissionsVerified`](#permissionsverified) event when the permissions related to `payload` have been verified successfully.@@ -66,20 +79,22 @@ execute a `payload` on the linked [`target`](#target) after having verified the | Name | Type | Description | | --------- | :-----: | ---------------------------------------------------------------- | -| `payload` | `bytes` | the abi-encoded function call to execute on the linked {target}. | +| `payload` | `bytes` | The abi-encoded function call to execute on the linked {target}. | #### Returns | Name | Type | Description | | ---- | :-----: | ---------------------------------------------------------------------------- | -| `0` | `bytes` | the abi-decoded data returned by the function called on the linked {target}. | +| `0` | `bytes` | The abi-decoded data returned by the function called on the linked {target}. | + +
**Emitted events:** -- VerifiedCall event for each permissions related to each `payload` that have been verified successfully. +- [`PermissionsVerified`](#permissionsverified) event for each permissions related to each `payload` that have been verified successfully.@@ -111,16 +132,18 @@ Same as [`execute`](#execute) but execute a batch of payloads (abi-encoded funct #### Returns -| Name | Type | Description | -| ---- | :-------: | ----------------------------------------------------------------------------------------------- | -| `0` | `bytes[]` | An array of abi-decoded of return data returned by the functions called on the linked {target}. | +| Name | Type | Description | +| ---- | :-------: | ------------------------------------------------------------------------------------- | +| `0` | `bytes[]` | An array of abi-decoded data returned by the functions called on the linked {target}. | + +
**Emitted events:** -- [`VerifiedCall`](#verifiedcall) event when the permissions related to `payload` have been verified successfully. +- [`PermissionsVerified`](#permissionsverified) event when the permissions related to `payload` have been verified successfully.#### Parameters -| Name | Type | Description | -| -------------------- | :-------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `signature` | `bytes` | a 65 bytes long signature for a meta transaction according to LSP6. | -| `nonce` | `uint256` | the nonce of the address that signed the calldata (in a specific `_channel`), obtained via {getNonce}. Used to prevent replay attack. | -| `validityTimestamps` | `uint256` | \* Two `uint128` timestamps concatenated together that describes when the relay transaction is valid "from" (left `uint128`) and "until" as a deadline (right `uint128`). | -| `payload` | `bytes` | the abi-encoded function call to execute on the linked {target}. | +| Name | Type | Description | +| -------------------- | :-------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `signature` | `bytes` | A 65 bytes long signature for a meta transaction according to LSP25. | +| `nonce` | `uint256` | The nonce of the address that signed the calldata (in a specific `_channel`), obtained via {getNonce}. Used to prevent replay attack. | +| `validityTimestamps` | `uint256` | Two `uint128` timestamps concatenated together that describes when the relay transaction is valid "from" (left `uint128`) and "until" as a deadline (right `uint128`). | +| `payload` | `bytes` | The abi-encoded function call to execute. | #### Returns -| Name | Type | Description | -| ---- | :-----: | ---------------------------------------------------------------------- | -| `0` | `bytes` | the data being returned by the function called on the linked {target}. | +| Name | Type | Description | +| ---- | :-----: | ------------------------------------------------- | +| `0` | `bytes` | The data being returned by the function executed. | + +
@@ -200,34 +229,39 @@ Same as [`executeRelayCall`](#executerelaycall) but execute a batch of signed ca #### Parameters -| Name | Type | Description | -| -------------------- | :---------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `signatures` | `bytes[]` | An array of 65 bytes long signatures for meta transactions according to LSP6. | -| `nonces` | `uint256[]` | An array of nonces of the addresses that signed the calldata payloads (in specific channels). Obtained via {getNonce}. Used to prevent replay attack. | -| `validityTimestamps` | `uint256[]` | An array of two `uint128` concatenated timestamps that describe when the relay transaction is valid "from" (left `uint128`) and "until" (right `uint128`). | -| `values` | `uint256[]` | An array of amount of native tokens to be transferred for each calldata `payload`. | -| `payloads` | `bytes[]` | An array of abi-encoded function calls to execute successively on the linked {target}. | +| Name | Type | Description | +| -------------------- | :---------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `signatures` | `bytes[]` | An array of 65 bytes long signatures for meta transactions according to LSP25. | +| `nonces` | `uint256[]` | An array of nonces of the addresses that signed the calldata payloads (in specific channels). Obtained via {getNonce}. Used to prevent replay attack. | +| `validityTimestamps` | `uint256[]` | An array of two `uint128` concatenated timestamps that describe when the relay transaction is valid "from" (left `uint128`) and "until" (right `uint128`). | +| `values` | `uint256[]` | An array of amount of native tokens to be transferred for each calldata `payload`. | +| `payloads` | `bytes[]` | An array of abi-encoded function calls to be executed successively. | #### Returns -| Name | Type | Description | -| ---- | :-------: | -------------------------------------------------------------------------------------------- | -| `0` | `bytes[]` | An array of abi-decoded return data returned by the functions called on the linked {target}. | +| Name | Type | Description | +| ---- | :-------: | ---------------------------------------------------------------- | +| `0` | `bytes[]` | An array of abi-decoded data returned by the functions executed. | + ++
### getNonce -:::note Links +:::note References -- Specification details in [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#getnonce) -- Solidity implementation in [**LSP6KeyManager**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/contracts/LSP6KeyManager/LSP6KeyManager.sol) +- Specification details: [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#getnonce) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP6KeyManager/LSP6KeyManager.sol) - Function signature: `getNonce(address,uint128)` - Function selector: `0xb44581d9` ::: -:::info +:::tip Hint + +A signer can choose its channel number arbitrarily. The recommended practice is to: -A signer can choose its channel number arbitrarily. Channel ID = 0 can be used for sequential nonces (transactions that are order dependant), any other channel ID for out-of-order execution (= execution in parallel). +- use `channelId == 0` for transactions for which the ordering of execution matters.abi _Example: you have two transactions A and B, and transaction A must be executed first and complete successfully before transaction B should be executed)._ +- use any other `channelId` number for transactions that you want to be order independant (out-of-order execution, execution _"in parallel"_). \_Example: you have two transactions A and B. You want transaction B to be executed a) without having to wait for transaction A to complete, or b) regardless if transaction A completed successfully or not. ::: @@ -238,29 +272,31 @@ function getNonce( ) external view returns (uint256); ``` -_Get latest nonce for `from` in channel ID: `channelId`._ +_Reading the latest nonce of address `from` in the channel ID `channelId`._ -Get the nonce for a specific controller `from` address that can be used for signing relay transaction. +Get the nonce for a specific `from` address that can be used for signing relay transactions via [`executeRelayCall`](#executerelaycall). #### Parameters | Name | Type | Description | | ----------- | :-------: | -------------------------------------------------------------------------- | -| `from` | `address` | the address of the signer of the transaction. | -| `channelId` | `uint128` | the channel id that the signer wants to use for executing the transaction. | +| `from` | `address` | The address of the signer of the transaction. | +| `channelId` | `uint128` | The channel id that the signer wants to use for executing the transaction. | #### Returns -| Name | Type | Description | -| ---- | :-------: | ------------------------------------------- | -| `0` | `uint256` | the current nonce on a specific `channelId` | +| Name | Type | Description | +| ---- | :-------: | -------------------------------------------- | +| `0` | `uint256` | The current nonce on a specific `channelId`. | + +
### isValidSignature -:::note Links +:::note References -- Specification details in [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#isvalidsignature) -- Solidity implementation in [**LSP6KeyManager**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/contracts/LSP6KeyManager/LSP6KeyManager.sol) +- Specification details: [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#isvalidsignature) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP6KeyManager/LSP6KeyManager.sol) - Function signature: `isValidSignature(bytes32,bytes)` - Function selector: `0x1626ba7e` @@ -288,12 +324,14 @@ Checks if a signature was signed by a controller that has the permission `SIGN`. | ------------ | :------: | ---------------------------------------------------- | | `magicValue` | `bytes4` | `0x1626ba7e` on success, or `0xffffffff` on failure. | +
+ ### lsp20VerifyCall -:::note Links +:::note References -- Specification details in [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#lsp20verifycall) -- Solidity implementation in [**LSP6KeyManager**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/contracts/LSP6KeyManager/LSP6KeyManager.sol) +- Specification details: [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#lsp20verifycall) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP6KeyManager/LSP6KeyManager.sol) - Function signature: `lsp20VerifyCall(address,uint256,bytes)` - Function selector: `0x9bf04b11` @@ -321,12 +359,14 @@ function lsp20VerifyCall( | ---- | :------: | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `0` | `bytes4` | MUST return the first 3 bytes of `lsp20VerifyCall(address,uint256,bytes)` function selector if the call to the function is allowed, concatened with a byte that determines if the lsp20VerifyCallResult function should be called after the original function call. The byte that invoke the lsp20VerifyCallResult function is strictly `0x01`. | +
+ ### lsp20VerifyCallResult -:::note Links +:::note References -- Specification details in [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#,)) -- Solidity implementation in [**LSP6KeyManager**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/contracts/LSP6KeyManager/LSP6KeyManager.sol) +- Specification details: [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#,)) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP6KeyManager/LSP6KeyManager.sol) - Function signature: `,)` - Function selector: `0x9f47dbd3` @@ -352,12 +392,14 @@ function lsp20VerifyCallResult( | ---- | :------: | ---------------------------------------------------------------------------------------------- | | `0` | `bytes4` | MUST return the lsp20VerifyCallResult function selector if the call to the function is allowed | +
+ ### supportsInterface -:::note Links +:::note References -- Specification details in [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#supportsinterface) -- Solidity implementation in [**LSP6KeyManager**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/contracts/LSP6KeyManager/LSP6KeyManager.sol) +- Specification details: [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#supportsinterface) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP6KeyManager/LSP6KeyManager.sol) - Function signature: `supportsInterface(bytes4)` - Function selector: `0x01ffc9a7` @@ -381,12 +423,14 @@ See [`IERC165-supportsInterface`](#ierc165-supportsinterface). | ---- | :----: | ----------- | | `0` | `bool` | - | +
+ ### target -:::note Links +:::note References -- Specification details in [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#target) -- Solidity implementation in [**LSP6KeyManager**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/contracts/LSP6KeyManager/LSP6KeyManager.sol) +- Specification details: [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#target) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP6KeyManager/LSP6KeyManager.sol) - Function signature: `target()` - Function selector: `0xd4b83992` @@ -396,80 +440,800 @@ See [`IERC165-supportsInterface`](#ierc165-supportsinterface). function target() external view returns (address); ``` -Get the address of the contract linked to this Key Manager. +Get The address of the contract linked to this Key Manager. + +#### Returns + +| Name | Type | Description | +| ---- | :-------: | ---------------------------------- | +| `0` | `address` | The address of the linked contract | + +
+ +## Internal Methods + +Any method labeled as `internal` serves as utility function within the contract. They can be used when writing solidity contracts that inherit from this contract. These methods can be extended or modified by overriding their internal behavior to suit specific needs. + +Internal functions cannot be called externally, whether from other smart contracts, dApp interfaces, or backend services. Their restricted accessibility ensures that they remain exclusively available within the context of the current contract, promoting controlled and encapsulated usage of these internal utilities. + +### \_verifyCanSetData + +```solidity +function _verifyCanSetData( + address controlledContract, + address controllerAddress, + bytes32 controllerPermissions, + bytes32 inputDataKey, + bytes inputDataValue +) internal view; +``` + +verify if the `controllerAddress` has the permissions required to set a data key on the ERC725Y storage of the `controlledContract`. + +#### Parameters + +| Name | Type | Description | +| ----------------------- | :-------: | -------------------------------------------------------------- | +| `controlledContract` | `address` | the address of the ERC725Y contract where the data key is set. | +| `controllerAddress` | `address` | the address of the controller who wants to set the data key. | +| `controllerPermissions` | `bytes32` | the permissions of the controller address. | +| `inputDataKey` | `bytes32` | the data key to set on the `controlledContract`. | +| `inputDataValue` | `bytes` | the data value to set for the `inputDataKey`. | + +
+ +### \_verifyCanSetData + +```solidity +function _verifyCanSetData( + address controlledContract, + address controller, + bytes32 permissions, + bytes32[] inputDataKeys, + bytes[] inputDataValues +) internal view; +``` + +verify if the `controllerAddress` has the permissions required to set an array of data keys on the ERC725Y storage of the `controlledContract`. + +#### Parameters + +| Name | Type | Description | +| -------------------- | :---------: | -------------------------------------------------------------- | +| `controlledContract` | `address` | the address of the ERC725Y contract where the data key is set. | +| `controller` | `address` | the address of the controller who wants to set the data key. | +| `permissions` | `bytes32` | the permissions of the controller address. | +| `inputDataKeys` | `bytes32[]` | an array of data keys to set on the `controlledContract`. | +| `inputDataValues` | `bytes[]` | an array of data values to set for the `inputDataKeys`. | + +
+ +### \_getPermissionRequiredToSetDataKey + +```solidity +function _getPermissionRequiredToSetDataKey( + address controlledContract, + bytes32 controllerPermissions, + bytes32 inputDataKey, + bytes inputDataValue +) internal view returns (bytes32); +``` + +retrieve the permission required based on the data key to be set on the `controlledContract`. + +#### Parameters + +| Name | Type | Description | +| ----------------------- | :-------: | ----------------------------------------------------------------------------------------------------------------------- | +| `controlledContract` | `address` | the address of the ERC725Y contract where the data key is verified. | +| `controllerPermissions` | `bytes32` | - | +| `inputDataKey` | `bytes32` | the data key to set on the `controlledContract`. Can be related to LSP6 Permissions, LSP1 Delegate or LSP17 Extensions. | +| `inputDataValue` | `bytes` | the data value to set for the `inputDataKey`. | + +#### Returns + +| Name | Type | Description | +| ---- | :-------: | ------------------------------------------------------------------------------ | +| `0` | `bytes32` | the permission required to set the `inputDataKey` on the `controlledContract`. | + +
+ +### \_getPermissionToSetPermissionsArray + +```solidity +function _getPermissionToSetPermissionsArray( + address controlledContract, + bytes32 inputDataKey, + bytes inputDataValue, + bool hasBothAddControllerAndEditPermissions +) internal view returns (bytes32); +``` + +retrieve the permission required to update the `AddressPermissions[]` array data key defined in LSP6. + +#### Parameters + +| Name | Type | Description | +| ---------------------------------------- | :-------: | ----------------------------------------------------------------------------------------- | +| `controlledContract` | `address` | the address of the ERC725Y contract where the data key is verified. | +| `inputDataKey` | `bytes32` | either `AddressPermissions[]` (array length) or `AddressPermissions[index]` (array index) | +| `inputDataValue` | `bytes` | the updated value for the `inputDataKey`. MUST be: | +| `hasBothAddControllerAndEditPermissions` | `bool` | - | #### Returns | Name | Type | Description | | ---- | :-------: | --------------------------------- | -| `0` | `address` | the address of the linked account | +| `0` | `bytes32` | either ADD or CHANGE PERMISSIONS. | ---- +
-## Events +### \_getPermissionToSetControllerPermissions + +```solidity +function _getPermissionToSetControllerPermissions( + address controlledContract, + bytes32 inputPermissionDataKey +) internal view returns (bytes32); +``` + +retrieve the permission required to set permissions for a controller address. + +#### Parameters + +| Name | Type | Description | +| ------------------------ | :-------: | ------------------------------------------------------------------- | +| `controlledContract` | `address` | the address of the ERC725Y contract where the data key is verified. | +| `inputPermissionDataKey` | `bytes32` | `AddressPermissions:Permissions:`. | + +#### Returns + +| Name | Type | Description | +| ---- | :-------: | --------------------------------- | +| `0` | `bytes32` | either ADD or CHANGE PERMISSIONS. | + +
+ +### \_getPermissionToSetAllowedCalls + +```solidity +function _getPermissionToSetAllowedCalls( + address controlledContract, + bytes32 dataKey, + bytes dataValue, + bool hasBothAddControllerAndEditPermissions +) internal view returns (bytes32); +``` + +retrieve the permission required to set some AllowedCalls for a controller. + +#### Parameters + +| Name | Type | Description | +| ---------------------------------------- | :-------: | ------------------------------------------------------------------------------------------- | +| `controlledContract` | `address` | the address of the ERC725Y contract where the data key is verified. | +| `dataKey` | `bytes32` | `AddressPermissions:AllowedCalls:`. | +| `dataValue` | `bytes` | the updated value for the `dataKey`. MUST be a bytes28[CompactBytesArray] of Allowed Calls. | +| `hasBothAddControllerAndEditPermissions` | `bool` | - | + +#### Returns + +| Name | Type | Description | +| ---- | :-------: | --------------------------------- | +| `0` | `bytes32` | either ADD or CHANGE PERMISSIONS. | + +
+ +### \_getPermissionToSetAllowedERC725YDataKeys + +```solidity +function _getPermissionToSetAllowedERC725YDataKeys( + address controlledContract, + bytes32 dataKey, + bytes dataValue, + bool hasBothAddControllerAndEditPermissions +) internal view returns (bytes32); +``` + +retrieve the permission required to set some Allowed ERC725Y Data Keys for a controller. + +#### Parameters + +| Name | Type | Description | +| ---------------------------------------- | :-------: | ----------------------------------------------------------------------------------------------------- | +| `controlledContract` | `address` | the address of the ERC725Y contract where the data key is verified. | +| `dataKey` | `bytes32` | or `AddressPermissions:AllowedERC725YDataKeys:`. | +| `dataValue` | `bytes` | the updated value for the `dataKey`. MUST be a bytes[CompactBytesArray] of Allowed ERC725Y Data Keys. | +| `hasBothAddControllerAndEditPermissions` | `bool` | - | + +#### Returns + +| Name | Type | Description | +| ---- | :-------: | --------------------------------- | +| `0` | `bytes32` | either ADD or CHANGE PERMISSIONS. | + +
+ +### \_getPermissionToSetLSP1Delegate + +```solidity +function _getPermissionToSetLSP1Delegate( + address controlledContract, + bytes32 lsp1DelegateDataKey +) internal view returns (bytes32); +``` + +retrieve the permission required to either add or change the address +of a LSP1 Universal Receiver Delegate stored under a specific LSP1 data key. + +#### Parameters + +| Name | Type | Description | +| --------------------- | :-------: | -------------------------------------------------------------------- | +| `controlledContract` | `address` | the address of the ERC725Y contract where the data key is verified. | +| `lsp1DelegateDataKey` | `bytes32` | either the data key for the default `LSP1UniversalReceiverDelegate`, | + +#### Returns + +| Name | Type | Description | +| ---- | :-------: | ----------------------------------------------- | +| `0` | `bytes32` | either ADD or CHANGE UNIVERSALRECEIVERDELEGATE. | + +
+ +### \_getPermissionToSetLSP17Extension + +```solidity +function _getPermissionToSetLSP17Extension( + address controlledContract, + bytes32 lsp17ExtensionDataKey +) internal view returns (bytes32); +``` + +Verify if `controller` has the required permissions to either add or change the address +of an LSP0 Extension stored under a specific LSP17Extension data key + +#### Parameters + +| Name | Type | Description | +| ----------------------- | :-------: | ------------------------------------------------------------------- | +| `controlledContract` | `address` | the address of the ERC725Y contract where the data key is verified. | +| `lsp17ExtensionDataKey` | `bytes32` | the dataKey to set with `_LSP17_EXTENSION_PREFIX` as prefix. | + +
+ +### \_verifyAllowedERC725YSingleKey + +```solidity +function _verifyAllowedERC725YSingleKey( + address controllerAddress, + bytes32 inputDataKey, + bytes allowedERC725YDataKeysCompacted +) internal pure; +``` + +Verify if the `inputKey` is present in the list of `allowedERC725KeysCompacted` for the `controllerAddress`. + +#### Parameters + +| Name | Type | Description | +| --------------------------------- | :-------: | ----------------------------------------------------------------------------------------- | +| `controllerAddress` | `address` | the address of the controller. | +| `inputDataKey` | `bytes32` | the data key to verify against the allowed ERC725Y Data Keys for the `controllerAddress`. | +| `allowedERC725YDataKeysCompacted` | `bytes` | a CompactBytesArray of allowed ERC725Y Data Keys for the `controllerAddress`. | + +
+ +### \_verifyAllowedERC725YDataKeys + +```solidity +function _verifyAllowedERC725YDataKeys( + address controllerAddress, + bytes32[] inputDataKeys, + bytes allowedERC725YDataKeysCompacted, + bool[] validatedInputKeysList, + uint256 allowedDataKeysFound +) internal pure; +``` + +Verify if all the `inputDataKeys` are present in the list of `allowedERC725KeysCompacted` of the `controllerAddress`. + +#### Parameters + +| Name | Type | Description | +| --------------------------------- | :---------: | ---------------------------------------------------------------------------------------------------------------------------- | +| `controllerAddress` | `address` | the address of the controller. | +| `inputDataKeys` | `bytes32[]` | the data keys to verify against the allowed ERC725Y Data Keys of the `controllerAddress`. | +| `allowedERC725YDataKeysCompacted` | `bytes` | a CompactBytesArray of allowed ERC725Y Data Keys of the `controllerAddress`. | +| `validatedInputKeysList` | `bool[]` | an array of booleans to store the result of the verification of each data keys checked. | +| `allowedDataKeysFound` | `uint256` | the number of data keys that were previously validated for other permissions like `ADDCONTROLLER`, `EDITPERMISSIONS`, etc... | + +
+ +### \_requirePermissions + +```solidity +function _requirePermissions( + address controller, + bytes32 addressPermissions, + bytes32 permissionRequired +) internal pure; +``` + +Check if the `controller` has the `permissionRequired` among its permission listed in `controllerPermissions` +If not, this function will revert with the error `NotAuthorised` and the name of the permission missing by the controller. + +#### Parameters + +| Name | Type | Description | +| -------------------- | :-------: | --------------------------------- | +| `controller` | `address` | the caller address | +| `addressPermissions` | `bytes32` | the caller's permissions BitArray | +| `permissionRequired` | `bytes32` | the required permission | + +
+ +### \_verifyCanExecute + +```solidity +function _verifyCanExecute( + address controlledContract, + address controller, + bytes32 permissions, + uint256 operationType, + address to, + uint256 value, + bytes data +) internal view; +``` + +verify if `controllerAddress` has the required permissions to interact with other addresses using the controlledContract. + +#### Parameters + +| Name | Type | Description | +| -------------------- | :-------: | -------------------------------------------------------------------------------------------------------- | +| `controlledContract` | `address` | the address of the ERC725 contract where the payload is executed and where the permissions are verified. | +| `controller` | `address` | the address who want to run the execute function on the ERC725Account. | +| `permissions` | `bytes32` | the permissions of the controller address. | +| `operationType` | `uint256` | - | +| `to` | `address` | - | +| `value` | `uint256` | - | +| `data` | `bytes` | - | + +
+ +### \_verifyCanDeployContract + +```solidity +function _verifyCanDeployContract( + address controller, + bytes32 permissions, + bool isFundingContract +) internal view; +``` + +
+ +### \_verifyCanStaticCall + +```solidity +function _verifyCanStaticCall( + address controlledContract, + address controller, + bytes32 permissions, + address to, + uint256 value, + bytes data +) internal view; +``` + +
+ +### \_verifyCanCall + +```solidity +function _verifyCanCall( + address controlledContract, + address controller, + bytes32 permissions, + address to, + uint256 value, + bytes data +) internal view; +``` + +
+ +### \_verifyAllowedCall + +```solidity +function _verifyAllowedCall( + address controlledContract, + address controllerAddress, + uint256 operationType, + address to, + uint256 value, + bytes data +) internal view; +``` + +
+ +### \_extractCallType + +```solidity +function _extractCallType( + uint256 operationType, + uint256 value, + bool isEmptyCall +) internal pure returns (bytes4 requiredCallTypes); +``` + +extract the bytes4 representation of a single bit for the type of call according to the `operationType` + +#### Parameters + +| Name | Type | Description | +| --------------- | :-------: | -------------------------------------------- | +| `operationType` | `uint256` | 0 = CALL, 3 = STATICCALL or 3 = DELEGATECALL | +| `value` | `uint256` | - | +| `isEmptyCall` | `bool` | - | + +#### Returns + +| Name | Type | Description | +| ------------------- | :------: | --------------------------------------------------------- | +| `requiredCallTypes` | `bytes4` | a bytes4 value containing a single 1 bit for the callType | + +
+ +### \_isAllowedAddress + +```solidity +function _isAllowedAddress( + bytes allowedCall, + address to +) internal pure returns (bool); +``` + +
+ +### \_isAllowedStandard + +```solidity +function _isAllowedStandard( + bytes allowedCall, + address to +) internal view returns (bool); +``` + +
+ +### \_isAllowedFunction + +```solidity +function _isAllowedFunction( + bytes allowedCall, + bytes4 requiredFunction +) internal pure returns (bool); +``` + +
+ +### \_isAllowedCallType + +```solidity +function _isAllowedCallType( + bytes allowedCall, + bytes4 requiredCallTypes +) internal pure returns (bool); +``` + +
+ +### \_verifyOwnershipPermissions + +```solidity +function _verifyOwnershipPermissions( + address controllerAddress, + bytes32 controllerPermissions +) internal pure; +``` + +
+ +### \_getNonce + +```solidity +function _getNonce( + address from, + uint128 channelId +) internal view returns (uint256 idx); +``` + +Read the nonce for a `from` address on a specific `channelId`. +This will return an `idx`, which is the concatenation of two `uint128` as follow: + +1. the `channelId` where the nonce was queried for. + +2. the actual nonce of the given `channelId`. + For example, if on `channelId` number `5`, the latest nonce is `1`, the `idx` returned by this function will be: + +``` +// in decimals = 1701411834604692317316873037158841057281 +idx = 0x0000000000000000000000000000000500000000000000000000000000000001 +``` + +This idx can be described as follow: + +``` + channelId => 5 nonce in this channel => 1 + v------------------------------v-------------------------------v +0x0000000000000000000000000000000500000000000000000000000000000001 +``` + +#### Parameters + +| Name | Type | Description | +| ----------- | :-------: | ------------------------------------------ | +| `from` | `address` | The address to read the nonce for. | +| `channelId` | `uint128` | The channel in which to extract the nonce. | + +#### Returns + +| Name | Type | Description | +| ----- | :-------: | ---------------------------------------------------------------------------------------------------------------------- | +| `idx` | `uint256` | The idx composed of two `uint128`: the channelId + nonce in channel concatenated together in a single `uint256` value. | + +
+ +### \_recoverSignerFromLSP25Signature + +```solidity +function _recoverSignerFromLSP25Signature( + bytes signature, + uint256 nonce, + uint256 validityTimestamps, + uint256 msgValue, + bytes callData +) internal view returns (address); +``` + +Recover the address of the signer that generated a `signature` using the parameters provided `nonce`, `validityTimestamps`, `msgValue` and `callData`. +The address of the signer will be recovered using the LSP25 signature format. + +#### Parameters + +| Name | Type | Description | +| -------------------- | :-------: | ----------------------------------------------------------------------------------------------------------------------- | +| `signature` | `bytes` | A 65 bytes long signature generated according to the signature format specified in the LSP25 standard. | +| `nonce` | `uint256` | The nonce that the signer used to generate the `signature`. | +| `validityTimestamps` | `uint256` | The validity timestamp that the signer used to generate the signature (See {\_verifyValidityTimestamps} to learn more). | +| `msgValue` | `uint256` | The amount of native tokens intended to be sent for the relay transaction. | +| `callData` | `bytes` | The calldata to execute as a relay transaction that the signer signed for. | + +#### Returns + +| Name | Type | Description | +| ---- | :-------: | -------------------------------------------------------- | +| `0` | `address` | The address that signed, recovered from the `signature`. | + +
+ +### \_verifyValidityTimestamps + +```solidity +function _verifyValidityTimestamps(uint256 validityTimestamps) internal view; +``` + +Verify that the current timestamp is within the date and time range provided by `validityTimestamps`. + +#### Parameters + +| Name | Type | Description | +| -------------------- | :-------: | -------------------------------------------------------------------------------------------------------------------------------------- | +| `validityTimestamps` | `uint256` | Two `uint128` concatenated together, where the left-most `uint128` represent the timestamp from which the transaction can be executed, | + +
+ +### \_isValidNonce + +```solidity +function _isValidNonce(address from, uint256 idx) internal view returns (bool); +``` + +Verify that the nonce `_idx` for `_from` (obtained via [`getNonce`](#getnonce)) is valid in its channel ID. +The "idx" is a 256bits (unsigned) integer, where: + +- the 128 leftmost bits = channelId + +- and the 128 rightmost bits = nonce within the channel + +#### Parameters + +| Name | Type | Description | +| ------ | :-------: | ---------------------------------------------------------------------------- | +| `from` | `address` | The signer's address. | +| `idx` | `uint256` | The concatenation of the `channelId` + `nonce` within a specific channel ID. | + +#### Returns + +| Name | Type | Description | +| ---- | :----: | ------------------------------------------------------------------------ | +| `0` | `bool` | true if the nonce is the latest nonce for the `signer`, false otherwise. | + +
+ +### \_execute + +```solidity +function _execute( + uint256 msgValue, + bytes payload +) internal nonpayable returns (bytes); +``` -### VerifiedCall +
-:::note Links +### \_executeRelayCall -- Specification details in [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#verifiedcall) -- Solidity implementation in [**LSP6KeyManager**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/contracts/LSP6KeyManager/LSP6KeyManager.sol) -- Event signature: `VerifiedCall(address,uint256,bytes4)` -- Event hash: `0xa54458b75709e42f79700ffb6cfc57c7e224d8a77a52c457ee7ecb8e22636280` +:::caution Warning + +Be aware that this function can also throw an error if the `callData` was signed incorrectly (not conforming to the signature format defined in the LSP25 standard). +This is because the contract cannot distinguish if the data is signed correctly or not. Instead, it will recover an incorrect signer address from the signature +and throw an {InvalidRelayNonce} error with the incorrect signer address as the first parameter. ::: ```solidity -event VerifiedCall(address indexed signer, uint256 indexed value, bytes4 indexed selector); +function _executeRelayCall( + bytes signature, + uint256 nonce, + uint256 validityTimestamps, + uint256 msgValue, + bytes payload +) internal nonpayable returns (bytes); ``` -Emitted when the LSP6KeyManager contract verified the permissions of the `signer` successfully. +Validate that the `nonce` given for the `signature` signed and the `payload` to execute is valid +and conform to the signature format according to the LSP25 standard. #### Parameters -| Name | Type | Description | -| ------------------------ | :-------: | -------------------------------------------------------------------------------------------------------------------------------------------------- | -| `signer` **`indexed`** | `address` | the address of the controller that executed the calldata payload (either directly via {execute} or via meta transaction using {executeRelayCall}). | -| `value` **`indexed`** | `uint256` | the amount of native token to be transferred in the calldata payload. | -| `selector` **`indexed`** | `bytes4` | the bytes4 function of the function that was executed on the linked {target} | +| Name | Type | Description | +| -------------------- | :-------: | -------------------------------------------------------------------------------------------------------------------------------------- | +| `signature` | `bytes` | A valid signature for a signer, generated according to the signature format specified in the LSP25 standard. | +| `nonce` | `uint256` | The nonce that the signer used to generate the `signature`. | +| `validityTimestamps` | `uint256` | Two `uint128` concatenated together, where the left-most `uint128` represent the timestamp from which the transaction can be executed, | +| `msgValue` | `uint256` | - | +| `payload` | `bytes` | The abi-encoded function call to execute. | ---- +
-## Errors +### \_executePayload + +```solidity +function _executePayload( + uint256 msgValue, + bytes payload +) internal nonpayable returns (bytes); +``` + +_Execute the `payload` passed to `execute(...)` or `executeRelayCall(...)`_ + +#### Parameters + +| Name | Type | Description | +| ---------- | :-------: | ------------------------------------------------------------------ | +| `msgValue` | `uint256` | - | +| `payload` | `bytes` | The abi-encoded function call to execute on the {target} contract. | + +#### Returns + +| Name | Type | Description | +| ---- | :-----: | ------------------------------------------------------------------------- | +| `0` | `bytes` | bytes The data returned by the call made to the linked {target} contract. | + +
+ +### \_verifyPermissions + +```solidity +function _verifyPermissions( + address from, + uint256 msgValue, + bytes payload +) internal view; +``` + +Verify if the `from` address is allowed to execute the `payload` on the [`target`](#target) contract linked to this Key Manager. + +#### Parameters + +| Name | Type | Description | +| ---------- | :-------: | ------------------------------------------------------------------- | +| `from` | `address` | Either the caller of {execute} or the signer of {executeRelayCall}. | +| `msgValue` | `uint256` | - | +| `payload` | `bytes` | The abi-encoded function call to execute on the {target} contract. | + +
+ +### \_setupLSP6ReentrancyGuard + +```solidity +function _setupLSP6ReentrancyGuard() internal nonpayable; +``` + +Initialise \_reentrancyStatus to \_NOT_ENTERED. + +
+ +### \_nonReentrantBefore + +```solidity +function _nonReentrantBefore( + bool isSetData, + address from +) internal nonpayable returns (bool isReentrantCall); +``` + +Update the status from `_NON_ENTERED` to `_ENTERED` and checks if +the status is `_ENTERED` in order to revert the call unless the caller has the REENTRANCY permission +Used in the beginning of the `nonReentrant` modifier, before the method execution starts. + +
+ +### \_nonReentrantAfter + +```solidity +function _nonReentrantAfter() internal nonpayable; +``` + +Resets the status to `_NOT_ENTERED` +Used in the end of the `nonReentrant` modifier after the method execution is terminated + +
+ +## Events -### AddressPermissionArrayIndexValueNotAnAddress +### PermissionsVerified -:::note Links +:::note References -- Specification details in [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#addresspermissionarrayindexvaluenotanaddress) -- Solidity implementation in [**LSP6KeyManager**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/contracts/LSP6KeyManager/LSP6KeyManager.sol) -- Error signature: `AddressPermissionArrayIndexValueNotAnAddress(bytes32,bytes)` -- Error hash: `0x8f4afa38` +- Specification details: [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#permissionsverified) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP6KeyManager/LSP6KeyManager.sol) +- Event signature: `PermissionsVerified(address,uint256,bytes4)` +- Event topic hash: `0xc0a62328f6bf5e3172bb1fcb2019f54b2c523b6a48e3513a2298fbf0150b781e` ::: ```solidity -error AddressPermissionArrayIndexValueNotAnAddress( - bytes32 dataKey, - bytes invalidValue -); +event PermissionsVerified(address indexed signer, uint256 indexed value, bytes4 indexed selector); ``` -Reverts when trying to set a value that is not 20 bytes long (not an `address`) under the `AddressPermissions[index]` data key. +_Verified the permissions of `signer` for calling function `selector` on the linked account and sending `value` of native token._ + +Emitted when the LSP6KeyManager contract verified the permissions of the `signer` successfully. #### Parameters -| Name | Type | Description | -| -------------- | :-------: | ----------------------------------------------------------------------------------------------------- | -| `dataKey` | `bytes32` | The `AddressPermissions[index]` data key, that specify the index in the `AddressPermissions[]` array. | -| `invalidValue` | `bytes` | The invalid value that was attempted to be set under `AddressPermissions[index]`. | +| Name | Type | Description | +| ------------------------ | :-------: | -------------------------------------------------------------------------------------------------------------------------------------------------- | +| `signer` **`indexed`** | `address` | The address of the controller that executed the calldata payload (either directly via {execute} or via meta transaction using {executeRelayCall}). | +| `value` **`indexed`** | `uint256` | The amount of native token to be transferred in the calldata payload. | +| `selector` **`indexed`** | `bytes4` | The bytes4 function of the function that was executed on the linked {target} | + +
+ +## Errors ### BatchExecuteParamsLengthMismatch -:::note Links +:::note References -- Specification details in [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#batchexecuteparamslengthmismatch) -- Solidity implementation in [**LSP6KeyManager**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/contracts/LSP6KeyManager/LSP6KeyManager.sol) +- Specification details: [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#batchexecuteparamslengthmismatch) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP6KeyManager/LSP6KeyManager.sol) - Error signature: `BatchExecuteParamsLengthMismatch()` - Error hash: `0x55a187db` @@ -479,14 +1243,18 @@ Reverts when trying to set a value that is not 20 bytes long (not an `address`) error BatchExecuteParamsLengthMismatch(); ``` +_The array parameters provided to the function `executeBatch(...)` do not have the same number of elements. (Different array param's length)._ + Reverts when the array parameters `uint256[] value` and `bytes[] payload` have different sizes. There should be the same number of elements for each array parameters. +
+ ### BatchExecuteRelayCallParamsLengthMismatch -:::note Links +:::note References -- Specification details in [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#batchexecuterelaycallparamslengthmismatch) -- Solidity implementation in [**LSP6KeyManager**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/contracts/LSP6KeyManager/LSP6KeyManager.sol) +- Specification details: [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#batchexecuterelaycallparamslengthmismatch) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP6KeyManager/LSP6KeyManager.sol) - Error signature: `BatchExecuteRelayCallParamsLengthMismatch()` - Error hash: `0xb4d50d21` @@ -496,14 +1264,18 @@ Reverts when the array parameters `uint256[] value` and `bytes[] payload` have d error BatchExecuteRelayCallParamsLengthMismatch(); ``` -Reverts when providing array parameters of different sizes to `executeRelayCall(bytes[],uint256[],bytes[])` +_The array parameters provided to the function `executeRelayCallBatch(...)` do not have the same number of elements. (Different array param's length)._ + +Reverts when providing array parameters of different sizes to `executeRelayCallBatch(bytes[],uint256[],bytes[])` + +
### CallingKeyManagerNotAllowed -:::note Links +:::note References -- Specification details in [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#callingkeymanagernotallowed) -- Solidity implementation in [**LSP6KeyManager**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/contracts/LSP6KeyManager/LSP6KeyManager.sol) +- Specification details: [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#callingkeymanagernotallowed) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP6KeyManager/LSP6KeyManager.sol) - Error signature: `CallingKeyManagerNotAllowed()` - Error hash: `0xa431b236` @@ -513,14 +1285,18 @@ Reverts when providing array parameters of different sizes to `executeRelayCall( error CallingKeyManagerNotAllowed(); ``` +_Calling the Key Manager address for this transaction is disallowed._ + Reverts when calling the KeyManager through `execute(uint256,address,uint256,bytes)`. +
+ ### CannotSendValueToSetData -:::note Links +:::note References -- Specification details in [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#cannotsendvaluetosetdata) -- Solidity implementation in [**LSP6KeyManager**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/contracts/LSP6KeyManager/LSP6KeyManager.sol) +- Specification details: [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#cannotsendvaluetosetdata) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP6KeyManager/LSP6KeyManager.sol) - Error signature: `CannotSendValueToSetData()` - Error hash: `0x59a529fc` @@ -530,14 +1306,18 @@ Reverts when calling the KeyManager through `execute(uint256,address,uint256,byt error CannotSendValueToSetData(); ``` -Reverts when trying to call to the `setData(byte32,bytes)` or `setData(bytes32[],bytes[]) functions on the linked [`target`](#target) while sending value. +_Cannot sent native tokens while setting data._ + +Reverts when calling the `setData(byte32,bytes)` or `setData(bytes32[],bytes[]) functions on the linked [`target`](#target) while sending value. + +
### DelegateCallDisallowedViaKeyManager -:::note Links +:::note References -- Specification details in [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#delegatecalldisallowedviakeymanager) -- Solidity implementation in [**LSP6KeyManager**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/contracts/LSP6KeyManager/LSP6KeyManager.sol) +- Specification details: [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#delegatecalldisallowedviakeymanager) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP6KeyManager/LSP6KeyManager.sol) - Error signature: `DelegateCallDisallowedViaKeyManager()` - Error hash: `0x80d6ebae` @@ -547,14 +1327,18 @@ Reverts when trying to call to the `setData(byte32,bytes)` or `setData(bytes32[] error DelegateCallDisallowedViaKeyManager(); ``` +_Performing DELEGATE CALLS via the Key Manager is currently disallowed._ + Reverts when trying to do a `delegatecall` via the ERC725X.execute(uint256,address,uint256,bytes) (operation type 4) function of the linked [`target`](#target). `DELEGATECALL` is disallowed by default on the LSP6KeyManager. +
+ ### ERC725Y_DataKeysValuesLengthMismatch -:::note Links +:::note References -- Specification details in [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#erc725y_datakeysvalueslengthmismatch) -- Solidity implementation in [**LSP6KeyManager**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/contracts/LSP6KeyManager/LSP6KeyManager.sol) +- Specification details: [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#erc725y_datakeysvalueslengthmismatch) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP6KeyManager/LSP6KeyManager.sol) - Error signature: `ERC725Y_DataKeysValuesLengthMismatch()` - Error hash: `0x3bcc8979` @@ -566,12 +1350,42 @@ error ERC725Y_DataKeysValuesLengthMismatch(); reverts when there is not the same number of elements in the lists of data keys and data values when calling setDataBatch. +
+ +### InvalidDataValuesForDataKeys + +:::note References + +- Specification details: [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#invaliddatavaluesfordatakeys) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP6KeyManager/LSP6KeyManager.sol) +- Error signature: `InvalidDataValuesForDataKeys(bytes32,bytes)` +- Error hash: `0x1fa41397` + +::: + +```solidity +error InvalidDataValuesForDataKeys(bytes32 dataKey, bytes dataValue); +``` + +_Data value: `dataValue` length is different from the required length for the data key which is set._ + +Reverts when the data value length is not one of the required lengths for the specific data key. + +#### Parameters + +| Name | Type | Description | +| ----------- | :-------: | ----------------------------------------------------------- | +| `dataKey` | `bytes32` | The data key that has a required length for the data value. | +| `dataValue` | `bytes` | The data value that has an invalid length. | + +
+ ### InvalidERC725Function -:::note Links +:::note References -- Specification details in [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#invaliderc725function) -- Solidity implementation in [**LSP6KeyManager**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/contracts/LSP6KeyManager/LSP6KeyManager.sol) +- Specification details: [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#invaliderc725function) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP6KeyManager/LSP6KeyManager.sol) - Error signature: `InvalidERC725Function(bytes4)` - Error hash: `0x2ba8851c` @@ -581,6 +1395,8 @@ reverts when there is not the same number of elements in the lists of data keys error InvalidERC725Function(bytes4 invalidFunction); ``` +_The Key Manager could not verify the calldata of the transaction because it could not recognise the function being called. Invalid function selector: `invalidFunction`._ + Reverts when trying to call a function on the linked [`target`](#target), that is not any of the following: - `setData(bytes32,bytes)` (ERC725Y) @@ -595,16 +1411,18 @@ Reverts when trying to call a function on the linked [`target`](#target), that i #### Parameters -| Name | Type | Description | -| ----------------- | :------: | ------------------------------------------------------------------------------------------------------------------------- | -| `invalidFunction` | `bytes4` | The `bytes4` selector of the function selector that was attempted to be called on the linked {target} but not recognised. | +| Name | Type | Description | +| ----------------- | :------: | ---------------------------------------------------------------------------------------------------------------- | +| `invalidFunction` | `bytes4` | The `bytes4` selector of the function that was attempted to be called on the linked {target} but not recognised. | + +
### InvalidEncodedAllowedCalls -:::note Links +:::note References -- Specification details in [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#invalidencodedallowedcalls) -- Solidity implementation in [**LSP6KeyManager**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/contracts/LSP6KeyManager/LSP6KeyManager.sol) +- Specification details: [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#invalidencodedallowedcalls) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP6KeyManager/LSP6KeyManager.sol) - Error signature: `InvalidEncodedAllowedCalls(bytes)` - Error hash: `0x187e77ab` @@ -614,6 +1432,8 @@ Reverts when trying to call a function on the linked [`target`](#target), that i error InvalidEncodedAllowedCalls(bytes allowedCallsValue); ``` +_Could not decode the Allowed Calls. Value = `allowedCallsValue`._ + Reverts when `allowedCallsValue` is not properly encoded as a `(bytes4,address,bytes4,bytes4)[CompactBytesArray]` (CompactBytesArray made of tuples that are 32 bytes long each). See LSP2 value type `CompactBytesArray` for more infos. #### Parameters @@ -622,12 +1442,14 @@ Reverts when `allowedCallsValue` is not properly encoded as a `(bytes4,address,b | ------------------- | :-----: | ----------------------------------------------------------------------------------------------------------------- | | `allowedCallsValue` | `bytes` | The list of allowedCalls that are not encoded correctly as a `(bytes4,address,bytes4,bytes4)[CompactBytesArray]`. | +
+ ### InvalidEncodedAllowedERC725YDataKeys -:::note Links +:::note References -- Specification details in [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#invalidencodedallowederc725ydatakeys) -- Solidity implementation in [**LSP6KeyManager**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/contracts/LSP6KeyManager/LSP6KeyManager.sol) +- Specification details: [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#invalidencodedallowederc725ydatakeys) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP6KeyManager/LSP6KeyManager.sol) - Error signature: `InvalidEncodedAllowedERC725YDataKeys(bytes,string)` - Error hash: `0xae6cbd37` @@ -637,21 +1459,25 @@ Reverts when `allowedCallsValue` is not properly encoded as a `(bytes4,address,b error InvalidEncodedAllowedERC725YDataKeys(bytes value, string context); ``` -Reverts when `value` is not encoded properly as a `bytes32[CompactBytesArray]`. The `context` string provides context on when this error occured (\_e.g: when fetching the `AllowedERC725YDataKeys` to verify the permissions of a controller, or when validating the `AllowedERC725YDataKeys` when setting them for a controller). +_Error when reading the Allowed ERC725Y Data Keys. Reason: `context`, Allowed ERC725Y Data Keys value read: `value`._ + +Reverts when `value` is not encoded properly as a `bytes32[CompactBytesArray]`. The `context` string provides context on when this error occurred (\_e.g: when fetching the `AllowedERC725YDataKeys` to verify the permissions of a controller, or when validating the `AllowedERC725YDataKeys` when setting them for a controller). #### Parameters | Name | Type | Description | | --------- | :------: | ---------------------------------------------------------- | | `value` | `bytes` | The value that is not a valid `bytes32[CompactBytesArray]` | -| `context` | `string` | A brief description of where the error occured. | +| `context` | `string` | A brief description of where the error occurred. | + +
### InvalidLSP6Target -:::note Links +:::note References -- Specification details in [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#invalidlsp6target) -- Solidity implementation in [**LSP6KeyManager**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/contracts/LSP6KeyManager/LSP6KeyManager.sol) +- Specification details: [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#invalidlsp6target) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP6KeyManager/LSP6KeyManager.sol) - Error signature: `InvalidLSP6Target()` - Error hash: `0xfc854579` @@ -661,14 +1487,18 @@ Reverts when `value` is not encoded properly as a `bytes32[CompactBytesArray]`. error InvalidLSP6Target(); ``` +_Invalid address supplied to link this Key Manager to (`address(0)`)._ + Reverts when the address provided to set as the [`target`](#target) linked to this KeyManager is invalid (_e.g. `address(0)`_). +
+ ### InvalidPayload -:::note Links +:::note References -- Specification details in [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#invalidpayload) -- Solidity implementation in [**LSP6KeyManager**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/contracts/LSP6KeyManager/LSP6KeyManager.sol) +- Specification details: [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#invalidpayload) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP6KeyManager/LSP6KeyManager.sol) - Error signature: `InvalidPayload(bytes)` - Error hash: `0x3621bbcc` @@ -678,7 +1508,9 @@ Reverts when the address provided to set as the [`target`](#target) linked to th error InvalidPayload(bytes payload); ``` -Reverst when the payload is invalid. +_Invalid calldata payload sent._ + +Reverts when the payload is invalid. #### Parameters @@ -686,12 +1518,14 @@ Reverst when the payload is invalid. | --------- | :-----: | ----------- | | `payload` | `bytes` | - | +
+ ### InvalidRelayNonce -:::note Links +:::note References -- Specification details in [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#invalidrelaynonce) -- Solidity implementation in [**LSP6KeyManager**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/contracts/LSP6KeyManager/LSP6KeyManager.sol) +- Specification details: [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#invalidrelaynonce) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP6KeyManager/LSP6KeyManager.sol) - Error signature: `InvalidRelayNonce(address,uint256,bytes)` - Error hash: `0xc9bd9eb9` @@ -701,22 +1535,26 @@ Reverst when the payload is invalid. error InvalidRelayNonce(address signer, uint256 invalidNonce, bytes signature); ``` +_The relay call failed because an invalid nonce was provided for the address `signer` that signed the execute relay call. Invalid nonce: `invalidNonce`, signature of signer: `signature`._ + Reverts when the `signer` address retrieved from the `signature` has an invalid nonce: `invalidNonce`. #### Parameters -| Name | Type | Description | -| -------------- | :-------: | --------------------------------------------------- | -| `signer` | `address` | The address of the signer | -| `invalidNonce` | `uint256` | The nonce retrieved for the `signer` address | -| `signature` | `bytes` | The signature used to retrieve the `signer` address | +| Name | Type | Description | +| -------------- | :-------: | ---------------------------------------------------- | +| `signer` | `address` | The address of the signer. | +| `invalidNonce` | `uint256` | The nonce retrieved for the `signer` address. | +| `signature` | `bytes` | The signature used to retrieve the `signer` address. | + +
### InvalidWhitelistedCall -:::note Links +:::note References -- Specification details in [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#invalidwhitelistedcall) -- Solidity implementation in [**LSP6KeyManager**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/contracts/LSP6KeyManager/LSP6KeyManager.sol) +- Specification details: [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#invalidwhitelistedcall) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP6KeyManager/LSP6KeyManager.sol) - Error signature: `InvalidWhitelistedCall(address)` - Error hash: `0x6fd203c5` @@ -726,20 +1564,45 @@ Reverts when the `signer` address retrieved from the `signature` has an invalid error InvalidWhitelistedCall(address from); ``` -Reverts when verifying the permissions of a `from` address for its allowed calls, and has a "any whitelisted call" allowed call set. A `from` address is not allowed to have 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffff in its list of `AddressPermissions:AllowedCalls:`, as this allows any STANDARD:ADDRESS:FUNCTION. This is equivalent to granting the SUPER permission and should never be valid. +_Invalid allowed calls (`0xffffffffffffffffffffffffffffffffffffffffffffffffffffffff`) set for address `from`. Could not perform external call._ + +Reverts when a `from` address has _"any whitelisted call"_ as allowed call set. This revert happens during the verification of the permissions of the address for its allowed calls. A `from` address is not allowed to have 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffff in its list of `AddressPermissions:AllowedCalls:`, as this allows any STANDARD:ADDRESS:FUNCTION. This is equivalent to granting the SUPER permission and should never be valid. #### Parameters -| Name | Type | Description | -| ------ | :-------: | ------------------------------------------------------------------ | -| `from` | `address` | The controller address that has any allowed calls whitelisted set. | +| Name | Type | Description | +| ------ | :-------: | ---------------------------------------------------------------------- | +| `from` | `address` | The controller address that has _"any allowed calls"_ whitelisted set. | + +
+ +### KeyManagerCannotBeSetAsExtensionForLSP20Functions + +:::note References + +- Specification details: [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#keymanagercannotbesetasextensionforlsp20functions) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP6KeyManager/LSP6KeyManager.sol) +- Error signature: `KeyManagerCannotBeSetAsExtensionForLSP20Functions()` +- Error hash: `0x4a9fa8cf` + +::: + +```solidity +error KeyManagerCannotBeSetAsExtensionForLSP20Functions(); +``` + +_Key Manager cannot be used as an LSP17 extension for LSP20 functions._ + +Reverts when the address of the Key Manager is being set as extensions for lsp20 functions + +
### LSP6BatchExcessiveValueSent -:::note Links +:::note References -- Specification details in [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#lsp6batchexcessivevaluesent) -- Solidity implementation in [**LSP6KeyManager**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/contracts/LSP6KeyManager/LSP6KeyManager.sol) +- Specification details: [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#lsp6batchexcessivevaluesent) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP6KeyManager/LSP6KeyManager.sol) - Error signature: `LSP6BatchExcessiveValueSent(uint256,uint256)` - Error hash: `0xa51868b6` @@ -749,6 +1612,8 @@ Reverts when verifying the permissions of a `from` address for its allowed calls error LSP6BatchExcessiveValueSent(uint256 totalValues, uint256 msgValue); ``` +_Too much funds sent to forward each amount in the batch. No amount of native tokens should stay in the Key Manager._ + This error occurs when there was too much funds sent to the batch functions `execute(uint256[],bytes[])` or `executeRelayCall(bytes[],uint256[],uint256[],bytes[])` to cover the sum of all the values forwarded on Reverts to avoid the KeyManager to holds some remaining funds sent to the following batch functions: - execute(uint256[],bytes[]) @@ -762,12 +1627,14 @@ This error occurs when there was too much funds sent to the batch functions `exe | `totalValues` | `uint256` | - | | `msgValue` | `uint256` | - | +
+ ### LSP6BatchInsufficientValueSent -:::note Links +:::note References -- Specification details in [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#lsp6batchinsufficientvaluesent) -- Solidity implementation in [**LSP6KeyManager**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/contracts/LSP6KeyManager/LSP6KeyManager.sol) +- Specification details: [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#lsp6batchinsufficientvaluesent) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP6KeyManager/LSP6KeyManager.sol) - Error signature: `LSP6BatchInsufficientValueSent(uint256,uint256)` - Error hash: `0x30a324ac` @@ -777,6 +1644,8 @@ This error occurs when there was too much funds sent to the batch functions `exe error LSP6BatchInsufficientValueSent(uint256 totalValues, uint256 msgValue); ``` +_Not enough funds sent to forward each amount in the batch._ + This error occurs when there was not enough funds sent to the batch functions `execute(uint256[],bytes[])` or `executeRelayCall(bytes[],uint256[],uint256[],bytes[])` to cover the sum of all the values forwarded on each payloads (`values[]` parameter from the batch functions above). This mean that `msg.value` is less than the sum of all the values being forwarded on each payloads (`values[]` parameters). #### Parameters @@ -786,12 +1655,14 @@ This error occurs when there was not enough funds sent to the batch functions `e | `totalValues` | `uint256` | The sum of all the values forwarded on each payloads (`values[]` parameter from the batch functions above). | | `msgValue` | `uint256` | The amount of native tokens sent to the batch functions `execute(uint256[],bytes[])` or `executeRelayCall(bytes[],uint256[],uint256[],bytes[])`. | +
+ ### NoCallsAllowed -:::note Links +:::note References -- Specification details in [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#nocallsallowed) -- Solidity implementation in [**LSP6KeyManager**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/contracts/LSP6KeyManager/LSP6KeyManager.sol) +- Specification details: [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#nocallsallowed) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP6KeyManager/LSP6KeyManager.sol) - Error signature: `NoCallsAllowed(address)` - Error hash: `0x6cb60587` @@ -801,6 +1672,8 @@ This error occurs when there was not enough funds sent to the batch functions `e error NoCallsAllowed(address from); ``` +_The address `from` is not authorised to use the linked account contract to make external calls, because it has no Allowed Calls set._ + Reverts when the `from` address has no `AllowedCalls` set and cannot interact with any address using the linked [`target`](#target). #### Parameters @@ -809,12 +1682,14 @@ Reverts when the `from` address has no `AllowedCalls` set and cannot interact wi | ------ | :-------: | ------------------------------------- | | `from` | `address` | The address that has no AllowedCalls. | +
+ ### NoERC725YDataKeysAllowed -:::note Links +:::note References -- Specification details in [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#noerc725ydatakeysallowed) -- Solidity implementation in [**LSP6KeyManager**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/contracts/LSP6KeyManager/LSP6KeyManager.sol) +- Specification details: [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#noerc725ydatakeysallowed) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP6KeyManager/LSP6KeyManager.sol) - Error signature: `NoERC725YDataKeysAllowed(address)` - Error hash: `0xed7fa509` @@ -824,6 +1699,8 @@ Reverts when the `from` address has no `AllowedCalls` set and cannot interact wi error NoERC725YDataKeysAllowed(address from); ``` +_The address `from` is not authorised to set data, because it has no ERC725Y Data Key allowed._ + Reverts when the `from` address has no AllowedERC725YDataKeys set and cannot set any ERC725Y data key on the ERC725Y storage of the linked [`target`](#target). #### Parameters @@ -832,12 +1709,14 @@ Reverts when the `from` address has no AllowedERC725YDataKeys set and cannot set | ------ | :-------: | ----------------------------------------------------- | | `from` | `address` | The address that has no `AllowedERC725YDataKeys` set. | +
+ ### NoPermissionsSet -:::note Links +:::note References -- Specification details in [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#nopermissionsset) -- Solidity implementation in [**LSP6KeyManager**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/contracts/LSP6KeyManager/LSP6KeyManager.sol) +- Specification details: [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#nopermissionsset) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP6KeyManager/LSP6KeyManager.sol) - Error signature: `NoPermissionsSet(address)` - Error hash: `0xf292052a` @@ -847,6 +1726,8 @@ Reverts when the `from` address has no AllowedERC725YDataKeys set and cannot set error NoPermissionsSet(address from); ``` +_The address `from` does not have any permission set on the contract linked to the Key Manager._ + Reverts when address `from` does not have any permissions set on the account linked to this Key Manager #### Parameters @@ -855,12 +1736,14 @@ Reverts when address `from` does not have any permissions set on the account lin | ------ | :-------: | ------------------------------------------ | | `from` | `address` | the address that does not have permissions | +
+ ### NotAllowedCall -:::note Links +:::note References -- Specification details in [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#notallowedcall) -- Solidity implementation in [**LSP6KeyManager**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/contracts/LSP6KeyManager/LSP6KeyManager.sol) +- Specification details: [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#notallowedcall) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP6KeyManager/LSP6KeyManager.sol) - Error signature: `NotAllowedCall(address,address,bytes4)` - Error hash: `0x45147bce` @@ -870,22 +1753,26 @@ Reverts when address `from` does not have any permissions set on the account lin error NotAllowedCall(address from, address to, bytes4 selector); ``` +_The address `from` is not authorised to call the function `selector` on the `to` address._ + Reverts when `from` is not authorised to call the `execute(uint256,address,uint256,bytes)` function because of a not allowed callType, address, standard or function. #### Parameters -| Name | Type | Description | -| ---------- | :-------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `from` | `address` | address The controller that tried to call the `execute(uint256,address,uint256,bytes)` function. | -| `to` | `address` | The address of an EOA or contract that `from` tried to call using the linked {target} | -| `selector` | `bytes4` | If `to` is a contract, the bytes4 selector of the function that `from` is trying to call. If no function is called (e.g: a native token transfer), selector = 0x00000000 | +| Name | Type | Description | +| ---------- | :-------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `from` | `address` | The controller that tried to call the `execute(uint256,address,uint256,bytes)` function. | +| `to` | `address` | The address of an EOA or contract that `from` tried to call using the linked {target} | +| `selector` | `bytes4` | If `to` is a contract, the bytes4 selector of the function that `from` is trying to call. If no function is called (_e.g: a native token transfer_), selector = `0x00000000` | + +
### NotAllowedERC725YDataKey -:::note Links +:::note References -- Specification details in [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#notallowederc725ydatakey) -- Solidity implementation in [**LSP6KeyManager**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/contracts/LSP6KeyManager/LSP6KeyManager.sol) +- Specification details: [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#notallowederc725ydatakey) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP6KeyManager/LSP6KeyManager.sol) - Error signature: `NotAllowedERC725YDataKey(address,bytes32)` - Error hash: `0x557ae079` @@ -895,6 +1782,8 @@ Reverts when `from` is not authorised to call the `execute(uint256,address,uint2 error NotAllowedERC725YDataKey(address from, bytes32 disallowedKey); ``` +_The address `from` is not authorised to set the data key `disallowedKey` on the contract linked to the Key Manager._ + Reverts when address `from` is not authorised to set the key `disallowedKey` on the linked [`target`](#target). #### Parameters @@ -904,12 +1793,14 @@ Reverts when address `from` is not authorised to set the key `disallowedKey` on | `from` | `address` | address The controller that tried to `setData` on the linked {target}. | | `disallowedKey` | `bytes32` | A bytes32 data key that `from` is not authorised to set on the ERC725Y storage of the linked {target}. | +
+ ### NotAuthorised -:::note Links +:::note References -- Specification details in [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#notauthorised) -- Solidity implementation in [**LSP6KeyManager**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/contracts/LSP6KeyManager/LSP6KeyManager.sol) +- Specification details: [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#notauthorised) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP6KeyManager/LSP6KeyManager.sol) - Error signature: `NotAuthorised(address,string)` - Error hash: `0x3bdad6e6` @@ -919,6 +1810,8 @@ Reverts when address `from` is not authorised to set the key `disallowedKey` on error NotAuthorised(address from, string permission); ``` +_The address `from` is not authorised to `permission` on the contract linked to the Key Manager._ + Reverts when address `from` is not authorised and does not have `permission` on the linked [`target`](#target) #### Parameters @@ -928,12 +1821,14 @@ Reverts when address `from` is not authorised and does not have `permission` on | `from` | `address` | address The address that was not authorised. | | `permission` | `string` | permission The permission required (\_e.g: `SETDATA`, `CALL`, `TRANSFERVALUE`) | +
+ ### NotRecognisedPermissionKey -:::note Links +:::note References -- Specification details in [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#notrecognisedpermissionkey) -- Solidity implementation in [**LSP6KeyManager**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/contracts/LSP6KeyManager/LSP6KeyManager.sol) +- Specification details: [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#notrecognisedpermissionkey) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP6KeyManager/LSP6KeyManager.sol) - Error signature: `NotRecognisedPermissionKey(bytes32)` - Error hash: `0x0f7d735b` @@ -943,7 +1838,9 @@ Reverts when address `from` is not authorised and does not have `permission` on error NotRecognisedPermissionKey(bytes32 dataKey); ``` -Reverts when `dataKey` is a bytes32 value that does not adhere to any of the permission data keys defined by the LSP6 standard +_The data key `dataKey` starts with `AddressPermissions` prefix but is none of the permission data keys defined in LSP6._ + +Reverts when `dataKey` is a `bytes32` value that does not adhere to any of the permission data keys defined by the LSP6 standard #### Parameters @@ -951,12 +1848,14 @@ Reverts when `dataKey` is a bytes32 value that does not adhere to any of the per | --------- | :-------: | ------------------------------------------------------------------------------ | | `dataKey` | `bytes32` | The dataKey that does not match any of the standard LSP6 permission data keys. | +
+ ### RelayCallBeforeStartTime -:::note Links +:::note References -- Specification details in [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#relaycallbeforestarttime) -- Solidity implementation in [**LSP6KeyManager**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/contracts/LSP6KeyManager/LSP6KeyManager.sol) +- Specification details: [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#relaycallbeforestarttime) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP6KeyManager/LSP6KeyManager.sol) - Error signature: `RelayCallBeforeStartTime()` - Error hash: `0x00de4b8a` @@ -966,14 +1865,18 @@ Reverts when `dataKey` is a bytes32 value that does not adhere to any of the per error RelayCallBeforeStartTime(); ``` -Reverts when the start timestamp provided to [`executeRelayCall`](#executerelaycall) function is bigger than the current timestamp. +_Relay call not valid yet._ + +Reverts when the relay call is cannot yet bet executed. This mean that the starting timestamp provided to [`executeRelayCall`](#executerelaycall) function is bigger than the current timestamp. + +
### RelayCallExpired -:::note Links +:::note References -- Specification details in [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#relaycallexpired) -- Solidity implementation in [**LSP6KeyManager**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/contracts/LSP6KeyManager/LSP6KeyManager.sol) +- Specification details: [**LSP-6-KeyManager**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-6-KeyManager.md#relaycallexpired) +- Solidity implementation: [`LSP6KeyManager.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP6KeyManager/LSP6KeyManager.sol) - Error signature: `RelayCallExpired()` - Error hash: `0x5c53a98c` @@ -983,8 +1886,12 @@ Reverts when the start timestamp provided to [`executeRelayCall`](#executerelayc error RelayCallExpired(); ``` +_Relay call expired (deadline passed)._ + Reverts when the period to execute the relay call has expired. +
+ diff --git a/docs/contracts/contracts/LSP7DigitalAsset/LSP7DigitalAsset.md b/docs/contracts/contracts/LSP7DigitalAsset/LSP7DigitalAsset.md index aece6f16d3..0699a49bf0 100644 --- a/docs/contracts/contracts/LSP7DigitalAsset/LSP7DigitalAsset.md +++ b/docs/contracts/contracts/LSP7DigitalAsset/LSP7DigitalAsset.md @@ -1,6 +1,14 @@ + + + # LSP7DigitalAsset -:::info Solidity contract +:::info Standard Specifications + +[`LSP-7-DigitalAsset`](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md) + +::: +:::info Solidity implementation [`LSP7DigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) @@ -10,14 +18,17 @@ Minting and transferring are supplied with a `uint256` amount. This implementation is agnostic to the way tokens are created. A supply mechanism has to be added in a derived contract using [`_mint`](#_mint) For a generic mechanism, see [`LSP7Mintable`](#lsp7mintable). -## Methods +## Public Methods + +Public methods are accessible externally from users, allowing interaction with this function from dApps or other smart contracts. +When marked as 'public', a method can be called both externally and internally, on the other hand, when marked as 'external', a method can only be called externally. ### authorizeOperator -:::note Links +:::note References -- Specification details in [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#authorizeoperator) -- Solidity implementation in [**LSP7DigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#authorizeoperator) +- Solidity implementation: [`LSP7DigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) - Function signature: `authorizeOperator(address,uint256)` - Function selector: `0x47980aa3` @@ -36,7 +47,7 @@ function authorizeOperator( ) external nonpayable; ``` -Sets the `amount` of tokens that an `operator` has access from the caller's balance (allowance). See [`authorizedAmountFor`](#authorizedamountfor). +Sets an `amount` of tokens that an `operator` has access from the caller's balance (allowance). See [`authorizedAmountFor`](#authorizedamountfor). #### Parameters @@ -45,14 +56,14 @@ Sets the `amount` of tokens that an `operator` has access from the caller's bala | `operator` | `address` | The address to authorize as an operator. | | `amount` | `uint256` | The allowance amount of tokens operator has access to. | -<br/> +
### authorizedAmountFor -:::note Links +:::note References -- Specification details in [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#authorizedamountfor) -- Solidity implementation in [**LSP7DigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#authorizedamountfor) +- Solidity implementation: [`LSP7DigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) - Function signature: `authorizedAmountFor(address,address)` - Function selector: `0x65aeaa95` @@ -69,25 +80,25 @@ Get the amount of tokens `operator` address has access to from `tokenOwner`. Ope #### Parameters -| Name | Type | Description | -| ------------ | :-------: | -------------------------------------------------------------- | -| `operator` | `address` | The operator's address to query the authorized amount for. | -| `tokenOwner` | `address` | The token owner that `operator` has allowance on. | +| Name | Type | Description | +| ------------ | :-------: | ---------------------------------------------------------- | +| `operator` | `address` | The operator's address to query the authorized amount for. | +| `tokenOwner` | `address` | The token owner that `operator` has allowance on. | #### Returns -| Name | Type | Description | -| ---- | :-------: | ----------------------------------------------------------------------------------------------- | -| `0` | `uint256` | The amount of tokens the `operator`'s address has access on the `tokenOwner`'s balance. | +| Name | Type | Description | +| ---- | :-------: | --------------------------------------------------------------------------------------- | +| `0` | `uint256` | The amount of tokens the `operator`'s address has access on the `tokenOwner`'s balance. | -<br/> +
### balanceOf -:::note Links +:::note References -- Specification details in [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#balanceof) -- Solidity implementation in [**LSP7DigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#balanceof) +- Solidity implementation: [`LSP7DigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) - Function signature: `balanceOf(address)` - Function selector: `0x70a08231` @@ -109,16 +120,16 @@ Get the number of tokens owned by `tokenOwner`. If the token is divisible (the [ | Name | Type | Description | | ---- | :-------: | ------------------------------------------- | -| `0` | `uint256` | The number of tokens owned by `tokenOwner`. | +| `0` | `uint256` | The amount of tokens owned by `tokenOwner`. | -<br/> +
### decimals -:::note Links +:::note References -- Specification details in [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#decimals) -- Solidity implementation in [**LSP7DigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#decimals) +- Solidity implementation: [`LSP7DigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) - Function signature: `decimals()` - Function selector: `0x313ce567` @@ -136,14 +147,14 @@ Returns the number of decimals used to get its user representation. If the asset | ---- | :-----: | ----------------------------------------------------------------------- | | `0` | `uint8` | the number of decimals. If `0` is returned, the asset is non-divisible. | -<br/> +
### decreaseAllowance -:::note Links +:::note References -- Specification details in [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#decreaseallowance) -- Solidity implementation in [**LSP7DigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#decreaseallowance) +- Solidity implementation: [`LSP7DigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) - Function signature: `decreaseAllowance(address,uint256)` - Function selector: `0xa457c2d7` @@ -186,19 +197,19 @@ Atomically decreases the allowance granted to `operator` by the caller. This is #### Parameters -| Name | Type | Description | -| ------------------- | :-------: | ---------------------------------------------------------- | -| `operator` | `address` | the operator to decrease allowance for `msg.sender` | -| `substractedAmount` | `uint256` | the amount to decrease by in the operator's allowance. | +| Name | Type | Description | +| ------------------- | :-------: | ------------------------------------------------------ | +| `operator` | `address` | the operator to decrease allowance for `msg.sender` | +| `substractedAmount` | `uint256` | the amount to decrease by in the operator's allowance. | -<br/> +
### getData -:::note Links +:::note References -- Specification details in [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#getdata) -- Solidity implementation in [**LSP7DigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#getdata) +- Solidity implementation: [`LSP7DigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) - Function signature: `getData(bytes32)` - Function selector: `0x54f6127f` @@ -222,14 +233,14 @@ _Gets singular data at a given `dataKey`_ | ----------- | :-----: | -------------------------- | | `dataValue` | `bytes` | The data stored at the key | -<br/> +
### getDataBatch -:::note Links +:::note References -- Specification details in [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#getdatabatch) -- Solidity implementation in [**LSP7DigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#getdatabatch) +- Solidity implementation: [`LSP7DigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) - Function signature: `getDataBatch(bytes32[])` - Function selector: `0xdedff9c6` @@ -255,14 +266,14 @@ _Gets array of data for multiple given keys_ | ------------ | :-------: | ----------------------------------------- | | `dataValues` | `bytes[]` | The array of data stored at multiple keys | -<br/> +
### increaseAllowance -:::note Links +:::note References -- Specification details in [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#increaseallowance) -- Solidity implementation in [**LSP7DigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#increaseallowance) +- Solidity implementation: [`LSP7DigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) - Function signature: `increaseAllowance(address,uint256)` - Function selector: `0x39509351` @@ -304,19 +315,19 @@ Atomically increases the allowance granted to `operator` by the caller. This is #### Parameters -| Name | Type | Description | -| ------------- | :-------: | --------------------------------------------------------------------------- | -| `operator` | `address` | the operator to increase the allowance for `msg.sender` | -| `addedAmount` | `uint256` | the additional amount to add on top of the current operator's allowance | +| Name | Type | Description | +| ------------- | :-------: | ----------------------------------------------------------------------- | +| `operator` | `address` | the operator to increase the allowance for `msg.sender` | +| `addedAmount` | `uint256` | the additional amount to add on top of the current operator's allowance | -<br/> +
### owner -:::note Links +:::note References -- Specification details in [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#owner) -- Solidity implementation in [**LSP7DigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#owner) +- Solidity implementation: [`LSP7DigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) - Function signature: `owner()` - Function selector: `0x8da5cb5b` @@ -334,14 +345,14 @@ Returns the address of the current owner. | ---- | :-------: | ----------- | | `0` | `address` | - | -<br/> +
### renounceOwnership -:::note Links +:::note References -- Specification details in [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#renounceownership) -- Solidity implementation in [**LSP7DigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#renounceownership) +- Solidity implementation: [`LSP7DigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) - Function signature: `renounceOwnership()` - Function selector: `0x715018a6` @@ -353,14 +364,14 @@ function renounceOwnership() external nonpayable; Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner. -<br/> +
### revokeOperator -:::note Links +:::note References -- Specification details in [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#revokeoperator) -- Solidity implementation in [**LSP7DigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#revokeoperator) +- Solidity implementation: [`LSP7DigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) - Function signature: `revokeOperator(address)` - Function selector: `0xfad8b32a` @@ -370,7 +381,7 @@ Leaves the contract without owner. It will not be possible to call `onlyOwner` f function revokeOperator(address operator) external nonpayable; ``` -Removes the `operator` address as an operator of callers tokens. See [`authorizedAmountFor`](#authorizedamountfor). +Removes the `operator` address as an operator of callers tokens, disallowing it to send any amount of tokens on behalf of the token owner (the caller of the function `msg.sender`). See also [`authorizedAmountFor`](#authorizedamountfor). #### Parameters @@ -378,14 +389,14 @@ Removes the `operator` address as an operator of callers tokens. See [`authorize | ---------- | :-------: | ------------------------------------- | | `operator` | `address` | The address to revoke as an operator. | -<br/> +
### setData -:::note Links +:::note References -- Specification details in [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#setdata) -- Solidity implementation in [**LSP7DigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#setdata) +- Solidity implementation: [`LSP7DigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) - Function signature: `setData(bytes32,bytes)` - Function selector: `0x7f23690c` @@ -404,14 +415,14 @@ _Sets singular data for a given `dataKey`_ | `dataKey` | `bytes32` | The key to retrieve stored value | | `dataValue` | `bytes` | The value to set SHOULD only be callable by the owner of the contract set via ERC173 The function is marked as payable to enable flexibility on child contracts If the function is not intended to receive value, an additional check should be implemented to check that value equal 0. Emits a {DataChanged} event. | -<br/> +
### setDataBatch -:::note Links +:::note References -- Specification details in [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#setdatabatch) -- Solidity implementation in [**LSP7DigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#setdatabatch) +- Solidity implementation: [`LSP7DigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) - Function signature: `setDataBatch(bytes32[],bytes[])` - Function selector: `0x97902421` @@ -432,14 +443,14 @@ Sets array of data for multiple given `dataKeys` SHOULD only be callable by the | `dataKeys` | `bytes32[]` | The array of data keys for values to set | | `dataValues` | `bytes[]` | The array of values to set | -<br/> +
### supportsInterface -:::note Links +:::note References -- Specification details in [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#supportsinterface) -- Solidity implementation in [**LSP7DigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#supportsinterface) +- Solidity implementation: [`LSP7DigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) - Function signature: `supportsInterface(bytes4)` - Function selector: `0x01ffc9a7` @@ -463,14 +474,14 @@ Returns true if this contract implements the interface defined by `interfaceId`. | ---- | :----: | ----------- | | `0` | `bool` | - | -<br/> +
### totalSupply -:::note Links +:::note References -- Specification details in [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#totalsupply) -- Solidity implementation in [**LSP7DigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#totalsupply) +- Solidity implementation: [`LSP7DigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) - Function signature: `totalSupply()` - Function selector: `0x18160ddd` @@ -480,7 +491,7 @@ Returns true if this contract implements the interface defined by `interfaceId`. function totalSupply() external view returns (uint256); ``` -Returns the number of existing tokens that has been minted in this contract. +Returns the number of existing tokens that have been minted in this contract. #### Returns @@ -488,14 +499,14 @@ Returns the number of existing tokens that has been minted in this contract. | ---- | :-------: | ------------------------------ | | `0` | `uint256` | The number of existing tokens. | -<br/> +
### transfer -:::note Links +:::note References -- Specification details in [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#transfer) -- Solidity implementation in [**LSP7DigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#transfer) +- Solidity implementation: [`LSP7DigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) - Function signature: `transfer(address,address,uint256,bool,bytes)` - Function selector: `0x760d9bba` @@ -511,7 +522,7 @@ function transfer( ) external nonpayable; ``` -Transfers an `amount` of tokens from the `from` address to the `to` address and notify both sender and recipients via the LSP1 [`universalReceiver(...)`](#`universalreceiver) function. +Transfers an `amount` of tokens from the `from` address to the `to` address and notify both sender and recipients via the LSP1 [`universalReceiver(...)`](#`universalreceiver) function. If the tokens are transferred by an operator on behalf of a token holder, the allowance for the operator will be decreased by `amount` once the token transfer has been completed (See [`authorizedAmountFor`](#authorizedamountfor)). #### Parameters @@ -521,16 +532,16 @@ Transfers an `amount` of tokens from the `from` address to the `to` address and | `to` | `address` | The recipient address. | | `amount` | `uint256` | The amount of tokens to transfer. | | `allowNonLSP1Recipient` | `bool` | When set to `true`, the `to` address CAN be any address. When set to `false`, the `to` address MUST be a contract that supports the LSP1 UniversalReceiver standard. | -| `data` | `bytes` | Additional data the caller wants included in the emitted event, and sent in the hooks of the `from` and `to` addresses. | +| `data` | `bytes` | Any additional data the caller wants included in the emitted event, and sent in the hooks of the `from` and `to` addresses. | -<br/> +
### transferBatch -:::note Links +:::note References -- Specification details in [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#transferbatch) -- Solidity implementation in [**LSP7DigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#transferbatch) +- Solidity implementation: [`LSP7DigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) - Function signature: `transferBatch(address[],address[],uint256[],bool[],bytes[])` - Function selector: `0x2d7667c9` @@ -554,18 +565,18 @@ Same as [`transfer(...)`](#`transfer) but transfer multiple tokens based on the | ----------------------- | :---------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `from` | `address[]` | An array of sending addresses. | | `to` | `address[]` | An array of receiving addresses. | -| `amount` | `uint256[]` | An array of amount of tokens to transfer for each `from -> to` transfer. | +| `amount` | `uint256[]` | An array of amount of tokens to transfer for each `from -> to` transfer. | | `allowNonLSP1Recipient` | `bool[]` | For each transfer, when set to `true`, the `to` address CAN be any address. When set to `false`, the `to` address MUST be a contract that supports the LSP1 UniversalReceiver standard. | | `data` | `bytes[]` | An array of additional data the caller wants included in the emitted event, and sent in the hooks to `from` and `to` addresses. | -<br/> +
### transferOwnership -:::note Links +:::note References -- Specification details in [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#transferownership) -- Solidity implementation in [**LSP7DigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#transferownership) +- Solidity implementation: [`LSP7DigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) - Function signature: `transferOwnership(address)` - Function selector: `0xf2fde38b` @@ -583,20 +594,255 @@ Transfers ownership of the contract to a new account (`newOwner`). Can only be c | ---------- | :-------: | ----------- | | `newOwner` | `address` | - | -<br/> +
+ +## Internal Methods + +Any method labeled as `internal` serves as utility function within the contract. They can be used when writing solidity contracts that inherit from this contract. These methods can be extended or modified by overriding their internal behavior to suit specific needs. + +Internal functions cannot be called externally, whether from other smart contracts, dApp interfaces, or backend services. Their restricted accessibility ensures that they remain exclusively available within the context of the current contract, promoting controlled and encapsulated usage of these internal utilities. + +### \_checkOwner + +```solidity +function _checkOwner() internal view; +``` + +Throws if the sender is not the owner. + +
+ +### \_setOwner + +```solidity +function _setOwner(address newOwner) internal nonpayable; +``` ---- +Changes the owner if `newOwner` and oldOwner are different +This pattern is useful in inheritance. + +
+ +### \_getData + +```solidity +function _getData(bytes32 dataKey) internal view returns (bytes dataValue); +``` + +
+ +### \_setData + +```solidity +function _setData(bytes32 dataKey, bytes dataValue) internal nonpayable; +``` + +Save gas by emitting the [`DataChanged`](#datachanged) event with only the first 256 bytes of dataValue + +
+ +### \_updateOperator + +```solidity +function _updateOperator( + address tokenOwner, + address operator, + uint256 amount +) internal nonpayable; +``` + +Changes token `amount` the `operator` has access to from `tokenOwner` tokens. +If the amount is zero then the operator is being revoked, otherwise the operator amount is being modified. + +
+ +### \_mint + +```solidity +function _mint( + address to, + uint256 amount, + bool allowNonLSP1Recipient, + bytes data +) internal nonpayable; +``` + +Mints `amount` of tokens and transfers it to `to`. + ++ +**Emitted events:** + +- [`Transfer`](#transfer) event with `address(0)` as `from`. + ++ +#### Parameters + +| Name | Type | Description | +| ----------------------- | :-------: | ------------------------------------------------------------------------------------------------------------------------- | +| `to` | `address` | the address to mint tokens for. | +| `amount` | `uint256` | the amount of tokens to mint. | +| `allowNonLSP1Recipient` | `bool` | a boolean that describe if transfer to a `to` address that does not support LSP1 is allowed or not. | +| `data` | `bytes` | Additional data the caller wants included in the emitted {Transfer} event, and sent in the LSP1 hook to the `to` address. | + +
+ +### \_burn + +:::tip Hint + +In dApps, you can know which address is burning tokens by listening for the `Transfer` event and filter with the zero address as `to`. + +::: + +```solidity +function _burn(address from, uint256 amount, bytes data) internal nonpayable; +``` + +Burns (= destroys) `amount` of tokens, decrease the `from` balance. This is done by sending them to the zero address. +Both the sender and recipient will be notified of the token transfer through the LSP1 [`universalReceiver`](#universalreceiver) +function, if they are contracts that support the LSP1 interface. Their `universalReceiver` function will receive +all the parameters in the calldata packed encoded. +Any logic in the [`_beforeTokenTransfer`](#_beforetokentransfer) function will run before updating the balances. + ++ +**Emitted events:** + +- [`Transfer`](#transfer) event with `address(0)` as the `to` address + ++ +#### Parameters + +| Name | Type | Description | +| -------- | :-------: | ------------------------------------------------------------------------------------------------------------------------- | +| `from` | `address` | the address to burn tokens from its balance. | +| `amount` | `uint256` | the amount of tokens to burn. | +| `data` | `bytes` | Additional data the caller wants included in the emitted event, and sent in the LSP1 hook to the `from` and `to` address. | + +
+ +### \_transfer + +```solidity +function _transfer( + address from, + address to, + uint256 amount, + bool allowNonLSP1Recipient, + bytes data +) internal nonpayable; +``` + +Transfer tokens from `from` to `to` by decreasing the balance of `from` by `-amount` and increasing the balance +of `to` by `+amount`. +Both the sender and recipient will be notified of the token transfer through the LSP1 [`universalReceiver`](#universalreceiver) +function, if they are contracts that support the LSP1 interface. Their `universalReceiver` function will receive +all the parameters in the calldata packed encoded. +Any logic in the [`_beforeTokenTransfer`](#_beforetokentransfer) function will run before updating the balances. + ++ +**Emitted events:** + +- [`Transfer`](#transfer) event. + ++ +#### Parameters + +| Name | Type | Description | +| ----------------------- | :-------: | ------------------------------------------------------------------------------------------------------------------------- | +| `from` | `address` | the address to decrease the balance. | +| `to` | `address` | the address to increase the balance. | +| `amount` | `uint256` | the amount of tokens to transfer from `from` to `to`. | +| `allowNonLSP1Recipient` | `bool` | a boolean that describe if transfer to a `to` address that does not support LSP1 is allowed or not. | +| `data` | `bytes` | Additional data the caller wants included in the emitted event, and sent in the LSP1 hook to the `from` and `to` address. | + +
+ +### \_beforeTokenTransfer + +```solidity +function _beforeTokenTransfer( + address from, + address to, + uint256 amount +) internal nonpayable; +``` + +Hook that is called before any token transfer, including minting and burning. +Allows to run custom logic before updating balances and notifiying sender/recipient by overriding this function. + +#### Parameters + +| Name | Type | Description | +| -------- | :-------: | ------------------------------- | +| `from` | `address` | The sender address | +| `to` | `address` | The recipient address | +| `amount` | `uint256` | The amount of token to transfer | + +
+ +### \_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} function on. | +| `lsp1Data` | `bytes` | the data to be sent to the `from` address in the `universalReceiver` call. | + +
+ +### \_notifyTokenReceiver + +```solidity +function _notifyTokenReceiver( + address to, + bool allowNonLSP1Recipient, + bytes lsp1Data +) internal nonpayable; +``` + +Attempt to notify the token receiver `to` about the `amount` tokens being received. +This is done by calling its [`universalReceiver`](#universalreceiver) function with the `_TYPEID_LSP7_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 `allowNonLSP1Recipient` boolean flag. + +- if `allowNonLSP1Recipient` is set to `true`, nothing will happen and no notification will be sent. + +- if `allowNonLSP1Recipient` is set to `false, the transaction will revert. + +#### Parameters + +| Name | Type | Description | +| ----------------------- | :-------: | --------------------------------------------------------------------------------------------------- | +| `to` | `address` | The address to call the {universalReceiver} function on. | +| `allowNonLSP1Recipient` | `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. | + +
## Events ### AuthorizedOperator -:::note Links +:::note References -- Specification details in [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#authorizedoperator) -- Solidity implementation in [**LSP7DigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) +- 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)` -- Event hash: `0xd66aff874162a96578e919097b6f6d153dfd89a5cec41bb331fdb0c4aec16e2c` +- Event topic hash: `0xd66aff874162a96578e919097b6f6d153dfd89a5cec41bb331fdb0c4aec16e2c` ::: @@ -604,24 +850,26 @@ Transfers ownership of the contract to a new account (`newOwner`). Can only be c event AuthorizedOperator(address indexed operator, address indexed tokenOwner, uint256 indexed amount); ``` +Emitted when `tokenOwner` enables `operator` to transfer or burn the `tokenId`. + #### Parameters -| Name | Type | Description | -| -------------------------- | :-------: | ----------- | -| `operator` **`indexed`** | `address` | - | -| `tokenOwner` **`indexed`** | `address` | - | -| `amount` **`indexed`** | `uint256` | - | +| Name | Type | Description | +| -------------------------- | :-------: | ----------------------------------------------------------------------- | +| `operator` **`indexed`** | `address` | The address authorized as an operator. | +| `tokenOwner` **`indexed`** | `address` | The owner of the `tokenId`. | +| `amount` **`indexed`** | `uint256` | The amount of tokens `operator` address has access to from `tokenOwner` | -<br/> +
### DataChanged -:::note Links +:::note References -- Specification details in [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#datachanged) -- Solidity implementation in [**LSP7DigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#datachanged) +- Solidity implementation: [`LSP7DigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) - Event signature: `DataChanged(bytes32,bytes)` -- Event hash: `0xece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2` +- Event topic hash: `0xece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2` ::: @@ -633,21 +881,21 @@ _Emitted when data at a key is changed_ #### Parameters -| Name | Type | Description | -| ----------------------- | :-------: | ----------- | -| `dataKey` **`indexed`** | `bytes32` | - | -| `dataValue` | `bytes` | - | +| Name | Type | Description | +| ----------------------- | :-------: | ------------------------------------ | +| `dataKey` **`indexed`** | `bytes32` | The data key which data value is set | +| `dataValue` | `bytes` | The data value to set | -<br/> +
### OwnershipTransferred -:::note Links +:::note References -- Specification details in [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#ownershiptransferred) -- Solidity implementation in [**LSP7DigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) +- 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 hash: `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0` +- Event topic hash: `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0` ::: @@ -662,16 +910,16 @@ event OwnershipTransferred(address indexed previousOwner, address indexed newOwn | `previousOwner` **`indexed`** | `address` | - | | `newOwner` **`indexed`** | `address` | - | -<br/> +
### RevokedOperator -:::note Links +:::note References -- Specification details in [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#revokedoperator) -- Solidity implementation in [**LSP7DigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#revokedoperator) +- Solidity implementation: [`LSP7DigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) - Event signature: `RevokedOperator(address,address)` -- Event hash: `0x50546e66e5f44d728365dc3908c63bc5cfeeab470722c1677e3073a6ac294aa1` +- Event topic hash: `0x50546e66e5f44d728365dc3908c63bc5cfeeab470722c1677e3073a6ac294aa1` ::: @@ -679,23 +927,25 @@ event OwnershipTransferred(address indexed previousOwner, address indexed newOwn event RevokedOperator(address indexed operator, address indexed tokenOwner); ``` +Emitted when `tokenOwner` disables `operator` to transfer or burn `tokenId` on its behalf. + #### Parameters -| Name | Type | Description | -| -------------------------- | :-------: | ----------- | -| `operator` **`indexed`** | `address` | - | -| `tokenOwner` **`indexed`** | `address` | - | +| Name | Type | Description | +| -------------------------- | :-------: | --------------------------------------------------------------- | +| `operator` **`indexed`** | `address` | The address revoked from the operator array ({getOperatorsOf}). | +| `tokenOwner` **`indexed`** | `address` | The owner of the `tokenId`. | -<br/> +
### Transfer -:::note Links +:::note References -- Specification details in [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#transfer) -- Solidity implementation in [**LSP7DigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#transfer) +- Solidity implementation: [`LSP7DigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) - Event signature: `Transfer(address,address,address,uint256,bool,bytes)` -- Event hash: `0x3997e418d2cef0b3b0e907b1e39605c3f7d32dbd061e82ea5b4a770d46a160a6` +- Event topic hash: `0x3997e418d2cef0b3b0e907b1e39605c3f7d32dbd061e82ea5b4a770d46a160a6` ::: @@ -703,28 +953,29 @@ event RevokedOperator(address indexed operator, address indexed tokenOwner); event Transfer(address indexed operator, address indexed from, address indexed to, uint256 amount, bool allowNonLSP1Recipient, bytes data); ``` +Emitted when `tokenId` token is transferred from the `from` to the `to` address. + #### Parameters -| Name | Type | Description | -| ------------------------ | :-------: | ----------- | -| `operator` **`indexed`** | `address` | - | -| `from` **`indexed`** | `address` | - | -| `to` **`indexed`** | `address` | - | -| `amount` | `uint256` | - | -| `allowNonLSP1Recipient` | `bool` | - | -| `data` | `bytes` | - | +| Name | Type | Description | +| ------------------------ | :-------: | ---------------------------------------------------------------------------------------------------------------------------------- | +| `operator` **`indexed`** | `address` | The address of operator that sent the `tokenId` | +| `from` **`indexed`** | `address` | The previous owner of the `tokenId` | +| `to` **`indexed`** | `address` | The new owner of `tokenId` | +| `amount` | `uint256` | The amount of tokens transferred. | +| `allowNonLSP1Recipient` | `bool` | If the token transfer enforces the `to` recipient address to be a contract that implements the LSP1 standard or not. | +| `data` | `bytes` | Any additional data the caller included by the caller during the transfer, and sent in the hooks to the `from` and `to` addresses. | -<br/> -<hr/> +
## Errors ### ERC725Y_DataKeysValuesEmptyArray -:::note Links +:::note References -- Specification details in [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#erc725y_datakeysvaluesemptyarray) -- Solidity implementation in [**LSP7DigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#erc725y_datakeysvaluesemptyarray) +- Solidity implementation: [`LSP7DigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) - Error signature: `ERC725Y_DataKeysValuesEmptyArray()` - Error hash: `0x97da5f95` @@ -736,14 +987,14 @@ error ERC725Y_DataKeysValuesEmptyArray(); reverts when one of the array parameter provided to `setDataBatch` is an empty array -<br/> +
### ERC725Y_DataKeysValuesLengthMismatch -:::note Links +:::note References -- Specification details in [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#erc725y_datakeysvalueslengthmismatch) -- Solidity implementation in [**LSP7DigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#erc725y_datakeysvalueslengthmismatch) +- Solidity implementation: [`LSP7DigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) - Error signature: `ERC725Y_DataKeysValuesLengthMismatch()` - Error hash: `0x3bcc8979` @@ -755,14 +1006,14 @@ error ERC725Y_DataKeysValuesLengthMismatch(); reverts when there is not the same number of elements in the lists of data keys and data values when calling setDataBatch. -<br/> +
### ERC725Y_MsgValueDisallowed -:::note Links +:::note References -- Specification details in [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#erc725y_msgvaluedisallowed) -- Solidity implementation in [**LSP7DigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#erc725y_msgvaluedisallowed) +- Solidity implementation: [`LSP7DigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) - Error signature: `ERC725Y_MsgValueDisallowed()` - Error hash: `0xf36ba737` @@ -774,14 +1025,14 @@ error ERC725Y_MsgValueDisallowed(); reverts when sending value to the `setData(..)` functions -<br/> +
### LSP4TokenNameNotEditable -:::note Links +:::note References -- Specification details in [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp4tokennamenoteditable) -- Solidity implementation in [**LSP7DigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp4tokennamenoteditable) +- Solidity implementation: [`LSP7DigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) - Error signature: `LSP4TokenNameNotEditable()` - Error hash: `0x85c169bd` @@ -793,14 +1044,14 @@ 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. -<br/> +
### LSP4TokenSymbolNotEditable -:::note Links +:::note References -- Specification details in [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp4tokensymbolnoteditable) -- Solidity implementation in [**LSP7DigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp4tokensymbolnoteditable) +- Solidity implementation: [`LSP7DigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) - Error signature: `LSP4TokenSymbolNotEditable()` - Error hash: `0x76755b38` @@ -812,14 +1063,14 @@ 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. -<br/> +
### LSP7AmountExceedsAuthorizedAmount -:::note Links +:::note References -- Specification details in [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7amountexceedsauthorizedamount) -- Solidity implementation in [**LSP7DigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7amountexceedsauthorizedamount) +- Solidity implementation: [`LSP7DigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) - Error signature: `LSP7AmountExceedsAuthorizedAmount(address,uint256,address,uint256)` - Error hash: `0xf3a6b691` @@ -845,14 +1096,14 @@ reverts when `operator` of `tokenOwner` send an `amount` of tokens larger than t | `operator` | `address` | - | | `amount` | `uint256` | - | -<br/> +
### LSP7AmountExceedsBalance -:::note Links +:::note References -- Specification details in [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7amountexceedsbalance) -- Solidity implementation in [**LSP7DigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7amountexceedsbalance) +- Solidity implementation: [`LSP7DigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) - Error signature: `LSP7AmountExceedsBalance(uint256,address,uint256)` - Error hash: `0x08d47949` @@ -876,14 +1127,14 @@ reverts when sending an `amount` of tokens larger than the current `balance` of | `tokenOwner` | `address` | - | | `amount` | `uint256` | - | -<br/> +
### LSP7CannotSendToSelf -:::note Links +:::note References -- Specification details in [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7cannotsendtoself) -- Solidity implementation in [**LSP7DigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7cannotsendtoself) +- Solidity implementation: [`LSP7DigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) - Error signature: `LSP7CannotSendToSelf()` - Error hash: `0xb9afb000` @@ -895,14 +1146,14 @@ error LSP7CannotSendToSelf(); reverts when specifying the same address for `from` or `to` in a token transfer. -<br/> +
### LSP7CannotSendWithAddressZero -:::note Links +:::note References -- Specification details in [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7cannotsendwithaddresszero) -- Solidity implementation in [**LSP7DigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7cannotsendwithaddresszero) +- Solidity implementation: [`LSP7DigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) - Error signature: `LSP7CannotSendWithAddressZero()` - Error hash: `0xd2d5ec30` @@ -920,14 +1171,14 @@ reverts when trying to: - transfer tokens from or to the zero address. -<br/> +
### LSP7CannotUseAddressZeroAsOperator -:::note Links +:::note References -- Specification details in [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7cannotuseaddresszeroasoperator) -- Solidity implementation in [**LSP7DigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7cannotuseaddresszeroasoperator) +- Solidity implementation: [`LSP7DigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) - Error signature: `LSP7CannotUseAddressZeroAsOperator()` - Error hash: `0x6355e766` @@ -939,14 +1190,14 @@ error LSP7CannotUseAddressZeroAsOperator(); reverts when trying to set the zero address as an operator. -<br/> +
### LSP7DecreasedAllowanceBelowZero -:::note Links +:::note References -- Specification details in [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7decreasedallowancebelowzero) -- Solidity implementation in [**LSP7DigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7decreasedallowancebelowzero) +- Solidity implementation: [`LSP7DigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) - Error signature: `LSP7DecreasedAllowanceBelowZero()` - Error hash: `0x0ef76c35` @@ -958,14 +1209,14 @@ error LSP7DecreasedAllowanceBelowZero(); Reverts when trying to decrease an operator's allowance to more than its current allowance. -<br/> +
### LSP7InvalidTransferBatch -:::note Links +:::note References -- Specification details in [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7invalidtransferbatch) -- Solidity implementation in [**LSP7DigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7invalidtransferbatch) +- Solidity implementation: [`LSP7DigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) - Error signature: `LSP7InvalidTransferBatch()` - Error hash: `0x263eee8d` @@ -977,14 +1228,14 @@ error LSP7InvalidTransferBatch(); reverts when the array parameters used in [`transferBatch`](#transferbatch) have different lengths. -<br/> +
### LSP7NotifyTokenReceiverContractMissingLSP1Interface -:::note Links +:::note References -- Specification details in [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7notifytokenreceivercontractmissinglsp1interface) -- Solidity implementation in [**LSP7DigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7notifytokenreceivercontractmissinglsp1interface) +- Solidity implementation: [`LSP7DigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) - Error signature: `LSP7NotifyTokenReceiverContractMissingLSP1Interface(address)` - Error hash: `0xa608fbb6` @@ -1004,14 +1255,14 @@ reverts if the `tokenReceiver` does not implement LSP1 when minting or transferr | --------------- | :-------: | ----------- | | `tokenReceiver` | `address` | - | -<br/> +
### LSP7NotifyTokenReceiverIsEOA -:::note Links +:::note References -- Specification details in [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7notifytokenreceiveriseoa) -- Solidity implementation in [**LSP7DigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7notifytokenreceiveriseoa) +- Solidity implementation: [`LSP7DigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) - Error signature: `LSP7NotifyTokenReceiverIsEOA(address)` - Error hash: `0x26c247f4` @@ -1029,14 +1280,14 @@ reverts if the `tokenReceiver` is an EOA when minting or transferring tokens wit | --------------- | :-------: | ----------- | | `tokenReceiver` | `address` | - | -<br/> +
### LSP7TokenOwnerCannotBeOperator -:::note Links +:::note References -- Specification details in [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7tokenownercannotbeoperator) -- Solidity implementation in [**LSP7DigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7tokenownercannotbeoperator) +- Solidity implementation: [`LSP7DigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/LSP7DigitalAsset.sol) - Error signature: `LSP7TokenOwnerCannotBeOperator()` - Error hash: `0xdab75047` @@ -1048,7 +1299,7 @@ error LSP7TokenOwnerCannotBeOperator(); reverts when trying to authorize or revoke the token's owner as an operator. -<br/> +
diff --git a/docs/contracts/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.md b/docs/contracts/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.md index 55740f5dc7..21e7e45a58 100644 --- a/docs/contracts/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.md +++ b/docs/contracts/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.md @@ -1,21 +1,32 @@ + + + # LSP7Burnable -:::info Solidity contract +:::info Standard Specifications + +[`LSP-7-DigitalAsset`](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md) + +::: +:::info Solidity implementation -[`LSP7Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Burnable) +[`LSP7Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol) ::: > LSP7 token extension that allows token holders to destroy both their own tokens and those that they have an allowance for as an operator. -## Methods +## Public Methods + +Public methods are accessible externally from users, allowing interaction with this function from dApps or other smart contracts. +When marked as 'public', a method can be called both externally and internally, on the other hand, when marked as 'external', a method can only be called externally. ### authorizeOperator -:::note Links +:::note References -- Specification details in [**LSP-7-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Burnable.md#authorizeoperator) -- Solidity implementation in [**LSP7Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Burnable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#authorizeoperator) +- Solidity implementation: [`LSP7Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol) - Function signature: `authorizeOperator(address,uint256)` - Function selector: `0x47980aa3` @@ -43,12 +54,14 @@ Sets an `amount` of tokens that an `operator` has access from the caller's balan | `operator` | `address` | The address to authorize as an operator. | | `amount` | `uint256` | The allowance amount of tokens operator has access to. | +
+ ### authorizedAmountFor -:::note Links +:::note References -- Specification details in [**LSP-7-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Burnable.md#authorizedamountfor) -- Solidity implementation in [**LSP7Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Burnable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#authorizedamountfor) +- Solidity implementation: [`LSP7Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol) - Function signature: `authorizedAmountFor(address,address)` - Function selector: `0x65aeaa95` @@ -65,23 +78,25 @@ Get the amount of tokens `operator` address has access to from `tokenOwner`. Ope #### Parameters -| Name | Type | Description | -| ------------ | :-------: | -------------------------------------------------------------- | -| `operator` | `address` | The operator's address to query the authorized amount for. | -| `tokenOwner` | `address` | The token owner that `operator` has allowance on. | +| Name | Type | Description | +| ------------ | :-------: | ---------------------------------------------------------- | +| `operator` | `address` | The operator's address to query the authorized amount for. | +| `tokenOwner` | `address` | The token owner that `operator` has allowance on. | #### Returns -| Name | Type | Description | -| ---- | :-------: | ----------------------------------------------------------------------------------------------- | -| `0` | `uint256` | The amount of tokens the `operator`'s address has access on the `tokenOwner`'s balance. | +| Name | Type | Description | +| ---- | :-------: | --------------------------------------------------------------------------------------- | +| `0` | `uint256` | The amount of tokens the `operator`'s address has access on the `tokenOwner`'s balance. | + +
### balanceOf -:::note Links +:::note References -- Specification details in [**LSP-7-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Burnable.md#balanceof) -- Solidity implementation in [**LSP7Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Burnable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#balanceof) +- Solidity implementation: [`LSP7Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol) - Function signature: `balanceOf(address)` - Function selector: `0x70a08231` @@ -105,12 +120,14 @@ Get the number of tokens owned by `tokenOwner`. If the token is divisible (the [ | ---- | :-------: | ------------------------------------------- | | `0` | `uint256` | The amount of tokens owned by `tokenOwner`. | +
+ ### burn -:::note Links +:::note References -- Specification details in [**LSP-7-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Burnable.md#burn) -- Solidity implementation in [**LSP7Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Burnable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#burn) +- Solidity implementation: [`LSP7Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol) - Function signature: `burn(address,uint256,bytes)` - Function selector: `0x44d17187` @@ -130,12 +147,14 @@ See internal [`_burn`](#_burn) function for details. | `amount` | `uint256` | - | | `data` | `bytes` | - | +
+ ### decimals -:::note Links +:::note References -- Specification details in [**LSP-7-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Burnable.md#decimals) -- Solidity implementation in [**LSP7Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Burnable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#decimals) +- Solidity implementation: [`LSP7Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol) - Function signature: `decimals()` - Function selector: `0x313ce567` @@ -153,12 +172,14 @@ Returns the number of decimals used to get its user representation. If the asset | ---- | :-----: | ----------------------------------------------------------------------- | | `0` | `uint8` | the number of decimals. If `0` is returned, the asset is non-divisible. | +
+ ### decreaseAllowance -:::note Links +:::note References -- Specification details in [**LSP-7-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Burnable.md#decreaseallowance) -- Solidity implementation in [**LSP7Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Burnable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#decreaseallowance) +- Solidity implementation: [`LSP7Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol) - Function signature: `decreaseAllowance(address,uint256)` - Function selector: `0xa457c2d7` @@ -201,17 +222,19 @@ Atomically decreases the allowance granted to `operator` by the caller. This is #### Parameters -| Name | Type | Description | -| ------------------- | :-------: | ---------------------------------------------------------- | -| `operator` | `address` | the operator to decrease allowance for `msg.sender` | -| `substractedAmount` | `uint256` | the amount to decrease by in the operator's allowance. | +| Name | Type | Description | +| ------------------- | :-------: | ------------------------------------------------------ | +| `operator` | `address` | the operator to decrease allowance for `msg.sender` | +| `substractedAmount` | `uint256` | the amount to decrease by in the operator's allowance. | + +
### getData -:::note Links +:::note References -- Specification details in [**LSP-7-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Burnable.md#getdata) -- Solidity implementation in [**LSP7Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Burnable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#getdata) +- Solidity implementation: [`LSP7Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol) - Function signature: `getData(bytes32)` - Function selector: `0x54f6127f` @@ -221,28 +244,28 @@ Atomically decreases the allowance granted to `operator` by the caller. This is function getData(bytes32 dataKey) external view returns (bytes dataValue); ``` -_Reading the ERC725Y storage for data key `dataKey` returned the following value: `dataValue`._ - -Get in the ERC725Y storage the bytes data stored at a specific data key `dataKey`. +_Gets singular data at a given `dataKey`_ #### Parameters -| Name | Type | Description | -| --------- | :-------: | --------------------------------------------- | -| `dataKey` | `bytes32` | The data key for which to retrieve the value. | +| Name | Type | Description | +| --------- | :-------: | ------------------------------- | +| `dataKey` | `bytes32` | The key which value to retrieve | #### Returns -| Name | Type | Description | -| ----------- | :-----: | ---------------------------------------------------- | -| `dataValue` | `bytes` | The bytes value stored under the specified data key. | +| Name | Type | Description | +| ----------- | :-----: | -------------------------- | +| `dataValue` | `bytes` | The data stored at the key | + +
### getDataBatch -:::note Links +:::note References -- Specification details in [**LSP-7-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Burnable.md#getdatabatch) -- Solidity implementation in [**LSP7Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Burnable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#getdatabatch) +- Solidity implementation: [`LSP7Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol) - Function signature: `getDataBatch(bytes32[])` - Function selector: `0xdedff9c6` @@ -254,9 +277,7 @@ function getDataBatch( ) external view returns (bytes[] dataValues); ``` -_Reading the ERC725Y storage for data keys `dataKeys` returned the following values: `dataValues`._ - -Get in the ERC725Y storage the bytes data stored at multiple data keys `dataKeys`. +_Gets array of data for multiple given keys_ #### Parameters @@ -270,12 +291,14 @@ Get in the ERC725Y storage the bytes data stored at multiple data keys `dataKeys | ------------ | :-------: | ----------------------------------------- | | `dataValues` | `bytes[]` | The array of data stored at multiple keys | +
+ ### increaseAllowance -:::note Links +:::note References -- Specification details in [**LSP-7-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Burnable.md#increaseallowance) -- Solidity implementation in [**LSP7Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Burnable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#increaseallowance) +- Solidity implementation: [`LSP7Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol) - Function signature: `increaseAllowance(address,uint256)` - Function selector: `0x39509351` @@ -317,17 +340,19 @@ Atomically increases the allowance granted to `operator` by the caller. This is #### Parameters -| Name | Type | Description | -| ------------- | :-------: | --------------------------------------------------------------------------- | -| `operator` | `address` | the operator to increase the allowance for `msg.sender` | -| `addedAmount` | `uint256` | the additional amount to add on top of the current operator's allowance | +| Name | Type | Description | +| ------------- | :-------: | ----------------------------------------------------------------------- | +| `operator` | `address` | the operator to increase the allowance for `msg.sender` | +| `addedAmount` | `uint256` | the additional amount to add on top of the current operator's allowance | + +
### owner -:::note Links +:::note References -- Specification details in [**LSP-7-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Burnable.md#owner) -- Solidity implementation in [**LSP7Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Burnable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#owner) +- Solidity implementation: [`LSP7Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol) - Function signature: `owner()` - Function selector: `0x8da5cb5b` @@ -345,12 +370,14 @@ Returns the address of the current owner. | ---- | :-------: | ----------- | | `0` | `address` | - | +
+ ### renounceOwnership -:::note Links +:::note References -- Specification details in [**LSP-7-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Burnable.md#renounceownership) -- Solidity implementation in [**LSP7Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Burnable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#renounceownership) +- Solidity implementation: [`LSP7Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol) - Function signature: `renounceOwnership()` - Function selector: `0x715018a6` @@ -362,12 +389,14 @@ function renounceOwnership() external nonpayable; Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner. +
+ ### revokeOperator -:::note Links +:::note References -- Specification details in [**LSP-7-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Burnable.md#revokeoperator) -- Solidity implementation in [**LSP7Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Burnable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#revokeoperator) +- Solidity implementation: [`LSP7Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol) - Function signature: `revokeOperator(address)` - Function selector: `0xfad8b32a` @@ -385,108 +414,68 @@ Removes the `operator` address as an operator of callers tokens, disallowing it | ---------- | :-------: | ------------------------------------- | | `operator` | `address` | The address to revoke as an operator. | +
+ ### setData -:::note Links +:::note References -- Specification details in [**LSP-7-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Burnable.md#setdata) -- Solidity implementation in [**LSP7Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Burnable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#setdata) +- Solidity implementation: [`LSP7Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol) - Function signature: `setData(bytes32,bytes)` - Function selector: `0x7f23690c` ::: -:::caution Warning - -**Note for developers:** despite the fact that this function is set as `payable`, if the function is not intended to receive value (= native tokens), **an additional check should be implemented to ensure that `msg.value` sent was equal to 0**. - -::: - ```solidity function setData(bytes32 dataKey, bytes dataValue) external payable; ``` -_Setting the following data key value pair in the ERC725Y storage. Data key: `dataKey`, data value: `dataValue`. _ - -Sets a single bytes value `dataValue` in the ERC725Y storage for a specific data key `dataKey`. The function is marked as payable to enable flexibility on child contracts. For instance to implement a fee mechanism for setting specific data. - -- -**Requirements:** - -- SHOULD only be callable by the [`owner`](#owner). - -- -- -**Emitted events:** - -- [`DataChanged`](#datachanged) event. - -+_Sets singular data for a given `dataKey`_ #### Parameters -| Name | Type | Description | -| ----------- | :-------: | ------------------------------------------ | -| `dataKey` | `bytes32` | The data key for which to set a new value. | -| `dataValue` | `bytes` | The new bytes value to set. | +| Name | Type | Description | +| ----------- | :-------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `dataKey` | `bytes32` | The key to retrieve stored value | +| `dataValue` | `bytes` | The value to set SHOULD only be callable by the owner of the contract set via ERC173 The function is marked as payable to enable flexibility on child contracts If the function is not intended to receive value, an additional check should be implemented to check that value equal 0. Emits a {DataChanged} event. | + +
### setDataBatch -:::note Links +:::note References -- Specification details in [**LSP-7-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Burnable.md#setdatabatch) -- Solidity implementation in [**LSP7Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Burnable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#setdatabatch) +- Solidity implementation: [`LSP7Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol) - Function signature: `setDataBatch(bytes32[],bytes[])` - Function selector: `0x97902421` ::: -:::caution Warning - -**Note for developers:** despite the fact that this function is set as `payable`, if the function is not intended to receive value (= native tokens), **an additional check should be implemented to ensure that `msg.value` sent was equal to 0**. - -::: - ```solidity function setDataBatch(bytes32[] dataKeys, bytes[] dataValues) external payable; ``` -_Setting the following data key value pairs in the ERC725Y storage. Data keys: `dataKeys`, data values: `dataValues`. _ - -Batch data setting function that behaves the same as [`setData`](#setdata) but allowing to set multiple data key/value pairs in the ERC725Y storage in the same transaction. - -- -**Requirements:** - -- SHOULD only be callable by the [`owner`](#owner) of the contract. - -- -- -**Emitted events:** - -- [`DataChanged`](#datachanged) event **for each data key/value pair set**. +Sets array of data for multiple given `dataKeys` SHOULD only be callable by the owner of the contract set via ERC173 The function is marked as payable to enable flexibility on child contracts If the function is not intended to receive value, an additional check should be implemented to check that value equal -+0. Emits a [`DataChanged`](#datachanged) event. #### Parameters -| Name | Type | Description | -| ------------ | :---------: | ---------------------------------------------------- | -| `dataKeys` | `bytes32[]` | An array of data keys to set bytes values for. | -| `dataValues` | `bytes[]` | An array of bytes values to set for each `dataKeys`. | +| Name | Type | Description | +| ------------ | :---------: | ---------------------------------------- | +| `dataKeys` | `bytes32[]` | The array of data keys for values to set | +| `dataValues` | `bytes[]` | The array of values to set | + +
### supportsInterface -:::note Links +:::note References -- Specification details in [**LSP-7-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Burnable.md#supportsinterface) -- Solidity implementation in [**LSP7Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Burnable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#supportsinterface) +- Solidity implementation: [`LSP7Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol) - Function signature: `supportsInterface(bytes4)` - Function selector: `0x01ffc9a7` @@ -510,12 +499,14 @@ Returns true if this contract implements the interface defined by `interfaceId`. | ---- | :----: | ----------- | | `0` | `bool` | - | +
+ ### totalSupply -:::note Links +:::note References -- Specification details in [**LSP-7-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Burnable.md#totalsupply) -- Solidity implementation in [**LSP7Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Burnable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#totalsupply) +- Solidity implementation: [`LSP7Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol) - Function signature: `totalSupply()` - Function selector: `0x18160ddd` @@ -533,12 +524,14 @@ Returns the number of existing tokens that have been minted in this contract. | ---- | :-------: | ------------------------------ | | `0` | `uint256` | The number of existing tokens. | +
+ ### transfer -:::note Links +:::note References -- Specification details in [**LSP-7-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Burnable.md#transfer) -- Solidity implementation in [**LSP7Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Burnable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#transfer) +- Solidity implementation: [`LSP7Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol) - Function signature: `transfer(address,address,uint256,bool,bytes)` - Function selector: `0x760d9bba` @@ -566,12 +559,14 @@ Transfers an `amount` of tokens from the `from` address to the `to` address and | `allowNonLSP1Recipient` | `bool` | When set to `true`, the `to` address CAN be any address. When set to `false`, the `to` address MUST be a contract that supports the LSP1 UniversalReceiver standard. | | `data` | `bytes` | Any additional data the caller wants included in the emitted event, and sent in the hooks of the `from` and `to` addresses. | +
+ ### transferBatch -:::note Links +:::note References -- Specification details in [**LSP-7-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Burnable.md#transferbatch) -- Solidity implementation in [**LSP7Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Burnable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#transferbatch) +- Solidity implementation: [`LSP7Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol) - Function signature: `transferBatch(address[],address[],uint256[],bool[],bytes[])` - Function selector: `0x2d7667c9` @@ -595,16 +590,18 @@ Same as [`transfer(...)`](#`transfer) but transfer multiple tokens based on the | ----------------------- | :---------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `from` | `address[]` | An array of sending addresses. | | `to` | `address[]` | An array of receiving addresses. | -| `amount` | `uint256[]` | An array of amount of tokens to transfer for each `from -> to` transfer. | +| `amount` | `uint256[]` | An array of amount of tokens to transfer for each `from -> to` transfer. | | `allowNonLSP1Recipient` | `bool[]` | For each transfer, when set to `true`, the `to` address CAN be any address. When set to `false`, the `to` address MUST be a contract that supports the LSP1 UniversalReceiver standard. | | `data` | `bytes[]` | An array of additional data the caller wants included in the emitted event, and sent in the hooks to `from` and `to` addresses. | +
+ ### transferOwnership -:::note Links +:::note References -- Specification details in [**LSP-7-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Burnable.md#transferownership) -- Solidity implementation in [**LSP7Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Burnable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#transferownership) +- Solidity implementation: [`LSP7Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol) - Function signature: `transferOwnership(address)` - Function selector: `0xf2fde38b` @@ -622,18 +619,255 @@ Transfers ownership of the contract to a new account (`newOwner`). Can only be c | ---------- | :-------: | ----------- | | `newOwner` | `address` | - | ---- +
+ +## Internal Methods + +Any method labeled as `internal` serves as utility function within the contract. They can be used when writing solidity contracts that inherit from this contract. These methods can be extended or modified by overriding their internal behavior to suit specific needs. + +Internal functions cannot be called externally, whether from other smart contracts, dApp interfaces, or backend services. Their restricted accessibility ensures that they remain exclusively available within the context of the current contract, promoting controlled and encapsulated usage of these internal utilities. + +### \_checkOwner + +```solidity +function _checkOwner() internal view; +``` + +Throws if the sender is not the owner. + +
+ +### \_setOwner + +```solidity +function _setOwner(address newOwner) internal nonpayable; +``` + +Changes the owner if `newOwner` and oldOwner are different +This pattern is useful in inheritance. + +
+ +### \_getData + +```solidity +function _getData(bytes32 dataKey) internal view returns (bytes dataValue); +``` + +
+ +### \_setData + +```solidity +function _setData(bytes32 dataKey, bytes dataValue) internal nonpayable; +``` + +Save gas by emitting the [`DataChanged`](#datachanged) event with only the first 256 bytes of dataValue + +
+ +### \_updateOperator + +```solidity +function _updateOperator( + address tokenOwner, + address operator, + uint256 amount +) internal nonpayable; +``` + +Changes token `amount` the `operator` has access to from `tokenOwner` tokens. +If the amount is zero then the operator is being revoked, otherwise the operator amount is being modified. + +
+ +### \_mint + +```solidity +function _mint( + address to, + uint256 amount, + bool allowNonLSP1Recipient, + bytes data +) internal nonpayable; +``` + +Mints `amount` of tokens and transfers it to `to`. + ++ +**Emitted events:** + +- [`Transfer`](#transfer) event with `address(0)` as `from`. + ++ +#### Parameters + +| Name | Type | Description | +| ----------------------- | :-------: | ------------------------------------------------------------------------------------------------------------------------- | +| `to` | `address` | the address to mint tokens for. | +| `amount` | `uint256` | the amount of tokens to mint. | +| `allowNonLSP1Recipient` | `bool` | a boolean that describe if transfer to a `to` address that does not support LSP1 is allowed or not. | +| `data` | `bytes` | Additional data the caller wants included in the emitted {Transfer} event, and sent in the LSP1 hook to the `to` address. | + +
+ +### \_burn + +:::tip Hint + +In dApps, you can know which address is burning tokens by listening for the `Transfer` event and filter with the zero address as `to`. + +::: + +```solidity +function _burn(address from, uint256 amount, bytes data) internal nonpayable; +``` + +Burns (= destroys) `amount` of tokens, decrease the `from` balance. This is done by sending them to the zero address. +Both the sender and recipient will be notified of the token transfer through the LSP1 [`universalReceiver`](#universalreceiver) +function, if they are contracts that support the LSP1 interface. Their `universalReceiver` function will receive +all the parameters in the calldata packed encoded. +Any logic in the [`_beforeTokenTransfer`](#_beforetokentransfer) function will run before updating the balances. + ++ +**Emitted events:** + +- [`Transfer`](#transfer) event with `address(0)` as the `to` address + ++ +#### Parameters + +| Name | Type | Description | +| -------- | :-------: | ------------------------------------------------------------------------------------------------------------------------- | +| `from` | `address` | the address to burn tokens from its balance. | +| `amount` | `uint256` | the amount of tokens to burn. | +| `data` | `bytes` | Additional data the caller wants included in the emitted event, and sent in the LSP1 hook to the `from` and `to` address. | + +
+ +### \_transfer + +```solidity +function _transfer( + address from, + address to, + uint256 amount, + bool allowNonLSP1Recipient, + bytes data +) internal nonpayable; +``` + +Transfer tokens from `from` to `to` by decreasing the balance of `from` by `-amount` and increasing the balance +of `to` by `+amount`. +Both the sender and recipient will be notified of the token transfer through the LSP1 [`universalReceiver`](#universalreceiver) +function, if they are contracts that support the LSP1 interface. Their `universalReceiver` function will receive +all the parameters in the calldata packed encoded. +Any logic in the [`_beforeTokenTransfer`](#_beforetokentransfer) function will run before updating the balances. + ++ +**Emitted events:** + +- [`Transfer`](#transfer) event. + ++ +#### Parameters + +| Name | Type | Description | +| ----------------------- | :-------: | ------------------------------------------------------------------------------------------------------------------------- | +| `from` | `address` | the address to decrease the balance. | +| `to` | `address` | the address to increase the balance. | +| `amount` | `uint256` | the amount of tokens to transfer from `from` to `to`. | +| `allowNonLSP1Recipient` | `bool` | a boolean that describe if transfer to a `to` address that does not support LSP1 is allowed or not. | +| `data` | `bytes` | Additional data the caller wants included in the emitted event, and sent in the LSP1 hook to the `from` and `to` address. | + +
+ +### \_beforeTokenTransfer + +```solidity +function _beforeTokenTransfer( + address from, + address to, + uint256 amount +) internal nonpayable; +``` + +Hook that is called before any token transfer, including minting and burning. +Allows to run custom logic before updating balances and notifiying sender/recipient by overriding this function. + +#### Parameters + +| Name | Type | Description | +| -------- | :-------: | ------------------------------- | +| `from` | `address` | The sender address | +| `to` | `address` | The recipient address | +| `amount` | `uint256` | The amount of token to transfer | + +
+ +### \_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} function on. | +| `lsp1Data` | `bytes` | the data to be sent to the `from` address in the `universalReceiver` call. | + +
+ +### \_notifyTokenReceiver + +```solidity +function _notifyTokenReceiver( + address to, + bool allowNonLSP1Recipient, + bytes lsp1Data +) internal nonpayable; +``` + +Attempt to notify the token receiver `to` about the `amount` tokens being received. +This is done by calling its [`universalReceiver`](#universalreceiver) function with the `_TYPEID_LSP7_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 `allowNonLSP1Recipient` boolean flag. + +- if `allowNonLSP1Recipient` is set to `true`, nothing will happen and no notification will be sent. + +- if `allowNonLSP1Recipient` is set to `false, the transaction will revert. + +#### Parameters + +| Name | Type | Description | +| ----------------------- | :-------: | --------------------------------------------------------------------------------------------------- | +| `to` | `address` | The address to call the {universalReceiver} function on. | +| `allowNonLSP1Recipient` | `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. | + +
## Events ### AuthorizedOperator -:::note Links +:::note References -- Specification details in [**LSP-7-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Burnable.md#authorizedoperator) -- Solidity implementation in [**LSP7Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Burnable) +- 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)` -- Event hash: `0xd66aff874162a96578e919097b6f6d153dfd89a5cec41bb331fdb0c4aec16e2c` +- Event topic hash: `0xd66aff874162a96578e919097b6f6d153dfd89a5cec41bb331fdb0c4aec16e2c` ::: @@ -641,24 +875,26 @@ Transfers ownership of the contract to a new account (`newOwner`). Can only be c event AuthorizedOperator(address indexed operator, address indexed tokenOwner, uint256 indexed amount); ``` -Emitted when `tokenOwner` enables `operator` for `amount` tokens. +Emitted when `tokenOwner` enables `operator` to transfer or burn the `tokenId`. #### Parameters | Name | Type | Description | | -------------------------- | :-------: | ----------------------------------------------------------------------- | -| `operator` **`indexed`** | `address` | The address authorized as an operator | -| `tokenOwner` **`indexed`** | `address` | The token owner | +| `operator` **`indexed`** | `address` | The address authorized as an operator. | +| `tokenOwner` **`indexed`** | `address` | The owner of the `tokenId`. | | `amount` **`indexed`** | `uint256` | The amount of tokens `operator` address has access to from `tokenOwner` | +
+ ### DataChanged -:::note Links +:::note References -- Specification details in [**LSP-7-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Burnable.md#datachanged) -- Solidity implementation in [**LSP7Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Burnable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#datachanged) +- Solidity implementation: [`LSP7Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol) - Event signature: `DataChanged(bytes32,bytes)` -- Event hash: `0xece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2` +- Event topic hash: `0xece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2` ::: @@ -666,25 +902,25 @@ Emitted when `tokenOwner` enables `operator` for `amount` tokens. 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`. +_Emitted when data at a key is changed_ #### 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 | +| ----------------------- | :-------: | ------------------------------------ | +| `dataKey` **`indexed`** | `bytes32` | The data key which data value is set | +| `dataValue` | `bytes` | The data value to set | + +
### OwnershipTransferred -:::note Links +:::note References -- Specification details in [**LSP-7-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Burnable.md#ownershiptransferred) -- Solidity implementation in [**LSP7Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Burnable) +- 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 hash: `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0` +- Event topic hash: `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0` ::: @@ -699,14 +935,16 @@ event OwnershipTransferred(address indexed previousOwner, address indexed newOwn | `previousOwner` **`indexed`** | `address` | - | | `newOwner` **`indexed`** | `address` | - | +
+ ### RevokedOperator -:::note Links +:::note References -- Specification details in [**LSP-7-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Burnable.md#revokedoperator) -- Solidity implementation in [**LSP7Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Burnable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#revokedoperator) +- Solidity implementation: [`LSP7Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol) - Event signature: `RevokedOperator(address,address)` -- Event hash: `0x50546e66e5f44d728365dc3908c63bc5cfeeab470722c1677e3073a6ac294aa1` +- Event topic hash: `0x50546e66e5f44d728365dc3908c63bc5cfeeab470722c1677e3073a6ac294aa1` ::: @@ -714,23 +952,25 @@ event OwnershipTransferred(address indexed previousOwner, address indexed newOwn event RevokedOperator(address indexed operator, address indexed tokenOwner); ``` -Emitted when `tokenOwner` disables `operator` for `amount` tokens and set its [`authorizedAmountFor(...)`](#`authorizedamountfor) to `0`. +Emitted when `tokenOwner` disables `operator` to transfer or burn `tokenId` on its behalf. #### Parameters -| Name | Type | Description | -| -------------------------- | :-------: | ---------------------------------- | -| `operator` **`indexed`** | `address` | The address revoked from operating | -| `tokenOwner` **`indexed`** | `address` | The token owner | +| Name | Type | Description | +| -------------------------- | :-------: | --------------------------------------------------------------- | +| `operator` **`indexed`** | `address` | The address revoked from the operator array ({getOperatorsOf}). | +| `tokenOwner` **`indexed`** | `address` | The owner of the `tokenId`. | + +
### Transfer -:::note Links +:::note References -- Specification details in [**LSP-7-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Burnable.md#transfer) -- Solidity implementation in [**LSP7Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Burnable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#transfer) +- Solidity implementation: [`LSP7Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol) - Event signature: `Transfer(address,address,address,uint256,bool,bytes)` -- Event hash: `0x3997e418d2cef0b3b0e907b1e39605c3f7d32dbd061e82ea5b4a770d46a160a6` +- Event topic hash: `0x3997e418d2cef0b3b0e907b1e39605c3f7d32dbd061e82ea5b4a770d46a160a6` ::: @@ -738,29 +978,29 @@ Emitted when `tokenOwner` disables `operator` for `amount` tokens and set its [` event Transfer(address indexed operator, address indexed from, address indexed to, uint256 amount, bool allowNonLSP1Recipient, bytes data); ``` -Emitted when the `from` transferred successfully `amount` of tokens to `to`. +Emitted when `tokenId` token is transferred from the `from` to the `to` address. #### Parameters -| Name | Type | Description | -| ------------------------ | :-------: | ---------------------------------------------------------------------------------------------------------------------------- | -| `operator` **`indexed`** | `address` | The address of the operator that executed the transfer. | -| `from` **`indexed`** | `address` | The address which tokens were sent from (balance decreased by `-amount`). | -| `to` **`indexed`** | `address` | The address that received the tokens (balance increased by `+amount`). | -| `amount` | `uint256` | The amount of tokens transferred. | -| `allowNonLSP1Recipient` | `bool` | if the transferred enforced the `to` recipient address to be a contract that implements the LSP1 standard or not. | -| `data` | `bytes` | Any additional data included by the caller during the transfer, and sent in the LSP1 hooks to the `from` and `to` addresses. | +| Name | Type | Description | +| ------------------------ | :-------: | ---------------------------------------------------------------------------------------------------------------------------------- | +| `operator` **`indexed`** | `address` | The address of operator that sent the `tokenId` | +| `from` **`indexed`** | `address` | The previous owner of the `tokenId` | +| `to` **`indexed`** | `address` | The new owner of `tokenId` | +| `amount` | `uint256` | The amount of tokens transferred. | +| `allowNonLSP1Recipient` | `bool` | If the token transfer enforces the `to` recipient address to be a contract that implements the LSP1 standard or not. | +| `data` | `bytes` | Any additional data the caller included by the caller during the transfer, and sent in the hooks to the `from` and `to` addresses. | ---- +
## Errors ### ERC725Y_DataKeysValuesEmptyArray -:::note Links +:::note References -- Specification details in [**LSP-7-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Burnable.md#erc725y_datakeysvaluesemptyarray) -- Solidity implementation in [**LSP7Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Burnable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#erc725y_datakeysvaluesemptyarray) +- Solidity implementation: [`LSP7Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol) - Error signature: `ERC725Y_DataKeysValuesEmptyArray()` - Error hash: `0x97da5f95` @@ -770,14 +1010,16 @@ Emitted when the `from` transferred successfully `amount` of tokens to `to`. error ERC725Y_DataKeysValuesEmptyArray(); ``` -Reverts when one of the array parameter provided to [`setDataBatch`](#setdatabatch) function is an empty array. +reverts when one of the array parameter provided to `setDataBatch` is an empty array + +
### ERC725Y_DataKeysValuesLengthMismatch -:::note Links +:::note References -- Specification details in [**LSP-7-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Burnable.md#erc725y_datakeysvalueslengthmismatch) -- Solidity implementation in [**LSP7Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Burnable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#erc725y_datakeysvalueslengthmismatch) +- Solidity implementation: [`LSP7Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol) - Error signature: `ERC725Y_DataKeysValuesLengthMismatch()` - Error hash: `0x3bcc8979` @@ -787,14 +1029,16 @@ Reverts when one of the array parameter provided to [`setDataBatch`](#setdatabat error ERC725Y_DataKeysValuesLengthMismatch(); ``` -Reverts when there is not the same number of elements in the `datakeys` and `dataValues` array parameters provided when calling the [`setDataBatch`](#setdatabatch) function. +reverts when there is not the same number of elements in the lists of data keys and data values when calling setDataBatch. + +
### ERC725Y_MsgValueDisallowed -:::note Links +:::note References -- Specification details in [**LSP-7-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Burnable.md#erc725y_msgvaluedisallowed) -- Solidity implementation in [**LSP7Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Burnable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#erc725y_msgvaluedisallowed) +- Solidity implementation: [`LSP7Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol) - Error signature: `ERC725Y_MsgValueDisallowed()` - Error hash: `0xf36ba737` @@ -804,14 +1048,16 @@ Reverts when there is not the same number of elements in the `datakeys` and `dat error ERC725Y_MsgValueDisallowed(); ``` -Reverts when sending value to the [`setData`](#setdata) or [`setDataBatch`](#setdatabatch) function. +reverts when sending value to the `setData(..)` functions + +
### LSP4TokenNameNotEditable -:::note Links +:::note References -- Specification details in [**LSP-7-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Burnable.md#lsp4tokennamenoteditable) -- Solidity implementation in [**LSP7Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Burnable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp4tokennamenoteditable) +- Solidity implementation: [`LSP7Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol) - Error signature: `LSP4TokenNameNotEditable()` - Error hash: `0x85c169bd` @@ -823,12 +1069,14 @@ 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. +
+ ### LSP4TokenSymbolNotEditable -:::note Links +:::note References -- Specification details in [**LSP-7-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Burnable.md#lsp4tokensymbolnoteditable) -- Solidity implementation in [**LSP7Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Burnable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp4tokensymbolnoteditable) +- Solidity implementation: [`LSP7Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol) - Error signature: `LSP4TokenSymbolNotEditable()` - Error hash: `0x76755b38` @@ -840,12 +1088,14 @@ 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. +
+ ### LSP7AmountExceedsAuthorizedAmount -:::note Links +:::note References -- Specification details in [**LSP-7-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Burnable.md#lsp7amountexceedsauthorizedamount) -- Solidity implementation in [**LSP7Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Burnable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7amountexceedsauthorizedamount) +- Solidity implementation: [`LSP7Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol) - Error signature: `LSP7AmountExceedsAuthorizedAmount(address,uint256,address,uint256)` - Error hash: `0xf3a6b691` @@ -871,12 +1121,14 @@ reverts when `operator` of `tokenOwner` send an `amount` of tokens larger than t | `operator` | `address` | - | | `amount` | `uint256` | - | +
+ ### LSP7AmountExceedsBalance -:::note Links +:::note References -- Specification details in [**LSP-7-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Burnable.md#lsp7amountexceedsbalance) -- Solidity implementation in [**LSP7Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Burnable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7amountexceedsbalance) +- Solidity implementation: [`LSP7Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol) - Error signature: `LSP7AmountExceedsBalance(uint256,address,uint256)` - Error hash: `0x08d47949` @@ -900,12 +1152,14 @@ reverts when sending an `amount` of tokens larger than the current `balance` of | `tokenOwner` | `address` | - | | `amount` | `uint256` | - | +
+ ### LSP7CannotSendToSelf -:::note Links +:::note References -- Specification details in [**LSP-7-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Burnable.md#lsp7cannotsendtoself) -- Solidity implementation in [**LSP7Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Burnable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7cannotsendtoself) +- Solidity implementation: [`LSP7Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol) - Error signature: `LSP7CannotSendToSelf()` - Error hash: `0xb9afb000` @@ -917,12 +1171,14 @@ error LSP7CannotSendToSelf(); reverts when specifying the same address for `from` or `to` in a token transfer. +
+ ### LSP7CannotSendWithAddressZero -:::note Links +:::note References -- Specification details in [**LSP-7-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Burnable.md#lsp7cannotsendwithaddresszero) -- Solidity implementation in [**LSP7Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Burnable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7cannotsendwithaddresszero) +- Solidity implementation: [`LSP7Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol) - Error signature: `LSP7CannotSendWithAddressZero()` - Error hash: `0xd2d5ec30` @@ -940,12 +1196,14 @@ reverts when trying to: - transfer tokens from or to the zero address. +
+ ### LSP7CannotUseAddressZeroAsOperator -:::note Links +:::note References -- Specification details in [**LSP-7-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Burnable.md#lsp7cannotuseaddresszeroasoperator) -- Solidity implementation in [**LSP7Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Burnable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7cannotuseaddresszeroasoperator) +- Solidity implementation: [`LSP7Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol) - Error signature: `LSP7CannotUseAddressZeroAsOperator()` - Error hash: `0x6355e766` @@ -957,12 +1215,14 @@ error LSP7CannotUseAddressZeroAsOperator(); reverts when trying to set the zero address as an operator. +
+ ### LSP7DecreasedAllowanceBelowZero -:::note Links +:::note References -- Specification details in [**LSP-7-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Burnable.md#lsp7decreasedallowancebelowzero) -- Solidity implementation in [**LSP7Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Burnable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7decreasedallowancebelowzero) +- Solidity implementation: [`LSP7Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol) - Error signature: `LSP7DecreasedAllowanceBelowZero()` - Error hash: `0x0ef76c35` @@ -974,12 +1234,14 @@ error LSP7DecreasedAllowanceBelowZero(); Reverts when trying to decrease an operator's allowance to more than its current allowance. +
+ ### LSP7InvalidTransferBatch -:::note Links +:::note References -- Specification details in [**LSP-7-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Burnable.md#lsp7invalidtransferbatch) -- Solidity implementation in [**LSP7Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Burnable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7invalidtransferbatch) +- Solidity implementation: [`LSP7Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol) - Error signature: `LSP7InvalidTransferBatch()` - Error hash: `0x263eee8d` @@ -991,12 +1253,14 @@ error LSP7InvalidTransferBatch(); reverts when the array parameters used in [`transferBatch`](#transferbatch) have different lengths. +
+ ### LSP7NotifyTokenReceiverContractMissingLSP1Interface -:::note Links +:::note References -- Specification details in [**LSP-7-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Burnable.md#lsp7notifytokenreceivercontractmissinglsp1interface) -- Solidity implementation in [**LSP7Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Burnable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7notifytokenreceivercontractmissinglsp1interface) +- Solidity implementation: [`LSP7Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol) - Error signature: `LSP7NotifyTokenReceiverContractMissingLSP1Interface(address)` - Error hash: `0xa608fbb6` @@ -1016,12 +1280,14 @@ reverts if the `tokenReceiver` does not implement LSP1 when minting or transferr | --------------- | :-------: | ----------- | | `tokenReceiver` | `address` | - | +
+ ### LSP7NotifyTokenReceiverIsEOA -:::note Links +:::note References -- Specification details in [**LSP-7-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Burnable.md#lsp7notifytokenreceiveriseoa) -- Solidity implementation in [**LSP7Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Burnable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7notifytokenreceiveriseoa) +- Solidity implementation: [`LSP7Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol) - Error signature: `LSP7NotifyTokenReceiverIsEOA(address)` - Error hash: `0x26c247f4` @@ -1039,12 +1305,14 @@ reverts if the `tokenReceiver` is an EOA when minting or transferring tokens wit | --------------- | :-------: | ----------- | | `tokenReceiver` | `address` | - | +
+ ### LSP7TokenOwnerCannotBeOperator -:::note Links +:::note References -- Specification details in [**LSP-7-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Burnable.md#lsp7tokenownercannotbeoperator) -- Solidity implementation in [**LSP7Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Burnable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7tokenownercannotbeoperator) +- Solidity implementation: [`LSP7Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.sol) - Error signature: `LSP7TokenOwnerCannotBeOperator()` - Error hash: `0xdab75047` @@ -1056,193 +1324,4 @@ error LSP7TokenOwnerCannotBeOperator(); reverts when trying to authorize or revoke the token's owner as an operator. - - - - - - -[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/nft-2.0/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/nft-2.0/LSP7-Digital-Asset -[LSP8IdentifiableDigitalAsset]: https://docs.lukso.tech/standards/nft-2.0/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/LSP7DigitalAsset/extensions/LSP7CappedSupply.md b/docs/contracts/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.md index 2821fc2eae..ecef50df36 100644 --- a/docs/contracts/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.md +++ b/docs/contracts/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.md @@ -1,21 +1,32 @@ + + + # LSP7CappedSupply -:::info Solidity contract +:::info Standard Specifications + +[`LSP-7-DigitalAsset`](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md) + +::: +:::info Solidity implementation -[`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CappedSupply) +[`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol) ::: LSP7 token extension to add a max token supply cap. -## Methods +## Public Methods + +Public methods are accessible externally from users, allowing interaction with this function from dApps or other smart contracts. +When marked as 'public', a method can be called both externally and internally, on the other hand, when marked as 'external', a method can only be called externally. ### authorizeOperator -:::note Links +:::note References -- Specification details in [**LSP-7-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CappedSupply.md#authorizeoperator) -- Solidity implementation in [**LSP7CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CappedSupply) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#authorizeoperator) +- Solidity implementation: [`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol) - Function signature: `authorizeOperator(address,uint256)` - Function selector: `0x47980aa3` @@ -43,12 +54,14 @@ Sets an `amount` of tokens that an `operator` has access from the caller's balan | `operator` | `address` | The address to authorize as an operator. | | `amount` | `uint256` | The allowance amount of tokens operator has access to. | +
+ ### authorizedAmountFor -:::note Links +:::note References -- Specification details in [**LSP-7-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CappedSupply.md#authorizedamountfor) -- Solidity implementation in [**LSP7CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CappedSupply) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#authorizedamountfor) +- Solidity implementation: [`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol) - Function signature: `authorizedAmountFor(address,address)` - Function selector: `0x65aeaa95` @@ -65,23 +78,25 @@ Get the amount of tokens `operator` address has access to from `tokenOwner`. Ope #### Parameters -| Name | Type | Description | -| ------------ | :-------: | -------------------------------------------------------------- | -| `operator` | `address` | The operator's address to query the authorized amount for. | -| `tokenOwner` | `address` | The token owner that `operator` has allowance on. | +| Name | Type | Description | +| ------------ | :-------: | ---------------------------------------------------------- | +| `operator` | `address` | The operator's address to query the authorized amount for. | +| `tokenOwner` | `address` | The token owner that `operator` has allowance on. | #### Returns -| Name | Type | Description | -| ---- | :-------: | ----------------------------------------------------------------------------------------------- | -| `0` | `uint256` | The amount of tokens the `operator`'s address has access on the `tokenOwner`'s balance. | +| Name | Type | Description | +| ---- | :-------: | --------------------------------------------------------------------------------------- | +| `0` | `uint256` | The amount of tokens the `operator`'s address has access on the `tokenOwner`'s balance. | + +
### balanceOf -:::note Links +:::note References -- Specification details in [**LSP-7-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CappedSupply.md#balanceof) -- Solidity implementation in [**LSP7CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CappedSupply) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#balanceof) +- Solidity implementation: [`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol) - Function signature: `balanceOf(address)` - Function selector: `0x70a08231` @@ -105,12 +120,14 @@ Get the number of tokens owned by `tokenOwner`. If the token is divisible (the [ | ---- | :-------: | ------------------------------------------- | | `0` | `uint256` | The amount of tokens owned by `tokenOwner`. | +
+ ### decimals -:::note Links +:::note References -- Specification details in [**LSP-7-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CappedSupply.md#decimals) -- Solidity implementation in [**LSP7CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CappedSupply) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#decimals) +- Solidity implementation: [`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol) - Function signature: `decimals()` - Function selector: `0x313ce567` @@ -128,12 +145,14 @@ Returns the number of decimals used to get its user representation. If the asset | ---- | :-----: | ----------------------------------------------------------------------- | | `0` | `uint8` | the number of decimals. If `0` is returned, the asset is non-divisible. | +
+ ### decreaseAllowance -:::note Links +:::note References -- Specification details in [**LSP-7-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CappedSupply.md#decreaseallowance) -- Solidity implementation in [**LSP7CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CappedSupply) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#decreaseallowance) +- Solidity implementation: [`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol) - Function signature: `decreaseAllowance(address,uint256)` - Function selector: `0xa457c2d7` @@ -176,17 +195,19 @@ Atomically decreases the allowance granted to `operator` by the caller. This is #### Parameters -| Name | Type | Description | -| ------------------- | :-------: | ---------------------------------------------------------- | -| `operator` | `address` | the operator to decrease allowance for `msg.sender` | -| `substractedAmount` | `uint256` | the amount to decrease by in the operator's allowance. | +| Name | Type | Description | +| ------------------- | :-------: | ------------------------------------------------------ | +| `operator` | `address` | the operator to decrease allowance for `msg.sender` | +| `substractedAmount` | `uint256` | the amount to decrease by in the operator's allowance. | + +
### getData -:::note Links +:::note References -- Specification details in [**LSP-7-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CappedSupply.md#getdata) -- Solidity implementation in [**LSP7CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CappedSupply) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#getdata) +- Solidity implementation: [`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol) - Function signature: `getData(bytes32)` - Function selector: `0x54f6127f` @@ -196,28 +217,28 @@ Atomically decreases the allowance granted to `operator` by the caller. This is function getData(bytes32 dataKey) external view returns (bytes dataValue); ``` -_Reading the ERC725Y storage for data key `dataKey` returned the following value: `dataValue`._ - -Get in the ERC725Y storage the bytes data stored at a specific data key `dataKey`. +_Gets singular data at a given `dataKey`_ #### Parameters -| Name | Type | Description | -| --------- | :-------: | --------------------------------------------- | -| `dataKey` | `bytes32` | The data key for which to retrieve the value. | +| Name | Type | Description | +| --------- | :-------: | ------------------------------- | +| `dataKey` | `bytes32` | The key which value to retrieve | #### Returns -| Name | Type | Description | -| ----------- | :-----: | ---------------------------------------------------- | -| `dataValue` | `bytes` | The bytes value stored under the specified data key. | +| Name | Type | Description | +| ----------- | :-----: | -------------------------- | +| `dataValue` | `bytes` | The data stored at the key | + +
### getDataBatch -:::note Links +:::note References -- Specification details in [**LSP-7-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CappedSupply.md#getdatabatch) -- Solidity implementation in [**LSP7CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CappedSupply) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#getdatabatch) +- Solidity implementation: [`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol) - Function signature: `getDataBatch(bytes32[])` - Function selector: `0xdedff9c6` @@ -229,9 +250,7 @@ function getDataBatch( ) external view returns (bytes[] dataValues); ``` -_Reading the ERC725Y storage for data keys `dataKeys` returned the following values: `dataValues`._ - -Get in the ERC725Y storage the bytes data stored at multiple data keys `dataKeys`. +_Gets array of data for multiple given keys_ #### Parameters @@ -245,12 +264,14 @@ Get in the ERC725Y storage the bytes data stored at multiple data keys `dataKeys | ------------ | :-------: | ----------------------------------------- | | `dataValues` | `bytes[]` | The array of data stored at multiple keys | +
+ ### increaseAllowance -:::note Links +:::note References -- Specification details in [**LSP-7-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CappedSupply.md#increaseallowance) -- Solidity implementation in [**LSP7CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CappedSupply) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#increaseallowance) +- Solidity implementation: [`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol) - Function signature: `increaseAllowance(address,uint256)` - Function selector: `0x39509351` @@ -292,17 +313,19 @@ Atomically increases the allowance granted to `operator` by the caller. This is #### Parameters -| Name | Type | Description | -| ------------- | :-------: | --------------------------------------------------------------------------- | -| `operator` | `address` | the operator to increase the allowance for `msg.sender` | -| `addedAmount` | `uint256` | the additional amount to add on top of the current operator's allowance | +| Name | Type | Description | +| ------------- | :-------: | ----------------------------------------------------------------------- | +| `operator` | `address` | the operator to increase the allowance for `msg.sender` | +| `addedAmount` | `uint256` | the additional amount to add on top of the current operator's allowance | + +
### owner -:::note Links +:::note References -- Specification details in [**LSP-7-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CappedSupply.md#owner) -- Solidity implementation in [**LSP7CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CappedSupply) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#owner) +- Solidity implementation: [`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol) - Function signature: `owner()` - Function selector: `0x8da5cb5b` @@ -320,12 +343,14 @@ Returns the address of the current owner. | ---- | :-------: | ----------- | | `0` | `address` | - | +
+ ### renounceOwnership -:::note Links +:::note References -- Specification details in [**LSP-7-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CappedSupply.md#renounceownership) -- Solidity implementation in [**LSP7CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CappedSupply) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#renounceownership) +- Solidity implementation: [`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol) - Function signature: `renounceOwnership()` - Function selector: `0x715018a6` @@ -337,12 +362,14 @@ function renounceOwnership() external nonpayable; Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner. +
+ ### revokeOperator -:::note Links +:::note References -- Specification details in [**LSP-7-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CappedSupply.md#revokeoperator) -- Solidity implementation in [**LSP7CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CappedSupply) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#revokeoperator) +- Solidity implementation: [`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol) - Function signature: `revokeOperator(address)` - Function selector: `0xfad8b32a` @@ -360,108 +387,68 @@ Removes the `operator` address as an operator of callers tokens, disallowing it | ---------- | :-------: | ------------------------------------- | | `operator` | `address` | The address to revoke as an operator. | +
+ ### setData -:::note Links +:::note References -- Specification details in [**LSP-7-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CappedSupply.md#setdata) -- Solidity implementation in [**LSP7CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CappedSupply) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#setdata) +- Solidity implementation: [`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol) - Function signature: `setData(bytes32,bytes)` - Function selector: `0x7f23690c` ::: -:::caution Warning - -**Note for developers:** despite the fact that this function is set as `payable`, if the function is not intended to receive value (= native tokens), **an additional check should be implemented to ensure that `msg.value` sent was equal to 0**. - -::: - ```solidity function setData(bytes32 dataKey, bytes dataValue) external payable; ``` -_Setting the following data key value pair in the ERC725Y storage. Data key: `dataKey`, data value: `dataValue`. _ - -Sets a single bytes value `dataValue` in the ERC725Y storage for a specific data key `dataKey`. The function is marked as payable to enable flexibility on child contracts. For instance to implement a fee mechanism for setting specific data. - -- -**Requirements:** - -- SHOULD only be callable by the [`owner`](#owner). - -- -- -**Emitted events:** - -- [`DataChanged`](#datachanged) event. - -+_Sets singular data for a given `dataKey`_ #### Parameters -| Name | Type | Description | -| ----------- | :-------: | ------------------------------------------ | -| `dataKey` | `bytes32` | The data key for which to set a new value. | -| `dataValue` | `bytes` | The new bytes value to set. | +| Name | Type | Description | +| ----------- | :-------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `dataKey` | `bytes32` | The key to retrieve stored value | +| `dataValue` | `bytes` | The value to set SHOULD only be callable by the owner of the contract set via ERC173 The function is marked as payable to enable flexibility on child contracts If the function is not intended to receive value, an additional check should be implemented to check that value equal 0. Emits a {DataChanged} event. | + +
### setDataBatch -:::note Links +:::note References -- Specification details in [**LSP-7-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CappedSupply.md#setdatabatch) -- Solidity implementation in [**LSP7CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CappedSupply) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#setdatabatch) +- Solidity implementation: [`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol) - Function signature: `setDataBatch(bytes32[],bytes[])` - Function selector: `0x97902421` ::: -:::caution Warning - -**Note for developers:** despite the fact that this function is set as `payable`, if the function is not intended to receive value (= native tokens), **an additional check should be implemented to ensure that `msg.value` sent was equal to 0**. - -::: - ```solidity function setDataBatch(bytes32[] dataKeys, bytes[] dataValues) external payable; ``` -_Setting the following data key value pairs in the ERC725Y storage. Data keys: `dataKeys`, data values: `dataValues`. _ - -Batch data setting function that behaves the same as [`setData`](#setdata) but allowing to set multiple data key/value pairs in the ERC725Y storage in the same transaction. - -- -**Requirements:** - -- SHOULD only be callable by the [`owner`](#owner) of the contract. - -- -- -**Emitted events:** +Sets array of data for multiple given `dataKeys` SHOULD only be callable by the owner of the contract set via ERC173 The function is marked as payable to enable flexibility on child contracts If the function is not intended to receive value, an additional check should be implemented to check that value equal -- [`DataChanged`](#datachanged) event **for each data key/value pair set**. - -+0. Emits a [`DataChanged`](#datachanged) event. #### Parameters -| Name | Type | Description | -| ------------ | :---------: | ---------------------------------------------------- | -| `dataKeys` | `bytes32[]` | An array of data keys to set bytes values for. | -| `dataValues` | `bytes[]` | An array of bytes values to set for each `dataKeys`. | +| Name | Type | Description | +| ------------ | :---------: | ---------------------------------------- | +| `dataKeys` | `bytes32[]` | The array of data keys for values to set | +| `dataValues` | `bytes[]` | The array of values to set | + +
### supportsInterface -:::note Links +:::note References -- Specification details in [**LSP-7-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CappedSupply.md#supportsinterface) -- Solidity implementation in [**LSP7CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CappedSupply) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#supportsinterface) +- Solidity implementation: [`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol) - Function signature: `supportsInterface(bytes4)` - Function selector: `0x01ffc9a7` @@ -485,12 +472,14 @@ Returns true if this contract implements the interface defined by `interfaceId`. | ---- | :----: | ----------- | | `0` | `bool` | - | +
+ ### tokenSupplyCap -:::note Links +:::note References -- Specification details in [**LSP-7-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CappedSupply.md#tokensupplycap) -- Solidity implementation in [**LSP7CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CappedSupply) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#tokensupplycap) +- Solidity implementation: [`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol) - Function signature: `tokenSupplyCap()` - Function selector: `0x52058d8a` @@ -510,12 +499,14 @@ Get the maximum number of tokens that can exist to circulate. Once [`totalSupply | ---- | :-------: | ------------------------------------------------------------ | | `0` | `uint256` | The maximum number of tokens that can exist in the contract. | +
+ ### totalSupply -:::note Links +:::note References -- Specification details in [**LSP-7-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CappedSupply.md#totalsupply) -- Solidity implementation in [**LSP7CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CappedSupply) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#totalsupply) +- Solidity implementation: [`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol) - Function signature: `totalSupply()` - Function selector: `0x18160ddd` @@ -533,12 +524,14 @@ Returns the number of existing tokens that have been minted in this contract. | ---- | :-------: | ------------------------------ | | `0` | `uint256` | The number of existing tokens. | +
+ ### transfer -:::note Links +:::note References -- Specification details in [**LSP-7-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CappedSupply.md#transfer) -- Solidity implementation in [**LSP7CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CappedSupply) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#transfer) +- Solidity implementation: [`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol) - Function signature: `transfer(address,address,uint256,bool,bytes)` - Function selector: `0x760d9bba` @@ -566,12 +559,14 @@ Transfers an `amount` of tokens from the `from` address to the `to` address and | `allowNonLSP1Recipient` | `bool` | When set to `true`, the `to` address CAN be any address. When set to `false`, the `to` address MUST be a contract that supports the LSP1 UniversalReceiver standard. | | `data` | `bytes` | Any additional data the caller wants included in the emitted event, and sent in the hooks of the `from` and `to` addresses. | +
+ ### transferBatch -:::note Links +:::note References -- Specification details in [**LSP-7-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CappedSupply.md#transferbatch) -- Solidity implementation in [**LSP7CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CappedSupply) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#transferbatch) +- Solidity implementation: [`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol) - Function signature: `transferBatch(address[],address[],uint256[],bool[],bytes[])` - Function selector: `0x2d7667c9` @@ -595,16 +590,18 @@ Same as [`transfer(...)`](#`transfer) but transfer multiple tokens based on the | ----------------------- | :---------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `from` | `address[]` | An array of sending addresses. | | `to` | `address[]` | An array of receiving addresses. | -| `amount` | `uint256[]` | An array of amount of tokens to transfer for each `from -> to` transfer. | +| `amount` | `uint256[]` | An array of amount of tokens to transfer for each `from -> to` transfer. | | `allowNonLSP1Recipient` | `bool[]` | For each transfer, when set to `true`, the `to` address CAN be any address. When set to `false`, the `to` address MUST be a contract that supports the LSP1 UniversalReceiver standard. | | `data` | `bytes[]` | An array of additional data the caller wants included in the emitted event, and sent in the hooks to `from` and `to` addresses. | +
+ ### transferOwnership -:::note Links +:::note References -- Specification details in [**LSP-7-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CappedSupply.md#transferownership) -- Solidity implementation in [**LSP7CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CappedSupply) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#transferownership) +- Solidity implementation: [`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol) - Function signature: `transferOwnership(address)` - Function selector: `0xf2fde38b` @@ -622,18 +619,239 @@ Transfers ownership of the contract to a new account (`newOwner`). Can only be c | ---------- | :-------: | ----------- | | `newOwner` | `address` | - | ---- +
+ +## Internal Methods + +Any method labeled as `internal` serves as utility function within the contract. They can be used when writing solidity contracts that inherit from this contract. These methods can be extended or modified by overriding their internal behavior to suit specific needs. + +Internal functions cannot be called externally, whether from other smart contracts, dApp interfaces, or backend services. Their restricted accessibility ensures that they remain exclusively available within the context of the current contract, promoting controlled and encapsulated usage of these internal utilities. + +### \_checkOwner + +```solidity +function _checkOwner() internal view; +``` + +Throws if the sender is not the owner. + +
+ +### \_setOwner + +```solidity +function _setOwner(address newOwner) internal nonpayable; +``` + +Changes the owner if `newOwner` and oldOwner are different +This pattern is useful in inheritance. + +
+ +### \_getData + +```solidity +function _getData(bytes32 dataKey) internal view returns (bytes dataValue); +``` + +
+ +### \_setData + +```solidity +function _setData(bytes32 dataKey, bytes dataValue) internal nonpayable; +``` + +Save gas by emitting the [`DataChanged`](#datachanged) event with only the first 256 bytes of dataValue + +
+ +### \_updateOperator + +```solidity +function _updateOperator( + address tokenOwner, + address operator, + uint256 amount +) internal nonpayable; +``` + +Changes token `amount` the `operator` has access to from `tokenOwner` tokens. +If the amount is zero then the operator is being revoked, otherwise the operator amount is being modified. + +
+ +### \_mint + +```solidity +function _mint( + address to, + uint256 amount, + bool allowNonLSP1Recipient, + bytes data +) internal nonpayable; +``` + +Same as [`_mint`](#_mint) but allows to mint only if the [`totalSupply`](#totalsupply) does not exceed the [`tokenSupplyCap`](#tokensupplycap) +after `amount` of tokens have been minted. + +
+ +### \_burn + +:::tip Hint + +In dApps, you can know which address is burning tokens by listening for the `Transfer` event and filter with the zero address as `to`. + +::: + +```solidity +function _burn(address from, uint256 amount, bytes data) internal nonpayable; +``` + +Burns (= destroys) `amount` of tokens, decrease the `from` balance. This is done by sending them to the zero address. +Both the sender and recipient will be notified of the token transfer through the LSP1 [`universalReceiver`](#universalreceiver) +function, if they are contracts that support the LSP1 interface. Their `universalReceiver` function will receive +all the parameters in the calldata packed encoded. +Any logic in the [`_beforeTokenTransfer`](#_beforetokentransfer) function will run before updating the balances. + ++ +**Emitted events:** + +- [`Transfer`](#transfer) event with `address(0)` as the `to` address + ++ +#### Parameters + +| Name | Type | Description | +| -------- | :-------: | ------------------------------------------------------------------------------------------------------------------------- | +| `from` | `address` | the address to burn tokens from its balance. | +| `amount` | `uint256` | the amount of tokens to burn. | +| `data` | `bytes` | Additional data the caller wants included in the emitted event, and sent in the LSP1 hook to the `from` and `to` address. | + +
+ +### \_transfer + +```solidity +function _transfer( + address from, + address to, + uint256 amount, + bool allowNonLSP1Recipient, + bytes data +) internal nonpayable; +``` + +Transfer tokens from `from` to `to` by decreasing the balance of `from` by `-amount` and increasing the balance +of `to` by `+amount`. +Both the sender and recipient will be notified of the token transfer through the LSP1 [`universalReceiver`](#universalreceiver) +function, if they are contracts that support the LSP1 interface. Their `universalReceiver` function will receive +all the parameters in the calldata packed encoded. +Any logic in the [`_beforeTokenTransfer`](#_beforetokentransfer) function will run before updating the balances. + ++ +**Emitted events:** + +- [`Transfer`](#transfer) event. + ++ +#### Parameters + +| Name | Type | Description | +| ----------------------- | :-------: | ------------------------------------------------------------------------------------------------------------------------- | +| `from` | `address` | the address to decrease the balance. | +| `to` | `address` | the address to increase the balance. | +| `amount` | `uint256` | the amount of tokens to transfer from `from` to `to`. | +| `allowNonLSP1Recipient` | `bool` | a boolean that describe if transfer to a `to` address that does not support LSP1 is allowed or not. | +| `data` | `bytes` | Additional data the caller wants included in the emitted event, and sent in the LSP1 hook to the `from` and `to` address. | + +
+ +### \_beforeTokenTransfer + +```solidity +function _beforeTokenTransfer( + address from, + address to, + uint256 amount +) internal nonpayable; +``` + +Hook that is called before any token transfer, including minting and burning. +Allows to run custom logic before updating balances and notifiying sender/recipient by overriding this function. + +#### Parameters + +| Name | Type | Description | +| -------- | :-------: | ------------------------------- | +| `from` | `address` | The sender address | +| `to` | `address` | The recipient address | +| `amount` | `uint256` | The amount of token to transfer | + +
+ +### \_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} function on. | +| `lsp1Data` | `bytes` | the data to be sent to the `from` address in the `universalReceiver` call. | + +
+ +### \_notifyTokenReceiver + +```solidity +function _notifyTokenReceiver( + address to, + bool allowNonLSP1Recipient, + bytes lsp1Data +) internal nonpayable; +``` + +Attempt to notify the token receiver `to` about the `amount` tokens being received. +This is done by calling its [`universalReceiver`](#universalreceiver) function with the `_TYPEID_LSP7_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 `allowNonLSP1Recipient` boolean flag. + +- if `allowNonLSP1Recipient` is set to `true`, nothing will happen and no notification will be sent. + +- if `allowNonLSP1Recipient` is set to `false, the transaction will revert. + +#### Parameters + +| Name | Type | Description | +| ----------------------- | :-------: | --------------------------------------------------------------------------------------------------- | +| `to` | `address` | The address to call the {universalReceiver} function on. | +| `allowNonLSP1Recipient` | `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. | + +
## Events ### AuthorizedOperator -:::note Links +:::note References -- Specification details in [**LSP-7-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CappedSupply.md#authorizedoperator) -- Solidity implementation in [**LSP7CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CappedSupply) +- 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)` -- Event hash: `0xd66aff874162a96578e919097b6f6d153dfd89a5cec41bb331fdb0c4aec16e2c` +- Event topic hash: `0xd66aff874162a96578e919097b6f6d153dfd89a5cec41bb331fdb0c4aec16e2c` ::: @@ -641,24 +859,26 @@ Transfers ownership of the contract to a new account (`newOwner`). Can only be c event AuthorizedOperator(address indexed operator, address indexed tokenOwner, uint256 indexed amount); ``` -Emitted when `tokenOwner` enables `operator` for `amount` tokens. +Emitted when `tokenOwner` enables `operator` to transfer or burn the `tokenId`. #### Parameters | Name | Type | Description | | -------------------------- | :-------: | ----------------------------------------------------------------------- | -| `operator` **`indexed`** | `address` | The address authorized as an operator | -| `tokenOwner` **`indexed`** | `address` | The token owner | +| `operator` **`indexed`** | `address` | The address authorized as an operator. | +| `tokenOwner` **`indexed`** | `address` | The owner of the `tokenId`. | | `amount` **`indexed`** | `uint256` | The amount of tokens `operator` address has access to from `tokenOwner` | +
+ ### DataChanged -:::note Links +:::note References -- Specification details in [**LSP-7-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CappedSupply.md#datachanged) -- Solidity implementation in [**LSP7CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CappedSupply) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#datachanged) +- Solidity implementation: [`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol) - Event signature: `DataChanged(bytes32,bytes)` -- Event hash: `0xece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2` +- Event topic hash: `0xece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2` ::: @@ -666,25 +886,25 @@ Emitted when `tokenOwner` enables `operator` for `amount` tokens. 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`. +_Emitted when data at a key is changed_ #### 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 | +| ----------------------- | :-------: | ------------------------------------ | +| `dataKey` **`indexed`** | `bytes32` | The data key which data value is set | +| `dataValue` | `bytes` | The data value to set | + +
### OwnershipTransferred -:::note Links +:::note References -- Specification details in [**LSP-7-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CappedSupply.md#ownershiptransferred) -- Solidity implementation in [**LSP7CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CappedSupply) +- 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 hash: `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0` +- Event topic hash: `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0` ::: @@ -699,14 +919,16 @@ event OwnershipTransferred(address indexed previousOwner, address indexed newOwn | `previousOwner` **`indexed`** | `address` | - | | `newOwner` **`indexed`** | `address` | - | +
+ ### RevokedOperator -:::note Links +:::note References -- Specification details in [**LSP-7-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CappedSupply.md#revokedoperator) -- Solidity implementation in [**LSP7CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CappedSupply) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#revokedoperator) +- Solidity implementation: [`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol) - Event signature: `RevokedOperator(address,address)` -- Event hash: `0x50546e66e5f44d728365dc3908c63bc5cfeeab470722c1677e3073a6ac294aa1` +- Event topic hash: `0x50546e66e5f44d728365dc3908c63bc5cfeeab470722c1677e3073a6ac294aa1` ::: @@ -714,23 +936,25 @@ event OwnershipTransferred(address indexed previousOwner, address indexed newOwn event RevokedOperator(address indexed operator, address indexed tokenOwner); ``` -Emitted when `tokenOwner` disables `operator` for `amount` tokens and set its [`authorizedAmountFor(...)`](#`authorizedamountfor) to `0`. +Emitted when `tokenOwner` disables `operator` to transfer or burn `tokenId` on its behalf. #### Parameters -| Name | Type | Description | -| -------------------------- | :-------: | ---------------------------------- | -| `operator` **`indexed`** | `address` | The address revoked from operating | -| `tokenOwner` **`indexed`** | `address` | The token owner | +| Name | Type | Description | +| -------------------------- | :-------: | --------------------------------------------------------------- | +| `operator` **`indexed`** | `address` | The address revoked from the operator array ({getOperatorsOf}). | +| `tokenOwner` **`indexed`** | `address` | The owner of the `tokenId`. | + +
### Transfer -:::note Links +:::note References -- Specification details in [**LSP-7-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CappedSupply.md#transfer) -- Solidity implementation in [**LSP7CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CappedSupply) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#transfer) +- Solidity implementation: [`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol) - Event signature: `Transfer(address,address,address,uint256,bool,bytes)` -- Event hash: `0x3997e418d2cef0b3b0e907b1e39605c3f7d32dbd061e82ea5b4a770d46a160a6` +- Event topic hash: `0x3997e418d2cef0b3b0e907b1e39605c3f7d32dbd061e82ea5b4a770d46a160a6` ::: @@ -738,29 +962,29 @@ Emitted when `tokenOwner` disables `operator` for `amount` tokens and set its [` event Transfer(address indexed operator, address indexed from, address indexed to, uint256 amount, bool allowNonLSP1Recipient, bytes data); ``` -Emitted when the `from` transferred successfully `amount` of tokens to `to`. +Emitted when `tokenId` token is transferred from the `from` to the `to` address. #### Parameters -| Name | Type | Description | -| ------------------------ | :-------: | ---------------------------------------------------------------------------------------------------------------------------- | -| `operator` **`indexed`** | `address` | The address of the operator that executed the transfer. | -| `from` **`indexed`** | `address` | The address which tokens were sent from (balance decreased by `-amount`). | -| `to` **`indexed`** | `address` | The address that received the tokens (balance increased by `+amount`). | -| `amount` | `uint256` | The amount of tokens transferred. | -| `allowNonLSP1Recipient` | `bool` | if the transferred enforced the `to` recipient address to be a contract that implements the LSP1 standard or not. | -| `data` | `bytes` | Any additional data included by the caller during the transfer, and sent in the LSP1 hooks to the `from` and `to` addresses. | +| Name | Type | Description | +| ------------------------ | :-------: | ---------------------------------------------------------------------------------------------------------------------------------- | +| `operator` **`indexed`** | `address` | The address of operator that sent the `tokenId` | +| `from` **`indexed`** | `address` | The previous owner of the `tokenId` | +| `to` **`indexed`** | `address` | The new owner of `tokenId` | +| `amount` | `uint256` | The amount of tokens transferred. | +| `allowNonLSP1Recipient` | `bool` | If the token transfer enforces the `to` recipient address to be a contract that implements the LSP1 standard or not. | +| `data` | `bytes` | Any additional data the caller included by the caller during the transfer, and sent in the hooks to the `from` and `to` addresses. | ---- +
## Errors ### ERC725Y_DataKeysValuesEmptyArray -:::note Links +:::note References -- Specification details in [**LSP-7-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CappedSupply.md#erc725y_datakeysvaluesemptyarray) -- Solidity implementation in [**LSP7CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CappedSupply) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#erc725y_datakeysvaluesemptyarray) +- Solidity implementation: [`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol) - Error signature: `ERC725Y_DataKeysValuesEmptyArray()` - Error hash: `0x97da5f95` @@ -770,14 +994,16 @@ Emitted when the `from` transferred successfully `amount` of tokens to `to`. error ERC725Y_DataKeysValuesEmptyArray(); ``` -Reverts when one of the array parameter provided to [`setDataBatch`](#setdatabatch) function is an empty array. +reverts when one of the array parameter provided to `setDataBatch` is an empty array + +
### ERC725Y_DataKeysValuesLengthMismatch -:::note Links +:::note References -- Specification details in [**LSP-7-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CappedSupply.md#erc725y_datakeysvalueslengthmismatch) -- Solidity implementation in [**LSP7CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CappedSupply) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#erc725y_datakeysvalueslengthmismatch) +- Solidity implementation: [`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol) - Error signature: `ERC725Y_DataKeysValuesLengthMismatch()` - Error hash: `0x3bcc8979` @@ -787,14 +1013,16 @@ Reverts when one of the array parameter provided to [`setDataBatch`](#setdatabat error ERC725Y_DataKeysValuesLengthMismatch(); ``` -Reverts when there is not the same number of elements in the `datakeys` and `dataValues` array parameters provided when calling the [`setDataBatch`](#setdatabatch) function. +reverts when there is not the same number of elements in the lists of data keys and data values when calling setDataBatch. + +
### ERC725Y_MsgValueDisallowed -:::note Links +:::note References -- Specification details in [**LSP-7-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CappedSupply.md#erc725y_msgvaluedisallowed) -- Solidity implementation in [**LSP7CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CappedSupply) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#erc725y_msgvaluedisallowed) +- Solidity implementation: [`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol) - Error signature: `ERC725Y_MsgValueDisallowed()` - Error hash: `0xf36ba737` @@ -804,14 +1032,16 @@ Reverts when there is not the same number of elements in the `datakeys` and `dat error ERC725Y_MsgValueDisallowed(); ``` -Reverts when sending value to the [`setData`](#setdata) or [`setDataBatch`](#setdatabatch) function. +reverts when sending value to the `setData(..)` functions + +
### LSP4TokenNameNotEditable -:::note Links +:::note References -- Specification details in [**LSP-7-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CappedSupply.md#lsp4tokennamenoteditable) -- Solidity implementation in [**LSP7CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CappedSupply) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp4tokennamenoteditable) +- Solidity implementation: [`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol) - Error signature: `LSP4TokenNameNotEditable()` - Error hash: `0x85c169bd` @@ -823,12 +1053,14 @@ 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. +
+ ### LSP4TokenSymbolNotEditable -:::note Links +:::note References -- Specification details in [**LSP-7-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CappedSupply.md#lsp4tokensymbolnoteditable) -- Solidity implementation in [**LSP7CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CappedSupply) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp4tokensymbolnoteditable) +- Solidity implementation: [`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol) - Error signature: `LSP4TokenSymbolNotEditable()` - Error hash: `0x76755b38` @@ -840,12 +1072,14 @@ 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. +
+ ### LSP7AmountExceedsAuthorizedAmount -:::note Links +:::note References -- Specification details in [**LSP-7-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CappedSupply.md#lsp7amountexceedsauthorizedamount) -- Solidity implementation in [**LSP7CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CappedSupply) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7amountexceedsauthorizedamount) +- Solidity implementation: [`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol) - Error signature: `LSP7AmountExceedsAuthorizedAmount(address,uint256,address,uint256)` - Error hash: `0xf3a6b691` @@ -871,12 +1105,14 @@ reverts when `operator` of `tokenOwner` send an `amount` of tokens larger than t | `operator` | `address` | - | | `amount` | `uint256` | - | +
+ ### LSP7AmountExceedsBalance -:::note Links +:::note References -- Specification details in [**LSP-7-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CappedSupply.md#lsp7amountexceedsbalance) -- Solidity implementation in [**LSP7CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CappedSupply) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7amountexceedsbalance) +- Solidity implementation: [`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol) - Error signature: `LSP7AmountExceedsBalance(uint256,address,uint256)` - Error hash: `0x08d47949` @@ -900,12 +1136,14 @@ reverts when sending an `amount` of tokens larger than the current `balance` of | `tokenOwner` | `address` | - | | `amount` | `uint256` | - | +
+ ### LSP7CannotSendToSelf -:::note Links +:::note References -- Specification details in [**LSP-7-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CappedSupply.md#lsp7cannotsendtoself) -- Solidity implementation in [**LSP7CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CappedSupply) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7cannotsendtoself) +- Solidity implementation: [`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol) - Error signature: `LSP7CannotSendToSelf()` - Error hash: `0xb9afb000` @@ -917,12 +1155,14 @@ error LSP7CannotSendToSelf(); reverts when specifying the same address for `from` or `to` in a token transfer. +
+ ### LSP7CannotSendWithAddressZero -:::note Links +:::note References -- Specification details in [**LSP-7-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CappedSupply.md#lsp7cannotsendwithaddresszero) -- Solidity implementation in [**LSP7CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CappedSupply) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7cannotsendwithaddresszero) +- Solidity implementation: [`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol) - Error signature: `LSP7CannotSendWithAddressZero()` - Error hash: `0xd2d5ec30` @@ -940,12 +1180,14 @@ reverts when trying to: - transfer tokens from or to the zero address. +
+ ### LSP7CannotUseAddressZeroAsOperator -:::note Links +:::note References -- Specification details in [**LSP-7-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CappedSupply.md#lsp7cannotuseaddresszeroasoperator) -- Solidity implementation in [**LSP7CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CappedSupply) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7cannotuseaddresszeroasoperator) +- Solidity implementation: [`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol) - Error signature: `LSP7CannotUseAddressZeroAsOperator()` - Error hash: `0x6355e766` @@ -957,12 +1199,14 @@ error LSP7CannotUseAddressZeroAsOperator(); reverts when trying to set the zero address as an operator. +
+ ### LSP7CappedSupplyCannotMintOverCap -:::note Links +:::note References -- Specification details in [**LSP-7-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CappedSupply.md#lsp7cappedsupplycannotmintovercap) -- Solidity implementation in [**LSP7CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CappedSupply) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7cappedsupplycannotmintovercap) +- Solidity implementation: [`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol) - Error signature: `LSP7CappedSupplyCannotMintOverCap()` - Error hash: `0xeacbf0d1` @@ -976,12 +1220,14 @@ _Cannot mint anymore as total supply reached the maximum cap._ Reverts when trying to mint tokens but the [`totalSupply`](#totalsupply) has reached the maximum [`tokenSupplyCap`](#tokensupplycap). +
+ ### LSP7CappedSupplyRequired -:::note Links +:::note References -- Specification details in [**LSP-7-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CappedSupply.md#lsp7cappedsupplyrequired) -- Solidity implementation in [**LSP7CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CappedSupply) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7cappedsupplyrequired) +- Solidity implementation: [`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol) - Error signature: `LSP7CappedSupplyRequired()` - Error hash: `0xacf1d8c5` @@ -995,12 +1241,14 @@ _The `tokenSupplyCap` must be set and cannot be `0`._ Reverts when setting `0` for the [`tokenSupplyCap`](#tokensupplycap). The max token supply MUST be set to a number greater than 0. +
+ ### LSP7DecreasedAllowanceBelowZero -:::note Links +:::note References -- Specification details in [**LSP-7-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CappedSupply.md#lsp7decreasedallowancebelowzero) -- Solidity implementation in [**LSP7CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CappedSupply) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7decreasedallowancebelowzero) +- Solidity implementation: [`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol) - Error signature: `LSP7DecreasedAllowanceBelowZero()` - Error hash: `0x0ef76c35` @@ -1012,12 +1260,14 @@ error LSP7DecreasedAllowanceBelowZero(); Reverts when trying to decrease an operator's allowance to more than its current allowance. +
+ ### LSP7InvalidTransferBatch -:::note Links +:::note References -- Specification details in [**LSP-7-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CappedSupply.md#lsp7invalidtransferbatch) -- Solidity implementation in [**LSP7CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CappedSupply) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7invalidtransferbatch) +- Solidity implementation: [`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol) - Error signature: `LSP7InvalidTransferBatch()` - Error hash: `0x263eee8d` @@ -1029,12 +1279,14 @@ error LSP7InvalidTransferBatch(); reverts when the array parameters used in [`transferBatch`](#transferbatch) have different lengths. +
+ ### LSP7NotifyTokenReceiverContractMissingLSP1Interface -:::note Links +:::note References -- Specification details in [**LSP-7-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CappedSupply.md#lsp7notifytokenreceivercontractmissinglsp1interface) -- Solidity implementation in [**LSP7CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CappedSupply) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7notifytokenreceivercontractmissinglsp1interface) +- Solidity implementation: [`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol) - Error signature: `LSP7NotifyTokenReceiverContractMissingLSP1Interface(address)` - Error hash: `0xa608fbb6` @@ -1054,12 +1306,14 @@ reverts if the `tokenReceiver` does not implement LSP1 when minting or transferr | --------------- | :-------: | ----------- | | `tokenReceiver` | `address` | - | +
+ ### LSP7NotifyTokenReceiverIsEOA -:::note Links +:::note References -- Specification details in [**LSP-7-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CappedSupply.md#lsp7notifytokenreceiveriseoa) -- Solidity implementation in [**LSP7CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CappedSupply) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7notifytokenreceiveriseoa) +- Solidity implementation: [`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol) - Error signature: `LSP7NotifyTokenReceiverIsEOA(address)` - Error hash: `0x26c247f4` @@ -1077,12 +1331,14 @@ reverts if the `tokenReceiver` is an EOA when minting or transferring tokens wit | --------------- | :-------: | ----------- | | `tokenReceiver` | `address` | - | +
+ ### LSP7TokenOwnerCannotBeOperator -:::note Links +:::note References -- Specification details in [**LSP-7-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CappedSupply.md#lsp7tokenownercannotbeoperator) -- Solidity implementation in [**LSP7CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CappedSupply) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7tokenownercannotbeoperator) +- Solidity implementation: [`LSP7CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol) - Error signature: `LSP7TokenOwnerCannotBeOperator()` - Error hash: `0xdab75047` @@ -1094,193 +1350,4 @@ error LSP7TokenOwnerCannotBeOperator(); reverts when trying to authorize or revoke the token's owner as an operator. - - - - - - -[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/nft-2.0/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/nft-2.0/LSP7-Digital-Asset -[LSP8IdentifiableDigitalAsset]: https://docs.lukso.tech/standards/nft-2.0/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/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.md b/docs/contracts/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.md index 14de0eb1bd..4481ef0219 100644 --- a/docs/contracts/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.md +++ b/docs/contracts/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.md @@ -1,21 +1,32 @@ + + + # LSP7CompatibleERC20 -:::info Solidity contract +:::info Standard Specifications + +[`LSP-7-DigitalAsset`](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md) + +::: +:::info Solidity implementation -[`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20) +[`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol) ::: LSP7 extension, for compatibility for clients / tools that expect ERC20. -## Methods +## Public Methods + +Public methods are accessible externally from users, allowing interaction with this function from dApps or other smart contracts. +When marked as 'public', a method can be called both externally and internally, on the other hand, when marked as 'external', a method can only be called externally. ### allowance -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20.md#allowance) -- Solidity implementation in [**LSP7CompatibleERC20**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#allowance) +- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol) - Function signature: `allowance(address,address)` - Function selector: `0xdd62ed3e` @@ -41,12 +52,14 @@ function allowance( | ---- | :-------: | ----------- | | `0` | `uint256` | - | +
+ ### approve -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20.md#approve) -- Solidity implementation in [**LSP7CompatibleERC20**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#approve) +- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol) - Function signature: `approve(address,uint256)` - Function selector: `0x095ea7b3` @@ -72,12 +85,14 @@ function approve( | ---- | :----: | ----------- | | `0` | `bool` | - | +
+ ### authorizeOperator -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20.md#authorizeoperator) -- Solidity implementation in [**LSP7CompatibleERC20**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#authorizeoperator) +- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol) - Function signature: `authorizeOperator(address,uint256)` - Function selector: `0x47980aa3` @@ -105,12 +120,14 @@ Sets an `amount` of tokens that an `operator` has access from the caller's balan | `operator` | `address` | The address to authorize as an operator. | | `amount` | `uint256` | The allowance amount of tokens operator has access to. | +
+ ### authorizedAmountFor -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20.md#authorizedamountfor) -- Solidity implementation in [**LSP7CompatibleERC20**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#authorizedamountfor) +- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol) - Function signature: `authorizedAmountFor(address,address)` - Function selector: `0x65aeaa95` @@ -127,23 +144,25 @@ Get the amount of tokens `operator` address has access to from `tokenOwner`. Ope #### Parameters -| Name | Type | Description | -| ------------ | :-------: | -------------------------------------------------------------- | -| `operator` | `address` | The operator's address to query the authorized amount for. | -| `tokenOwner` | `address` | The token owner that `operator` has allowance on. | +| Name | Type | Description | +| ------------ | :-------: | ---------------------------------------------------------- | +| `operator` | `address` | The operator's address to query the authorized amount for. | +| `tokenOwner` | `address` | The token owner that `operator` has allowance on. | #### Returns -| Name | Type | Description | -| ---- | :-------: | ----------------------------------------------------------------------------------------------- | -| `0` | `uint256` | The amount of tokens the `operator`'s address has access on the `tokenOwner`'s balance. | +| Name | Type | Description | +| ---- | :-------: | --------------------------------------------------------------------------------------- | +| `0` | `uint256` | The amount of tokens the `operator`'s address has access on the `tokenOwner`'s balance. | + +
### balanceOf -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20.md#balanceof) -- Solidity implementation in [**LSP7CompatibleERC20**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#balanceof) +- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol) - Function signature: `balanceOf(address)` - Function selector: `0x70a08231` @@ -167,12 +186,14 @@ Get the number of tokens owned by `tokenOwner`. If the token is divisible (the [ | ---- | :-------: | ------------------------------------------- | | `0` | `uint256` | The amount of tokens owned by `tokenOwner`. | +
+ ### decimals -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20.md#decimals) -- Solidity implementation in [**LSP7CompatibleERC20**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#decimals) +- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol) - Function signature: `decimals()` - Function selector: `0x313ce567` @@ -190,12 +211,14 @@ Returns the number of decimals used to get its user representation. If the asset | ---- | :-----: | ----------------------------------------------------------------------- | | `0` | `uint8` | the number of decimals. If `0` is returned, the asset is non-divisible. | +
+ ### decreaseAllowance -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20.md#decreaseallowance) -- Solidity implementation in [**LSP7CompatibleERC20**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#decreaseallowance) +- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol) - Function signature: `decreaseAllowance(address,uint256)` - Function selector: `0xa457c2d7` @@ -238,17 +261,19 @@ Atomically decreases the allowance granted to `operator` by the caller. This is #### Parameters -| Name | Type | Description | -| ------------------- | :-------: | ---------------------------------------------------------- | -| `operator` | `address` | the operator to decrease allowance for `msg.sender` | -| `substractedAmount` | `uint256` | the amount to decrease by in the operator's allowance. | +| Name | Type | Description | +| ------------------- | :-------: | ------------------------------------------------------ | +| `operator` | `address` | the operator to decrease allowance for `msg.sender` | +| `substractedAmount` | `uint256` | the amount to decrease by in the operator's allowance. | + +
### getData -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20.md#getdata) -- Solidity implementation in [**LSP7CompatibleERC20**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#getdata) +- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol) - Function signature: `getData(bytes32)` - Function selector: `0x54f6127f` @@ -258,28 +283,28 @@ Atomically decreases the allowance granted to `operator` by the caller. This is function getData(bytes32 dataKey) external view returns (bytes dataValue); ``` -_Reading the ERC725Y storage for data key `dataKey` returned the following value: `dataValue`._ - -Get in the ERC725Y storage the bytes data stored at a specific data key `dataKey`. +_Gets singular data at a given `dataKey`_ #### Parameters -| Name | Type | Description | -| --------- | :-------: | --------------------------------------------- | -| `dataKey` | `bytes32` | The data key for which to retrieve the value. | +| Name | Type | Description | +| --------- | :-------: | ------------------------------- | +| `dataKey` | `bytes32` | The key which value to retrieve | #### Returns -| Name | Type | Description | -| ----------- | :-----: | ---------------------------------------------------- | -| `dataValue` | `bytes` | The bytes value stored under the specified data key. | +| Name | Type | Description | +| ----------- | :-----: | -------------------------- | +| `dataValue` | `bytes` | The data stored at the key | + +
### getDataBatch -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20.md#getdatabatch) -- Solidity implementation in [**LSP7CompatibleERC20**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#getdatabatch) +- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol) - Function signature: `getDataBatch(bytes32[])` - Function selector: `0xdedff9c6` @@ -291,9 +316,7 @@ function getDataBatch( ) external view returns (bytes[] dataValues); ``` -_Reading the ERC725Y storage for data keys `dataKeys` returned the following values: `dataValues`._ - -Get in the ERC725Y storage the bytes data stored at multiple data keys `dataKeys`. +_Gets array of data for multiple given keys_ #### Parameters @@ -307,12 +330,14 @@ Get in the ERC725Y storage the bytes data stored at multiple data keys `dataKeys | ------------ | :-------: | ----------------------------------------- | | `dataValues` | `bytes[]` | The array of data stored at multiple keys | +
+ ### increaseAllowance -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20.md#increaseallowance) -- Solidity implementation in [**LSP7CompatibleERC20**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#increaseallowance) +- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol) - Function signature: `increaseAllowance(address,uint256)` - Function selector: `0x39509351` @@ -354,17 +379,19 @@ Atomically increases the allowance granted to `operator` by the caller. This is #### Parameters -| Name | Type | Description | -| ------------- | :-------: | --------------------------------------------------------------------------- | -| `operator` | `address` | the operator to increase the allowance for `msg.sender` | -| `addedAmount` | `uint256` | the additional amount to add on top of the current operator's allowance | +| Name | Type | Description | +| ------------- | :-------: | ----------------------------------------------------------------------- | +| `operator` | `address` | the operator to increase the allowance for `msg.sender` | +| `addedAmount` | `uint256` | the additional amount to add on top of the current operator's allowance | + +
### name -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20.md#name) -- Solidity implementation in [**LSP7CompatibleERC20**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#name) +- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol) - Function signature: `name()` - Function selector: `0x06fdde03` @@ -382,12 +409,14 @@ Returns the name of the token. | ---- | :------: | --------------------- | | `0` | `string` | The name of the token | +
+ ### owner -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20.md#owner) -- Solidity implementation in [**LSP7CompatibleERC20**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#owner) +- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol) - Function signature: `owner()` - Function selector: `0x8da5cb5b` @@ -405,12 +434,14 @@ Returns the address of the current owner. | ---- | :-------: | ----------- | | `0` | `address` | - | +
+ ### renounceOwnership -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20.md#renounceownership) -- Solidity implementation in [**LSP7CompatibleERC20**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#renounceownership) +- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol) - Function signature: `renounceOwnership()` - Function selector: `0x715018a6` @@ -422,12 +453,14 @@ function renounceOwnership() external nonpayable; Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner. +
+ ### revokeOperator -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20.md#revokeoperator) -- Solidity implementation in [**LSP7CompatibleERC20**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#revokeoperator) +- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol) - Function signature: `revokeOperator(address)` - Function selector: `0xfad8b32a` @@ -445,108 +478,68 @@ Removes the `operator` address as an operator of callers tokens, disallowing it | ---------- | :-------: | ------------------------------------- | | `operator` | `address` | The address to revoke as an operator. | +
+ ### setData -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20.md#setdata) -- Solidity implementation in [**LSP7CompatibleERC20**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#setdata) +- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol) - Function signature: `setData(bytes32,bytes)` - Function selector: `0x7f23690c` ::: -:::caution Warning - -**Note for developers:** despite the fact that this function is set as `payable`, if the function is not intended to receive value (= native tokens), **an additional check should be implemented to ensure that `msg.value` sent was equal to 0**. - -::: - ```solidity function setData(bytes32 dataKey, bytes dataValue) external payable; ``` -_Setting the following data key value pair in the ERC725Y storage. Data key: `dataKey`, data value: `dataValue`. _ - -Sets a single bytes value `dataValue` in the ERC725Y storage for a specific data key `dataKey`. The function is marked as payable to enable flexibility on child contracts. For instance to implement a fee mechanism for setting specific data. - -- -**Requirements:** - -- SHOULD only be callable by the [`owner`](#owner). - -- -- -**Emitted events:** - -- [`DataChanged`](#datachanged) event. - -+_Sets singular data for a given `dataKey`_ #### Parameters -| Name | Type | Description | -| ----------- | :-------: | ------------------------------------------ | -| `dataKey` | `bytes32` | The data key for which to set a new value. | -| `dataValue` | `bytes` | The new bytes value to set. | +| Name | Type | Description | +| ----------- | :-------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `dataKey` | `bytes32` | The key to retrieve stored value | +| `dataValue` | `bytes` | The value to set SHOULD only be callable by the owner of the contract set via ERC173 The function is marked as payable to enable flexibility on child contracts If the function is not intended to receive value, an additional check should be implemented to check that value equal 0. Emits a {DataChanged} event. | + +
### setDataBatch -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20.md#setdatabatch) -- Solidity implementation in [**LSP7CompatibleERC20**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#setdatabatch) +- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol) - Function signature: `setDataBatch(bytes32[],bytes[])` - Function selector: `0x97902421` ::: -:::caution Warning - -**Note for developers:** despite the fact that this function is set as `payable`, if the function is not intended to receive value (= native tokens), **an additional check should be implemented to ensure that `msg.value` sent was equal to 0**. - -::: - ```solidity function setDataBatch(bytes32[] dataKeys, bytes[] dataValues) external payable; ``` -_Setting the following data key value pairs in the ERC725Y storage. Data keys: `dataKeys`, data values: `dataValues`. _ +Sets array of data for multiple given `dataKeys` SHOULD only be callable by the owner of the contract set via ERC173 The function is marked as payable to enable flexibility on child contracts If the function is not intended to receive value, an additional check should be implemented to check that value equal -Batch data setting function that behaves the same as [`setData`](#setdata) but allowing to set multiple data key/value pairs in the ERC725Y storage in the same transaction. - -- -**Requirements:** - -- SHOULD only be callable by the [`owner`](#owner) of the contract. - -- -- -**Emitted events:** - -- [`DataChanged`](#datachanged) event **for each data key/value pair set**. - -+0. Emits a [`DataChanged`](#datachanged) event. #### Parameters -| Name | Type | Description | -| ------------ | :---------: | ---------------------------------------------------- | -| `dataKeys` | `bytes32[]` | An array of data keys to set bytes values for. | -| `dataValues` | `bytes[]` | An array of bytes values to set for each `dataKeys`. | +| Name | Type | Description | +| ------------ | :---------: | ---------------------------------------- | +| `dataKeys` | `bytes32[]` | The array of data keys for values to set | +| `dataValues` | `bytes[]` | The array of values to set | + +
### supportsInterface -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20.md#supportsinterface) -- Solidity implementation in [**LSP7CompatibleERC20**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#supportsinterface) +- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol) - Function signature: `supportsInterface(bytes4)` - Function selector: `0x01ffc9a7` @@ -570,12 +563,14 @@ Returns true if this contract implements the interface defined by `interfaceId`. | ---- | :----: | ----------- | | `0` | `bool` | - | +
+ ### symbol -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20.md#symbol) -- Solidity implementation in [**LSP7CompatibleERC20**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#symbol) +- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol) - Function signature: `symbol()` - Function selector: `0x95d89b41` @@ -593,12 +588,14 @@ Returns the symbol of the token, usually a shorter version of the name. | ---- | :------: | ----------------------- | | `0` | `string` | The symbol of the token | +
+ ### totalSupply -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20.md#totalsupply) -- Solidity implementation in [**LSP7CompatibleERC20**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#totalsupply) +- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol) - Function signature: `totalSupply()` - Function selector: `0x18160ddd` @@ -616,12 +613,14 @@ Returns the number of existing tokens that have been minted in this contract. | ---- | :-------: | ------------------------------ | | `0` | `uint256` | The number of existing tokens. | +
+ ### transfer -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20.md#transfer) -- Solidity implementation in [**LSP7CompatibleERC20**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#transfer) +- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol) - Function signature: `transfer(address,address,uint256,bool,bytes)` - Function selector: `0x760d9bba` @@ -649,12 +648,14 @@ Transfers an `amount` of tokens from the `from` address to the `to` address and | `allowNonLSP1Recipient` | `bool` | When set to `true`, the `to` address CAN be any address. When set to `false`, the `to` address MUST be a contract that supports the LSP1 UniversalReceiver standard. | | `data` | `bytes` | Any additional data the caller wants included in the emitted event, and sent in the hooks of the `from` and `to` addresses. | +
+ ### transfer -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20.md#transfer) -- Solidity implementation in [**LSP7CompatibleERC20**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#transfer) +- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol) - Function signature: `transfer(address,uint256)` - Function selector: `0xa9059cbb` @@ -686,12 +687,14 @@ function transfer( | ---- | :----: | ----------- | | `0` | `bool` | - | +
+ ### transferBatch -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20.md#transferbatch) -- Solidity implementation in [**LSP7CompatibleERC20**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#transferbatch) +- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol) - Function signature: `transferBatch(address[],address[],uint256[],bool[],bytes[])` - Function selector: `0x2d7667c9` @@ -715,16 +718,18 @@ Same as [`transfer(...)`](#`transfer) but transfer multiple tokens based on the | ----------------------- | :---------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `from` | `address[]` | An array of sending addresses. | | `to` | `address[]` | An array of receiving addresses. | -| `amount` | `uint256[]` | An array of amount of tokens to transfer for each `from -> to` transfer. | +| `amount` | `uint256[]` | An array of amount of tokens to transfer for each `from -> to` transfer. | | `allowNonLSP1Recipient` | `bool[]` | For each transfer, when set to `true`, the `to` address CAN be any address. When set to `false`, the `to` address MUST be a contract that supports the LSP1 UniversalReceiver standard. | | `data` | `bytes[]` | An array of additional data the caller wants included in the emitted event, and sent in the hooks to `from` and `to` addresses. | +
+ ### transferFrom -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20.md#transferfrom) -- Solidity implementation in [**LSP7CompatibleERC20**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#transferfrom) +- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol) - Function signature: `transferFrom(address,address,uint256)` - Function selector: `0x23b872dd` @@ -758,12 +763,14 @@ function transferFrom( | ---- | :----: | ----------- | | `0` | `bool` | - | +
+ ### transferOwnership -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20.md#transferownership) -- Solidity implementation in [**LSP7CompatibleERC20**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#transferownership) +- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol) - Function signature: `transferOwnership(address)` - Function selector: `0xf2fde38b` @@ -781,18 +788,178 @@ Transfers ownership of the contract to a new account (`newOwner`). Can only be c | ---------- | :-------: | ----------- | | `newOwner` | `address` | - | ---- +
+ +## Internal Methods + +Any method labeled as `internal` serves as utility function within the contract. They can be used when writing solidity contracts that inherit from this contract. These methods can be extended or modified by overriding their internal behavior to suit specific needs. + +Internal functions cannot be called externally, whether from other smart contracts, dApp interfaces, or backend services. Their restricted accessibility ensures that they remain exclusively available within the context of the current contract, promoting controlled and encapsulated usage of these internal utilities. + +### \_checkOwner + +```solidity +function _checkOwner() internal view; +``` + +Throws if the sender is not the owner. + +
+ +### \_setOwner + +```solidity +function _setOwner(address newOwner) internal nonpayable; +``` + +Changes the owner if `newOwner` and oldOwner are different +This pattern is useful in inheritance. + +
+ +### \_getData + +```solidity +function _getData(bytes32 dataKey) internal view returns (bytes dataValue); +``` + +
+ +### \_setData + +```solidity +function _setData(bytes32 key, bytes value) internal nonpayable; +``` + +
+ +### \_updateOperator + +```solidity +function _updateOperator( + address tokenOwner, + address operator, + uint256 amount +) internal nonpayable; +``` + +
+ +### \_mint + +```solidity +function _mint( + address to, + uint256 amount, + bool allowNonLSP1Recipient, + bytes data +) internal nonpayable; +``` + +
+ +### \_burn + +```solidity +function _burn(address from, uint256 amount, bytes data) internal nonpayable; +``` + +
+ +### \_transfer + +```solidity +function _transfer( + address from, + address to, + uint256 amount, + bool allowNonLSP1Recipient, + bytes data +) internal nonpayable; +``` + +
+ +### \_beforeTokenTransfer + +```solidity +function _beforeTokenTransfer( + address from, + address to, + uint256 amount +) internal nonpayable; +``` + +Hook that is called before any token transfer, including minting and burning. +Allows to run custom logic before updating balances and notifiying sender/recipient by overriding this function. + +#### Parameters + +| Name | Type | Description | +| -------- | :-------: | ------------------------------- | +| `from` | `address` | The sender address | +| `to` | `address` | The recipient address | +| `amount` | `uint256` | The amount of token to transfer | + +
+ +### \_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} function on. | +| `lsp1Data` | `bytes` | the data to be sent to the `from` address in the `universalReceiver` call. | + +
+ +### \_notifyTokenReceiver + +```solidity +function _notifyTokenReceiver( + address to, + bool allowNonLSP1Recipient, + bytes lsp1Data +) internal nonpayable; +``` + +Attempt to notify the token receiver `to` about the `amount` tokens being received. +This is done by calling its [`universalReceiver`](#universalreceiver) function with the `_TYPEID_LSP7_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 `allowNonLSP1Recipient` boolean flag. + +- if `allowNonLSP1Recipient` is set to `true`, nothing will happen and no notification will be sent. + +- if `allowNonLSP1Recipient` is set to `false, the transaction will revert. + +#### Parameters + +| Name | Type | Description | +| ----------------------- | :-------: | --------------------------------------------------------------------------------------------------- | +| `to` | `address` | The address to call the {universalReceiver} function on. | +| `allowNonLSP1Recipient` | `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. | + +
## Events ### Approval -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20.md#approval) -- Solidity implementation in [**LSP7CompatibleERC20**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#approval) +- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol) - Event signature: `Approval(address,address,uint256)` -- Event hash: `0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925` +- Event topic hash: `0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925` ::: @@ -800,24 +967,26 @@ Transfers ownership of the contract to a new account (`newOwner`). Can only be c event Approval(address indexed owner, address indexed spender, uint256 value); ``` -ERC20 `Approval` event emitted when `owner` enables `spender` for `value` tokens. To provide compatibility with indexing ERC20 events. +ERC721 `Approval` event emitted when `owner` enables `operator` for `tokenId`. To provide compatibility with indexing ERC721 events. #### Parameters -| Name | Type | Description | -| ----------------------- | :-------: | --------------------------------------------------------- | -| `owner` **`indexed`** | `address` | The account giving approval | -| `spender` **`indexed`** | `address` | The account receiving approval | -| `value` | `uint256` | The amount of tokens `spender` has access to from `owner` | +| Name | Type | Description | +| ----------------------- | :-------: | ------------------------------------------ | +| `owner` **`indexed`** | `address` | The address of the owner of the `tokenId`. | +| `spender` **`indexed`** | `address` | - | +| `value` | `uint256` | - | + +
### AuthorizedOperator -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20.md#authorizedoperator) -- Solidity implementation in [**LSP7CompatibleERC20**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20) +- 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)` -- Event hash: `0xd66aff874162a96578e919097b6f6d153dfd89a5cec41bb331fdb0c4aec16e2c` +- Event topic hash: `0xd66aff874162a96578e919097b6f6d153dfd89a5cec41bb331fdb0c4aec16e2c` ::: @@ -825,24 +994,26 @@ ERC20 `Approval` event emitted when `owner` enables `spender` for `value` tokens event AuthorizedOperator(address indexed operator, address indexed tokenOwner, uint256 indexed amount); ``` -Emitted when `tokenOwner` enables `operator` for `amount` tokens. +Emitted when `tokenOwner` enables `operator` to transfer or burn the `tokenId`. #### Parameters | Name | Type | Description | | -------------------------- | :-------: | ----------------------------------------------------------------------- | -| `operator` **`indexed`** | `address` | The address authorized as an operator | -| `tokenOwner` **`indexed`** | `address` | The token owner | +| `operator` **`indexed`** | `address` | The address authorized as an operator. | +| `tokenOwner` **`indexed`** | `address` | The owner of the `tokenId`. | | `amount` **`indexed`** | `uint256` | The amount of tokens `operator` address has access to from `tokenOwner` | +
+ ### DataChanged -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20.md#datachanged) -- Solidity implementation in [**LSP7CompatibleERC20**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#datachanged) +- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol) - Event signature: `DataChanged(bytes32,bytes)` -- Event hash: `0xece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2` +- Event topic hash: `0xece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2` ::: @@ -850,25 +1021,25 @@ Emitted when `tokenOwner` enables `operator` for `amount` tokens. 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`. +_Emitted when data at a key is changed_ #### 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 | +| ----------------------- | :-------: | ------------------------------------ | +| `dataKey` **`indexed`** | `bytes32` | The data key which data value is set | +| `dataValue` | `bytes` | The data value to set | + +
### OwnershipTransferred -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20.md#ownershiptransferred) -- Solidity implementation in [**LSP7CompatibleERC20**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20) +- 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 hash: `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0` +- Event topic hash: `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0` ::: @@ -883,14 +1054,16 @@ event OwnershipTransferred(address indexed previousOwner, address indexed newOwn | `previousOwner` **`indexed`** | `address` | - | | `newOwner` **`indexed`** | `address` | - | +
+ ### RevokedOperator -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20.md#revokedoperator) -- Solidity implementation in [**LSP7CompatibleERC20**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#revokedoperator) +- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol) - Event signature: `RevokedOperator(address,address)` -- Event hash: `0x50546e66e5f44d728365dc3908c63bc5cfeeab470722c1677e3073a6ac294aa1` +- Event topic hash: `0x50546e66e5f44d728365dc3908c63bc5cfeeab470722c1677e3073a6ac294aa1` ::: @@ -898,23 +1071,25 @@ event OwnershipTransferred(address indexed previousOwner, address indexed newOwn event RevokedOperator(address indexed operator, address indexed tokenOwner); ``` -Emitted when `tokenOwner` disables `operator` for `amount` tokens and set its [`authorizedAmountFor(...)`](#`authorizedamountfor) to `0`. +Emitted when `tokenOwner` disables `operator` to transfer or burn `tokenId` on its behalf. #### Parameters -| Name | Type | Description | -| -------------------------- | :-------: | ---------------------------------- | -| `operator` **`indexed`** | `address` | The address revoked from operating | -| `tokenOwner` **`indexed`** | `address` | The token owner | +| Name | Type | Description | +| -------------------------- | :-------: | --------------------------------------------------------------- | +| `operator` **`indexed`** | `address` | The address revoked from the operator array ({getOperatorsOf}). | +| `tokenOwner` **`indexed`** | `address` | The owner of the `tokenId`. | + +
### Transfer -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20.md#transfer) -- Solidity implementation in [**LSP7CompatibleERC20**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#transfer) +- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol) - Event signature: `Transfer(address,address,address,uint256,bool,bytes)` -- Event hash: `0x3997e418d2cef0b3b0e907b1e39605c3f7d32dbd061e82ea5b4a770d46a160a6` +- Event topic hash: `0x3997e418d2cef0b3b0e907b1e39605c3f7d32dbd061e82ea5b4a770d46a160a6` ::: @@ -922,29 +1097,29 @@ Emitted when `tokenOwner` disables `operator` for `amount` tokens and set its [` event Transfer(address indexed operator, address indexed from, address indexed to, uint256 amount, bool allowNonLSP1Recipient, bytes data); ``` -Emitted when the `from` transferred successfully `amount` of tokens to `to`. +Emitted when `tokenId` token is transferred from the `from` to the `to` address. #### Parameters -| Name | Type | Description | -| ------------------------ | :-------: | ---------------------------------------------------------------------------------------------------------------------------- | -| `operator` **`indexed`** | `address` | The address of the operator that executed the transfer. | -| `from` **`indexed`** | `address` | The address which tokens were sent from (balance decreased by `-amount`). | -| `to` **`indexed`** | `address` | The address that received the tokens (balance increased by `+amount`). | -| `amount` | `uint256` | The amount of tokens transferred. | -| `allowNonLSP1Recipient` | `bool` | if the transferred enforced the `to` recipient address to be a contract that implements the LSP1 standard or not. | -| `data` | `bytes` | Any additional data included by the caller during the transfer, and sent in the LSP1 hooks to the `from` and `to` addresses. | +| Name | Type | Description | +| ------------------------ | :-------: | ---------------------------------------------------------------------------------------------------------------------------------- | +| `operator` **`indexed`** | `address` | The address of operator that sent the `tokenId` | +| `from` **`indexed`** | `address` | The previous owner of the `tokenId` | +| `to` **`indexed`** | `address` | The new owner of `tokenId` | +| `amount` | `uint256` | The amount of tokens transferred. | +| `allowNonLSP1Recipient` | `bool` | If the token transfer enforces the `to` recipient address to be a contract that implements the LSP1 standard or not. | +| `data` | `bytes` | Any additional data the caller included by the caller during the transfer, and sent in the hooks to the `from` and `to` addresses. | ---- +
## Errors ### ERC725Y_DataKeysValuesEmptyArray -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20.md#erc725y_datakeysvaluesemptyarray) -- Solidity implementation in [**LSP7CompatibleERC20**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#erc725y_datakeysvaluesemptyarray) +- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol) - Error signature: `ERC725Y_DataKeysValuesEmptyArray()` - Error hash: `0x97da5f95` @@ -954,14 +1129,16 @@ Emitted when the `from` transferred successfully `amount` of tokens to `to`. error ERC725Y_DataKeysValuesEmptyArray(); ``` -Reverts when one of the array parameter provided to [`setDataBatch`](#setdatabatch) function is an empty array. +reverts when one of the array parameter provided to `setDataBatch` is an empty array + +
### ERC725Y_DataKeysValuesLengthMismatch -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20.md#erc725y_datakeysvalueslengthmismatch) -- Solidity implementation in [**LSP7CompatibleERC20**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#erc725y_datakeysvalueslengthmismatch) +- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol) - Error signature: `ERC725Y_DataKeysValuesLengthMismatch()` - Error hash: `0x3bcc8979` @@ -971,14 +1148,16 @@ Reverts when one of the array parameter provided to [`setDataBatch`](#setdatabat error ERC725Y_DataKeysValuesLengthMismatch(); ``` -Reverts when there is not the same number of elements in the `datakeys` and `dataValues` array parameters provided when calling the [`setDataBatch`](#setdatabatch) function. +reverts when there is not the same number of elements in the lists of data keys and data values when calling setDataBatch. + +
### ERC725Y_MsgValueDisallowed -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20.md#erc725y_msgvaluedisallowed) -- Solidity implementation in [**LSP7CompatibleERC20**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#erc725y_msgvaluedisallowed) +- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol) - Error signature: `ERC725Y_MsgValueDisallowed()` - Error hash: `0xf36ba737` @@ -988,14 +1167,16 @@ Reverts when there is not the same number of elements in the `datakeys` and `dat error ERC725Y_MsgValueDisallowed(); ``` -Reverts when sending value to the [`setData`](#setdata) or [`setDataBatch`](#setdatabatch) function. +reverts when sending value to the `setData(..)` functions + +
### LSP4TokenNameNotEditable -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20.md#lsp4tokennamenoteditable) -- Solidity implementation in [**LSP7CompatibleERC20**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp4tokennamenoteditable) +- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol) - Error signature: `LSP4TokenNameNotEditable()` - Error hash: `0x85c169bd` @@ -1007,12 +1188,14 @@ 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. +
+ ### LSP4TokenSymbolNotEditable -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20.md#lsp4tokensymbolnoteditable) -- Solidity implementation in [**LSP7CompatibleERC20**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp4tokensymbolnoteditable) +- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol) - Error signature: `LSP4TokenSymbolNotEditable()` - Error hash: `0x76755b38` @@ -1024,12 +1207,14 @@ 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. +
+ ### LSP7AmountExceedsAuthorizedAmount -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20.md#lsp7amountexceedsauthorizedamount) -- Solidity implementation in [**LSP7CompatibleERC20**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7amountexceedsauthorizedamount) +- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol) - Error signature: `LSP7AmountExceedsAuthorizedAmount(address,uint256,address,uint256)` - Error hash: `0xf3a6b691` @@ -1055,12 +1240,14 @@ reverts when `operator` of `tokenOwner` send an `amount` of tokens larger than t | `operator` | `address` | - | | `amount` | `uint256` | - | +
+ ### LSP7AmountExceedsBalance -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20.md#lsp7amountexceedsbalance) -- Solidity implementation in [**LSP7CompatibleERC20**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7amountexceedsbalance) +- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol) - Error signature: `LSP7AmountExceedsBalance(uint256,address,uint256)` - Error hash: `0x08d47949` @@ -1084,12 +1271,14 @@ reverts when sending an `amount` of tokens larger than the current `balance` of | `tokenOwner` | `address` | - | | `amount` | `uint256` | - | +
+ ### LSP7CannotSendToSelf -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20.md#lsp7cannotsendtoself) -- Solidity implementation in [**LSP7CompatibleERC20**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7cannotsendtoself) +- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol) - Error signature: `LSP7CannotSendToSelf()` - Error hash: `0xb9afb000` @@ -1101,12 +1290,14 @@ error LSP7CannotSendToSelf(); reverts when specifying the same address for `from` or `to` in a token transfer. +
+ ### LSP7CannotSendWithAddressZero -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20.md#lsp7cannotsendwithaddresszero) -- Solidity implementation in [**LSP7CompatibleERC20**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7cannotsendwithaddresszero) +- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol) - Error signature: `LSP7CannotSendWithAddressZero()` - Error hash: `0xd2d5ec30` @@ -1124,12 +1315,14 @@ reverts when trying to: - transfer tokens from or to the zero address. +
+ ### LSP7CannotUseAddressZeroAsOperator -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20.md#lsp7cannotuseaddresszeroasoperator) -- Solidity implementation in [**LSP7CompatibleERC20**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7cannotuseaddresszeroasoperator) +- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol) - Error signature: `LSP7CannotUseAddressZeroAsOperator()` - Error hash: `0x6355e766` @@ -1141,12 +1334,14 @@ error LSP7CannotUseAddressZeroAsOperator(); reverts when trying to set the zero address as an operator. +
+ ### LSP7DecreasedAllowanceBelowZero -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20.md#lsp7decreasedallowancebelowzero) -- Solidity implementation in [**LSP7CompatibleERC20**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7decreasedallowancebelowzero) +- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol) - Error signature: `LSP7DecreasedAllowanceBelowZero()` - Error hash: `0x0ef76c35` @@ -1158,12 +1353,14 @@ error LSP7DecreasedAllowanceBelowZero(); Reverts when trying to decrease an operator's allowance to more than its current allowance. +
+ ### LSP7InvalidTransferBatch -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20.md#lsp7invalidtransferbatch) -- Solidity implementation in [**LSP7CompatibleERC20**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7invalidtransferbatch) +- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol) - Error signature: `LSP7InvalidTransferBatch()` - Error hash: `0x263eee8d` @@ -1175,12 +1372,14 @@ error LSP7InvalidTransferBatch(); reverts when the array parameters used in [`transferBatch`](#transferbatch) have different lengths. +
+ ### LSP7NotifyTokenReceiverContractMissingLSP1Interface -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20.md#lsp7notifytokenreceivercontractmissinglsp1interface) -- Solidity implementation in [**LSP7CompatibleERC20**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7notifytokenreceivercontractmissinglsp1interface) +- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol) - Error signature: `LSP7NotifyTokenReceiverContractMissingLSP1Interface(address)` - Error hash: `0xa608fbb6` @@ -1200,12 +1399,14 @@ reverts if the `tokenReceiver` does not implement LSP1 when minting or transferr | --------------- | :-------: | ----------- | | `tokenReceiver` | `address` | - | +
+ ### LSP7NotifyTokenReceiverIsEOA -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20.md#lsp7notifytokenreceiveriseoa) -- Solidity implementation in [**LSP7CompatibleERC20**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7notifytokenreceiveriseoa) +- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol) - Error signature: `LSP7NotifyTokenReceiverIsEOA(address)` - Error hash: `0x26c247f4` @@ -1223,12 +1424,14 @@ reverts if the `tokenReceiver` is an EOA when minting or transferring tokens wit | --------------- | :-------: | ----------- | | `tokenReceiver` | `address` | - | +
+ ### LSP7TokenOwnerCannotBeOperator -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20.md#lsp7tokenownercannotbeoperator) -- Solidity implementation in [**LSP7CompatibleERC20**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7tokenownercannotbeoperator) +- Solidity implementation: [`LSP7CompatibleERC20.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol) - Error signature: `LSP7TokenOwnerCannotBeOperator()` - Error hash: `0xdab75047` @@ -1240,193 +1443,4 @@ error LSP7TokenOwnerCannotBeOperator(); reverts when trying to authorize or revoke the token's owner as an operator. - - - - - - -[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/nft-2.0/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/nft-2.0/LSP7-Digital-Asset -[LSP8IdentifiableDigitalAsset]: https://docs.lukso.tech/standards/nft-2.0/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/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.md b/docs/contracts/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.md index ef8cc37d5b..da6a4cf19b 100644 --- a/docs/contracts/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.md +++ b/docs/contracts/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.md @@ -1,21 +1,32 @@ + + + # LSP7CompatibleERC20Mintable -:::info Solidity contract +:::info Standard Specifications + +[`LSP-7-DigitalAsset`](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md) + +::: +:::info Solidity implementation -[`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +[`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol) ::: > LSP7CompatibleERC20 deployable preset contract with a public {mint} function callable only by the contract {owner}. -## Methods +## Public Methods + +Public methods are accessible externally from users, allowing interaction with this function from dApps or other smart contracts. +When marked as 'public', a method can be called both externally and internally, on the other hand, when marked as 'external', a method can only be called externally. ### constructor -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#constructor) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#constructor) +- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol) ::: @@ -23,7 +34,7 @@ constructor(string name_, string symbol_, address newOwner_); ``` -_Deploying a `LSP7CompatibleERC20Mintable` token contract with: token name = `name\_`, token symbol = `symbol\_`, and address `newOwner\_` as the token contract owner._ +_Deploying a `LSP7CompatibleERC20Mintable` token contract with: token name = `name_`, token symbol = `symbol_`, and address `newOwner_` as the token contract owner._ #### Parameters @@ -33,12 +44,14 @@ _Deploying a `LSP7CompatibleERC20Mintable` token contract with: token name = `na | `symbol_` | `string` | The symbol of the token. | | `newOwner_` | `address` | The owner of the token contract. | +
+ ### allowance -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#allowance) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#allowance) +- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol) - Function signature: `allowance(address,address)` - Function selector: `0xdd62ed3e` @@ -64,12 +77,14 @@ function allowance( | ---- | :-------: | ----------- | | `0` | `uint256` | - | +
+ ### approve -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#approve) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#approve) +- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol) - Function signature: `approve(address,uint256)` - Function selector: `0x095ea7b3` @@ -95,12 +110,14 @@ function approve( | ---- | :----: | ----------- | | `0` | `bool` | - | +
+ ### authorizeOperator -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#authorizeoperator) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#authorizeoperator) +- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol) - Function signature: `authorizeOperator(address,uint256)` - Function selector: `0x47980aa3` @@ -128,12 +145,14 @@ Sets an `amount` of tokens that an `operator` has access from the caller's balan | `operator` | `address` | The address to authorize as an operator. | | `amount` | `uint256` | The allowance amount of tokens operator has access to. | +
+ ### authorizedAmountFor -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#authorizedamountfor) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#authorizedamountfor) +- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol) - Function signature: `authorizedAmountFor(address,address)` - Function selector: `0x65aeaa95` @@ -150,23 +169,25 @@ Get the amount of tokens `operator` address has access to from `tokenOwner`. Ope #### Parameters -| Name | Type | Description | -| ------------ | :-------: | -------------------------------------------------------------- | -| `operator` | `address` | The operator's address to query the authorized amount for. | -| `tokenOwner` | `address` | The token owner that `operator` has allowance on. | +| Name | Type | Description | +| ------------ | :-------: | ---------------------------------------------------------- | +| `operator` | `address` | The operator's address to query the authorized amount for. | +| `tokenOwner` | `address` | The token owner that `operator` has allowance on. | #### Returns -| Name | Type | Description | -| ---- | :-------: | ----------------------------------------------------------------------------------------------- | -| `0` | `uint256` | The amount of tokens the `operator`'s address has access on the `tokenOwner`'s balance. | +| Name | Type | Description | +| ---- | :-------: | --------------------------------------------------------------------------------------- | +| `0` | `uint256` | The amount of tokens the `operator`'s address has access on the `tokenOwner`'s balance. | + +
### balanceOf -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#balanceof) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#balanceof) +- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol) - Function signature: `balanceOf(address)` - Function selector: `0x70a08231` @@ -190,12 +211,14 @@ Get the number of tokens owned by `tokenOwner`. If the token is divisible (the [ | ---- | :-------: | ------------------------------------------- | | `0` | `uint256` | The amount of tokens owned by `tokenOwner`. | +
+ ### decimals -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#decimals) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#decimals) +- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol) - Function signature: `decimals()` - Function selector: `0x313ce567` @@ -213,12 +236,14 @@ Returns the number of decimals used to get its user representation. If the asset | ---- | :-----: | ----------------------------------------------------------------------- | | `0` | `uint8` | the number of decimals. If `0` is returned, the asset is non-divisible. | +
+ ### decreaseAllowance -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#decreaseallowance) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#decreaseallowance) +- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol) - Function signature: `decreaseAllowance(address,uint256)` - Function selector: `0xa457c2d7` @@ -261,17 +286,19 @@ Atomically decreases the allowance granted to `operator` by the caller. This is #### Parameters -| Name | Type | Description | -| ------------------- | :-------: | ---------------------------------------------------------- | -| `operator` | `address` | the operator to decrease allowance for `msg.sender` | -| `substractedAmount` | `uint256` | the amount to decrease by in the operator's allowance. | +| Name | Type | Description | +| ------------------- | :-------: | ------------------------------------------------------ | +| `operator` | `address` | the operator to decrease allowance for `msg.sender` | +| `substractedAmount` | `uint256` | the amount to decrease by in the operator's allowance. | + +
### getData -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#getdata) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#getdata) +- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol) - Function signature: `getData(bytes32)` - Function selector: `0x54f6127f` @@ -281,28 +308,28 @@ Atomically decreases the allowance granted to `operator` by the caller. This is function getData(bytes32 dataKey) external view returns (bytes dataValue); ``` -_Reading the ERC725Y storage for data key `dataKey` returned the following value: `dataValue`._ - -Get in the ERC725Y storage the bytes data stored at a specific data key `dataKey`. +_Gets singular data at a given `dataKey`_ #### Parameters -| Name | Type | Description | -| --------- | :-------: | --------------------------------------------- | -| `dataKey` | `bytes32` | The data key for which to retrieve the value. | +| Name | Type | Description | +| --------- | :-------: | ------------------------------- | +| `dataKey` | `bytes32` | The key which value to retrieve | #### Returns -| Name | Type | Description | -| ----------- | :-----: | ---------------------------------------------------- | -| `dataValue` | `bytes` | The bytes value stored under the specified data key. | +| Name | Type | Description | +| ----------- | :-----: | -------------------------- | +| `dataValue` | `bytes` | The data stored at the key | + +
### getDataBatch -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#getdatabatch) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#getdatabatch) +- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol) - Function signature: `getDataBatch(bytes32[])` - Function selector: `0xdedff9c6` @@ -314,9 +341,7 @@ function getDataBatch( ) external view returns (bytes[] dataValues); ``` -_Reading the ERC725Y storage for data keys `dataKeys` returned the following values: `dataValues`._ - -Get in the ERC725Y storage the bytes data stored at multiple data keys `dataKeys`. +_Gets array of data for multiple given keys_ #### Parameters @@ -330,12 +355,14 @@ Get in the ERC725Y storage the bytes data stored at multiple data keys `dataKeys | ------------ | :-------: | ----------------------------------------- | | `dataValues` | `bytes[]` | The array of data stored at multiple keys | +
+ ### increaseAllowance -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#increaseallowance) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#increaseallowance) +- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol) - Function signature: `increaseAllowance(address,uint256)` - Function selector: `0x39509351` @@ -377,17 +404,19 @@ Atomically increases the allowance granted to `operator` by the caller. This is #### Parameters -| Name | Type | Description | -| ------------- | :-------: | --------------------------------------------------------------------------- | -| `operator` | `address` | the operator to increase the allowance for `msg.sender` | -| `addedAmount` | `uint256` | the additional amount to add on top of the current operator's allowance | +| Name | Type | Description | +| ------------- | :-------: | ----------------------------------------------------------------------- | +| `operator` | `address` | the operator to increase the allowance for `msg.sender` | +| `addedAmount` | `uint256` | the additional amount to add on top of the current operator's allowance | + +
### mint -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#mint) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#mint) +- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol) - Function signature: `mint(address,uint256,bool,bytes)` - Function selector: `0x7580d920` @@ -413,12 +442,14 @@ Public [`_mint`](#_mint) function only callable by the [`owner`](#owner). | `allowNonLSP1Recipient` | `bool` | - | | `data` | `bytes` | - | +
+ ### name -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#name) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#name) +- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol) - Function signature: `name()` - Function selector: `0x06fdde03` @@ -436,12 +467,14 @@ Returns the name of the token. | ---- | :------: | --------------------- | | `0` | `string` | The name of the token | +
+ ### owner -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#owner) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#owner) +- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol) - Function signature: `owner()` - Function selector: `0x8da5cb5b` @@ -459,12 +492,14 @@ Returns the address of the current owner. | ---- | :-------: | ----------- | | `0` | `address` | - | +
+ ### renounceOwnership -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#renounceownership) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#renounceownership) +- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol) - Function signature: `renounceOwnership()` - Function selector: `0x715018a6` @@ -476,12 +511,14 @@ function renounceOwnership() external nonpayable; Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner. +
+ ### revokeOperator -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#revokeoperator) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#revokeoperator) +- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol) - Function signature: `revokeOperator(address)` - Function selector: `0xfad8b32a` @@ -499,108 +536,68 @@ Removes the `operator` address as an operator of callers tokens, disallowing it | ---------- | :-------: | ------------------------------------- | | `operator` | `address` | The address to revoke as an operator. | +
+ ### setData -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#setdata) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#setdata) +- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol) - Function signature: `setData(bytes32,bytes)` - Function selector: `0x7f23690c` ::: -:::caution Warning - -**Note for developers:** despite the fact that this function is set as `payable`, if the function is not intended to receive value (= native tokens), **an additional check should be implemented to ensure that `msg.value` sent was equal to 0**. - -::: - ```solidity function setData(bytes32 dataKey, bytes dataValue) external payable; ``` -_Setting the following data key value pair in the ERC725Y storage. Data key: `dataKey`, data value: `dataValue`. _ - -Sets a single bytes value `dataValue` in the ERC725Y storage for a specific data key `dataKey`. The function is marked as payable to enable flexibility on child contracts. For instance to implement a fee mechanism for setting specific data. - -- -**Requirements:** - -- SHOULD only be callable by the [`owner`](#owner). - -- -- -**Emitted events:** - -- [`DataChanged`](#datachanged) event. - -+_Sets singular data for a given `dataKey`_ #### Parameters -| Name | Type | Description | -| ----------- | :-------: | ------------------------------------------ | -| `dataKey` | `bytes32` | The data key for which to set a new value. | -| `dataValue` | `bytes` | The new bytes value to set. | +| Name | Type | Description | +| ----------- | :-------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `dataKey` | `bytes32` | The key to retrieve stored value | +| `dataValue` | `bytes` | The value to set SHOULD only be callable by the owner of the contract set via ERC173 The function is marked as payable to enable flexibility on child contracts If the function is not intended to receive value, an additional check should be implemented to check that value equal 0. Emits a {DataChanged} event. | + +
### setDataBatch -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#setdatabatch) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#setdatabatch) +- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol) - Function signature: `setDataBatch(bytes32[],bytes[])` - Function selector: `0x97902421` ::: -:::caution Warning - -**Note for developers:** despite the fact that this function is set as `payable`, if the function is not intended to receive value (= native tokens), **an additional check should be implemented to ensure that `msg.value` sent was equal to 0**. - -::: - ```solidity function setDataBatch(bytes32[] dataKeys, bytes[] dataValues) external payable; ``` -_Setting the following data key value pairs in the ERC725Y storage. Data keys: `dataKeys`, data values: `dataValues`. _ - -Batch data setting function that behaves the same as [`setData`](#setdata) but allowing to set multiple data key/value pairs in the ERC725Y storage in the same transaction. - -- -**Requirements:** - -- SHOULD only be callable by the [`owner`](#owner) of the contract. - -+Sets array of data for multiple given `dataKeys` SHOULD only be callable by the owner of the contract set via ERC173 The function is marked as payable to enable flexibility on child contracts If the function is not intended to receive value, an additional check should be implemented to check that value equal -- -**Emitted events:** - -- [`DataChanged`](#datachanged) event **for each data key/value pair set**. - -+0. Emits a [`DataChanged`](#datachanged) event. #### Parameters -| Name | Type | Description | -| ------------ | :---------: | ---------------------------------------------------- | -| `dataKeys` | `bytes32[]` | An array of data keys to set bytes values for. | -| `dataValues` | `bytes[]` | An array of bytes values to set for each `dataKeys`. | +| Name | Type | Description | +| ------------ | :---------: | ---------------------------------------- | +| `dataKeys` | `bytes32[]` | The array of data keys for values to set | +| `dataValues` | `bytes[]` | The array of values to set | + +
### supportsInterface -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#supportsinterface) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#supportsinterface) +- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol) - Function signature: `supportsInterface(bytes4)` - Function selector: `0x01ffc9a7` @@ -624,12 +621,14 @@ Returns true if this contract implements the interface defined by `interfaceId`. | ---- | :----: | ----------- | | `0` | `bool` | - | +
+ ### symbol -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#symbol) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#symbol) +- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol) - Function signature: `symbol()` - Function selector: `0x95d89b41` @@ -647,12 +646,14 @@ Returns the symbol of the token, usually a shorter version of the name. | ---- | :------: | ----------------------- | | `0` | `string` | The symbol of the token | +
+ ### totalSupply -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#totalsupply) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#totalsupply) +- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol) - Function signature: `totalSupply()` - Function selector: `0x18160ddd` @@ -670,12 +671,14 @@ Returns the number of existing tokens that have been minted in this contract. | ---- | :-------: | ------------------------------ | | `0` | `uint256` | The number of existing tokens. | +
+ ### transfer -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#transfer) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#transfer) +- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol) - Function signature: `transfer(address,address,uint256,bool,bytes)` - Function selector: `0x760d9bba` @@ -703,12 +706,14 @@ Transfers an `amount` of tokens from the `from` address to the `to` address and | `allowNonLSP1Recipient` | `bool` | When set to `true`, the `to` address CAN be any address. When set to `false`, the `to` address MUST be a contract that supports the LSP1 UniversalReceiver standard. | | `data` | `bytes` | Any additional data the caller wants included in the emitted event, and sent in the hooks of the `from` and `to` addresses. | +
+ ### transfer -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#transfer) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#transfer) +- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol) - Function signature: `transfer(address,uint256)` - Function selector: `0xa9059cbb` @@ -740,12 +745,14 @@ function transfer( | ---- | :----: | ----------- | | `0` | `bool` | - | +
+ ### transferBatch -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#transferbatch) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#transferbatch) +- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol) - Function signature: `transferBatch(address[],address[],uint256[],bool[],bytes[])` - Function selector: `0x2d7667c9` @@ -769,16 +776,18 @@ Same as [`transfer(...)`](#`transfer) but transfer multiple tokens based on the | ----------------------- | :---------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `from` | `address[]` | An array of sending addresses. | | `to` | `address[]` | An array of receiving addresses. | -| `amount` | `uint256[]` | An array of amount of tokens to transfer for each `from -> to` transfer. | +| `amount` | `uint256[]` | An array of amount of tokens to transfer for each `from -> to` transfer. | | `allowNonLSP1Recipient` | `bool[]` | For each transfer, when set to `true`, the `to` address CAN be any address. When set to `false`, the `to` address MUST be a contract that supports the LSP1 UniversalReceiver standard. | | `data` | `bytes[]` | An array of additional data the caller wants included in the emitted event, and sent in the hooks to `from` and `to` addresses. | +
+ ### transferFrom -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#transferfrom) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#transferfrom) +- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol) - Function signature: `transferFrom(address,address,uint256)` - Function selector: `0x23b872dd` @@ -812,12 +821,14 @@ function transferFrom( | ---- | :----: | ----------- | | `0` | `bool` | - | +
+ ### transferOwnership -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#transferownership) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#transferownership) +- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol) - Function signature: `transferOwnership(address)` - Function selector: `0xf2fde38b` @@ -835,18 +846,178 @@ Transfers ownership of the contract to a new account (`newOwner`). Can only be c | ---------- | :-------: | ----------- | | `newOwner` | `address` | - | ---- +
+ +## Internal Methods + +Any method labeled as `internal` serves as utility function within the contract. They can be used when writing solidity contracts that inherit from this contract. These methods can be extended or modified by overriding their internal behavior to suit specific needs. + +Internal functions cannot be called externally, whether from other smart contracts, dApp interfaces, or backend services. Their restricted accessibility ensures that they remain exclusively available within the context of the current contract, promoting controlled and encapsulated usage of these internal utilities. + +### \_checkOwner + +```solidity +function _checkOwner() internal view; +``` + +Throws if the sender is not the owner. + +
+ +### \_setOwner + +```solidity +function _setOwner(address newOwner) internal nonpayable; +``` + +Changes the owner if `newOwner` and oldOwner are different +This pattern is useful in inheritance. + +
+ +### \_getData + +```solidity +function _getData(bytes32 dataKey) internal view returns (bytes dataValue); +``` + +
+ +### \_setData + +```solidity +function _setData(bytes32 key, bytes value) internal nonpayable; +``` + +
+ +### \_updateOperator + +```solidity +function _updateOperator( + address tokenOwner, + address operator, + uint256 amount +) internal nonpayable; +``` + +
+ +### \_mint + +```solidity +function _mint( + address to, + uint256 amount, + bool allowNonLSP1Recipient, + bytes data +) internal nonpayable; +``` + +
+ +### \_burn + +```solidity +function _burn(address from, uint256 amount, bytes data) internal nonpayable; +``` + +
+ +### \_transfer + +```solidity +function _transfer( + address from, + address to, + uint256 amount, + bool allowNonLSP1Recipient, + bytes data +) internal nonpayable; +``` + +
+ +### \_beforeTokenTransfer + +```solidity +function _beforeTokenTransfer( + address from, + address to, + uint256 amount +) internal nonpayable; +``` + +Hook that is called before any token transfer, including minting and burning. +Allows to run custom logic before updating balances and notifiying sender/recipient by overriding this function. + +#### Parameters + +| Name | Type | Description | +| -------- | :-------: | ------------------------------- | +| `from` | `address` | The sender address | +| `to` | `address` | The recipient address | +| `amount` | `uint256` | The amount of token to transfer | + +
+ +### \_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} function on. | +| `lsp1Data` | `bytes` | the data to be sent to the `from` address in the `universalReceiver` call. | + +
+ +### \_notifyTokenReceiver + +```solidity +function _notifyTokenReceiver( + address to, + bool allowNonLSP1Recipient, + bytes lsp1Data +) internal nonpayable; +``` + +Attempt to notify the token receiver `to` about the `amount` tokens being received. +This is done by calling its [`universalReceiver`](#universalreceiver) function with the `_TYPEID_LSP7_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 `allowNonLSP1Recipient` boolean flag. + +- if `allowNonLSP1Recipient` is set to `true`, nothing will happen and no notification will be sent. + +- if `allowNonLSP1Recipient` is set to `false, the transaction will revert. + +#### Parameters + +| Name | Type | Description | +| ----------------------- | :-------: | --------------------------------------------------------------------------------------------------- | +| `to` | `address` | The address to call the {universalReceiver} function on. | +| `allowNonLSP1Recipient` | `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. | + +
## Events ### Approval -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#approval) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#approval) +- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol) - Event signature: `Approval(address,address,uint256)` -- Event hash: `0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925` +- Event topic hash: `0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925` ::: @@ -854,24 +1025,26 @@ Transfers ownership of the contract to a new account (`newOwner`). Can only be c event Approval(address indexed owner, address indexed spender, uint256 value); ``` -ERC20 `Approval` event emitted when `owner` enables `spender` for `value` tokens. To provide compatibility with indexing ERC20 events. +ERC721 `Approval` event emitted when `owner` enables `operator` for `tokenId`. To provide compatibility with indexing ERC721 events. #### Parameters -| Name | Type | Description | -| ----------------------- | :-------: | --------------------------------------------------------- | -| `owner` **`indexed`** | `address` | The account giving approval | -| `spender` **`indexed`** | `address` | The account receiving approval | -| `value` | `uint256` | The amount of tokens `spender` has access to from `owner` | +| Name | Type | Description | +| ----------------------- | :-------: | ------------------------------------------ | +| `owner` **`indexed`** | `address` | The address of the owner of the `tokenId`. | +| `spender` **`indexed`** | `address` | - | +| `value` | `uint256` | - | + +
### AuthorizedOperator -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#authorizedoperator) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- 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)` -- Event hash: `0xd66aff874162a96578e919097b6f6d153dfd89a5cec41bb331fdb0c4aec16e2c` +- Event topic hash: `0xd66aff874162a96578e919097b6f6d153dfd89a5cec41bb331fdb0c4aec16e2c` ::: @@ -879,24 +1052,26 @@ ERC20 `Approval` event emitted when `owner` enables `spender` for `value` tokens event AuthorizedOperator(address indexed operator, address indexed tokenOwner, uint256 indexed amount); ``` -Emitted when `tokenOwner` enables `operator` for `amount` tokens. +Emitted when `tokenOwner` enables `operator` to transfer or burn the `tokenId`. #### Parameters | Name | Type | Description | | -------------------------- | :-------: | ----------------------------------------------------------------------- | -| `operator` **`indexed`** | `address` | The address authorized as an operator | -| `tokenOwner` **`indexed`** | `address` | The token owner | +| `operator` **`indexed`** | `address` | The address authorized as an operator. | +| `tokenOwner` **`indexed`** | `address` | The owner of the `tokenId`. | | `amount` **`indexed`** | `uint256` | The amount of tokens `operator` address has access to from `tokenOwner` | +
+ ### DataChanged -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#datachanged) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#datachanged) +- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol) - Event signature: `DataChanged(bytes32,bytes)` -- Event hash: `0xece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2` +- Event topic hash: `0xece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2` ::: @@ -904,25 +1079,25 @@ Emitted when `tokenOwner` enables `operator` for `amount` tokens. 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`. +_Emitted when data at a key is changed_ #### 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 | +| ----------------------- | :-------: | ------------------------------------ | +| `dataKey` **`indexed`** | `bytes32` | The data key which data value is set | +| `dataValue` | `bytes` | The data value to set | + +
### OwnershipTransferred -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#ownershiptransferred) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- 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 hash: `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0` +- Event topic hash: `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0` ::: @@ -937,14 +1112,16 @@ event OwnershipTransferred(address indexed previousOwner, address indexed newOwn | `previousOwner` **`indexed`** | `address` | - | | `newOwner` **`indexed`** | `address` | - | +
+ ### RevokedOperator -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#revokedoperator) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#revokedoperator) +- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol) - Event signature: `RevokedOperator(address,address)` -- Event hash: `0x50546e66e5f44d728365dc3908c63bc5cfeeab470722c1677e3073a6ac294aa1` +- Event topic hash: `0x50546e66e5f44d728365dc3908c63bc5cfeeab470722c1677e3073a6ac294aa1` ::: @@ -952,23 +1129,25 @@ event OwnershipTransferred(address indexed previousOwner, address indexed newOwn event RevokedOperator(address indexed operator, address indexed tokenOwner); ``` -Emitted when `tokenOwner` disables `operator` for `amount` tokens and set its [`authorizedAmountFor(...)`](#`authorizedamountfor) to `0`. +Emitted when `tokenOwner` disables `operator` to transfer or burn `tokenId` on its behalf. #### Parameters -| Name | Type | Description | -| -------------------------- | :-------: | ---------------------------------- | -| `operator` **`indexed`** | `address` | The address revoked from operating | -| `tokenOwner` **`indexed`** | `address` | The token owner | +| Name | Type | Description | +| -------------------------- | :-------: | --------------------------------------------------------------- | +| `operator` **`indexed`** | `address` | The address revoked from the operator array ({getOperatorsOf}). | +| `tokenOwner` **`indexed`** | `address` | The owner of the `tokenId`. | + +
### Transfer -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#transfer) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#transfer) +- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol) - Event signature: `Transfer(address,address,address,uint256,bool,bytes)` -- Event hash: `0x3997e418d2cef0b3b0e907b1e39605c3f7d32dbd061e82ea5b4a770d46a160a6` +- Event topic hash: `0x3997e418d2cef0b3b0e907b1e39605c3f7d32dbd061e82ea5b4a770d46a160a6` ::: @@ -976,29 +1155,29 @@ Emitted when `tokenOwner` disables `operator` for `amount` tokens and set its [` event Transfer(address indexed operator, address indexed from, address indexed to, uint256 amount, bool allowNonLSP1Recipient, bytes data); ``` -Emitted when the `from` transferred successfully `amount` of tokens to `to`. +Emitted when `tokenId` token is transferred from the `from` to the `to` address. #### Parameters -| Name | Type | Description | -| ------------------------ | :-------: | ---------------------------------------------------------------------------------------------------------------------------- | -| `operator` **`indexed`** | `address` | The address of the operator that executed the transfer. | -| `from` **`indexed`** | `address` | The address which tokens were sent from (balance decreased by `-amount`). | -| `to` **`indexed`** | `address` | The address that received the tokens (balance increased by `+amount`). | -| `amount` | `uint256` | The amount of tokens transferred. | -| `allowNonLSP1Recipient` | `bool` | if the transferred enforced the `to` recipient address to be a contract that implements the LSP1 standard or not. | -| `data` | `bytes` | Any additional data included by the caller during the transfer, and sent in the LSP1 hooks to the `from` and `to` addresses. | +| Name | Type | Description | +| ------------------------ | :-------: | ---------------------------------------------------------------------------------------------------------------------------------- | +| `operator` **`indexed`** | `address` | The address of operator that sent the `tokenId` | +| `from` **`indexed`** | `address` | The previous owner of the `tokenId` | +| `to` **`indexed`** | `address` | The new owner of `tokenId` | +| `amount` | `uint256` | The amount of tokens transferred. | +| `allowNonLSP1Recipient` | `bool` | If the token transfer enforces the `to` recipient address to be a contract that implements the LSP1 standard or not. | +| `data` | `bytes` | Any additional data the caller included by the caller during the transfer, and sent in the hooks to the `from` and `to` addresses. | ---- +
## Errors ### ERC725Y_DataKeysValuesEmptyArray -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#erc725y_datakeysvaluesemptyarray) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#erc725y_datakeysvaluesemptyarray) +- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol) - Error signature: `ERC725Y_DataKeysValuesEmptyArray()` - Error hash: `0x97da5f95` @@ -1008,14 +1187,16 @@ Emitted when the `from` transferred successfully `amount` of tokens to `to`. error ERC725Y_DataKeysValuesEmptyArray(); ``` -Reverts when one of the array parameter provided to [`setDataBatch`](#setdatabatch) function is an empty array. +reverts when one of the array parameter provided to `setDataBatch` is an empty array + +
### ERC725Y_DataKeysValuesLengthMismatch -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#erc725y_datakeysvalueslengthmismatch) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#erc725y_datakeysvalueslengthmismatch) +- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol) - Error signature: `ERC725Y_DataKeysValuesLengthMismatch()` - Error hash: `0x3bcc8979` @@ -1025,14 +1206,16 @@ Reverts when one of the array parameter provided to [`setDataBatch`](#setdatabat error ERC725Y_DataKeysValuesLengthMismatch(); ``` -Reverts when there is not the same number of elements in the `datakeys` and `dataValues` array parameters provided when calling the [`setDataBatch`](#setdatabatch) function. +reverts when there is not the same number of elements in the lists of data keys and data values when calling setDataBatch. + +
### ERC725Y_MsgValueDisallowed -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#erc725y_msgvaluedisallowed) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#erc725y_msgvaluedisallowed) +- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol) - Error signature: `ERC725Y_MsgValueDisallowed()` - Error hash: `0xf36ba737` @@ -1042,14 +1225,16 @@ Reverts when there is not the same number of elements in the `datakeys` and `dat error ERC725Y_MsgValueDisallowed(); ``` -Reverts when sending value to the [`setData`](#setdata) or [`setDataBatch`](#setdatabatch) function. +reverts when sending value to the `setData(..)` functions + +
### LSP4TokenNameNotEditable -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#lsp4tokennamenoteditable) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp4tokennamenoteditable) +- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol) - Error signature: `LSP4TokenNameNotEditable()` - Error hash: `0x85c169bd` @@ -1061,12 +1246,14 @@ 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. +
+ ### LSP4TokenSymbolNotEditable -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#lsp4tokensymbolnoteditable) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp4tokensymbolnoteditable) +- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol) - Error signature: `LSP4TokenSymbolNotEditable()` - Error hash: `0x76755b38` @@ -1078,12 +1265,14 @@ 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. +
+ ### LSP7AmountExceedsAuthorizedAmount -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#lsp7amountexceedsauthorizedamount) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7amountexceedsauthorizedamount) +- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol) - Error signature: `LSP7AmountExceedsAuthorizedAmount(address,uint256,address,uint256)` - Error hash: `0xf3a6b691` @@ -1109,12 +1298,14 @@ reverts when `operator` of `tokenOwner` send an `amount` of tokens larger than t | `operator` | `address` | - | | `amount` | `uint256` | - | +
+ ### LSP7AmountExceedsBalance -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#lsp7amountexceedsbalance) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7amountexceedsbalance) +- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol) - Error signature: `LSP7AmountExceedsBalance(uint256,address,uint256)` - Error hash: `0x08d47949` @@ -1138,12 +1329,14 @@ reverts when sending an `amount` of tokens larger than the current `balance` of | `tokenOwner` | `address` | - | | `amount` | `uint256` | - | +
+ ### LSP7CannotSendToSelf -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#lsp7cannotsendtoself) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7cannotsendtoself) +- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol) - Error signature: `LSP7CannotSendToSelf()` - Error hash: `0xb9afb000` @@ -1155,12 +1348,14 @@ error LSP7CannotSendToSelf(); reverts when specifying the same address for `from` or `to` in a token transfer. +
+ ### LSP7CannotSendWithAddressZero -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#lsp7cannotsendwithaddresszero) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7cannotsendwithaddresszero) +- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol) - Error signature: `LSP7CannotSendWithAddressZero()` - Error hash: `0xd2d5ec30` @@ -1178,12 +1373,14 @@ reverts when trying to: - transfer tokens from or to the zero address. +
+ ### LSP7CannotUseAddressZeroAsOperator -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#lsp7cannotuseaddresszeroasoperator) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7cannotuseaddresszeroasoperator) +- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol) - Error signature: `LSP7CannotUseAddressZeroAsOperator()` - Error hash: `0x6355e766` @@ -1195,12 +1392,14 @@ error LSP7CannotUseAddressZeroAsOperator(); reverts when trying to set the zero address as an operator. +
+ ### LSP7DecreasedAllowanceBelowZero -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#lsp7decreasedallowancebelowzero) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7decreasedallowancebelowzero) +- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol) - Error signature: `LSP7DecreasedAllowanceBelowZero()` - Error hash: `0x0ef76c35` @@ -1212,12 +1411,14 @@ error LSP7DecreasedAllowanceBelowZero(); Reverts when trying to decrease an operator's allowance to more than its current allowance. +
+ ### LSP7InvalidTransferBatch -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#lsp7invalidtransferbatch) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7invalidtransferbatch) +- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol) - Error signature: `LSP7InvalidTransferBatch()` - Error hash: `0x263eee8d` @@ -1229,12 +1430,14 @@ error LSP7InvalidTransferBatch(); reverts when the array parameters used in [`transferBatch`](#transferbatch) have different lengths. +
+ ### LSP7NotifyTokenReceiverContractMissingLSP1Interface -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#lsp7notifytokenreceivercontractmissinglsp1interface) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7notifytokenreceivercontractmissinglsp1interface) +- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol) - Error signature: `LSP7NotifyTokenReceiverContractMissingLSP1Interface(address)` - Error hash: `0xa608fbb6` @@ -1254,12 +1457,14 @@ reverts if the `tokenReceiver` does not implement LSP1 when minting or transferr | --------------- | :-------: | ----------- | | `tokenReceiver` | `address` | - | +
+ ### LSP7NotifyTokenReceiverIsEOA -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#lsp7notifytokenreceiveriseoa) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7notifytokenreceiveriseoa) +- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol) - Error signature: `LSP7NotifyTokenReceiverIsEOA(address)` - Error hash: `0x26c247f4` @@ -1277,12 +1482,14 @@ reverts if the `tokenReceiver` is an EOA when minting or transferring tokens wit | --------------- | :-------: | ----------- | | `tokenReceiver` | `address` | - | +
+ ### LSP7TokenOwnerCannotBeOperator -:::note Links +:::note References -- Specification details in [**LSP-7-CompatibleERC20Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-CompatibleERC20Mintable.md#lsp7tokenownercannotbeoperator) -- Solidity implementation in [**LSP7CompatibleERC20Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7CompatibleERC20Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7tokenownercannotbeoperator) +- Solidity implementation: [`LSP7CompatibleERC20Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol) - Error signature: `LSP7TokenOwnerCannotBeOperator()` - Error hash: `0xdab75047` @@ -1294,193 +1501,4 @@ error LSP7TokenOwnerCannotBeOperator(); reverts when trying to authorize or revoke the token's owner as an operator. - - - - - - -[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/nft-2.0/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/nft-2.0/LSP7-Digital-Asset -[LSP8IdentifiableDigitalAsset]: https://docs.lukso.tech/standards/nft-2.0/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/LSP7DigitalAsset/presets/LSP7Mintable.md b/docs/contracts/contracts/LSP7DigitalAsset/presets/LSP7Mintable.md index 862e5df091..55493ffa7f 100644 --- a/docs/contracts/contracts/LSP7DigitalAsset/presets/LSP7Mintable.md +++ b/docs/contracts/contracts/LSP7DigitalAsset/presets/LSP7Mintable.md @@ -1,21 +1,32 @@ + + + # LSP7Mintable -:::info Solidity contract +:::info Standard Specifications + +[`LSP-7-DigitalAsset`](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md) + +::: +:::info Solidity implementation -[`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Mintable) +[`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol) ::: > LSP7DigitalAsset deployable preset contract with a public {mint} function callable only by the contract {owner}. -## Methods +## Public Methods + +Public methods are accessible externally from users, allowing interaction with this function from dApps or other smart contracts. +When marked as 'public', a method can be called both externally and internally, on the other hand, when marked as 'external', a method can only be called externally. ### constructor -:::note Links +:::note References -- Specification details in [**LSP-7-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Mintable.md#constructor) -- Solidity implementation in [**LSP7Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#constructor) +- Solidity implementation: [`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol) ::: @@ -28,7 +39,7 @@ constructor( ); ``` -_Deploying a `LSP7Mintable` token contract with: token name = `name\_`, token symbol = `symbol\_`, and address `newOwner\_` as the token contract owner._ +_Deploying a `LSP7Mintable` token contract with: token name = `name_`, token symbol = `symbol_`, and address `newOwner_` as the token contract owner._ #### Parameters @@ -39,12 +50,14 @@ _Deploying a `LSP7Mintable` token contract with: token name = `name\_`, token sy | `newOwner_` | `address` | The owner of the token contract. | | `isNonDivisible_` | `bool` | - | +
+ ### authorizeOperator -:::note Links +:::note References -- Specification details in [**LSP-7-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Mintable.md#authorizeoperator) -- Solidity implementation in [**LSP7Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#authorizeoperator) +- Solidity implementation: [`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol) - Function signature: `authorizeOperator(address,uint256)` - Function selector: `0x47980aa3` @@ -72,12 +85,14 @@ Sets an `amount` of tokens that an `operator` has access from the caller's balan | `operator` | `address` | The address to authorize as an operator. | | `amount` | `uint256` | The allowance amount of tokens operator has access to. | +
+ ### authorizedAmountFor -:::note Links +:::note References -- Specification details in [**LSP-7-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Mintable.md#authorizedamountfor) -- Solidity implementation in [**LSP7Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#authorizedamountfor) +- Solidity implementation: [`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol) - Function signature: `authorizedAmountFor(address,address)` - Function selector: `0x65aeaa95` @@ -94,23 +109,25 @@ Get the amount of tokens `operator` address has access to from `tokenOwner`. Ope #### Parameters -| Name | Type | Description | -| ------------ | :-------: | -------------------------------------------------------------- | -| `operator` | `address` | The operator's address to query the authorized amount for. | -| `tokenOwner` | `address` | The token owner that `operator` has allowance on. | +| Name | Type | Description | +| ------------ | :-------: | ---------------------------------------------------------- | +| `operator` | `address` | The operator's address to query the authorized amount for. | +| `tokenOwner` | `address` | The token owner that `operator` has allowance on. | #### Returns -| Name | Type | Description | -| ---- | :-------: | ----------------------------------------------------------------------------------------------- | -| `0` | `uint256` | The amount of tokens the `operator`'s address has access on the `tokenOwner`'s balance. | +| Name | Type | Description | +| ---- | :-------: | --------------------------------------------------------------------------------------- | +| `0` | `uint256` | The amount of tokens the `operator`'s address has access on the `tokenOwner`'s balance. | + +
### balanceOf -:::note Links +:::note References -- Specification details in [**LSP-7-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Mintable.md#balanceof) -- Solidity implementation in [**LSP7Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#balanceof) +- Solidity implementation: [`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol) - Function signature: `balanceOf(address)` - Function selector: `0x70a08231` @@ -134,12 +151,14 @@ Get the number of tokens owned by `tokenOwner`. If the token is divisible (the [ | ---- | :-------: | ------------------------------------------- | | `0` | `uint256` | The amount of tokens owned by `tokenOwner`. | +
+ ### decimals -:::note Links +:::note References -- Specification details in [**LSP-7-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Mintable.md#decimals) -- Solidity implementation in [**LSP7Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#decimals) +- Solidity implementation: [`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol) - Function signature: `decimals()` - Function selector: `0x313ce567` @@ -157,12 +176,14 @@ Returns the number of decimals used to get its user representation. If the asset | ---- | :-----: | ----------------------------------------------------------------------- | | `0` | `uint8` | the number of decimals. If `0` is returned, the asset is non-divisible. | +
+ ### decreaseAllowance -:::note Links +:::note References -- Specification details in [**LSP-7-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Mintable.md#decreaseallowance) -- Solidity implementation in [**LSP7Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#decreaseallowance) +- Solidity implementation: [`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol) - Function signature: `decreaseAllowance(address,uint256)` - Function selector: `0xa457c2d7` @@ -205,17 +226,19 @@ Atomically decreases the allowance granted to `operator` by the caller. This is #### Parameters -| Name | Type | Description | -| ------------------- | :-------: | ---------------------------------------------------------- | -| `operator` | `address` | the operator to decrease allowance for `msg.sender` | -| `substractedAmount` | `uint256` | the amount to decrease by in the operator's allowance. | +| Name | Type | Description | +| ------------------- | :-------: | ------------------------------------------------------ | +| `operator` | `address` | the operator to decrease allowance for `msg.sender` | +| `substractedAmount` | `uint256` | the amount to decrease by in the operator's allowance. | + +
### getData -:::note Links +:::note References -- Specification details in [**LSP-7-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Mintable.md#getdata) -- Solidity implementation in [**LSP7Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#getdata) +- Solidity implementation: [`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol) - Function signature: `getData(bytes32)` - Function selector: `0x54f6127f` @@ -225,28 +248,28 @@ Atomically decreases the allowance granted to `operator` by the caller. This is function getData(bytes32 dataKey) external view returns (bytes dataValue); ``` -_Reading the ERC725Y storage for data key `dataKey` returned the following value: `dataValue`._ - -Get in the ERC725Y storage the bytes data stored at a specific data key `dataKey`. +_Gets singular data at a given `dataKey`_ #### Parameters -| Name | Type | Description | -| --------- | :-------: | --------------------------------------------- | -| `dataKey` | `bytes32` | The data key for which to retrieve the value. | +| Name | Type | Description | +| --------- | :-------: | ------------------------------- | +| `dataKey` | `bytes32` | The key which value to retrieve | #### Returns -| Name | Type | Description | -| ----------- | :-----: | ---------------------------------------------------- | -| `dataValue` | `bytes` | The bytes value stored under the specified data key. | +| Name | Type | Description | +| ----------- | :-----: | -------------------------- | +| `dataValue` | `bytes` | The data stored at the key | + +
### getDataBatch -:::note Links +:::note References -- Specification details in [**LSP-7-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Mintable.md#getdatabatch) -- Solidity implementation in [**LSP7Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#getdatabatch) +- Solidity implementation: [`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol) - Function signature: `getDataBatch(bytes32[])` - Function selector: `0xdedff9c6` @@ -258,9 +281,7 @@ function getDataBatch( ) external view returns (bytes[] dataValues); ``` -_Reading the ERC725Y storage for data keys `dataKeys` returned the following values: `dataValues`._ - -Get in the ERC725Y storage the bytes data stored at multiple data keys `dataKeys`. +_Gets array of data for multiple given keys_ #### Parameters @@ -274,12 +295,14 @@ Get in the ERC725Y storage the bytes data stored at multiple data keys `dataKeys | ------------ | :-------: | ----------------------------------------- | | `dataValues` | `bytes[]` | The array of data stored at multiple keys | +
+ ### increaseAllowance -:::note Links +:::note References -- Specification details in [**LSP-7-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Mintable.md#increaseallowance) -- Solidity implementation in [**LSP7Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#increaseallowance) +- Solidity implementation: [`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol) - Function signature: `increaseAllowance(address,uint256)` - Function selector: `0x39509351` @@ -321,17 +344,19 @@ Atomically increases the allowance granted to `operator` by the caller. This is #### Parameters -| Name | Type | Description | -| ------------- | :-------: | --------------------------------------------------------------------------- | -| `operator` | `address` | the operator to increase the allowance for `msg.sender` | -| `addedAmount` | `uint256` | the additional amount to add on top of the current operator's allowance | +| Name | Type | Description | +| ------------- | :-------: | ----------------------------------------------------------------------- | +| `operator` | `address` | the operator to increase the allowance for `msg.sender` | +| `addedAmount` | `uint256` | the additional amount to add on top of the current operator's allowance | + +
### mint -:::note Links +:::note References -- Specification details in [**LSP-7-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Mintable.md#mint) -- Solidity implementation in [**LSP7Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#mint) +- Solidity implementation: [`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol) - Function signature: `mint(address,uint256,bool,bytes)` - Function selector: `0x7580d920` @@ -357,12 +382,14 @@ Public [`_mint`](#_mint) function only callable by the [`owner`](#owner). | `allowNonLSP1Recipient` | `bool` | - | | `data` | `bytes` | - | +
+ ### owner -:::note Links +:::note References -- Specification details in [**LSP-7-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Mintable.md#owner) -- Solidity implementation in [**LSP7Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#owner) +- Solidity implementation: [`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol) - Function signature: `owner()` - Function selector: `0x8da5cb5b` @@ -380,12 +407,14 @@ Returns the address of the current owner. | ---- | :-------: | ----------- | | `0` | `address` | - | +
+ ### renounceOwnership -:::note Links +:::note References -- Specification details in [**LSP-7-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Mintable.md#renounceownership) -- Solidity implementation in [**LSP7Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#renounceownership) +- Solidity implementation: [`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol) - Function signature: `renounceOwnership()` - Function selector: `0x715018a6` @@ -397,12 +426,14 @@ function renounceOwnership() external nonpayable; Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner. +
+ ### revokeOperator -:::note Links +:::note References -- Specification details in [**LSP-7-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Mintable.md#revokeoperator) -- Solidity implementation in [**LSP7Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#revokeoperator) +- Solidity implementation: [`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol) - Function signature: `revokeOperator(address)` - Function selector: `0xfad8b32a` @@ -420,108 +451,68 @@ Removes the `operator` address as an operator of callers tokens, disallowing it | ---------- | :-------: | ------------------------------------- | | `operator` | `address` | The address to revoke as an operator. | +
+ ### setData -:::note Links +:::note References -- Specification details in [**LSP-7-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Mintable.md#setdata) -- Solidity implementation in [**LSP7Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#setdata) +- Solidity implementation: [`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol) - Function signature: `setData(bytes32,bytes)` - Function selector: `0x7f23690c` ::: -:::caution Warning - -**Note for developers:** despite the fact that this function is set as `payable`, if the function is not intended to receive value (= native tokens), **an additional check should be implemented to ensure that `msg.value` sent was equal to 0**. - -::: - ```solidity function setData(bytes32 dataKey, bytes dataValue) external payable; ``` -_Setting the following data key value pair in the ERC725Y storage. Data key: `dataKey`, data value: `dataValue`. _ - -Sets a single bytes value `dataValue` in the ERC725Y storage for a specific data key `dataKey`. The function is marked as payable to enable flexibility on child contracts. For instance to implement a fee mechanism for setting specific data. - -- -**Requirements:** - -- SHOULD only be callable by the [`owner`](#owner). - -- -- -**Emitted events:** - -- [`DataChanged`](#datachanged) event. - -+_Sets singular data for a given `dataKey`_ #### Parameters -| Name | Type | Description | -| ----------- | :-------: | ------------------------------------------ | -| `dataKey` | `bytes32` | The data key for which to set a new value. | -| `dataValue` | `bytes` | The new bytes value to set. | +| Name | Type | Description | +| ----------- | :-------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `dataKey` | `bytes32` | The key to retrieve stored value | +| `dataValue` | `bytes` | The value to set SHOULD only be callable by the owner of the contract set via ERC173 The function is marked as payable to enable flexibility on child contracts If the function is not intended to receive value, an additional check should be implemented to check that value equal 0. Emits a {DataChanged} event. | + +
### setDataBatch -:::note Links +:::note References -- Specification details in [**LSP-7-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Mintable.md#setdatabatch) -- Solidity implementation in [**LSP7Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#setdatabatch) +- Solidity implementation: [`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol) - Function signature: `setDataBatch(bytes32[],bytes[])` - Function selector: `0x97902421` ::: -:::caution Warning - -**Note for developers:** despite the fact that this function is set as `payable`, if the function is not intended to receive value (= native tokens), **an additional check should be implemented to ensure that `msg.value` sent was equal to 0**. - -::: - ```solidity function setDataBatch(bytes32[] dataKeys, bytes[] dataValues) external payable; ``` -_Setting the following data key value pairs in the ERC725Y storage. Data keys: `dataKeys`, data values: `dataValues`. _ - -Batch data setting function that behaves the same as [`setData`](#setdata) but allowing to set multiple data key/value pairs in the ERC725Y storage in the same transaction. - -- -**Requirements:** - -- SHOULD only be callable by the [`owner`](#owner) of the contract. - -- -- -**Emitted events:** +Sets array of data for multiple given `dataKeys` SHOULD only be callable by the owner of the contract set via ERC173 The function is marked as payable to enable flexibility on child contracts If the function is not intended to receive value, an additional check should be implemented to check that value equal -- [`DataChanged`](#datachanged) event **for each data key/value pair set**. - -+0. Emits a [`DataChanged`](#datachanged) event. #### Parameters -| Name | Type | Description | -| ------------ | :---------: | ---------------------------------------------------- | -| `dataKeys` | `bytes32[]` | An array of data keys to set bytes values for. | -| `dataValues` | `bytes[]` | An array of bytes values to set for each `dataKeys`. | +| Name | Type | Description | +| ------------ | :---------: | ---------------------------------------- | +| `dataKeys` | `bytes32[]` | The array of data keys for values to set | +| `dataValues` | `bytes[]` | The array of values to set | + +
### supportsInterface -:::note Links +:::note References -- Specification details in [**LSP-7-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Mintable.md#supportsinterface) -- Solidity implementation in [**LSP7Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#supportsinterface) +- Solidity implementation: [`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol) - Function signature: `supportsInterface(bytes4)` - Function selector: `0x01ffc9a7` @@ -545,12 +536,14 @@ Returns true if this contract implements the interface defined by `interfaceId`. | ---- | :----: | ----------- | | `0` | `bool` | - | +
+ ### totalSupply -:::note Links +:::note References -- Specification details in [**LSP-7-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Mintable.md#totalsupply) -- Solidity implementation in [**LSP7Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#totalsupply) +- Solidity implementation: [`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol) - Function signature: `totalSupply()` - Function selector: `0x18160ddd` @@ -568,12 +561,14 @@ Returns the number of existing tokens that have been minted in this contract. | ---- | :-------: | ------------------------------ | | `0` | `uint256` | The number of existing tokens. | +
+ ### transfer -:::note Links +:::note References -- Specification details in [**LSP-7-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Mintable.md#transfer) -- Solidity implementation in [**LSP7Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#transfer) +- Solidity implementation: [`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol) - Function signature: `transfer(address,address,uint256,bool,bytes)` - Function selector: `0x760d9bba` @@ -601,12 +596,14 @@ Transfers an `amount` of tokens from the `from` address to the `to` address and | `allowNonLSP1Recipient` | `bool` | When set to `true`, the `to` address CAN be any address. When set to `false`, the `to` address MUST be a contract that supports the LSP1 UniversalReceiver standard. | | `data` | `bytes` | Any additional data the caller wants included in the emitted event, and sent in the hooks of the `from` and `to` addresses. | +
+ ### transferBatch -:::note Links +:::note References -- Specification details in [**LSP-7-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Mintable.md#transferbatch) -- Solidity implementation in [**LSP7Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#transferbatch) +- Solidity implementation: [`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol) - Function signature: `transferBatch(address[],address[],uint256[],bool[],bytes[])` - Function selector: `0x2d7667c9` @@ -630,16 +627,18 @@ Same as [`transfer(...)`](#`transfer) but transfer multiple tokens based on the | ----------------------- | :---------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `from` | `address[]` | An array of sending addresses. | | `to` | `address[]` | An array of receiving addresses. | -| `amount` | `uint256[]` | An array of amount of tokens to transfer for each `from -> to` transfer. | +| `amount` | `uint256[]` | An array of amount of tokens to transfer for each `from -> to` transfer. | | `allowNonLSP1Recipient` | `bool[]` | For each transfer, when set to `true`, the `to` address CAN be any address. When set to `false`, the `to` address MUST be a contract that supports the LSP1 UniversalReceiver standard. | | `data` | `bytes[]` | An array of additional data the caller wants included in the emitted event, and sent in the hooks to `from` and `to` addresses. | +
+ ### transferOwnership -:::note Links +:::note References -- Specification details in [**LSP-7-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Mintable.md#transferownership) -- Solidity implementation in [**LSP7Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#transferownership) +- Solidity implementation: [`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol) - Function signature: `transferOwnership(address)` - Function selector: `0xf2fde38b` @@ -657,18 +656,255 @@ Transfers ownership of the contract to a new account (`newOwner`). Can only be c | ---------- | :-------: | ----------- | | `newOwner` | `address` | - | ---- +
+ +## Internal Methods + +Any method labeled as `internal` serves as utility function within the contract. They can be used when writing solidity contracts that inherit from this contract. These methods can be extended or modified by overriding their internal behavior to suit specific needs. + +Internal functions cannot be called externally, whether from other smart contracts, dApp interfaces, or backend services. Their restricted accessibility ensures that they remain exclusively available within the context of the current contract, promoting controlled and encapsulated usage of these internal utilities. + +### \_checkOwner + +```solidity +function _checkOwner() internal view; +``` + +Throws if the sender is not the owner. + +
+ +### \_setOwner + +```solidity +function _setOwner(address newOwner) internal nonpayable; +``` + +Changes the owner if `newOwner` and oldOwner are different +This pattern is useful in inheritance. + +
+ +### \_getData + +```solidity +function _getData(bytes32 dataKey) internal view returns (bytes dataValue); +``` + +
+ +### \_setData + +```solidity +function _setData(bytes32 dataKey, bytes dataValue) internal nonpayable; +``` + +Save gas by emitting the [`DataChanged`](#datachanged) event with only the first 256 bytes of dataValue + +
+ +### \_updateOperator + +```solidity +function _updateOperator( + address tokenOwner, + address operator, + uint256 amount +) internal nonpayable; +``` + +Changes token `amount` the `operator` has access to from `tokenOwner` tokens. +If the amount is zero then the operator is being revoked, otherwise the operator amount is being modified. + +
+ +### \_mint + +```solidity +function _mint( + address to, + uint256 amount, + bool allowNonLSP1Recipient, + bytes data +) internal nonpayable; +``` + +Mints `amount` of tokens and transfers it to `to`. + ++ +**Emitted events:** + +- [`Transfer`](#transfer) event with `address(0)` as `from`. + ++ +#### Parameters + +| Name | Type | Description | +| ----------------------- | :-------: | ------------------------------------------------------------------------------------------------------------------------- | +| `to` | `address` | the address to mint tokens for. | +| `amount` | `uint256` | the amount of tokens to mint. | +| `allowNonLSP1Recipient` | `bool` | a boolean that describe if transfer to a `to` address that does not support LSP1 is allowed or not. | +| `data` | `bytes` | Additional data the caller wants included in the emitted {Transfer} event, and sent in the LSP1 hook to the `to` address. | + +
+ +### \_burn + +:::tip Hint + +In dApps, you can know which address is burning tokens by listening for the `Transfer` event and filter with the zero address as `to`. + +::: + +```solidity +function _burn(address from, uint256 amount, bytes data) internal nonpayable; +``` + +Burns (= destroys) `amount` of tokens, decrease the `from` balance. This is done by sending them to the zero address. +Both the sender and recipient will be notified of the token transfer through the LSP1 [`universalReceiver`](#universalreceiver) +function, if they are contracts that support the LSP1 interface. Their `universalReceiver` function will receive +all the parameters in the calldata packed encoded. +Any logic in the [`_beforeTokenTransfer`](#_beforetokentransfer) function will run before updating the balances. + ++ +**Emitted events:** + +- [`Transfer`](#transfer) event with `address(0)` as the `to` address + ++ +#### Parameters + +| Name | Type | Description | +| -------- | :-------: | ------------------------------------------------------------------------------------------------------------------------- | +| `from` | `address` | the address to burn tokens from its balance. | +| `amount` | `uint256` | the amount of tokens to burn. | +| `data` | `bytes` | Additional data the caller wants included in the emitted event, and sent in the LSP1 hook to the `from` and `to` address. | + +
+ +### \_transfer + +```solidity +function _transfer( + address from, + address to, + uint256 amount, + bool allowNonLSP1Recipient, + bytes data +) internal nonpayable; +``` + +Transfer tokens from `from` to `to` by decreasing the balance of `from` by `-amount` and increasing the balance +of `to` by `+amount`. +Both the sender and recipient will be notified of the token transfer through the LSP1 [`universalReceiver`](#universalreceiver) +function, if they are contracts that support the LSP1 interface. Their `universalReceiver` function will receive +all the parameters in the calldata packed encoded. +Any logic in the [`_beforeTokenTransfer`](#_beforetokentransfer) function will run before updating the balances. + ++ +**Emitted events:** + +- [`Transfer`](#transfer) event. + ++ +#### Parameters + +| Name | Type | Description | +| ----------------------- | :-------: | ------------------------------------------------------------------------------------------------------------------------- | +| `from` | `address` | the address to decrease the balance. | +| `to` | `address` | the address to increase the balance. | +| `amount` | `uint256` | the amount of tokens to transfer from `from` to `to`. | +| `allowNonLSP1Recipient` | `bool` | a boolean that describe if transfer to a `to` address that does not support LSP1 is allowed or not. | +| `data` | `bytes` | Additional data the caller wants included in the emitted event, and sent in the LSP1 hook to the `from` and `to` address. | + +
+ +### \_beforeTokenTransfer + +```solidity +function _beforeTokenTransfer( + address from, + address to, + uint256 amount +) internal nonpayable; +``` + +Hook that is called before any token transfer, including minting and burning. +Allows to run custom logic before updating balances and notifiying sender/recipient by overriding this function. + +#### Parameters + +| Name | Type | Description | +| -------- | :-------: | ------------------------------- | +| `from` | `address` | The sender address | +| `to` | `address` | The recipient address | +| `amount` | `uint256` | The amount of token to transfer | + +
+ +### \_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} function on. | +| `lsp1Data` | `bytes` | the data to be sent to the `from` address in the `universalReceiver` call. | + +
+ +### \_notifyTokenReceiver + +```solidity +function _notifyTokenReceiver( + address to, + bool allowNonLSP1Recipient, + bytes lsp1Data +) internal nonpayable; +``` + +Attempt to notify the token receiver `to` about the `amount` tokens being received. +This is done by calling its [`universalReceiver`](#universalreceiver) function with the `_TYPEID_LSP7_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 `allowNonLSP1Recipient` boolean flag. + +- if `allowNonLSP1Recipient` is set to `true`, nothing will happen and no notification will be sent. + +- if `allowNonLSP1Recipient` is set to `false, the transaction will revert. + +#### Parameters + +| Name | Type | Description | +| ----------------------- | :-------: | --------------------------------------------------------------------------------------------------- | +| `to` | `address` | The address to call the {universalReceiver} function on. | +| `allowNonLSP1Recipient` | `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. | + +
## Events ### AuthorizedOperator -:::note Links +:::note References -- Specification details in [**LSP-7-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Mintable.md#authorizedoperator) -- Solidity implementation in [**LSP7Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Mintable) +- 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)` -- Event hash: `0xd66aff874162a96578e919097b6f6d153dfd89a5cec41bb331fdb0c4aec16e2c` +- Event topic hash: `0xd66aff874162a96578e919097b6f6d153dfd89a5cec41bb331fdb0c4aec16e2c` ::: @@ -676,24 +912,26 @@ Transfers ownership of the contract to a new account (`newOwner`). Can only be c event AuthorizedOperator(address indexed operator, address indexed tokenOwner, uint256 indexed amount); ``` -Emitted when `tokenOwner` enables `operator` for `amount` tokens. +Emitted when `tokenOwner` enables `operator` to transfer or burn the `tokenId`. #### Parameters | Name | Type | Description | | -------------------------- | :-------: | ----------------------------------------------------------------------- | -| `operator` **`indexed`** | `address` | The address authorized as an operator | -| `tokenOwner` **`indexed`** | `address` | The token owner | +| `operator` **`indexed`** | `address` | The address authorized as an operator. | +| `tokenOwner` **`indexed`** | `address` | The owner of the `tokenId`. | | `amount` **`indexed`** | `uint256` | The amount of tokens `operator` address has access to from `tokenOwner` | +
+ ### DataChanged -:::note Links +:::note References -- Specification details in [**LSP-7-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Mintable.md#datachanged) -- Solidity implementation in [**LSP7Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#datachanged) +- Solidity implementation: [`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol) - Event signature: `DataChanged(bytes32,bytes)` -- Event hash: `0xece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2` +- Event topic hash: `0xece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2` ::: @@ -701,25 +939,25 @@ Emitted when `tokenOwner` enables `operator` for `amount` tokens. 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`. +_Emitted when data at a key is changed_ #### 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 | +| ----------------------- | :-------: | ------------------------------------ | +| `dataKey` **`indexed`** | `bytes32` | The data key which data value is set | +| `dataValue` | `bytes` | The data value to set | + +
### OwnershipTransferred -:::note Links +:::note References -- Specification details in [**LSP-7-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Mintable.md#ownershiptransferred) -- Solidity implementation in [**LSP7Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Mintable) +- 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 hash: `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0` +- Event topic hash: `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0` ::: @@ -734,14 +972,16 @@ event OwnershipTransferred(address indexed previousOwner, address indexed newOwn | `previousOwner` **`indexed`** | `address` | - | | `newOwner` **`indexed`** | `address` | - | +
+ ### RevokedOperator -:::note Links +:::note References -- Specification details in [**LSP-7-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Mintable.md#revokedoperator) -- Solidity implementation in [**LSP7Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#revokedoperator) +- Solidity implementation: [`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol) - Event signature: `RevokedOperator(address,address)` -- Event hash: `0x50546e66e5f44d728365dc3908c63bc5cfeeab470722c1677e3073a6ac294aa1` +- Event topic hash: `0x50546e66e5f44d728365dc3908c63bc5cfeeab470722c1677e3073a6ac294aa1` ::: @@ -749,23 +989,25 @@ event OwnershipTransferred(address indexed previousOwner, address indexed newOwn event RevokedOperator(address indexed operator, address indexed tokenOwner); ``` -Emitted when `tokenOwner` disables `operator` for `amount` tokens and set its [`authorizedAmountFor(...)`](#`authorizedamountfor) to `0`. +Emitted when `tokenOwner` disables `operator` to transfer or burn `tokenId` on its behalf. #### Parameters -| Name | Type | Description | -| -------------------------- | :-------: | ---------------------------------- | -| `operator` **`indexed`** | `address` | The address revoked from operating | -| `tokenOwner` **`indexed`** | `address` | The token owner | +| Name | Type | Description | +| -------------------------- | :-------: | --------------------------------------------------------------- | +| `operator` **`indexed`** | `address` | The address revoked from the operator array ({getOperatorsOf}). | +| `tokenOwner` **`indexed`** | `address` | The owner of the `tokenId`. | + +
### Transfer -:::note Links +:::note References -- Specification details in [**LSP-7-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Mintable.md#transfer) -- Solidity implementation in [**LSP7Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#transfer) +- Solidity implementation: [`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol) - Event signature: `Transfer(address,address,address,uint256,bool,bytes)` -- Event hash: `0x3997e418d2cef0b3b0e907b1e39605c3f7d32dbd061e82ea5b4a770d46a160a6` +- Event topic hash: `0x3997e418d2cef0b3b0e907b1e39605c3f7d32dbd061e82ea5b4a770d46a160a6` ::: @@ -773,29 +1015,29 @@ Emitted when `tokenOwner` disables `operator` for `amount` tokens and set its [` event Transfer(address indexed operator, address indexed from, address indexed to, uint256 amount, bool allowNonLSP1Recipient, bytes data); ``` -Emitted when the `from` transferred successfully `amount` of tokens to `to`. +Emitted when `tokenId` token is transferred from the `from` to the `to` address. #### Parameters -| Name | Type | Description | -| ------------------------ | :-------: | ---------------------------------------------------------------------------------------------------------------------------- | -| `operator` **`indexed`** | `address` | The address of the operator that executed the transfer. | -| `from` **`indexed`** | `address` | The address which tokens were sent from (balance decreased by `-amount`). | -| `to` **`indexed`** | `address` | The address that received the tokens (balance increased by `+amount`). | -| `amount` | `uint256` | The amount of tokens transferred. | -| `allowNonLSP1Recipient` | `bool` | if the transferred enforced the `to` recipient address to be a contract that implements the LSP1 standard or not. | -| `data` | `bytes` | Any additional data included by the caller during the transfer, and sent in the LSP1 hooks to the `from` and `to` addresses. | +| Name | Type | Description | +| ------------------------ | :-------: | ---------------------------------------------------------------------------------------------------------------------------------- | +| `operator` **`indexed`** | `address` | The address of operator that sent the `tokenId` | +| `from` **`indexed`** | `address` | The previous owner of the `tokenId` | +| `to` **`indexed`** | `address` | The new owner of `tokenId` | +| `amount` | `uint256` | The amount of tokens transferred. | +| `allowNonLSP1Recipient` | `bool` | If the token transfer enforces the `to` recipient address to be a contract that implements the LSP1 standard or not. | +| `data` | `bytes` | Any additional data the caller included by the caller during the transfer, and sent in the hooks to the `from` and `to` addresses. | ---- +
## Errors ### ERC725Y_DataKeysValuesEmptyArray -:::note Links +:::note References -- Specification details in [**LSP-7-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Mintable.md#erc725y_datakeysvaluesemptyarray) -- Solidity implementation in [**LSP7Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#erc725y_datakeysvaluesemptyarray) +- Solidity implementation: [`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol) - Error signature: `ERC725Y_DataKeysValuesEmptyArray()` - Error hash: `0x97da5f95` @@ -805,14 +1047,16 @@ Emitted when the `from` transferred successfully `amount` of tokens to `to`. error ERC725Y_DataKeysValuesEmptyArray(); ``` -Reverts when one of the array parameter provided to [`setDataBatch`](#setdatabatch) function is an empty array. +reverts when one of the array parameter provided to `setDataBatch` is an empty array + +
### ERC725Y_DataKeysValuesLengthMismatch -:::note Links +:::note References -- Specification details in [**LSP-7-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Mintable.md#erc725y_datakeysvalueslengthmismatch) -- Solidity implementation in [**LSP7Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#erc725y_datakeysvalueslengthmismatch) +- Solidity implementation: [`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol) - Error signature: `ERC725Y_DataKeysValuesLengthMismatch()` - Error hash: `0x3bcc8979` @@ -822,14 +1066,16 @@ Reverts when one of the array parameter provided to [`setDataBatch`](#setdatabat error ERC725Y_DataKeysValuesLengthMismatch(); ``` -Reverts when there is not the same number of elements in the `datakeys` and `dataValues` array parameters provided when calling the [`setDataBatch`](#setdatabatch) function. +reverts when there is not the same number of elements in the lists of data keys and data values when calling setDataBatch. + +
### ERC725Y_MsgValueDisallowed -:::note Links +:::note References -- Specification details in [**LSP-7-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Mintable.md#erc725y_msgvaluedisallowed) -- Solidity implementation in [**LSP7Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#erc725y_msgvaluedisallowed) +- Solidity implementation: [`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol) - Error signature: `ERC725Y_MsgValueDisallowed()` - Error hash: `0xf36ba737` @@ -839,14 +1085,16 @@ Reverts when there is not the same number of elements in the `datakeys` and `dat error ERC725Y_MsgValueDisallowed(); ``` -Reverts when sending value to the [`setData`](#setdata) or [`setDataBatch`](#setdatabatch) function. +reverts when sending value to the `setData(..)` functions + +
### LSP4TokenNameNotEditable -:::note Links +:::note References -- Specification details in [**LSP-7-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Mintable.md#lsp4tokennamenoteditable) -- Solidity implementation in [**LSP7Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp4tokennamenoteditable) +- Solidity implementation: [`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol) - Error signature: `LSP4TokenNameNotEditable()` - Error hash: `0x85c169bd` @@ -858,12 +1106,14 @@ 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. +
+ ### LSP4TokenSymbolNotEditable -:::note Links +:::note References -- Specification details in [**LSP-7-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Mintable.md#lsp4tokensymbolnoteditable) -- Solidity implementation in [**LSP7Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp4tokensymbolnoteditable) +- Solidity implementation: [`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol) - Error signature: `LSP4TokenSymbolNotEditable()` - Error hash: `0x76755b38` @@ -875,12 +1125,14 @@ 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. +
+ ### LSP7AmountExceedsAuthorizedAmount -:::note Links +:::note References -- Specification details in [**LSP-7-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Mintable.md#lsp7amountexceedsauthorizedamount) -- Solidity implementation in [**LSP7Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7amountexceedsauthorizedamount) +- Solidity implementation: [`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol) - Error signature: `LSP7AmountExceedsAuthorizedAmount(address,uint256,address,uint256)` - Error hash: `0xf3a6b691` @@ -906,12 +1158,14 @@ reverts when `operator` of `tokenOwner` send an `amount` of tokens larger than t | `operator` | `address` | - | | `amount` | `uint256` | - | +
+ ### LSP7AmountExceedsBalance -:::note Links +:::note References -- Specification details in [**LSP-7-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Mintable.md#lsp7amountexceedsbalance) -- Solidity implementation in [**LSP7Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7amountexceedsbalance) +- Solidity implementation: [`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol) - Error signature: `LSP7AmountExceedsBalance(uint256,address,uint256)` - Error hash: `0x08d47949` @@ -935,12 +1189,14 @@ reverts when sending an `amount` of tokens larger than the current `balance` of | `tokenOwner` | `address` | - | | `amount` | `uint256` | - | +
+ ### LSP7CannotSendToSelf -:::note Links +:::note References -- Specification details in [**LSP-7-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Mintable.md#lsp7cannotsendtoself) -- Solidity implementation in [**LSP7Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7cannotsendtoself) +- Solidity implementation: [`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol) - Error signature: `LSP7CannotSendToSelf()` - Error hash: `0xb9afb000` @@ -952,12 +1208,14 @@ error LSP7CannotSendToSelf(); reverts when specifying the same address for `from` or `to` in a token transfer. +
+ ### LSP7CannotSendWithAddressZero -:::note Links +:::note References -- Specification details in [**LSP-7-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Mintable.md#lsp7cannotsendwithaddresszero) -- Solidity implementation in [**LSP7Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7cannotsendwithaddresszero) +- Solidity implementation: [`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol) - Error signature: `LSP7CannotSendWithAddressZero()` - Error hash: `0xd2d5ec30` @@ -975,12 +1233,14 @@ reverts when trying to: - transfer tokens from or to the zero address. +
+ ### LSP7CannotUseAddressZeroAsOperator -:::note Links +:::note References -- Specification details in [**LSP-7-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Mintable.md#lsp7cannotuseaddresszeroasoperator) -- Solidity implementation in [**LSP7Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7cannotuseaddresszeroasoperator) +- Solidity implementation: [`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol) - Error signature: `LSP7CannotUseAddressZeroAsOperator()` - Error hash: `0x6355e766` @@ -992,12 +1252,14 @@ error LSP7CannotUseAddressZeroAsOperator(); reverts when trying to set the zero address as an operator. +
+ ### LSP7DecreasedAllowanceBelowZero -:::note Links +:::note References -- Specification details in [**LSP-7-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Mintable.md#lsp7decreasedallowancebelowzero) -- Solidity implementation in [**LSP7Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7decreasedallowancebelowzero) +- Solidity implementation: [`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol) - Error signature: `LSP7DecreasedAllowanceBelowZero()` - Error hash: `0x0ef76c35` @@ -1009,12 +1271,14 @@ error LSP7DecreasedAllowanceBelowZero(); Reverts when trying to decrease an operator's allowance to more than its current allowance. +
+ ### LSP7InvalidTransferBatch -:::note Links +:::note References -- Specification details in [**LSP-7-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Mintable.md#lsp7invalidtransferbatch) -- Solidity implementation in [**LSP7Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7invalidtransferbatch) +- Solidity implementation: [`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol) - Error signature: `LSP7InvalidTransferBatch()` - Error hash: `0x263eee8d` @@ -1026,12 +1290,14 @@ error LSP7InvalidTransferBatch(); reverts when the array parameters used in [`transferBatch`](#transferbatch) have different lengths. +
+ ### LSP7NotifyTokenReceiverContractMissingLSP1Interface -:::note Links +:::note References -- Specification details in [**LSP-7-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Mintable.md#lsp7notifytokenreceivercontractmissinglsp1interface) -- Solidity implementation in [**LSP7Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7notifytokenreceivercontractmissinglsp1interface) +- Solidity implementation: [`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol) - Error signature: `LSP7NotifyTokenReceiverContractMissingLSP1Interface(address)` - Error hash: `0xa608fbb6` @@ -1051,12 +1317,14 @@ reverts if the `tokenReceiver` does not implement LSP1 when minting or transferr | --------------- | :-------: | ----------- | | `tokenReceiver` | `address` | - | +
+ ### LSP7NotifyTokenReceiverIsEOA -:::note Links +:::note References -- Specification details in [**LSP-7-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Mintable.md#lsp7notifytokenreceiveriseoa) -- Solidity implementation in [**LSP7Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7notifytokenreceiveriseoa) +- Solidity implementation: [`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol) - Error signature: `LSP7NotifyTokenReceiverIsEOA(address)` - Error hash: `0x26c247f4` @@ -1074,12 +1342,14 @@ reverts if the `tokenReceiver` is an EOA when minting or transferring tokens wit | --------------- | :-------: | ----------- | | `tokenReceiver` | `address` | - | +
+ ### LSP7TokenOwnerCannotBeOperator -:::note Links +:::note References -- Specification details in [**LSP-7-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-Mintable.md#lsp7tokenownercannotbeoperator) -- Solidity implementation in [**LSP7Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7Mintable) +- Specification details: [**LSP-7-DigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-7-DigitalAsset.md#lsp7tokenownercannotbeoperator) +- Solidity implementation: [`LSP7Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol) - Error signature: `LSP7TokenOwnerCannotBeOperator()` - Error hash: `0xdab75047` @@ -1091,193 +1361,4 @@ error LSP7TokenOwnerCannotBeOperator(); reverts when trying to authorize or revoke the token's owner as an operator. - - - - - - -[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/nft-2.0/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/nft-2.0/LSP7-Digital-Asset -[LSP8IdentifiableDigitalAsset]: https://docs.lukso.tech/standards/nft-2.0/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/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.md b/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.md index 65c964d37c..7859e15143 100644 --- a/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.md +++ b/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.md @@ -1,6 +1,14 @@ + + + # LSP8IdentifiableDigitalAsset -:::info Solidity contract +:::info Standard Specifications + +[`LSP-8-IdentifiableDigitalAsset`](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md) + +::: +:::info Solidity implementation [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) @@ -8,16 +16,19 @@ > Implementation of a LSP8 Identifiable Digital Asset, a contract that represents a non-fungible token. -Standard implementation contract of the LSP8 standard. Minting and transferring are done using by giving a unique `tokenId`. This implementation is agnostic to the way tokens are created. A supply mechanism has to be added in a derived contract using [`_mint`](#_mint) For a generic mechanism, see [`LSP7Mintable`](#lsp7mintable). +Standard implementation contract of the LSP8 standard. Minting and transferring are done by providing a unique `tokenId`. This implementation is agnostic to the way tokens are created. A supply mechanism has to be added in a derived contract using [`_mint`](#_mint) For a generic mechanism, see [`LSP7Mintable`](#lsp7mintable). -## Methods +## Public Methods + +Public methods are accessible externally from users, allowing interaction with this function from dApps or other smart contracts. +When marked as 'public', a method can be called both externally and internally, on the other hand, when marked as 'external', a method can only be called externally. ### authorizeOperator -:::note Links +:::note References -- Specification details in [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#authorizeoperator) -- Solidity implementation in [**LSP8IdentifiableDigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#authorizeoperator) +- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) - Function signature: `authorizeOperator(address,bytes32)` - Function selector: `0xcf5182ba` @@ -39,12 +50,14 @@ Allow an `operator` address to transfer or burn a specific `tokenId` on behalf o | `operator` | `address` | The address to authorize as an operator. | | `tokenId` | `bytes32` | The token ID operator has access to.. | +
+ ### balanceOf -:::note Links +:::note References -- Specification details in [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#balanceof) -- Solidity implementation in [**LSP8IdentifiableDigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#balanceof) +- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) - Function signature: `balanceOf(address)` - Function selector: `0x70a08231` @@ -68,12 +81,14 @@ Get the number of token IDs owned by `tokenOwner`. | ---- | :-------: | ----------------------------------------------------- | | `0` | `uint256` | The total number of token IDs that `tokenOwner` owns. | +
+ ### getData -:::note Links +:::note References -- Specification details in [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#getdata) -- Solidity implementation in [**LSP8IdentifiableDigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#getdata) +- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) - Function signature: `getData(bytes32)` - Function selector: `0x54f6127f` @@ -97,12 +112,14 @@ _Gets singular data at a given `dataKey`_ | ----------- | :-----: | -------------------------- | | `dataValue` | `bytes` | The data stored at the key | +
+ ### getDataBatch -:::note Links +:::note References -- Specification details in [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#getdatabatch) -- Solidity implementation in [**LSP8IdentifiableDigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#getdatabatch) +- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) - Function signature: `getDataBatch(bytes32[])` - Function selector: `0xdedff9c6` @@ -128,12 +145,14 @@ _Gets array of data for multiple given keys_ | ------------ | :-------: | ----------------------------------------- | | `dataValues` | `bytes[]` | The array of data stored at multiple keys | +
+ ### getOperatorsOf -:::note Links +:::note References -- Specification details in [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#getoperatorsof) -- Solidity implementation in [**LSP8IdentifiableDigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#getoperatorsof) +- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) - Function signature: `getOperatorsOf(bytes32)` - Function selector: `0x49a6078d` @@ -157,12 +176,14 @@ Returns all `operator` addresses that are allowed to transfer or burn a specific | ---- | :---------: | ------------------------------------------------------------------------------------------------------------ | | `0` | `address[]` | An array of operators allowed to transfer or burn a specific `tokenId`. Requirements - `tokenId` must exist. | +
+ ### isOperatorFor -:::note Links +:::note References -- Specification details in [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#isoperatorfor) -- Solidity implementation in [**LSP8IdentifiableDigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#isoperatorfor) +- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) - Function signature: `isOperatorFor(address,bytes32)` - Function selector: `0x2a3654a4` @@ -190,12 +211,14 @@ Returns whether `operator` address is an operator for a given `tokenId`. | ---- | :----: | --------------------------------------------------------------------- | | `0` | `bool` | `true` if `operator` is an operator for `tokenId`, `false` otherwise. | +
+ ### owner -:::note Links +:::note References -- Specification details in [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#owner) -- Solidity implementation in [**LSP8IdentifiableDigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#owner) +- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) - Function signature: `owner()` - Function selector: `0x8da5cb5b` @@ -213,12 +236,14 @@ Returns the address of the current owner. | ---- | :-------: | ----------- | | `0` | `address` | - | +
+ ### renounceOwnership -:::note Links +:::note References -- Specification details in [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#renounceownership) -- Solidity implementation in [**LSP8IdentifiableDigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#renounceownership) +- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) - Function signature: `renounceOwnership()` - Function selector: `0x715018a6` @@ -230,12 +255,14 @@ function renounceOwnership() external nonpayable; Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner. +
+ ### revokeOperator -:::note Links +:::note References -- Specification details in [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#revokeoperator) -- Solidity implementation in [**LSP8IdentifiableDigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#revokeoperator) +- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) - Function signature: `revokeOperator(address,bytes32)` - Function selector: `0x0b0c6d82` @@ -254,12 +281,14 @@ Remove access of `operator` for a given `tokenId`, disallowing it to transfer `t | `operator` | `address` | The address to revoke as an operator. | | `tokenId` | `bytes32` | The tokenId `operator` is revoked from operating on. | +
+ ### setData -:::note Links +:::note References -- Specification details in [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#setdata) -- Solidity implementation in [**LSP8IdentifiableDigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#setdata) +- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) - Function signature: `setData(bytes32,bytes)` - Function selector: `0x7f23690c` @@ -278,12 +307,14 @@ _Sets singular data for a given `dataKey`_ | `dataKey` | `bytes32` | The key to retrieve stored value | | `dataValue` | `bytes` | The value to set SHOULD only be callable by the owner of the contract set via ERC173 The function is marked as payable to enable flexibility on child contracts If the function is not intended to receive value, an additional check should be implemented to check that value equal 0. Emits a {DataChanged} event. | +
+ ### setDataBatch -:::note Links +:::note References -- Specification details in [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#setdatabatch) -- Solidity implementation in [**LSP8IdentifiableDigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#setdatabatch) +- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) - Function signature: `setDataBatch(bytes32[],bytes[])` - Function selector: `0x97902421` @@ -304,12 +335,14 @@ Sets array of data for multiple given `dataKeys` SHOULD only be callable by the | `dataKeys` | `bytes32[]` | The array of data keys for values to set | | `dataValues` | `bytes[]` | The array of values to set | +
+ ### supportsInterface -:::note Links +:::note References -- Specification details in [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#supportsinterface) -- Solidity implementation in [**LSP8IdentifiableDigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#supportsinterface) +- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) - Function signature: `supportsInterface(bytes4)` - Function selector: `0x01ffc9a7` @@ -333,12 +366,14 @@ Returns true if this contract implements the interface defined by `interfaceId`. | ---- | :----: | ----------- | | `0` | `bool` | - | +
+ ### tokenIdsOf -:::note Links +:::note References -- Specification details in [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#tokenidsof) -- Solidity implementation in [**LSP8IdentifiableDigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#tokenidsof) +- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) - Function signature: `tokenIdsOf(address)` - Function selector: `0xa3b261f2` @@ -362,12 +397,14 @@ Returns the list of token IDs that the `tokenOwner` address owns. | ---- | :---------: | ------------------------------------------------------- | | `0` | `bytes32[]` | An array of `bytes32[] tokenIds` owned by `tokenOwner`. | +
+ ### tokenOwnerOf -:::note Links +:::note References -- Specification details in [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#tokenownerof) -- Solidity implementation in [**LSP8IdentifiableDigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#tokenownerof) +- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) - Function signature: `tokenOwnerOf(bytes32)` - Function selector: `0x217b2270` @@ -391,12 +428,14 @@ Returns the list of `tokenIds` for the `tokenOwner` address. | ---- | :-------: | ----------------------------------------- | | `0` | `address` | The owner address of the given `tokenId`. | +
+ ### totalSupply -:::note Links +:::note References -- Specification details in [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#totalsupply) -- Solidity implementation in [**LSP8IdentifiableDigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#totalsupply) +- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) - Function signature: `totalSupply()` - Function selector: `0x18160ddd` @@ -414,12 +453,14 @@ Returns the number of existing tokens that have been minted in this contract. | ---- | :-------: | ------------------------------ | | `0` | `uint256` | The number of existing tokens. | +
+ ### transfer -:::note Links +:::note References -- Specification details in [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#transfer) -- Solidity implementation in [**LSP8IdentifiableDigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#transfer) +- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) - Function signature: `transfer(address,address,bytes32,bool,bytes)` - Function selector: `0x511b6952` @@ -447,12 +488,14 @@ Transfer a given `tokenId` token from the `from` address to the `to` address. If | `allowNonLSP1Recipient` | `bool` | When set to `true`, the `to` address CAN be any addres. When set to `false`, the `to` address MUST be a contract that supports the LSP1 UniversalReceiver standard. | | `data` | `bytes` | Any additional data the caller wants included in the emitted event, and sent in the hooks of the `from` and `to` addresses. | +
+ ### transferBatch -:::note Links +:::note References -- Specification details in [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#transferbatch) -- Solidity implementation in [**LSP8IdentifiableDigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#transferbatch) +- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) - Function signature: `transferBatch(address[],address[],bytes32[],bool[],bytes[])` - Function selector: `0x7e87632c` @@ -480,12 +523,14 @@ Transfers multiple tokens at once based on the arrays of `from`, `to` and `token | `allowNonLSP1Recipient` | `bool[]` | When set to `true`, `to` may be any address. When set to `false`, `to` must be a contract that supports the LSP1 standard and not revert. | | `data` | `bytes[]` | Any additional data the caller wants included in the emitted event, and sent in the hooks to the `from` and `to` addresses. | +
+ ### transferOwnership -:::note Links +:::note References -- Specification details in [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#transferownership) -- Solidity implementation in [**LSP8IdentifiableDigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#transferownership) +- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) - Function signature: `transferOwnership(address)` - Function selector: `0xf2fde38b` @@ -503,18 +548,300 @@ Transfers ownership of the contract to a new account (`newOwner`). Can only be c | ---------- | :-------: | ----------- | | `newOwner` | `address` | - | ---- +
+ +## Internal Methods + +Any method labeled as `internal` serves as utility function within the contract. They can be used when writing solidity contracts that inherit from this contract. These methods can be extended or modified by overriding their internal behavior to suit specific needs. + +Internal functions cannot be called externally, whether from other smart contracts, dApp interfaces, or backend services. Their restricted accessibility ensures that they remain exclusively available within the context of the current contract, promoting controlled and encapsulated usage of these internal utilities. + +### \_checkOwner + +```solidity +function _checkOwner() internal view; +``` + +Throws if the sender is not the owner. + +
+ +### \_setOwner + +```solidity +function _setOwner(address newOwner) internal nonpayable; +``` + +Changes the owner if `newOwner` and oldOwner are different +This pattern is useful in inheritance. + +
+ +### \_getData + +```solidity +function _getData(bytes32 dataKey) internal view returns (bytes dataValue); +``` + +
+ +### \_setData + +```solidity +function _setData(bytes32 dataKey, bytes dataValue) internal nonpayable; +``` + +Save gas by emitting the [`DataChanged`](#datachanged) event with only the first 256 bytes of dataValue + +
+ +### \_isOperatorOrOwner + +```solidity +function _isOperatorOrOwner( + address caller, + bytes32 tokenId +) internal view returns (bool); +``` + +verifies if the `caller` is operator or owner for the `tokenId` + +#### Returns + +| Name | Type | Description | +| ---- | :----: | -------------------------------------------- | +| `0` | `bool` | true if `caller` is either operator or owner | + +
+ +### \_revokeOperator + +```solidity +function _revokeOperator( + address operator, + address tokenOwner, + bytes32 tokenId +) internal nonpayable; +``` + +removes `operator` from the list of operators for the `tokenId` + +
+ +### \_clearOperators + +```solidity +function _clearOperators( + address tokenOwner, + bytes32 tokenId +) internal nonpayable; +``` + +revoke all the current operators for a specific `tokenId` token which belongs to `tokenOwner`. + +#### Parameters + +| Name | Type | Description | +| ------------ | :-------: | ------------------------------------------------- | +| `tokenOwner` | `address` | The address that is the owner of the `tokenId`. | +| `tokenId` | `bytes32` | The token to remove the associated operators for. | + +
+ +### \_exists + +```solidity +function _exists(bytes32 tokenId) internal view returns (bool); +``` + +Returns whether `tokenId` exists. +Tokens start existing when they are minted ([`_mint`](#_mint)), and stop existing when they are burned ([`_burn`](#_burn)). + +
+ +### \_existsOrError + +```solidity +function _existsOrError(bytes32 tokenId) internal view; +``` + +When `tokenId` does not exist then revert with an error. + +
+ +### \_mint + +```solidity +function _mint( + address to, + bytes32 tokenId, + bool allowNonLSP1Recipient, + bytes data +) internal nonpayable; +``` + +Create `tokenId` by minting it and transfers it to `to`. + ++ +**Emitted events:** + +- [`Transfer`](#transfer) event with `address(0)` as `from` address. + ++ +#### Parameters + +| Name | Type | Description | +| ----------------------- | :-------: | -------------------------------------------------------------------------------------------------------------------------- | +| `to` | `address` | @param tokenId The token ID to create (= mint). | +| `tokenId` | `bytes32` | The token ID to create (= mint). | +| `allowNonLSP1Recipient` | `bool` | When set to `true`, `to` may be any address. When set to `false`, `to` must be a contract that supports the LSP1 standard. | +| `data` | `bytes` | Any additional data the caller wants included in the emitted event, and sent in the hook of the `to` address. | + +
+ +### \_burn + +:::tip Hint + +In dApps, you can know which addresses are burning tokens by listening for the `Transfer` event and filter with the zero address as `to`. + +::: + +```solidity +function _burn(bytes32 tokenId, bytes data) internal nonpayable; +``` + +Burn a specific `tokenId`, removing the `tokenId` from the [`tokenIdsOf`](#tokenidsof) the caller and decreasing its [`balanceOf`](#balanceof) by -1. +This will also clear all the operators allowed to transfer the `tokenId`. +The owner of the `tokenId` will be notified about the `tokenId` being transferred through its LSP1 [`universalReceiver`](#universalreceiver) +function, if it is a contract that supports the LSP1 interface. Its [`universalReceiver`](#universalreceiver) function will receive +all the parameters in the calldata packed encoded. +Any logic in the [`_beforeTokenTransfer`](#_beforetokentransfer) function will run before burning `tokenId` and updating the balances. + ++ +**Emitted events:** + +- [`Transfer`](#transfer) event with `address(0)` as the `to` address. + ++ +#### Parameters + +| Name | Type | Description | +| --------- | :-------: | --------------------------------------------------------------------------------------------------------------------------- | +| `tokenId` | `bytes32` | The token to burn. | +| `data` | `bytes` | Any additional data the caller wants included in the emitted event, and sent in the LSP1 hook on the token owner's address. | + +
+ +### \_transfer + +:::danger + +This internal function does not check if the sender is authorized or not to operate on the `tokenId`. + +::: + +```solidity +function _transfer( + address from, + address to, + bytes32 tokenId, + bool allowNonLSP1Recipient, + bytes data +) internal nonpayable; +``` + +Change the owner of the `tokenId` from `from` to `to`. +Both the sender and recipient will be notified of the `tokenId` being transferred through their LSP1 [`universalReceiver`](#universalreceiver) +function, if they are contracts that support the LSP1 interface. Their `universalReceiver` function will receive +all the parameters in the calldata packed encoded. +Any logic in the [`_beforeTokenTransfer`](#_beforetokentransfer) function will run before changing the owner of `tokenId`. + ++ +**Emitted events:** + +- [`Transfer`](#transfer) event. + ++ +#### Parameters + +| Name | Type | Description | +| ----------------------- | :-------: | -------------------------------------------------------------------------------------------------------------------------- | +| `from` | `address` | The sender address. | +| `to` | `address` | @param tokenId The token to transfer. | +| `tokenId` | `bytes32` | The token to transfer. | +| `allowNonLSP1Recipient` | `bool` | When set to `true`, `to` may be any address. When set to `false`, `to` must be a contract that supports the LSP1 standard. | +| `data` | `bytes` | Additional data the caller wants included in the emitted event, and sent in the hooks to `from` and `to` addresses. | + +
+ +### \_beforeTokenTransfer + +```solidity +function _beforeTokenTransfer( + address from, + address to, + bytes32 tokenId +) internal nonpayable; +``` + +Hook that is called before any token transfer, including minting and burning. + +- Allows to run custom logic before updating balances and notifiying sender/recipient by overriding this function. + +#### Parameters + +| Name | Type | Description | +| --------- | :-------: | -------------------------------------- | +| `from` | `address` | The sender address | +| `to` | `address` | @param tokenId The tokenId to transfer | +| `tokenId` | `bytes32` | The tokenId to transfer | + +
+ +### \_notifyTokenSender + +```solidity +function _notifyTokenSender(address from, bytes lsp1Data) internal nonpayable; +``` + +An attempt is made to notify the token sender about the `tokenId` changing owners using +LSP1 interface. + +
+ +### \_notifyTokenReceiver + +```solidity +function _notifyTokenReceiver( + address to, + bool allowNonLSP1Recipient, + bytes lsp1Data +) internal nonpayable; +``` + +An attempt is made to notify the token receiver about the `tokenId` changing owners +using LSP1 interface. When allowNonLSP1Recipient is FALSE the token receiver MUST support LSP1. +The receiver may revert when the token being sent is not wanted. + +
## Events ### AuthorizedOperator -:::note Links +:::note References -- Specification details in [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#authorizedoperator) -- Solidity implementation in [**LSP8IdentifiableDigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#authorizedoperator) +- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) - Event signature: `AuthorizedOperator(address,address,bytes32)` -- Event hash: `0x34b797fc5a526f7bf1d2b5de25f6564fd85ae364e3ee939aee7c1ac27871a988` +- Event topic hash: `0x34b797fc5a526f7bf1d2b5de25f6564fd85ae364e3ee939aee7c1ac27871a988` ::: @@ -522,22 +849,26 @@ Transfers ownership of the contract to a new account (`newOwner`). Can only be c event AuthorizedOperator(address indexed operator, address indexed tokenOwner, bytes32 indexed tokenId); ``` +Emitted when `tokenOwner` enables `operator` to transfer or burn the `tokenId`. + #### Parameters -| Name | Type | Description | -| -------------------------- | :-------: | ----------- | -| `operator` **`indexed`** | `address` | - | -| `tokenOwner` **`indexed`** | `address` | - | -| `tokenId` **`indexed`** | `bytes32` | - | +| Name | Type | Description | +| -------------------------- | :-------: | -------------------------------------------------------------------- | +| `operator` **`indexed`** | `address` | The address authorized as an operator. | +| `tokenOwner` **`indexed`** | `address` | The owner of the `tokenId`. | +| `tokenId` **`indexed`** | `bytes32` | The tokenId `operator` address has access on behalf of `tokenOwner`. | + +
### DataChanged -:::note Links +:::note References -- Specification details in [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#datachanged) -- Solidity implementation in [**LSP8IdentifiableDigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) +- 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 hash: `0xece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2` +- Event topic hash: `0xece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2` ::: @@ -549,19 +880,21 @@ _Emitted when data at a key is changed_ #### Parameters -| Name | Type | Description | -| ----------------------- | :-------: | ----------- | -| `dataKey` **`indexed`** | `bytes32` | - | -| `dataValue` | `bytes` | - | +| Name | Type | Description | +| ----------------------- | :-------: | ------------------------------------ | +| `dataKey` **`indexed`** | `bytes32` | The data key which data value is set | +| `dataValue` | `bytes` | The data value to set | + +
### OwnershipTransferred -:::note Links +:::note References -- Specification details in [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#ownershiptransferred) -- Solidity implementation in [**LSP8IdentifiableDigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#ownershiptransferred) +- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) - Event signature: `OwnershipTransferred(address,address)` -- Event hash: `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0` +- Event topic hash: `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0` ::: @@ -576,14 +909,16 @@ event OwnershipTransferred(address indexed previousOwner, address indexed newOwn | `previousOwner` **`indexed`** | `address` | - | | `newOwner` **`indexed`** | `address` | - | +
+ ### RevokedOperator -:::note Links +:::note References -- Specification details in [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#revokedoperator) -- Solidity implementation in [**LSP8IdentifiableDigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#revokedoperator) +- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) - Event signature: `RevokedOperator(address,address,bytes32)` -- Event hash: `0x17d5389f6ab6adb2647dfa0aa365c323d37adacc30b33a65310b6158ce1373d5` +- Event topic hash: `0x17d5389f6ab6adb2647dfa0aa365c323d37adacc30b33a65310b6158ce1373d5` ::: @@ -591,22 +926,26 @@ event OwnershipTransferred(address indexed previousOwner, address indexed newOwn event RevokedOperator(address indexed operator, address indexed tokenOwner, bytes32 indexed tokenId); ``` +Emitted when `tokenOwner` disables `operator` to transfer or burn `tokenId` on its behalf. + #### Parameters -| Name | Type | Description | -| -------------------------- | :-------: | ----------- | -| `operator` **`indexed`** | `address` | - | -| `tokenOwner` **`indexed`** | `address` | - | -| `tokenId` **`indexed`** | `bytes32` | - | +| Name | Type | Description | +| -------------------------- | :-------: | --------------------------------------------------------------- | +| `operator` **`indexed`** | `address` | The address revoked from the operator array ({getOperatorsOf}). | +| `tokenOwner` **`indexed`** | `address` | The owner of the `tokenId`. | +| `tokenId` **`indexed`** | `bytes32` | The tokenId `operator` is revoked from operating on. | + +
### Transfer -:::note Links +:::note References -- Specification details in [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#transfer) -- Solidity implementation in [**LSP8IdentifiableDigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#transfer) +- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) - Event signature: `Transfer(address,address,address,bytes32,bool,bytes)` -- Event hash: `0xb333c813a7426a7a11e2b190cad52c44119421594b47f6f32ace6d8c7207b2bf` +- Event topic hash: `0xb333c813a7426a7a11e2b190cad52c44119421594b47f6f32ace6d8c7207b2bf` ::: @@ -614,27 +953,29 @@ event RevokedOperator(address indexed operator, address indexed tokenOwner, byte event Transfer(address operator, address indexed from, address indexed to, bytes32 indexed tokenId, bool allowNonLSP1Recipient, bytes data); ``` +Emitted when `tokenId` token is transferred from the `from` to the `to` address. + #### Parameters -| Name | Type | Description | -| ----------------------- | :-------: | ----------- | -| `operator` | `address` | - | -| `from` **`indexed`** | `address` | - | -| `to` **`indexed`** | `address` | - | -| `tokenId` **`indexed`** | `bytes32` | - | -| `allowNonLSP1Recipient` | `bool` | - | -| `data` | `bytes` | - | +| Name | Type | Description | +| ----------------------- | :-------: | ---------------------------------------------------------------------------------------------------------------------------------- | +| `operator` | `address` | The address of operator that sent the `tokenId` | +| `from` **`indexed`** | `address` | The previous owner of the `tokenId` | +| `to` **`indexed`** | `address` | The new owner of `tokenId` | +| `tokenId` **`indexed`** | `bytes32` | The tokenId that was transferred | +| `allowNonLSP1Recipient` | `bool` | If the token transfer enforces the `to` recipient address to be a contract that implements the LSP1 standard or not. | +| `data` | `bytes` | Any additional data the caller included by the caller during the transfer, and sent in the hooks to the `from` and `to` addresses. | ---- +
## Errors ### ERC725Y_DataKeysValuesEmptyArray -:::note Links +:::note References -- Specification details in [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#erc725y_datakeysvaluesemptyarray) -- Solidity implementation in [**LSP8IdentifiableDigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#erc725y_datakeysvaluesemptyarray) +- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) - Error signature: `ERC725Y_DataKeysValuesEmptyArray()` - Error hash: `0x97da5f95` @@ -646,12 +987,14 @@ error ERC725Y_DataKeysValuesEmptyArray(); reverts when one of the array parameter provided to `setDataBatch` is an empty array +
+ ### ERC725Y_DataKeysValuesLengthMismatch -:::note Links +:::note References -- Specification details in [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#erc725y_datakeysvalueslengthmismatch) -- Solidity implementation in [**LSP8IdentifiableDigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#erc725y_datakeysvalueslengthmismatch) +- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) - Error signature: `ERC725Y_DataKeysValuesLengthMismatch()` - Error hash: `0x3bcc8979` @@ -663,12 +1006,14 @@ error ERC725Y_DataKeysValuesLengthMismatch(); reverts when there is not the same number of elements in the lists of data keys and data values when calling setDataBatch. +
+ ### ERC725Y_MsgValueDisallowed -:::note Links +:::note References -- Specification details in [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#erc725y_msgvaluedisallowed) -- Solidity implementation in [**LSP8IdentifiableDigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#erc725y_msgvaluedisallowed) +- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) - Error signature: `ERC725Y_MsgValueDisallowed()` - Error hash: `0xf36ba737` @@ -680,12 +1025,14 @@ error ERC725Y_MsgValueDisallowed(); reverts when sending value to the `setData(..)` functions +
+ ### LSP4TokenNameNotEditable -:::note Links +:::note References -- Specification details in [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp4tokennamenoteditable) -- Solidity implementation in [**LSP8IdentifiableDigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp4tokennamenoteditable) +- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) - Error signature: `LSP4TokenNameNotEditable()` - Error hash: `0x85c169bd` @@ -697,12 +1044,14 @@ 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. +
+ ### LSP4TokenSymbolNotEditable -:::note Links +:::note References -- Specification details in [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp4tokensymbolnoteditable) -- Solidity implementation in [**LSP8IdentifiableDigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp4tokensymbolnoteditable) +- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) - Error signature: `LSP4TokenSymbolNotEditable()` - Error hash: `0x76755b38` @@ -714,12 +1063,14 @@ 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. +
+ ### LSP8CannotSendToAddressZero -:::note Links +:::note References -- Specification details in [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8cannotsendtoaddresszero) -- Solidity implementation in [**LSP8IdentifiableDigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8cannotsendtoaddresszero) +- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) - Error signature: `LSP8CannotSendToAddressZero()` - Error hash: `0x24ecef4d` @@ -731,12 +1082,14 @@ error LSP8CannotSendToAddressZero(); reverts when trying to send token to the zero address. +
+ ### LSP8CannotSendToSelf -:::note Links +:::note References -- Specification details in [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8cannotsendtoself) -- Solidity implementation in [**LSP8IdentifiableDigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8cannotsendtoself) +- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) - Error signature: `LSP8CannotSendToSelf()` - Error hash: `0x5d67d6c1` @@ -748,12 +1101,14 @@ error LSP8CannotSendToSelf(); reverts when specifying the same address for `from` and `to` in a token transfer. +
+ ### LSP8CannotUseAddressZeroAsOperator -:::note Links +:::note References -- Specification details in [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8cannotuseaddresszeroasoperator) -- Solidity implementation in [**LSP8IdentifiableDigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8cannotuseaddresszeroasoperator) +- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) - Error signature: `LSP8CannotUseAddressZeroAsOperator()` - Error hash: `0x9577b8b3` @@ -765,12 +1120,14 @@ error LSP8CannotUseAddressZeroAsOperator(); reverts when trying to set the zero address as an operator. +
+ ### LSP8InvalidTransferBatch -:::note Links +:::note References -- Specification details in [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8invalidtransferbatch) -- Solidity implementation in [**LSP8IdentifiableDigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8invalidtransferbatch) +- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) - Error signature: `LSP8InvalidTransferBatch()` - Error hash: `0x93a83119` @@ -782,12 +1139,14 @@ error LSP8InvalidTransferBatch(); reverts when the parameters used for `transferBatch` have different lengths. +
+ ### LSP8NonExistentTokenId -:::note Links +:::note References -- Specification details in [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8nonexistenttokenid) -- Solidity implementation in [**LSP8IdentifiableDigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8nonexistenttokenid) +- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) - Error signature: `LSP8NonExistentTokenId(bytes32)` - Error hash: `0xae8f9a36` @@ -805,12 +1164,14 @@ reverts when `tokenId` has not been minted. | --------- | :-------: | ----------- | | `tokenId` | `bytes32` | - | +
+ ### LSP8NonExistingOperator -:::note Links +:::note References -- Specification details in [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8nonexistingoperator) -- Solidity implementation in [**LSP8IdentifiableDigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8nonexistingoperator) +- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) - Error signature: `LSP8NonExistingOperator(address,bytes32)` - Error hash: `0x4aa31a8c` @@ -829,12 +1190,14 @@ reverts when `operator` is not an operator for the `tokenId`. | `operator` | `address` | - | | `tokenId` | `bytes32` | - | +
+ ### LSP8NotTokenOperator -:::note Links +:::note References -- Specification details in [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8nottokenoperator) -- Solidity implementation in [**LSP8IdentifiableDigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8nottokenoperator) +- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) - Error signature: `LSP8NotTokenOperator(bytes32,address)` - Error hash: `0x1294d2a9` @@ -853,12 +1216,14 @@ reverts when `caller` is not an allowed operator for `tokenId`. | `tokenId` | `bytes32` | - | | `caller` | `address` | - | +
+ ### LSP8NotTokenOwner -:::note Links +:::note References -- Specification details in [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8nottokenowner) -- Solidity implementation in [**LSP8IdentifiableDigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8nottokenowner) +- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) - Error signature: `LSP8NotTokenOwner(address,bytes32,address)` - Error hash: `0x5b271ea2` @@ -878,12 +1243,14 @@ reverts when `caller` is not the `tokenOwner` of the `tokenId`. | `tokenId` | `bytes32` | - | | `caller` | `address` | - | +
+ ### LSP8NotifyTokenReceiverContractMissingLSP1Interface -:::note Links +:::note References -- Specification details in [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8notifytokenreceivercontractmissinglsp1interface) -- Solidity implementation in [**LSP8IdentifiableDigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8notifytokenreceivercontractmissinglsp1interface) +- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) - Error signature: `LSP8NotifyTokenReceiverContractMissingLSP1Interface(address)` - Error hash: `0x4349776d` @@ -903,12 +1270,14 @@ reverts if the `tokenReceiver` does not implement LSP1 when minting or transferr | --------------- | :-------: | ----------- | | `tokenReceiver` | `address` | - | +
+ ### LSP8NotifyTokenReceiverIsEOA -:::note Links +:::note References -- Specification details in [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8notifytokenreceiveriseoa) -- Solidity implementation in [**LSP8IdentifiableDigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8notifytokenreceiveriseoa) +- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) - Error signature: `LSP8NotifyTokenReceiverIsEOA(address)` - Error hash: `0x03173137` @@ -926,12 +1295,14 @@ reverts if the `tokenReceiver` is an EOA when minting or transferring tokens wit | --------------- | :-------: | ----------- | | `tokenReceiver` | `address` | - | +
+ ### LSP8OperatorAlreadyAuthorized -:::note Links +:::note References -- Specification details in [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8operatoralreadyauthorized) -- Solidity implementation in [**LSP8IdentifiableDigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8operatoralreadyauthorized) +- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) - Error signature: `LSP8OperatorAlreadyAuthorized(address,bytes32)` - Error hash: `0xa7626b68` @@ -950,12 +1321,14 @@ reverts when `operator` is already authorized for the `tokenId`. | `operator` | `address` | - | | `tokenId` | `bytes32` | - | +
+ ### LSP8TokenOwnerCannotBeOperator -:::note Links +:::note References -- Specification details in [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenownercannotbeoperator) -- Solidity implementation in [**LSP8IdentifiableDigitalAsset**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenownercannotbeoperator) +- Solidity implementation: [`LSP8IdentifiableDigitalAsset.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol) - Error signature: `LSP8TokenOwnerCannotBeOperator()` - Error hash: `0x89fdad62` @@ -967,6 +1340,8 @@ error LSP8TokenOwnerCannotBeOperator(); reverts when trying to authorize or revoke the token's owner as an operator. +
+ diff --git a/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.md b/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.md index 4b24db1afe..3131adbfdb 100644 --- a/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.md +++ b/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.md @@ -1,21 +1,32 @@ + + + # LSP8Burnable -:::info Solidity contract +:::info Standard Specifications -[`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Burnable) +[`LSP-8-IdentifiableDigitalAsset`](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md) + +::: +:::info Solidity implementation + +[`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol) ::: LSP8 token extension that allows token holders to destroy both their own tokens and those that they have an allowance for as an operator. -## Methods +## Public Methods + +Public methods are accessible externally from users, allowing interaction with this function from dApps or other smart contracts. +When marked as 'public', a method can be called both externally and internally, on the other hand, when marked as 'external', a method can only be called externally. ### authorizeOperator -:::note Links +:::note References -- Specification details in [**LSP-8-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Burnable.md#authorizeoperator) -- Solidity implementation in [**LSP8Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Burnable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#authorizeoperator) +- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol) - Function signature: `authorizeOperator(address,bytes32)` - Function selector: `0xcf5182ba` @@ -37,12 +48,14 @@ Allow an `operator` address to transfer or burn a specific `tokenId` on behalf o | `operator` | `address` | The address to authorize as an operator. | | `tokenId` | `bytes32` | The token ID operator has access to.. | +
+ ### balanceOf -:::note Links +:::note References -- Specification details in [**LSP-8-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Burnable.md#balanceof) -- Solidity implementation in [**LSP8Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Burnable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#balanceof) +- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol) - Function signature: `balanceOf(address)` - Function selector: `0x70a08231` @@ -66,12 +79,14 @@ Get the number of token IDs owned by `tokenOwner`. | ---- | :-------: | ----------------------------------------------------- | | `0` | `uint256` | The total number of token IDs that `tokenOwner` owns. | +
+ ### burn -:::note Links +:::note References -- Specification details in [**LSP-8-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Burnable.md#burn) -- Solidity implementation in [**LSP8Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Burnable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#burn) +- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol) - Function signature: `burn(bytes32,bytes)` - Function selector: `0x6c79b70b` @@ -81,21 +96,25 @@ Get the number of token IDs owned by `tokenOwner`. function burn(bytes32 tokenId, bytes data) external nonpayable; ``` +_Burning tokenId `tokenId`. This tokenId will not be recoverable! (additional data sent: `data`)._ + See internal [`_burn`](#_burn) function for details. #### Parameters -| Name | Type | Description | -| --------- | :-------: | ----------- | -| `tokenId` | `bytes32` | - | -| `data` | `bytes` | - | +| Name | Type | Description | +| --------- | :-------: | -------------------------------------------------------- | +| `tokenId` | `bytes32` | The tokenId to burn. | +| `data` | `bytes` | Any extra data to be sent alongside burning the tokenId. | + +
### getData -:::note Links +:::note References -- Specification details in [**LSP-8-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Burnable.md#getdata) -- Solidity implementation in [**LSP8Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Burnable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#getdata) +- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol) - Function signature: `getData(bytes32)` - Function selector: `0x54f6127f` @@ -105,28 +124,28 @@ See internal [`_burn`](#_burn) function for details. function getData(bytes32 dataKey) external view returns (bytes dataValue); ``` -_Reading the ERC725Y storage for data key `dataKey` returned the following value: `dataValue`._ - -Get in the ERC725Y storage the bytes data stored at a specific data key `dataKey`. +_Gets singular data at a given `dataKey`_ #### Parameters -| Name | Type | Description | -| --------- | :-------: | --------------------------------------------- | -| `dataKey` | `bytes32` | The data key for which to retrieve the value. | +| Name | Type | Description | +| --------- | :-------: | ------------------------------- | +| `dataKey` | `bytes32` | The key which value to retrieve | #### Returns -| Name | Type | Description | -| ----------- | :-----: | ---------------------------------------------------- | -| `dataValue` | `bytes` | The bytes value stored under the specified data key. | +| Name | Type | Description | +| ----------- | :-----: | -------------------------- | +| `dataValue` | `bytes` | The data stored at the key | + +
### getDataBatch -:::note Links +:::note References -- Specification details in [**LSP-8-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Burnable.md#getdatabatch) -- Solidity implementation in [**LSP8Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Burnable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#getdatabatch) +- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol) - Function signature: `getDataBatch(bytes32[])` - Function selector: `0xdedff9c6` @@ -138,9 +157,7 @@ function getDataBatch( ) external view returns (bytes[] dataValues); ``` -_Reading the ERC725Y storage for data keys `dataKeys` returned the following values: `dataValues`._ - -Get in the ERC725Y storage the bytes data stored at multiple data keys `dataKeys`. +_Gets array of data for multiple given keys_ #### Parameters @@ -154,12 +171,14 @@ Get in the ERC725Y storage the bytes data stored at multiple data keys `dataKeys | ------------ | :-------: | ----------------------------------------- | | `dataValues` | `bytes[]` | The array of data stored at multiple keys | +
+ ### getOperatorsOf -:::note Links +:::note References -- Specification details in [**LSP-8-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Burnable.md#getoperatorsof) -- Solidity implementation in [**LSP8Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Burnable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#getoperatorsof) +- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol) - Function signature: `getOperatorsOf(bytes32)` - Function selector: `0x49a6078d` @@ -183,12 +202,14 @@ Returns all `operator` addresses that are allowed to transfer or burn a specific | ---- | :---------: | ------------------------------------------------------------------------------------------------------------ | | `0` | `address[]` | An array of operators allowed to transfer or burn a specific `tokenId`. Requirements - `tokenId` must exist. | +
+ ### isOperatorFor -:::note Links +:::note References -- Specification details in [**LSP-8-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Burnable.md#isoperatorfor) -- Solidity implementation in [**LSP8Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Burnable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#isoperatorfor) +- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol) - Function signature: `isOperatorFor(address,bytes32)` - Function selector: `0x2a3654a4` @@ -216,12 +237,58 @@ Returns whether `operator` address is an operator for a given `tokenId`. | ---- | :----: | --------------------------------------------------------------------- | | `0` | `bool` | `true` if `operator` is an operator for `tokenId`, `false` otherwise. | +
+ +### owner + +:::note References + +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#owner) +- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol) +- Function signature: `owner()` +- Function selector: `0x8da5cb5b` + +::: + +```solidity +function owner() external view returns (address); +``` + +Returns the address of the current owner. + +#### Returns + +| Name | Type | Description | +| ---- | :-------: | ----------- | +| `0` | `address` | - | + +
+ +### renounceOwnership + +:::note References + +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#renounceownership) +- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol) +- Function signature: `renounceOwnership()` +- Function selector: `0x715018a6` + +::: + +```solidity +function renounceOwnership() external nonpayable; +``` + +Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner. + +
+ ### revokeOperator -:::note Links +:::note References -- Specification details in [**LSP-8-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Burnable.md#revokeoperator) -- Solidity implementation in [**LSP8Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Burnable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#revokeoperator) +- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol) - Function signature: `revokeOperator(address,bytes32)` - Function selector: `0x0b0c6d82` @@ -240,12 +307,14 @@ Remove access of `operator` for a given `tokenId`, disallowing it to transfer `t | `operator` | `address` | The address to revoke as an operator. | | `tokenId` | `bytes32` | The tokenId `operator` is revoked from operating on. | +
+ ### setData -:::note Links +:::note References -- Specification details in [**LSP-8-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Burnable.md#setdata) -- Solidity implementation in [**LSP8Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Burnable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#setdata) +- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol) - Function signature: `setData(bytes32,bytes)` - Function selector: `0x7f23690c` @@ -255,23 +324,23 @@ Remove access of `operator` for a given `tokenId`, disallowing it to transfer `t function setData(bytes32 dataKey, bytes dataValue) external payable; ``` -_Setting the following data key value pair in the ERC725Y storage. Data key: `dataKey`, data value: `dataValue`. _ - -Sets a single bytes value `dataValue` in the ERC725Y storage for a specific data key `dataKey`. The function is marked as payable to enable flexibility on child contracts. For instance to implement a fee mechanism for setting specific data. +_Sets singular data for a given `dataKey`_ #### Parameters -| Name | Type | Description | -| ----------- | :-------: | ------------------------------------------ | -| `dataKey` | `bytes32` | The data key for which to set a new value. | -| `dataValue` | `bytes` | The new bytes value to set. | +| Name | Type | Description | +| ----------- | :-------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `dataKey` | `bytes32` | The key to retrieve stored value | +| `dataValue` | `bytes` | The value to set SHOULD only be callable by the owner of the contract set via ERC173 The function is marked as payable to enable flexibility on child contracts If the function is not intended to receive value, an additional check should be implemented to check that value equal 0. Emits a {DataChanged} event. | + +
### setDataBatch -:::note Links +:::note References -- Specification details in [**LSP-8-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Burnable.md#setdatabatch) -- Solidity implementation in [**LSP8Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Burnable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#setdatabatch) +- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol) - Function signature: `setDataBatch(bytes32[],bytes[])` - Function selector: `0x97902421` @@ -281,23 +350,25 @@ Sets a single bytes value `dataValue` in the ERC725Y storage for a specific data function setDataBatch(bytes32[] dataKeys, bytes[] dataValues) external payable; ``` -_Setting the following data key value pairs in the ERC725Y storage. Data keys: `dataKeys`, data values: `dataValues`. _ +Sets array of data for multiple given `dataKeys` SHOULD only be callable by the owner of the contract set via ERC173 The function is marked as payable to enable flexibility on child contracts If the function is not intended to receive value, an additional check should be implemented to check that value equal -Batch data setting function that behaves the same as [`setData`](#setdata) but allowing to set multiple data key/value pairs in the ERC725Y storage in the same transaction. +0. Emits a [`DataChanged`](#datachanged) event. #### Parameters -| Name | Type | Description | -| ------------ | :---------: | ---------------------------------------------------- | -| `dataKeys` | `bytes32[]` | An array of data keys to set bytes values for. | -| `dataValues` | `bytes[]` | An array of bytes values to set for each `dataKeys`. | +| Name | Type | Description | +| ------------ | :---------: | ---------------------------------------- | +| `dataKeys` | `bytes32[]` | The array of data keys for values to set | +| `dataValues` | `bytes[]` | The array of values to set | + +
### supportsInterface -:::note Links +:::note References -- Specification details in [**LSP-8-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Burnable.md#supportsinterface) -- Solidity implementation in [**LSP8Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Burnable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#supportsinterface) +- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol) - Function signature: `supportsInterface(bytes4)` - Function selector: `0x01ffc9a7` @@ -321,12 +392,14 @@ Returns true if this contract implements the interface defined by `interfaceId`. | ---- | :----: | ----------- | | `0` | `bool` | - | +
+ ### tokenIdsOf -:::note Links +:::note References -- Specification details in [**LSP-8-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Burnable.md#tokenidsof) -- Solidity implementation in [**LSP8Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Burnable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#tokenidsof) +- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol) - Function signature: `tokenIdsOf(address)` - Function selector: `0xa3b261f2` @@ -350,12 +423,14 @@ Returns the list of token IDs that the `tokenOwner` address owns. | ---- | :---------: | ------------------------------------------------------- | | `0` | `bytes32[]` | An array of `bytes32[] tokenIds` owned by `tokenOwner`. | +
+ ### tokenOwnerOf -:::note Links +:::note References -- Specification details in [**LSP-8-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Burnable.md#tokenownerof) -- Solidity implementation in [**LSP8Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Burnable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#tokenownerof) +- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol) - Function signature: `tokenOwnerOf(bytes32)` - Function selector: `0x217b2270` @@ -379,12 +454,14 @@ Returns the list of `tokenIds` for the `tokenOwner` address. | ---- | :-------: | ----------------------------------------- | | `0` | `address` | The owner address of the given `tokenId`. | +
+ ### totalSupply -:::note Links +:::note References -- Specification details in [**LSP-8-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Burnable.md#totalsupply) -- Solidity implementation in [**LSP8Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Burnable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#totalsupply) +- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol) - Function signature: `totalSupply()` - Function selector: `0x18160ddd` @@ -402,12 +479,14 @@ Returns the number of existing tokens that have been minted in this contract. | ---- | :-------: | ------------------------------ | | `0` | `uint256` | The number of existing tokens. | +
+ ### transfer -:::note Links +:::note References -- Specification details in [**LSP-8-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Burnable.md#transfer) -- Solidity implementation in [**LSP8Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Burnable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#transfer) +- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol) - Function signature: `transfer(address,address,bytes32,bool,bytes)` - Function selector: `0x511b6952` @@ -435,12 +514,14 @@ Transfer a given `tokenId` token from the `from` address to the `to` address. If | `allowNonLSP1Recipient` | `bool` | When set to `true`, the `to` address CAN be any addres. When set to `false`, the `to` address MUST be a contract that supports the LSP1 UniversalReceiver standard. | | `data` | `bytes` | Any additional data the caller wants included in the emitted event, and sent in the hooks of the `from` and `to` addresses. | +
+ ### transferBatch -:::note Links +:::note References -- Specification details in [**LSP-8-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Burnable.md#transferbatch) -- Solidity implementation in [**LSP8Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Burnable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#transferbatch) +- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol) - Function signature: `transferBatch(address[],address[],bytes32[],bool[],bytes[])` - Function selector: `0x7e87632c` @@ -468,18 +549,325 @@ Transfers multiple tokens at once based on the arrays of `from`, `to` and `token | `allowNonLSP1Recipient` | `bool[]` | When set to `true`, `to` may be any address. When set to `false`, `to` must be a contract that supports the LSP1 standard and not revert. | | `data` | `bytes[]` | Any additional data the caller wants included in the emitted event, and sent in the hooks to the `from` and `to` addresses. | ---- +
+ +### transferOwnership + +:::note References + +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#transferownership) +- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol) +- Function signature: `transferOwnership(address)` +- Function selector: `0xf2fde38b` + +::: + +```solidity +function transferOwnership(address newOwner) external nonpayable; +``` + +Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner. + +#### Parameters + +| Name | Type | Description | +| ---------- | :-------: | ----------- | +| `newOwner` | `address` | - | + +
+ +## Internal Methods + +Any method labeled as `internal` serves as utility function within the contract. They can be used when writing solidity contracts that inherit from this contract. These methods can be extended or modified by overriding their internal behavior to suit specific needs. + +Internal functions cannot be called externally, whether from other smart contracts, dApp interfaces, or backend services. Their restricted accessibility ensures that they remain exclusively available within the context of the current contract, promoting controlled and encapsulated usage of these internal utilities. + +### \_checkOwner + +```solidity +function _checkOwner() internal view; +``` + +Throws if the sender is not the owner. + +
+ +### \_setOwner + +```solidity +function _setOwner(address newOwner) internal nonpayable; +``` + +Changes the owner if `newOwner` and oldOwner are different +This pattern is useful in inheritance. + +
+ +### \_getData + +```solidity +function _getData(bytes32 dataKey) internal view returns (bytes dataValue); +``` + +
+ +### \_setData + +```solidity +function _setData(bytes32 dataKey, bytes dataValue) internal nonpayable; +``` + +Save gas by emitting the [`DataChanged`](#datachanged) event with only the first 256 bytes of dataValue + +
+ +### \_isOperatorOrOwner + +```solidity +function _isOperatorOrOwner( + address caller, + bytes32 tokenId +) internal view returns (bool); +``` + +verifies if the `caller` is operator or owner for the `tokenId` + +#### Returns + +| Name | Type | Description | +| ---- | :----: | -------------------------------------------- | +| `0` | `bool` | true if `caller` is either operator or owner | + +
+ +### \_revokeOperator + +```solidity +function _revokeOperator( + address operator, + address tokenOwner, + bytes32 tokenId +) internal nonpayable; +``` + +removes `operator` from the list of operators for the `tokenId` + +
+ +### \_clearOperators + +```solidity +function _clearOperators( + address tokenOwner, + bytes32 tokenId +) internal nonpayable; +``` + +revoke all the current operators for a specific `tokenId` token which belongs to `tokenOwner`. + +#### Parameters + +| Name | Type | Description | +| ------------ | :-------: | ------------------------------------------------- | +| `tokenOwner` | `address` | The address that is the owner of the `tokenId`. | +| `tokenId` | `bytes32` | The token to remove the associated operators for. | + +
+ +### \_exists + +```solidity +function _exists(bytes32 tokenId) internal view returns (bool); +``` + +Returns whether `tokenId` exists. +Tokens start existing when they are minted ([`_mint`](#_mint)), and stop existing when they are burned ([`_burn`](#_burn)). + +
+ +### \_existsOrError + +```solidity +function _existsOrError(bytes32 tokenId) internal view; +``` + +When `tokenId` does not exist then revert with an error. + +
+ +### \_mint + +```solidity +function _mint( + address to, + bytes32 tokenId, + bool allowNonLSP1Recipient, + bytes data +) internal nonpayable; +``` + +Create `tokenId` by minting it and transfers it to `to`. + ++ +**Emitted events:** + +- [`Transfer`](#transfer) event with `address(0)` as `from` address. + ++ +#### Parameters + +| Name | Type | Description | +| ----------------------- | :-------: | -------------------------------------------------------------------------------------------------------------------------- | +| `to` | `address` | @param tokenId The token ID to create (= mint). | +| `tokenId` | `bytes32` | The token ID to create (= mint). | +| `allowNonLSP1Recipient` | `bool` | When set to `true`, `to` may be any address. When set to `false`, `to` must be a contract that supports the LSP1 standard. | +| `data` | `bytes` | Any additional data the caller wants included in the emitted event, and sent in the hook of the `to` address. | + +
+ +### \_burn + +:::tip Hint + +In dApps, you can know which addresses are burning tokens by listening for the `Transfer` event and filter with the zero address as `to`. + +::: + +```solidity +function _burn(bytes32 tokenId, bytes data) internal nonpayable; +``` + +Burn a specific `tokenId`, removing the `tokenId` from the [`tokenIdsOf`](#tokenidsof) the caller and decreasing its [`balanceOf`](#balanceof) by -1. +This will also clear all the operators allowed to transfer the `tokenId`. +The owner of the `tokenId` will be notified about the `tokenId` being transferred through its LSP1 [`universalReceiver`](#universalreceiver) +function, if it is a contract that supports the LSP1 interface. Its [`universalReceiver`](#universalreceiver) function will receive +all the parameters in the calldata packed encoded. +Any logic in the [`_beforeTokenTransfer`](#_beforetokentransfer) function will run before burning `tokenId` and updating the balances. + ++ +**Emitted events:** + +- [`Transfer`](#transfer) event with `address(0)` as the `to` address. + ++ +#### Parameters + +| Name | Type | Description | +| --------- | :-------: | --------------------------------------------------------------------------------------------------------------------------- | +| `tokenId` | `bytes32` | The token to burn. | +| `data` | `bytes` | Any additional data the caller wants included in the emitted event, and sent in the LSP1 hook on the token owner's address. | + +
+ +### \_transfer + +:::danger + +This internal function does not check if the sender is authorized or not to operate on the `tokenId`. + +::: + +```solidity +function _transfer( + address from, + address to, + bytes32 tokenId, + bool allowNonLSP1Recipient, + bytes data +) internal nonpayable; +``` + +Change the owner of the `tokenId` from `from` to `to`. +Both the sender and recipient will be notified of the `tokenId` being transferred through their LSP1 [`universalReceiver`](#universalreceiver) +function, if they are contracts that support the LSP1 interface. Their `universalReceiver` function will receive +all the parameters in the calldata packed encoded. +Any logic in the [`_beforeTokenTransfer`](#_beforetokentransfer) function will run before changing the owner of `tokenId`. + ++ +**Emitted events:** + +- [`Transfer`](#transfer) event. + ++ +#### Parameters + +| Name | Type | Description | +| ----------------------- | :-------: | -------------------------------------------------------------------------------------------------------------------------- | +| `from` | `address` | The sender address. | +| `to` | `address` | @param tokenId The token to transfer. | +| `tokenId` | `bytes32` | The token to transfer. | +| `allowNonLSP1Recipient` | `bool` | When set to `true`, `to` may be any address. When set to `false`, `to` must be a contract that supports the LSP1 standard. | +| `data` | `bytes` | Additional data the caller wants included in the emitted event, and sent in the hooks to `from` and `to` addresses. | + +
+ +### \_beforeTokenTransfer + +```solidity +function _beforeTokenTransfer( + address from, + address to, + bytes32 tokenId +) internal nonpayable; +``` + +Hook that is called before any token transfer, including minting and burning. + +- Allows to run custom logic before updating balances and notifiying sender/recipient by overriding this function. + +#### Parameters + +| Name | Type | Description | +| --------- | :-------: | -------------------------------------- | +| `from` | `address` | The sender address | +| `to` | `address` | @param tokenId The tokenId to transfer | +| `tokenId` | `bytes32` | The tokenId to transfer | + +
+ +### \_notifyTokenSender + +```solidity +function _notifyTokenSender(address from, bytes lsp1Data) internal nonpayable; +``` + +An attempt is made to notify the token sender about the `tokenId` changing owners using +LSP1 interface. + +
+ +### \_notifyTokenReceiver + +```solidity +function _notifyTokenReceiver( + address to, + bool allowNonLSP1Recipient, + bytes lsp1Data +) internal nonpayable; +``` + +An attempt is made to notify the token receiver about the `tokenId` changing owners +using LSP1 interface. When allowNonLSP1Recipient is FALSE the token receiver MUST support LSP1. +The receiver may revert when the token being sent is not wanted. + +
## Events ### AuthorizedOperator -:::note Links +:::note References -- Specification details in [**LSP-8-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Burnable.md#authorizedoperator) -- Solidity implementation in [**LSP8Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Burnable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#authorizedoperator) +- 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)` -- Event hash: `0x34b797fc5a526f7bf1d2b5de25f6564fd85ae364e3ee939aee7c1ac27871a988` +- Event topic hash: `0x34b797fc5a526f7bf1d2b5de25f6564fd85ae364e3ee939aee7c1ac27871a988` ::: @@ -487,7 +875,7 @@ Transfers multiple tokens at once based on the arrays of `from`, `to` and `token event AuthorizedOperator(address indexed operator, address indexed tokenOwner, bytes32 indexed tokenId); ``` -Emitted when `tokenOwner` enables `operator` to transfer or burn `tokenId` on its behalf. +Emitted when `tokenOwner` enables `operator` to transfer or burn the `tokenId`. #### Parameters @@ -497,14 +885,16 @@ Emitted when `tokenOwner` enables `operator` to transfer or burn `tokenId` on it | `tokenOwner` **`indexed`** | `address` | The owner of the `tokenId`. | | `tokenId` **`indexed`** | `bytes32` | The tokenId `operator` address has access on behalf of `tokenOwner`. | +
+ ### DataChanged -:::note Links +:::note References -- Specification details in [**LSP-8-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Burnable.md#datachanged) -- Solidity implementation in [**LSP8Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Burnable) +- 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 hash: `0xece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2` +- Event topic hash: `0xece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2` ::: @@ -512,25 +902,49 @@ Emitted when `tokenOwner` enables `operator` to transfer or burn `tokenId` on it 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 key is changed_ + +#### Parameters -Emitted when data at a specific `dataKey` was changed to a new value `dataValue`. +| Name | Type | Description | +| ----------------------- | :-------: | ------------------------------------ | +| `dataKey` **`indexed`** | `bytes32` | The data key which data value is set | +| `dataValue` | `bytes` | The data value to set | + +
+ +### OwnershipTransferred + +:::note References + +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#ownershiptransferred) +- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol) +- Event signature: `OwnershipTransferred(address,address)` +- Event topic hash: `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0` + +::: + +```solidity +event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); +``` #### 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 | +| ----------------------------- | :-------: | ----------- | +| `previousOwner` **`indexed`** | `address` | - | +| `newOwner` **`indexed`** | `address` | - | + +
### RevokedOperator -:::note Links +:::note References -- Specification details in [**LSP-8-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Burnable.md#revokedoperator) -- Solidity implementation in [**LSP8Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Burnable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#revokedoperator) +- 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)` -- Event hash: `0x17d5389f6ab6adb2647dfa0aa365c323d37adacc30b33a65310b6158ce1373d5` +- Event topic hash: `0x17d5389f6ab6adb2647dfa0aa365c323d37adacc30b33a65310b6158ce1373d5` ::: @@ -542,20 +956,22 @@ Emitted when `tokenOwner` disables `operator` to transfer or burn `tokenId` on i #### Parameters -| Name | Type | Description | -| -------------------------- | :-------: | ---------------------------------------------------- | -| `operator` **`indexed`** | `address` | The address revoked as an operator. | -| `tokenOwner` **`indexed`** | `address` | The owner of the `tokenId`. | -| `tokenId` **`indexed`** | `bytes32` | The tokenId `operator` is revoked from operating on. | +| Name | Type | Description | +| -------------------------- | :-------: | --------------------------------------------------------------- | +| `operator` **`indexed`** | `address` | The address revoked from the operator array ({getOperatorsOf}). | +| `tokenOwner` **`indexed`** | `address` | The owner of the `tokenId`. | +| `tokenId` **`indexed`** | `bytes32` | The tokenId `operator` is revoked from operating on. | + +
### Transfer -:::note Links +:::note References -- Specification details in [**LSP-8-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Burnable.md#transfer) -- Solidity implementation in [**LSP8Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Burnable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#transfer) +- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol) - Event signature: `Transfer(address,address,address,bytes32,bool,bytes)` -- Event hash: `0xb333c813a7426a7a11e2b190cad52c44119421594b47f6f32ace6d8c7207b2bf` +- Event topic hash: `0xb333c813a7426a7a11e2b190cad52c44119421594b47f6f32ace6d8c7207b2bf` ::: @@ -576,16 +992,111 @@ Emitted when `tokenId` token is transferred from the `from` to the `to` address. | `allowNonLSP1Recipient` | `bool` | If the token transfer enforces the `to` recipient address to be a contract that implements the LSP1 standard or not. | | `data` | `bytes` | Any additional data the caller included by the caller during the transfer, and sent in the hooks to the `from` and `to` addresses. | ---- +
## Errors +### ERC725Y_DataKeysValuesEmptyArray + +:::note References + +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#erc725y_datakeysvaluesemptyarray) +- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol) +- Error signature: `ERC725Y_DataKeysValuesEmptyArray()` +- Error hash: `0x97da5f95` + +::: + +```solidity +error ERC725Y_DataKeysValuesEmptyArray(); +``` + +reverts when one of the array parameter provided to `setDataBatch` is an empty array + +
+ +### ERC725Y_DataKeysValuesLengthMismatch + +:::note References + +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#erc725y_datakeysvalueslengthmismatch) +- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol) +- Error signature: `ERC725Y_DataKeysValuesLengthMismatch()` +- Error hash: `0x3bcc8979` + +::: + +```solidity +error ERC725Y_DataKeysValuesLengthMismatch(); +``` + +reverts when there is not the same number of elements in the lists of data keys and data values when calling setDataBatch. + +
+ +### ERC725Y_MsgValueDisallowed + +:::note References + +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#erc725y_msgvaluedisallowed) +- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol) +- Error signature: `ERC725Y_MsgValueDisallowed()` +- Error hash: `0xf36ba737` + +::: + +```solidity +error ERC725Y_MsgValueDisallowed(); +``` + +reverts when sending value to the `setData(..)` functions + +
+ +### LSP4TokenNameNotEditable + +:::note References + +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp4tokennamenoteditable) +- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol) +- Error signature: `LSP4TokenNameNotEditable()` +- Error hash: `0x85c169bd` + +::: + +```solidity +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. + +
+ +### LSP4TokenSymbolNotEditable + +:::note References + +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp4tokensymbolnoteditable) +- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol) +- Error signature: `LSP4TokenSymbolNotEditable()` +- Error hash: `0x76755b38` + +::: + +```solidity +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. + +
+ ### LSP8CannotSendToAddressZero -:::note Links +:::note References -- Specification details in [**LSP-8-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Burnable.md#lsp8cannotsendtoaddresszero) -- Solidity implementation in [**LSP8Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Burnable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8cannotsendtoaddresszero) +- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol) - Error signature: `LSP8CannotSendToAddressZero()` - Error hash: `0x24ecef4d` @@ -597,12 +1108,14 @@ error LSP8CannotSendToAddressZero(); reverts when trying to send token to the zero address. +
+ ### LSP8CannotSendToSelf -:::note Links +:::note References -- Specification details in [**LSP-8-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Burnable.md#lsp8cannotsendtoself) -- Solidity implementation in [**LSP8Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Burnable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8cannotsendtoself) +- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol) - Error signature: `LSP8CannotSendToSelf()` - Error hash: `0x5d67d6c1` @@ -614,12 +1127,14 @@ error LSP8CannotSendToSelf(); reverts when specifying the same address for `from` and `to` in a token transfer. +
+ ### LSP8CannotUseAddressZeroAsOperator -:::note Links +:::note References -- Specification details in [**LSP-8-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Burnable.md#lsp8cannotuseaddresszeroasoperator) -- Solidity implementation in [**LSP8Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Burnable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8cannotuseaddresszeroasoperator) +- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol) - Error signature: `LSP8CannotUseAddressZeroAsOperator()` - Error hash: `0x9577b8b3` @@ -631,12 +1146,14 @@ error LSP8CannotUseAddressZeroAsOperator(); reverts when trying to set the zero address as an operator. +
+ ### LSP8InvalidTransferBatch -:::note Links +:::note References -- Specification details in [**LSP-8-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Burnable.md#lsp8invalidtransferbatch) -- Solidity implementation in [**LSP8Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Burnable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8invalidtransferbatch) +- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol) - Error signature: `LSP8InvalidTransferBatch()` - Error hash: `0x93a83119` @@ -648,12 +1165,14 @@ error LSP8InvalidTransferBatch(); reverts when the parameters used for `transferBatch` have different lengths. +
+ ### LSP8NonExistentTokenId -:::note Links +:::note References -- Specification details in [**LSP-8-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Burnable.md#lsp8nonexistenttokenid) -- Solidity implementation in [**LSP8Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Burnable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8nonexistenttokenid) +- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol) - Error signature: `LSP8NonExistentTokenId(bytes32)` - Error hash: `0xae8f9a36` @@ -671,12 +1190,14 @@ reverts when `tokenId` has not been minted. | --------- | :-------: | ----------- | | `tokenId` | `bytes32` | - | +
+ ### LSP8NonExistingOperator -:::note Links +:::note References -- Specification details in [**LSP-8-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Burnable.md#lsp8nonexistingoperator) -- Solidity implementation in [**LSP8Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Burnable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8nonexistingoperator) +- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol) - Error signature: `LSP8NonExistingOperator(address,bytes32)` - Error hash: `0x4aa31a8c` @@ -695,12 +1216,14 @@ reverts when `operator` is not an operator for the `tokenId`. | `operator` | `address` | - | | `tokenId` | `bytes32` | - | +
+ ### LSP8NotTokenOperator -:::note Links +:::note References -- Specification details in [**LSP-8-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Burnable.md#lsp8nottokenoperator) -- Solidity implementation in [**LSP8Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Burnable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8nottokenoperator) +- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol) - Error signature: `LSP8NotTokenOperator(bytes32,address)` - Error hash: `0x1294d2a9` @@ -719,12 +1242,14 @@ reverts when `caller` is not an allowed operator for `tokenId`. | `tokenId` | `bytes32` | - | | `caller` | `address` | - | +
+ ### LSP8NotTokenOwner -:::note Links +:::note References -- Specification details in [**LSP-8-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Burnable.md#lsp8nottokenowner) -- Solidity implementation in [**LSP8Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Burnable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8nottokenowner) +- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol) - Error signature: `LSP8NotTokenOwner(address,bytes32,address)` - Error hash: `0x5b271ea2` @@ -744,12 +1269,14 @@ reverts when `caller` is not the `tokenOwner` of the `tokenId`. | `tokenId` | `bytes32` | - | | `caller` | `address` | - | +
+ ### LSP8NotifyTokenReceiverContractMissingLSP1Interface -:::note Links +:::note References -- Specification details in [**LSP-8-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Burnable.md#lsp8notifytokenreceivercontractmissinglsp1interface) -- Solidity implementation in [**LSP8Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Burnable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8notifytokenreceivercontractmissinglsp1interface) +- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol) - Error signature: `LSP8NotifyTokenReceiverContractMissingLSP1Interface(address)` - Error hash: `0x4349776d` @@ -769,12 +1296,14 @@ reverts if the `tokenReceiver` does not implement LSP1 when minting or transferr | --------------- | :-------: | ----------- | | `tokenReceiver` | `address` | - | +
+ ### LSP8NotifyTokenReceiverIsEOA -:::note Links +:::note References -- Specification details in [**LSP-8-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Burnable.md#lsp8notifytokenreceiveriseoa) -- Solidity implementation in [**LSP8Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Burnable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8notifytokenreceiveriseoa) +- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol) - Error signature: `LSP8NotifyTokenReceiverIsEOA(address)` - Error hash: `0x03173137` @@ -792,12 +1321,14 @@ reverts if the `tokenReceiver` is an EOA when minting or transferring tokens wit | --------------- | :-------: | ----------- | | `tokenReceiver` | `address` | - | +
+ ### LSP8OperatorAlreadyAuthorized -:::note Links +:::note References -- Specification details in [**LSP-8-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Burnable.md#lsp8operatoralreadyauthorized) -- Solidity implementation in [**LSP8Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Burnable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8operatoralreadyauthorized) +- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol) - Error signature: `LSP8OperatorAlreadyAuthorized(address,bytes32)` - Error hash: `0xa7626b68` @@ -816,12 +1347,14 @@ reverts when `operator` is already authorized for the `tokenId`. | `operator` | `address` | - | | `tokenId` | `bytes32` | - | +
+ ### LSP8TokenOwnerCannotBeOperator -:::note Links +:::note References -- Specification details in [**LSP-8-Burnable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Burnable.md#lsp8tokenownercannotbeoperator) -- Solidity implementation in [**LSP8Burnable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Burnable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenownercannotbeoperator) +- Solidity implementation: [`LSP8Burnable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol) - Error signature: `LSP8TokenOwnerCannotBeOperator()` - Error hash: `0x89fdad62` @@ -833,193 +1366,4 @@ error LSP8TokenOwnerCannotBeOperator(); reverts when trying to authorize or revoke the token's owner as an operator. - - - - - - -[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/nft-2.0/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/nft-2.0/LSP7-Digital-Asset -[LSP8IdentifiableDigitalAsset]: https://docs.lukso.tech/standards/nft-2.0/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/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.md b/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.md index 01db7db48b..cced87c15f 100644 --- a/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.md +++ b/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.md @@ -1,21 +1,32 @@ + + + # LSP8CappedSupply -:::info Solidity contract +:::info Standard Specifications + +[`LSP-8-IdentifiableDigitalAsset`](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md) + +::: +:::info Solidity implementation -[`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CappedSupply) +[`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol) ::: LSP8 token extension to add a max token supply cap. -## Methods +## Public Methods + +Public methods are accessible externally from users, allowing interaction with this function from dApps or other smart contracts. +When marked as 'public', a method can be called both externally and internally, on the other hand, when marked as 'external', a method can only be called externally. ### authorizeOperator -:::note Links +:::note References -- Specification details in [**LSP-8-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CappedSupply.md#authorizeoperator) -- Solidity implementation in [**LSP8CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CappedSupply) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#authorizeoperator) +- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol) - Function signature: `authorizeOperator(address,bytes32)` - Function selector: `0xcf5182ba` @@ -37,12 +48,14 @@ Allow an `operator` address to transfer or burn a specific `tokenId` on behalf o | `operator` | `address` | The address to authorize as an operator. | | `tokenId` | `bytes32` | The token ID operator has access to.. | +
+ ### balanceOf -:::note Links +:::note References -- Specification details in [**LSP-8-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CappedSupply.md#balanceof) -- Solidity implementation in [**LSP8CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CappedSupply) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#balanceof) +- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol) - Function signature: `balanceOf(address)` - Function selector: `0x70a08231` @@ -66,12 +79,14 @@ Get the number of token IDs owned by `tokenOwner`. | ---- | :-------: | ----------------------------------------------------- | | `0` | `uint256` | The total number of token IDs that `tokenOwner` owns. | +
+ ### getData -:::note Links +:::note References -- Specification details in [**LSP-8-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CappedSupply.md#getdata) -- Solidity implementation in [**LSP8CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CappedSupply) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#getdata) +- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol) - Function signature: `getData(bytes32)` - Function selector: `0x54f6127f` @@ -81,28 +96,28 @@ Get the number of token IDs owned by `tokenOwner`. function getData(bytes32 dataKey) external view returns (bytes dataValue); ``` -_Reading the ERC725Y storage for data key `dataKey` returned the following value: `dataValue`._ - -Get in the ERC725Y storage the bytes data stored at a specific data key `dataKey`. +_Gets singular data at a given `dataKey`_ #### Parameters -| Name | Type | Description | -| --------- | :-------: | --------------------------------------------- | -| `dataKey` | `bytes32` | The data key for which to retrieve the value. | +| Name | Type | Description | +| --------- | :-------: | ------------------------------- | +| `dataKey` | `bytes32` | The key which value to retrieve | #### Returns -| Name | Type | Description | -| ----------- | :-----: | ---------------------------------------------------- | -| `dataValue` | `bytes` | The bytes value stored under the specified data key. | +| Name | Type | Description | +| ----------- | :-----: | -------------------------- | +| `dataValue` | `bytes` | The data stored at the key | + +
### getDataBatch -:::note Links +:::note References -- Specification details in [**LSP-8-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CappedSupply.md#getdatabatch) -- Solidity implementation in [**LSP8CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CappedSupply) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#getdatabatch) +- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol) - Function signature: `getDataBatch(bytes32[])` - Function selector: `0xdedff9c6` @@ -114,9 +129,7 @@ function getDataBatch( ) external view returns (bytes[] dataValues); ``` -_Reading the ERC725Y storage for data keys `dataKeys` returned the following values: `dataValues`._ - -Get in the ERC725Y storage the bytes data stored at multiple data keys `dataKeys`. +_Gets array of data for multiple given keys_ #### Parameters @@ -130,12 +143,14 @@ Get in the ERC725Y storage the bytes data stored at multiple data keys `dataKeys | ------------ | :-------: | ----------------------------------------- | | `dataValues` | `bytes[]` | The array of data stored at multiple keys | +
+ ### getOperatorsOf -:::note Links +:::note References -- Specification details in [**LSP-8-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CappedSupply.md#getoperatorsof) -- Solidity implementation in [**LSP8CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CappedSupply) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#getoperatorsof) +- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol) - Function signature: `getOperatorsOf(bytes32)` - Function selector: `0x49a6078d` @@ -159,12 +174,14 @@ Returns all `operator` addresses that are allowed to transfer or burn a specific | ---- | :---------: | ------------------------------------------------------------------------------------------------------------ | | `0` | `address[]` | An array of operators allowed to transfer or burn a specific `tokenId`. Requirements - `tokenId` must exist. | +
+ ### isOperatorFor -:::note Links +:::note References -- Specification details in [**LSP-8-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CappedSupply.md#isoperatorfor) -- Solidity implementation in [**LSP8CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CappedSupply) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#isoperatorfor) +- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol) - Function signature: `isOperatorFor(address,bytes32)` - Function selector: `0x2a3654a4` @@ -192,12 +209,14 @@ Returns whether `operator` address is an operator for a given `tokenId`. | ---- | :----: | --------------------------------------------------------------------- | | `0` | `bool` | `true` if `operator` is an operator for `tokenId`, `false` otherwise. | +
+ ### owner -:::note Links +:::note References -- Specification details in [**LSP-8-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CappedSupply.md#owner) -- Solidity implementation in [**LSP8CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CappedSupply) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#owner) +- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol) - Function signature: `owner()` - Function selector: `0x8da5cb5b` @@ -215,12 +234,14 @@ Returns the address of the current owner. | ---- | :-------: | ----------- | | `0` | `address` | - | +
+ ### renounceOwnership -:::note Links +:::note References -- Specification details in [**LSP-8-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CappedSupply.md#renounceownership) -- Solidity implementation in [**LSP8CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CappedSupply) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#renounceownership) +- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol) - Function signature: `renounceOwnership()` - Function selector: `0x715018a6` @@ -232,12 +253,14 @@ function renounceOwnership() external nonpayable; Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner. +
+ ### revokeOperator -:::note Links +:::note References -- Specification details in [**LSP-8-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CappedSupply.md#revokeoperator) -- Solidity implementation in [**LSP8CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CappedSupply) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#revokeoperator) +- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol) - Function signature: `revokeOperator(address,bytes32)` - Function selector: `0x0b0c6d82` @@ -256,108 +279,68 @@ Remove access of `operator` for a given `tokenId`, disallowing it to transfer `t | `operator` | `address` | The address to revoke as an operator. | | `tokenId` | `bytes32` | The tokenId `operator` is revoked from operating on. | +
+ ### setData -:::note Links +:::note References -- Specification details in [**LSP-8-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CappedSupply.md#setdata) -- Solidity implementation in [**LSP8CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CappedSupply) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#setdata) +- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol) - Function signature: `setData(bytes32,bytes)` - Function selector: `0x7f23690c` ::: -:::caution Warning - -**Note for developers:** despite the fact that this function is set as `payable`, if the function is not intended to receive value (= native tokens), **an additional check should be implemented to ensure that `msg.value` sent was equal to 0**. - -::: - ```solidity function setData(bytes32 dataKey, bytes dataValue) external payable; ``` -_Setting the following data key value pair in the ERC725Y storage. Data key: `dataKey`, data value: `dataValue`. _ - -Sets a single bytes value `dataValue` in the ERC725Y storage for a specific data key `dataKey`. The function is marked as payable to enable flexibility on child contracts. For instance to implement a fee mechanism for setting specific data. - -- -**Requirements:** - -- SHOULD only be callable by the [`owner`](#owner). - -- -- -**Emitted events:** - -- [`DataChanged`](#datachanged) event. - -+_Sets singular data for a given `dataKey`_ #### Parameters -| Name | Type | Description | -| ----------- | :-------: | ------------------------------------------ | -| `dataKey` | `bytes32` | The data key for which to set a new value. | -| `dataValue` | `bytes` | The new bytes value to set. | +| Name | Type | Description | +| ----------- | :-------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `dataKey` | `bytes32` | The key to retrieve stored value | +| `dataValue` | `bytes` | The value to set SHOULD only be callable by the owner of the contract set via ERC173 The function is marked as payable to enable flexibility on child contracts If the function is not intended to receive value, an additional check should be implemented to check that value equal 0. Emits a {DataChanged} event. | + +
### setDataBatch -:::note Links +:::note References -- Specification details in [**LSP-8-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CappedSupply.md#setdatabatch) -- Solidity implementation in [**LSP8CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CappedSupply) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#setdatabatch) +- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol) - Function signature: `setDataBatch(bytes32[],bytes[])` - Function selector: `0x97902421` ::: -:::caution Warning - -**Note for developers:** despite the fact that this function is set as `payable`, if the function is not intended to receive value (= native tokens), **an additional check should be implemented to ensure that `msg.value` sent was equal to 0**. - -::: - ```solidity function setDataBatch(bytes32[] dataKeys, bytes[] dataValues) external payable; ``` -_Setting the following data key value pairs in the ERC725Y storage. Data keys: `dataKeys`, data values: `dataValues`. _ - -Batch data setting function that behaves the same as [`setData`](#setdata) but allowing to set multiple data key/value pairs in the ERC725Y storage in the same transaction. - -+Sets array of data for multiple given `dataKeys` SHOULD only be callable by the owner of the contract set via ERC173 The function is marked as payable to enable flexibility on child contracts If the function is not intended to receive value, an additional check should be implemented to check that value equal -**Requirements:** - -- SHOULD only be callable by the [`owner`](#owner) of the contract. - -- -- -**Emitted events:** - -- [`DataChanged`](#datachanged) event **for each data key/value pair set**. - -+0. Emits a [`DataChanged`](#datachanged) event. #### Parameters -| Name | Type | Description | -| ------------ | :---------: | ---------------------------------------------------- | -| `dataKeys` | `bytes32[]` | An array of data keys to set bytes values for. | -| `dataValues` | `bytes[]` | An array of bytes values to set for each `dataKeys`. | +| Name | Type | Description | +| ------------ | :---------: | ---------------------------------------- | +| `dataKeys` | `bytes32[]` | The array of data keys for values to set | +| `dataValues` | `bytes[]` | The array of values to set | + +
### supportsInterface -:::note Links +:::note References -- Specification details in [**LSP-8-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CappedSupply.md#supportsinterface) -- Solidity implementation in [**LSP8CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CappedSupply) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#supportsinterface) +- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol) - Function signature: `supportsInterface(bytes4)` - Function selector: `0x01ffc9a7` @@ -381,12 +364,14 @@ Returns true if this contract implements the interface defined by `interfaceId`. | ---- | :----: | ----------- | | `0` | `bool` | - | +
+ ### tokenIdsOf -:::note Links +:::note References -- Specification details in [**LSP-8-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CappedSupply.md#tokenidsof) -- Solidity implementation in [**LSP8CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CappedSupply) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#tokenidsof) +- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol) - Function signature: `tokenIdsOf(address)` - Function selector: `0xa3b261f2` @@ -410,12 +395,14 @@ Returns the list of token IDs that the `tokenOwner` address owns. | ---- | :---------: | ------------------------------------------------------- | | `0` | `bytes32[]` | An array of `bytes32[] tokenIds` owned by `tokenOwner`. | +
+ ### tokenOwnerOf -:::note Links +:::note References -- Specification details in [**LSP-8-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CappedSupply.md#tokenownerof) -- Solidity implementation in [**LSP8CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CappedSupply) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#tokenownerof) +- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol) - Function signature: `tokenOwnerOf(bytes32)` - Function selector: `0x217b2270` @@ -439,12 +426,14 @@ Returns the list of `tokenIds` for the `tokenOwner` address. | ---- | :-------: | ----------------------------------------- | | `0` | `address` | The owner address of the given `tokenId`. | +
+ ### tokenSupplyCap -:::note Links +:::note References -- Specification details in [**LSP-8-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CappedSupply.md#tokensupplycap) -- Solidity implementation in [**LSP8CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CappedSupply) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#tokensupplycap) +- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol) - Function signature: `tokenSupplyCap()` - Function selector: `0x52058d8a` @@ -464,12 +453,14 @@ Get the maximum number of tokens that can exist to circulate. Once [`totalSupply | ---- | :-------: | ------------------------------------------------------------ | | `0` | `uint256` | The maximum number of tokens that can exist in the contract. | +
+ ### totalSupply -:::note Links +:::note References -- Specification details in [**LSP-8-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CappedSupply.md#totalsupply) -- Solidity implementation in [**LSP8CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CappedSupply) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#totalsupply) +- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol) - Function signature: `totalSupply()` - Function selector: `0x18160ddd` @@ -487,12 +478,14 @@ Returns the number of existing tokens that have been minted in this contract. | ---- | :-------: | ------------------------------ | | `0` | `uint256` | The number of existing tokens. | +
+ ### transfer -:::note Links +:::note References -- Specification details in [**LSP-8-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CappedSupply.md#transfer) -- Solidity implementation in [**LSP8CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CappedSupply) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#transfer) +- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol) - Function signature: `transfer(address,address,bytes32,bool,bytes)` - Function selector: `0x511b6952` @@ -520,12 +513,14 @@ Transfer a given `tokenId` token from the `from` address to the `to` address. If | `allowNonLSP1Recipient` | `bool` | When set to `true`, the `to` address CAN be any addres. When set to `false`, the `to` address MUST be a contract that supports the LSP1 UniversalReceiver standard. | | `data` | `bytes` | Any additional data the caller wants included in the emitted event, and sent in the hooks of the `from` and `to` addresses. | +
+ ### transferBatch -:::note Links +:::note References -- Specification details in [**LSP-8-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CappedSupply.md#transferbatch) -- Solidity implementation in [**LSP8CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CappedSupply) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#transferbatch) +- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol) - Function signature: `transferBatch(address[],address[],bytes32[],bool[],bytes[])` - Function selector: `0x7e87632c` @@ -553,12 +548,14 @@ Transfers multiple tokens at once based on the arrays of `from`, `to` and `token | `allowNonLSP1Recipient` | `bool[]` | When set to `true`, `to` may be any address. When set to `false`, `to` must be a contract that supports the LSP1 standard and not revert. | | `data` | `bytes[]` | Any additional data the caller wants included in the emitted event, and sent in the hooks to the `from` and `to` addresses. | +
+ ### transferOwnership -:::note Links +:::note References -- Specification details in [**LSP-8-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CappedSupply.md#transferownership) -- Solidity implementation in [**LSP8CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CappedSupply) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#transferownership) +- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol) - Function signature: `transferOwnership(address)` - Function selector: `0xf2fde38b` @@ -576,18 +573,285 @@ Transfers ownership of the contract to a new account (`newOwner`). Can only be c | ---------- | :-------: | ----------- | | `newOwner` | `address` | - | ---- +
+ +## Internal Methods + +Any method labeled as `internal` serves as utility function within the contract. They can be used when writing solidity contracts that inherit from this contract. These methods can be extended or modified by overriding their internal behavior to suit specific needs. + +Internal functions cannot be called externally, whether from other smart contracts, dApp interfaces, or backend services. Their restricted accessibility ensures that they remain exclusively available within the context of the current contract, promoting controlled and encapsulated usage of these internal utilities. + +### \_checkOwner + +```solidity +function _checkOwner() internal view; +``` + +Throws if the sender is not the owner. + +
+ +### \_setOwner + +```solidity +function _setOwner(address newOwner) internal nonpayable; +``` + +Changes the owner if `newOwner` and oldOwner are different +This pattern is useful in inheritance. + +
+ +### \_getData + +```solidity +function _getData(bytes32 dataKey) internal view returns (bytes dataValue); +``` + +
+ +### \_setData + +```solidity +function _setData(bytes32 dataKey, bytes dataValue) internal nonpayable; +``` + +Save gas by emitting the [`DataChanged`](#datachanged) event with only the first 256 bytes of dataValue + +
+ +### \_isOperatorOrOwner + +```solidity +function _isOperatorOrOwner( + address caller, + bytes32 tokenId +) internal view returns (bool); +``` + +verifies if the `caller` is operator or owner for the `tokenId` + +#### Returns + +| Name | Type | Description | +| ---- | :----: | -------------------------------------------- | +| `0` | `bool` | true if `caller` is either operator or owner | + +
+ +### \_revokeOperator + +```solidity +function _revokeOperator( + address operator, + address tokenOwner, + bytes32 tokenId +) internal nonpayable; +``` + +removes `operator` from the list of operators for the `tokenId` + +
+ +### \_clearOperators + +```solidity +function _clearOperators( + address tokenOwner, + bytes32 tokenId +) internal nonpayable; +``` + +revoke all the current operators for a specific `tokenId` token which belongs to `tokenOwner`. + +#### Parameters + +| Name | Type | Description | +| ------------ | :-------: | ------------------------------------------------- | +| `tokenOwner` | `address` | The address that is the owner of the `tokenId`. | +| `tokenId` | `bytes32` | The token to remove the associated operators for. | + +
+ +### \_exists + +```solidity +function _exists(bytes32 tokenId) internal view returns (bool); +``` + +Returns whether `tokenId` exists. +Tokens start existing when they are minted ([`_mint`](#_mint)), and stop existing when they are burned ([`_burn`](#_burn)). + +
+ +### \_existsOrError + +```solidity +function _existsOrError(bytes32 tokenId) internal view; +``` + +When `tokenId` does not exist then revert with an error. + +
+ +### \_mint + +```solidity +function _mint( + address to, + bytes32 tokenId, + bool allowNonLSP1Recipient, + bytes data +) internal nonpayable; +``` + +Same as [`_mint`](#_mint) but allows to mint only if newly minted `tokenId` does not increase the [`totalSupply`](#totalsupply) +over the [`tokenSupplyCap`](#tokensupplycap). +after a new `tokenId` has of tokens have been minted. + +
+ +### \_burn + +:::tip Hint + +In dApps, you can know which addresses are burning tokens by listening for the `Transfer` event and filter with the zero address as `to`. + +::: + +```solidity +function _burn(bytes32 tokenId, bytes data) internal nonpayable; +``` + +Burn a specific `tokenId`, removing the `tokenId` from the [`tokenIdsOf`](#tokenidsof) the caller and decreasing its [`balanceOf`](#balanceof) by -1. +This will also clear all the operators allowed to transfer the `tokenId`. +The owner of the `tokenId` will be notified about the `tokenId` being transferred through its LSP1 [`universalReceiver`](#universalreceiver) +function, if it is a contract that supports the LSP1 interface. Its [`universalReceiver`](#universalreceiver) function will receive +all the parameters in the calldata packed encoded. +Any logic in the [`_beforeTokenTransfer`](#_beforetokentransfer) function will run before burning `tokenId` and updating the balances. + ++ +**Emitted events:** + +- [`Transfer`](#transfer) event with `address(0)` as the `to` address. + ++ +#### Parameters + +| Name | Type | Description | +| --------- | :-------: | --------------------------------------------------------------------------------------------------------------------------- | +| `tokenId` | `bytes32` | The token to burn. | +| `data` | `bytes` | Any additional data the caller wants included in the emitted event, and sent in the LSP1 hook on the token owner's address. | + +
+ +### \_transfer + +:::danger + +This internal function does not check if the sender is authorized or not to operate on the `tokenId`. + +::: + +```solidity +function _transfer( + address from, + address to, + bytes32 tokenId, + bool allowNonLSP1Recipient, + bytes data +) internal nonpayable; +``` + +Change the owner of the `tokenId` from `from` to `to`. +Both the sender and recipient will be notified of the `tokenId` being transferred through their LSP1 [`universalReceiver`](#universalreceiver) +function, if they are contracts that support the LSP1 interface. Their `universalReceiver` function will receive +all the parameters in the calldata packed encoded. +Any logic in the [`_beforeTokenTransfer`](#_beforetokentransfer) function will run before changing the owner of `tokenId`. + ++ +**Emitted events:** + +- [`Transfer`](#transfer) event. + ++ +#### Parameters + +| Name | Type | Description | +| ----------------------- | :-------: | -------------------------------------------------------------------------------------------------------------------------- | +| `from` | `address` | The sender address. | +| `to` | `address` | @param tokenId The token to transfer. | +| `tokenId` | `bytes32` | The token to transfer. | +| `allowNonLSP1Recipient` | `bool` | When set to `true`, `to` may be any address. When set to `false`, `to` must be a contract that supports the LSP1 standard. | +| `data` | `bytes` | Additional data the caller wants included in the emitted event, and sent in the hooks to `from` and `to` addresses. | + +
+ +### \_beforeTokenTransfer + +```solidity +function _beforeTokenTransfer( + address from, + address to, + bytes32 tokenId +) internal nonpayable; +``` + +Hook that is called before any token transfer, including minting and burning. + +- Allows to run custom logic before updating balances and notifiying sender/recipient by overriding this function. + +#### Parameters + +| Name | Type | Description | +| --------- | :-------: | -------------------------------------- | +| `from` | `address` | The sender address | +| `to` | `address` | @param tokenId The tokenId to transfer | +| `tokenId` | `bytes32` | The tokenId to transfer | + +
+ +### \_notifyTokenSender + +```solidity +function _notifyTokenSender(address from, bytes lsp1Data) internal nonpayable; +``` + +An attempt is made to notify the token sender about the `tokenId` changing owners using +LSP1 interface. + +
+ +### \_notifyTokenReceiver + +```solidity +function _notifyTokenReceiver( + address to, + bool allowNonLSP1Recipient, + bytes lsp1Data +) internal nonpayable; +``` + +An attempt is made to notify the token receiver about the `tokenId` changing owners +using LSP1 interface. When allowNonLSP1Recipient is FALSE the token receiver MUST support LSP1. +The receiver may revert when the token being sent is not wanted. + +
## Events ### AuthorizedOperator -:::note Links +:::note References -- Specification details in [**LSP-8-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CappedSupply.md#authorizedoperator) -- Solidity implementation in [**LSP8CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CappedSupply) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#authorizedoperator) +- 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)` -- Event hash: `0x34b797fc5a526f7bf1d2b5de25f6564fd85ae364e3ee939aee7c1ac27871a988` +- Event topic hash: `0x34b797fc5a526f7bf1d2b5de25f6564fd85ae364e3ee939aee7c1ac27871a988` ::: @@ -595,7 +859,7 @@ Transfers ownership of the contract to a new account (`newOwner`). Can only be c event AuthorizedOperator(address indexed operator, address indexed tokenOwner, bytes32 indexed tokenId); ``` -Emitted when `tokenOwner` enables `operator` to transfer or burn `tokenId` on its behalf. +Emitted when `tokenOwner` enables `operator` to transfer or burn the `tokenId`. #### Parameters @@ -605,14 +869,16 @@ Emitted when `tokenOwner` enables `operator` to transfer or burn `tokenId` on it | `tokenOwner` **`indexed`** | `address` | The owner of the `tokenId`. | | `tokenId` **`indexed`** | `bytes32` | The tokenId `operator` address has access on behalf of `tokenOwner`. | +
+ ### DataChanged -:::note Links +:::note References -- Specification details in [**LSP-8-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CappedSupply.md#datachanged) -- Solidity implementation in [**LSP8CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CappedSupply) +- 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 hash: `0xece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2` +- Event topic hash: `0xece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2` ::: @@ -620,25 +886,25 @@ Emitted when `tokenOwner` enables `operator` to transfer or burn `tokenId` on it 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`. +_Emitted when data at a key is changed_ #### 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 | +| ----------------------- | :-------: | ------------------------------------ | +| `dataKey` **`indexed`** | `bytes32` | The data key which data value is set | +| `dataValue` | `bytes` | The data value to set | + +
### OwnershipTransferred -:::note Links +:::note References -- Specification details in [**LSP-8-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CappedSupply.md#ownershiptransferred) -- Solidity implementation in [**LSP8CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CappedSupply) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#ownershiptransferred) +- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol) - Event signature: `OwnershipTransferred(address,address)` -- Event hash: `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0` +- Event topic hash: `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0` ::: @@ -653,14 +919,16 @@ event OwnershipTransferred(address indexed previousOwner, address indexed newOwn | `previousOwner` **`indexed`** | `address` | - | | `newOwner` **`indexed`** | `address` | - | +
+ ### RevokedOperator -:::note Links +:::note References -- Specification details in [**LSP-8-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CappedSupply.md#revokedoperator) -- Solidity implementation in [**LSP8CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CappedSupply) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#revokedoperator) +- 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)` -- Event hash: `0x17d5389f6ab6adb2647dfa0aa365c323d37adacc30b33a65310b6158ce1373d5` +- Event topic hash: `0x17d5389f6ab6adb2647dfa0aa365c323d37adacc30b33a65310b6158ce1373d5` ::: @@ -672,20 +940,22 @@ Emitted when `tokenOwner` disables `operator` to transfer or burn `tokenId` on i #### Parameters -| Name | Type | Description | -| -------------------------- | :-------: | ---------------------------------------------------- | -| `operator` **`indexed`** | `address` | The address revoked as an operator. | -| `tokenOwner` **`indexed`** | `address` | The owner of the `tokenId`. | -| `tokenId` **`indexed`** | `bytes32` | The tokenId `operator` is revoked from operating on. | +| Name | Type | Description | +| -------------------------- | :-------: | --------------------------------------------------------------- | +| `operator` **`indexed`** | `address` | The address revoked from the operator array ({getOperatorsOf}). | +| `tokenOwner` **`indexed`** | `address` | The owner of the `tokenId`. | +| `tokenId` **`indexed`** | `bytes32` | The tokenId `operator` is revoked from operating on. | + +
### Transfer -:::note Links +:::note References -- Specification details in [**LSP-8-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CappedSupply.md#transfer) -- Solidity implementation in [**LSP8CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CappedSupply) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#transfer) +- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol) - Event signature: `Transfer(address,address,address,bytes32,bool,bytes)` -- Event hash: `0xb333c813a7426a7a11e2b190cad52c44119421594b47f6f32ace6d8c7207b2bf` +- Event topic hash: `0xb333c813a7426a7a11e2b190cad52c44119421594b47f6f32ace6d8c7207b2bf` ::: @@ -706,16 +976,16 @@ Emitted when `tokenId` token is transferred from the `from` to the `to` address. | `allowNonLSP1Recipient` | `bool` | If the token transfer enforces the `to` recipient address to be a contract that implements the LSP1 standard or not. | | `data` | `bytes` | Any additional data the caller included by the caller during the transfer, and sent in the hooks to the `from` and `to` addresses. | ---- +
## Errors ### ERC725Y_DataKeysValuesEmptyArray -:::note Links +:::note References -- Specification details in [**LSP-8-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CappedSupply.md#erc725y_datakeysvaluesemptyarray) -- Solidity implementation in [**LSP8CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CappedSupply) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#erc725y_datakeysvaluesemptyarray) +- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol) - Error signature: `ERC725Y_DataKeysValuesEmptyArray()` - Error hash: `0x97da5f95` @@ -725,14 +995,16 @@ Emitted when `tokenId` token is transferred from the `from` to the `to` address. error ERC725Y_DataKeysValuesEmptyArray(); ``` -Reverts when one of the array parameter provided to [`setDataBatch`](#setdatabatch) function is an empty array. +reverts when one of the array parameter provided to `setDataBatch` is an empty array + +
### ERC725Y_DataKeysValuesLengthMismatch -:::note Links +:::note References -- Specification details in [**LSP-8-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CappedSupply.md#erc725y_datakeysvalueslengthmismatch) -- Solidity implementation in [**LSP8CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CappedSupply) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#erc725y_datakeysvalueslengthmismatch) +- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol) - Error signature: `ERC725Y_DataKeysValuesLengthMismatch()` - Error hash: `0x3bcc8979` @@ -742,14 +1014,16 @@ Reverts when one of the array parameter provided to [`setDataBatch`](#setdatabat error ERC725Y_DataKeysValuesLengthMismatch(); ``` -Reverts when there is not the same number of elements in the `datakeys` and `dataValues` array parameters provided when calling the [`setDataBatch`](#setdatabatch) function. +reverts when there is not the same number of elements in the lists of data keys and data values when calling setDataBatch. + +
### ERC725Y_MsgValueDisallowed -:::note Links +:::note References -- Specification details in [**LSP-8-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CappedSupply.md#erc725y_msgvaluedisallowed) -- Solidity implementation in [**LSP8CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CappedSupply) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#erc725y_msgvaluedisallowed) +- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol) - Error signature: `ERC725Y_MsgValueDisallowed()` - Error hash: `0xf36ba737` @@ -759,14 +1033,16 @@ Reverts when there is not the same number of elements in the `datakeys` and `dat error ERC725Y_MsgValueDisallowed(); ``` -Reverts when sending value to the [`setData`](#setdata) or [`setDataBatch`](#setdatabatch) function. +reverts when sending value to the `setData(..)` functions + +
### LSP4TokenNameNotEditable -:::note Links +:::note References -- Specification details in [**LSP-8-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CappedSupply.md#lsp4tokennamenoteditable) -- Solidity implementation in [**LSP8CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CappedSupply) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp4tokennamenoteditable) +- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol) - Error signature: `LSP4TokenNameNotEditable()` - Error hash: `0x85c169bd` @@ -778,12 +1054,14 @@ 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. +
+ ### LSP4TokenSymbolNotEditable -:::note Links +:::note References -- Specification details in [**LSP-8-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CappedSupply.md#lsp4tokensymbolnoteditable) -- Solidity implementation in [**LSP8CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CappedSupply) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp4tokensymbolnoteditable) +- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol) - Error signature: `LSP4TokenSymbolNotEditable()` - Error hash: `0x76755b38` @@ -795,12 +1073,14 @@ 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. +
+ ### LSP8CannotSendToAddressZero -:::note Links +:::note References -- Specification details in [**LSP-8-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CappedSupply.md#lsp8cannotsendtoaddresszero) -- Solidity implementation in [**LSP8CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CappedSupply) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8cannotsendtoaddresszero) +- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol) - Error signature: `LSP8CannotSendToAddressZero()` - Error hash: `0x24ecef4d` @@ -812,12 +1092,14 @@ error LSP8CannotSendToAddressZero(); reverts when trying to send token to the zero address. +
+ ### LSP8CannotSendToSelf -:::note Links +:::note References -- Specification details in [**LSP-8-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CappedSupply.md#lsp8cannotsendtoself) -- Solidity implementation in [**LSP8CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CappedSupply) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8cannotsendtoself) +- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol) - Error signature: `LSP8CannotSendToSelf()` - Error hash: `0x5d67d6c1` @@ -829,12 +1111,14 @@ error LSP8CannotSendToSelf(); reverts when specifying the same address for `from` and `to` in a token transfer. +
+ ### LSP8CannotUseAddressZeroAsOperator -:::note Links +:::note References -- Specification details in [**LSP-8-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CappedSupply.md#lsp8cannotuseaddresszeroasoperator) -- Solidity implementation in [**LSP8CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CappedSupply) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8cannotuseaddresszeroasoperator) +- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol) - Error signature: `LSP8CannotUseAddressZeroAsOperator()` - Error hash: `0x9577b8b3` @@ -846,12 +1130,14 @@ error LSP8CannotUseAddressZeroAsOperator(); reverts when trying to set the zero address as an operator. +
+ ### LSP8CappedSupplyCannotMintOverCap -:::note Links +:::note References -- Specification details in [**LSP-8-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CappedSupply.md#lsp8cappedsupplycannotmintovercap) -- Solidity implementation in [**LSP8CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CappedSupply) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8cappedsupplycannotmintovercap) +- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol) - Error signature: `LSP8CappedSupplyCannotMintOverCap()` - Error hash: `0xe8ba2291` @@ -865,12 +1151,14 @@ _Cannot mint anymore as total supply reached the maximum cap._ Reverts when trying to mint tokens but the [`totalSupply`](#totalsupply) has reached the maximum [`tokenSupplyCap`](#tokensupplycap). +
+ ### LSP8CappedSupplyRequired -:::note Links +:::note References -- Specification details in [**LSP-8-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CappedSupply.md#lsp8cappedsupplyrequired) -- Solidity implementation in [**LSP8CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CappedSupply) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8cappedsupplyrequired) +- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol) - Error signature: `LSP8CappedSupplyRequired()` - Error hash: `0x38d9fc30` @@ -884,12 +1172,14 @@ _The `tokenSupplyCap` must be set and cannot be `0`._ Reverts when setting `0` for the [`tokenSupplyCap`](#tokensupplycap). The max token supply MUST be set to a number greater than 0. +
+ ### LSP8InvalidTransferBatch -:::note Links +:::note References -- Specification details in [**LSP-8-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CappedSupply.md#lsp8invalidtransferbatch) -- Solidity implementation in [**LSP8CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CappedSupply) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8invalidtransferbatch) +- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol) - Error signature: `LSP8InvalidTransferBatch()` - Error hash: `0x93a83119` @@ -901,12 +1191,14 @@ error LSP8InvalidTransferBatch(); reverts when the parameters used for `transferBatch` have different lengths. +
+ ### LSP8NonExistentTokenId -:::note Links +:::note References -- Specification details in [**LSP-8-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CappedSupply.md#lsp8nonexistenttokenid) -- Solidity implementation in [**LSP8CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CappedSupply) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8nonexistenttokenid) +- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol) - Error signature: `LSP8NonExistentTokenId(bytes32)` - Error hash: `0xae8f9a36` @@ -924,12 +1216,14 @@ reverts when `tokenId` has not been minted. | --------- | :-------: | ----------- | | `tokenId` | `bytes32` | - | +
+ ### LSP8NonExistingOperator -:::note Links +:::note References -- Specification details in [**LSP-8-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CappedSupply.md#lsp8nonexistingoperator) -- Solidity implementation in [**LSP8CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CappedSupply) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8nonexistingoperator) +- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol) - Error signature: `LSP8NonExistingOperator(address,bytes32)` - Error hash: `0x4aa31a8c` @@ -948,12 +1242,14 @@ reverts when `operator` is not an operator for the `tokenId`. | `operator` | `address` | - | | `tokenId` | `bytes32` | - | +
+ ### LSP8NotTokenOperator -:::note Links +:::note References -- Specification details in [**LSP-8-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CappedSupply.md#lsp8nottokenoperator) -- Solidity implementation in [**LSP8CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CappedSupply) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8nottokenoperator) +- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol) - Error signature: `LSP8NotTokenOperator(bytes32,address)` - Error hash: `0x1294d2a9` @@ -972,12 +1268,14 @@ reverts when `caller` is not an allowed operator for `tokenId`. | `tokenId` | `bytes32` | - | | `caller` | `address` | - | +
+ ### LSP8NotTokenOwner -:::note Links +:::note References -- Specification details in [**LSP-8-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CappedSupply.md#lsp8nottokenowner) -- Solidity implementation in [**LSP8CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CappedSupply) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8nottokenowner) +- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol) - Error signature: `LSP8NotTokenOwner(address,bytes32,address)` - Error hash: `0x5b271ea2` @@ -997,12 +1295,14 @@ reverts when `caller` is not the `tokenOwner` of the `tokenId`. | `tokenId` | `bytes32` | - | | `caller` | `address` | - | +
+ ### LSP8NotifyTokenReceiverContractMissingLSP1Interface -:::note Links +:::note References -- Specification details in [**LSP-8-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CappedSupply.md#lsp8notifytokenreceivercontractmissinglsp1interface) -- Solidity implementation in [**LSP8CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CappedSupply) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8notifytokenreceivercontractmissinglsp1interface) +- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol) - Error signature: `LSP8NotifyTokenReceiverContractMissingLSP1Interface(address)` - Error hash: `0x4349776d` @@ -1022,12 +1322,14 @@ reverts if the `tokenReceiver` does not implement LSP1 when minting or transferr | --------------- | :-------: | ----------- | | `tokenReceiver` | `address` | - | +
+ ### LSP8NotifyTokenReceiverIsEOA -:::note Links +:::note References -- Specification details in [**LSP-8-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CappedSupply.md#lsp8notifytokenreceiveriseoa) -- Solidity implementation in [**LSP8CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CappedSupply) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8notifytokenreceiveriseoa) +- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol) - Error signature: `LSP8NotifyTokenReceiverIsEOA(address)` - Error hash: `0x03173137` @@ -1045,12 +1347,14 @@ reverts if the `tokenReceiver` is an EOA when minting or transferring tokens wit | --------------- | :-------: | ----------- | | `tokenReceiver` | `address` | - | +
+ ### LSP8OperatorAlreadyAuthorized -:::note Links +:::note References -- Specification details in [**LSP-8-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CappedSupply.md#lsp8operatoralreadyauthorized) -- Solidity implementation in [**LSP8CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CappedSupply) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8operatoralreadyauthorized) +- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol) - Error signature: `LSP8OperatorAlreadyAuthorized(address,bytes32)` - Error hash: `0xa7626b68` @@ -1069,12 +1373,14 @@ reverts when `operator` is already authorized for the `tokenId`. | `operator` | `address` | - | | `tokenId` | `bytes32` | - | +
+ ### LSP8TokenOwnerCannotBeOperator -:::note Links +:::note References -- Specification details in [**LSP-8-CappedSupply**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CappedSupply.md#lsp8tokenownercannotbeoperator) -- Solidity implementation in [**LSP8CappedSupply**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CappedSupply) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenownercannotbeoperator) +- Solidity implementation: [`LSP8CappedSupply.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol) - Error signature: `LSP8TokenOwnerCannotBeOperator()` - Error hash: `0x89fdad62` @@ -1086,193 +1392,4 @@ error LSP8TokenOwnerCannotBeOperator(); reverts when trying to authorize or revoke the token's owner as an operator. - - - - - - -[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/nft-2.0/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/nft-2.0/LSP7-Digital-Asset -[LSP8IdentifiableDigitalAsset]: https://docs.lukso.tech/standards/nft-2.0/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/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.md b/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.md index 292ed4d1ce..b5942022eb 100644 --- a/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.md +++ b/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.md @@ -1,21 +1,32 @@ + + + # LSP8CompatibleERC721 -:::info Solidity contract +:::info Standard Specifications + +[`LSP-8-IdentifiableDigitalAsset`](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md) + +::: +:::info Solidity implementation -[`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +[`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) ::: LSP8 extension, for compatibility for clients / tools that expect ERC721. -## Methods +## Public Methods + +Public methods are accessible externally from users, allowing interaction with this function from dApps or other smart contracts. +When marked as 'public', a method can be called both externally and internally, on the other hand, when marked as 'external', a method can only be called externally. ### approve -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#approve) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#approve) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Function signature: `approve(address,uint256)` - Function selector: `0x095ea7b3` @@ -25,21 +36,25 @@ LSP8 extension, for compatibility for clients / tools that expect ERC721. function approve(address operator, uint256 tokenId) external nonpayable; ``` -Compatible with ERC721 approve. +_Calling `approve` function on `ILSP8CompatibleERC721` contract. Approving operator at address `operator` to transfer tokenId `tokenId` on behalf of its owner._ + +Approval function compatible with ERC721 `approve(address,uint256)`. #### Parameters -| Name | Type | Description | -| ---------- | :-------: | ------------------------------------ | -| `operator` | `address` | The address to approve for `tokenId` | -| `tokenId` | `uint256` | The tokenId to approve | +| Name | Type | Description | +| ---------- | :-------: | ------------------------------------- | +| `operator` | `address` | The address to approve for `tokenId`. | +| `tokenId` | `uint256` | The tokenId to approve. | + +
### authorizeOperator -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#authorizeoperator) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#authorizeoperator) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Function signature: `authorizeOperator(address,bytes32)` - Function selector: `0xcf5182ba` @@ -70,12 +85,14 @@ Allow an `operator` address to transfer or burn a specific `tokenId` on behalf o | `operator` | `address` | The address to authorize as an operator. | | `tokenId` | `bytes32` | The token ID operator has access to.. | +
+ ### balanceOf -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#balanceof) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#balanceof) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Function signature: `balanceOf(address)` - Function selector: `0x70a08231` @@ -99,12 +116,14 @@ Get the number of token IDs owned by `tokenOwner`. | ---- | :-------: | ----------------------------------------------------- | | `0` | `uint256` | The total number of token IDs that `tokenOwner` owns. | +
+ ### getApproved -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#getapproved) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#getapproved) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Function signature: `getApproved(uint256)` - Function selector: `0x081812fc` @@ -114,26 +133,30 @@ Get the number of token IDs owned by `tokenOwner`. function getApproved(uint256 tokenId) external view returns (address); ``` +_Retrieving the address other than the token owner that is approved to transfer tokenId `tokenId` on behalf of its owner._ + Compatible with ERC721 getApproved. #### Parameters -| Name | Type | Description | -| --------- | :-------: | -------------------- | -| `tokenId` | `uint256` | The tokenId to query | +| Name | Type | Description | +| --------- | :-------: | --------------------- | +| `tokenId` | `uint256` | The tokenId to query. | #### Returns -| Name | Type | Description | -| ---- | :-------: | ----------------------------------------- | -| `0` | `address` | The address of the operator for `tokenId` | +| Name | Type | Description | +| ---- | :-------: | ------------------------------------------ | +| `0` | `address` | The address of the operator for `tokenId`. | + +
### getData -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#getdata) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#getdata) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Function signature: `getData(bytes32)` - Function selector: `0x54f6127f` @@ -143,28 +166,28 @@ Compatible with ERC721 getApproved. function getData(bytes32 dataKey) external view returns (bytes dataValue); ``` -_Reading the ERC725Y storage for data key `dataKey` returned the following value: `dataValue`._ - -Get in the ERC725Y storage the bytes data stored at a specific data key `dataKey`. +_Gets singular data at a given `dataKey`_ #### Parameters -| Name | Type | Description | -| --------- | :-------: | --------------------------------------------- | -| `dataKey` | `bytes32` | The data key for which to retrieve the value. | +| Name | Type | Description | +| --------- | :-------: | ------------------------------- | +| `dataKey` | `bytes32` | The key which value to retrieve | #### Returns -| Name | Type | Description | -| ----------- | :-----: | ---------------------------------------------------- | -| `dataValue` | `bytes` | The bytes value stored under the specified data key. | +| Name | Type | Description | +| ----------- | :-----: | -------------------------- | +| `dataValue` | `bytes` | The data stored at the key | + +
### getDataBatch -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#getdatabatch) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#getdatabatch) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Function signature: `getDataBatch(bytes32[])` - Function selector: `0xdedff9c6` @@ -176,9 +199,7 @@ function getDataBatch( ) external view returns (bytes[] dataValues); ``` -_Reading the ERC725Y storage for data keys `dataKeys` returned the following values: `dataValues`._ - -Get in the ERC725Y storage the bytes data stored at multiple data keys `dataKeys`. +_Gets array of data for multiple given keys_ #### Parameters @@ -192,12 +213,14 @@ Get in the ERC725Y storage the bytes data stored at multiple data keys `dataKeys | ------------ | :-------: | ----------------------------------------- | | `dataValues` | `bytes[]` | The array of data stored at multiple keys | +
+ ### getOperatorsOf -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#getoperatorsof) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#getoperatorsof) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Function signature: `getOperatorsOf(bytes32)` - Function selector: `0x49a6078d` @@ -221,12 +244,14 @@ Returns all `operator` addresses that are allowed to transfer or burn a specific | ---- | :---------: | ------------------------------------------------------------------------------------------------------------ | | `0` | `address[]` | An array of operators allowed to transfer or burn a specific `tokenId`. Requirements - `tokenId` must exist. | +
+ ### isApprovedForAll -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#isapprovedforall) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#isapprovedforall) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Function signature: `isApprovedForAll(address,address)` - Function selector: `0xe985e9c5` @@ -252,12 +277,14 @@ function isApprovedForAll( | ---- | :----: | ----------- | | `0` | `bool` | - | +
+ ### isOperatorFor -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#isoperatorfor) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#isoperatorfor) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Function signature: `isOperatorFor(address,bytes32)` - Function selector: `0x2a3654a4` @@ -285,12 +312,14 @@ Returns whether `operator` address is an operator for a given `tokenId`. | ---- | :----: | --------------------------------------------------------------------- | | `0` | `bool` | `true` if `operator` is an operator for `tokenId`, `false` otherwise. | +
+ ### name -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#name) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#name) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Function signature: `name()` - Function selector: `0x06fdde03` @@ -308,12 +337,14 @@ Returns the name of the token. | ---- | :------: | --------------------- | | `0` | `string` | The name of the token | +
+ ### owner -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#owner) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#owner) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Function signature: `owner()` - Function selector: `0x8da5cb5b` @@ -331,12 +362,14 @@ Returns the address of the current owner. | ---- | :-------: | ----------- | | `0` | `address` | - | +
+ ### ownerOf -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#ownerof) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#ownerof) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Function signature: `ownerOf(uint256)` - Function selector: `0x6352211e` @@ -346,26 +379,30 @@ Returns the address of the current owner. function ownerOf(uint256 tokenId) external view returns (address); ``` +_Retrieving the address that own tokenId `tokenId`._ + Compatible with ERC721 ownerOf. #### Parameters -| Name | Type | Description | -| --------- | :-------: | -------------------- | -| `tokenId` | `uint256` | The tokenId to query | +| Name | Type | Description | +| --------- | :-------: | --------------------- | +| `tokenId` | `uint256` | The tokenId to query. | #### Returns -| Name | Type | Description | -| ---- | :-------: | ------------------------ | -| `0` | `address` | The owner of the tokenId | +| Name | Type | Description | +| ---- | :-------: | ------------------------- | +| `0` | `address` | The owner of the tokenId. | + +
### renounceOwnership -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#renounceownership) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#renounceownership) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Function signature: `renounceOwnership()` - Function selector: `0x715018a6` @@ -377,12 +414,14 @@ function renounceOwnership() external nonpayable; Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner. +
+ ### revokeOperator -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#revokeoperator) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#revokeoperator) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Function signature: `revokeOperator(address,bytes32)` - Function selector: `0x0b0c6d82` @@ -401,12 +440,14 @@ Remove access of `operator` for a given `tokenId`, disallowing it to transfer `t | `operator` | `address` | The address to revoke as an operator. | | `tokenId` | `bytes32` | The tokenId `operator` is revoked from operating on. | +
+ ### safeTransferFrom -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#safetransferfrom) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#safetransferfrom) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Function signature: `safeTransferFrom(address,address,uint256)` - Function selector: `0x42842e0e` @@ -426,6 +467,8 @@ function safeTransferFrom( ) external nonpayable; ``` +_Calling `safeTransferFrom` function on `ILSP8CompatibleERC721` contract. Transferring tokenId `tokenId` from address `from` to address `to`._ + Safe Transfer function without optional data from the ERC721 standard interface. #### Parameters @@ -436,12 +479,14 @@ Safe Transfer function without optional data from the ERC721 standard interface. | `to` | `address` | The receiving address. | | `tokenId` | `uint256` | The tokenId to transfer. | +
+ ### safeTransferFrom -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#safetransferfrom) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#safetransferfrom) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Function signature: `safeTransferFrom(address,address,uint256,bytes)` - Function selector: `0xb88d4fde` @@ -462,7 +507,9 @@ function safeTransferFrom( ) external nonpayable; ``` -Safe Transfer function with optional data from the ERC721 standard interface.. +_Calling `safeTransferFrom` function with `data` on `ILSP8CompatibleERC721` contract. Transferring tokenId `tokenId` from address `from` to address `to`._ + +Safe Transfer function with optional data from the ERC721 standard interface. #### Parameters @@ -473,12 +520,14 @@ Safe Transfer function with optional data from the ERC721 standard interface.. | `tokenId` | `uint256` | The tokenId to transfer. | | `data` | `bytes` | The data to be sent with the transfer. | +
+ ### setApprovalForAll -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#setapprovalforall) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#setapprovalforall) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Function signature: `setApprovalForAll(address,bool)` - Function selector: `0xa22cb465` @@ -497,108 +546,68 @@ See [`_setApprovalForAll`](#_setapprovalforall) | `operator` | `address` | - | | `approved` | `bool` | - | +
+ ### setData -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#setdata) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#setdata) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Function signature: `setData(bytes32,bytes)` - Function selector: `0x7f23690c` ::: -:::caution Warning - -**Note for developers:** despite the fact that this function is set as `payable`, if the function is not intended to receive value (= native tokens), **an additional check should be implemented to ensure that `msg.value` sent was equal to 0**. - -::: - ```solidity function setData(bytes32 dataKey, bytes dataValue) external payable; ``` -_Setting the following data key value pair in the ERC725Y storage. Data key: `dataKey`, data value: `dataValue`. _ - -Sets a single bytes value `dataValue` in the ERC725Y storage for a specific data key `dataKey`. The function is marked as payable to enable flexibility on child contracts. For instance to implement a fee mechanism for setting specific data. - -- -**Requirements:** - -- SHOULD only be callable by the [`owner`](#owner). - -- -- -**Emitted events:** - -- [`DataChanged`](#datachanged) event. - -+_Sets singular data for a given `dataKey`_ #### Parameters -| Name | Type | Description | -| ----------- | :-------: | ------------------------------------------ | -| `dataKey` | `bytes32` | The data key for which to set a new value. | -| `dataValue` | `bytes` | The new bytes value to set. | +| Name | Type | Description | +| ----------- | :-------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `dataKey` | `bytes32` | The key to retrieve stored value | +| `dataValue` | `bytes` | The value to set SHOULD only be callable by the owner of the contract set via ERC173 The function is marked as payable to enable flexibility on child contracts If the function is not intended to receive value, an additional check should be implemented to check that value equal 0. Emits a {DataChanged} event. | + +
### setDataBatch -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#setdatabatch) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#setdatabatch) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Function signature: `setDataBatch(bytes32[],bytes[])` - Function selector: `0x97902421` ::: -:::caution Warning - -**Note for developers:** despite the fact that this function is set as `payable`, if the function is not intended to receive value (= native tokens), **an additional check should be implemented to ensure that `msg.value` sent was equal to 0**. - -::: - ```solidity function setDataBatch(bytes32[] dataKeys, bytes[] dataValues) external payable; ``` -_Setting the following data key value pairs in the ERC725Y storage. Data keys: `dataKeys`, data values: `dataValues`. _ - -Batch data setting function that behaves the same as [`setData`](#setdata) but allowing to set multiple data key/value pairs in the ERC725Y storage in the same transaction. - -- -**Requirements:** - -- SHOULD only be callable by the [`owner`](#owner) of the contract. - -- -- -**Emitted events:** - -- [`DataChanged`](#datachanged) event **for each data key/value pair set**. +Sets array of data for multiple given `dataKeys` SHOULD only be callable by the owner of the contract set via ERC173 The function is marked as payable to enable flexibility on child contracts If the function is not intended to receive value, an additional check should be implemented to check that value equal -+0. Emits a [`DataChanged`](#datachanged) event. #### Parameters -| Name | Type | Description | -| ------------ | :---------: | ---------------------------------------------------- | -| `dataKeys` | `bytes32[]` | An array of data keys to set bytes values for. | -| `dataValues` | `bytes[]` | An array of bytes values to set for each `dataKeys`. | +| Name | Type | Description | +| ------------ | :---------: | ---------------------------------------- | +| `dataKeys` | `bytes32[]` | The array of data keys for values to set | +| `dataValues` | `bytes[]` | The array of values to set | + +
### supportsInterface -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#supportsinterface) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#supportsinterface) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Function signature: `supportsInterface(bytes4)` - Function selector: `0x01ffc9a7` @@ -622,12 +631,14 @@ Returns true if this contract implements the interface defined by `interfaceId`. | ---- | :----: | ----------- | | `0` | `bool` | - | +
+ ### symbol -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#symbol) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#symbol) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Function signature: `symbol()` - Function selector: `0x95d89b41` @@ -645,12 +656,14 @@ Returns the symbol of the token, usually a shorter version of the name. | ---- | :------: | ----------------------- | | `0` | `string` | The symbol of the token | +
+ ### tokenIdsOf -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#tokenidsof) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#tokenidsof) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Function signature: `tokenIdsOf(address)` - Function selector: `0xa3b261f2` @@ -674,12 +687,14 @@ Returns the list of token IDs that the `tokenOwner` address owns. | ---- | :---------: | ------------------------------------------------------- | | `0` | `bytes32[]` | An array of `bytes32[] tokenIds` owned by `tokenOwner`. | +
+ ### tokenOwnerOf -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#tokenownerof) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#tokenownerof) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Function signature: `tokenOwnerOf(bytes32)` - Function selector: `0x217b2270` @@ -703,12 +718,14 @@ Returns the list of `tokenIds` for the `tokenOwner` address. | ---- | :-------: | ----------------------------------------- | | `0` | `address` | The owner address of the given `tokenId`. | +
+ ### tokenURI -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#)) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#)) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Function signature: `)` - Function selector: `0x59d76dc3` @@ -730,12 +747,14 @@ function tokenURI(uint256) external view returns (string); | ---- | :------: | ----------- | | `0` | `string` | - | +
+ ### totalSupply -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#totalsupply) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#totalsupply) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Function signature: `totalSupply()` - Function selector: `0x18160ddd` @@ -753,12 +772,14 @@ Returns the number of existing tokens that have been minted in this contract. | ---- | :-------: | ------------------------------ | | `0` | `uint256` | The number of existing tokens. | +
+ ### transfer -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#transfer) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#transfer) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Function signature: `transfer(address,address,bytes32,bool,bytes)` - Function selector: `0x511b6952` @@ -786,12 +807,14 @@ Transfer a given `tokenId` token from the `from` address to the `to` address. If | `allowNonLSP1Recipient` | `bool` | When set to `true`, the `to` address CAN be any addres. When set to `false`, the `to` address MUST be a contract that supports the LSP1 UniversalReceiver standard. | | `data` | `bytes` | Any additional data the caller wants included in the emitted event, and sent in the hooks of the `from` and `to` addresses. | +
+ ### transferBatch -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#transferbatch) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#transferbatch) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Function signature: `transferBatch(address[],address[],bytes32[],bool[],bytes[])` - Function selector: `0x7e87632c` @@ -819,12 +842,14 @@ Transfers multiple tokens at once based on the arrays of `from`, `to` and `token | `allowNonLSP1Recipient` | `bool[]` | When set to `true`, `to` may be any address. When set to `false`, `to` must be a contract that supports the LSP1 standard and not revert. | | `data` | `bytes[]` | Any additional data the caller wants included in the emitted event, and sent in the hooks to the `from` and `to` addresses. | +
+ ### transferFrom -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#transferfrom) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#transferfrom) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Function signature: `transferFrom(address,address,uint256)` - Function selector: `0x23b872dd` @@ -844,6 +869,8 @@ function transferFrom( ) external nonpayable; ``` +_Calling `transferFrom` function on `ILSP8CompatibleERC721` contract. Transferring tokenId `tokenId` from address `from` to address `to`._ + Transfer functions from the ERC721 standard interface. #### Parameters @@ -854,12 +881,14 @@ Transfer functions from the ERC721 standard interface. | `to` | `address` | The receiving address. | | `tokenId` | `uint256` | The tokenId to transfer. | +
+ ### transferOwnership -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#transferownership) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#transferownership) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Function signature: `transferOwnership(address)` - Function selector: `0xf2fde38b` @@ -877,18 +906,260 @@ Transfers ownership of the contract to a new account (`newOwner`). Can only be c | ---------- | :-------: | ----------- | | `newOwner` | `address` | - | ---- +
+ +## Internal Methods + +Any method labeled as `internal` serves as utility function within the contract. They can be used when writing solidity contracts that inherit from this contract. These methods can be extended or modified by overriding their internal behavior to suit specific needs. + +Internal functions cannot be called externally, whether from other smart contracts, dApp interfaces, or backend services. Their restricted accessibility ensures that they remain exclusively available within the context of the current contract, promoting controlled and encapsulated usage of these internal utilities. + +### \_checkOwner + +```solidity +function _checkOwner() internal view; +``` + +Throws if the sender is not the owner. + +
+ +### \_setOwner + +```solidity +function _setOwner(address newOwner) internal nonpayable; +``` + +Changes the owner if `newOwner` and oldOwner are different +This pattern is useful in inheritance. + +
+ +### \_getData + +```solidity +function _getData(bytes32 dataKey) internal view returns (bytes dataValue); +``` + +
+ +### \_setData + +```solidity +function _setData(bytes32 key, bytes value) internal nonpayable; +``` + +
+ +### \_isOperatorOrOwner + +```solidity +function _isOperatorOrOwner( + address caller, + bytes32 tokenId +) internal view returns (bool); +``` + +verifies if the `caller` is operator or owner for the `tokenId` + +#### Returns + +| Name | Type | Description | +| ---- | :----: | -------------------------------------------- | +| `0` | `bool` | true if `caller` is either operator or owner | + +
+ +### \_revokeOperator + +```solidity +function _revokeOperator( + address operator, + address tokenOwner, + bytes32 tokenId +) internal nonpayable; +``` + +removes `operator` from the list of operators for the `tokenId` + +
+ +### \_clearOperators + +```solidity +function _clearOperators( + address tokenOwner, + bytes32 tokenId +) internal nonpayable; +``` + +revoke all the current operators for a specific `tokenId` token which belongs to `tokenOwner`. + +#### Parameters + +| Name | Type | Description | +| ------------ | :-------: | ------------------------------------------------- | +| `tokenOwner` | `address` | The address that is the owner of the `tokenId`. | +| `tokenId` | `bytes32` | The token to remove the associated operators for. | + +
+ +### \_exists + +```solidity +function _exists(bytes32 tokenId) internal view returns (bool); +``` + +Returns whether `tokenId` exists. +Tokens start existing when they are minted ([`_mint`](#_mint)), and stop existing when they are burned ([`_burn`](#_burn)). + +
+ +### \_existsOrError + +```solidity +function _existsOrError(bytes32 tokenId) internal view; +``` + +When `tokenId` does not exist then revert with an error. + +
+ +### \_mint + +```solidity +function _mint( + address to, + bytes32 tokenId, + bool allowNonLSP1Recipient, + bytes data +) internal nonpayable; +``` + +
+ +### \_burn + +```solidity +function _burn(bytes32 tokenId, bytes data) internal nonpayable; +``` + +
+ +### \_transfer + +```solidity +function _transfer( + address from, + address to, + bytes32 tokenId, + bool allowNonLSP1Recipient, + bytes data +) internal nonpayable; +``` + +
+ +### \_beforeTokenTransfer + +```solidity +function _beforeTokenTransfer( + address from, + address to, + bytes32 tokenId +) internal nonpayable; +``` + +Hook that is called before any token transfer, including minting and burning. + +- Allows to run custom logic before updating balances and notifiying sender/recipient by overriding this function. + +#### Parameters + +| Name | Type | Description | +| --------- | :-------: | -------------------------------------- | +| `from` | `address` | The sender address | +| `to` | `address` | @param tokenId The tokenId to transfer | +| `tokenId` | `bytes32` | The tokenId to transfer | + +
+ +### \_notifyTokenSender + +```solidity +function _notifyTokenSender(address from, bytes lsp1Data) internal nonpayable; +``` + +An attempt is made to notify the token sender about the `tokenId` changing owners using +LSP1 interface. + +
+ +### \_notifyTokenReceiver + +```solidity +function _notifyTokenReceiver( + address to, + bool allowNonLSP1Recipient, + bytes lsp1Data +) internal nonpayable; +``` + +An attempt is made to notify the token receiver about the `tokenId` changing owners +using LSP1 interface. When allowNonLSP1Recipient is FALSE the token receiver MUST support LSP1. +The receiver may revert when the token being sent is not wanted. + +
+ +### \_safeTransfer + +```solidity +function _safeTransfer( + address from, + address to, + uint256 tokenId, + bytes data +) internal nonpayable; +``` + +Transfer the `tokenId` from `from` to `to` and check if the `to` recipient address is +a contract that implements the `IERC721Received` interface and return the right magic value. +See [`_checkOnERC721Received`](#_checkonerc721received) for more infos. + +
+ +### \_setApprovalForAll + +```solidity +function _setApprovalForAll( + address tokensOwner, + address operator, + bool approved +) internal nonpayable; +``` + +Approve `operator` to operate on all tokens of `tokensOwner` + ++ +**Emitted events:** + +- [`ApprovalForAll`](#approvalforall) event. + ++ +
## Events ### Approval -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#approval) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#approval) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Event signature: `Approval(address,address,uint256)` -- Event hash: `0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925` +- Event topic hash: `0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925` ::: @@ -896,24 +1167,28 @@ Transfers ownership of the contract to a new account (`newOwner`). Can only be c event Approval(address indexed owner, address indexed operator, uint256 indexed tokenId); ``` -Emitted when the allowance of a `spender` for an `owner` is set by a call to [`approve`](#approve). `value` is the new allowance. +_ERC721 `Approval` compatible event emitted. Successfully approved operator `operator` to operate on tokenId `tokenId` on behalf of token owner `owner`._ + +ERC721 `Approval` event emitted when `owner` enables `operator` for `tokenId`. To provide compatibility with indexing ERC721 events. #### Parameters -| Name | Type | Description | -| ------------------------ | :-------: | ----------- | -| `owner` **`indexed`** | `address` | - | -| `operator` **`indexed`** | `address` | - | -| `tokenId` **`indexed`** | `uint256` | - | +| Name | Type | Description | +| ------------------------ | :-------: | ------------------------------------------ | +| `owner` **`indexed`** | `address` | The address of the owner of the `tokenId`. | +| `operator` **`indexed`** | `address` | The address set as operator. | +| `tokenId` **`indexed`** | `uint256` | The approved tokenId. | + +
### ApprovalForAll -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#approvalforall) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#approvalforall) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Event signature: `ApprovalForAll(address,address,bool)` -- Event hash: `0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31` +- Event topic hash: `0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31` ::: @@ -921,24 +1196,28 @@ Emitted when the allowance of a `spender` for an `owner` is set by a call to [`a event ApprovalForAll(address indexed owner, address indexed operator, bool approved); ``` -Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to `approved`. +_ERC721 `ApprovalForAll` compatible event emitted. Successfully set "approved for all" status to `approved` for operator `operator` for token owner `owner`._ + +ERC721 `ApprovalForAll` event emitted when an `operator` is enabled or disabled for an owner to transfer any of its tokenIds. The operator can manage all NFTs of the owner. #### Parameters -| Name | Type | Description | -| ------------------------ | :-------: | ----------- | -| `owner` **`indexed`** | `address` | - | -| `operator` **`indexed`** | `address` | - | -| `approved` | `bool` | - | +| Name | Type | Description | +| ------------------------ | :-------: | ---------------------------------------------- | +| `owner` **`indexed`** | `address` | The address of the owner of tokenIds. | +| `operator` **`indexed`** | `address` | The address set as operator. | +| `approved` | `bool` | If `operator` is approved for all NFTs or not. | + +
### AuthorizedOperator -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#authorizedoperator) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#authorizedoperator) +- 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)` -- Event hash: `0x34b797fc5a526f7bf1d2b5de25f6564fd85ae364e3ee939aee7c1ac27871a988` +- Event topic hash: `0x34b797fc5a526f7bf1d2b5de25f6564fd85ae364e3ee939aee7c1ac27871a988` ::: @@ -946,7 +1225,7 @@ Emitted when `account` grants or revokes permission to `operator` to transfer th event AuthorizedOperator(address indexed operator, address indexed tokenOwner, bytes32 indexed tokenId); ``` -Emitted when `tokenOwner` enables `operator` to transfer or burn `tokenId` on its behalf. +Emitted when `tokenOwner` enables `operator` to transfer or burn the `tokenId`. #### Parameters @@ -956,14 +1235,16 @@ Emitted when `tokenOwner` enables `operator` to transfer or burn `tokenId` on it | `tokenOwner` **`indexed`** | `address` | The owner of the `tokenId`. | | `tokenId` **`indexed`** | `bytes32` | The tokenId `operator` address has access on behalf of `tokenOwner`. | +
+ ### DataChanged -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#datachanged) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- 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 hash: `0xece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2` +- Event topic hash: `0xece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2` ::: @@ -971,25 +1252,25 @@ Emitted when `tokenOwner` enables `operator` to transfer or burn `tokenId` on it 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`. +_Emitted when data at a key is changed_ #### 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 | +| ----------------------- | :-------: | ------------------------------------ | +| `dataKey` **`indexed`** | `bytes32` | The data key which data value is set | +| `dataValue` | `bytes` | The data value to set | + +
### OwnershipTransferred -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#ownershiptransferred) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#ownershiptransferred) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Event signature: `OwnershipTransferred(address,address)` -- Event hash: `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0` +- Event topic hash: `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0` ::: @@ -1004,14 +1285,16 @@ event OwnershipTransferred(address indexed previousOwner, address indexed newOwn | `previousOwner` **`indexed`** | `address` | - | | `newOwner` **`indexed`** | `address` | - | +
+ ### RevokedOperator -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#revokedoperator) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#revokedoperator) +- 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)` -- Event hash: `0x17d5389f6ab6adb2647dfa0aa365c323d37adacc30b33a65310b6158ce1373d5` +- Event topic hash: `0x17d5389f6ab6adb2647dfa0aa365c323d37adacc30b33a65310b6158ce1373d5` ::: @@ -1023,20 +1306,22 @@ Emitted when `tokenOwner` disables `operator` to transfer or burn `tokenId` on i #### Parameters -| Name | Type | Description | -| -------------------------- | :-------: | ---------------------------------------------------- | -| `operator` **`indexed`** | `address` | The address revoked as an operator. | -| `tokenOwner` **`indexed`** | `address` | The owner of the `tokenId`. | -| `tokenId` **`indexed`** | `bytes32` | The tokenId `operator` is revoked from operating on. | +| Name | Type | Description | +| -------------------------- | :-------: | --------------------------------------------------------------- | +| `operator` **`indexed`** | `address` | The address revoked from the operator array ({getOperatorsOf}). | +| `tokenOwner` **`indexed`** | `address` | The owner of the `tokenId`. | +| `tokenId` **`indexed`** | `bytes32` | The tokenId `operator` is revoked from operating on. | + +
### Transfer -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#transfer) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#transfer) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Event signature: `Transfer(address,address,address,bytes32,bool,bytes)` -- Event hash: `0xb333c813a7426a7a11e2b190cad52c44119421594b47f6f32ace6d8c7207b2bf` +- Event topic hash: `0xb333c813a7426a7a11e2b190cad52c44119421594b47f6f32ace6d8c7207b2bf` ::: @@ -1044,6 +1329,8 @@ Emitted when `tokenOwner` disables `operator` to transfer or burn `tokenId` on i event Transfer(address operator, address indexed from, address indexed to, bytes32 indexed tokenId, bool allowNonLSP1Recipient, bytes data); ``` +_ERC721 `Transfer` compatible event emitted. Successfully transferred tokenId `tokenId` from `from` to `to`._ + Emitted when `tokenId` token is transferred from the `from` to the `to` address. #### Parameters @@ -1057,16 +1344,16 @@ Emitted when `tokenId` token is transferred from the `from` to the `to` address. | `allowNonLSP1Recipient` | `bool` | If the token transfer enforces the `to` recipient address to be a contract that implements the LSP1 standard or not. | | `data` | `bytes` | Any additional data the caller included by the caller during the transfer, and sent in the hooks to the `from` and `to` addresses. | ---- +
## Errors ### ERC725Y_DataKeysValuesEmptyArray -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#erc725y_datakeysvaluesemptyarray) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#erc725y_datakeysvaluesemptyarray) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Error signature: `ERC725Y_DataKeysValuesEmptyArray()` - Error hash: `0x97da5f95` @@ -1076,14 +1363,16 @@ Emitted when `tokenId` token is transferred from the `from` to the `to` address. error ERC725Y_DataKeysValuesEmptyArray(); ``` -Reverts when one of the array parameter provided to [`setDataBatch`](#setdatabatch) function is an empty array. +reverts when one of the array parameter provided to `setDataBatch` is an empty array + +
### ERC725Y_DataKeysValuesLengthMismatch -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#erc725y_datakeysvalueslengthmismatch) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#erc725y_datakeysvalueslengthmismatch) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Error signature: `ERC725Y_DataKeysValuesLengthMismatch()` - Error hash: `0x3bcc8979` @@ -1093,14 +1382,16 @@ Reverts when one of the array parameter provided to [`setDataBatch`](#setdatabat error ERC725Y_DataKeysValuesLengthMismatch(); ``` -Reverts when there is not the same number of elements in the `datakeys` and `dataValues` array parameters provided when calling the [`setDataBatch`](#setdatabatch) function. +reverts when there is not the same number of elements in the lists of data keys and data values when calling setDataBatch. + +
### ERC725Y_MsgValueDisallowed -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#erc725y_msgvaluedisallowed) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#erc725y_msgvaluedisallowed) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Error signature: `ERC725Y_MsgValueDisallowed()` - Error hash: `0xf36ba737` @@ -1110,14 +1401,16 @@ Reverts when there is not the same number of elements in the `datakeys` and `dat error ERC725Y_MsgValueDisallowed(); ``` -Reverts when sending value to the [`setData`](#setdata) or [`setDataBatch`](#setdatabatch) function. +reverts when sending value to the `setData(..)` functions + +
### LSP4TokenNameNotEditable -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#lsp4tokennamenoteditable) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp4tokennamenoteditable) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Error signature: `LSP4TokenNameNotEditable()` - Error hash: `0x85c169bd` @@ -1129,12 +1422,14 @@ 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. +
+ ### LSP4TokenSymbolNotEditable -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#lsp4tokensymbolnoteditable) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp4tokensymbolnoteditable) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Error signature: `LSP4TokenSymbolNotEditable()` - Error hash: `0x76755b38` @@ -1146,12 +1441,14 @@ 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. +
+ ### LSP8CannotSendToAddressZero -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#lsp8cannotsendtoaddresszero) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8cannotsendtoaddresszero) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Error signature: `LSP8CannotSendToAddressZero()` - Error hash: `0x24ecef4d` @@ -1163,12 +1460,14 @@ error LSP8CannotSendToAddressZero(); reverts when trying to send token to the zero address. +
+ ### LSP8CannotSendToSelf -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#lsp8cannotsendtoself) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8cannotsendtoself) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Error signature: `LSP8CannotSendToSelf()` - Error hash: `0x5d67d6c1` @@ -1180,12 +1479,14 @@ error LSP8CannotSendToSelf(); reverts when specifying the same address for `from` and `to` in a token transfer. +
+ ### LSP8CannotUseAddressZeroAsOperator -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#lsp8cannotuseaddresszeroasoperator) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8cannotuseaddresszeroasoperator) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Error signature: `LSP8CannotUseAddressZeroAsOperator()` - Error hash: `0x9577b8b3` @@ -1197,12 +1498,14 @@ error LSP8CannotUseAddressZeroAsOperator(); reverts when trying to set the zero address as an operator. +
+ ### LSP8InvalidTransferBatch -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#lsp8invalidtransferbatch) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8invalidtransferbatch) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Error signature: `LSP8InvalidTransferBatch()` - Error hash: `0x93a83119` @@ -1214,12 +1517,14 @@ error LSP8InvalidTransferBatch(); reverts when the parameters used for `transferBatch` have different lengths. +
+ ### LSP8NonExistentTokenId -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#lsp8nonexistenttokenid) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8nonexistenttokenid) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Error signature: `LSP8NonExistentTokenId(bytes32)` - Error hash: `0xae8f9a36` @@ -1237,12 +1542,14 @@ reverts when `tokenId` has not been minted. | --------- | :-------: | ----------- | | `tokenId` | `bytes32` | - | +
+ ### LSP8NonExistingOperator -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#lsp8nonexistingoperator) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8nonexistingoperator) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Error signature: `LSP8NonExistingOperator(address,bytes32)` - Error hash: `0x4aa31a8c` @@ -1261,12 +1568,14 @@ reverts when `operator` is not an operator for the `tokenId`. | `operator` | `address` | - | | `tokenId` | `bytes32` | - | +
+ ### LSP8NotTokenOperator -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#lsp8nottokenoperator) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8nottokenoperator) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Error signature: `LSP8NotTokenOperator(bytes32,address)` - Error hash: `0x1294d2a9` @@ -1285,12 +1594,14 @@ reverts when `caller` is not an allowed operator for `tokenId`. | `tokenId` | `bytes32` | - | | `caller` | `address` | - | +
+ ### LSP8NotTokenOwner -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#lsp8nottokenowner) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8nottokenowner) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Error signature: `LSP8NotTokenOwner(address,bytes32,address)` - Error hash: `0x5b271ea2` @@ -1310,12 +1621,14 @@ reverts when `caller` is not the `tokenOwner` of the `tokenId`. | `tokenId` | `bytes32` | - | | `caller` | `address` | - | +
+ ### LSP8NotifyTokenReceiverContractMissingLSP1Interface -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#lsp8notifytokenreceivercontractmissinglsp1interface) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8notifytokenreceivercontractmissinglsp1interface) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Error signature: `LSP8NotifyTokenReceiverContractMissingLSP1Interface(address)` - Error hash: `0x4349776d` @@ -1335,12 +1648,14 @@ reverts if the `tokenReceiver` does not implement LSP1 when minting or transferr | --------------- | :-------: | ----------- | | `tokenReceiver` | `address` | - | +
+ ### LSP8NotifyTokenReceiverIsEOA -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#lsp8notifytokenreceiveriseoa) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8notifytokenreceiveriseoa) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Error signature: `LSP8NotifyTokenReceiverIsEOA(address)` - Error hash: `0x03173137` @@ -1358,12 +1673,14 @@ reverts if the `tokenReceiver` is an EOA when minting or transferring tokens wit | --------------- | :-------: | ----------- | | `tokenReceiver` | `address` | - | +
+ ### LSP8OperatorAlreadyAuthorized -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#lsp8operatoralreadyauthorized) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8operatoralreadyauthorized) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Error signature: `LSP8OperatorAlreadyAuthorized(address,bytes32)` - Error hash: `0xa7626b68` @@ -1382,12 +1699,14 @@ reverts when `operator` is already authorized for the `tokenId`. | `operator` | `address` | - | | `tokenId` | `bytes32` | - | +
+ ### LSP8TokenOwnerCannotBeOperator -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721.md#lsp8tokenownercannotbeoperator) -- Solidity implementation in [**LSP8CompatibleERC721**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenownercannotbeoperator) +- Solidity implementation: [`LSP8CompatibleERC721.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol) - Error signature: `LSP8TokenOwnerCannotBeOperator()` - Error hash: `0x89fdad62` @@ -1399,193 +1718,4 @@ error LSP8TokenOwnerCannotBeOperator(); reverts when trying to authorize or revoke the token's owner as an operator. - - - - - - -[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/nft-2.0/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/nft-2.0/LSP7-Digital-Asset -[LSP8IdentifiableDigitalAsset]: https://docs.lukso.tech/standards/nft-2.0/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/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.md b/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.md index 527c7e76cb..f4909c7842 100644 --- a/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.md +++ b/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.md @@ -1,21 +1,32 @@ + + + # LSP8Enumerable -:::info Solidity contract +:::info Standard Specifications + +[`LSP-8-IdentifiableDigitalAsset`](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md) + +::: +:::info Solidity implementation -[`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Enumerable) +[`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol) ::: LSP8 extension that enables to enumerate over all the `tokenIds` ever minted. -## Methods +## Public Methods + +Public methods are accessible externally from users, allowing interaction with this function from dApps or other smart contracts. +When marked as 'public', a method can be called both externally and internally, on the other hand, when marked as 'external', a method can only be called externally. ### authorizeOperator -:::note Links +:::note References -- Specification details in [**LSP-8-Enumerable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Enumerable.md#authorizeoperator) -- Solidity implementation in [**LSP8Enumerable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Enumerable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#authorizeoperator) +- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol) - Function signature: `authorizeOperator(address,bytes32)` - Function selector: `0xcf5182ba` @@ -37,12 +48,14 @@ Allow an `operator` address to transfer or burn a specific `tokenId` on behalf o | `operator` | `address` | The address to authorize as an operator. | | `tokenId` | `bytes32` | The token ID operator has access to.. | +
+ ### balanceOf -:::note Links +:::note References -- Specification details in [**LSP-8-Enumerable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Enumerable.md#balanceof) -- Solidity implementation in [**LSP8Enumerable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Enumerable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#balanceof) +- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol) - Function signature: `balanceOf(address)` - Function selector: `0x70a08231` @@ -66,12 +79,14 @@ Get the number of token IDs owned by `tokenOwner`. | ---- | :-------: | ----------------------------------------------------- | | `0` | `uint256` | The total number of token IDs that `tokenOwner` owns. | +
+ ### getData -:::note Links +:::note References -- Specification details in [**LSP-8-Enumerable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Enumerable.md#getdata) -- Solidity implementation in [**LSP8Enumerable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Enumerable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#getdata) +- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol) - Function signature: `getData(bytes32)` - Function selector: `0x54f6127f` @@ -81,28 +96,28 @@ Get the number of token IDs owned by `tokenOwner`. function getData(bytes32 dataKey) external view returns (bytes dataValue); ``` -_Reading the ERC725Y storage for data key `dataKey` returned the following value: `dataValue`._ - -Get in the ERC725Y storage the bytes data stored at a specific data key `dataKey`. +_Gets singular data at a given `dataKey`_ #### Parameters -| Name | Type | Description | -| --------- | :-------: | --------------------------------------------- | -| `dataKey` | `bytes32` | The data key for which to retrieve the value. | +| Name | Type | Description | +| --------- | :-------: | ------------------------------- | +| `dataKey` | `bytes32` | The key which value to retrieve | #### Returns -| Name | Type | Description | -| ----------- | :-----: | ---------------------------------------------------- | -| `dataValue` | `bytes` | The bytes value stored under the specified data key. | +| Name | Type | Description | +| ----------- | :-----: | -------------------------- | +| `dataValue` | `bytes` | The data stored at the key | + +
### getDataBatch -:::note Links +:::note References -- Specification details in [**LSP-8-Enumerable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Enumerable.md#getdatabatch) -- Solidity implementation in [**LSP8Enumerable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Enumerable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#getdatabatch) +- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol) - Function signature: `getDataBatch(bytes32[])` - Function selector: `0xdedff9c6` @@ -114,9 +129,7 @@ function getDataBatch( ) external view returns (bytes[] dataValues); ``` -_Reading the ERC725Y storage for data keys `dataKeys` returned the following values: `dataValues`._ - -Get in the ERC725Y storage the bytes data stored at multiple data keys `dataKeys`. +_Gets array of data for multiple given keys_ #### Parameters @@ -130,12 +143,14 @@ Get in the ERC725Y storage the bytes data stored at multiple data keys `dataKeys | ------------ | :-------: | ----------------------------------------- | | `dataValues` | `bytes[]` | The array of data stored at multiple keys | +
+ ### getOperatorsOf -:::note Links +:::note References -- Specification details in [**LSP-8-Enumerable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Enumerable.md#getoperatorsof) -- Solidity implementation in [**LSP8Enumerable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Enumerable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#getoperatorsof) +- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol) - Function signature: `getOperatorsOf(bytes32)` - Function selector: `0x49a6078d` @@ -159,12 +174,14 @@ Returns all `operator` addresses that are allowed to transfer or burn a specific | ---- | :---------: | ------------------------------------------------------------------------------------------------------------ | | `0` | `address[]` | An array of operators allowed to transfer or burn a specific `tokenId`. Requirements - `tokenId` must exist. | +
+ ### isOperatorFor -:::note Links +:::note References -- Specification details in [**LSP-8-Enumerable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Enumerable.md#isoperatorfor) -- Solidity implementation in [**LSP8Enumerable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Enumerable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#isoperatorfor) +- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol) - Function signature: `isOperatorFor(address,bytes32)` - Function selector: `0x2a3654a4` @@ -192,12 +209,14 @@ Returns whether `operator` address is an operator for a given `tokenId`. | ---- | :----: | --------------------------------------------------------------------- | | `0` | `bool` | `true` if `operator` is an operator for `tokenId`, `false` otherwise. | +
+ ### owner -:::note Links +:::note References -- Specification details in [**LSP-8-Enumerable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Enumerable.md#owner) -- Solidity implementation in [**LSP8Enumerable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Enumerable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#owner) +- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol) - Function signature: `owner()` - Function selector: `0x8da5cb5b` @@ -215,12 +234,14 @@ Returns the address of the current owner. | ---- | :-------: | ----------- | | `0` | `address` | - | +
+ ### renounceOwnership -:::note Links +:::note References -- Specification details in [**LSP-8-Enumerable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Enumerable.md#renounceownership) -- Solidity implementation in [**LSP8Enumerable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Enumerable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#renounceownership) +- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol) - Function signature: `renounceOwnership()` - Function selector: `0x715018a6` @@ -232,12 +253,14 @@ function renounceOwnership() external nonpayable; Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner. +
+ ### revokeOperator -:::note Links +:::note References -- Specification details in [**LSP-8-Enumerable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Enumerable.md#revokeoperator) -- Solidity implementation in [**LSP8Enumerable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Enumerable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#revokeoperator) +- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol) - Function signature: `revokeOperator(address,bytes32)` - Function selector: `0x0b0c6d82` @@ -256,108 +279,68 @@ Remove access of `operator` for a given `tokenId`, disallowing it to transfer `t | `operator` | `address` | The address to revoke as an operator. | | `tokenId` | `bytes32` | The tokenId `operator` is revoked from operating on. | +
+ ### setData -:::note Links +:::note References -- Specification details in [**LSP-8-Enumerable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Enumerable.md#setdata) -- Solidity implementation in [**LSP8Enumerable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Enumerable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#setdata) +- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol) - Function signature: `setData(bytes32,bytes)` - Function selector: `0x7f23690c` ::: -:::caution Warning - -**Note for developers:** despite the fact that this function is set as `payable`, if the function is not intended to receive value (= native tokens), **an additional check should be implemented to ensure that `msg.value` sent was equal to 0**. - -::: - ```solidity function setData(bytes32 dataKey, bytes dataValue) external payable; ``` -_Setting the following data key value pair in the ERC725Y storage. Data key: `dataKey`, data value: `dataValue`. _ - -Sets a single bytes value `dataValue` in the ERC725Y storage for a specific data key `dataKey`. The function is marked as payable to enable flexibility on child contracts. For instance to implement a fee mechanism for setting specific data. - -- -**Requirements:** - -- SHOULD only be callable by the [`owner`](#owner). - -- -- -**Emitted events:** - -- [`DataChanged`](#datachanged) event. - -+_Sets singular data for a given `dataKey`_ #### Parameters -| Name | Type | Description | -| ----------- | :-------: | ------------------------------------------ | -| `dataKey` | `bytes32` | The data key for which to set a new value. | -| `dataValue` | `bytes` | The new bytes value to set. | +| Name | Type | Description | +| ----------- | :-------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `dataKey` | `bytes32` | The key to retrieve stored value | +| `dataValue` | `bytes` | The value to set SHOULD only be callable by the owner of the contract set via ERC173 The function is marked as payable to enable flexibility on child contracts If the function is not intended to receive value, an additional check should be implemented to check that value equal 0. Emits a {DataChanged} event. | + +
### setDataBatch -:::note Links +:::note References -- Specification details in [**LSP-8-Enumerable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Enumerable.md#setdatabatch) -- Solidity implementation in [**LSP8Enumerable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Enumerable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#setdatabatch) +- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol) - Function signature: `setDataBatch(bytes32[],bytes[])` - Function selector: `0x97902421` ::: -:::caution Warning - -**Note for developers:** despite the fact that this function is set as `payable`, if the function is not intended to receive value (= native tokens), **an additional check should be implemented to ensure that `msg.value` sent was equal to 0**. - -::: - ```solidity function setDataBatch(bytes32[] dataKeys, bytes[] dataValues) external payable; ``` -_Setting the following data key value pairs in the ERC725Y storage. Data keys: `dataKeys`, data values: `dataValues`. _ - -Batch data setting function that behaves the same as [`setData`](#setdata) but allowing to set multiple data key/value pairs in the ERC725Y storage in the same transaction. - -- -**Requirements:** - -- SHOULD only be callable by the [`owner`](#owner) of the contract. - -- -- -**Emitted events:** - -- [`DataChanged`](#datachanged) event **for each data key/value pair set**. +Sets array of data for multiple given `dataKeys` SHOULD only be callable by the owner of the contract set via ERC173 The function is marked as payable to enable flexibility on child contracts If the function is not intended to receive value, an additional check should be implemented to check that value equal -+0. Emits a [`DataChanged`](#datachanged) event. #### Parameters -| Name | Type | Description | -| ------------ | :---------: | ---------------------------------------------------- | -| `dataKeys` | `bytes32[]` | An array of data keys to set bytes values for. | -| `dataValues` | `bytes[]` | An array of bytes values to set for each `dataKeys`. | +| Name | Type | Description | +| ------------ | :---------: | ---------------------------------------- | +| `dataKeys` | `bytes32[]` | The array of data keys for values to set | +| `dataValues` | `bytes[]` | The array of values to set | + +
### supportsInterface -:::note Links +:::note References -- Specification details in [**LSP-8-Enumerable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Enumerable.md#supportsinterface) -- Solidity implementation in [**LSP8Enumerable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Enumerable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#supportsinterface) +- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol) - Function signature: `supportsInterface(bytes4)` - Function selector: `0x01ffc9a7` @@ -381,12 +364,14 @@ Returns true if this contract implements the interface defined by `interfaceId`. | ---- | :----: | ----------- | | `0` | `bool` | - | +
+ ### tokenAt -:::note Links +:::note References -- Specification details in [**LSP-8-Enumerable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Enumerable.md#tokenat) -- Solidity implementation in [**LSP8Enumerable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Enumerable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#tokenat) +- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol) - Function signature: `tokenAt(uint256)` - Function selector: `0x92a91a3a` @@ -396,6 +381,8 @@ Returns true if this contract implements the interface defined by `interfaceId`. function tokenAt(uint256 index) external view returns (bytes32); ``` +_Retrieving the `tokenId` for `msg.sender` located in its list at index number `index`._ + Returns a token id at index. See [`totalSupply`](#totalsupply) to get total number of minted tokens. #### Parameters @@ -410,12 +397,14 @@ Returns a token id at index. See [`totalSupply`](#totalsupply) to get total numb | ---- | :-------: | ------------------------------------------------------- | | `0` | `bytes32` | TokenId or `bytes32(0)` if no tokenId exist at `index`. | +
+ ### tokenIdsOf -:::note Links +:::note References -- Specification details in [**LSP-8-Enumerable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Enumerable.md#tokenidsof) -- Solidity implementation in [**LSP8Enumerable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Enumerable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#tokenidsof) +- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol) - Function signature: `tokenIdsOf(address)` - Function selector: `0xa3b261f2` @@ -439,12 +428,14 @@ Returns the list of token IDs that the `tokenOwner` address owns. | ---- | :---------: | ------------------------------------------------------- | | `0` | `bytes32[]` | An array of `bytes32[] tokenIds` owned by `tokenOwner`. | +
+ ### tokenOwnerOf -:::note Links +:::note References -- Specification details in [**LSP-8-Enumerable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Enumerable.md#tokenownerof) -- Solidity implementation in [**LSP8Enumerable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Enumerable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#tokenownerof) +- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol) - Function signature: `tokenOwnerOf(bytes32)` - Function selector: `0x217b2270` @@ -468,12 +459,14 @@ Returns the list of `tokenIds` for the `tokenOwner` address. | ---- | :-------: | ----------------------------------------- | | `0` | `address` | The owner address of the given `tokenId`. | +
+ ### totalSupply -:::note Links +:::note References -- Specification details in [**LSP-8-Enumerable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Enumerable.md#totalsupply) -- Solidity implementation in [**LSP8Enumerable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Enumerable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#totalsupply) +- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol) - Function signature: `totalSupply()` - Function selector: `0x18160ddd` @@ -491,12 +484,14 @@ Returns the number of existing tokens that have been minted in this contract. | ---- | :-------: | ------------------------------ | | `0` | `uint256` | The number of existing tokens. | +
+ ### transfer -:::note Links +:::note References -- Specification details in [**LSP-8-Enumerable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Enumerable.md#transfer) -- Solidity implementation in [**LSP8Enumerable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Enumerable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#transfer) +- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol) - Function signature: `transfer(address,address,bytes32,bool,bytes)` - Function selector: `0x511b6952` @@ -524,12 +519,14 @@ Transfer a given `tokenId` token from the `from` address to the `to` address. If | `allowNonLSP1Recipient` | `bool` | When set to `true`, the `to` address CAN be any addres. When set to `false`, the `to` address MUST be a contract that supports the LSP1 UniversalReceiver standard. | | `data` | `bytes` | Any additional data the caller wants included in the emitted event, and sent in the hooks of the `from` and `to` addresses. | +
+ ### transferBatch -:::note Links +:::note References -- Specification details in [**LSP-8-Enumerable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Enumerable.md#transferbatch) -- Solidity implementation in [**LSP8Enumerable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Enumerable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#transferbatch) +- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol) - Function signature: `transferBatch(address[],address[],bytes32[],bool[],bytes[])` - Function selector: `0x7e87632c` @@ -557,12 +554,14 @@ Transfers multiple tokens at once based on the arrays of `from`, `to` and `token | `allowNonLSP1Recipient` | `bool[]` | When set to `true`, `to` may be any address. When set to `false`, `to` must be a contract that supports the LSP1 standard and not revert. | | `data` | `bytes[]` | Any additional data the caller wants included in the emitted event, and sent in the hooks to the `from` and `to` addresses. | +
+ ### transferOwnership -:::note Links +:::note References -- Specification details in [**LSP-8-Enumerable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Enumerable.md#transferownership) -- Solidity implementation in [**LSP8Enumerable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Enumerable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#transferownership) +- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol) - Function signature: `transferOwnership(address)` - Function selector: `0xf2fde38b` @@ -580,18 +579,296 @@ Transfers ownership of the contract to a new account (`newOwner`). Can only be c | ---------- | :-------: | ----------- | | `newOwner` | `address` | - | ---- +
+ +## Internal Methods + +Any method labeled as `internal` serves as utility function within the contract. They can be used when writing solidity contracts that inherit from this contract. These methods can be extended or modified by overriding their internal behavior to suit specific needs. + +Internal functions cannot be called externally, whether from other smart contracts, dApp interfaces, or backend services. Their restricted accessibility ensures that they remain exclusively available within the context of the current contract, promoting controlled and encapsulated usage of these internal utilities. + +### \_checkOwner + +```solidity +function _checkOwner() internal view; +``` + +Throws if the sender is not the owner. + +
+ +### \_setOwner + +```solidity +function _setOwner(address newOwner) internal nonpayable; +``` + +Changes the owner if `newOwner` and oldOwner are different +This pattern is useful in inheritance. + +
+ +### \_getData + +```solidity +function _getData(bytes32 dataKey) internal view returns (bytes dataValue); +``` + +
+ +### \_setData + +```solidity +function _setData(bytes32 dataKey, bytes dataValue) internal nonpayable; +``` + +Save gas by emitting the [`DataChanged`](#datachanged) event with only the first 256 bytes of dataValue + +
+ +### \_isOperatorOrOwner + +```solidity +function _isOperatorOrOwner( + address caller, + bytes32 tokenId +) internal view returns (bool); +``` + +verifies if the `caller` is operator or owner for the `tokenId` + +#### Returns + +| Name | Type | Description | +| ---- | :----: | -------------------------------------------- | +| `0` | `bool` | true if `caller` is either operator or owner | + +
+ +### \_revokeOperator + +```solidity +function _revokeOperator( + address operator, + address tokenOwner, + bytes32 tokenId +) internal nonpayable; +``` + +removes `operator` from the list of operators for the `tokenId` + +
+ +### \_clearOperators + +```solidity +function _clearOperators( + address tokenOwner, + bytes32 tokenId +) internal nonpayable; +``` + +revoke all the current operators for a specific `tokenId` token which belongs to `tokenOwner`. + +#### Parameters + +| Name | Type | Description | +| ------------ | :-------: | ------------------------------------------------- | +| `tokenOwner` | `address` | The address that is the owner of the `tokenId`. | +| `tokenId` | `bytes32` | The token to remove the associated operators for. | + +
+ +### \_exists + +```solidity +function _exists(bytes32 tokenId) internal view returns (bool); +``` + +Returns whether `tokenId` exists. +Tokens start existing when they are minted ([`_mint`](#_mint)), and stop existing when they are burned ([`_burn`](#_burn)). + +
+ +### \_existsOrError + +```solidity +function _existsOrError(bytes32 tokenId) internal view; +``` + +When `tokenId` does not exist then revert with an error. + +
+ +### \_mint + +```solidity +function _mint( + address to, + bytes32 tokenId, + bool allowNonLSP1Recipient, + bytes data +) internal nonpayable; +``` + +Create `tokenId` by minting it and transfers it to `to`. + ++ +**Emitted events:** + +- [`Transfer`](#transfer) event with `address(0)` as `from` address. + ++ +#### Parameters + +| Name | Type | Description | +| ----------------------- | :-------: | -------------------------------------------------------------------------------------------------------------------------- | +| `to` | `address` | @param tokenId The token ID to create (= mint). | +| `tokenId` | `bytes32` | The token ID to create (= mint). | +| `allowNonLSP1Recipient` | `bool` | When set to `true`, `to` may be any address. When set to `false`, `to` must be a contract that supports the LSP1 standard. | +| `data` | `bytes` | Any additional data the caller wants included in the emitted event, and sent in the hook of the `to` address. | + +
+ +### \_burn + +:::tip Hint + +In dApps, you can know which addresses are burning tokens by listening for the `Transfer` event and filter with the zero address as `to`. + +::: + +```solidity +function _burn(bytes32 tokenId, bytes data) internal nonpayable; +``` + +Burn a specific `tokenId`, removing the `tokenId` from the [`tokenIdsOf`](#tokenidsof) the caller and decreasing its [`balanceOf`](#balanceof) by -1. +This will also clear all the operators allowed to transfer the `tokenId`. +The owner of the `tokenId` will be notified about the `tokenId` being transferred through its LSP1 [`universalReceiver`](#universalreceiver) +function, if it is a contract that supports the LSP1 interface. Its [`universalReceiver`](#universalreceiver) function will receive +all the parameters in the calldata packed encoded. +Any logic in the [`_beforeTokenTransfer`](#_beforetokentransfer) function will run before burning `tokenId` and updating the balances. + ++ +**Emitted events:** + +- [`Transfer`](#transfer) event with `address(0)` as the `to` address. + ++ +#### Parameters + +| Name | Type | Description | +| --------- | :-------: | --------------------------------------------------------------------------------------------------------------------------- | +| `tokenId` | `bytes32` | The token to burn. | +| `data` | `bytes` | Any additional data the caller wants included in the emitted event, and sent in the LSP1 hook on the token owner's address. | + +
+ +### \_transfer + +:::danger + +This internal function does not check if the sender is authorized or not to operate on the `tokenId`. + +::: + +```solidity +function _transfer( + address from, + address to, + bytes32 tokenId, + bool allowNonLSP1Recipient, + bytes data +) internal nonpayable; +``` + +Change the owner of the `tokenId` from `from` to `to`. +Both the sender and recipient will be notified of the `tokenId` being transferred through their LSP1 [`universalReceiver`](#universalreceiver) +function, if they are contracts that support the LSP1 interface. Their `universalReceiver` function will receive +all the parameters in the calldata packed encoded. +Any logic in the [`_beforeTokenTransfer`](#_beforetokentransfer) function will run before changing the owner of `tokenId`. + ++ +**Emitted events:** + +- [`Transfer`](#transfer) event. + ++ +#### Parameters + +| Name | Type | Description | +| ----------------------- | :-------: | -------------------------------------------------------------------------------------------------------------------------- | +| `from` | `address` | The sender address. | +| `to` | `address` | @param tokenId The token to transfer. | +| `tokenId` | `bytes32` | The token to transfer. | +| `allowNonLSP1Recipient` | `bool` | When set to `true`, `to` may be any address. When set to `false`, `to` must be a contract that supports the LSP1 standard. | +| `data` | `bytes` | Additional data the caller wants included in the emitted event, and sent in the hooks to `from` and `to` addresses. | + +
+ +### \_beforeTokenTransfer + +```solidity +function _beforeTokenTransfer( + address from, + address to, + bytes32 tokenId +) internal nonpayable; +``` + +#### Parameters + +| Name | Type | Description | +| --------- | :-------: | -------------------------------------------------------------------------------- | +| `from` | `address` | The address sending the `tokenId` (`address(0)` when `tokenId` is being minted). | +| `to` | `address` | @param tokenId The bytes32 identifier of the token being transferred. | +| `tokenId` | `bytes32` | The bytes32 identifier of the token being transferred. | + +
+ +### \_notifyTokenSender + +```solidity +function _notifyTokenSender(address from, bytes lsp1Data) internal nonpayable; +``` + +An attempt is made to notify the token sender about the `tokenId` changing owners using +LSP1 interface. + +
+ +### \_notifyTokenReceiver + +```solidity +function _notifyTokenReceiver( + address to, + bool allowNonLSP1Recipient, + bytes lsp1Data +) internal nonpayable; +``` + +An attempt is made to notify the token receiver about the `tokenId` changing owners +using LSP1 interface. When allowNonLSP1Recipient is FALSE the token receiver MUST support LSP1. +The receiver may revert when the token being sent is not wanted. + +
## Events ### AuthorizedOperator -:::note Links +:::note References -- Specification details in [**LSP-8-Enumerable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Enumerable.md#authorizedoperator) -- Solidity implementation in [**LSP8Enumerable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Enumerable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#authorizedoperator) +- 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)` -- Event hash: `0x34b797fc5a526f7bf1d2b5de25f6564fd85ae364e3ee939aee7c1ac27871a988` +- Event topic hash: `0x34b797fc5a526f7bf1d2b5de25f6564fd85ae364e3ee939aee7c1ac27871a988` ::: @@ -599,7 +876,7 @@ Transfers ownership of the contract to a new account (`newOwner`). Can only be c event AuthorizedOperator(address indexed operator, address indexed tokenOwner, bytes32 indexed tokenId); ``` -Emitted when `tokenOwner` enables `operator` to transfer or burn `tokenId` on its behalf. +Emitted when `tokenOwner` enables `operator` to transfer or burn the `tokenId`. #### Parameters @@ -609,14 +886,16 @@ Emitted when `tokenOwner` enables `operator` to transfer or burn `tokenId` on it | `tokenOwner` **`indexed`** | `address` | The owner of the `tokenId`. | | `tokenId` **`indexed`** | `bytes32` | The tokenId `operator` address has access on behalf of `tokenOwner`. | +
+ ### DataChanged -:::note Links +:::note References -- Specification details in [**LSP-8-Enumerable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Enumerable.md#datachanged) -- Solidity implementation in [**LSP8Enumerable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Enumerable) +- 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 hash: `0xece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2` +- Event topic hash: `0xece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2` ::: @@ -624,25 +903,25 @@ Emitted when `tokenOwner` enables `operator` to transfer or burn `tokenId` on it 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`. +_Emitted when data at a key is changed_ #### 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 | +| ----------------------- | :-------: | ------------------------------------ | +| `dataKey` **`indexed`** | `bytes32` | The data key which data value is set | +| `dataValue` | `bytes` | The data value to set | + +
### OwnershipTransferred -:::note Links +:::note References -- Specification details in [**LSP-8-Enumerable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Enumerable.md#ownershiptransferred) -- Solidity implementation in [**LSP8Enumerable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Enumerable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#ownershiptransferred) +- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol) - Event signature: `OwnershipTransferred(address,address)` -- Event hash: `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0` +- Event topic hash: `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0` ::: @@ -657,14 +936,16 @@ event OwnershipTransferred(address indexed previousOwner, address indexed newOwn | `previousOwner` **`indexed`** | `address` | - | | `newOwner` **`indexed`** | `address` | - | +
+ ### RevokedOperator -:::note Links +:::note References -- Specification details in [**LSP-8-Enumerable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Enumerable.md#revokedoperator) -- Solidity implementation in [**LSP8Enumerable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Enumerable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#revokedoperator) +- 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)` -- Event hash: `0x17d5389f6ab6adb2647dfa0aa365c323d37adacc30b33a65310b6158ce1373d5` +- Event topic hash: `0x17d5389f6ab6adb2647dfa0aa365c323d37adacc30b33a65310b6158ce1373d5` ::: @@ -676,20 +957,22 @@ Emitted when `tokenOwner` disables `operator` to transfer or burn `tokenId` on i #### Parameters -| Name | Type | Description | -| -------------------------- | :-------: | ---------------------------------------------------- | -| `operator` **`indexed`** | `address` | The address revoked as an operator. | -| `tokenOwner` **`indexed`** | `address` | The owner of the `tokenId`. | -| `tokenId` **`indexed`** | `bytes32` | The tokenId `operator` is revoked from operating on. | +| Name | Type | Description | +| -------------------------- | :-------: | --------------------------------------------------------------- | +| `operator` **`indexed`** | `address` | The address revoked from the operator array ({getOperatorsOf}). | +| `tokenOwner` **`indexed`** | `address` | The owner of the `tokenId`. | +| `tokenId` **`indexed`** | `bytes32` | The tokenId `operator` is revoked from operating on. | + +
### Transfer -:::note Links +:::note References -- Specification details in [**LSP-8-Enumerable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Enumerable.md#transfer) -- Solidity implementation in [**LSP8Enumerable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Enumerable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#transfer) +- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol) - Event signature: `Transfer(address,address,address,bytes32,bool,bytes)` -- Event hash: `0xb333c813a7426a7a11e2b190cad52c44119421594b47f6f32ace6d8c7207b2bf` +- Event topic hash: `0xb333c813a7426a7a11e2b190cad52c44119421594b47f6f32ace6d8c7207b2bf` ::: @@ -710,16 +993,16 @@ Emitted when `tokenId` token is transferred from the `from` to the `to` address. | `allowNonLSP1Recipient` | `bool` | If the token transfer enforces the `to` recipient address to be a contract that implements the LSP1 standard or not. | | `data` | `bytes` | Any additional data the caller included by the caller during the transfer, and sent in the hooks to the `from` and `to` addresses. | ---- +
## Errors ### ERC725Y_DataKeysValuesEmptyArray -:::note Links +:::note References -- Specification details in [**LSP-8-Enumerable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Enumerable.md#erc725y_datakeysvaluesemptyarray) -- Solidity implementation in [**LSP8Enumerable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Enumerable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#erc725y_datakeysvaluesemptyarray) +- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol) - Error signature: `ERC725Y_DataKeysValuesEmptyArray()` - Error hash: `0x97da5f95` @@ -729,14 +1012,16 @@ Emitted when `tokenId` token is transferred from the `from` to the `to` address. error ERC725Y_DataKeysValuesEmptyArray(); ``` -Reverts when one of the array parameter provided to [`setDataBatch`](#setdatabatch) function is an empty array. +reverts when one of the array parameter provided to `setDataBatch` is an empty array + +
### ERC725Y_DataKeysValuesLengthMismatch -:::note Links +:::note References -- Specification details in [**LSP-8-Enumerable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Enumerable.md#erc725y_datakeysvalueslengthmismatch) -- Solidity implementation in [**LSP8Enumerable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Enumerable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#erc725y_datakeysvalueslengthmismatch) +- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol) - Error signature: `ERC725Y_DataKeysValuesLengthMismatch()` - Error hash: `0x3bcc8979` @@ -746,14 +1031,16 @@ Reverts when one of the array parameter provided to [`setDataBatch`](#setdatabat error ERC725Y_DataKeysValuesLengthMismatch(); ``` -Reverts when there is not the same number of elements in the `datakeys` and `dataValues` array parameters provided when calling the [`setDataBatch`](#setdatabatch) function. +reverts when there is not the same number of elements in the lists of data keys and data values when calling setDataBatch. + +
### ERC725Y_MsgValueDisallowed -:::note Links +:::note References -- Specification details in [**LSP-8-Enumerable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Enumerable.md#erc725y_msgvaluedisallowed) -- Solidity implementation in [**LSP8Enumerable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Enumerable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#erc725y_msgvaluedisallowed) +- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol) - Error signature: `ERC725Y_MsgValueDisallowed()` - Error hash: `0xf36ba737` @@ -763,14 +1050,16 @@ Reverts when there is not the same number of elements in the `datakeys` and `dat error ERC725Y_MsgValueDisallowed(); ``` -Reverts when sending value to the [`setData`](#setdata) or [`setDataBatch`](#setdatabatch) function. +reverts when sending value to the `setData(..)` functions + +
### LSP4TokenNameNotEditable -:::note Links +:::note References -- Specification details in [**LSP-8-Enumerable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Enumerable.md#lsp4tokennamenoteditable) -- Solidity implementation in [**LSP8Enumerable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Enumerable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp4tokennamenoteditable) +- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol) - Error signature: `LSP4TokenNameNotEditable()` - Error hash: `0x85c169bd` @@ -782,12 +1071,14 @@ 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. +
+ ### LSP4TokenSymbolNotEditable -:::note Links +:::note References -- Specification details in [**LSP-8-Enumerable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Enumerable.md#lsp4tokensymbolnoteditable) -- Solidity implementation in [**LSP8Enumerable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Enumerable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp4tokensymbolnoteditable) +- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol) - Error signature: `LSP4TokenSymbolNotEditable()` - Error hash: `0x76755b38` @@ -799,12 +1090,14 @@ 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. +
+ ### LSP8CannotSendToAddressZero -:::note Links +:::note References -- Specification details in [**LSP-8-Enumerable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Enumerable.md#lsp8cannotsendtoaddresszero) -- Solidity implementation in [**LSP8Enumerable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Enumerable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8cannotsendtoaddresszero) +- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol) - Error signature: `LSP8CannotSendToAddressZero()` - Error hash: `0x24ecef4d` @@ -816,12 +1109,14 @@ error LSP8CannotSendToAddressZero(); reverts when trying to send token to the zero address. +
+ ### LSP8CannotSendToSelf -:::note Links +:::note References -- Specification details in [**LSP-8-Enumerable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Enumerable.md#lsp8cannotsendtoself) -- Solidity implementation in [**LSP8Enumerable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Enumerable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8cannotsendtoself) +- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol) - Error signature: `LSP8CannotSendToSelf()` - Error hash: `0x5d67d6c1` @@ -833,12 +1128,14 @@ error LSP8CannotSendToSelf(); reverts when specifying the same address for `from` and `to` in a token transfer. +
+ ### LSP8CannotUseAddressZeroAsOperator -:::note Links +:::note References -- Specification details in [**LSP-8-Enumerable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Enumerable.md#lsp8cannotuseaddresszeroasoperator) -- Solidity implementation in [**LSP8Enumerable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Enumerable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8cannotuseaddresszeroasoperator) +- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol) - Error signature: `LSP8CannotUseAddressZeroAsOperator()` - Error hash: `0x9577b8b3` @@ -850,12 +1147,14 @@ error LSP8CannotUseAddressZeroAsOperator(); reverts when trying to set the zero address as an operator. +
+ ### LSP8InvalidTransferBatch -:::note Links +:::note References -- Specification details in [**LSP-8-Enumerable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Enumerable.md#lsp8invalidtransferbatch) -- Solidity implementation in [**LSP8Enumerable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Enumerable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8invalidtransferbatch) +- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol) - Error signature: `LSP8InvalidTransferBatch()` - Error hash: `0x93a83119` @@ -867,12 +1166,14 @@ error LSP8InvalidTransferBatch(); reverts when the parameters used for `transferBatch` have different lengths. +
+ ### LSP8NonExistentTokenId -:::note Links +:::note References -- Specification details in [**LSP-8-Enumerable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Enumerable.md#lsp8nonexistenttokenid) -- Solidity implementation in [**LSP8Enumerable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Enumerable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8nonexistenttokenid) +- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol) - Error signature: `LSP8NonExistentTokenId(bytes32)` - Error hash: `0xae8f9a36` @@ -890,12 +1191,14 @@ reverts when `tokenId` has not been minted. | --------- | :-------: | ----------- | | `tokenId` | `bytes32` | - | +
+ ### LSP8NonExistingOperator -:::note Links +:::note References -- Specification details in [**LSP-8-Enumerable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Enumerable.md#lsp8nonexistingoperator) -- Solidity implementation in [**LSP8Enumerable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Enumerable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8nonexistingoperator) +- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol) - Error signature: `LSP8NonExistingOperator(address,bytes32)` - Error hash: `0x4aa31a8c` @@ -914,12 +1217,14 @@ reverts when `operator` is not an operator for the `tokenId`. | `operator` | `address` | - | | `tokenId` | `bytes32` | - | +
+ ### LSP8NotTokenOperator -:::note Links +:::note References -- Specification details in [**LSP-8-Enumerable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Enumerable.md#lsp8nottokenoperator) -- Solidity implementation in [**LSP8Enumerable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Enumerable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8nottokenoperator) +- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol) - Error signature: `LSP8NotTokenOperator(bytes32,address)` - Error hash: `0x1294d2a9` @@ -938,12 +1243,14 @@ reverts when `caller` is not an allowed operator for `tokenId`. | `tokenId` | `bytes32` | - | | `caller` | `address` | - | +
+ ### LSP8NotTokenOwner -:::note Links +:::note References -- Specification details in [**LSP-8-Enumerable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Enumerable.md#lsp8nottokenowner) -- Solidity implementation in [**LSP8Enumerable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Enumerable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8nottokenowner) +- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol) - Error signature: `LSP8NotTokenOwner(address,bytes32,address)` - Error hash: `0x5b271ea2` @@ -963,12 +1270,14 @@ reverts when `caller` is not the `tokenOwner` of the `tokenId`. | `tokenId` | `bytes32` | - | | `caller` | `address` | - | +
+ ### LSP8NotifyTokenReceiverContractMissingLSP1Interface -:::note Links +:::note References -- Specification details in [**LSP-8-Enumerable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Enumerable.md#lsp8notifytokenreceivercontractmissinglsp1interface) -- Solidity implementation in [**LSP8Enumerable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Enumerable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8notifytokenreceivercontractmissinglsp1interface) +- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol) - Error signature: `LSP8NotifyTokenReceiverContractMissingLSP1Interface(address)` - Error hash: `0x4349776d` @@ -988,12 +1297,14 @@ reverts if the `tokenReceiver` does not implement LSP1 when minting or transferr | --------------- | :-------: | ----------- | | `tokenReceiver` | `address` | - | +
+ ### LSP8NotifyTokenReceiverIsEOA -:::note Links +:::note References -- Specification details in [**LSP-8-Enumerable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Enumerable.md#lsp8notifytokenreceiveriseoa) -- Solidity implementation in [**LSP8Enumerable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Enumerable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8notifytokenreceiveriseoa) +- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol) - Error signature: `LSP8NotifyTokenReceiverIsEOA(address)` - Error hash: `0x03173137` @@ -1011,12 +1322,14 @@ reverts if the `tokenReceiver` is an EOA when minting or transferring tokens wit | --------------- | :-------: | ----------- | | `tokenReceiver` | `address` | - | +
+ ### LSP8OperatorAlreadyAuthorized -:::note Links +:::note References -- Specification details in [**LSP-8-Enumerable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Enumerable.md#lsp8operatoralreadyauthorized) -- Solidity implementation in [**LSP8Enumerable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Enumerable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8operatoralreadyauthorized) +- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol) - Error signature: `LSP8OperatorAlreadyAuthorized(address,bytes32)` - Error hash: `0xa7626b68` @@ -1035,12 +1348,14 @@ reverts when `operator` is already authorized for the `tokenId`. | `operator` | `address` | - | | `tokenId` | `bytes32` | - | +
+ ### LSP8TokenOwnerCannotBeOperator -:::note Links +:::note References -- Specification details in [**LSP-8-Enumerable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Enumerable.md#lsp8tokenownercannotbeoperator) -- Solidity implementation in [**LSP8Enumerable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Enumerable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenownercannotbeoperator) +- Solidity implementation: [`LSP8Enumerable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol) - Error signature: `LSP8TokenOwnerCannotBeOperator()` - Error hash: `0x89fdad62` @@ -1052,193 +1367,4 @@ error LSP8TokenOwnerCannotBeOperator(); reverts when trying to authorize or revoke the token's owner as an operator. - - - - - - -[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/nft-2.0/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/nft-2.0/LSP7-Digital-Asset -[LSP8IdentifiableDigitalAsset]: https://docs.lukso.tech/standards/nft-2.0/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/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.md b/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.md index 9c4812eb42..48128ab876 100644 --- a/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.md +++ b/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.md @@ -1,21 +1,32 @@ + + + # LSP8CompatibleERC721Mintable -:::info Solidity contract +:::info Standard Specifications + +[`LSP-8-IdentifiableDigitalAsset`](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md) + +::: +:::info Solidity implementation -[`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +[`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) ::: > LSP8CompatibleERC721Mintable deployable preset contract with a public {mint} function callable only by the contract {owner}. -## Methods +## Public Methods + +Public methods are accessible externally from users, allowing interaction with this function from dApps or other smart contracts. +When marked as 'public', a method can be called both externally and internally, on the other hand, when marked as 'external', a method can only be called externally. ### constructor -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#constructor) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#constructor) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) ::: @@ -23,7 +34,7 @@ constructor(string name_, string symbol_, address newOwner_); ``` -_Deploying a `LSP8CompatibleERC721Mintable` token contract with: token name = `name\_`, token symbol = `symbol\_`, and address `newOwner\_` as the token contract owner._ +_Deploying a `LSP8CompatibleERC721Mintable` token contract with: token name = `name_`, token symbol = `symbol_`, and address `newOwner_` as the token contract owner._ #### Parameters @@ -33,12 +44,14 @@ _Deploying a `LSP8CompatibleERC721Mintable` token contract with: token name = `n | `symbol_` | `string` | The symbol of the token. | | `newOwner_` | `address` | The owner of the token contract. | +
+ ### approve -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#approve) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#approve) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Function signature: `approve(address,uint256)` - Function selector: `0x095ea7b3` @@ -48,21 +61,25 @@ _Deploying a `LSP8CompatibleERC721Mintable` token contract with: token name = `n function approve(address operator, uint256 tokenId) external nonpayable; ``` -Compatible with ERC721 approve. +_Calling `approve` function on `ILSP8CompatibleERC721` contract. Approving operator at address `operator` to transfer tokenId `tokenId` on behalf of its owner._ + +Approval function compatible with ERC721 `approve(address,uint256)`. #### Parameters -| Name | Type | Description | -| ---------- | :-------: | ------------------------------------ | -| `operator` | `address` | The address to approve for `tokenId` | -| `tokenId` | `uint256` | The tokenId to approve | +| Name | Type | Description | +| ---------- | :-------: | ------------------------------------- | +| `operator` | `address` | The address to approve for `tokenId`. | +| `tokenId` | `uint256` | The tokenId to approve. | + +
### authorizeOperator -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#authorizeoperator) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#authorizeoperator) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Function signature: `authorizeOperator(address,bytes32)` - Function selector: `0xcf5182ba` @@ -93,12 +110,14 @@ Allow an `operator` address to transfer or burn a specific `tokenId` on behalf o | `operator` | `address` | The address to authorize as an operator. | | `tokenId` | `bytes32` | The token ID operator has access to.. | +
+ ### balanceOf -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#balanceof) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#balanceof) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Function signature: `balanceOf(address)` - Function selector: `0x70a08231` @@ -122,12 +141,14 @@ Get the number of token IDs owned by `tokenOwner`. | ---- | :-------: | ----------------------------------------------------- | | `0` | `uint256` | The total number of token IDs that `tokenOwner` owns. | +
+ ### getApproved -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#getapproved) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#getapproved) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Function signature: `getApproved(uint256)` - Function selector: `0x081812fc` @@ -137,26 +158,30 @@ Get the number of token IDs owned by `tokenOwner`. function getApproved(uint256 tokenId) external view returns (address); ``` +_Retrieving the address other than the token owner that is approved to transfer tokenId `tokenId` on behalf of its owner._ + Compatible with ERC721 getApproved. #### Parameters -| Name | Type | Description | -| --------- | :-------: | -------------------- | -| `tokenId` | `uint256` | The tokenId to query | +| Name | Type | Description | +| --------- | :-------: | --------------------- | +| `tokenId` | `uint256` | The tokenId to query. | #### Returns -| Name | Type | Description | -| ---- | :-------: | ----------------------------------------- | -| `0` | `address` | The address of the operator for `tokenId` | +| Name | Type | Description | +| ---- | :-------: | ------------------------------------------ | +| `0` | `address` | The address of the operator for `tokenId`. | + +
### getData -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#getdata) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#getdata) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Function signature: `getData(bytes32)` - Function selector: `0x54f6127f` @@ -166,28 +191,28 @@ Compatible with ERC721 getApproved. function getData(bytes32 dataKey) external view returns (bytes dataValue); ``` -_Reading the ERC725Y storage for data key `dataKey` returned the following value: `dataValue`._ - -Get in the ERC725Y storage the bytes data stored at a specific data key `dataKey`. +_Gets singular data at a given `dataKey`_ #### Parameters -| Name | Type | Description | -| --------- | :-------: | --------------------------------------------- | -| `dataKey` | `bytes32` | The data key for which to retrieve the value. | +| Name | Type | Description | +| --------- | :-------: | ------------------------------- | +| `dataKey` | `bytes32` | The key which value to retrieve | #### Returns -| Name | Type | Description | -| ----------- | :-----: | ---------------------------------------------------- | -| `dataValue` | `bytes` | The bytes value stored under the specified data key. | +| Name | Type | Description | +| ----------- | :-----: | -------------------------- | +| `dataValue` | `bytes` | The data stored at the key | + +
### getDataBatch -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#getdatabatch) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#getdatabatch) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Function signature: `getDataBatch(bytes32[])` - Function selector: `0xdedff9c6` @@ -199,9 +224,7 @@ function getDataBatch( ) external view returns (bytes[] dataValues); ``` -_Reading the ERC725Y storage for data keys `dataKeys` returned the following values: `dataValues`._ - -Get in the ERC725Y storage the bytes data stored at multiple data keys `dataKeys`. +_Gets array of data for multiple given keys_ #### Parameters @@ -215,12 +238,14 @@ Get in the ERC725Y storage the bytes data stored at multiple data keys `dataKeys | ------------ | :-------: | ----------------------------------------- | | `dataValues` | `bytes[]` | The array of data stored at multiple keys | +
+ ### getOperatorsOf -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#getoperatorsof) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#getoperatorsof) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Function signature: `getOperatorsOf(bytes32)` - Function selector: `0x49a6078d` @@ -244,12 +269,14 @@ Returns all `operator` addresses that are allowed to transfer or burn a specific | ---- | :---------: | ------------------------------------------------------------------------------------------------------------ | | `0` | `address[]` | An array of operators allowed to transfer or burn a specific `tokenId`. Requirements - `tokenId` must exist. | +
+ ### isApprovedForAll -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#isapprovedforall) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#isapprovedforall) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Function signature: `isApprovedForAll(address,address)` - Function selector: `0xe985e9c5` @@ -275,12 +302,14 @@ function isApprovedForAll( | ---- | :----: | ----------- | | `0` | `bool` | - | +
+ ### isOperatorFor -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#isoperatorfor) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#isoperatorfor) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Function signature: `isOperatorFor(address,bytes32)` - Function selector: `0x2a3654a4` @@ -308,12 +337,14 @@ Returns whether `operator` address is an operator for a given `tokenId`. | ---- | :----: | --------------------------------------------------------------------- | | `0` | `bool` | `true` if `operator` is an operator for `tokenId`, `false` otherwise. | +
+ ### mint -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#mint) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#mint) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Function signature: `mint(address,bytes32,bool,bytes)` - Function selector: `0xaf255b61` @@ -328,23 +359,27 @@ function mint( ) external nonpayable; ``` +_Minting tokenId `tokenId` for address `to` with the additional data `data` (Note: allow non-LSP1 recipient is set to `allowNonLSP1Recipient`)._ + Public [`_mint`](#_mint) function only callable by the [`owner`](#owner). #### Parameters -| Name | Type | Description | -| ----------------------- | :-------: | ----------- | -| `to` | `address` | - | -| `tokenId` | `bytes32` | - | -| `allowNonLSP1Recipient` | `bool` | - | -| `data` | `bytes` | - | +| Name | Type | Description | +| ----------------------- | :-------: | ------------------------------------------------------------------------------------------------------------------------------ | +| `to` | `address` | The address that will receive the minted `tokenId`. | +| `tokenId` | `bytes32` | The tokenId to mint. | +| `allowNonLSP1Recipient` | `bool` | Set to `false` to ensure that you are minting for a recipient that implements LSP1, `false` otherwise for forcing the minting. | +| `data` | `bytes` | Any addition data to be sent alongside the minting. | + +
### name -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#name) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#name) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Function signature: `name()` - Function selector: `0x06fdde03` @@ -362,12 +397,14 @@ Returns the name of the token. | ---- | :------: | --------------------- | | `0` | `string` | The name of the token | +
+ ### owner -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#owner) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#owner) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Function signature: `owner()` - Function selector: `0x8da5cb5b` @@ -385,12 +422,14 @@ Returns the address of the current owner. | ---- | :-------: | ----------- | | `0` | `address` | - | +
+ ### ownerOf -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#ownerof) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#ownerof) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Function signature: `ownerOf(uint256)` - Function selector: `0x6352211e` @@ -400,26 +439,30 @@ Returns the address of the current owner. function ownerOf(uint256 tokenId) external view returns (address); ``` +_Retrieving the address that own tokenId `tokenId`._ + Compatible with ERC721 ownerOf. #### Parameters -| Name | Type | Description | -| --------- | :-------: | -------------------- | -| `tokenId` | `uint256` | The tokenId to query | +| Name | Type | Description | +| --------- | :-------: | --------------------- | +| `tokenId` | `uint256` | The tokenId to query. | #### Returns -| Name | Type | Description | -| ---- | :-------: | ------------------------ | -| `0` | `address` | The owner of the tokenId | +| Name | Type | Description | +| ---- | :-------: | ------------------------- | +| `0` | `address` | The owner of the tokenId. | + +
### renounceOwnership -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#renounceownership) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#renounceownership) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Function signature: `renounceOwnership()` - Function selector: `0x715018a6` @@ -431,12 +474,14 @@ function renounceOwnership() external nonpayable; Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner. +
+ ### revokeOperator -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#revokeoperator) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#revokeoperator) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Function signature: `revokeOperator(address,bytes32)` - Function selector: `0x0b0c6d82` @@ -455,12 +500,14 @@ Remove access of `operator` for a given `tokenId`, disallowing it to transfer `t | `operator` | `address` | The address to revoke as an operator. | | `tokenId` | `bytes32` | The tokenId `operator` is revoked from operating on. | +
+ ### safeTransferFrom -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#safetransferfrom) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#safetransferfrom) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Function signature: `safeTransferFrom(address,address,uint256)` - Function selector: `0x42842e0e` @@ -480,6 +527,8 @@ function safeTransferFrom( ) external nonpayable; ``` +_Calling `safeTransferFrom` function on `ILSP8CompatibleERC721` contract. Transferring tokenId `tokenId` from address `from` to address `to`._ + Safe Transfer function without optional data from the ERC721 standard interface. #### Parameters @@ -490,12 +539,14 @@ Safe Transfer function without optional data from the ERC721 standard interface. | `to` | `address` | The receiving address. | | `tokenId` | `uint256` | The tokenId to transfer. | +
+ ### safeTransferFrom -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#safetransferfrom) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#safetransferfrom) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Function signature: `safeTransferFrom(address,address,uint256,bytes)` - Function selector: `0xb88d4fde` @@ -516,7 +567,9 @@ function safeTransferFrom( ) external nonpayable; ``` -Safe Transfer function with optional data from the ERC721 standard interface.. +_Calling `safeTransferFrom` function with `data` on `ILSP8CompatibleERC721` contract. Transferring tokenId `tokenId` from address `from` to address `to`._ + +Safe Transfer function with optional data from the ERC721 standard interface. #### Parameters @@ -527,12 +580,14 @@ Safe Transfer function with optional data from the ERC721 standard interface.. | `tokenId` | `uint256` | The tokenId to transfer. | | `data` | `bytes` | The data to be sent with the transfer. | +
+ ### setApprovalForAll -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#setapprovalforall) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#setapprovalforall) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Function signature: `setApprovalForAll(address,bool)` - Function selector: `0xa22cb465` @@ -551,108 +606,68 @@ See [`_setApprovalForAll`](#_setapprovalforall) | `operator` | `address` | - | | `approved` | `bool` | - | +
+ ### setData -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#setdata) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#setdata) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Function signature: `setData(bytes32,bytes)` - Function selector: `0x7f23690c` ::: -:::caution Warning - -**Note for developers:** despite the fact that this function is set as `payable`, if the function is not intended to receive value (= native tokens), **an additional check should be implemented to ensure that `msg.value` sent was equal to 0**. - -::: - ```solidity function setData(bytes32 dataKey, bytes dataValue) external payable; ``` -_Setting the following data key value pair in the ERC725Y storage. Data key: `dataKey`, data value: `dataValue`. _ - -Sets a single bytes value `dataValue` in the ERC725Y storage for a specific data key `dataKey`. The function is marked as payable to enable flexibility on child contracts. For instance to implement a fee mechanism for setting specific data. - -- -**Requirements:** - -- SHOULD only be callable by the [`owner`](#owner). - -- -- -**Emitted events:** - -- [`DataChanged`](#datachanged) event. - -+_Sets singular data for a given `dataKey`_ #### Parameters -| Name | Type | Description | -| ----------- | :-------: | ------------------------------------------ | -| `dataKey` | `bytes32` | The data key for which to set a new value. | -| `dataValue` | `bytes` | The new bytes value to set. | +| Name | Type | Description | +| ----------- | :-------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `dataKey` | `bytes32` | The key to retrieve stored value | +| `dataValue` | `bytes` | The value to set SHOULD only be callable by the owner of the contract set via ERC173 The function is marked as payable to enable flexibility on child contracts If the function is not intended to receive value, an additional check should be implemented to check that value equal 0. Emits a {DataChanged} event. | + +
### setDataBatch -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#setdatabatch) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#setdatabatch) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Function signature: `setDataBatch(bytes32[],bytes[])` - Function selector: `0x97902421` ::: -:::caution Warning - -**Note for developers:** despite the fact that this function is set as `payable`, if the function is not intended to receive value (= native tokens), **an additional check should be implemented to ensure that `msg.value` sent was equal to 0**. - -::: - ```solidity function setDataBatch(bytes32[] dataKeys, bytes[] dataValues) external payable; ``` -_Setting the following data key value pairs in the ERC725Y storage. Data keys: `dataKeys`, data values: `dataValues`. _ - -Batch data setting function that behaves the same as [`setData`](#setdata) but allowing to set multiple data key/value pairs in the ERC725Y storage in the same transaction. - -- -**Requirements:** - -- SHOULD only be callable by the [`owner`](#owner) of the contract. - -- -- -**Emitted events:** - -- [`DataChanged`](#datachanged) event **for each data key/value pair set**. +Sets array of data for multiple given `dataKeys` SHOULD only be callable by the owner of the contract set via ERC173 The function is marked as payable to enable flexibility on child contracts If the function is not intended to receive value, an additional check should be implemented to check that value equal -+0. Emits a [`DataChanged`](#datachanged) event. #### Parameters -| Name | Type | Description | -| ------------ | :---------: | ---------------------------------------------------- | -| `dataKeys` | `bytes32[]` | An array of data keys to set bytes values for. | -| `dataValues` | `bytes[]` | An array of bytes values to set for each `dataKeys`. | +| Name | Type | Description | +| ------------ | :---------: | ---------------------------------------- | +| `dataKeys` | `bytes32[]` | The array of data keys for values to set | +| `dataValues` | `bytes[]` | The array of values to set | + +
### supportsInterface -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#supportsinterface) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#supportsinterface) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Function signature: `supportsInterface(bytes4)` - Function selector: `0x01ffc9a7` @@ -676,12 +691,14 @@ Returns true if this contract implements the interface defined by `interfaceId`. | ---- | :----: | ----------- | | `0` | `bool` | - | +
+ ### symbol -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#symbol) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#symbol) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Function signature: `symbol()` - Function selector: `0x95d89b41` @@ -699,12 +716,14 @@ Returns the symbol of the token, usually a shorter version of the name. | ---- | :------: | ----------------------- | | `0` | `string` | The symbol of the token | +
+ ### tokenIdsOf -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#tokenidsof) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#tokenidsof) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Function signature: `tokenIdsOf(address)` - Function selector: `0xa3b261f2` @@ -728,12 +747,14 @@ Returns the list of token IDs that the `tokenOwner` address owns. | ---- | :---------: | ------------------------------------------------------- | | `0` | `bytes32[]` | An array of `bytes32[] tokenIds` owned by `tokenOwner`. | +
+ ### tokenOwnerOf -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#tokenownerof) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#tokenownerof) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Function signature: `tokenOwnerOf(bytes32)` - Function selector: `0x217b2270` @@ -757,12 +778,14 @@ Returns the list of `tokenIds` for the `tokenOwner` address. | ---- | :-------: | ----------------------------------------- | | `0` | `address` | The owner address of the given `tokenId`. | +
+ ### tokenURI -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#)) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#)) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Function signature: `)` - Function selector: `0x59d76dc3` @@ -784,12 +807,14 @@ function tokenURI(uint256) external view returns (string); | ---- | :------: | ----------- | | `0` | `string` | - | +
+ ### totalSupply -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#totalsupply) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#totalsupply) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Function signature: `totalSupply()` - Function selector: `0x18160ddd` @@ -807,12 +832,14 @@ Returns the number of existing tokens that have been minted in this contract. | ---- | :-------: | ------------------------------ | | `0` | `uint256` | The number of existing tokens. | +
+ ### transfer -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#transfer) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#transfer) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Function signature: `transfer(address,address,bytes32,bool,bytes)` - Function selector: `0x511b6952` @@ -840,12 +867,14 @@ Transfer a given `tokenId` token from the `from` address to the `to` address. If | `allowNonLSP1Recipient` | `bool` | When set to `true`, the `to` address CAN be any addres. When set to `false`, the `to` address MUST be a contract that supports the LSP1 UniversalReceiver standard. | | `data` | `bytes` | Any additional data the caller wants included in the emitted event, and sent in the hooks of the `from` and `to` addresses. | +
+ ### transferBatch -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#transferbatch) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#transferbatch) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Function signature: `transferBatch(address[],address[],bytes32[],bool[],bytes[])` - Function selector: `0x7e87632c` @@ -873,12 +902,14 @@ Transfers multiple tokens at once based on the arrays of `from`, `to` and `token | `allowNonLSP1Recipient` | `bool[]` | When set to `true`, `to` may be any address. When set to `false`, `to` must be a contract that supports the LSP1 standard and not revert. | | `data` | `bytes[]` | Any additional data the caller wants included in the emitted event, and sent in the hooks to the `from` and `to` addresses. | +
+ ### transferFrom -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#transferfrom) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#transferfrom) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Function signature: `transferFrom(address,address,uint256)` - Function selector: `0x23b872dd` @@ -898,6 +929,8 @@ function transferFrom( ) external nonpayable; ``` +_Calling `transferFrom` function on `ILSP8CompatibleERC721` contract. Transferring tokenId `tokenId` from address `from` to address `to`._ + Transfer functions from the ERC721 standard interface. #### Parameters @@ -908,12 +941,14 @@ Transfer functions from the ERC721 standard interface. | `to` | `address` | The receiving address. | | `tokenId` | `uint256` | The tokenId to transfer. | +
+ ### transferOwnership -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#transferownership) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#transferownership) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Function signature: `transferOwnership(address)` - Function selector: `0xf2fde38b` @@ -931,18 +966,260 @@ Transfers ownership of the contract to a new account (`newOwner`). Can only be c | ---------- | :-------: | ----------- | | `newOwner` | `address` | - | ---- +
+ +## Internal Methods + +Any method labeled as `internal` serves as utility function within the contract. They can be used when writing solidity contracts that inherit from this contract. These methods can be extended or modified by overriding their internal behavior to suit specific needs. + +Internal functions cannot be called externally, whether from other smart contracts, dApp interfaces, or backend services. Their restricted accessibility ensures that they remain exclusively available within the context of the current contract, promoting controlled and encapsulated usage of these internal utilities. + +### \_checkOwner + +```solidity +function _checkOwner() internal view; +``` + +Throws if the sender is not the owner. + +
+ +### \_setOwner + +```solidity +function _setOwner(address newOwner) internal nonpayable; +``` + +Changes the owner if `newOwner` and oldOwner are different +This pattern is useful in inheritance. + +
+ +### \_getData + +```solidity +function _getData(bytes32 dataKey) internal view returns (bytes dataValue); +``` + +
+ +### \_setData + +```solidity +function _setData(bytes32 key, bytes value) internal nonpayable; +``` + +
+ +### \_isOperatorOrOwner + +```solidity +function _isOperatorOrOwner( + address caller, + bytes32 tokenId +) internal view returns (bool); +``` + +verifies if the `caller` is operator or owner for the `tokenId` + +#### Returns + +| Name | Type | Description | +| ---- | :----: | -------------------------------------------- | +| `0` | `bool` | true if `caller` is either operator or owner | + +
+ +### \_revokeOperator + +```solidity +function _revokeOperator( + address operator, + address tokenOwner, + bytes32 tokenId +) internal nonpayable; +``` + +removes `operator` from the list of operators for the `tokenId` + +
+ +### \_clearOperators + +```solidity +function _clearOperators( + address tokenOwner, + bytes32 tokenId +) internal nonpayable; +``` + +revoke all the current operators for a specific `tokenId` token which belongs to `tokenOwner`. + +#### Parameters + +| Name | Type | Description | +| ------------ | :-------: | ------------------------------------------------- | +| `tokenOwner` | `address` | The address that is the owner of the `tokenId`. | +| `tokenId` | `bytes32` | The token to remove the associated operators for. | + +
+ +### \_exists + +```solidity +function _exists(bytes32 tokenId) internal view returns (bool); +``` + +Returns whether `tokenId` exists. +Tokens start existing when they are minted ([`_mint`](#_mint)), and stop existing when they are burned ([`_burn`](#_burn)). + +
+ +### \_existsOrError + +```solidity +function _existsOrError(bytes32 tokenId) internal view; +``` + +When `tokenId` does not exist then revert with an error. + +
+ +### \_mint + +```solidity +function _mint( + address to, + bytes32 tokenId, + bool allowNonLSP1Recipient, + bytes data +) internal nonpayable; +``` + +
+ +### \_burn + +```solidity +function _burn(bytes32 tokenId, bytes data) internal nonpayable; +``` + +
+ +### \_transfer + +```solidity +function _transfer( + address from, + address to, + bytes32 tokenId, + bool allowNonLSP1Recipient, + bytes data +) internal nonpayable; +``` + +
+ +### \_beforeTokenTransfer + +```solidity +function _beforeTokenTransfer( + address from, + address to, + bytes32 tokenId +) internal nonpayable; +``` + +Hook that is called before any token transfer, including minting and burning. + +- Allows to run custom logic before updating balances and notifiying sender/recipient by overriding this function. + +#### Parameters + +| Name | Type | Description | +| --------- | :-------: | -------------------------------------- | +| `from` | `address` | The sender address | +| `to` | `address` | @param tokenId The tokenId to transfer | +| `tokenId` | `bytes32` | The tokenId to transfer | + +
+ +### \_notifyTokenSender + +```solidity +function _notifyTokenSender(address from, bytes lsp1Data) internal nonpayable; +``` + +An attempt is made to notify the token sender about the `tokenId` changing owners using +LSP1 interface. + +
+ +### \_notifyTokenReceiver + +```solidity +function _notifyTokenReceiver( + address to, + bool allowNonLSP1Recipient, + bytes lsp1Data +) internal nonpayable; +``` + +An attempt is made to notify the token receiver about the `tokenId` changing owners +using LSP1 interface. When allowNonLSP1Recipient is FALSE the token receiver MUST support LSP1. +The receiver may revert when the token being sent is not wanted. + +
+ +### \_safeTransfer + +```solidity +function _safeTransfer( + address from, + address to, + uint256 tokenId, + bytes data +) internal nonpayable; +``` + +Transfer the `tokenId` from `from` to `to` and check if the `to` recipient address is +a contract that implements the `IERC721Received` interface and return the right magic value. +See [`_checkOnERC721Received`](#_checkonerc721received) for more infos. + +
+ +### \_setApprovalForAll + +```solidity +function _setApprovalForAll( + address tokensOwner, + address operator, + bool approved +) internal nonpayable; +``` + +Approve `operator` to operate on all tokens of `tokensOwner` + ++ +**Emitted events:** + +- [`ApprovalForAll`](#approvalforall) event. + ++ +
## Events ### Approval -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#approval) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#approval) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Event signature: `Approval(address,address,uint256)` -- Event hash: `0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925` +- Event topic hash: `0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925` ::: @@ -950,24 +1227,28 @@ Transfers ownership of the contract to a new account (`newOwner`). Can only be c event Approval(address indexed owner, address indexed operator, uint256 indexed tokenId); ``` -Emitted when the allowance of a `spender` for an `owner` is set by a call to [`approve`](#approve). `value` is the new allowance. +_ERC721 `Approval` compatible event emitted. Successfully approved operator `operator` to operate on tokenId `tokenId` on behalf of token owner `owner`._ + +ERC721 `Approval` event emitted when `owner` enables `operator` for `tokenId`. To provide compatibility with indexing ERC721 events. #### Parameters -| Name | Type | Description | -| ------------------------ | :-------: | ----------- | -| `owner` **`indexed`** | `address` | - | -| `operator` **`indexed`** | `address` | - | -| `tokenId` **`indexed`** | `uint256` | - | +| Name | Type | Description | +| ------------------------ | :-------: | ------------------------------------------ | +| `owner` **`indexed`** | `address` | The address of the owner of the `tokenId`. | +| `operator` **`indexed`** | `address` | The address set as operator. | +| `tokenId` **`indexed`** | `uint256` | The approved tokenId. | + +
### ApprovalForAll -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#approvalforall) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#approvalforall) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Event signature: `ApprovalForAll(address,address,bool)` -- Event hash: `0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31` +- Event topic hash: `0x17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31` ::: @@ -975,24 +1256,28 @@ Emitted when the allowance of a `spender` for an `owner` is set by a call to [`a event ApprovalForAll(address indexed owner, address indexed operator, bool approved); ``` -Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to `approved`. +_ERC721 `ApprovalForAll` compatible event emitted. Successfully set "approved for all" status to `approved` for operator `operator` for token owner `owner`._ + +ERC721 `ApprovalForAll` event emitted when an `operator` is enabled or disabled for an owner to transfer any of its tokenIds. The operator can manage all NFTs of the owner. #### Parameters -| Name | Type | Description | -| ------------------------ | :-------: | ----------- | -| `owner` **`indexed`** | `address` | - | -| `operator` **`indexed`** | `address` | - | -| `approved` | `bool` | - | +| Name | Type | Description | +| ------------------------ | :-------: | ---------------------------------------------- | +| `owner` **`indexed`** | `address` | The address of the owner of tokenIds. | +| `operator` **`indexed`** | `address` | The address set as operator. | +| `approved` | `bool` | If `operator` is approved for all NFTs or not. | + +
### AuthorizedOperator -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#authorizedoperator) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#authorizedoperator) +- 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)` -- Event hash: `0x34b797fc5a526f7bf1d2b5de25f6564fd85ae364e3ee939aee7c1ac27871a988` +- Event topic hash: `0x34b797fc5a526f7bf1d2b5de25f6564fd85ae364e3ee939aee7c1ac27871a988` ::: @@ -1000,7 +1285,7 @@ Emitted when `account` grants or revokes permission to `operator` to transfer th event AuthorizedOperator(address indexed operator, address indexed tokenOwner, bytes32 indexed tokenId); ``` -Emitted when `tokenOwner` enables `operator` to transfer or burn `tokenId` on its behalf. +Emitted when `tokenOwner` enables `operator` to transfer or burn the `tokenId`. #### Parameters @@ -1010,14 +1295,16 @@ Emitted when `tokenOwner` enables `operator` to transfer or burn `tokenId` on it | `tokenOwner` **`indexed`** | `address` | The owner of the `tokenId`. | | `tokenId` **`indexed`** | `bytes32` | The tokenId `operator` address has access on behalf of `tokenOwner`. | +
+ ### DataChanged -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#datachanged) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- 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 hash: `0xece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2` +- Event topic hash: `0xece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2` ::: @@ -1025,25 +1312,25 @@ Emitted when `tokenOwner` enables `operator` to transfer or burn `tokenId` on it 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`. +_Emitted when data at a key is changed_ #### 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 | +| ----------------------- | :-------: | ------------------------------------ | +| `dataKey` **`indexed`** | `bytes32` | The data key which data value is set | +| `dataValue` | `bytes` | The data value to set | + +
### OwnershipTransferred -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#ownershiptransferred) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#ownershiptransferred) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Event signature: `OwnershipTransferred(address,address)` -- Event hash: `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0` +- Event topic hash: `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0` ::: @@ -1058,14 +1345,16 @@ event OwnershipTransferred(address indexed previousOwner, address indexed newOwn | `previousOwner` **`indexed`** | `address` | - | | `newOwner` **`indexed`** | `address` | - | +
+ ### RevokedOperator -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#revokedoperator) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#revokedoperator) +- 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)` -- Event hash: `0x17d5389f6ab6adb2647dfa0aa365c323d37adacc30b33a65310b6158ce1373d5` +- Event topic hash: `0x17d5389f6ab6adb2647dfa0aa365c323d37adacc30b33a65310b6158ce1373d5` ::: @@ -1077,20 +1366,22 @@ Emitted when `tokenOwner` disables `operator` to transfer or burn `tokenId` on i #### Parameters -| Name | Type | Description | -| -------------------------- | :-------: | ---------------------------------------------------- | -| `operator` **`indexed`** | `address` | The address revoked as an operator. | -| `tokenOwner` **`indexed`** | `address` | The owner of the `tokenId`. | -| `tokenId` **`indexed`** | `bytes32` | The tokenId `operator` is revoked from operating on. | +| Name | Type | Description | +| -------------------------- | :-------: | --------------------------------------------------------------- | +| `operator` **`indexed`** | `address` | The address revoked from the operator array ({getOperatorsOf}). | +| `tokenOwner` **`indexed`** | `address` | The owner of the `tokenId`. | +| `tokenId` **`indexed`** | `bytes32` | The tokenId `operator` is revoked from operating on. | + +
### Transfer -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#transfer) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#transfer) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Event signature: `Transfer(address,address,address,bytes32,bool,bytes)` -- Event hash: `0xb333c813a7426a7a11e2b190cad52c44119421594b47f6f32ace6d8c7207b2bf` +- Event topic hash: `0xb333c813a7426a7a11e2b190cad52c44119421594b47f6f32ace6d8c7207b2bf` ::: @@ -1098,6 +1389,8 @@ Emitted when `tokenOwner` disables `operator` to transfer or burn `tokenId` on i event Transfer(address operator, address indexed from, address indexed to, bytes32 indexed tokenId, bool allowNonLSP1Recipient, bytes data); ``` +_ERC721 `Transfer` compatible event emitted. Successfully transferred tokenId `tokenId` from `from` to `to`._ + Emitted when `tokenId` token is transferred from the `from` to the `to` address. #### Parameters @@ -1111,16 +1404,16 @@ Emitted when `tokenId` token is transferred from the `from` to the `to` address. | `allowNonLSP1Recipient` | `bool` | If the token transfer enforces the `to` recipient address to be a contract that implements the LSP1 standard or not. | | `data` | `bytes` | Any additional data the caller included by the caller during the transfer, and sent in the hooks to the `from` and `to` addresses. | ---- +
## Errors ### ERC725Y_DataKeysValuesEmptyArray -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#erc725y_datakeysvaluesemptyarray) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#erc725y_datakeysvaluesemptyarray) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Error signature: `ERC725Y_DataKeysValuesEmptyArray()` - Error hash: `0x97da5f95` @@ -1130,14 +1423,16 @@ Emitted when `tokenId` token is transferred from the `from` to the `to` address. error ERC725Y_DataKeysValuesEmptyArray(); ``` -Reverts when one of the array parameter provided to [`setDataBatch`](#setdatabatch) function is an empty array. +reverts when one of the array parameter provided to `setDataBatch` is an empty array + +
### ERC725Y_DataKeysValuesLengthMismatch -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#erc725y_datakeysvalueslengthmismatch) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#erc725y_datakeysvalueslengthmismatch) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Error signature: `ERC725Y_DataKeysValuesLengthMismatch()` - Error hash: `0x3bcc8979` @@ -1147,14 +1442,16 @@ Reverts when one of the array parameter provided to [`setDataBatch`](#setdatabat error ERC725Y_DataKeysValuesLengthMismatch(); ``` -Reverts when there is not the same number of elements in the `datakeys` and `dataValues` array parameters provided when calling the [`setDataBatch`](#setdatabatch) function. +reverts when there is not the same number of elements in the lists of data keys and data values when calling setDataBatch. + +
### ERC725Y_MsgValueDisallowed -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#erc725y_msgvaluedisallowed) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#erc725y_msgvaluedisallowed) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Error signature: `ERC725Y_MsgValueDisallowed()` - Error hash: `0xf36ba737` @@ -1164,14 +1461,16 @@ Reverts when there is not the same number of elements in the `datakeys` and `dat error ERC725Y_MsgValueDisallowed(); ``` -Reverts when sending value to the [`setData`](#setdata) or [`setDataBatch`](#setdatabatch) function. +reverts when sending value to the `setData(..)` functions + +
### LSP4TokenNameNotEditable -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#lsp4tokennamenoteditable) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp4tokennamenoteditable) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Error signature: `LSP4TokenNameNotEditable()` - Error hash: `0x85c169bd` @@ -1183,12 +1482,14 @@ 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. +
+ ### LSP4TokenSymbolNotEditable -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#lsp4tokensymbolnoteditable) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp4tokensymbolnoteditable) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Error signature: `LSP4TokenSymbolNotEditable()` - Error hash: `0x76755b38` @@ -1200,12 +1501,14 @@ 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. +
+ ### LSP8CannotSendToAddressZero -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#lsp8cannotsendtoaddresszero) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8cannotsendtoaddresszero) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Error signature: `LSP8CannotSendToAddressZero()` - Error hash: `0x24ecef4d` @@ -1217,12 +1520,14 @@ error LSP8CannotSendToAddressZero(); reverts when trying to send token to the zero address. +
+ ### LSP8CannotSendToSelf -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#lsp8cannotsendtoself) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8cannotsendtoself) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Error signature: `LSP8CannotSendToSelf()` - Error hash: `0x5d67d6c1` @@ -1234,12 +1539,14 @@ error LSP8CannotSendToSelf(); reverts when specifying the same address for `from` and `to` in a token transfer. +
+ ### LSP8CannotUseAddressZeroAsOperator -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#lsp8cannotuseaddresszeroasoperator) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8cannotuseaddresszeroasoperator) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Error signature: `LSP8CannotUseAddressZeroAsOperator()` - Error hash: `0x9577b8b3` @@ -1251,12 +1558,14 @@ error LSP8CannotUseAddressZeroAsOperator(); reverts when trying to set the zero address as an operator. +
+ ### LSP8InvalidTransferBatch -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#lsp8invalidtransferbatch) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8invalidtransferbatch) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Error signature: `LSP8InvalidTransferBatch()` - Error hash: `0x93a83119` @@ -1268,12 +1577,14 @@ error LSP8InvalidTransferBatch(); reverts when the parameters used for `transferBatch` have different lengths. +
+ ### LSP8NonExistentTokenId -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#lsp8nonexistenttokenid) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8nonexistenttokenid) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Error signature: `LSP8NonExistentTokenId(bytes32)` - Error hash: `0xae8f9a36` @@ -1291,12 +1602,14 @@ reverts when `tokenId` has not been minted. | --------- | :-------: | ----------- | | `tokenId` | `bytes32` | - | +
+ ### LSP8NonExistingOperator -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#lsp8nonexistingoperator) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8nonexistingoperator) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Error signature: `LSP8NonExistingOperator(address,bytes32)` - Error hash: `0x4aa31a8c` @@ -1315,12 +1628,14 @@ reverts when `operator` is not an operator for the `tokenId`. | `operator` | `address` | - | | `tokenId` | `bytes32` | - | +
+ ### LSP8NotTokenOperator -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#lsp8nottokenoperator) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8nottokenoperator) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Error signature: `LSP8NotTokenOperator(bytes32,address)` - Error hash: `0x1294d2a9` @@ -1339,12 +1654,14 @@ reverts when `caller` is not an allowed operator for `tokenId`. | `tokenId` | `bytes32` | - | | `caller` | `address` | - | +
+ ### LSP8NotTokenOwner -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#lsp8nottokenowner) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8nottokenowner) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Error signature: `LSP8NotTokenOwner(address,bytes32,address)` - Error hash: `0x5b271ea2` @@ -1364,12 +1681,14 @@ reverts when `caller` is not the `tokenOwner` of the `tokenId`. | `tokenId` | `bytes32` | - | | `caller` | `address` | - | +
+ ### LSP8NotifyTokenReceiverContractMissingLSP1Interface -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#lsp8notifytokenreceivercontractmissinglsp1interface) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8notifytokenreceivercontractmissinglsp1interface) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Error signature: `LSP8NotifyTokenReceiverContractMissingLSP1Interface(address)` - Error hash: `0x4349776d` @@ -1389,12 +1708,14 @@ reverts if the `tokenReceiver` does not implement LSP1 when minting or transferr | --------------- | :-------: | ----------- | | `tokenReceiver` | `address` | - | +
+ ### LSP8NotifyTokenReceiverIsEOA -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#lsp8notifytokenreceiveriseoa) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8notifytokenreceiveriseoa) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Error signature: `LSP8NotifyTokenReceiverIsEOA(address)` - Error hash: `0x03173137` @@ -1412,12 +1733,14 @@ reverts if the `tokenReceiver` is an EOA when minting or transferring tokens wit | --------------- | :-------: | ----------- | | `tokenReceiver` | `address` | - | +
+ ### LSP8OperatorAlreadyAuthorized -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#lsp8operatoralreadyauthorized) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8operatoralreadyauthorized) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Error signature: `LSP8OperatorAlreadyAuthorized(address,bytes32)` - Error hash: `0xa7626b68` @@ -1436,12 +1759,14 @@ reverts when `operator` is already authorized for the `tokenId`. | `operator` | `address` | - | | `tokenId` | `bytes32` | - | +
+ ### LSP8TokenIdAlreadyMinted -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#lsp8tokenidalreadyminted) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenidalreadyminted) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Error signature: `LSP8TokenIdAlreadyMinted(bytes32)` - Error hash: `0x34c7b511` @@ -1459,12 +1784,14 @@ reverts when `tokenId` has already been minted. | --------- | :-------: | ----------- | | `tokenId` | `bytes32` | - | +
+ ### LSP8TokenOwnerCannotBeOperator -:::note Links +:::note References -- Specification details in [**LSP-8-CompatibleERC721Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-CompatibleERC721Mintable.md#lsp8tokenownercannotbeoperator) -- Solidity implementation in [**LSP8CompatibleERC721Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8CompatibleERC721Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenownercannotbeoperator) +- Solidity implementation: [`LSP8CompatibleERC721Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol) - Error signature: `LSP8TokenOwnerCannotBeOperator()` - Error hash: `0x89fdad62` @@ -1476,193 +1803,4 @@ error LSP8TokenOwnerCannotBeOperator(); reverts when trying to authorize or revoke the token's owner as an operator. - - - - - - -[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/nft-2.0/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/nft-2.0/LSP7-Digital-Asset -[LSP8IdentifiableDigitalAsset]: https://docs.lukso.tech/standards/nft-2.0/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/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.md b/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.md index 0d3f80afd4..8ef3c08c8d 100644 --- a/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.md +++ b/docs/contracts/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.md @@ -1,21 +1,32 @@ + + + # LSP8Mintable -:::info Solidity contract +:::info Standard Specifications + +[`LSP-8-IdentifiableDigitalAsset`](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md) + +::: +:::info Solidity implementation -[`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Mintable) +[`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol) ::: > LSP8IdentifiableDigitalAsset deployable preset contract with a public {mint} function callable only by the contract {owner}. -## Methods +## Public Methods + +Public methods are accessible externally from users, allowing interaction with this function from dApps or other smart contracts. +When marked as 'public', a method can be called both externally and internally, on the other hand, when marked as 'external', a method can only be called externally. ### constructor -:::note Links +:::note References -- Specification details in [**LSP-8-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Mintable.md#constructor) -- Solidity implementation in [**LSP8Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#constructor) +- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol) ::: @@ -23,7 +34,7 @@ constructor(string name_, string symbol_, address newOwner_); ``` -_Deploying a `LSP8Mintable` token contract with: token name = `name\_`, token symbol = `symbol\_`, and address `newOwner\_` as the token contract owner._ +_Deploying a `LSP8Mintable` token contract with: token name = `name_`, token symbol = `symbol_`, and address `newOwner_` as the token contract owner._ #### Parameters @@ -33,12 +44,14 @@ _Deploying a `LSP8Mintable` token contract with: token name = `name\_`, token sy | `symbol_` | `string` | The symbol of the token. | | `newOwner_` | `address` | The owner of the token contract. | +
+ ### authorizeOperator -:::note Links +:::note References -- Specification details in [**LSP-8-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Mintable.md#authorizeoperator) -- Solidity implementation in [**LSP8Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#authorizeoperator) +- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol) - Function signature: `authorizeOperator(address,bytes32)` - Function selector: `0xcf5182ba` @@ -60,12 +73,14 @@ Allow an `operator` address to transfer or burn a specific `tokenId` on behalf o | `operator` | `address` | The address to authorize as an operator. | | `tokenId` | `bytes32` | The token ID operator has access to.. | +
+ ### balanceOf -:::note Links +:::note References -- Specification details in [**LSP-8-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Mintable.md#balanceof) -- Solidity implementation in [**LSP8Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#balanceof) +- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol) - Function signature: `balanceOf(address)` - Function selector: `0x70a08231` @@ -89,12 +104,14 @@ Get the number of token IDs owned by `tokenOwner`. | ---- | :-------: | ----------------------------------------------------- | | `0` | `uint256` | The total number of token IDs that `tokenOwner` owns. | +
+ ### getData -:::note Links +:::note References -- Specification details in [**LSP-8-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Mintable.md#getdata) -- Solidity implementation in [**LSP8Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#getdata) +- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol) - Function signature: `getData(bytes32)` - Function selector: `0x54f6127f` @@ -104,28 +121,28 @@ Get the number of token IDs owned by `tokenOwner`. function getData(bytes32 dataKey) external view returns (bytes dataValue); ``` -_Reading the ERC725Y storage for data key `dataKey` returned the following value: `dataValue`._ - -Get in the ERC725Y storage the bytes data stored at a specific data key `dataKey`. +_Gets singular data at a given `dataKey`_ #### Parameters -| Name | Type | Description | -| --------- | :-------: | --------------------------------------------- | -| `dataKey` | `bytes32` | The data key for which to retrieve the value. | +| Name | Type | Description | +| --------- | :-------: | ------------------------------- | +| `dataKey` | `bytes32` | The key which value to retrieve | #### Returns -| Name | Type | Description | -| ----------- | :-----: | ---------------------------------------------------- | -| `dataValue` | `bytes` | The bytes value stored under the specified data key. | +| Name | Type | Description | +| ----------- | :-----: | -------------------------- | +| `dataValue` | `bytes` | The data stored at the key | + +
### getDataBatch -:::note Links +:::note References -- Specification details in [**LSP-8-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Mintable.md#getdatabatch) -- Solidity implementation in [**LSP8Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#getdatabatch) +- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol) - Function signature: `getDataBatch(bytes32[])` - Function selector: `0xdedff9c6` @@ -137,9 +154,7 @@ function getDataBatch( ) external view returns (bytes[] dataValues); ``` -_Reading the ERC725Y storage for data keys `dataKeys` returned the following values: `dataValues`._ - -Get in the ERC725Y storage the bytes data stored at multiple data keys `dataKeys`. +_Gets array of data for multiple given keys_ #### Parameters @@ -153,12 +168,14 @@ Get in the ERC725Y storage the bytes data stored at multiple data keys `dataKeys | ------------ | :-------: | ----------------------------------------- | | `dataValues` | `bytes[]` | The array of data stored at multiple keys | +
+ ### getOperatorsOf -:::note Links +:::note References -- Specification details in [**LSP-8-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Mintable.md#getoperatorsof) -- Solidity implementation in [**LSP8Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#getoperatorsof) +- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol) - Function signature: `getOperatorsOf(bytes32)` - Function selector: `0x49a6078d` @@ -182,12 +199,14 @@ Returns all `operator` addresses that are allowed to transfer or burn a specific | ---- | :---------: | ------------------------------------------------------------------------------------------------------------ | | `0` | `address[]` | An array of operators allowed to transfer or burn a specific `tokenId`. Requirements - `tokenId` must exist. | +
+ ### isOperatorFor -:::note Links +:::note References -- Specification details in [**LSP-8-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Mintable.md#isoperatorfor) -- Solidity implementation in [**LSP8Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#isoperatorfor) +- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol) - Function signature: `isOperatorFor(address,bytes32)` - Function selector: `0x2a3654a4` @@ -215,12 +234,14 @@ Returns whether `operator` address is an operator for a given `tokenId`. | ---- | :----: | --------------------------------------------------------------------- | | `0` | `bool` | `true` if `operator` is an operator for `tokenId`, `false` otherwise. | +
+ ### mint -:::note Links +:::note References -- Specification details in [**LSP-8-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Mintable.md#mint) -- Solidity implementation in [**LSP8Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#mint) +- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol) - Function signature: `mint(address,bytes32,bool,bytes)` - Function selector: `0xaf255b61` @@ -235,23 +256,27 @@ function mint( ) external nonpayable; ``` +_Minting tokenId `tokenId` for address `to` with the additional data `data` (Note: allow non-LSP1 recipient is set to `allowNonLSP1Recipient`)._ + Public [`_mint`](#_mint) function only callable by the [`owner`](#owner). #### Parameters -| Name | Type | Description | -| ----------------------- | :-------: | ----------- | -| `to` | `address` | - | -| `tokenId` | `bytes32` | - | -| `allowNonLSP1Recipient` | `bool` | - | -| `data` | `bytes` | - | +| Name | Type | Description | +| ----------------------- | :-------: | ------------------------------------------------------------------------------------------------------------------------------ | +| `to` | `address` | The address that will receive the minted `tokenId`. | +| `tokenId` | `bytes32` | The tokenId to mint. | +| `allowNonLSP1Recipient` | `bool` | Set to `false` to ensure that you are minting for a recipient that implements LSP1, `false` otherwise for forcing the minting. | +| `data` | `bytes` | Any addition data to be sent alongside the minting. | + +
### owner -:::note Links +:::note References -- Specification details in [**LSP-8-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Mintable.md#owner) -- Solidity implementation in [**LSP8Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#owner) +- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol) - Function signature: `owner()` - Function selector: `0x8da5cb5b` @@ -269,12 +294,14 @@ Returns the address of the current owner. | ---- | :-------: | ----------- | | `0` | `address` | - | +
+ ### renounceOwnership -:::note Links +:::note References -- Specification details in [**LSP-8-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Mintable.md#renounceownership) -- Solidity implementation in [**LSP8Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#renounceownership) +- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol) - Function signature: `renounceOwnership()` - Function selector: `0x715018a6` @@ -286,12 +313,14 @@ function renounceOwnership() external nonpayable; Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner. +
+ ### revokeOperator -:::note Links +:::note References -- Specification details in [**LSP-8-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Mintable.md#revokeoperator) -- Solidity implementation in [**LSP8Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#revokeoperator) +- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol) - Function signature: `revokeOperator(address,bytes32)` - Function selector: `0x0b0c6d82` @@ -310,108 +339,68 @@ Remove access of `operator` for a given `tokenId`, disallowing it to transfer `t | `operator` | `address` | The address to revoke as an operator. | | `tokenId` | `bytes32` | The tokenId `operator` is revoked from operating on. | +
+ ### setData -:::note Links +:::note References -- Specification details in [**LSP-8-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Mintable.md#setdata) -- Solidity implementation in [**LSP8Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#setdata) +- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol) - Function signature: `setData(bytes32,bytes)` - Function selector: `0x7f23690c` ::: -:::caution Warning - -**Note for developers:** despite the fact that this function is set as `payable`, if the function is not intended to receive value (= native tokens), **an additional check should be implemented to ensure that `msg.value` sent was equal to 0**. - -::: - ```solidity function setData(bytes32 dataKey, bytes dataValue) external payable; ``` -_Setting the following data key value pair in the ERC725Y storage. Data key: `dataKey`, data value: `dataValue`. _ - -Sets a single bytes value `dataValue` in the ERC725Y storage for a specific data key `dataKey`. The function is marked as payable to enable flexibility on child contracts. For instance to implement a fee mechanism for setting specific data. - -- -**Requirements:** - -- SHOULD only be callable by the [`owner`](#owner). - -- -- -**Emitted events:** - -- [`DataChanged`](#datachanged) event. - -+_Sets singular data for a given `dataKey`_ #### Parameters -| Name | Type | Description | -| ----------- | :-------: | ------------------------------------------ | -| `dataKey` | `bytes32` | The data key for which to set a new value. | -| `dataValue` | `bytes` | The new bytes value to set. | +| Name | Type | Description | +| ----------- | :-------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `dataKey` | `bytes32` | The key to retrieve stored value | +| `dataValue` | `bytes` | The value to set SHOULD only be callable by the owner of the contract set via ERC173 The function is marked as payable to enable flexibility on child contracts If the function is not intended to receive value, an additional check should be implemented to check that value equal 0. Emits a {DataChanged} event. | + +
### setDataBatch -:::note Links +:::note References -- Specification details in [**LSP-8-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Mintable.md#setdatabatch) -- Solidity implementation in [**LSP8Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#setdatabatch) +- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol) - Function signature: `setDataBatch(bytes32[],bytes[])` - Function selector: `0x97902421` ::: -:::caution Warning - -**Note for developers:** despite the fact that this function is set as `payable`, if the function is not intended to receive value (= native tokens), **an additional check should be implemented to ensure that `msg.value` sent was equal to 0**. - -::: - ```solidity function setDataBatch(bytes32[] dataKeys, bytes[] dataValues) external payable; ``` -_Setting the following data key value pairs in the ERC725Y storage. Data keys: `dataKeys`, data values: `dataValues`. _ - -Batch data setting function that behaves the same as [`setData`](#setdata) but allowing to set multiple data key/value pairs in the ERC725Y storage in the same transaction. - -- -**Requirements:** +Sets array of data for multiple given `dataKeys` SHOULD only be callable by the owner of the contract set via ERC173 The function is marked as payable to enable flexibility on child contracts If the function is not intended to receive value, an additional check should be implemented to check that value equal -- SHOULD only be callable by the [`owner`](#owner) of the contract. - -- -- -**Emitted events:** - -- [`DataChanged`](#datachanged) event **for each data key/value pair set**. - -+0. Emits a [`DataChanged`](#datachanged) event. #### Parameters -| Name | Type | Description | -| ------------ | :---------: | ---------------------------------------------------- | -| `dataKeys` | `bytes32[]` | An array of data keys to set bytes values for. | -| `dataValues` | `bytes[]` | An array of bytes values to set for each `dataKeys`. | +| Name | Type | Description | +| ------------ | :---------: | ---------------------------------------- | +| `dataKeys` | `bytes32[]` | The array of data keys for values to set | +| `dataValues` | `bytes[]` | The array of values to set | + +
### supportsInterface -:::note Links +:::note References -- Specification details in [**LSP-8-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Mintable.md#supportsinterface) -- Solidity implementation in [**LSP8Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#supportsinterface) +- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol) - Function signature: `supportsInterface(bytes4)` - Function selector: `0x01ffc9a7` @@ -435,12 +424,14 @@ Returns true if this contract implements the interface defined by `interfaceId`. | ---- | :----: | ----------- | | `0` | `bool` | - | +
+ ### tokenIdsOf -:::note Links +:::note References -- Specification details in [**LSP-8-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Mintable.md#tokenidsof) -- Solidity implementation in [**LSP8Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#tokenidsof) +- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol) - Function signature: `tokenIdsOf(address)` - Function selector: `0xa3b261f2` @@ -464,12 +455,14 @@ Returns the list of token IDs that the `tokenOwner` address owns. | ---- | :---------: | ------------------------------------------------------- | | `0` | `bytes32[]` | An array of `bytes32[] tokenIds` owned by `tokenOwner`. | +
+ ### tokenOwnerOf -:::note Links +:::note References -- Specification details in [**LSP-8-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Mintable.md#tokenownerof) -- Solidity implementation in [**LSP8Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#tokenownerof) +- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol) - Function signature: `tokenOwnerOf(bytes32)` - Function selector: `0x217b2270` @@ -493,12 +486,14 @@ Returns the list of `tokenIds` for the `tokenOwner` address. | ---- | :-------: | ----------------------------------------- | | `0` | `address` | The owner address of the given `tokenId`. | +
+ ### totalSupply -:::note Links +:::note References -- Specification details in [**LSP-8-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Mintable.md#totalsupply) -- Solidity implementation in [**LSP8Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#totalsupply) +- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol) - Function signature: `totalSupply()` - Function selector: `0x18160ddd` @@ -516,12 +511,14 @@ Returns the number of existing tokens that have been minted in this contract. | ---- | :-------: | ------------------------------ | | `0` | `uint256` | The number of existing tokens. | +
+ ### transfer -:::note Links +:::note References -- Specification details in [**LSP-8-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Mintable.md#transfer) -- Solidity implementation in [**LSP8Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#transfer) +- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol) - Function signature: `transfer(address,address,bytes32,bool,bytes)` - Function selector: `0x511b6952` @@ -549,12 +546,14 @@ Transfer a given `tokenId` token from the `from` address to the `to` address. If | `allowNonLSP1Recipient` | `bool` | When set to `true`, the `to` address CAN be any addres. When set to `false`, the `to` address MUST be a contract that supports the LSP1 UniversalReceiver standard. | | `data` | `bytes` | Any additional data the caller wants included in the emitted event, and sent in the hooks of the `from` and `to` addresses. | +
+ ### transferBatch -:::note Links +:::note References -- Specification details in [**LSP-8-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Mintable.md#transferbatch) -- Solidity implementation in [**LSP8Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#transferbatch) +- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol) - Function signature: `transferBatch(address[],address[],bytes32[],bool[],bytes[])` - Function selector: `0x7e87632c` @@ -582,12 +581,14 @@ Transfers multiple tokens at once based on the arrays of `from`, `to` and `token | `allowNonLSP1Recipient` | `bool[]` | When set to `true`, `to` may be any address. When set to `false`, `to` must be a contract that supports the LSP1 standard and not revert. | | `data` | `bytes[]` | Any additional data the caller wants included in the emitted event, and sent in the hooks to the `from` and `to` addresses. | +
+ ### transferOwnership -:::note Links +:::note References -- Specification details in [**LSP-8-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Mintable.md#transferownership) -- Solidity implementation in [**LSP8Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#transferownership) +- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol) - Function signature: `transferOwnership(address)` - Function selector: `0xf2fde38b` @@ -605,18 +606,300 @@ Transfers ownership of the contract to a new account (`newOwner`). Can only be c | ---------- | :-------: | ----------- | | `newOwner` | `address` | - | ---- +
+ +## Internal Methods + +Any method labeled as `internal` serves as utility function within the contract. They can be used when writing solidity contracts that inherit from this contract. These methods can be extended or modified by overriding their internal behavior to suit specific needs. + +Internal functions cannot be called externally, whether from other smart contracts, dApp interfaces, or backend services. Their restricted accessibility ensures that they remain exclusively available within the context of the current contract, promoting controlled and encapsulated usage of these internal utilities. + +### \_checkOwner + +```solidity +function _checkOwner() internal view; +``` + +Throws if the sender is not the owner. + +
+ +### \_setOwner + +```solidity +function _setOwner(address newOwner) internal nonpayable; +``` + +Changes the owner if `newOwner` and oldOwner are different +This pattern is useful in inheritance. + +
+ +### \_getData + +```solidity +function _getData(bytes32 dataKey) internal view returns (bytes dataValue); +``` + +
+ +### \_setData + +```solidity +function _setData(bytes32 dataKey, bytes dataValue) internal nonpayable; +``` + +Save gas by emitting the [`DataChanged`](#datachanged) event with only the first 256 bytes of dataValue + +
+ +### \_isOperatorOrOwner + +```solidity +function _isOperatorOrOwner( + address caller, + bytes32 tokenId +) internal view returns (bool); +``` + +verifies if the `caller` is operator or owner for the `tokenId` + +#### Returns + +| Name | Type | Description | +| ---- | :----: | -------------------------------------------- | +| `0` | `bool` | true if `caller` is either operator or owner | + +
+ +### \_revokeOperator + +```solidity +function _revokeOperator( + address operator, + address tokenOwner, + bytes32 tokenId +) internal nonpayable; +``` + +removes `operator` from the list of operators for the `tokenId` + +
+ +### \_clearOperators + +```solidity +function _clearOperators( + address tokenOwner, + bytes32 tokenId +) internal nonpayable; +``` + +revoke all the current operators for a specific `tokenId` token which belongs to `tokenOwner`. + +#### Parameters + +| Name | Type | Description | +| ------------ | :-------: | ------------------------------------------------- | +| `tokenOwner` | `address` | The address that is the owner of the `tokenId`. | +| `tokenId` | `bytes32` | The token to remove the associated operators for. | + +
+ +### \_exists + +```solidity +function _exists(bytes32 tokenId) internal view returns (bool); +``` + +Returns whether `tokenId` exists. +Tokens start existing when they are minted ([`_mint`](#_mint)), and stop existing when they are burned ([`_burn`](#_burn)). + +
+ +### \_existsOrError + +```solidity +function _existsOrError(bytes32 tokenId) internal view; +``` + +When `tokenId` does not exist then revert with an error. + +
+ +### \_mint + +```solidity +function _mint( + address to, + bytes32 tokenId, + bool allowNonLSP1Recipient, + bytes data +) internal nonpayable; +``` + +Create `tokenId` by minting it and transfers it to `to`. + ++ +**Emitted events:** + +- [`Transfer`](#transfer) event with `address(0)` as `from` address. + ++ +#### Parameters + +| Name | Type | Description | +| ----------------------- | :-------: | -------------------------------------------------------------------------------------------------------------------------- | +| `to` | `address` | @param tokenId The token ID to create (= mint). | +| `tokenId` | `bytes32` | The token ID to create (= mint). | +| `allowNonLSP1Recipient` | `bool` | When set to `true`, `to` may be any address. When set to `false`, `to` must be a contract that supports the LSP1 standard. | +| `data` | `bytes` | Any additional data the caller wants included in the emitted event, and sent in the hook of the `to` address. | + +
+ +### \_burn + +:::tip Hint + +In dApps, you can know which addresses are burning tokens by listening for the `Transfer` event and filter with the zero address as `to`. + +::: + +```solidity +function _burn(bytes32 tokenId, bytes data) internal nonpayable; +``` + +Burn a specific `tokenId`, removing the `tokenId` from the [`tokenIdsOf`](#tokenidsof) the caller and decreasing its [`balanceOf`](#balanceof) by -1. +This will also clear all the operators allowed to transfer the `tokenId`. +The owner of the `tokenId` will be notified about the `tokenId` being transferred through its LSP1 [`universalReceiver`](#universalreceiver) +function, if it is a contract that supports the LSP1 interface. Its [`universalReceiver`](#universalreceiver) function will receive +all the parameters in the calldata packed encoded. +Any logic in the [`_beforeTokenTransfer`](#_beforetokentransfer) function will run before burning `tokenId` and updating the balances. + ++ +**Emitted events:** + +- [`Transfer`](#transfer) event with `address(0)` as the `to` address. + ++ +#### Parameters + +| Name | Type | Description | +| --------- | :-------: | --------------------------------------------------------------------------------------------------------------------------- | +| `tokenId` | `bytes32` | The token to burn. | +| `data` | `bytes` | Any additional data the caller wants included in the emitted event, and sent in the LSP1 hook on the token owner's address. | + +
+ +### \_transfer + +:::danger + +This internal function does not check if the sender is authorized or not to operate on the `tokenId`. + +::: + +```solidity +function _transfer( + address from, + address to, + bytes32 tokenId, + bool allowNonLSP1Recipient, + bytes data +) internal nonpayable; +``` + +Change the owner of the `tokenId` from `from` to `to`. +Both the sender and recipient will be notified of the `tokenId` being transferred through their LSP1 [`universalReceiver`](#universalreceiver) +function, if they are contracts that support the LSP1 interface. Their `universalReceiver` function will receive +all the parameters in the calldata packed encoded. +Any logic in the [`_beforeTokenTransfer`](#_beforetokentransfer) function will run before changing the owner of `tokenId`. + ++ +**Emitted events:** + +- [`Transfer`](#transfer) event. + ++ +#### Parameters + +| Name | Type | Description | +| ----------------------- | :-------: | -------------------------------------------------------------------------------------------------------------------------- | +| `from` | `address` | The sender address. | +| `to` | `address` | @param tokenId The token to transfer. | +| `tokenId` | `bytes32` | The token to transfer. | +| `allowNonLSP1Recipient` | `bool` | When set to `true`, `to` may be any address. When set to `false`, `to` must be a contract that supports the LSP1 standard. | +| `data` | `bytes` | Additional data the caller wants included in the emitted event, and sent in the hooks to `from` and `to` addresses. | + +
+ +### \_beforeTokenTransfer + +```solidity +function _beforeTokenTransfer( + address from, + address to, + bytes32 tokenId +) internal nonpayable; +``` + +Hook that is called before any token transfer, including minting and burning. + +- Allows to run custom logic before updating balances and notifiying sender/recipient by overriding this function. + +#### Parameters + +| Name | Type | Description | +| --------- | :-------: | -------------------------------------- | +| `from` | `address` | The sender address | +| `to` | `address` | @param tokenId The tokenId to transfer | +| `tokenId` | `bytes32` | The tokenId to transfer | + +
+ +### \_notifyTokenSender + +```solidity +function _notifyTokenSender(address from, bytes lsp1Data) internal nonpayable; +``` + +An attempt is made to notify the token sender about the `tokenId` changing owners using +LSP1 interface. + +
+ +### \_notifyTokenReceiver + +```solidity +function _notifyTokenReceiver( + address to, + bool allowNonLSP1Recipient, + bytes lsp1Data +) internal nonpayable; +``` + +An attempt is made to notify the token receiver about the `tokenId` changing owners +using LSP1 interface. When allowNonLSP1Recipient is FALSE the token receiver MUST support LSP1. +The receiver may revert when the token being sent is not wanted. + +
## Events ### AuthorizedOperator -:::note Links +:::note References -- Specification details in [**LSP-8-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Mintable.md#authorizedoperator) -- Solidity implementation in [**LSP8Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#authorizedoperator) +- 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)` -- Event hash: `0x34b797fc5a526f7bf1d2b5de25f6564fd85ae364e3ee939aee7c1ac27871a988` +- Event topic hash: `0x34b797fc5a526f7bf1d2b5de25f6564fd85ae364e3ee939aee7c1ac27871a988` ::: @@ -624,7 +907,7 @@ Transfers ownership of the contract to a new account (`newOwner`). Can only be c event AuthorizedOperator(address indexed operator, address indexed tokenOwner, bytes32 indexed tokenId); ``` -Emitted when `tokenOwner` enables `operator` to transfer or burn `tokenId` on its behalf. +Emitted when `tokenOwner` enables `operator` to transfer or burn the `tokenId`. #### Parameters @@ -634,14 +917,16 @@ Emitted when `tokenOwner` enables `operator` to transfer or burn `tokenId` on it | `tokenOwner` **`indexed`** | `address` | The owner of the `tokenId`. | | `tokenId` **`indexed`** | `bytes32` | The tokenId `operator` address has access on behalf of `tokenOwner`. | +
+ ### DataChanged -:::note Links +:::note References -- Specification details in [**LSP-8-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Mintable.md#datachanged) -- Solidity implementation in [**LSP8Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Mintable) +- 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 hash: `0xece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2` +- Event topic hash: `0xece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b2` ::: @@ -649,25 +934,25 @@ Emitted when `tokenOwner` enables `operator` to transfer or burn `tokenId` on it 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`. +_Emitted when data at a key is changed_ #### 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 | +| ----------------------- | :-------: | ------------------------------------ | +| `dataKey` **`indexed`** | `bytes32` | The data key which data value is set | +| `dataValue` | `bytes` | The data value to set | + +
### OwnershipTransferred -:::note Links +:::note References -- Specification details in [**LSP-8-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Mintable.md#ownershiptransferred) -- Solidity implementation in [**LSP8Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#ownershiptransferred) +- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol) - Event signature: `OwnershipTransferred(address,address)` -- Event hash: `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0` +- Event topic hash: `0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0` ::: @@ -682,14 +967,16 @@ event OwnershipTransferred(address indexed previousOwner, address indexed newOwn | `previousOwner` **`indexed`** | `address` | - | | `newOwner` **`indexed`** | `address` | - | +
+ ### RevokedOperator -:::note Links +:::note References -- Specification details in [**LSP-8-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Mintable.md#revokedoperator) -- Solidity implementation in [**LSP8Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#revokedoperator) +- 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)` -- Event hash: `0x17d5389f6ab6adb2647dfa0aa365c323d37adacc30b33a65310b6158ce1373d5` +- Event topic hash: `0x17d5389f6ab6adb2647dfa0aa365c323d37adacc30b33a65310b6158ce1373d5` ::: @@ -701,20 +988,22 @@ Emitted when `tokenOwner` disables `operator` to transfer or burn `tokenId` on i #### Parameters -| Name | Type | Description | -| -------------------------- | :-------: | ---------------------------------------------------- | -| `operator` **`indexed`** | `address` | The address revoked as an operator. | -| `tokenOwner` **`indexed`** | `address` | The owner of the `tokenId`. | -| `tokenId` **`indexed`** | `bytes32` | The tokenId `operator` is revoked from operating on. | +| Name | Type | Description | +| -------------------------- | :-------: | --------------------------------------------------------------- | +| `operator` **`indexed`** | `address` | The address revoked from the operator array ({getOperatorsOf}). | +| `tokenOwner` **`indexed`** | `address` | The owner of the `tokenId`. | +| `tokenId` **`indexed`** | `bytes32` | The tokenId `operator` is revoked from operating on. | + +
### Transfer -:::note Links +:::note References -- Specification details in [**LSP-8-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Mintable.md#transfer) -- Solidity implementation in [**LSP8Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#transfer) +- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol) - Event signature: `Transfer(address,address,address,bytes32,bool,bytes)` -- Event hash: `0xb333c813a7426a7a11e2b190cad52c44119421594b47f6f32ace6d8c7207b2bf` +- Event topic hash: `0xb333c813a7426a7a11e2b190cad52c44119421594b47f6f32ace6d8c7207b2bf` ::: @@ -735,16 +1024,16 @@ Emitted when `tokenId` token is transferred from the `from` to the `to` address. | `allowNonLSP1Recipient` | `bool` | If the token transfer enforces the `to` recipient address to be a contract that implements the LSP1 standard or not. | | `data` | `bytes` | Any additional data the caller included by the caller during the transfer, and sent in the hooks to the `from` and `to` addresses. | ---- +
## Errors ### ERC725Y_DataKeysValuesEmptyArray -:::note Links +:::note References -- Specification details in [**LSP-8-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Mintable.md#erc725y_datakeysvaluesemptyarray) -- Solidity implementation in [**LSP8Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#erc725y_datakeysvaluesemptyarray) +- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol) - Error signature: `ERC725Y_DataKeysValuesEmptyArray()` - Error hash: `0x97da5f95` @@ -754,14 +1043,16 @@ Emitted when `tokenId` token is transferred from the `from` to the `to` address. error ERC725Y_DataKeysValuesEmptyArray(); ``` -Reverts when one of the array parameter provided to [`setDataBatch`](#setdatabatch) function is an empty array. +reverts when one of the array parameter provided to `setDataBatch` is an empty array + +
### ERC725Y_DataKeysValuesLengthMismatch -:::note Links +:::note References -- Specification details in [**LSP-8-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Mintable.md#erc725y_datakeysvalueslengthmismatch) -- Solidity implementation in [**LSP8Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#erc725y_datakeysvalueslengthmismatch) +- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol) - Error signature: `ERC725Y_DataKeysValuesLengthMismatch()` - Error hash: `0x3bcc8979` @@ -771,14 +1062,16 @@ Reverts when one of the array parameter provided to [`setDataBatch`](#setdatabat error ERC725Y_DataKeysValuesLengthMismatch(); ``` -Reverts when there is not the same number of elements in the `datakeys` and `dataValues` array parameters provided when calling the [`setDataBatch`](#setdatabatch) function. +reverts when there is not the same number of elements in the lists of data keys and data values when calling setDataBatch. + +
### ERC725Y_MsgValueDisallowed -:::note Links +:::note References -- Specification details in [**LSP-8-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Mintable.md#erc725y_msgvaluedisallowed) -- Solidity implementation in [**LSP8Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#erc725y_msgvaluedisallowed) +- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol) - Error signature: `ERC725Y_MsgValueDisallowed()` - Error hash: `0xf36ba737` @@ -788,14 +1081,16 @@ Reverts when there is not the same number of elements in the `datakeys` and `dat error ERC725Y_MsgValueDisallowed(); ``` -Reverts when sending value to the [`setData`](#setdata) or [`setDataBatch`](#setdatabatch) function. +reverts when sending value to the `setData(..)` functions + +
### LSP4TokenNameNotEditable -:::note Links +:::note References -- Specification details in [**LSP-8-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Mintable.md#lsp4tokennamenoteditable) -- Solidity implementation in [**LSP8Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp4tokennamenoteditable) +- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol) - Error signature: `LSP4TokenNameNotEditable()` - Error hash: `0x85c169bd` @@ -807,12 +1102,14 @@ 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. +
+ ### LSP4TokenSymbolNotEditable -:::note Links +:::note References -- Specification details in [**LSP-8-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Mintable.md#lsp4tokensymbolnoteditable) -- Solidity implementation in [**LSP8Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp4tokensymbolnoteditable) +- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol) - Error signature: `LSP4TokenSymbolNotEditable()` - Error hash: `0x76755b38` @@ -824,12 +1121,14 @@ 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. +
+ ### LSP8CannotSendToAddressZero -:::note Links +:::note References -- Specification details in [**LSP-8-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Mintable.md#lsp8cannotsendtoaddresszero) -- Solidity implementation in [**LSP8Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8cannotsendtoaddresszero) +- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol) - Error signature: `LSP8CannotSendToAddressZero()` - Error hash: `0x24ecef4d` @@ -841,12 +1140,14 @@ error LSP8CannotSendToAddressZero(); reverts when trying to send token to the zero address. +
+ ### LSP8CannotSendToSelf -:::note Links +:::note References -- Specification details in [**LSP-8-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Mintable.md#lsp8cannotsendtoself) -- Solidity implementation in [**LSP8Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8cannotsendtoself) +- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol) - Error signature: `LSP8CannotSendToSelf()` - Error hash: `0x5d67d6c1` @@ -858,12 +1159,14 @@ error LSP8CannotSendToSelf(); reverts when specifying the same address for `from` and `to` in a token transfer. +
+ ### LSP8CannotUseAddressZeroAsOperator -:::note Links +:::note References -- Specification details in [**LSP-8-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Mintable.md#lsp8cannotuseaddresszeroasoperator) -- Solidity implementation in [**LSP8Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8cannotuseaddresszeroasoperator) +- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol) - Error signature: `LSP8CannotUseAddressZeroAsOperator()` - Error hash: `0x9577b8b3` @@ -875,12 +1178,14 @@ error LSP8CannotUseAddressZeroAsOperator(); reverts when trying to set the zero address as an operator. +
+ ### LSP8InvalidTransferBatch -:::note Links +:::note References -- Specification details in [**LSP-8-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Mintable.md#lsp8invalidtransferbatch) -- Solidity implementation in [**LSP8Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8invalidtransferbatch) +- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol) - Error signature: `LSP8InvalidTransferBatch()` - Error hash: `0x93a83119` @@ -892,12 +1197,14 @@ error LSP8InvalidTransferBatch(); reverts when the parameters used for `transferBatch` have different lengths. +
+ ### LSP8NonExistentTokenId -:::note Links +:::note References -- Specification details in [**LSP-8-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Mintable.md#lsp8nonexistenttokenid) -- Solidity implementation in [**LSP8Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8nonexistenttokenid) +- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol) - Error signature: `LSP8NonExistentTokenId(bytes32)` - Error hash: `0xae8f9a36` @@ -915,12 +1222,14 @@ reverts when `tokenId` has not been minted. | --------- | :-------: | ----------- | | `tokenId` | `bytes32` | - | +
+ ### LSP8NonExistingOperator -:::note Links +:::note References -- Specification details in [**LSP-8-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Mintable.md#lsp8nonexistingoperator) -- Solidity implementation in [**LSP8Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8nonexistingoperator) +- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol) - Error signature: `LSP8NonExistingOperator(address,bytes32)` - Error hash: `0x4aa31a8c` @@ -939,12 +1248,14 @@ reverts when `operator` is not an operator for the `tokenId`. | `operator` | `address` | - | | `tokenId` | `bytes32` | - | +
+ ### LSP8NotTokenOperator -:::note Links +:::note References -- Specification details in [**LSP-8-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Mintable.md#lsp8nottokenoperator) -- Solidity implementation in [**LSP8Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8nottokenoperator) +- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol) - Error signature: `LSP8NotTokenOperator(bytes32,address)` - Error hash: `0x1294d2a9` @@ -963,12 +1274,14 @@ reverts when `caller` is not an allowed operator for `tokenId`. | `tokenId` | `bytes32` | - | | `caller` | `address` | - | +
+ ### LSP8NotTokenOwner -:::note Links +:::note References -- Specification details in [**LSP-8-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Mintable.md#lsp8nottokenowner) -- Solidity implementation in [**LSP8Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8nottokenowner) +- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol) - Error signature: `LSP8NotTokenOwner(address,bytes32,address)` - Error hash: `0x5b271ea2` @@ -988,12 +1301,14 @@ reverts when `caller` is not the `tokenOwner` of the `tokenId`. | `tokenId` | `bytes32` | - | | `caller` | `address` | - | +
+ ### LSP8NotifyTokenReceiverContractMissingLSP1Interface -:::note Links +:::note References -- Specification details in [**LSP-8-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Mintable.md#lsp8notifytokenreceivercontractmissinglsp1interface) -- Solidity implementation in [**LSP8Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8notifytokenreceivercontractmissinglsp1interface) +- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol) - Error signature: `LSP8NotifyTokenReceiverContractMissingLSP1Interface(address)` - Error hash: `0x4349776d` @@ -1013,12 +1328,14 @@ reverts if the `tokenReceiver` does not implement LSP1 when minting or transferr | --------------- | :-------: | ----------- | | `tokenReceiver` | `address` | - | +
+ ### LSP8NotifyTokenReceiverIsEOA -:::note Links +:::note References -- Specification details in [**LSP-8-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Mintable.md#lsp8notifytokenreceiveriseoa) -- Solidity implementation in [**LSP8Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8notifytokenreceiveriseoa) +- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol) - Error signature: `LSP8NotifyTokenReceiverIsEOA(address)` - Error hash: `0x03173137` @@ -1036,12 +1353,14 @@ reverts if the `tokenReceiver` is an EOA when minting or transferring tokens wit | --------------- | :-------: | ----------- | | `tokenReceiver` | `address` | - | +
+ ### LSP8OperatorAlreadyAuthorized -:::note Links +:::note References -- Specification details in [**LSP-8-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Mintable.md#lsp8operatoralreadyauthorized) -- Solidity implementation in [**LSP8Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8operatoralreadyauthorized) +- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol) - Error signature: `LSP8OperatorAlreadyAuthorized(address,bytes32)` - Error hash: `0xa7626b68` @@ -1060,12 +1379,14 @@ reverts when `operator` is already authorized for the `tokenId`. | `operator` | `address` | - | | `tokenId` | `bytes32` | - | +
+ ### LSP8TokenIdAlreadyMinted -:::note Links +:::note References -- Specification details in [**LSP-8-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Mintable.md#lsp8tokenidalreadyminted) -- Solidity implementation in [**LSP8Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenidalreadyminted) +- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol) - Error signature: `LSP8TokenIdAlreadyMinted(bytes32)` - Error hash: `0x34c7b511` @@ -1083,12 +1404,14 @@ reverts when `tokenId` has already been minted. | --------- | :-------: | ----------- | | `tokenId` | `bytes32` | - | +
+ ### LSP8TokenOwnerCannotBeOperator -:::note Links +:::note References -- Specification details in [**LSP-8-Mintable**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-Mintable.md#lsp8tokenownercannotbeoperator) -- Solidity implementation in [**LSP8Mintable**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8Mintable) +- Specification details: [**LSP-8-IdentifiableDigitalAsset**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-8-IdentifiableDigitalAsset.md#lsp8tokenownercannotbeoperator) +- Solidity implementation: [`LSP8Mintable.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol) - Error signature: `LSP8TokenOwnerCannotBeOperator()` - Error hash: `0x89fdad62` @@ -1100,193 +1423,4 @@ error LSP8TokenOwnerCannotBeOperator(); reverts when trying to authorize or revoke the token's owner as an operator. - - - - - - -[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/nft-2.0/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/nft-2.0/LSP7-Digital-Asset -[LSP8IdentifiableDigitalAsset]: https://docs.lukso.tech/standards/nft-2.0/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/LSP9Vault/LSP9Vault.md b/docs/contracts/contracts/LSP9Vault/LSP9Vault.md index c6a6851fba..a8bd3d6265 100644 --- a/docs/contracts/contracts/LSP9Vault/LSP9Vault.md +++ b/docs/contracts/contracts/LSP9Vault/LSP9Vault.md @@ -1,23 +1,34 @@ + + + # LSP9Vault -:::info Soldity contract +:::info Standard Specifications + +[`LSP-9-Vault`](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-9-Vault.md) + +::: +:::info Solidity implementation -[`LSP9Vault.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/contracts/LSP9Vault/LSP9Vault.sol) +[`LSP9Vault.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP9Vault/LSP9Vault.sol) ::: > Implementation of LSP9Vault built on top of [ERC725], [LSP-1-UniversalReceiver] -Could be owned by an EOA or by a contract and is able to receive and send assets. Also allows for registering received assets by levereging the key-value storage. +Could be owned by an EOA or by a contract and is able to receive and send assets. Also allows for registering received assets by leveraging the key-value storage. + +## Public Methods -## Methods +Public methods are accessible externally from users, allowing interaction with this function from dApps or other smart contracts. +When marked as 'public', a method can be called both externally and internally, on the other hand, when marked as 'external', a method can only be called externally. ### constructor -:::note Links +:::note References -- Specification details in [**LSP-9-Vault**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-9-Vault.md#constructor) -- Solidity implementation in [**LSP9Vault**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/contracts/LSP9Vault/LSP9Vault.sol) +- Specification details: [**LSP-9-Vault**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-9-Vault.md#constructor) +- Solidity implementation: [`LSP9Vault.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP9Vault/LSP9Vault.sol) ::: @@ -25,9 +36,20 @@ Could be owned by an EOA or by a contract and is able to receive and send assets constructor(address newOwner); ``` -_New owner set, `newOwner`._ +_Deploying a LSP9Vault contract with owner set to address `initialOwner`._ + +Sets `initialOwner` as the contract owner and the `SupportedStandards:LSP9Vault` Data Key. The `constructor` also allows funding the contract on deployment. + ++ +**Emitted events:** + +- [`ValueReceived`](#valuereceived) event when funding the contract on deployment. +- [`OwnershipTransferred`](#ownershiptransferred) event when `initialOwner` is set as the contract [`owner`](#owner). +- [`DataChanged`](#datachanged) event when setting the [`_LSP9_SUPPORTED_STANDARDS_KEY`](#_lsp9_supported_standards_key). +- [`UniversalReceiver`](#universalreceiver) event when notifying the `initialOwner`. -Sets the owner of the contract and sets the `SupportedStandards:LSP9Vault` Data Key. +#### Parameters @@ -35,43 +57,57 @@ Sets the owner of the contract and sets the `SupportedStandards:LSP9Vault` Data | ---------- | :-------: | ------------------------------ | | `newOwner` | `address` | The new owner of the contract. | +
+ ### fallback -:::note Links +:::note References -- Specification details in [**LSP-9-Vault**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-9-Vault.md#fallback) -- Solidity implementation in [**LSP9Vault**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/contracts/LSP9Vault/LSP9Vault.sol) +- Specification details: [**LSP-9-Vault**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-9-Vault.md#fallback) +- Solidity implementation: [`LSP9Vault.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP9Vault/LSP9Vault.sol) ::: ```solidity -fallback() external payable; +fallback(bytes calldata callData) external payable returns (bytes memory); ``` -Forwards the call to an extension contract (address). This address can be retrieved from the ERC725Y data key-value store using the data key below (function selector appended to the prefix): `_LSP17_FALLBACK_EXTENSIONS_HANDLER_ + function-selector`. If there is no extension stored under the data key, return. -The call to the extension is appended with bytes20 (msg.sender) and bytes32 (msg.value). -Returns the return value on success and revert in case of failure. -If the `msg.data` is shorter than 4 bytes do not check for an extension and return. -Executed when: +_The `fallback` function was called with the following amount of native tokens: `msg.value`; and the following calldata: `callData`._ + +Achieves the goal of [LSP-17-ContractExtension] standard by extending the contract to handle calls of functions that do not exist natively, +forwarding the function call to the extension address mapped to the function being called. +This function is executed when: + +- Sending data of length less than 4 bytes to the contract. - The first 4 bytes of the calldata do not match any publicly callable functions from the contract ABI. - Receiving native tokens with some calldata. +1. If the data is equal or longer than 4 bytes, the [ERC-725Y] storage is queried with the following data key: [_LSP17_EXTENSION_PREFIX] + `bytes4(msg.sig)` (Check [LSP-2-ERC725YJSONSchema] for encoding the data key) + +- If there is no address stored under the following data key, revert with [`NoExtensionFoundForFunctionSelector(bytes4)`](#noextensionfoundforfunctionselector). The data key relative to `bytes4(0)` is an exception, where no reverts occurs if there is no extension address stored under. This exception is made to allow users to send random data (graffiti) to the account and to be able to react on it. + +- If there is an address, forward the `msg.data` to the extension using the CALL opcode, appending 52 bytes (20 bytes of `msg.sender` and 32 bytes of `msg.value`). Return what the calls returns, or revert if the call failed. + +2. If the data sent to this function is of length less than 4 bytes (not a function selector), return. +**Emitted events:** -- [`ValueReceived`](#valuereceived) when receiving native tokens. +- [`ValueReceived`](#valuereceived) event when receiving native tokens.+
+ ### receive -:::note Links +:::note References -- Specification details in [**LSP-9-Vault**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-9-Vault.md#receive) -- Solidity implementation in [**LSP9Vault**](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/contracts/LSP9Vault/LSP9Vault.sol) +- Specification details: [**LSP-9-Vault**](https://github.com/lukso-network/lips/tree/main/LSPs/LSP-9-Vault.md#receive) +- Solidity implementation: [`LSP9Vault.sol`](https://github.com/lukso-network/lsp-smart-contracts/blob/develop/contracts/LSP9Vault/LSP9Vault.sol) ::: @@ -93,12 +129,14 @@ Executed:
**Requirements:** -- When notifying the previous owner via LSP1, the typeId used MUST be `keccak256('LSP9OwnershipTransferred_SenderNotification')` -- When notifying the new owner via LSP1, the typeId used MUST be `keccak256('LSP9OwnershipTransferred_RecipientNotification')` +- Only the [`pendingOwner`](#pendingowner) can call this function. +- When notifying the previous owner via LSP1, the typeId used must be the `keccak256(...)` hash of [LSP0OwnershipTransferred_SenderNotification]. +- When notifying the new owner via LSP1, the typeId used must be the `keccak256(...)` hash of [LSP0OwnershipTransferred_RecipientNotification].+
+ +**Requirements:** + +- Can be only called by the [`owner`](#owner) or by an authorised address that pass the verification check performed on the owner. +- If a `value` is provided, the contract must have at least this amount in its balance to execute successfully. +- If the operation type is `CREATE` (1) or `CREATE2` (2), `target` must be `address(0)`. +- If the operation type is `STATICCALL` (3), `value` transfer is disallowed and must be 0. + +
**Emitted events:** -- [`Executed`](#executed) event, when a call is executed under `operationType` 0 and 3. -- [`ContractCreated`](#contractcreated) event, when a contract is created under `operationType` 1 and 2. -- [`ValueReceived`](#valuereceived) event, when receives native token. +- [`Executed`](#executed) event for each call that uses under `operationType`: `CALL` (0) and `STATICCALL` (3). +- [`ContractCreated`](#contractcreated) event, when a contract is created under `operationType`: `CREATE` (1) and `CREATE2` (2). +- [`ValueReceived`](#valuereceived) event when receiving native tokens.@@ -253,7 +327,7 @@ Generic executor function to: | `operationType` | `uint256` | The operation type used: CALL = 0; CREATE = 1; CREATE2 = 2; STATICCALL = 3; DELEGATECALL = 4 | | `target` | `address` | The address of the EOA or smart contract. (unused if a contract is created via operation type 1 or 2) | | `value` | `uint256` | The amount of native tokens to transfer (in Wei) | -| `data` | `bytes` | The call data, or the creation bytecode of the contract to deploy if `operationType` is `1` or `2`. | +| `data` | `bytes` | The call data, or the creation bytecode of the contract to deploy | #### Returns @@ -261,12 +335,14 @@ Generic executor function to: | ---- | :-----: | ----------- | | `0` | `bytes` | - | +
+ +**Requirements:** + +- The length of the parameters provided must be equal. +- Can be only called by the [`owner`](#owner) or by an authorised address that pass the verification check performed on the owner. +- If a `value` is provided, the contract must have at least this amount in its balance to execute successfully. +- If the operation type is `CREATE` (1) or `CREATE2` (2), `target` must be `address(0)`. +- If the operation type is `STATICCALL` (3), `value` transfer is disallowed and must be 0. + +
**Emitted events:** -- [`Executed`](#executed) event, when a call is executed under `operationType` 0 and 3. -- [`ContractCreated`](#contractcreated) event, when a contract is created under `operationType` 1 and 2. -- [`ValueReceived`](#valuereceived) event, when receives native token. +- [`Executed`](#executed) event for each call that uses under `operationType`: `CALL` (0) and `STATICCALL` (3). (each iteration) +- [`ContractCreated`](#contractcreated) event, when a contract is created under `operationType`: `CREATE` (1) and `CREATE2` (2). (each iteration) +- [`ValueReceived`](#valuereceived) event when receiving native tokens.#### Parameters -| Name | Type | Description | -| ---------------- | :---------: | --------------------------------------------------------------------------------------------------------------- | -| `operationsType` | `uint256[]` | The list of operations type used: `CALL = 0`; `CREATE = 1`; `CREATE2 = 2`; `STATICCALL = 3`; `DELEGATECALL = 4` | -| `targets` | `address[]` | The list of addresses to call. `targets` will be unused if a contract is created (operation types 1 and 2). | -| `values` | `uint256[]` | The list of native token amounts to transfer (in Wei). | -| `datas` | `bytes[]` | The list of calldata, or the creation bytecode of the contract to deploy if `operationType` is `1` or `2`. | +| Name | Type | Description | +| ---------------- | :---------: | ----------------------------------------------------------------------------------------------------------- | +| `operationsType` | `uint256[]` | The list of operations type used: CALL = 0; CREATE = 1; CREATE2 = 2; STATICCALL = 3; DELEGATECALL = 4 | +| `targets` | `address[]` | The list of addresses to call. `targets` will be unused if a contract is created (operation types 1 and 2). | +| `values` | `uint256[]` | The list of native token amounts to transfer (in Wei) | +| `datas` | `bytes[]` | The list of call data, or the creation bytecode of the contract to deploy | #### Returns @@ -316,12 +418,14 @@ Batch executor function that behaves the same as [`execute`](#execute) but allow | ---- | :-------: | ----------- | | `0` | `bytes[]` | - | +
+ +**Requirements:** + +- Can be only called by the [`owner`](#owner) or by an authorised address that pass the verification check performed on the owner. + ++ +
+ +**Requirements:** + +- Can be only called by the [`owner`](#owner) or by an authorised address that pass the verification check performed on the owner. + +
**Emitted events:** +- [`ValueReceived`](#valuereceived) event when receiving native tokens. - [`DataChanged`](#datachanged) event.#### Parameters -| Name | Type | Description | -| ----------- | :-------: | ------------------------------------------ | -| `dataKey` | `bytes32` | The data key for which to set a new value. | -| `dataValue` | `bytes` | The new bytes value to set. | +| Name | Type | Description | +| ----------- | :-------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `dataKey` | `bytes32` | The key to retrieve stored value | +| `dataValue` | `bytes` | The value to set SHOULD only be callable by the owner of the contract set via ERC173 The function is marked as payable to enable flexibility on child contracts If the function is not intended to receive value, an additional check should be implemented to check that value equal 0. Emits a {DataChanged} event. | + +
+ +**Requirements:** + +- Can be only called by the [`owner`](#owner) or by an authorised address that pass the verification check performed on the owner. -Batch data setting function that behaves the same as [`setData`](#setdata) but allowing to set multiple data key/value pairs in the ERC725Y storage in the same transaction. +
**Emitted events:** -- [`DataChanged`](#datachanged) event. +- [`ValueReceived`](#valuereceived) event when receiving native tokens. +- [`DataChanged`](#datachanged) event. (on each iteration of setting data)#### Parameters -| Name | Type | Description | -| ------------ | :---------: | ---------------------------------------------------- | -| `dataKeys` | `bytes32[]` | An array of data keys to set bytes values for. | -| `dataValues` | `bytes[]` | An array of bytes values to set for each `dataKeys`. | +| Name | Type | Description | +| ------------ | :---------: | ---------------------------------------- | +| `dataKeys` | `bytes32[]` | The array of data keys for values to set | +| `dataValues` | `bytes[]` | The array of values to set | + +
**Requirements:** -- When notifying the new owner via LSP1, the typeId used MUST be `keccak256('LSP9OwnershipTransferStarted')` +- Can be only called by the [`owner`](#owner) or by an authorised address that pass the verification check performed on the owner. +- When notifying the new owner via LSP1, the `typeId` used must be the `keccak256(...)` hash of [LSP0OwnershipTransferStarted]. +- Pending owner cannot accept ownership in the same tx via the LSP1 hook.@@ -573,14 +733,16 @@ Initiate the process of transferring ownership of the contract by setting the ne | Name | Type | Description | | ---------- | :-------: | ----------------------------- | -| `newOwner` | `address` | the address of the new owner. | +| `newOwner` | `address` | The address of the new owner. | + +
**Emitted events:** -- [`UniversalReceiver`](#universalreceiver) when this function gets executed successfully. +- [`ValueReceived`](#valuereceived) when receiving native tokens. +- [`UniversalReceiver`](#universalreceiver) event with the function parameters, call options, and the response of the UniversalReceiverDelegates (URD) contract that was called.@@ -612,20 +789,359 @@ _Forwards the call to the addresses stored in the [ERC725Y] storage under the th #### Returns -| Name | Type | Description | -| ---------------- | :-----: | ------------------------------------------------------------------------------------------------------------------------------ | -| `returnedValues` | `bytes` | The ABI encoded return value of the the Vault version of [LSP1UniversalReceiverDelegate] call and the LSP1TypeIdDelegate call. | +| Name | Type | Description | +| ---------------- | :-----: | ------------------------------------------------------------------------------------------------------- | +| `returnedValues` | `bytes` | The ABI encoded return value of the LSP1UniversalReceiverDelegate call and the LSP1TypeIdDelegate call. | + +
+ +**Emitted events:** + +- [`DataChanged`](#datachanged) event with only the first 256 bytes of [`dataValue`](#datavalue). + ++ +#### Parameters + +| Name | Type | Description | +| ----------- | :-------: | -------------------------------------- | +| `dataKey` | `bytes32` | The key to store the data value under. | +| `dataValue` | `bytes` | The data value to be stored. | + +
+ +**Requirements:** + +- `newOwner` cannot be the address of the contract itself. + ++ +#### Parameters + +| Name | Type | Description | +| ---------- | :-------: | ------------------------------------- | +| `newOwner` | `address` | The address of the new pending owner. | + +
+ +**Emitted events:** + +- [`ValueReceived`](#valuereceived) event when funding the contract on deployment. +- [`OwnershipTransferred`](#ownershiptransferred) event when `initialOwner` is set as the contract [`owner`](#owner). +- [`DataChanged`](#datachanged) event when setting the [`_LSP3_SUPPORTED_STANDARDS_KEY`](#_lsp3_supported_standards_key). + ++ +#### Parameters + +| Name | Type | Description | +| -------------- | :-------: | ------------------------- | +| `initialOwner` | `address` | the owner of the contract | + +
+ +**Requirements:** + +- Only the [`pendingOwner`](#pendingowner) can call this function. +- When notifying the previous owner via LSP1, the typeId used must be the `keccak256(...)` hash of [LSP0OwnershipTransferred_SenderNotification]. +- When notifying the new owner via LSP1, the typeId used must be the `keccak256(...)` hash of [LSP0OwnershipTransferred_RecipientNotification]. + ++ +
+ +**Requirements:** + +- Can be only called by the [`owner`](#owner) or by an authorised address that pass the verification check performed on the owner. +- If a `value` is provided, the contract must have at least this amount in its balance to execute successfully. +- If the operation type is `CREATE` (1) or `CREATE2` (2), `target` must be `address(0)`. +- If the operation type is `STATICCALL` (3) or `DELEGATECALL` (4), `value` transfer is disallowed and must be 0. + ++ +
+ +**Emitted events:** + +- [`Executed`](#executed) event for each call that uses under `operationType`: `CALL` (0), `STATICCALL` (3) and `DELEGATECALL` (4). +- [`ContractCreated`](#contractcreated) event, when a contract is created under `operationType`: `CREATE` (1) and `CREATE2` (2). +- [`ValueReceived`](#valuereceived) event when receiving native tokens. + ++ +#### Parameters + +| Name | Type | Description | +| --------------- | :-------: | ----------------------------------------------------------------------------------------------------- | +| `operationType` | `uint256` | The operation type used: CALL = 0; CREATE = 1; CREATE2 = 2; STATICCALL = 3; DELEGATECALL = 4 | +| `target` | `address` | The address of the EOA or smart contract. (unused if a contract is created via operation type 1 or 2) | +| `value` | `uint256` | The amount of native tokens to transfer (in Wei) | +| `data` | `bytes` | The call data, or the creation bytecode of the contract to deploy | + +#### Returns + +| Name | Type | Description | +| ---- | :-----: | ----------- | +| `0` | `bytes` | - | + +
+ +**Requirements:** + +- The length of the parameters provided must be equal. +- Can be only called by the [`owner`](#owner) or by an authorised address that pass the verification check performed on the owner. +- If a `value` is provided, the contract must have at least this amount in its balance to execute successfully. +- If the operation type is `CREATE` (1) or `CREATE2` (2), `target` must be `address(0)`. +- If the operation type is `STATICCALL` (3) or `DELEGATECALL` (4), `value` transfer is disallowed and must be 0. + ++ +
+ +**Emitted events:** + +- [`Executed`](#executed) event for each call that uses under `operationType`: `CALL` (0), `STATICCALL` (3) and `DELEGATECALL` (4). (each iteration) +- [`ContractCreated`](#contractcreated) event, when a contract is created under `operationType`: `CREATE` (1) and `CREATE2` (2) (each iteration) +- [`ValueReceived`](#valuereceived) event when receiving native tokens. + ++ +#### Parameters + +| Name | Type | Description | +| ---------------- | :---------: | ----------------------------------------------------------------------------------------------------------- | +| `operationsType` | `uint256[]` | The list of operations type used: CALL = 0; CREATE = 1; CREATE2 = 2; STATICCALL = 3; DELEGATECALL = 4 | +| `targets` | `address[]` | The list of addresses to call. `targets` will be unused if a contract is created (operation types 1 and 2). | +| `values` | `uint256[]` | The list of native token amounts to transfer (in Wei) | +| `datas` | `bytes[]` | The list of call data, or the creation bytecode of the contract to deploy | + +#### Returns + +| Name | Type | Description | +| ---- | :-------: | ----------- | +| `0` | `bytes[]` | - | + +
+ +**Requirements:** + +- Can be only called by the [`owner`](#owner) or by an authorised address that pass the verification check performed on the owner. + ++ +
+ +**Requirements:** + +- Can be only called by the [`owner`](#owner) or by an authorised address that pass the verification check performed on the owner. + ++ +
+ +**Emitted events:** + +- [`ValueReceived`](#valuereceived) event when receiving native tokens. +- [`DataChanged`](#datachanged) event. + ++ +#### Parameters + +| Name | Type | Description | +| ----------- | :-------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `dataKey` | `bytes32` | The key to retrieve stored value | +| `dataValue` | `bytes` | The value to set SHOULD only be callable by the owner of the contract set via ERC173 The function is marked as payable to enable flexibility on child contracts If the function is not intended to receive value, an additional check should be implemented to check that value equal 0. Emits a {DataChanged} event. | + +
+ +**Requirements:** + +- Can be only called by the [`owner`](#owner) or by an authorised address that pass the verification check performed on the owner. + ++ +
+ +**Emitted events:** + +- [`ValueReceived`](#valuereceived) event when receiving native tokens. +- [`DataChanged`](#datachanged) event. (on each iteration of setting data) + ++ +#### Parameters + +| Name | Type | Description | +| ------------ | :---------: | ---------------------------------------- | +| `dataKeys` | `bytes32[]` | The array of data keys for values to set | +| `dataValues` | `bytes[]` | The array of values to set | + +
+ +**Requirements:** + +- Can be only called by the [`owner`](#owner) or by an authorised address that pass the verification check performed on the owner. +- When notifying the new owner via LSP1, the `typeId` used must be the `keccak256(...)` hash of [LSP0OwnershipTransferStarted]. +- Pending owner cannot accept ownership in the same tx via the LSP1 hook. + ++ +#### Parameters + +| Name | Type | Description | +| ----------------- | :-------: | ----------- | +| `pendingNewOwner` | `address` | - | + +
+ +**Emitted events:** + +- [`ValueReceived`](#valuereceived) when receiving native tokens. +- [`UniversalReceiver`](#universalreceiver) event with the function parameters, call options, and the response of the UniversalReceiverDelegates (URD) contract that was called. + ++ +#### Parameters + +| Name | Type | Description | +| -------------- | :-------: | -------------------------- | +| `typeId` | `bytes32` | The type of call received. | +| `receivedData` | `bytes` | The data received. | + +#### Returns + +| Name | Type | Description | +| ---------------- | :-----: | ------------------------------------------------------------------------------------------------------- | +| `returnedValues` | `bytes` | The ABI encoded return value of the LSP1UniversalReceiverDelegate call and the LSP1TypeIdDelegate call. | + +
+ +**Emitted events:** + +- [`DataChanged`](#datachanged) event with only the first 256 bytes of [`dataValue`](#datavalue). + ++ +#### Parameters + +| Name | Type | Description | +| ----------- | :-------: | -------------------------------------- | +| `dataKey` | `bytes32` | The key to store the data value under. | +| `dataValue` | `bytes` | The data value to be stored. | + +
+ +**Requirements:** + +- `newOwner` cannot be the address of the contract itself. + ++ +#### Parameters + +| Name | Type | Description | +| ---------- | :-------: | ------------------------------------- | +| `newOwner` | `address` | The address of the new pending owner. | + +