From fcdfa51268a4cd354efe6bf4c9d27287da1ef216 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Silva?= Date: Tue, 19 Jun 2018 16:09:44 +0100 Subject: [PATCH 1/2] update solidity version to 0.4.24 --- contracts/Migrations.sol | 2 +- contracts/OwnedSet.sol | 2 +- contracts/RelaySet.sol | 2 +- contracts/RelayedOwnedSet.sol | 2 +- contracts/interfaces/BaseOwnedSet.sol | 2 +- contracts/interfaces/Owned.sol | 2 +- contracts/interfaces/ValidatorSet.sol | 2 +- contracts/test/TestOwnedSet.sol | 2 +- contracts/test/TestRelayedOwnedSet.sol | 2 +- yarn.lock | 83 +++++++++++++------------- 10 files changed, 51 insertions(+), 50 deletions(-) diff --git a/contracts/Migrations.sol b/contracts/Migrations.sol index ccb09e6..408e3ec 100644 --- a/contracts/Migrations.sol +++ b/contracts/Migrations.sol @@ -1,4 +1,4 @@ -pragma solidity ^0.4.21; +pragma solidity ^0.4.24; contract Migrations { diff --git a/contracts/OwnedSet.sol b/contracts/OwnedSet.sol index 754c920..ab1627c 100644 --- a/contracts/OwnedSet.sol +++ b/contracts/OwnedSet.sol @@ -14,7 +14,7 @@ // An owned validator set contract where the owner can add or remove validators. -pragma solidity ^0.4.22; +pragma solidity ^0.4.24; import "./interfaces/BaseOwnedSet.sol"; import "./interfaces/ValidatorSet.sol"; diff --git a/contracts/RelaySet.sol b/contracts/RelaySet.sol index d48c25a..61e8484 100644 --- a/contracts/RelaySet.sol +++ b/contracts/RelaySet.sol @@ -18,7 +18,7 @@ // trigger a change, since the engine will be listening for events emitted by // the outer relay contract. -pragma solidity ^0.4.22; +pragma solidity ^0.4.24; import "./interfaces/Owned.sol"; import "./interfaces/ValidatorSet.sol"; diff --git a/contracts/RelayedOwnedSet.sol b/contracts/RelayedOwnedSet.sol index f8951cb..04c5a84 100644 --- a/contracts/RelayedOwnedSet.sol +++ b/contracts/RelayedOwnedSet.sol @@ -15,7 +15,7 @@ // A `OwnedSet` validator contract that is meant to be relayed by a `RelaySet` // contract. -pragma solidity ^0.4.22; +pragma solidity ^0.4.24; import "./interfaces/BaseOwnedSet.sol"; import "./RelaySet.sol"; diff --git a/contracts/interfaces/BaseOwnedSet.sol b/contracts/interfaces/BaseOwnedSet.sol index 819079d..66dd7de 100644 --- a/contracts/interfaces/BaseOwnedSet.sol +++ b/contracts/interfaces/BaseOwnedSet.sol @@ -20,7 +20,7 @@ // currently active validator set. The base implementation of `finalizeChange` // validates that there are existing unfinalized changes. -pragma solidity ^0.4.22; +pragma solidity ^0.4.24; import "./Owned.sol"; diff --git a/contracts/interfaces/Owned.sol b/contracts/interfaces/Owned.sol index b7a956c..a6d3e99 100644 --- a/contracts/interfaces/Owned.sol +++ b/contracts/interfaces/Owned.sol @@ -14,7 +14,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -pragma solidity ^0.4.22; +pragma solidity ^0.4.24; contract Owned { diff --git a/contracts/interfaces/ValidatorSet.sol b/contracts/interfaces/ValidatorSet.sol index dad4149..98bf1a5 100644 --- a/contracts/interfaces/ValidatorSet.sol +++ b/contracts/interfaces/ValidatorSet.sol @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -pragma solidity ^0.4.22; +pragma solidity ^0.4.24; interface ValidatorSet { diff --git a/contracts/test/TestOwnedSet.sol b/contracts/test/TestOwnedSet.sol index 2123909..b62ba51 100644 --- a/contracts/test/TestOwnedSet.sol +++ b/contracts/test/TestOwnedSet.sol @@ -15,7 +15,7 @@ // A testable version of the `OwnedSet` contract that exposes some internal // state and overrides the default system address. -pragma solidity ^0.4.22; +pragma solidity ^0.4.24; import "../OwnedSet.sol"; diff --git a/contracts/test/TestRelayedOwnedSet.sol b/contracts/test/TestRelayedOwnedSet.sol index d6b503c..00414a3 100644 --- a/contracts/test/TestRelayedOwnedSet.sol +++ b/contracts/test/TestRelayedOwnedSet.sol @@ -15,7 +15,7 @@ // A testable version of the `InnerOwnedSet` and `OuterSet` contracts that // exposes some internal state and overrides de default system address. -pragma solidity ^0.4.22; +pragma solidity ^0.4.24; import "../RelayedOwnedSet.sol"; import "../RelaySet.sol"; diff --git a/yarn.lock b/yarn.lock index 1d1d6d9..62d42e1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -170,9 +170,9 @@ ast-types@0.10.1: version "0.10.1" resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.10.1.tgz#f52fca9715579a14f841d67d7f8d25432ab6a3dd" -ast-types@0.11.3: - version "0.11.3" - resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.11.3.tgz#c20757fe72ee71278ea0ff3d87e5c2ca30d9edf8" +ast-types@0.11.5: + version "0.11.5" + resolved "https://registry.yarnpkg.com/ast-types/-/ast-types-0.11.5.tgz#9890825d660c03c28339f315e9fa0a360e31ec28" async-each@^1.0.0: version "1.0.1" @@ -788,7 +788,7 @@ babylon@^6.17.3, babylon@^6.18.0: version "6.18.0" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" -babylon@^7.0.0-beta.30: +babylon@^7.0.0-beta.47: version "7.0.0-beta.47" resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.47.tgz#6d1fa44f0abec41ab7c780481e62fd9aafbdea80" @@ -1096,14 +1096,14 @@ collection-visit@^1.0.0: object-visit "^1.0.0" color-convert@^1.9.0: - version "1.9.1" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.1.tgz#c1261107aeb2f294ebffec9ed9ecad529a6097ed" + version "1.9.2" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.2.tgz#49881b8fba67df12a96bdf3f56c0aab9e7913147" dependencies: - color-name "^1.1.1" + color-name "1.1.1" -color-name@^1.1.1: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" +color-name@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.1.tgz#4b1415304cf50028ea81643643bd82ea05803689" colors@1.0.3: version "1.0.3" @@ -1342,8 +1342,8 @@ enhanced-resolve@^4.0.0: tapable "^1.0.0" envinfo@^5.7.0: - version "5.9.0" - resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-5.9.0.tgz#1e681b7400c384c679ffc886b6e3f811d7e687b5" + version "5.10.0" + resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-5.10.0.tgz#503a9774ae15b93ea68bdfae2ccd6306624ea6df" errno@^0.1.3: version "0.1.7" @@ -1352,8 +1352,8 @@ errno@^0.1.3: prr "~1.0.1" error-ex@^1.2.0, error-ex@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" + version "1.3.2" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" dependencies: is-arrayish "^0.2.1" @@ -1579,8 +1579,8 @@ first-chunk-stream@^2.0.0: readable-stream "^2.0.2" flow-parser@^0.*: - version "0.73.0" - resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.73.0.tgz#525ac0776f743e16b6dca1a3dd6c602260b15773" + version "0.74.0" + resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.74.0.tgz#4acc8f55bdce5fa4da43c72c28ef8a9600ace87c" for-in@^1.0.1, for-in@^1.0.2: version "1.0.2" @@ -1645,8 +1645,8 @@ fsevents@^1.0.0: node-pre-gyp "^0.10.0" ganache-cli@^6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/ganache-cli/-/ganache-cli-6.1.0.tgz#486c846497204b644166b5f0f74c9b41d02bdc25" + version "6.1.3" + resolved "https://registry.yarnpkg.com/ganache-cli/-/ganache-cli-6.1.3.tgz#40323e56c878b5c7275830cb8a4fa75a32f6d468" dependencies: source-map-support "^0.5.3" webpack-cli "^2.0.9" @@ -2319,8 +2319,8 @@ js-tokens@^3.0.0, js-tokens@^3.0.2: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" js-yaml@3.x, js-yaml@^3.6.1: - version "3.11.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.11.0.tgz#597c1a8bd57152f26d622ce4117851a51f5ebaef" + version "3.12.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1" dependencies: argparse "^1.0.7" esprima "^4.0.0" @@ -2350,14 +2350,14 @@ jscodeshift@^0.4.0: write-file-atomic "^1.2.0" jscodeshift@^0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/jscodeshift/-/jscodeshift-0.5.0.tgz#bdb7b6cc20dd62c16aa728c3fa2d2fe66ca7c748" + version "0.5.1" + resolved "https://registry.yarnpkg.com/jscodeshift/-/jscodeshift-0.5.1.tgz#4af6a721648be8638ae1464a190342da52960c33" dependencies: babel-plugin-transform-flow-strip-types "^6.8.0" babel-preset-es2015 "^6.9.0" babel-preset-stage-1 "^6.5.0" babel-register "^6.9.0" - babylon "^7.0.0-beta.30" + babylon "^7.0.0-beta.47" colors "^1.1.2" flow-parser "^0.*" lodash "^4.13.1" @@ -2365,7 +2365,7 @@ jscodeshift@^0.5.0: neo-async "^2.5.0" node-dir "0.1.8" nomnom "^1.8.1" - recast "^0.14.1" + recast "^0.15.0" temp "^0.8.1" write-file-atomic "^1.2.0" @@ -3079,8 +3079,8 @@ p-lazy@^1.0.0: resolved "https://registry.yarnpkg.com/p-lazy/-/p-lazy-1.0.0.tgz#ec53c802f2ee3ac28f166cc82d0b2b02de27a835" p-limit@^1.1.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.2.0.tgz#0e92b6bedcb59f022c13d0f1949dc82d15909f1c" + version "1.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" dependencies: p-try "^1.0.0" @@ -3237,8 +3237,8 @@ preserve@^0.2.0: resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" prettier@^1.12.1: - version "1.13.4" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.13.4.tgz#31bbae6990f13b1093187c731766a14036fa72e6" + version "1.13.5" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.13.5.tgz#7ae2076998c8edce79d63834e9b7b09fead6bfd0" pretty-bytes@^4.0.2: version "4.0.2" @@ -3361,11 +3361,11 @@ recast@^0.12.5: private "~0.1.5" source-map "~0.6.1" -recast@^0.14.1: - version "0.14.7" - resolved "https://registry.yarnpkg.com/recast/-/recast-0.14.7.tgz#4f1497c2b5826d42a66e8e3c9d80c512983ff61d" +recast@^0.15.0: + version "0.15.0" + resolved "https://registry.yarnpkg.com/recast/-/recast-0.15.0.tgz#b8c8bfdda245e1580c0a4d9fc25d4e820bf57208" dependencies: - ast-types "0.11.3" + ast-types "0.11.5" esprima "~4.0.0" private "~0.1.5" source-map "~0.6.1" @@ -3528,8 +3528,8 @@ resolve@1.1.x: resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" resolve@^1.1.6: - version "1.7.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.7.1.tgz#aadd656374fd298aee895bc026b8297418677fd3" + version "1.8.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.8.1.tgz#82f1ec19a423ac1fbd080b0bab06ba36e84a7a26" dependencies: path-parse "^1.0.5" @@ -3586,8 +3586,8 @@ rxjs@^5.5.2: symbol-observable "1.0.1" rxjs@^6.1.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.2.0.tgz#e024d0e180b72756a83c2aaea8f25423751ba978" + version "6.2.1" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.2.1.tgz#246cebec189a6cbc143a3ef9f62d6f4c91813ca1" dependencies: tslib "^1.9.0" @@ -3601,7 +3601,7 @@ safe-regex@^1.1.0: dependencies: ret "~0.1.10" -"safer-buffer@>= 2.1.2 < 3": +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2: version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" @@ -3877,13 +3877,14 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" sshpk@^1.7.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.14.1.tgz#130f5975eddad963f1d56f92b9ac6c51fa9f83eb" + version "1.14.2" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.14.2.tgz#c6fc61648a3d9c4e764fd3fcdf4ea105e492ba98" dependencies: asn1 "~0.2.3" assert-plus "^1.0.0" dashdash "^1.12.0" getpass "^0.1.1" + safer-buffer "^2.0.2" optionalDependencies: bcrypt-pbkdf "^1.0.0" ecc-jsbn "~0.1.1" @@ -4258,8 +4259,8 @@ webpack-addons@^1.1.5: jscodeshift "^0.4.0" webpack-cli@^2.0.9: - version "2.1.4" - resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-2.1.4.tgz#cab81e79249127384fb69b2fdfe2055f9c771b76" + version "2.1.5" + resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-2.1.5.tgz#3081fdeb2f205f0a54aa397986880b0c20a71f7a" dependencies: chalk "^2.4.1" cross-spawn "^6.0.5" From e337d2f5da70b6a91c415a17d15141a8908ec601 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Silva?= Date: Tue, 19 Jun 2018 16:10:12 +0100 Subject: [PATCH 2/2] fix truffle Migrations contract warning --- contracts/Migrations.sol | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/contracts/Migrations.sol b/contracts/Migrations.sol index 408e3ec..1dce8a8 100644 --- a/contracts/Migrations.sol +++ b/contracts/Migrations.sol @@ -2,7 +2,7 @@ pragma solidity ^0.4.24; contract Migrations { - address public owner; + address public owner = msg.sender; uint public lastCompletedMigration; modifier restricted() { @@ -11,10 +11,6 @@ contract Migrations { } } - function Migrations() public { - owner = msg.sender; - } - function setCompleted(uint completed) public restricted { lastCompletedMigration = completed; }