From 1d0a4e1d7699ee886427563c9f560d196323e4f7 Mon Sep 17 00:00:00 2001 From: Adam Dossa Date: Tue, 19 Jun 2018 09:33:10 +0100 Subject: [PATCH] Small Fixes Changed: 1. OpenZeppelin from 1.9.0 to 1.10.0 (removes warnings) 2. Modified Migrations.sol to use new constructor format 3. Changed keccak256 to explicitly cast to bytes 4. Modified README to start ganache with 7mm gas limit --- README.md | 2 +- contracts/ArbitrationFactory.sol | 2 +- contracts/Migrations.sol | 2 +- package-lock.json | 6 +++--- package.json | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 8bc40f0..4ca0494 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ This will display some warnings due to OpenZeppelin library files which can be i ## Running Test Network To run a test ethereum network, in a separate terminal execute: -`ganache-cli` +`ganache-cli --gasLimit 7000000` ## Deployment diff --git a/contracts/ArbitrationFactory.sol b/contracts/ArbitrationFactory.sol index fc0dbc5..5e79202 100644 --- a/contracts/ArbitrationFactory.sol +++ b/contracts/ArbitrationFactory.sol @@ -45,7 +45,7 @@ contract ArbitrationFactory is Ownable { * @notice Returns the hash of an agreement string */ function generateHash(string _input) pure public returns (bytes32) { - return keccak256(_input); + return keccak256(bytes(_input)); } } diff --git a/contracts/Migrations.sol b/contracts/Migrations.sol index 7d0c4c3..5e03293 100644 --- a/contracts/Migrations.sol +++ b/contracts/Migrations.sol @@ -8,7 +8,7 @@ contract Migrations { if (msg.sender == owner) _; } - function Migrations() public { + constructor() public { owner = msg.sender; } diff --git a/package-lock.json b/package-lock.json index b4b12e3..39cc0e7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4914,9 +4914,9 @@ } }, "openzeppelin-solidity": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/openzeppelin-solidity/-/openzeppelin-solidity-1.9.0.tgz", - "integrity": "sha512-MGI8clDbjrfWUg90AM82O+CHOaabtE2u9HyaUhBMKfWdIaO1urRUIgXIrEuloLvFEBHb5rtcgTARb5DkhUB4KQ==" + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/openzeppelin-solidity/-/openzeppelin-solidity-1.10.0.tgz", + "integrity": "sha512-igkrumQQ2lrN2zjeQV4Dnb0GpTBj1fzMcd8HPyBUqwI0hhuscX/HzXiqKT6gFQl1j9Wy/ppVVs9fqL/foF7Gmg==" }, "ora": { "version": "0.2.3", diff --git a/package.json b/package.json index 48fb87d..6a2bbd6 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "homepage": "https://github.com/jurteam/mvp-smart-contract#readme", "dependencies": { "ganache-cli": "^6.1.3", - "openzeppelin-solidity": "^1.9.0", + "openzeppelin-solidity": "^1.10.0", "truffle": "^4.1.11" }, "devDependencies": {