mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #7782 from ethereum/develop
Merge develop into develop_060
This commit is contained in:
commit
b6ad8f06e7
@ -11,7 +11,7 @@ docker build -t ethereum/solidity-buildpack-deps:ubuntu1904-<revision> -f Docker
|
|||||||
docker push ethereum/solidity-buildpack-deps:ubuntu1904-<revision>
|
docker push ethereum/solidity-buildpack-deps:ubuntu1904-<revision>
|
||||||
```
|
```
|
||||||
|
|
||||||
The current revision is `2`.
|
The current revision is stored in a [circle ci pipeline parameter](https://github.com/CircleCI-Public/api-preview-docs/blob/master/docs/pipeline-parameters.md#pipeline-parameters) called `docker-image-rev`. Please update the value assigned to this parameter at the time of a docker image update. Please verify that the value assigned to the parameter matches the revision part of the docker image tag (`<revision>` in the docker build/push snippet shown above). Otherwise, the docker image used by circle ci and the one actually pushed to docker hub will differ.
|
||||||
|
|
||||||
Once the docker image has been built and pushed to Dockerhub, you can find it at:
|
Once the docker image has been built and pushed to Dockerhub, you can find it at:
|
||||||
|
|
||||||
|
@ -5,7 +5,11 @@
|
|||||||
# - t: test
|
# - t: test
|
||||||
# - ubu: ubuntu
|
# - ubu: ubuntu
|
||||||
# - ems: Emscripten
|
# - ems: Emscripten
|
||||||
version: 2
|
version: 2.1
|
||||||
|
parameters:
|
||||||
|
docker-image-rev:
|
||||||
|
type: string
|
||||||
|
default: "2"
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
|
|
||||||
@ -106,7 +110,7 @@ defaults:
|
|||||||
|
|
||||||
- test_ubuntu1904_clang: &test_ubuntu1904_clang
|
- test_ubuntu1904_clang: &test_ubuntu1904_clang
|
||||||
docker:
|
docker:
|
||||||
- image: ethereum/solidity-buildpack-deps:ubuntu1904-clang-2
|
- image: ethereum/solidity-buildpack-deps:ubuntu1904-clang-<< pipeline.parameters.docker-image-rev >>
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- attach_workspace:
|
- attach_workspace:
|
||||||
@ -117,7 +121,7 @@ defaults:
|
|||||||
|
|
||||||
- test_ubuntu1904: &test_ubuntu1904
|
- test_ubuntu1904: &test_ubuntu1904
|
||||||
docker:
|
docker:
|
||||||
- image: ethereum/solidity-buildpack-deps:ubuntu1904-2
|
- image: ethereum/solidity-buildpack-deps:ubuntu1904-<< pipeline.parameters.docker-image-rev >>
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- attach_workspace:
|
- attach_workspace:
|
||||||
@ -287,7 +291,7 @@ jobs:
|
|||||||
|
|
||||||
b_ubu_clang: &build_ubuntu1904_clang
|
b_ubu_clang: &build_ubuntu1904_clang
|
||||||
docker:
|
docker:
|
||||||
- image: ethereum/solidity-buildpack-deps:ubuntu1904-clang-2
|
- image: ethereum/solidity-buildpack-deps:ubuntu1904-clang-<< pipeline.parameters.docker-image-rev >>
|
||||||
environment:
|
environment:
|
||||||
CC: clang
|
CC: clang
|
||||||
CXX: clang++
|
CXX: clang++
|
||||||
@ -299,7 +303,7 @@ jobs:
|
|||||||
|
|
||||||
b_ubu: &build_ubuntu1904
|
b_ubu: &build_ubuntu1904
|
||||||
docker:
|
docker:
|
||||||
- image: ethereum/solidity-buildpack-deps:ubuntu1904-2
|
- image: ethereum/solidity-buildpack-deps:ubuntu1904-<< pipeline.parameters.docker-image-rev >>
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- run: *run_build
|
- run: *run_build
|
||||||
@ -313,7 +317,7 @@ jobs:
|
|||||||
|
|
||||||
b_ubu18: &build_ubuntu1804
|
b_ubu18: &build_ubuntu1804
|
||||||
docker:
|
docker:
|
||||||
- image: ethereum/solidity-buildpack-deps:ubuntu1804-2
|
- image: ethereum/solidity-buildpack-deps:ubuntu1804-<< pipeline.parameters.docker-image-rev >>
|
||||||
environment:
|
environment:
|
||||||
CMAKE_OPTIONS: -DCMAKE_CXX_FLAGS=-O2
|
CMAKE_OPTIONS: -DCMAKE_CXX_FLAGS=-O2
|
||||||
CMAKE_BUILD_TYPE: RelWithDebugInfo
|
CMAKE_BUILD_TYPE: RelWithDebugInfo
|
||||||
@ -519,7 +523,7 @@ jobs:
|
|||||||
|
|
||||||
b_docs:
|
b_docs:
|
||||||
docker:
|
docker:
|
||||||
- image: ethereum/solidity-buildpack-deps:ubuntu1904-2
|
- image: ethereum/solidity-buildpack-deps:ubuntu1904-<< pipeline.parameters.docker-image-rev >>
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- run: *setup_prerelease_commit_hash
|
- run: *setup_prerelease_commit_hash
|
||||||
@ -544,7 +548,7 @@ jobs:
|
|||||||
|
|
||||||
t_ubu_cli: &t_ubu_cli
|
t_ubu_cli: &t_ubu_cli
|
||||||
docker:
|
docker:
|
||||||
- image: ethereum/solidity-buildpack-deps:ubuntu1904-2
|
- image: ethereum/solidity-buildpack-deps:ubuntu1904-<< pipeline.parameters.docker-image-rev >>
|
||||||
environment:
|
environment:
|
||||||
TERM: xterm
|
TERM: xterm
|
||||||
steps:
|
steps:
|
||||||
@ -602,7 +606,22 @@ jobs:
|
|||||||
npm --version
|
npm --version
|
||||||
test/externalTests/solc-js/solc-js.sh /tmp/workspace/soljson.js $(cat /tmp/workspace/version.txt)
|
test/externalTests/solc-js/solc-js.sh /tmp/workspace/soljson.js $(cat /tmp/workspace/version.txt)
|
||||||
|
|
||||||
t_ems_external_gnosis:
|
t_ems_compile_ext_gnosis:
|
||||||
|
docker:
|
||||||
|
- image: circleci/node:10
|
||||||
|
environment:
|
||||||
|
TERM: xterm
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- attach_workspace:
|
||||||
|
at: /tmp/workspace
|
||||||
|
- run:
|
||||||
|
name: External GnosisSafe compilation
|
||||||
|
command: |
|
||||||
|
export COMPILE_ONLY=1
|
||||||
|
test/externalTests/gnosis.sh /tmp/workspace/soljson.js || test/externalTests/gnosis.sh /tmp/workspace/soljson.js
|
||||||
|
|
||||||
|
t_ems_test_ext_gnosis:
|
||||||
docker:
|
docker:
|
||||||
- image: circleci/node:10
|
- image: circleci/node:10
|
||||||
environment:
|
environment:
|
||||||
@ -618,7 +637,22 @@ jobs:
|
|||||||
- run: *gitter_notify_failure
|
- run: *gitter_notify_failure
|
||||||
- run: *gitter_notify_success
|
- run: *gitter_notify_success
|
||||||
|
|
||||||
t_ems_external_zeppelin:
|
t_ems_compile_ext_zeppelin:
|
||||||
|
docker:
|
||||||
|
- image: circleci/node:10
|
||||||
|
environment:
|
||||||
|
TERM: xterm
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- attach_workspace:
|
||||||
|
at: /tmp/workspace
|
||||||
|
- run:
|
||||||
|
name: External Zeppelin compilation
|
||||||
|
command: |
|
||||||
|
export COMPILE_ONLY=1
|
||||||
|
test/externalTests/zeppelin.sh /tmp/workspace/soljson.js || test/externalTests/zeppelin.sh /tmp/workspace/soljson.js
|
||||||
|
|
||||||
|
t_ems_test_ext_zeppelin:
|
||||||
docker:
|
docker:
|
||||||
- image: circleci/node:10
|
- image: circleci/node:10
|
||||||
environment:
|
environment:
|
||||||
@ -634,7 +668,26 @@ jobs:
|
|||||||
- run: *gitter_notify_failure
|
- run: *gitter_notify_failure
|
||||||
- run: *gitter_notify_success
|
- run: *gitter_notify_success
|
||||||
|
|
||||||
t_ems_external_colony:
|
t_ems_compile_ext_colony:
|
||||||
|
docker:
|
||||||
|
- image: circleci/node:10
|
||||||
|
environment:
|
||||||
|
TERM: xterm
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- attach_workspace:
|
||||||
|
at: /tmp/workspace
|
||||||
|
- run:
|
||||||
|
name: Install test dependencies
|
||||||
|
command: |
|
||||||
|
sudo apt-get -qy install lsof
|
||||||
|
- run:
|
||||||
|
name: External ColonyNetworks compilation
|
||||||
|
command: |
|
||||||
|
export COMPILE_ONLY=1
|
||||||
|
test/externalTests/colony.sh /tmp/workspace/soljson.js || test/externalTests/colony.sh /tmp/workspace/soljson.js
|
||||||
|
|
||||||
|
t_ems_test_ext_colony:
|
||||||
docker:
|
docker:
|
||||||
- image: circleci/node:10
|
- image: circleci/node:10
|
||||||
environment:
|
environment:
|
||||||
@ -698,6 +751,9 @@ workflows:
|
|||||||
# Emscripten build and selected tests
|
# Emscripten build and selected tests
|
||||||
- b_ems: *workflow_trigger_on_tags
|
- b_ems: *workflow_trigger_on_tags
|
||||||
- t_ems_solcjs: *workflow_emscripten
|
- t_ems_solcjs: *workflow_emscripten
|
||||||
|
- t_ems_compile_ext_colony: *workflow_emscripten
|
||||||
|
- t_ems_compile_ext_gnosis: *workflow_emscripten
|
||||||
|
- t_ems_compile_ext_zeppelin: *workflow_emscripten
|
||||||
|
|
||||||
nightly:
|
nightly:
|
||||||
|
|
||||||
@ -711,12 +767,6 @@ workflows:
|
|||||||
- develop_060
|
- develop_060
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# Emscripten builds and external tests
|
|
||||||
- b_ems: *workflow_trigger_on_tags
|
|
||||||
- t_ems_external_zeppelin: *workflow_emscripten
|
|
||||||
- t_ems_external_gnosis: *workflow_emscripten
|
|
||||||
- t_ems_external_colony: *workflow_emscripten
|
|
||||||
|
|
||||||
# OSSFUZZ builds and (regression) tests
|
# OSSFUZZ builds and (regression) tests
|
||||||
- b_ubu_ossfuzz: *workflow_trigger_on_tags
|
- b_ubu_ossfuzz: *workflow_trigger_on_tags
|
||||||
- t_ubu_ossfuzz: *workflow_ubuntu1904_ossfuzz
|
- t_ubu_ossfuzz: *workflow_ubuntu1904_ossfuzz
|
||||||
|
@ -44,10 +44,10 @@ contract HelloWorld {
|
|||||||
To get started with Solidity, you can use [Remix](https://remix.ethereum.org/), which is an
|
To get started with Solidity, you can use [Remix](https://remix.ethereum.org/), which is an
|
||||||
browser-based IDE. Here are some example contracts:
|
browser-based IDE. Here are some example contracts:
|
||||||
|
|
||||||
1. [Voting](https://solidity.readthedocs.io/en/v0.4.24/solidity-by-example.html#voting)
|
1. [Voting](https://solidity.readthedocs.io/en/latest/solidity-by-example.html#voting)
|
||||||
2. [Blind Auction](https://solidity.readthedocs.io/en/v0.4.24/solidity-by-example.html#blind-auction)
|
2. [Blind Auction](https://solidity.readthedocs.io/en/latest/solidity-by-example.html#blind-auction)
|
||||||
3. [Safe remote purchase](https://solidity.readthedocs.io/en/v0.4.24/solidity-by-example.html#safe-remote-purchase)
|
3. [Safe remote purchase](https://solidity.readthedocs.io/en/latest/solidity-by-example.html#safe-remote-purchase)
|
||||||
4. [Micropayment Channel](https://solidity.readthedocs.io/en/v0.4.24/solidity-by-example.html#micropayment-channel)
|
4. [Micropayment Channel](https://solidity.readthedocs.io/en/latest/solidity-by-example.html#micropayment-channel)
|
||||||
|
|
||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
|
@ -520,8 +520,11 @@ map<u256, u256> Assembly::optimiseInternal(
|
|||||||
|
|
||||||
LinkerObject const& Assembly::assemble() const
|
LinkerObject const& Assembly::assemble() const
|
||||||
{
|
{
|
||||||
|
// Return the already assembled object, if present.
|
||||||
if (!m_assembledObject.bytecode.empty())
|
if (!m_assembledObject.bytecode.empty())
|
||||||
return m_assembledObject;
|
return m_assembledObject;
|
||||||
|
// Otherwise ensure the object is actually clear.
|
||||||
|
assertThrow(m_assembledObject.linkReferences.empty(), AssemblyException, "Unexpected link references.");
|
||||||
|
|
||||||
size_t subTagSize = 1;
|
size_t subTagSize = 1;
|
||||||
for (auto const& sub: m_subs)
|
for (auto const& sub: m_subs)
|
||||||
|
@ -35,7 +35,9 @@ namespace eth
|
|||||||
*/
|
*/
|
||||||
struct LinkerObject
|
struct LinkerObject
|
||||||
{
|
{
|
||||||
|
/// The bytecode.
|
||||||
bytes bytecode;
|
bytes bytecode;
|
||||||
|
|
||||||
/// Map from offsets in bytecode to library identifiers. The addresses starting at those offsets
|
/// Map from offsets in bytecode to library identifiers. The addresses starting at those offsets
|
||||||
/// need to be replaced by the actual addresses by the linker.
|
/// need to be replaced by the actual addresses by the linker.
|
||||||
std::map<size_t, std::string> linkReferences;
|
std::map<size_t, std::string> linkReferences;
|
||||||
@ -47,7 +49,7 @@ struct LinkerObject
|
|||||||
void link(std::map<std::string, h160> const& _libraryAddresses);
|
void link(std::map<std::string, h160> const& _libraryAddresses);
|
||||||
|
|
||||||
/// @returns a hex representation of the bytecode of the given object, replacing unlinked
|
/// @returns a hex representation of the bytecode of the given object, replacing unlinked
|
||||||
/// addresses by placeholders.
|
/// addresses by placeholders. This output is lowercase.
|
||||||
std::string toHex() const;
|
std::string toHex() const;
|
||||||
|
|
||||||
/// @returns a 36 character string that is used as a placeholder for the library
|
/// @returns a 36 character string that is used as a placeholder for the library
|
||||||
|
@ -255,8 +255,13 @@ function truffle_run_test
|
|||||||
printLog "Running compile function..."
|
printLog "Running compile function..."
|
||||||
$compile_fn
|
$compile_fn
|
||||||
verify_compiler_version "$SOLCVERSION"
|
verify_compiler_version "$SOLCVERSION"
|
||||||
printLog "Running test function..."
|
|
||||||
$test_fn
|
if [[ "$COMPILE_ONLY" == 1 ]]; then
|
||||||
|
printLog "Skipping test function..."
|
||||||
|
else
|
||||||
|
printLog "Running test function..."
|
||||||
|
$test_fn
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user