diff --git a/contracts/LSP7DigitalAsset/LSP7DigitalAssetCore.sol b/contracts/LSP7DigitalAsset/LSP7DigitalAssetCore.sol index 162265fe0..727724cbd 100644 --- a/contracts/LSP7DigitalAsset/LSP7DigitalAssetCore.sol +++ b/contracts/LSP7DigitalAsset/LSP7DigitalAssetCore.sol @@ -350,7 +350,7 @@ abstract contract LSP7DigitalAssetCore is ILSP7DigitalAsset { data ); - bytes memory lsp1Data = abi.encodePacked(address(0), to, amount, data); + bytes memory lsp1Data = abi.encode(address(0), to, amount, data); _notifyTokenReceiver(to, allowNonLSP1Recipient, lsp1Data); } @@ -416,12 +416,7 @@ abstract contract LSP7DigitalAssetCore is ILSP7DigitalAsset { emit Transfer(operator, from, address(0), amount, false, data); - bytes memory lsp1Data = abi.encodePacked( - from, - address(0), - amount, - data - ); + bytes memory lsp1Data = abi.encode(from, address(0), amount, data); _notifyTokenSender(from, lsp1Data); } @@ -473,7 +468,7 @@ abstract contract LSP7DigitalAssetCore is ILSP7DigitalAsset { emit Transfer(operator, from, to, amount, allowNonLSP1Recipient, data); - bytes memory lsp1Data = abi.encodePacked(from, to, amount, data); + bytes memory lsp1Data = abi.encode(from, to, amount, data); _notifyTokenSender(from, lsp1Data); _notifyTokenReceiver(to, allowNonLSP1Recipient, lsp1Data); diff --git a/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetCore.sol b/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetCore.sol index dadd84418..cc02264df 100644 --- a/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetCore.sol +++ b/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetCore.sol @@ -349,7 +349,7 @@ abstract contract LSP8IdentifiableDigitalAssetCore is data ); - bytes memory lsp1Data = abi.encodePacked(address(0), to, tokenId, data); + bytes memory lsp1Data = abi.encode(address(0), to, tokenId, data); _notifyTokenReceiver(to, allowNonLSP1Recipient, lsp1Data); } @@ -389,7 +389,7 @@ abstract contract LSP8IdentifiableDigitalAssetCore is emit Transfer(operator, tokenOwner, address(0), tokenId, false, data); - bytes memory lsp1Data = abi.encodePacked( + bytes memory lsp1Data = abi.encode( tokenOwner, address(0), tokenId, @@ -453,7 +453,7 @@ abstract contract LSP8IdentifiableDigitalAssetCore is emit Transfer(operator, from, to, tokenId, allowNonLSP1Recipient, data); - bytes memory lsp1Data = abi.encodePacked(from, to, tokenId, data); + bytes memory lsp1Data = abi.encode(from, to, tokenId, data); _notifyTokenSender(from, lsp1Data); _notifyTokenReceiver(to, allowNonLSP1Recipient, lsp1Data);