From 88982f98ff2ece93831b1442d2c4e1ef0878d919 Mon Sep 17 00:00:00 2001 From: Remco Bloemen Date: Wed, 13 Jun 2018 17:13:59 +0200 Subject: Rename read/writeBytesWithLength --- .../contracts/current/protocol/AssetProxy/MixinERC721Transfer.sol | 2 +- .../src/contracts/current/test/TestLibBytes/TestLibBytes.sol | 8 ++++---- .../contracts/src/contracts/current/utils/LibBytes/LibBytes.sol | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'packages/contracts/src') diff --git a/packages/contracts/src/contracts/current/protocol/AssetProxy/MixinERC721Transfer.sol b/packages/contracts/src/contracts/current/protocol/AssetProxy/MixinERC721Transfer.sol index 2df9725b4..944068bbb 100644 --- a/packages/contracts/src/contracts/current/protocol/AssetProxy/MixinERC721Transfer.sol +++ b/packages/contracts/src/contracts/current/protocol/AssetProxy/MixinERC721Transfer.sol @@ -82,7 +82,7 @@ contract MixinERC721Transfer is token = assetData.readAddress(0); tokenId = assetData.readUint256(20); if (assetData.length > 52) { - receiverData = assetData.readBytes(52); + receiverData = assetData.readBytesWithLength(52); } return ( diff --git a/packages/contracts/src/contracts/current/test/TestLibBytes/TestLibBytes.sol b/packages/contracts/src/contracts/current/test/TestLibBytes/TestLibBytes.sol index 96020906c..84b9e4673 100644 --- a/packages/contracts/src/contracts/current/test/TestLibBytes/TestLibBytes.sol +++ b/packages/contracts/src/contracts/current/test/TestLibBytes/TestLibBytes.sol @@ -192,7 +192,7 @@ contract TestLibBytes { /// @param b Byte array containing nested bytes. /// @param index Index of nested bytes. /// @return result Nested bytes. - function publicReadBytes( + function publicReadBytesWithLength( bytes memory b, uint256 index ) @@ -200,7 +200,7 @@ contract TestLibBytes { pure returns (bytes memory result) { - result = b.readBytes(index); + result = b.readBytesWithLength(index); return result; } @@ -209,7 +209,7 @@ contract TestLibBytes { /// @param index Index in byte array of . /// @param input bytes to insert. /// @return b Updated input byte array - function publicWriteBytes( + function publicWriteBytesWithLength( bytes memory b, uint256 index, bytes memory input @@ -218,7 +218,7 @@ contract TestLibBytes { pure returns (bytes memory) { - b.writeBytes(index, input); + b.writeBytesWithLength(index, input); return b; } diff --git a/packages/contracts/src/contracts/current/utils/LibBytes/LibBytes.sol b/packages/contracts/src/contracts/current/utils/LibBytes/LibBytes.sol index 05cf53df5..ad3a35aef 100644 --- a/packages/contracts/src/contracts/current/utils/LibBytes/LibBytes.sol +++ b/packages/contracts/src/contracts/current/utils/LibBytes/LibBytes.sol @@ -371,7 +371,7 @@ library LibBytes { /// @param b Byte array containing nested bytes. /// @param index Index of nested bytes. /// @return result Nested bytes. - function readBytes( + function readBytesWithLength( bytes memory b, uint256 index ) @@ -405,7 +405,7 @@ library LibBytes { /// @param b Byte array to insert into. /// @param index Index in byte array of . /// @param input bytes to insert. - function writeBytes( + function writeBytesWithLength( bytes memory b, uint256 index, bytes memory input -- cgit v1.2.3