From 207506d925b2572633b021462a3838fb1dd26bf7 Mon Sep 17 00:00:00 2001 From: t11s Date: Sat, 4 Sep 2021 03:13:20 -0700 Subject: [PATCH 01/16] dapp: WIP --find-contract flag --- src/dapp/libexec/dapp/dapp---find-contract | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/dapp/libexec/dapp/dapp---find-contract diff --git a/src/dapp/libexec/dapp/dapp---find-contract b/src/dapp/libexec/dapp/dapp---find-contract new file mode 100644 index 000000000..64bfe9041 --- /dev/null +++ b/src/dapp/libexec/dapp/dapp---find-contract @@ -0,0 +1,34 @@ +#!/usr/bin/env bash +set -e + +[[ -e "${DAPP_JSON}" ]] || { + echo >&2 "error: ${DAPP_JSON} file not found. Did you run ``dapp build``?" + exit 1 +} + +name=${1?missing contract name} + +mapfile -t contracts < <(<"$DAPP_JSON" jq '.contracts|keys[]' -r) + +name=() + +for path in "${contracts[@]}"; do + if [ -z "${1##*:*}" ]; then + [[ "$path" = "${1/:*/}" ]] && [[ -n "$(jq .contracts.\""$path"\".\""${1#*:}"\"[]? "$DAPP_JSON")" ]] && name+=("$path") + else + [[ -n "$(jq .contracts.\""$path"\".\""$1"\"[]? "$DAPP_JSON")" ]] && name+=("$path") + fi +done + +[[ "${#name[@]}" -eq 0 ]] && { + echo >&2 "${0##*/}: error: $1 not found" + exit 1 +} + +[[ "${#name[@]}" -ge 2 ]] && { + echo >&2 "${0##*/}: error: $1 found in multiple files. Use full path:" + printf 'dapp create %s\n' "${name[@]}" + exit 1 +} + +echo $(<"$DAPP_JSON" jq .contracts.\""${name[0]}"\".\""${1#*:}"\") \ No newline at end of file From 3e8b7e7fcebbea245d690707985378e39c0b3c1e Mon Sep 17 00:00:00 2001 From: t11s Date: Sat, 4 Sep 2021 03:14:42 -0700 Subject: [PATCH 02/16] dapp: Quote echo --- src/dapp/libexec/dapp/dapp---find-contract | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dapp/libexec/dapp/dapp---find-contract b/src/dapp/libexec/dapp/dapp---find-contract index 64bfe9041..3c6eff5c4 100644 --- a/src/dapp/libexec/dapp/dapp---find-contract +++ b/src/dapp/libexec/dapp/dapp---find-contract @@ -31,4 +31,4 @@ done exit 1 } -echo $(<"$DAPP_JSON" jq .contracts.\""${name[0]}"\".\""${1#*:}"\") \ No newline at end of file +echo "$(<"$DAPP_JSON" jq .contracts.\""${name[0]}"\".\""${1#*:}"\")" \ No newline at end of file From 074d8a3cb65c1d93f3e364b303ebfb492272c8b9 Mon Sep 17 00:00:00 2001 From: t11s Date: Sun, 3 Oct 2021 18:52:06 -0700 Subject: [PATCH 03/16] hevm/dapp: solc 0.8.9 default --- .github/scripts/install-solc.sh | 4 ++-- nix/hevm-tests/default.nix | 2 +- nix/solc-static-versions.nix | 4 ++++ overlay.nix | 2 +- src/dapp-tests/default.nix | 4 ++-- src/dapp/README.md | 8 ++++---- src/hevm/README.md | 2 +- src/hevm/src/EVM/Solidity.hs | 2 +- 8 files changed, 16 insertions(+), 12 deletions(-) diff --git a/.github/scripts/install-solc.sh b/.github/scripts/install-solc.sh index 998452937..6f0bdd8f5 100755 --- a/.github/scripts/install-solc.sh +++ b/.github/scripts/install-solc.sh @@ -38,13 +38,13 @@ fetch_solc_macos() { if [ "$HOST_OS" = "Linux" ]; then if [ "${SOLC_VER:-}" == "" ]; then - travis_retry fetch_solc_linux "0.8.6" + travis_retry fetch_solc_linux "0.8.9" else travis_retry fetch_solc_linux "$SOLC_VER" fi else if [ "${SOLC_VER:-}" == "" ]; then - travis_retry fetch_solc_macos "0.8.6" + travis_retry fetch_solc_macos "0.8.9" else travis_retry fetch_solc_macos "$SOLC_VER" fi diff --git a/nix/hevm-tests/default.nix b/nix/hevm-tests/default.nix index 15b91e107..692b60a1c 100644 --- a/nix/hevm-tests/default.nix +++ b/nix/hevm-tests/default.nix @@ -1,6 +1,6 @@ { pkgs }: let - solc = "${pkgs.solc-static-versions.solc_0_8_6}/bin/solc-0.8.6"; + solc = "${pkgs.solc-static-versions.solc_0_8_9}/bin/solc-0.8.9"; solidity = pkgs.fetchFromGitHub { owner = "ethereum"; repo = "solidity"; diff --git a/nix/solc-static-versions.nix b/nix/solc-static-versions.nix index 1bf9af520..63f43634e 100644 --- a/nix/solc-static-versions.nix +++ b/nix/solc-static-versions.nix @@ -63,6 +63,8 @@ rec { solc_0_8_5 = { version = "0.8.5"; path = "solc-linux-amd64-v0.8.5+commit.a4f2e591"; sha256 = "1rrkzajrzaxf5k5hy3fdag41dja4dp75l5034z9001fmlw3j0y5x"; }; solc_0_8_6 = { version = "0.8.6"; path = "solc-linux-amd64-v0.8.6+commit.11564f7e"; sha256 = "0gpc18jlkb3f62mnhdawk9nzd0wfz5iqr5hvjpbkxg32ybrw9mdb"; }; solc_0_8_7 = { version = "0.8.7"; path = "solc-linux-amd64-v0.8.7+commit.e28d00a7"; sha256 = "16bdi52r67znh8l8sdvckqikpz990gcsvdnh2ac2y8a57qw7ag80"; }; + solc_0_8_8 = { version = "0.8.8"; path = "solc-linux-amd64-v0.8.8+commit.dddeac2f"; sha256 = "1c6bn1wa1m3b0h7qzcks7mrkzpk7iqxdx8rli7in2v0kdchv2xz6"; }; + solc_0_8_9 = { version = "0.8.9"; path = "solc-linux-amd64-v0.8.9+commit.e5eed63a"; sha256 = "156b53bpy3aqmd8s7dyx9xsxk83w0mfcpmpqpam6nj9pmlgz2lgq"; }; }; x86_64-darwin = { solc_0_3_6 = { version = "0.3.6"; path = "solc-macosx-amd64-v0.3.6+commit.988fe5e5"; sha256 = "1x4xq0j84sfh9jjvv6x3yvhc76785vfr1mkmkq5idn3knfsq3m82"; }; @@ -139,5 +141,7 @@ rec { solc_0_8_5 = { version = "0.8.5"; path = "solc-macosx-amd64-v0.8.5+commit.a4f2e591"; sha256 = "0f5rvl98p5iylfs0pmxwxyfwivkdp7czyccmwwhagx3fl9kyw89l"; }; solc_0_8_6 = { version = "0.8.6"; path = "solc-macosx-amd64-v0.8.6+commit.11564f7e"; sha256 = "0dnvynr264phf34y04gd2x8b63n1sjjbcsb10kx6pqy79zv9kvl6"; }; solc_0_8_7 = { version = "0.8.7"; path = "solc-macosx-amd64-v0.8.7+commit.e28d00a7"; sha256 = "143rcxifcs8543cp3jjz4f2qfsy8g9w574m0mjs4wzg13wyncp6c"; }; + solc_0_8_8 = { version = "0.8.8"; path = "solc-macosx-amd64-v0.8.8+commit.dddeac2f"; sha256 = "1paib39vmh0bb37bswszwdx4cvws40pgnh19yvz5c795ah2f28hl"; }; + solc_0_8_9 = { version = "0.8.9"; path = "solc-macosx-amd64-v0.8.9+commit.e5eed63a"; sha256 = "1klli28jpld11llg1k5iia6wqp4hkrs7wh326b38p67xv3sx86fn"; }; }; } diff --git a/overlay.nix b/overlay.nix index 96af1a376..4784ef596 100644 --- a/overlay.nix +++ b/overlay.nix @@ -79,7 +79,7 @@ in rec { fetchSolcVersions { owner = "dapphub"; attr = "unreleased_" + super.system; } ); - solc = self.pkgs.runCommand "solc" { } "mkdir -p $out/bin; ln -s ${solc-static-versions.solc_0_8_6}/bin/solc-0.8.6 $out/bin/solc"; + solc = self.pkgs.runCommand "solc" { } "mkdir -p $out/bin; ln -s ${solc-static-versions.solc_0_8_9}/bin/solc-0.8.9 $out/bin/solc"; solc-static-versions = let diff --git a/src/dapp-tests/default.nix b/src/dapp-tests/default.nix index b559c258d..5ce37cc07 100644 --- a/src/dapp-tests/default.nix +++ b/src/dapp-tests/default.nix @@ -1,7 +1,7 @@ { pkgs }: let - solc-0_8_6 = "${pkgs.solc-static-versions.solc_0_8_6}/bin/solc-0.8.6"; + solc-0_8_9 = "${pkgs.solc-static-versions.solc_0_8_6}/bin/solc-0.8.9"; solc-0_7_6 = "${pkgs.solc-static-versions.solc_0_7_6}/bin/solc-0.7.6"; solc-0_6_7 = "${pkgs.solc-static-versions.solc_0_6_7}/bin/solc-0.6.7"; @@ -135,7 +135,7 @@ in libraries0_8 = pkgs.buildDappPackage { name = "libraries-0.8"; shouldFail = false; - solc=solc-0_8_6; + solc=solc-0_8_9; src = pkgs.runCommand "src" {} '' mkdir -p $out cp ${./pass/libraries.sol} $out/libraries.sol; diff --git a/src/dapp/README.md b/src/dapp/README.md index d1aaac860..da18ced57 100644 --- a/src/dapp/README.md +++ b/src/dapp/README.md @@ -61,7 +61,7 @@ This creates two contracts, `Dapptutorial.sol` and `Dapptutorial.t.sol` in the ` For the sake of this tutorial, let's change `Dapptutorial.sol` to a simple vault with an eth bounty that can be accessed by giving the password 42: ```solidity -pragma solidity ^0.8.6; +pragma solidity ^0.8.9; contract Dapptutorial { receive() external payable { @@ -287,7 +287,7 @@ variables](../hevm/README.md#environment-variables). | `DAPP_LIB` | `lib` | Directory for installed Dapp packages | | `DAPP_OUT` | `out` | Directory for compilation artifacts | | `DAPP_ROOT` | `.` | Root directory of compilation | -| `DAPP_SOLC_VERSION` | `0.8.6` | Solidity compiler version to use | +| `DAPP_SOLC_VERSION` | `0.8.9` | Solidity compiler version to use | | `DAPP_SOLC` | n/a | solc binary to use | | `DAPP_LIBRARIES` | automatically deployed | Library addresses to link to | | `DAPP_SKIP_BUILD` | n/a | Avoid compiling this time | @@ -328,7 +328,7 @@ A global (always loaded) config file is located in `~/.dapprc`. A local `.dapprc Whenever you run a `dapp` command the `.dapprc` files are sourced in order (global first, then the one in the current working directory, if it exists). If you wish to set configuration variables, you must use `export` as below: ```sh -export DAPP_SOLC_VERSION=0.8.6 +export DAPP_SOLC_VERSION=0.8.9 export DAPP_REMAPPINGS=$(cat remappings.txt) export DAPP_BUILD_OPTIMIZE=1 export DAPP_BUILD_OPTIMIZE_RUNS=1000000000 @@ -551,7 +551,7 @@ Spins up a geth testnet. dapp-verify-contract -- verify contract source on etherscan Usage: dapp verify-contract :
[constructorArgs] - + Example: `dapp verify-contract src/auth/authorities/RolesAuthority.sol:RolesAuthority 0x9ed0e..` Requires `ETHERSCAN_API_KEY` to be set. diff --git a/src/hevm/README.md b/src/hevm/README.md index 1b7871f27..092c76070 100644 --- a/src/hevm/README.md +++ b/src/hevm/README.md @@ -118,7 +118,7 @@ Counterexamples will be returned for any reachable assertion violations. Where a violation is defined as either an execution of the invalid opcode (`0xfe`), or a revert with a message of the form `abi.encodeWithSelector('Panic(uint256)', errCode)` with `errCode` being one of the predefined solc assertion codes defined -[here](https://docs.soliditylang.org/en/v0.8.6/control-structures.html?highlight=Panic#panic-via-assert-and-error-via-require). +[here](https://docs.soliditylang.org/en/v0.8.9/control-structures.html#panic-via-assert-and-error-via-require). By default hevm ignores assertion violations that result from arithmetic overflow (`Panic(0x11)`), although this behaviour can be customised via the `--assertions` flag. For example, the following diff --git a/src/hevm/src/EVM/Solidity.hs b/src/hevm/src/EVM/Solidity.hs index 91c222b01..cb3442c74 100644 --- a/src/hevm/src/EVM/Solidity.hs +++ b/src/hevm/src/EVM/Solidity.hs @@ -540,7 +540,7 @@ toCode t = case BS16.decode (encodeUtf8 t) of solidity' :: Text -> IO (Text, Text) solidity' src = withSystemTempFile "hevm.sol" $ \path handle -> do hClose handle - writeFile path ("//SPDX-License-Identifier: UNLICENSED\n" <> "pragma solidity ^0.8.6;\n" <> src) + writeFile path ("//SPDX-License-Identifier: UNLICENSED\n" <> "pragma solidity ^0.8.9;\n" <> src) writeFile (path <> ".json") [Here.i| { From 2d5d0f7432898afe0d593be5cde0c7ffa0ce9006 Mon Sep 17 00:00:00 2001 From: t11s Date: Sun, 3 Oct 2021 18:53:36 -0700 Subject: [PATCH 04/16] dapp: Update changelog --- src/dapp/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/dapp/CHANGELOG.md b/src/dapp/CHANGELOG.md index 028873974..7223a48be 100644 --- a/src/dapp/CHANGELOG.md +++ b/src/dapp/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- solc 0.8.9 is now the default compiler version - Dapp remappings ignores non-directories in `DAPP_LIB` ### Fixed From 380f204d3ef49e64b2ff64a9fed3a3aba778ebf2 Mon Sep 17 00:00:00 2001 From: t11s Date: Sun, 3 Oct 2021 19:10:08 -0700 Subject: [PATCH 05/16] dapp: Remove broken command --- src/dapp/libexec/dapp/dapp---find-contract | 34 ---------------------- 1 file changed, 34 deletions(-) delete mode 100644 src/dapp/libexec/dapp/dapp---find-contract diff --git a/src/dapp/libexec/dapp/dapp---find-contract b/src/dapp/libexec/dapp/dapp---find-contract deleted file mode 100644 index 3c6eff5c4..000000000 --- a/src/dapp/libexec/dapp/dapp---find-contract +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env bash -set -e - -[[ -e "${DAPP_JSON}" ]] || { - echo >&2 "error: ${DAPP_JSON} file not found. Did you run ``dapp build``?" - exit 1 -} - -name=${1?missing contract name} - -mapfile -t contracts < <(<"$DAPP_JSON" jq '.contracts|keys[]' -r) - -name=() - -for path in "${contracts[@]}"; do - if [ -z "${1##*:*}" ]; then - [[ "$path" = "${1/:*/}" ]] && [[ -n "$(jq .contracts.\""$path"\".\""${1#*:}"\"[]? "$DAPP_JSON")" ]] && name+=("$path") - else - [[ -n "$(jq .contracts.\""$path"\".\""$1"\"[]? "$DAPP_JSON")" ]] && name+=("$path") - fi -done - -[[ "${#name[@]}" -eq 0 ]] && { - echo >&2 "${0##*/}: error: $1 not found" - exit 1 -} - -[[ "${#name[@]}" -ge 2 ]] && { - echo >&2 "${0##*/}: error: $1 found in multiple files. Use full path:" - printf 'dapp create %s\n' "${name[@]}" - exit 1 -} - -echo "$(<"$DAPP_JSON" jq .contracts.\""${name[0]}"\".\""${1#*:}"\")" \ No newline at end of file From 1c788c4e6cb03b1a5825ed8074f32b4559eb4299 Mon Sep 17 00:00:00 2001 From: t11s Date: Mon, 4 Oct 2021 16:07:30 -0700 Subject: [PATCH 06/16] dapp: Use latest solc docs --- src/hevm/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hevm/README.md b/src/hevm/README.md index 092c76070..9101df512 100644 --- a/src/hevm/README.md +++ b/src/hevm/README.md @@ -118,7 +118,7 @@ Counterexamples will be returned for any reachable assertion violations. Where a violation is defined as either an execution of the invalid opcode (`0xfe`), or a revert with a message of the form `abi.encodeWithSelector('Panic(uint256)', errCode)` with `errCode` being one of the predefined solc assertion codes defined -[here](https://docs.soliditylang.org/en/v0.8.9/control-structures.html#panic-via-assert-and-error-via-require). +[here](https://docs.soliditylang.org/en/latest/control-structures.html#panic-via-assert-and-error-via-require). By default hevm ignores assertion violations that result from arithmetic overflow (`Panic(0x11)`), although this behaviour can be customised via the `--assertions` flag. For example, the following From 27f478684c63de7d54b81ebec62ac0183998b607 Mon Sep 17 00:00:00 2001 From: t11s Date: Tue, 5 Oct 2021 09:41:09 -0700 Subject: [PATCH 07/16] hevm: Ignore broken Yul test --- nix/hevm-tests/yul-equivalence.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nix/hevm-tests/yul-equivalence.nix b/nix/hevm-tests/yul-equivalence.nix index 33d047c1f..dcd148bd8 100644 --- a/nix/hevm-tests/yul-equivalence.nix +++ b/nix/hevm-tests/yul-equivalence.nix @@ -134,7 +134,8 @@ let # --- invalid test --- # https://github.com/ethereum/solidity/issues/9500 - + # https://github.com/ethereum/solidity/issues/12090 + "circularReferencesPruner/nested_same_name.yul" "commonSubexpressionEliminator/object_access.yul" "expressionSplitter/object_access.yul" "fullSuite/stack_compressor_msize.yul" From 66bf105f4f2c9b31fba9b72a499640b38abb5eb4 Mon Sep 17 00:00:00 2001 From: t11s Date: Thu, 7 Oct 2021 21:45:58 -0700 Subject: [PATCH 08/16] Restore .github/scripts/install-solc.sh --- .github/scripts/install-solc.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/scripts/install-solc.sh b/.github/scripts/install-solc.sh index 6f0bdd8f5..998452937 100755 --- a/.github/scripts/install-solc.sh +++ b/.github/scripts/install-solc.sh @@ -38,13 +38,13 @@ fetch_solc_macos() { if [ "$HOST_OS" = "Linux" ]; then if [ "${SOLC_VER:-}" == "" ]; then - travis_retry fetch_solc_linux "0.8.9" + travis_retry fetch_solc_linux "0.8.6" else travis_retry fetch_solc_linux "$SOLC_VER" fi else if [ "${SOLC_VER:-}" == "" ]; then - travis_retry fetch_solc_macos "0.8.9" + travis_retry fetch_solc_macos "0.8.6" else travis_retry fetch_solc_macos "$SOLC_VER" fi From 2c49f5a9e717127d768a41863b3f118a1f424564 Mon Sep 17 00:00:00 2001 From: t11s Date: Thu, 7 Oct 2021 21:46:04 -0700 Subject: [PATCH 09/16] Restore nix/hevm-tests/default.nix --- nix/hevm-tests/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/hevm-tests/default.nix b/nix/hevm-tests/default.nix index 692b60a1c..15b91e107 100644 --- a/nix/hevm-tests/default.nix +++ b/nix/hevm-tests/default.nix @@ -1,6 +1,6 @@ { pkgs }: let - solc = "${pkgs.solc-static-versions.solc_0_8_9}/bin/solc-0.8.9"; + solc = "${pkgs.solc-static-versions.solc_0_8_6}/bin/solc-0.8.6"; solidity = pkgs.fetchFromGitHub { owner = "ethereum"; repo = "solidity"; From 31d09a4c1ac8c350b5b6fcc89957af4173648487 Mon Sep 17 00:00:00 2001 From: t11s Date: Thu, 7 Oct 2021 21:46:07 -0700 Subject: [PATCH 10/16] Restore nix/hevm-tests/yul-equivalence.nix --- nix/hevm-tests/yul-equivalence.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nix/hevm-tests/yul-equivalence.nix b/nix/hevm-tests/yul-equivalence.nix index dcd148bd8..33d047c1f 100644 --- a/nix/hevm-tests/yul-equivalence.nix +++ b/nix/hevm-tests/yul-equivalence.nix @@ -134,8 +134,7 @@ let # --- invalid test --- # https://github.com/ethereum/solidity/issues/9500 - # https://github.com/ethereum/solidity/issues/12090 - "circularReferencesPruner/nested_same_name.yul" + "commonSubexpressionEliminator/object_access.yul" "expressionSplitter/object_access.yul" "fullSuite/stack_compressor_msize.yul" From 84acdc9493c79714bc68915346b8ff38166bb02a Mon Sep 17 00:00:00 2001 From: t11s Date: Thu, 7 Oct 2021 21:46:11 -0700 Subject: [PATCH 11/16] Restore overlay.nix --- overlay.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/overlay.nix b/overlay.nix index 4784ef596..96af1a376 100644 --- a/overlay.nix +++ b/overlay.nix @@ -79,7 +79,7 @@ in rec { fetchSolcVersions { owner = "dapphub"; attr = "unreleased_" + super.system; } ); - solc = self.pkgs.runCommand "solc" { } "mkdir -p $out/bin; ln -s ${solc-static-versions.solc_0_8_9}/bin/solc-0.8.9 $out/bin/solc"; + solc = self.pkgs.runCommand "solc" { } "mkdir -p $out/bin; ln -s ${solc-static-versions.solc_0_8_6}/bin/solc-0.8.6 $out/bin/solc"; solc-static-versions = let From fa5072918db76e1bf65600c7c9ed461355eb7b00 Mon Sep 17 00:00:00 2001 From: t11s Date: Thu, 7 Oct 2021 21:46:16 -0700 Subject: [PATCH 12/16] Restore src/dapp-tests/default.nix --- src/dapp-tests/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dapp-tests/default.nix b/src/dapp-tests/default.nix index 5ce37cc07..b559c258d 100644 --- a/src/dapp-tests/default.nix +++ b/src/dapp-tests/default.nix @@ -1,7 +1,7 @@ { pkgs }: let - solc-0_8_9 = "${pkgs.solc-static-versions.solc_0_8_6}/bin/solc-0.8.9"; + solc-0_8_6 = "${pkgs.solc-static-versions.solc_0_8_6}/bin/solc-0.8.6"; solc-0_7_6 = "${pkgs.solc-static-versions.solc_0_7_6}/bin/solc-0.7.6"; solc-0_6_7 = "${pkgs.solc-static-versions.solc_0_6_7}/bin/solc-0.6.7"; @@ -135,7 +135,7 @@ in libraries0_8 = pkgs.buildDappPackage { name = "libraries-0.8"; shouldFail = false; - solc=solc-0_8_9; + solc=solc-0_8_6; src = pkgs.runCommand "src" {} '' mkdir -p $out cp ${./pass/libraries.sol} $out/libraries.sol; From 6accb8d9a0608e1fcddc0ba8bf152daaa80272c7 Mon Sep 17 00:00:00 2001 From: t11s Date: Thu, 7 Oct 2021 21:46:27 -0700 Subject: [PATCH 13/16] Restore src/dapp/README.md --- src/dapp/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/dapp/README.md b/src/dapp/README.md index da18ced57..d1aaac860 100644 --- a/src/dapp/README.md +++ b/src/dapp/README.md @@ -61,7 +61,7 @@ This creates two contracts, `Dapptutorial.sol` and `Dapptutorial.t.sol` in the ` For the sake of this tutorial, let's change `Dapptutorial.sol` to a simple vault with an eth bounty that can be accessed by giving the password 42: ```solidity -pragma solidity ^0.8.9; +pragma solidity ^0.8.6; contract Dapptutorial { receive() external payable { @@ -287,7 +287,7 @@ variables](../hevm/README.md#environment-variables). | `DAPP_LIB` | `lib` | Directory for installed Dapp packages | | `DAPP_OUT` | `out` | Directory for compilation artifacts | | `DAPP_ROOT` | `.` | Root directory of compilation | -| `DAPP_SOLC_VERSION` | `0.8.9` | Solidity compiler version to use | +| `DAPP_SOLC_VERSION` | `0.8.6` | Solidity compiler version to use | | `DAPP_SOLC` | n/a | solc binary to use | | `DAPP_LIBRARIES` | automatically deployed | Library addresses to link to | | `DAPP_SKIP_BUILD` | n/a | Avoid compiling this time | @@ -328,7 +328,7 @@ A global (always loaded) config file is located in `~/.dapprc`. A local `.dapprc Whenever you run a `dapp` command the `.dapprc` files are sourced in order (global first, then the one in the current working directory, if it exists). If you wish to set configuration variables, you must use `export` as below: ```sh -export DAPP_SOLC_VERSION=0.8.9 +export DAPP_SOLC_VERSION=0.8.6 export DAPP_REMAPPINGS=$(cat remappings.txt) export DAPP_BUILD_OPTIMIZE=1 export DAPP_BUILD_OPTIMIZE_RUNS=1000000000 @@ -551,7 +551,7 @@ Spins up a geth testnet. dapp-verify-contract -- verify contract source on etherscan Usage: dapp verify-contract :
[constructorArgs] - + Example: `dapp verify-contract src/auth/authorities/RolesAuthority.sol:RolesAuthority 0x9ed0e..` Requires `ETHERSCAN_API_KEY` to be set. From 2b518dc0d65fba4a8c59776bef0ca5ea8151c0d3 Mon Sep 17 00:00:00 2001 From: t11s Date: Thu, 7 Oct 2021 21:46:33 -0700 Subject: [PATCH 14/16] Restore src/hevm/src/EVM/Solidity.hs --- src/hevm/src/EVM/Solidity.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hevm/src/EVM/Solidity.hs b/src/hevm/src/EVM/Solidity.hs index cb3442c74..91c222b01 100644 --- a/src/hevm/src/EVM/Solidity.hs +++ b/src/hevm/src/EVM/Solidity.hs @@ -540,7 +540,7 @@ toCode t = case BS16.decode (encodeUtf8 t) of solidity' :: Text -> IO (Text, Text) solidity' src = withSystemTempFile "hevm.sol" $ \path handle -> do hClose handle - writeFile path ("//SPDX-License-Identifier: UNLICENSED\n" <> "pragma solidity ^0.8.9;\n" <> src) + writeFile path ("//SPDX-License-Identifier: UNLICENSED\n" <> "pragma solidity ^0.8.6;\n" <> src) writeFile (path <> ".json") [Here.i| { From b4ee65ae7fc69d7ce8af930a17516f7748be4bd2 Mon Sep 17 00:00:00 2001 From: t11s Date: Thu, 7 Oct 2021 21:47:16 -0700 Subject: [PATCH 15/16] dapp: Update changelog --- src/dapp/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dapp/CHANGELOG.md b/src/dapp/CHANGELOG.md index 7223a48be..b123d2a9e 100644 --- a/src/dapp/CHANGELOG.md +++ b/src/dapp/CHANGELOG.md @@ -10,10 +10,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - The output from `dapp build` now uses color to differentiate warnings and errors +- Support for solc 0.8.9 ### Changed -- solc 0.8.9 is now the default compiler version - Dapp remappings ignores non-directories in `DAPP_LIB` ### Fixed From 3cd294e5b6c373621736798171545c0fa7d35229 Mon Sep 17 00:00:00 2001 From: t11s Date: Thu, 7 Oct 2021 21:48:47 -0700 Subject: [PATCH 16/16] dapp: Changelog fix --- src/dapp/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dapp/CHANGELOG.md b/src/dapp/CHANGELOG.md index b123d2a9e..d64dcefe8 100644 --- a/src/dapp/CHANGELOG.md +++ b/src/dapp/CHANGELOG.md @@ -10,7 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - The output from `dapp build` now uses color to differentiate warnings and errors -- Support for solc 0.8.9 +- Support for solc 0.8.9/0.8.8 ### Changed