diff options
4 files changed, 10 insertions, 10 deletions
diff --git a/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/proxies/ERC20TransferProxy.sol b/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/proxies/ERC20TransferProxy.sol index 61fcd9d00..535bfba24 100644 --- a/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/proxies/ERC20TransferProxy.sol +++ b/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/proxies/ERC20TransferProxy.sol @@ -63,7 +63,7 @@ contract ERC20TransferProxy is // Encode fields into a byte array assetMetadata = new bytes(21); assetMetadata[0] = byte(assetProxyId); - writeAddress(tokenAddress, assetMetadata, 1); + writeAddress(assetMetadata, 1, tokenAddress); return assetMetadata; } diff --git a/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/proxies/ERC20TransferProxy_v1.sol b/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/proxies/ERC20TransferProxy_v1.sol index 6b19f1a52..dceb2c1a6 100644 --- a/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/proxies/ERC20TransferProxy_v1.sol +++ b/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/proxies/ERC20TransferProxy_v1.sol @@ -72,7 +72,7 @@ contract ERC20TransferProxy_v1 is // Encode fields into a byte array assetMetadata = new bytes(21); assetMetadata[0] = byte(assetProxyId); - writeAddress(tokenAddress, assetMetadata, 1); + writeAddress(assetMetadata, 1, tokenAddress); return assetMetadata; } diff --git a/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/proxies/ERC721TransferProxy.sol b/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/proxies/ERC721TransferProxy.sol index 51f027a56..8b7a131cb 100644 --- a/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/proxies/ERC721TransferProxy.sol +++ b/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/proxies/ERC721TransferProxy.sol @@ -73,8 +73,8 @@ contract ERC721TransferProxy is // Encode fields into a byte array assetMetadata = new bytes(53); assetMetadata[0] = byte(assetProxyId); - writeAddress(tokenAddress, assetMetadata, 1); - writeUint256(tokenId, assetMetadata, 21); + writeAddress(assetMetadata, 1, tokenAddress); + writeUint256(assetMetadata, 21, tokenId); return assetMetadata; } diff --git a/packages/contracts/src/contracts/current/utils/LibBytes/LibBytes.sol b/packages/contracts/src/contracts/current/utils/LibBytes/LibBytes.sol index 32a51d8ab..59017d159 100644 --- a/packages/contracts/src/contracts/current/utils/LibBytes/LibBytes.sol +++ b/packages/contracts/src/contracts/current/utils/LibBytes/LibBytes.sol @@ -48,13 +48,13 @@ contract LibBytes { } /// @dev Writes an address into a specific position in a byte array. - /// @param input Address to put into byte array. /// @param b Byte array to insert address into. /// @param index Index in byte array of address. + /// @param input Address to put into byte array. function writeAddress( - address input, bytes b, - uint256 index) + uint256 index, + address input) public pure { require(b.length >= index + 20); // 20 is length of address @@ -104,13 +104,13 @@ contract LibBytes { } /// @dev Writes a uint256 into a specific position in a byte array. - /// @param input uint256 to put into byte array. /// @param b Byte array to insert <input> into. /// @param index Index in byte array of <input>. + /// @param input uint256 to put into byte array. function writeUint256( - uint256 input, bytes b, - uint256 index) + uint256 index, + uint256 input) public pure { require(b.length >= index + 32); |