Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion contracts/ECRecovery.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ library ECRecovery {
* @param _hash bytes32 message, the hash is the signed message. What is recovered is the signer address.
* @param _signature bytes signature, the signature is generated using web3.eth.sign()
*/
function recover(bytes32 _hash, bytes _signature)
function recover(bytes32 _hash, bytes memory _signature)
internal
pure
returns (address)
Expand Down
2 changes: 1 addition & 1 deletion contracts/MerkleProof.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ library MerkleProof {
* @param _leaf Leaf of Merkle tree
*/
function verifyProof(
bytes32[] _proof,
bytes32[] memory _proof,
bytes32 _root,
bytes32 _leaf
)
Expand Down
14 changes: 7 additions & 7 deletions contracts/access/SignatureBouncer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ contract SignatureBouncer is Ownable, RBAC {
/**
* @dev requires that a valid signature of a bouncer was provided
*/
modifier onlyValidSignature(bytes _signature)
modifier onlyValidSignature(bytes memory _signature)
{
require(isValidSignature(msg.sender, _signature));
_;
Expand All @@ -49,7 +49,7 @@ contract SignatureBouncer is Ownable, RBAC {
/**
* @dev requires that a valid signature with a specifed method of a bouncer was provided
*/
modifier onlyValidSignatureAndMethod(bytes _signature)
modifier onlyValidSignatureAndMethod(bytes memory _signature)
{
require(isValidSignatureAndMethod(msg.sender, _signature));
_;
Expand All @@ -58,7 +58,7 @@ contract SignatureBouncer is Ownable, RBAC {
/**
* @dev requires that a valid signature with a specifed method and params of a bouncer was provided
*/
modifier onlyValidSignatureAndData(bytes _signature)
modifier onlyValidSignatureAndData(bytes memory _signature)
{
require(isValidSignatureAndData(msg.sender, _signature));
_;
Expand Down Expand Up @@ -89,7 +89,7 @@ contract SignatureBouncer is Ownable, RBAC {
* @dev is the signature of `this + sender` from a bouncer?
* @return bool
*/
function isValidSignature(address _address, bytes _signature)
function isValidSignature(address _address, bytes memory _signature)
internal
view
returns (bool)
Expand All @@ -104,7 +104,7 @@ contract SignatureBouncer is Ownable, RBAC {
* @dev is the signature of `this + sender + methodId` from a bouncer?
* @return bool
*/
function isValidSignatureAndMethod(address _address, bytes _signature)
function isValidSignatureAndMethod(address _address, bytes memory _signature)
internal
view
returns (bool)
Expand All @@ -124,7 +124,7 @@ contract SignatureBouncer is Ownable, RBAC {
* @notice the _signature parameter of the method being validated must be the "last" parameter
* @return bool
*/
function isValidSignatureAndData(address _address, bytes _signature)
function isValidSignatureAndData(address _address, bytes memory _signature)
internal
view
returns (bool)
Expand All @@ -145,7 +145,7 @@ contract SignatureBouncer is Ownable, RBAC {
* and then recover the signature and check it against the bouncer role
* @return bool
*/
function isValidDataHash(bytes32 _hash, bytes _signature)
function isValidDataHash(bytes32 _hash, bytes memory _signature)
internal
view
returns (bool)
Expand Down
4 changes: 2 additions & 2 deletions contracts/access/Whitelist.sol
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ contract Whitelist is Ownable, RBAC {
* @return true if at least one address was added to the whitelist,
* false if all addresses were already in the whitelist
*/
function addAddressesToWhitelist(address[] _operators)
function addAddressesToWhitelist(address[] memory _operators)
public
onlyOwner
{
Expand Down Expand Up @@ -79,7 +79,7 @@ contract Whitelist is Ownable, RBAC {
* @return true if at least one address was removed from the whitelist,
* false if all addresses weren't in the whitelist in the first place
*/
function removeAddressesFromWhitelist(address[] _operators)
function removeAddressesFromWhitelist(address[] memory _operators)
public
onlyOwner
{
Expand Down
12 changes: 6 additions & 6 deletions contracts/access/rbac/RBAC.sol
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ contract RBAC {
* @param _role the name of the role
* // reverts
*/
function checkRole(address _operator, string _role)
function checkRole(address _operator, string memory _role)
public
view
{
Expand All @@ -39,7 +39,7 @@ contract RBAC {
* @param _role the name of the role
* @return bool
*/
function hasRole(address _operator, string _role)
function hasRole(address _operator, string memory _role)
public
view
returns (bool)
Expand All @@ -52,7 +52,7 @@ contract RBAC {
* @param _operator address
* @param _role the name of the role
*/
function addRole(address _operator, string _role)
function addRole(address _operator, string memory _role)
internal
{
roles[_role].add(_operator);
Expand All @@ -64,7 +64,7 @@ contract RBAC {
* @param _operator address
* @param _role the name of the role
*/
function removeRole(address _operator, string _role)
function removeRole(address _operator, string memory _role)
internal
{
roles[_role].remove(_operator);
Expand All @@ -76,7 +76,7 @@ contract RBAC {
* @param _role the name of the role
* // reverts
*/
modifier onlyRole(string _role)
modifier onlyRole(string memory _role)
{
checkRole(msg.sender, _role);
_;
Expand All @@ -90,7 +90,7 @@ contract RBAC {
* @TODO - when solidity supports dynamic arrays as arguments to modifiers, provide this
* see: https://github.com/ethereum/solidity/issues/2467
*/
// modifier onlyRoles(string[] _roles) {
// modifier onlyRoles(string[] memory _roles) {
// bool hasAnyRole = false;
// for (uint8 i = 0; i < _roles.length; i++) {
// if (hasRole(msg.sender, _roles[i])) {
Expand Down
2 changes: 1 addition & 1 deletion contracts/examples/RBACWithAdmin.sol
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ contract RBACWithAdmin is RBAC {
* @param _account the account that will have the role
* @param _roleName the name of the role
*/
function adminAddRole(address _account, string _roleName)
function adminAddRole(address _account, string memory _roleName)
public
onlyAdmin
{
Expand Down
2 changes: 1 addition & 1 deletion contracts/lifecycle/TokenDestructible.sol
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ contract TokenDestructible is Ownable {
* @notice The called token contracts could try to re-enter this contract. Only
supply token contracts you trust.
*/
function destroy(address[] _tokens) public onlyOwner {
function destroy(address[] memory _tokens) public onlyOwner {

// Transfer tokens to owner
for (uint256 i = 0; i < _tokens.length; i++) {
Expand Down
12 changes: 6 additions & 6 deletions contracts/mocks/BouncerMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@ contract SignatureBouncerMock is SignatureBouncer {
return isValidSignature(_address, _signature);
}

function onlyWithValidSignature(bytes _signature)
function onlyWithValidSignature(bytes memory _signature)
public
onlyValidSignature(_signature)
view
{

}

function checkValidSignatureAndMethod(address _address, bytes _signature)
function checkValidSignatureAndMethod(address _address, bytes memory _signature)
public
view
returns (bool)
{
return isValidSignatureAndMethod(_address, _signature);
}

function onlyWithValidSignatureAndMethod(bytes _signature)
function onlyWithValidSignatureAndMethod(bytes memory _signature)
public
onlyValidSignatureAndMethod(_signature)
view
Expand All @@ -38,9 +38,9 @@ contract SignatureBouncerMock is SignatureBouncer {

function checkValidSignatureAndData(
address _address,
bytes,
bytes memory,
uint,
bytes _signature
bytes memory _signature
)
public
view
Expand All @@ -49,7 +49,7 @@ contract SignatureBouncerMock is SignatureBouncer {
return isValidSignatureAndData(_address, _signature);
}

function onlyWithValidSignatureAndData(uint, bytes _signature)
function onlyWithValidSignatureAndData(uint, bytes memory _signature)
public
onlyValidSignatureAndData(_signature)
view
Expand Down
4 changes: 2 additions & 2 deletions contracts/mocks/DetailedERC20Mock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import "../token/ERC20/DetailedERC20.sol";

contract DetailedERC20Mock is StandardToken, DetailedERC20 {
constructor(
string _name,
string _symbol,
string memory _name,
string memory _symbol,
uint8 _decimals
)
DetailedERC20(_name, _symbol, _decimals)
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/ECRecoveryMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import "../ECRecovery.sol";
contract ECRecoveryMock {
using ECRecovery for bytes32;

function recover(bytes32 _hash, bytes _signature)
function recover(bytes32 _hash, bytes memory _signature)
public
pure
returns (address)
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/ERC20WithMetadataMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import "../proposals/ERC1046/TokenMetadata.sol";


contract ERC20WithMetadataMock is StandardToken, ERC20WithMetadata {
constructor(string _tokenURI) public
constructor(string memory _tokenURI) public
ERC20WithMetadata(_tokenURI)
{
}
Expand Down
4 changes: 2 additions & 2 deletions contracts/mocks/ERC223TokenMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import "../token/ERC20/StandardToken.sol";


contract ERC223ContractInterface {
function tokenFallback(address _from, uint256 _value, bytes _data) external;
function tokenFallback(address _from, uint256 _value, bytes calldata _data) external;
}


Expand All @@ -15,7 +15,7 @@ contract ERC223TokenMock is StandardToken {
}

// ERC223 compatible transfer function (except the name)
function transferERC223(address _to, uint256 _value, bytes _data) public
function transferERC223(address _to, uint256 _value, bytes memory _data) public
returns (bool success)
{
transfer(_to, _value);
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/ERC721ReceiverMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ contract ERC721ReceiverMock is ERC721Receiver {
address _operator,
address _from,
uint256 _tokenId,
bytes _data
bytes memory _data
)
public
returns(bytes4)
Expand Down
4 changes: 2 additions & 2 deletions contracts/mocks/ERC721TokenMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import "../token/ERC721/ERC721Token.sol";
* and a public setter for metadata URI
*/
contract ERC721TokenMock is ERC721Token {
constructor(string name, string symbol) public
constructor(string memory name, string memory symbol) public
ERC721Token(name, symbol)
{ }

Expand All @@ -25,7 +25,7 @@ contract ERC721TokenMock is ERC721Token {
return super._exists(_tokenId);
}

function setTokenURI(uint256 _tokenId, string _uri) public {
function setTokenURI(uint256 _tokenId, string memory _uri) public {
super._setTokenURI(_tokenId, _uri);
}

Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/MerkleProofWrapper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { MerkleProof } from "../MerkleProof.sol";
contract MerkleProofWrapper {

function verifyProof(
bytes32[] _proof,
bytes32[] memory _proof,
bytes32 _root,
bytes32 _leaf
)
Expand Down
6 changes: 3 additions & 3 deletions contracts/mocks/MessageHelper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ contract MessageHelper {
function showMessage(
bytes32 _message,
uint256 _number,
string _text
string memory _text
)
public
returns (bool)
Expand All @@ -21,7 +21,7 @@ contract MessageHelper {
function buyMessage(
bytes32 _message,
uint256 _number,
string _text
string memory _text
)
public
payable
Expand All @@ -39,7 +39,7 @@ contract MessageHelper {
require(false);
}

function call(address _to, bytes _data) public returns (bool) {
function call(address _to, bytes memory _data) public returns (bool) {
// solium-disable-next-line security/no-low-level-calls
if (_to.call(_data))
return true;
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/RBACMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ contract RBACMock is RBACWithAdmin {
_;
}

constructor(address[] _advisors)
constructor(address[] memory _advisors)
public
{
addRole(msg.sender, ROLE_ADVISOR);
Expand Down
2 changes: 1 addition & 1 deletion contracts/ownership/Contactable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ contract Contactable is Ownable {
* @dev Allows the owner to set a string with their contact information.
* @param _info The contact information to attach to the contract.
*/
function setContactInformation(string _info) public onlyOwner {
function setContactInformation(string memory _info) public onlyOwner {
contactInformation = _info;
}
}
2 changes: 1 addition & 1 deletion contracts/ownership/HasNoTokens.sol
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ contract HasNoTokens is CanReclaimToken {
function tokenFallback(
address _from,
uint256 _value,
bytes _data
bytes memory _data
)
external
pure
Expand Down
2 changes: 1 addition & 1 deletion contracts/payment/SplitPayment.sol
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ contract SplitPayment {
/**
* @dev Constructor
*/
constructor(address[] _payees, uint256[] _shares) public payable {
constructor(address[] memory _payees, uint256[] memory _shares) public payable {
require(_payees.length == _shares.length);
require(_payees.length > 0);

Expand Down
6 changes: 3 additions & 3 deletions contracts/proposals/ERC1046/TokenMetadata.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ import "../../token/ERC20/ERC20.sol";
* @dev TODO - update https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/token/ERC721/ERC721.sol#L17 when 1046 is finalized
*/
contract ERC20TokenMetadata is ERC20 {
function tokenURI() external view returns (string);
function tokenURI() external view returns (string memory);
}


contract ERC20WithMetadata is ERC20TokenMetadata {
string private tokenURI_ = "";

constructor(string _tokenURI)
constructor(string memory _tokenURI)
public
{
tokenURI_ = _tokenURI;
}

function tokenURI() external view returns (string) {
function tokenURI() external view returns (string memory) {
return tokenURI_;
}
}
2 changes: 1 addition & 1 deletion contracts/token/ERC20/DetailedERC20.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ contract DetailedERC20 is ERC20 {
string public symbol;
uint8 public decimals;

constructor(string _name, string _symbol, uint8 _decimals) public {
constructor(string memory _name, string memory _symbol, uint8 _decimals) public {
name = _name;
symbol = _symbol;
decimals = _decimals;
Expand Down
Loading