2016-08-29 17:24:28 +00:00
############
Contributing
############
2020-09-10 15:02:05 +00:00
Help is always welcome and there are plenty of options how you can contribute to Solidity.
2016-08-29 17:24:28 +00:00
2020-09-10 15:02:05 +00:00
In particular, we appreciate support in the following areas:
2016-08-29 17:24:28 +00:00
2020-09-10 15:02:05 +00:00
* Reporting issues.
2016-08-29 17:24:28 +00:00
* Fixing and responding to `Solidity's GitHub issues
2016-10-13 13:10:12 +00:00
<https://github.com/ethereum/solidity/issues>`_, especially those tagged as
2021-02-12 13:09:09 +00:00
`"good first issue" <https://github.com/ethereum/solidity/labels/good%20first%20issue> `_ which are
2016-10-13 13:10:12 +00:00
meant as introductory issues for external contributors.
2020-09-10 15:02:05 +00:00
* Improving the documentation.
* Translating the documentation into more languages.
* Responding to questions from other users on `StackExchange
<https://ethereum.stackexchange.com>`_ and the ` Solidity Gitter Chat
<https://gitter.im/ethereum/solidity>`_.
2021-02-12 13:09:09 +00:00
* Getting involved in the language design process by proposing language changes or new features in the `Solidity forum <https://forum.soliditylang.org/> `_ and providing feedback.
2020-09-10 15:02:05 +00:00
To get started, you can try :ref: `building-from-source` in order to familiarize
yourself with the components of Solidity and the build process. Also, it may be
useful to become well-versed at writing smart-contracts in Solidity.
2016-08-29 17:24:28 +00:00
2018-09-19 14:40:52 +00:00
Please note that this project is released with a `Contributor Code of Conduct <https://raw.githubusercontent.com/ethereum/solidity/develop/CODE_OF_CONDUCT.md> `_ . By participating in this project - in the issues, pull requests, or Gitter channels - you agree to abide by its terms.
2019-07-31 09:57:53 +00:00
Team Calls
==========
If you have issues or pull requests to discuss, or are interested in hearing what
the team and contributors are working on, you can join our public team calls:
2020-11-23 09:32:09 +00:00
- Mondays at 3pm CET/CEST.
2020-09-10 15:02:05 +00:00
- Wednesdays at 2pm CET/CEST.
2019-07-31 09:57:53 +00:00
2021-04-13 14:01:36 +00:00
Both calls take place on `Jitsi <https://meet.komputing.org/solidity> `_ .
2019-07-31 09:57:53 +00:00
2016-08-29 17:24:28 +00:00
How to Report Issues
====================
To report an issue, please use the
`GitHub issues tracker <https://github.com/ethereum/solidity/issues> `_ . When
reporting issues, please mention the following details:
2021-02-12 13:09:09 +00:00
* Solidity version.
* Source code (if applicable).
* Operating system.
* Steps to reproduce the issue.
* Actual vs. expected behaviour.
2016-08-29 17:24:28 +00:00
2016-09-05 14:29:08 +00:00
Reducing the source code that caused the issue to a bare minimum is always
very helpful and sometimes even clarifies a misunderstanding.
2016-08-29 17:24:28 +00:00
Workflow for Pull Requests
==========================
In order to contribute, please fork off of the `` develop `` branch and make your
2016-09-05 14:29:08 +00:00
changes there. Your commit messages should detail *why* you made your change
in addition to *what* you did (unless it is a tiny change).
2016-08-29 17:24:28 +00:00
If you need to pull in any changes from `` develop `` after making your fork (for
example, to resolve potential merge conflicts), please avoid using `` git merge ``
2018-09-25 17:20:59 +00:00
and instead, `` git rebase `` your branch. This will help us review your change
more easily.
2016-08-29 17:24:28 +00:00
2018-09-25 17:20:59 +00:00
Additionally, if you are writing a new feature, please ensure you add appropriate
test cases under `` test/ `` (see below).
2016-08-29 17:24:28 +00:00
2017-12-13 14:44:59 +00:00
However, if you are making a larger change, please consult with the `Solidity Development Gitter channel
2018-09-25 17:20:59 +00:00
<https://gitter.im/ethereum/solidity-dev> `_ (different from the one mentioned above, this one is
2020-09-10 15:02:05 +00:00
focused on compiler and language development instead of language usage) first.
2017-12-13 14:44:59 +00:00
2018-06-19 14:04:18 +00:00
New features and bugfixes should be added to the `` Changelog.md `` file: please
follow the style of previous entries, when applicable.
2016-08-29 17:57:51 +00:00
2018-03-06 09:32:58 +00:00
Finally, please make sure you respect the `coding style
2018-12-10 15:26:05 +00:00
<https://github.com/ethereum/solidity/blob/develop/CODING_STYLE.md> `_
2016-08-29 17:24:28 +00:00
for this project. Also, even though we do CI testing, please test your code and
ensure that it builds locally before submitting a pull request.
Thank you for your help!
2016-11-28 13:13:42 +00:00
2020-09-10 15:02:05 +00:00
Running the Compiler Tests
2016-11-28 13:13:42 +00:00
==========================
2019-12-17 13:41:51 +00:00
Prerequisites
-------------
Some tests require the `evmone <https://github.com/ethereum/evmone/releases> `_
library, others require `libz3 <https://github.com/Z3Prover/z3> `_ . The test script
tries to discover the location of the `` evmone `` library, which can be located
in the current directory, installed on the system level, or the `` deps `` folder
in the project top level. The required file is called `` libevmone.so `` on Linux
systems, `` evmone.dll `` on Windows systems and `` libevmone.dylib `` on macOS.
2020-11-10 14:49:34 +00:00
On macOS some of the testing scripts expect GNU coreutils to be installed.
This can be easiest accomplished using Homebrew: `` brew install coreutils `` .
2020-09-10 15:02:05 +00:00
Running the Tests
2019-12-17 13:41:51 +00:00
-----------------
2018-09-27 13:24:45 +00:00
2019-07-17 09:05:44 +00:00
Solidity includes different types of tests, most of them bundled into the
`Boost C++ Test Framework <https://www.boost.org/doc/libs/1_69_0/libs/test/doc/html/index.html> `_ application `` soltest `` .
2019-12-05 13:07:09 +00:00
Running `` build/test/soltest `` or its wrapper `` scripts/soltest.sh `` is sufficient for most changes.
2016-11-28 13:13:42 +00:00
2019-12-17 13:41:51 +00:00
The `` ./scripts/tests.sh `` script executes most Solidity tests automatically,
including those bundled into the `Boost C++ Test Framework <https://www.boost.org/doc/libs/1_69_0/libs/test/doc/html/index.html> `_ application `` soltest `` (or its wrapper `` scripts/soltest.sh `` ),
as well as command line tests and compilation tests.
2019-07-17 09:05:44 +00:00
2020-08-19 09:07:14 +00:00
The test system automatically tries to discover the location of the `` evmone `` library
2019-09-10 18:56:56 +00:00
starting from the current directory. The required file is called `` libevmone.so `` on Linux systems,
2019-12-17 13:41:51 +00:00
`` evmone.dll `` on Windows systems and `` libevmone.dylib `` on macOS. If it is not found, tests that
use it are skipped. These tests are `` libsolididty/semanticTests `` , `` libsolidity/GasCosts `` ,
`` libsolidity/SolidityEndToEndTest `` , part of the soltest suite. To run all tests, download the library from
2021-07-27 14:39:41 +00:00
`GitHub <https://github.com/ethereum/evmone/releases/tag/v0.8.0> `_
2019-12-17 13:41:51 +00:00
and place it in the project root path or inside the `` deps `` folder.
If the `` libz3 `` library is not installed on your system, you should disable the
SMT tests by exporting `` SMT_FLAGS=--no-smt `` before running `` ./scripts/tests.sh `` or
running `` ./scripts/soltest.sh --no-smt `` .
These tests are `` libsolidity/smtCheckerTests `` and `` libsolidity/smtCheckerTestsJSON `` .
.. note ::
2019-07-17 09:05:44 +00:00
2019-12-17 13:41:51 +00:00
To get a list of all unit tests run by Soltest, run `` ./build/test/soltest --list_content=HRF `` .
For quicker results you can run a subset of, or specific tests.
To run a subset of tests, you can use filters:
`` ./scripts/soltest.sh -t TestSuite/TestName `` ,
where `` TestName `` can be a wildcard `` * `` .
Or, for example, to run all the tests for the yul disambiguator:
`` ./scripts/soltest.sh -t "yulOptimizerTests/disambiguator/*" --no-smt `` .
2019-04-03 15:04:46 +00:00
`` ./build/test/soltest --help `` has extensive help on all of the options available.
2019-12-17 13:41:51 +00:00
2019-04-03 15:04:46 +00:00
See especially:
- `show_progress (-p) <https://www.boost.org/doc/libs/1_69_0/libs/test/doc/html/boost_test/utf_reference/rt_param_reference/show_progress.html> `_ to show test completion,
- `run_test (-t) <https://www.boost.org/doc/libs/1_69_0/libs/test/doc/html/boost_test/utf_reference/rt_param_reference/run_test.html> `_ to run specific tests cases, and
- `report-level (-r) <https://www.boost.org/doc/libs/1_69_0/libs/test/doc/html/boost_test/utf_reference/rt_param_reference/report_level.html> `_ give a more detailed report.
2018-03-12 12:33:37 +00:00
2018-10-10 00:25:30 +00:00
.. note ::
2019-12-17 13:41:51 +00:00
Those working in a Windows environment wanting to run the above basic sets
without libz3. Using Git Bash, you use: `` ./build/test/Release/soltest.exe -- --no-smt `` .
2019-07-17 09:05:44 +00:00
If you are running this in plain Command Prompt, use `` .\build\test\Release\soltest.exe -- --no-smt `` .
2016-11-28 13:13:42 +00:00
2018-12-02 05:32:13 +00:00
If you want to debug using GDB, make sure you build differently than the "usual".
For example, you could run the following command in your `` build `` folder:
2021-06-25 10:25:29 +00:00
.. code-block :: bash
2018-12-02 05:32:13 +00:00
cmake -DCMAKE_BUILD_TYPE=Debug ..
make
2019-12-17 13:41:51 +00:00
This creates symbols so that when you debug a test using the `` --debug `` flag,
you have access to functions and variables in which you can break or print with.
2017-06-21 19:46:42 +00:00
2019-12-17 13:41:51 +00:00
The CI runs additional tests (including `` solc-js `` and testing third party Solidity
frameworks) that require compiling the Emscripten target.
2018-06-25 10:40:52 +00:00
2020-09-10 15:02:05 +00:00
Writing and Running Syntax Tests
2018-03-21 11:47:08 +00:00
--------------------------------
2018-09-27 13:24:45 +00:00
Syntax tests check that the compiler generates the correct error messages for invalid code
and properly accepts valid code.
2018-09-30 13:32:33 +00:00
They are stored in individual files inside the `` tests/libsolidity/syntaxTests `` folder.
2018-10-01 10:54:04 +00:00
These files must contain annotations, stating the expected result(s) of the respective test.
2018-09-30 13:32:33 +00:00
The test suite compiles and checks them against the given expectations.
2018-03-21 11:47:08 +00:00
2018-09-30 13:32:33 +00:00
For example: `` ./test/libsolidity/syntaxTests/double_stateVariable_declaration.sol ``
2018-03-21 11:47:08 +00:00
2021-06-25 10:25:29 +00:00
.. code-block :: solidity
2018-03-21 11:47:08 +00:00
contract test {
uint256 variable;
uint128 variable;
}
// ----
2018-09-25 17:20:59 +00:00
// DeclarationError: (36-52): Identifier already declared.
2018-03-21 11:47:08 +00:00
2018-09-30 13:32:33 +00:00
A syntax test must contain at least the contract under test itself, followed by the separator `` // ---- `` . The comments that follow the separator are used to describe the
2018-09-27 13:24:45 +00:00
expected compiler errors or warnings. The number range denotes the location in the source where the error occurred.
2018-09-30 13:32:33 +00:00
If you want the contract to compile without any errors or warning you can leave
out the separator and the comments that follow it.
2018-03-21 11:47:08 +00:00
2018-09-30 13:32:33 +00:00
In the above example, the state variable `` variable `` was declared twice, which is not allowed. This results in a `` DeclarationError `` stating that the identifier was already declared.
2018-03-21 11:47:08 +00:00
2018-09-30 13:32:33 +00:00
The `` isoltest `` tool is used for these tests and you can find it under `` ./build/test/tools/ `` . It is an interactive tool which allows
2018-07-10 07:17:33 +00:00
editing of failing contracts using your preferred text editor. Let's try to break this test by removing the second declaration of `` variable `` :
2018-03-21 11:47:08 +00:00
2021-06-25 10:25:29 +00:00
.. code-block :: solidity
2018-03-21 11:47:08 +00:00
contract test {
uint256 variable;
}
// ----
2018-09-25 17:20:59 +00:00
// DeclarationError: (36-52): Identifier already declared.
2018-03-21 11:47:08 +00:00
2018-09-30 13:32:33 +00:00
Running `` ./build/test/isoltest `` again results in a test failure:
2018-03-21 11:47:08 +00:00
2021-06-25 10:25:29 +00:00
.. code-block :: text
2018-03-21 11:47:08 +00:00
syntaxTests/double_stateVariable_declaration.sol: FAIL
Contract:
contract test {
uint256 variable;
}
Expected result:
2018-09-25 17:20:59 +00:00
DeclarationError: (36-52): Identifier already declared.
2018-03-21 11:47:08 +00:00
Obtained result:
Success
2018-09-30 13:32:33 +00:00
`` isoltest `` prints the expected result next to the obtained result, and also
provides a way to edit, update or skip the current contract file, or quit the application.
2018-09-25 17:20:59 +00:00
It offers several options for failing tests:
2018-03-21 11:47:08 +00:00
2018-09-30 13:32:33 +00:00
- `` edit `` : `` isoltest `` tries to open the contract in an editor so you can adjust it. It either uses the editor given on the command line (as `` isoltest --editor /path/to/editor `` ), in the environment variable `` EDITOR `` or just `` /usr/bin/editor `` (in that order).
- `` update `` : Updates the expectations for contract under test. This updates the annotations by removing unmet expectations and adding missing expectations. The test is then run again.
- `` skip `` : Skips the execution of this particular test.
- `` quit `` : Quits `` isoltest `` .
All of these options apply to the current contract, expect `` quit `` which stops the entire testing process.
2018-03-21 11:47:08 +00:00
2018-09-30 13:32:33 +00:00
Automatically updating the test above changes it to
2018-03-27 09:55:21 +00:00
2021-06-25 10:25:29 +00:00
.. code-block :: solidity
2018-03-27 09:55:21 +00:00
contract test {
uint256 variable;
}
// ----
2018-09-30 13:32:33 +00:00
and re-run the test. It now passes again:
2018-03-27 09:55:21 +00:00
2021-06-25 10:25:29 +00:00
.. code-block :: text
2018-03-27 09:55:21 +00:00
Re-running test case...
syntaxTests/double_stateVariable_declaration.sol: OK
2018-03-21 11:47:08 +00:00
.. note ::
2018-09-30 13:32:33 +00:00
Choose a name for the contract file that explains what it tests, e.g. `` double_variable_declaration.sol `` .
2018-09-25 17:20:59 +00:00
Do not put more than one contract into a single file, unless you are testing inheritance or cross-contract calls.
Each file should test one aspect of your new feature.
2018-03-21 11:47:08 +00:00
2018-04-05 09:36:16 +00:00
Running the Fuzzer via AFL
==========================
Fuzzing is a technique that runs programs on more or less random inputs to find exceptional execution
2018-09-30 13:36:31 +00:00
states (segmentation faults, exceptions, etc). Modern fuzzers are clever and run a directed search
2018-04-05 09:36:16 +00:00
inside the input. We have a specialized binary called `` solfuzzer `` which takes source code as input
and fails whenever it encounters an internal compiler error, segmentation fault or similar, but
2018-09-30 13:36:31 +00:00
does not fail if e.g., the code contains an error. This way, fuzzing tools can find internal problems in the compiler.
2018-04-05 09:36:16 +00:00
2020-08-06 12:39:34 +00:00
We mainly use `AFL <https://lcamtuf.coredump.cx/afl/> `_ for fuzzing. You need to download and
2018-09-30 13:36:31 +00:00
install the AFL packages from your repositories (afl, afl-clang) or build them manually.
2018-06-27 14:02:27 +00:00
Next, build Solidity (or just the `` solfuzzer `` binary) with AFL as your compiler:
2018-04-05 09:36:16 +00:00
2021-06-25 10:25:29 +00:00
.. code-block :: bash
2018-04-05 09:36:16 +00:00
cd build
# if needed
make clean
cmake .. -DCMAKE_C_COMPILER=path/to/afl-gcc -DCMAKE_CXX_COMPILER=path/to/afl-g++
make solfuzzer
2018-06-27 14:02:27 +00:00
At this stage you should be able to see a message similar to the following:
2021-05-20 19:00:44 +00:00
.. code-block :: text
2018-09-03 13:01:15 +00:00
Scanning dependencies of target solfuzzer
[ 98%] Building CXX object test/tools/CMakeFiles/solfuzzer.dir/fuzzer.cpp.o
afl-cc 2.52b by <lcamtuf@google.com>
afl-as 2.52b by <lcamtuf@google.com>
2018-06-27 14:02:27 +00:00
[+] Instrumented 1949 locations (64-bit, non-hardened mode, ratio 100%).
2018-09-03 13:01:15 +00:00
[100%] Linking CXX executable solfuzzer
2018-06-27 14:02:27 +00:00
If the instrumentation messages did not appear, try switching the cmake flags pointing to AFL's clang binaries:
2021-06-25 10:25:29 +00:00
.. code-block :: bash
2018-07-04 23:23:14 +00:00
2018-06-27 14:02:27 +00:00
# if previously failed
make clean
cmake .. -DCMAKE_C_COMPILER=path/to/afl-clang -DCMAKE_CXX_COMPILER=path/to/afl-clang++
make solfuzzer
2018-09-30 13:36:31 +00:00
Otherwise, upon execution the fuzzer halts with an error saying binary is not instrumented:
2018-06-27 14:02:27 +00:00
2021-05-20 19:00:44 +00:00
.. code-block :: text
2018-06-27 14:02:27 +00:00
2018-09-03 13:01:15 +00:00
afl-fuzz 2.52b by <lcamtuf@google.com>
2018-06-27 14:02:27 +00:00
... (truncated messages)
[*] Validating target binary...
[-] Looks like the target binary is not instrumented! The fuzzer depends on
compile-time instrumentation to isolate interesting test cases while
mutating the input data. For more information, and for tips on how to
instrument binaries, please see /usr/share/doc/afl-doc/docs/README.
When source code is not available, you may be able to leverage QEMU
mode support. Consult the README for tips on how to enable this.
(It is also possible to use afl-fuzz as a traditional, "dumb" fuzzer.
For that, you can use the -n option - but expect much worse results.)
[-] PROGRAM ABORT : No instrumentation detected
Location : check_binary(), afl-fuzz.c:6920
2018-09-30 13:36:31 +00:00
Next, you need some example source files. This makes it much easier for the fuzzer
2018-04-05 09:36:16 +00:00
to find errors. You can either copy some files from the syntax tests or extract test files
from the documentation or the other tests:
2021-06-25 10:25:29 +00:00
.. code-block :: bash
2018-04-05 09:36:16 +00:00
mkdir /tmp/test_cases
cd /tmp/test_cases
# extract from tests:
path/to/solidity/scripts/isolate_tests.py path/to/solidity/test/libsolidity/SolidityEndToEndTest.cpp
# extract from documentation:
2021-07-01 13:19:38 +00:00
path/to/solidity/scripts/isolate_tests.py path/to/solidity/docs
2018-04-05 09:36:16 +00:00
The AFL documentation states that the corpus (the initial input files) should not be
too large. The files themselves should not be larger than 1 kB and there should be
2018-09-30 13:36:31 +00:00
at most one input file per functionality, so better start with a small number of.
There is also a tool called `` afl-cmin `` that can trim input files
2018-04-05 09:36:16 +00:00
that result in similar behaviour of the binary.
Now run the fuzzer (the `` -m `` extends the size of memory to 60 MB):
2021-06-25 10:25:29 +00:00
.. code-block :: bash
2018-04-05 09:36:16 +00:00
afl-fuzz -m 60 -i /tmp/test_cases -o /tmp/fuzzer_reports -- /path/to/solfuzzer
2018-09-30 13:36:31 +00:00
The fuzzer creates source files that lead to failures in `` /tmp/fuzzer_reports `` .
2018-04-05 09:36:16 +00:00
Often it finds many similar source files that produce the same error. You can
use the tool `` scripts/uniqueErrors.sh `` to filter out the unique errors.
2017-06-21 19:46:42 +00:00
Whiskers
========
2018-09-25 17:20:59 +00:00
*Whiskers* is a string templating system similar to `Mustache <https://mustache.github.io> `_ . It is used by the
2017-06-21 19:46:42 +00:00
compiler in various places to aid readability, and thus maintainability and verifiability, of the code.
2018-09-30 13:36:31 +00:00
The syntax comes with a substantial difference to Mustache. The template markers `` {{ `` and `` }} `` are
2020-01-09 17:35:22 +00:00
replaced by `` < `` and `` > `` in order to aid parsing and avoid conflicts with :ref: `yul`
2017-06-21 19:46:42 +00:00
(The symbols `` < `` and `` > `` are invalid in inline assembly, while `` { `` and `` } `` are used to delimit blocks).
2018-09-30 13:36:31 +00:00
Another limitation is that lists are only resolved one depth and they do not recurse. This may change in the future.
2017-06-21 19:46:42 +00:00
A rough specification is the following:
Any occurrence of `` <name> `` is replaced by the string-value of the supplied variable `` name `` without any
escaping and without iterated replacements. An area can be delimited by `` <#name>...</name> `` . It is replaced
by as many concatenations of its contents as there were sets of variables supplied to the template system,
2017-07-05 04:46:07 +00:00
each time replacing any `` <inner> `` items by their respective value. Top-level variables can also be used
inside such areas.
2018-11-12 10:46:23 +00:00
2020-04-23 14:29:17 +00:00
There are also conditionals of the form `` <?name>...<!name>...</name> `` , where template replacements
continue recursively either in the first or the second segment depending on the value of the boolean
parameter `` name `` . If `` <?+name>...<!+name>...</+name> `` is used, then the check is whether
the string parameter `` name `` is non-empty.
2018-11-12 10:46:23 +00:00
.. _documentation-style:
Documentation Style Guide
=========================
2020-09-10 15:02:05 +00:00
In the following section you find style recommendations specifically focusing on documentation
2018-11-12 10:46:23 +00:00
contributions to Solidity.
English Language
----------------
Use English, with British English spelling preferred, unless using project or brand names. Try to reduce the usage of
local slang and references, making your language as clear to all readers as possible. Below are some references to help:
* `Simplified technical English <https://en.wikipedia.org/wiki/Simplified_Technical_English> `_
* `International English <https://en.wikipedia.org/wiki/International_English> `_
* `British English spelling <https://en.oxforddictionaries.com/spelling/british-and-spelling> `_
.. note ::
While the official Solidity documentation is written in English, there are community contributed :ref: `translations`
2021-05-04 14:04:43 +00:00
in other languages available. Please refer to the `translation guide <https://github.com/solidity-docs/translation-guide> `_
for information on how to contribute to the community translations.
2018-11-12 10:46:23 +00:00
Title Case for Headings
-----------------------
2020-08-06 12:39:34 +00:00
Use `title case <https://titlecase.com> `_ for headings. This means capitalise all principal words in
2018-11-12 10:46:23 +00:00
titles, but not articles, conjunctions, and prepositions unless they start the
title.
For example, the following are all correct:
2020-09-10 15:02:05 +00:00
* Title Case for Headings.
* For Headings Use Title Case.
* Local and State Variable Names.
* Order of Layout.
2018-11-12 10:46:23 +00:00
Expand Contractions
-------------------
Use expanded contractions for words, for example:
* "Do not" instead of "Don't".
* "Can not" instead of "Can't".
Active and Passive Voice
------------------------
Active voice is typically recommended for tutorial style documentation as it
helps the reader understand who or what is performing a task. However, as the
Solidity documentation is a mixture of tutorials and reference content, passive
voice is sometimes more applicable.
As a summary:
* Use passive voice for technical reference, for example language definition and internals of the Ethereum VM.
* Use active voice when describing recommendations on how to apply an aspect of Solidity.
For example, the below is in passive voice as it specifies an aspect of Solidity:
Functions can be declared `` pure `` in which case they promise not to read
from or modify the state.
For example, the below is in active voice as it discusses an application of Solidity:
When invoking the compiler, you can specify how to discover the first element
of a path, and also path prefix remappings.
Common Terms
------------
* "Function parameters" and "return variables", not input and output parameters.
Code Examples
-------------
2019-03-13 11:01:52 +00:00
A CI process tests all code block formatted code examples that begin with `` pragma solidity `` , `` contract `` , `` library ``
or `` interface `` using the `` ./test/cmdlineTests.sh `` script when you create a PR. If you are adding new code examples,
ensure they work and pass tests before creating the PR.
Ensure that all code examples begin with a `` pragma `` version that spans the largest where the contract code is valid.
2020-09-08 08:48:04 +00:00
For example `` pragma solidity >=0.4.0 <0.9.0; `` .
2019-03-13 11:01:52 +00:00
Running Documentation Tests
---------------------------
Make sure your contributions pass our documentation tests by running `` ./scripts/docs.sh `` that installs dependencies
2019-04-03 00:35:29 +00:00
needed for documentation and checks for any problems such as broken links or syntax issues.
2020-09-10 15:02:05 +00:00
Solidity Language Design
========================
2021-02-12 13:09:09 +00:00
To actively get involved in the language design process and share your ideas concerning the future of Solidity,
please join the `Solidity forum <https://forum.soliditylang.org/> `_ .
2020-09-10 15:02:05 +00:00
2021-02-12 13:09:09 +00:00
The Solidity forum serves as the place to propose and discuss new language features and their implementation in
the early stages of ideation or modifications of existing features.
2020-09-10 15:02:05 +00:00
2021-02-12 13:09:09 +00:00
As soon as proposals get more tangible, their
implementation will also be discussed in the `Solidity GitHub repository <https://github.com/ethereum/solidity> `_
in the form of issues.
In addition to the forum and issue discussions, we regularly host language design discussion calls in which selected
topics, issues or feature implementations are debated in detail. The invitation to those calls is shared via the forum.
We are also sharing feedback surveys and other content that is relevant to language design in the forum.
2020-09-10 15:02:05 +00:00
2021-02-12 13:09:09 +00:00
If you want to know where the team is standing in terms or implementing new features, you can follow the implementation status in the `Solidity Github project <https://github.com/ethereum/solidity/projects/43> `_ .
2020-09-10 15:02:05 +00:00
Issues in the design backlog need further specification and will either be discussed in a language design call or in a regular team call. You can
see the upcoming changes for the next breaking release by changing from the default branch (`develop`) to the `breaking branch <https://github.com/ethereum/solidity/tree/breaking> `_ .
2021-02-12 13:09:09 +00:00
For ad-hoc cases and questions you can reach out to us via the `Solidity-dev Gitter channel <https://gitter.im/ethereum/solidity-dev> `_ , a
dedicated chatroom for conversations around the Solidity compiler and language development.
We are happy to hear your thoughts on how we can improve the language design process to be even more collaborative and transparent.