diff options
author | Greg Hysen <greg.hysen@gmail.com> | 2018-04-12 01:59:00 +0800 |
---|---|---|
committer | Amir Bandeali <abandeali1@gmail.com> | 2018-04-21 04:56:17 +0800 |
commit | e7b0c24d9d905b4544caaf274beca97f5c7967b0 (patch) | |
tree | 7c0639fba733af50aab4673ba21352a93beedbb5 /packages | |
parent | 1707f1940d27c5de4fac65dfd5d7ef86f8a0efcf (diff) | |
download | dexon-0x-contracts-e7b0c24d9d905b4544caaf274beca97f5c7967b0.tar.gz dexon-0x-contracts-e7b0c24d9d905b4544caaf274beca97f5c7967b0.tar.zst dexon-0x-contracts-e7b0c24d9d905b4544caaf274beca97f5c7967b0.zip |
Added memory to bytes arrays, where possible
Diffstat (limited to 'packages')
4 files changed, 7 insertions, 7 deletions
diff --git a/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/proxies/ERC20Proxy_v1.sol b/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/proxies/ERC20Proxy_v1.sol index ee4acce91..051257eb5 100644 --- a/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/proxies/ERC20Proxy_v1.sol +++ b/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/proxies/ERC20Proxy_v1.sol @@ -79,7 +79,7 @@ contract ERC20Proxy_v1 is /// @dev Decodes ERC20-encoded byte array for the ERC20 asset proxy. /// @param assetMetadata Byte array encoded for the ERC20 asset proxy. /// @return tokenAddress Address of ERC20 token. - function decodeMetadata(bytes assetMetadata) + function decodeMetadata(bytes memory assetMetadata) public pure returns (address tokenAddress) { diff --git a/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/proxies/ERC721Proxy.sol b/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/proxies/ERC721Proxy.sol index bbad8b392..a2b0ba101 100644 --- a/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/proxies/ERC721Proxy.sol +++ b/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/proxies/ERC721Proxy.sol @@ -84,7 +84,7 @@ contract ERC721Proxy is /// @param assetMetadata Byte array encoded for the ERC721 asset proxy. /// @return tokenAddress Address of ERC721 token. /// @return tokenId Id of ERC721 token. - function decodeMetadata(bytes assetMetadata) + function decodeMetadata(bytes memory assetMetadata) public pure returns (address tokenAddress, uint256 tokenId) { diff --git a/packages/contracts/src/contracts/current/test/DummyERC721Token/DummyERC721Token.sol b/packages/contracts/src/contracts/current/test/DummyERC721Token/DummyERC721Token.sol index 61732a382..72d0b9855 100644 --- a/packages/contracts/src/contracts/current/test/DummyERC721Token/DummyERC721Token.sol +++ b/packages/contracts/src/contracts/current/test/DummyERC721Token/DummyERC721Token.sol @@ -32,7 +32,7 @@ contract DummyERC721Token is {} /** - * @dev Internal function to mint a new token + * @dev Function to mint a new token * @dev Reverts if the given token ID already exists * @param to address the beneficiary that will own the minted token * @param tokenId uint256 ID of the token to be minted by the msg.sender diff --git a/packages/contracts/src/contracts/current/utils/LibBytes/LibBytes.sol b/packages/contracts/src/contracts/current/utils/LibBytes/LibBytes.sol index a1eca7f45..e3df66b11 100644 --- a/packages/contracts/src/contracts/current/utils/LibBytes/LibBytes.sol +++ b/packages/contracts/src/contracts/current/utils/LibBytes/LibBytes.sol @@ -25,7 +25,7 @@ contract LibBytes { /// @param index Index in byte array of address. /// @return address from byte array. function readAddress( - bytes b, + bytes memory b, uint256 index) public pure returns (address result) @@ -52,7 +52,7 @@ contract LibBytes { /// @param index Index in byte array of address. /// @param input Address to put into byte array. function writeAddress( - bytes b, + bytes memory b, uint256 index, address input) public pure @@ -86,7 +86,7 @@ contract LibBytes { /// @param index Index in byte array of bytes32 value. /// @return bytes32 value from byte array. function readBytes32( - bytes b, + bytes memory b, uint256 index) public pure returns (bytes32 result) @@ -108,7 +108,7 @@ contract LibBytes { /// @param index Index in byte array of <input>. /// @param input bytes32 to put into byte array. function writeBytes32( - bytes b, + bytes memory b, uint256 index, bytes32 input) public pure |