diff options
-rw-r--r-- | .circleci/config.yml | 4 | ||||
-rw-r--r-- | .travis.yml | 12 | ||||
-rw-r--r-- | docs/contracts/functions.rst | 4 | ||||
-rw-r--r-- | docs/frequently-asked-questions.rst | 7 | ||||
-rw-r--r-- | docs/types/reference-types.rst | 2 | ||||
-rwxr-xr-x | scripts/build_emscripten.sh | 2 |
6 files changed, 17 insertions, 14 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml index 52bb36cf..40aa6268 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -34,14 +34,14 @@ version: 2 jobs: build_emscripten: docker: - - image: trzeci/emscripten:sdk-tag-1.38.8-64bit + - image: trzeci/emscripten:sdk-tag-1.38.22-64bit environment: TERM: xterm steps: - checkout - restore_cache: name: Restore Boost build - key: &boost-cache-key emscripten-boost-{{ checksum "scripts/travis-emscripten/install_deps.sh" }}{{ checksum "scripts/travis-emscripten/build_emscripten.sh" }} + key: &boost-cache-key emscripten-boost-{{ checksum "scripts/travis-emscripten/install_deps.sh" }}{{ checksum "scripts/build_emscripten.sh" }}{{ checksum "scripts/travis-emscripten/build_emscripten.sh" }} - run: name: Bootstrap Boost command: | diff --git a/.travis.yml b/.travis.yml index a8a68aff..6d3d70e0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -114,7 +114,7 @@ matrix: before_install: - nvm install 8 - nvm use 8 - - docker pull trzeci/emscripten:sdk-tag-1.38.8-64bit + - docker pull trzeci/emscripten:sdk-tag-1.38.22-64bit env: - SOLC_EMSCRIPTEN=On - SOLC_INSTALL_DEPS_TRAVIS=Off @@ -122,6 +122,16 @@ matrix: - SOLC_TESTS=Off - ZIP_SUFFIX=emscripten - SOLC_STOREBYTECODE=On + # Travis doesn't seem to support "dynamic" cache keys where we could include + # the hashes of certain files. Our CircleCI configuration contains the hash of + # relevant emscripten files. + # + # It is important to invalidate the cache with each emscripten update, because + # dependencies, such as boost, might be broken otherwise. + # + # This key here has no significant on anything, apart from caching. Please keep + # it in sync with the version above. + - EMSCRIPTEN_VERSION_KEY="1.38.22" # OS X Mavericks (10.9) # https://en.wikipedia.org/wiki/OS_X_Mavericks diff --git a/docs/contracts/functions.rst b/docs/contracts/functions.rst index 76245952..522ce5c4 100644 --- a/docs/contracts/functions.rst +++ b/docs/contracts/functions.rst @@ -236,9 +236,9 @@ functions match the given function identifier (or if no data was supplied at all). Furthermore, this function is executed whenever the contract receives plain -Ether (without data). Additionally, in order to receive Ether, the fallback function +Ether (without data). To receive Ether and add it to the total balance of the contract, the fallback function must be marked ``payable``. If no such function exists, the contract cannot receive -Ether through regular transactions. +Ether through regular transactions and throws an exception. In the worst case, the fallback function can only rely on 2300 gas being available (for example when `send` or `transfer` is used), leaving little diff --git a/docs/frequently-asked-questions.rst b/docs/frequently-asked-questions.rst index 11db780c..645789ce 100644 --- a/docs/frequently-asked-questions.rst +++ b/docs/frequently-asked-questions.rst @@ -54,13 +54,6 @@ Yes, you can use ``abi.encodePacked``:: } } -What happens if you send ether along with a function call to a contract? -======================================================================== - -It gets added to the total balance of the contract, just like when you send ether when creating a contract. -You can only send ether along to a function that has the ``payable`` modifier, -otherwise an exception is thrown. - ****************** Advanced Questions ****************** diff --git a/docs/types/reference-types.rst b/docs/types/reference-types.rst index b133bdf1..b9fd9194 100644 --- a/docs/types/reference-types.rst +++ b/docs/types/reference-types.rst @@ -132,7 +132,7 @@ The numeric index becomes a required parameter for the getter. Allocating Memory Arrays ^^^^^^^^^^^^^^^^^^^^^^^^ -You can use the ``new`` keyword to create arrays with a runtime-dependent length in memory. +You must use the ``new`` keyword to create arrays with a runtime-dependent length in memory. As opposed to storage arrays, it is **not** possible to resize memory arrays (e.g. by assigning to the ``.length`` member). You either have to calculate the required size in advance or create a new memory array and copy every element. diff --git a/scripts/build_emscripten.sh b/scripts/build_emscripten.sh index 46521cc5..dbd41113 100755 --- a/scripts/build_emscripten.sh +++ b/scripts/build_emscripten.sh @@ -30,5 +30,5 @@ set -e if [[ "$OSTYPE" != "darwin"* ]]; then ./scripts/travis-emscripten/install_deps.sh - docker run -v $(pwd):/root/project -w /root/project trzeci/emscripten:sdk-tag-1.38.8-64bit ./scripts/travis-emscripten/build_emscripten.sh + docker run -v $(pwd):/root/project -w /root/project trzeci/emscripten:sdk-tag-1.38.22-64bit ./scripts/travis-emscripten/build_emscripten.sh fi |