Explicity declare memory for complex types, where possible

This commit is contained in:
Greg Hysen
2018-04-12 14:45:11 -07:00
committed by Amir Bandeali
parent d0930b9048
commit c811b710eb
3 changed files with 5 additions and 5 deletions

View File

@@ -55,7 +55,7 @@ contract ERC20Proxy is
uint8 assetProxyId,
address tokenAddress)
public pure
returns (bytes assetMetadata)
returns (bytes memory assetMetadata)
{
// 0 is reserved as invalid proxy id
require(assetProxyId != 0);
@@ -70,7 +70,7 @@ contract ERC20Proxy is
/// @dev Decodes ERC20-encoded byte array.
/// @param assetMetadata ERC20-encoded byte array.
/// @return tokenAddress Address of ERC20 token.
function decodeMetadata(bytes assetMetadata)
function decodeMetadata(bytes memory assetMetadata)
public pure
returns (address tokenAddress)
{

View File

@@ -64,7 +64,7 @@ contract ERC20Proxy_v1 is
uint8 assetProxyId,
address tokenAddress)
public pure
returns (bytes assetMetadata)
returns (bytes memory assetMetadata)
{
// 0 is reserved as invalid proxy id
require(assetProxyId != 0);
@@ -79,7 +79,7 @@ contract ERC20Proxy_v1 is
/// @dev Decodes ERC20-encoded byte array.
/// @param assetMetadata ERC20-encoded byte array.
/// @return tokenAddress Address of ERC20 token.
function decodeMetadata(bytes assetMetadata)
function decodeMetadata(bytes memory assetMetadata)
public pure
returns (address tokenAddress)
{

View File

@@ -67,7 +67,7 @@ contract ERC721Proxy is
address tokenAddress,
uint256 tokenId)
public pure
returns (bytes assetMetadata)
returns (bytes memory assetMetadata)
{
// 0 is reserved as invalid proxy id
require(assetProxyId != 0);