diff --git a/contracts/LSP7DigitalAsset/LSP7DigitalAssetCore.sol b/contracts/LSP7DigitalAsset/LSP7DigitalAssetCore.sol index cc153f9b4..3f01760cf 100644 --- a/contracts/LSP7DigitalAsset/LSP7DigitalAssetCore.sol +++ b/contracts/LSP7DigitalAsset/LSP7DigitalAssetCore.sol @@ -391,7 +391,7 @@ abstract contract LSP7DigitalAssetCore is ILSP7DigitalAsset { revert LSP7CannotSendWithAddressZero(); } - _beforeTokenTransfer(address(0), to, amount); + _beforeTokenTransfer(address(0), to, amount, data); // tokens being minted _existingTokens += amount; @@ -400,7 +400,7 @@ abstract contract LSP7DigitalAssetCore is ILSP7DigitalAsset { emit Transfer(msg.sender, address(0), to, amount, force, data); - _afterTokenTransfer(address(0), to, amount); + _afterTokenTransfer(address(0), to, amount, data); bytes memory lsp1Data = abi.encode(address(0), to, amount, data); _notifyTokenReceiver(to, force, lsp1Data); @@ -445,7 +445,7 @@ abstract contract LSP7DigitalAssetCore is ILSP7DigitalAsset { revert LSP7AmountExceedsBalance(balance, from, amount); } - _beforeTokenTransfer(from, address(0), amount); + _beforeTokenTransfer(from, address(0), amount, data); // tokens being burnt _existingTokens -= amount; @@ -462,7 +462,7 @@ abstract contract LSP7DigitalAssetCore is ILSP7DigitalAsset { data: data }); - _afterTokenTransfer(from, address(0), amount); + _afterTokenTransfer(from, address(0), amount, data); bytes memory lsp1Data = abi.encode(from, address(0), amount, data); _notifyTokenSender(from, lsp1Data); @@ -551,14 +551,14 @@ abstract contract LSP7DigitalAssetCore is ILSP7DigitalAsset { revert LSP7AmountExceedsBalance(balance, from, amount); } - _beforeTokenTransfer(from, to, amount); + _beforeTokenTransfer(from, to, amount, data); _tokenOwnerBalances[from] -= amount; _tokenOwnerBalances[to] += amount; emit Transfer(msg.sender, from, to, amount, force, data); - _afterTokenTransfer(from, to, amount); + _afterTokenTransfer(from, to, amount, data); bytes memory lsp1Data = abi.encode(from, to, amount, data); @@ -573,11 +573,13 @@ abstract contract LSP7DigitalAssetCore is ILSP7DigitalAsset { * @param from The sender address * @param to The recipient address * @param amount The amount of token to transfer + * @param data The data sent alongside the transfer */ function _beforeTokenTransfer( address from, address to, - uint256 amount // solhint-disable-next-line no-empty-blocks + uint256 amount, + bytes memory data // solhint-disable-next-line no-empty-blocks ) internal virtual {} /** @@ -587,11 +589,13 @@ abstract contract LSP7DigitalAssetCore is ILSP7DigitalAsset { * @param from The sender address * @param to The recipient address * @param amount The amount of token to transfer + * @param data The data sent alongside the transfer */ function _afterTokenTransfer( address from, address to, - uint256 amount // solhint-disable-next-line no-empty-blocks + uint256 amount, + bytes memory data // solhint-disable-next-line no-empty-blocks ) internal virtual {} /** diff --git a/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetCore.sol b/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetCore.sol index 28a449069..3a0d0e995 100644 --- a/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetCore.sol +++ b/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetCore.sol @@ -373,7 +373,7 @@ abstract contract LSP8IdentifiableDigitalAssetCore is revert LSP8CannotSendToAddressZero(); } - _beforeTokenTransfer(address(0), to, tokenId); + _beforeTokenTransfer(address(0), to, tokenId, data); // Check that `tokenId` was not minted inside the `_beforeTokenTransfer` hook if (_exists(tokenId)) { @@ -388,7 +388,7 @@ abstract contract LSP8IdentifiableDigitalAssetCore is emit Transfer(msg.sender, address(0), to, tokenId, force, data); - _afterTokenTransfer(address(0), to, tokenId); + _afterTokenTransfer(address(0), to, tokenId, data); bytes memory lsp1Data = abi.encode(address(0), to, tokenId, data); _notifyTokenReceiver(to, force, lsp1Data); @@ -419,7 +419,7 @@ abstract contract LSP8IdentifiableDigitalAssetCore is function _burn(bytes32 tokenId, bytes memory data) internal virtual { address tokenOwner = tokenOwnerOf(tokenId); - _beforeTokenTransfer(tokenOwner, address(0), tokenId); + _beforeTokenTransfer(tokenOwner, address(0), tokenId, data); // Re-fetch and update `tokenOwner` in case `tokenId` // was transferred inside the `_beforeTokenTransfer` hook @@ -435,7 +435,7 @@ abstract contract LSP8IdentifiableDigitalAssetCore is emit Transfer(msg.sender, tokenOwner, address(0), tokenId, false, data); - _afterTokenTransfer(tokenOwner, address(0), tokenId); + _afterTokenTransfer(tokenOwner, address(0), tokenId, data); bytes memory lsp1Data = abi.encode( tokenOwner, @@ -491,7 +491,7 @@ abstract contract LSP8IdentifiableDigitalAssetCore is revert LSP8CannotSendToAddressZero(); } - _beforeTokenTransfer(from, to, tokenId); + _beforeTokenTransfer(from, to, tokenId, data); // Re-fetch and update `tokenOwner` in case `tokenId` // was transferred inside the `_beforeTokenTransfer` hook @@ -505,7 +505,7 @@ abstract contract LSP8IdentifiableDigitalAssetCore is emit Transfer(msg.sender, from, to, tokenId, force, data); - _afterTokenTransfer(from, to, tokenId); + _afterTokenTransfer(from, to, tokenId, data); bytes memory lsp1Data = abi.encode(from, to, tokenId, data); @@ -520,11 +520,13 @@ abstract contract LSP8IdentifiableDigitalAssetCore is * @param from The sender address * @param to The recipient address * @param tokenId The tokenId to transfer + * @param data The data sent alongside the transfer */ function _beforeTokenTransfer( address from, address to, - bytes32 tokenId // solhint-disable-next-line no-empty-blocks + bytes32 tokenId, + bytes memory data // solhint-disable-next-line no-empty-blocks ) internal virtual {} /** @@ -534,11 +536,13 @@ abstract contract LSP8IdentifiableDigitalAssetCore is * @param from The sender address * @param to The recipient address * @param tokenId The tokenId to transfer + * @param data The data sent alongside the transfer */ function _afterTokenTransfer( address from, address to, - bytes32 tokenId // solhint-disable-next-line no-empty-blocks + bytes32 tokenId, + bytes memory data // solhint-disable-next-line no-empty-blocks ) internal virtual {} /** diff --git a/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol b/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol index 4a25009ca..b33449412 100644 --- a/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol +++ b/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.sol @@ -39,12 +39,14 @@ abstract contract LSP8Enumerable is LSP8IdentifiableDigitalAsset { * @param from The address sending the `tokenId` (`address(0)` when `tokenId` is being minted). * @param to The address receiving the `tokenId` (`address(0)` when `tokenId` is being burnt). * @param tokenId The bytes32 identifier of the token being transferred. + * @param data The data sent alongside the the token transfer. */ function _beforeTokenTransfer( address from, address to, - bytes32 tokenId - ) internal virtual override(LSP8IdentifiableDigitalAssetCore) { + bytes32 tokenId, + bytes memory data + ) internal virtual override { // `tokenId` being minted if (from == address(0)) { uint256 index = totalSupply(); @@ -65,6 +67,6 @@ abstract contract LSP8Enumerable is LSP8IdentifiableDigitalAsset { delete _tokenIndex[tokenId]; } - super._beforeTokenTransfer(from, to, tokenId); + super._beforeTokenTransfer(from, to, tokenId, data); } } diff --git a/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8EnumerableInitAbstract.sol b/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8EnumerableInitAbstract.sol index 18ca0e8fc..c1283282b 100644 --- a/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8EnumerableInitAbstract.sol +++ b/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8EnumerableInitAbstract.sol @@ -39,12 +39,14 @@ abstract contract LSP8EnumerableInitAbstract is * @param from The address sending the `tokenId` (`address(0)` when `tokenId` is being minted). * @param to The address receiving the `tokenId` (`address(0)` when `tokenId` is being burnt). * @param tokenId The bytes32 identifier of the token being transferred. + * @param data The data sent alongside the the token transfer. */ function _beforeTokenTransfer( address from, address to, - bytes32 tokenId - ) internal virtual override(LSP8IdentifiableDigitalAssetCore) { + bytes32 tokenId, + bytes memory data + ) internal virtual override { if (from == address(0)) { uint256 index = totalSupply(); _indexToken[index] = tokenId; @@ -60,6 +62,6 @@ abstract contract LSP8EnumerableInitAbstract is delete _indexToken[lastIndex]; delete _tokenIndex[tokenId]; } - super._beforeTokenTransfer(from, to, tokenId); + super._beforeTokenTransfer(from, to, tokenId, data); } } diff --git a/docs/contracts/LSP7DigitalAsset/LSP7DigitalAsset.md b/docs/contracts/LSP7DigitalAsset/LSP7DigitalAsset.md index 1f5e332c7..fc8d7357c 100644 --- a/docs/contracts/LSP7DigitalAsset/LSP7DigitalAsset.md +++ b/docs/contracts/LSP7DigitalAsset/LSP7DigitalAsset.md @@ -994,7 +994,8 @@ all the parameters in the calldata packed encoded. function _beforeTokenTransfer( address from, address to, - uint256 amount + uint256 amount, + bytes data ) internal nonpayable; ``` @@ -1003,11 +1004,12 @@ Allows to run custom logic before updating balances and notifiying sender/recipi #### Parameters -| Name | Type | Description | -| -------- | :-------: | ------------------------------- | -| `from` | `address` | The sender address | -| `to` | `address` | The recipient address | -| `amount` | `uint256` | The amount of token to transfer | +| Name | Type | Description | +| -------- | :-------: | ------------------------------------ | +| `from` | `address` | The sender address | +| `to` | `address` | The recipient address | +| `amount` | `uint256` | The amount of token to transfer | +| `data` | `bytes` | The data sent alongside the transfer |
@@ -1017,7 +1019,8 @@ Allows to run custom logic before updating balances and notifiying sender/recipi function _afterTokenTransfer( address from, address to, - uint256 amount + uint256 amount, + bytes data ) internal nonpayable; ``` @@ -1026,11 +1029,12 @@ Allows to run custom logic after updating balances, but **before notifiying send #### Parameters -| Name | Type | Description | -| -------- | :-------: | ------------------------------- | -| `from` | `address` | The sender address | -| `to` | `address` | The recipient address | -| `amount` | `uint256` | The amount of token to transfer | +| Name | Type | Description | +| -------- | :-------: | ------------------------------------ | +| `from` | `address` | The sender address | +| `to` | `address` | The recipient address | +| `amount` | `uint256` | The amount of token to transfer | +| `data` | `bytes` | The data sent alongside the transfer |
diff --git a/docs/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.md b/docs/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.md index 34098c44b..1c0a68f4a 100644 --- a/docs/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.md +++ b/docs/contracts/LSP7DigitalAsset/extensions/LSP7Burnable.md @@ -1019,7 +1019,8 @@ all the parameters in the calldata packed encoded. function _beforeTokenTransfer( address from, address to, - uint256 amount + uint256 amount, + bytes data ) internal nonpayable; ``` @@ -1028,11 +1029,12 @@ Allows to run custom logic before updating balances and notifiying sender/recipi #### Parameters -| Name | Type | Description | -| -------- | :-------: | ------------------------------- | -| `from` | `address` | The sender address | -| `to` | `address` | The recipient address | -| `amount` | `uint256` | The amount of token to transfer | +| Name | Type | Description | +| -------- | :-------: | ------------------------------------ | +| `from` | `address` | The sender address | +| `to` | `address` | The recipient address | +| `amount` | `uint256` | The amount of token to transfer | +| `data` | `bytes` | The data sent alongside the transfer |
@@ -1042,7 +1044,8 @@ Allows to run custom logic before updating balances and notifiying sender/recipi function _afterTokenTransfer( address from, address to, - uint256 amount + uint256 amount, + bytes data ) internal nonpayable; ``` @@ -1051,11 +1054,12 @@ Allows to run custom logic after updating balances, but **before notifiying send #### Parameters -| Name | Type | Description | -| -------- | :-------: | ------------------------------- | -| `from` | `address` | The sender address | -| `to` | `address` | The recipient address | -| `amount` | `uint256` | The amount of token to transfer | +| Name | Type | Description | +| -------- | :-------: | ------------------------------------ | +| `from` | `address` | The sender address | +| `to` | `address` | The recipient address | +| `amount` | `uint256` | The amount of token to transfer | +| `data` | `bytes` | The data sent alongside the transfer |
diff --git a/docs/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.md b/docs/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.md index 9ed5575a0..74423ec3b 100644 --- a/docs/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.md +++ b/docs/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.md @@ -993,7 +993,8 @@ all the parameters in the calldata packed encoded. function _beforeTokenTransfer( address from, address to, - uint256 amount + uint256 amount, + bytes data ) internal nonpayable; ``` @@ -1002,11 +1003,12 @@ Allows to run custom logic before updating balances and notifiying sender/recipi #### Parameters -| Name | Type | Description | -| -------- | :-------: | ------------------------------- | -| `from` | `address` | The sender address | -| `to` | `address` | The recipient address | -| `amount` | `uint256` | The amount of token to transfer | +| Name | Type | Description | +| -------- | :-------: | ------------------------------------ | +| `from` | `address` | The sender address | +| `to` | `address` | The recipient address | +| `amount` | `uint256` | The amount of token to transfer | +| `data` | `bytes` | The data sent alongside the transfer |
@@ -1016,7 +1018,8 @@ Allows to run custom logic before updating balances and notifiying sender/recipi function _afterTokenTransfer( address from, address to, - uint256 amount + uint256 amount, + bytes data ) internal nonpayable; ``` @@ -1025,11 +1028,12 @@ Allows to run custom logic after updating balances, but **before notifiying send #### Parameters -| Name | Type | Description | -| -------- | :-------: | ------------------------------- | -| `from` | `address` | The sender address | -| `to` | `address` | The recipient address | -| `amount` | `uint256` | The amount of token to transfer | +| Name | Type | Description | +| -------- | :-------: | ------------------------------------ | +| `from` | `address` | The sender address | +| `to` | `address` | The recipient address | +| `amount` | `uint256` | The amount of token to transfer | +| `data` | `bytes` | The data sent alongside the transfer |
diff --git a/docs/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.md b/docs/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.md index 135705795..e8e8c01d8 100644 --- a/docs/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.md +++ b/docs/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.md @@ -1073,7 +1073,8 @@ function _transfer( function _beforeTokenTransfer( address from, address to, - uint256 amount + uint256 amount, + bytes data ) internal nonpayable; ``` @@ -1082,11 +1083,12 @@ Allows to run custom logic before updating balances and notifiying sender/recipi #### Parameters -| Name | Type | Description | -| -------- | :-------: | ------------------------------- | -| `from` | `address` | The sender address | -| `to` | `address` | The recipient address | -| `amount` | `uint256` | The amount of token to transfer | +| Name | Type | Description | +| -------- | :-------: | ------------------------------------ | +| `from` | `address` | The sender address | +| `to` | `address` | The recipient address | +| `amount` | `uint256` | The amount of token to transfer | +| `data` | `bytes` | The data sent alongside the transfer |
@@ -1096,7 +1098,8 @@ Allows to run custom logic before updating balances and notifiying sender/recipi function _afterTokenTransfer( address from, address to, - uint256 amount + uint256 amount, + bytes data ) internal nonpayable; ``` @@ -1105,11 +1108,12 @@ Allows to run custom logic after updating balances, but **before notifiying send #### Parameters -| Name | Type | Description | -| -------- | :-------: | ------------------------------- | -| `from` | `address` | The sender address | -| `to` | `address` | The recipient address | -| `amount` | `uint256` | The amount of token to transfer | +| Name | Type | Description | +| -------- | :-------: | ------------------------------------ | +| `from` | `address` | The sender address | +| `to` | `address` | The recipient address | +| `amount` | `uint256` | The amount of token to transfer | +| `data` | `bytes` | The data sent alongside the transfer |
diff --git a/docs/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.md b/docs/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.md index 95238d92f..7d54b18cd 100644 --- a/docs/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.md +++ b/docs/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.md @@ -1107,7 +1107,8 @@ function _transfer( function _beforeTokenTransfer( address from, address to, - uint256 amount + uint256 amount, + bytes data ) internal nonpayable; ``` @@ -1116,11 +1117,12 @@ Allows to run custom logic before updating balances and notifiying sender/recipi #### Parameters -| Name | Type | Description | -| -------- | :-------: | ------------------------------- | -| `from` | `address` | The sender address | -| `to` | `address` | The recipient address | -| `amount` | `uint256` | The amount of token to transfer | +| Name | Type | Description | +| -------- | :-------: | ------------------------------------ | +| `from` | `address` | The sender address | +| `to` | `address` | The recipient address | +| `amount` | `uint256` | The amount of token to transfer | +| `data` | `bytes` | The data sent alongside the transfer |
@@ -1130,7 +1132,8 @@ Allows to run custom logic before updating balances and notifiying sender/recipi function _afterTokenTransfer( address from, address to, - uint256 amount + uint256 amount, + bytes data ) internal nonpayable; ``` @@ -1139,11 +1142,12 @@ Allows to run custom logic after updating balances, but **before notifiying send #### Parameters -| Name | Type | Description | -| -------- | :-------: | ------------------------------- | -| `from` | `address` | The sender address | -| `to` | `address` | The recipient address | -| `amount` | `uint256` | The amount of token to transfer | +| Name | Type | Description | +| -------- | :-------: | ------------------------------------ | +| `from` | `address` | The sender address | +| `to` | `address` | The recipient address | +| `amount` | `uint256` | The amount of token to transfer | +| `data` | `bytes` | The data sent alongside the transfer |
diff --git a/docs/contracts/LSP7DigitalAsset/presets/LSP7Mintable.md b/docs/contracts/LSP7DigitalAsset/presets/LSP7Mintable.md index eace4408b..cd3c72bc4 100644 --- a/docs/contracts/LSP7DigitalAsset/presets/LSP7Mintable.md +++ b/docs/contracts/LSP7DigitalAsset/presets/LSP7Mintable.md @@ -1056,7 +1056,8 @@ all the parameters in the calldata packed encoded. function _beforeTokenTransfer( address from, address to, - uint256 amount + uint256 amount, + bytes data ) internal nonpayable; ``` @@ -1065,11 +1066,12 @@ Allows to run custom logic before updating balances and notifiying sender/recipi #### Parameters -| Name | Type | Description | -| -------- | :-------: | ------------------------------- | -| `from` | `address` | The sender address | -| `to` | `address` | The recipient address | -| `amount` | `uint256` | The amount of token to transfer | +| Name | Type | Description | +| -------- | :-------: | ------------------------------------ | +| `from` | `address` | The sender address | +| `to` | `address` | The recipient address | +| `amount` | `uint256` | The amount of token to transfer | +| `data` | `bytes` | The data sent alongside the transfer |
@@ -1079,7 +1081,8 @@ Allows to run custom logic before updating balances and notifiying sender/recipi function _afterTokenTransfer( address from, address to, - uint256 amount + uint256 amount, + bytes data ) internal nonpayable; ``` @@ -1088,11 +1091,12 @@ Allows to run custom logic after updating balances, but **before notifiying send #### Parameters -| Name | Type | Description | -| -------- | :-------: | ------------------------------- | -| `from` | `address` | The sender address | -| `to` | `address` | The recipient address | -| `amount` | `uint256` | The amount of token to transfer | +| Name | Type | Description | +| -------- | :-------: | ------------------------------------ | +| `from` | `address` | The sender address | +| `to` | `address` | The recipient address | +| `amount` | `uint256` | The amount of token to transfer | +| `data` | `bytes` | The data sent alongside the transfer |
diff --git a/docs/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.md b/docs/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.md index c72dd01d3..b719713b1 100644 --- a/docs/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.md +++ b/docs/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.md @@ -947,7 +947,8 @@ all the parameters in the calldata packed encoded. function _beforeTokenTransfer( address from, address to, - bytes32 tokenId + bytes32 tokenId, + bytes data ) internal nonpayable; ``` @@ -961,6 +962,7 @@ Allows to run custom logic before updating balances and notifiying sender/recipi | `from` | `address` | The sender address | | `to` | `address` | @param tokenId The tokenId to transfer | | `tokenId` | `bytes32` | The tokenId to transfer | +| `data` | `bytes` | The data sent alongside the transfer |
@@ -970,7 +972,8 @@ Allows to run custom logic before updating balances and notifiying sender/recipi function _afterTokenTransfer( address from, address to, - bytes32 tokenId + bytes32 tokenId, + bytes data ) internal nonpayable; ``` @@ -984,6 +987,7 @@ Allows to run custom logic after updating balances, but **before notifiying send | `from` | `address` | The sender address | | `to` | `address` | @param tokenId The tokenId to transfer | | `tokenId` | `bytes32` | The tokenId to transfer | +| `data` | `bytes` | The data sent alongside the transfer |
diff --git a/docs/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.md b/docs/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.md index 4f68d4008..34559f01a 100644 --- a/docs/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.md +++ b/docs/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.md @@ -973,7 +973,8 @@ all the parameters in the calldata packed encoded. function _beforeTokenTransfer( address from, address to, - bytes32 tokenId + bytes32 tokenId, + bytes data ) internal nonpayable; ``` @@ -987,6 +988,7 @@ Allows to run custom logic before updating balances and notifiying sender/recipi | `from` | `address` | The sender address | | `to` | `address` | @param tokenId The tokenId to transfer | | `tokenId` | `bytes32` | The tokenId to transfer | +| `data` | `bytes` | The data sent alongside the transfer |
@@ -996,7 +998,8 @@ Allows to run custom logic before updating balances and notifiying sender/recipi function _afterTokenTransfer( address from, address to, - bytes32 tokenId + bytes32 tokenId, + bytes data ) internal nonpayable; ``` @@ -1010,6 +1013,7 @@ Allows to run custom logic after updating balances, but **before notifiying send | `from` | `address` | The sender address | | `to` | `address` | @param tokenId The tokenId to transfer | | `tokenId` | `bytes32` | The tokenId to transfer | +| `data` | `bytes` | The data sent alongside the transfer |
diff --git a/docs/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.md b/docs/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.md index 62310f99c..f4bae3e8d 100644 --- a/docs/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.md +++ b/docs/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.md @@ -947,7 +947,8 @@ all the parameters in the calldata packed encoded. function _beforeTokenTransfer( address from, address to, - bytes32 tokenId + bytes32 tokenId, + bytes data ) internal nonpayable; ``` @@ -961,6 +962,7 @@ Allows to run custom logic before updating balances and notifiying sender/recipi | `from` | `address` | The sender address | | `to` | `address` | @param tokenId The tokenId to transfer | | `tokenId` | `bytes32` | The tokenId to transfer | +| `data` | `bytes` | The data sent alongside the transfer |
@@ -970,7 +972,8 @@ Allows to run custom logic before updating balances and notifiying sender/recipi function _afterTokenTransfer( address from, address to, - bytes32 tokenId + bytes32 tokenId, + bytes data ) internal nonpayable; ``` @@ -984,6 +987,7 @@ Allows to run custom logic after updating balances, but **before notifiying send | `from` | `address` | The sender address | | `to` | `address` | @param tokenId The tokenId to transfer | | `tokenId` | `bytes32` | The tokenId to transfer | +| `data` | `bytes` | The data sent alongside the transfer |
diff --git a/docs/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.md b/docs/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.md index e815cc233..9e566f38f 100644 --- a/docs/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.md +++ b/docs/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.md @@ -1197,7 +1197,8 @@ function _transfer( function _beforeTokenTransfer( address from, address to, - bytes32 tokenId + bytes32 tokenId, + bytes data ) internal nonpayable; ``` @@ -1211,6 +1212,7 @@ Allows to run custom logic before updating balances and notifiying sender/recipi | `from` | `address` | The sender address | | `to` | `address` | @param tokenId The tokenId to transfer | | `tokenId` | `bytes32` | The tokenId to transfer | +| `data` | `bytes` | The data sent alongside the transfer |
@@ -1220,7 +1222,8 @@ Allows to run custom logic before updating balances and notifiying sender/recipi function _afterTokenTransfer( address from, address to, - bytes32 tokenId + bytes32 tokenId, + bytes data ) internal nonpayable; ``` @@ -1234,6 +1237,7 @@ Allows to run custom logic after updating balances, but **before notifiying send | `from` | `address` | The sender address | | `to` | `address` | @param tokenId The tokenId to transfer | | `tokenId` | `bytes32` | The tokenId to transfer | +| `data` | `bytes` | The data sent alongside the transfer |
diff --git a/docs/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.md b/docs/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.md index 5bba28705..5a5efaf42 100644 --- a/docs/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.md +++ b/docs/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Enumerable.md @@ -978,7 +978,8 @@ all the parameters in the calldata packed encoded. function _beforeTokenTransfer( address from, address to, - bytes32 tokenId + bytes32 tokenId, + bytes data ) internal nonpayable; ``` @@ -989,6 +990,7 @@ function _beforeTokenTransfer( | `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. | +| `data` | `bytes` | The data sent alongside the the token transfer. |
@@ -998,7 +1000,8 @@ function _beforeTokenTransfer( function _afterTokenTransfer( address from, address to, - bytes32 tokenId + bytes32 tokenId, + bytes data ) internal nonpayable; ``` @@ -1012,6 +1015,7 @@ Allows to run custom logic after updating balances, but **before notifiying send | `from` | `address` | The sender address | | `to` | `address` | @param tokenId The tokenId to transfer | | `tokenId` | `bytes32` | The tokenId to transfer | +| `data` | `bytes` | The data sent alongside the transfer |
diff --git a/docs/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.md b/docs/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.md index 6984f85dc..b881c0643 100644 --- a/docs/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.md +++ b/docs/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.md @@ -1239,7 +1239,8 @@ function _transfer( function _beforeTokenTransfer( address from, address to, - bytes32 tokenId + bytes32 tokenId, + bytes data ) internal nonpayable; ``` @@ -1253,6 +1254,7 @@ Allows to run custom logic before updating balances and notifiying sender/recipi | `from` | `address` | The sender address | | `to` | `address` | @param tokenId The tokenId to transfer | | `tokenId` | `bytes32` | The tokenId to transfer | +| `data` | `bytes` | The data sent alongside the transfer |
@@ -1262,7 +1264,8 @@ Allows to run custom logic before updating balances and notifiying sender/recipi function _afterTokenTransfer( address from, address to, - bytes32 tokenId + bytes32 tokenId, + bytes data ) internal nonpayable; ``` @@ -1276,6 +1279,7 @@ Allows to run custom logic after updating balances, but **before notifiying send | `from` | `address` | The sender address | | `to` | `address` | @param tokenId The tokenId to transfer | | `tokenId` | `bytes32` | The tokenId to transfer | +| `data` | `bytes` | The data sent alongside the transfer |
diff --git a/docs/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.md b/docs/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.md index c82402175..565f464d4 100644 --- a/docs/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.md +++ b/docs/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.md @@ -1011,7 +1011,8 @@ all the parameters in the calldata packed encoded. function _beforeTokenTransfer( address from, address to, - bytes32 tokenId + bytes32 tokenId, + bytes data ) internal nonpayable; ``` @@ -1025,6 +1026,7 @@ Allows to run custom logic before updating balances and notifiying sender/recipi | `from` | `address` | The sender address | | `to` | `address` | @param tokenId The tokenId to transfer | | `tokenId` | `bytes32` | The tokenId to transfer | +| `data` | `bytes` | The data sent alongside the transfer |
@@ -1034,7 +1036,8 @@ Allows to run custom logic before updating balances and notifiying sender/recipi function _afterTokenTransfer( address from, address to, - bytes32 tokenId + bytes32 tokenId, + bytes data ) internal nonpayable; ``` @@ -1048,6 +1051,7 @@ Allows to run custom logic after updating balances, but **before notifiying send | `from` | `address` | The sender address | | `to` | `address` | @param tokenId The tokenId to transfer | | `tokenId` | `bytes32` | The tokenId to transfer | +| `data` | `bytes` | The data sent alongside the transfer |