Added memory to bytes arrays, where possible

This commit is contained in:
Greg Hysen
2018-04-11 10:59:00 -07:00
committed by Amir Bandeali
parent 1707f1940d
commit e7b0c24d9d
4 changed files with 7 additions and 7 deletions

View File

@@ -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)
{

View File

@@ -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)
{

View File

@@ -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

View File

@@ -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