aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Hysen <greg.hysen@gmail.com>2018-06-01 04:44:14 +0800
committerGreg Hysen <greg.hysen@gmail.com>2018-06-08 06:38:48 +0800
commit5db15ca54cd7e1fd90bf318d2975750dcd31cddc (patch)
tree70a27c15c8ecb918ff1337112cd543c410e93064
parent069b89b2084a65e6846a0722a9883af1104feb08 (diff)
downloaddexon-sol-tools-5db15ca54cd7e1fd90bf318d2975750dcd31cddc.tar
dexon-sol-tools-5db15ca54cd7e1fd90bf318d2975750dcd31cddc.tar.gz
dexon-sol-tools-5db15ca54cd7e1fd90bf318d2975750dcd31cddc.tar.bz2
dexon-sol-tools-5db15ca54cd7e1fd90bf318d2975750dcd31cddc.tar.lz
dexon-sol-tools-5db15ca54cd7e1fd90bf318d2975750dcd31cddc.tar.xz
dexon-sol-tools-5db15ca54cd7e1fd90bf318d2975750dcd31cddc.tar.zst
dexon-sol-tools-5db15ca54cd7e1fd90bf318d2975750dcd31cddc.zip
proxyData -> assetData
-rw-r--r--packages/contracts/src/contracts/current/utils/LibAssetProxyDecoder/LibAssetProxyDecoder.sol22
-rw-r--r--packages/contracts/test/libraries/lib_bytes.ts2
2 files changed, 12 insertions, 12 deletions
diff --git a/packages/contracts/src/contracts/current/utils/LibAssetProxyDecoder/LibAssetProxyDecoder.sol b/packages/contracts/src/contracts/current/utils/LibAssetProxyDecoder/LibAssetProxyDecoder.sol
index ba53f2769..ec27502a8 100644
--- a/packages/contracts/src/contracts/current/utils/LibAssetProxyDecoder/LibAssetProxyDecoder.sol
+++ b/packages/contracts/src/contracts/current/utils/LibAssetProxyDecoder/LibAssetProxyDecoder.sol
@@ -29,7 +29,7 @@ contract LibAssetProxyDecoder is
string constant INVALID_ERC721_METADATA_LENGTH = "Metadata must have a length of at least 53.";
/// @dev Decodes ERC721 Asset Proxy data
- function decodeERC20Data(bytes memory proxyData)
+ function decodeERC20Data(bytes memory assetData)
internal
pure
returns (
@@ -38,17 +38,17 @@ contract LibAssetProxyDecoder is
)
{
require(
- proxyData.length == 21,
+ assetData.length == 21,
INVALID_ERC20_METADATA_LENGTH
);
- proxyId = uint8(proxyData[0]);
- token = readAddress(proxyData, 1);
+ proxyId = uint8(assetData[0]);
+ token = readAddress(assetData, 1);
return (proxyId, token);
}
/// @dev Decodes ERC721 Asset Proxy data
- function decodeERC721Data(bytes memory proxyData)
+ function decodeERC721Data(bytes memory assetData)
internal
pure
returns (
@@ -59,14 +59,14 @@ contract LibAssetProxyDecoder is
)
{
require(
- proxyData.length >= 53,
+ assetData.length >= 53,
INVALID_ERC721_METADATA_LENGTH
);
- proxyId = uint8(proxyData[0]);
- token = readAddress(proxyData, 1);
- tokenId = readUint256(proxyData, 21);
- if (proxyData.length > 53) {
- data = readBytes(proxyData, 53);
+ proxyId = uint8(assetData[0]);
+ token = readAddress(assetData, 1);
+ tokenId = readUint256(assetData, 21);
+ if (assetData.length > 53) {
+ data = readBytes(assetData, 53);
}
return (proxyId, token, tokenId, data);
diff --git a/packages/contracts/test/libraries/lib_bytes.ts b/packages/contracts/test/libraries/lib_bytes.ts
index cd5fdcf17..9fe3a1a57 100644
--- a/packages/contracts/test/libraries/lib_bytes.ts
+++ b/packages/contracts/test/libraries/lib_bytes.ts
@@ -409,7 +409,7 @@ describe('LibBytes', () => {
});
});
- describe.only('writeBytes', () => {
+ describe('writeBytes', () => {
it('should successfully write short, nested array of bytes when it takes up the whole array)', async () => {
const testBytesOffset = new BigNumber(0);
const emptyByteArray = ethUtil.bufferToHex(new Buffer(shortTestBytesAsBuffer.byteLength));