Commit Graph

1153 Commits

Author SHA1 Message Date
Daniel
9bce5f91dc
Merge pull request #14538 from ethereum/experimentalAnalysisBasicInfrastructure
New Analysis basic infrastructure
2023-09-13 13:00:56 +02:00
Kamil Śliwak
dc68480f72 Move Natspec syntax tests to natspecJSON 2023-09-11 18:06:42 +02:00
Matheus Aguiar
14aed39261 Introduce experimental analysis basic infrastructure 2023-09-11 12:29:44 -03:00
Nikola Matic
fdc6699159 Rematerialize zero literals with default cleanup sequence
Add unused pruner step to the end of the default cleanup sequence
2023-09-04 15:40:33 +02:00
Nikola Matić
64427412c4
Merge pull request #14347 from ethereum/fixTypeCheckingAbiDecode
Disallow the use of `TypeType` in complex expressions
2023-07-18 18:14:45 +02:00
Nikola Matic
82cb5338a9 Relax delegatecall type restriction plus test 2023-07-18 17:07:13 +02:00
Daniel Kirchner
110e2a656d Restrict mobile types of function types.
Move ternary tests to semanticTests
2023-07-18 14:13:36 +02:00
Matheus Aguiar
4fd5bbf50b Restrict mobileType of TypeType 2023-07-18 12:58:11 +02:00
Matheus Aguiar
f3fc19080a Override mobileType of MagicType to null 2023-07-18 10:56:02 +02:00
Daniel Kirchner
0ab0842c29 Disallow conversions between declaration function types. 2023-07-17 18:33:07 +02:00
Kamil Śliwak
dad2bf6472 Relax restrictions on immutable initialization 2023-07-14 15:29:32 +02:00
Kamil Śliwak
0afe025f19 Minor tweaks to immutable tests for better diffs 2023-07-14 15:29:32 +02:00
Nikola Matic
47969adf91 Experimental standard library
Change import syntax and cover with tests
2023-06-06 17:16:23 +02:00
Nikola Matic
5893e099fe Allow qualified access to events from other contracts 2023-05-26 12:52:52 +02:00
Nikola Matic
7a34d34045 Restrict experimental solidity to constantinople and above 2023-05-17 17:03:43 +02:00
Nikola Matic
8a41f4ac7e Introduce solidity-next pragma
Exclude pragma experimental error from ANTLR tests

Test for first pragma after non-pragma declaration

Resolve import pragmas

Change pragma name from next to solidity

Add Changelog entries

Address review comments
2023-05-15 19:25:13 +02:00
Nikola Matic
9a87b587d5 Disallow immutable initialization in try catch statements
Trigger github
2023-05-09 14:48:14 +02:00
Kamil Śliwak
34da6c8811 Remove the inaccurate Type::categoryName() and change the error message for invalid calls to one independent of the category 2023-04-20 13:50:22 +02:00
Daniel
a77d4e281f
Merge pull request #14139 from ethereum/make-plus-binary-only
Make plus binary only (second attempt)
2023-04-18 21:20:31 +02:00
Matheus Aguiar
64f57ac3c7 Fix null dereference in using for directive when operator name is empty 2023-04-18 14:23:58 -03:00
Kamil Śliwak
8a14680851 Disallow unary plus at the parsing stage 2023-04-18 16:47:00 +02:00
Nikola Matić
8194acb3b7
Merge pull request #14119 from veniger/natspec-struct
Adds NatSpec to AST for struct definitions.
2023-04-18 16:05:20 +02:00
Marko Veniger
07def48f45 Adds NatSpec to AST for struct definitions. 2023-04-18 13:10:21 +02:00
Alex Beregszaszi
71bea997aa Add and update tests 2023-04-15 13:47:11 +02:00
Kamil Śliwak
c1fffa892d Parser: Extract literal parsing into a separate function 2023-04-12 12:30:05 +02:00
Kamil Śliwak
46457cfc25
Merge pull request #14103 from ethereum/extra-tests
A few extra tests for operators, denominations and virtual functions
2023-04-12 11:32:26 +02:00
hrkrshnn
41ce3feb0a test: some tests for push0
1. `push0_disallowed.yul`: checks if `push0()` is a valid builtin in strict Yul
2. `push0_disallowed.sol`: checks if `push0()` is a valid builtin in inline assembly
3. `push0.sol`: simple semantic test that returns 0
4. `evmone_support.sol`: tests if push0 works properly in evmone
5. Updated some bytecode too large tests to use `shanghai` as version
6. Updated various tests where `push1 0` was hardcoded in different forms / expectations on bytecode
size (`Assembler.cpp`, `GasCosts.cpp`, `SolidityCompiler.cpp`, `SolidityExpressionCompiler.cpp`)
2023-04-12 00:10:24 +02:00
Kamil Śliwak
66fcd542bc Tests for denominations in array sizes 2023-04-07 14:54:09 +02:00
Kamil Śliwak
5687f6e934 Tests for literal denominations with non-integer literals 2023-04-07 14:48:13 +02:00
Kamil Śliwak
9020efec58
Merge pull request #14087 from ethereum/better-error-for-invalid-call
Better error message when trying to call things that are not functions
2023-04-05 17:38:10 +02:00
Christian Parpart
be8752b5d3 Adds natspec to AST for enum definition. 2023-04-05 14:58:32 +02:00
Kamil Śliwak
a019f400d0 Better error message when trying to call things that are not functions 2023-04-04 17:30:37 +02:00
Matheus Aguiar
4aa310034c Added missing keyword unicode to Lexer 2023-03-28 13:51:43 -03:00
Matheus Aguiar
0158de60be Refactored NumberUnit and FunctionDefinition. Added OctalNumber. Fixed number followed by identifier with no whitespace. 2023-03-24 16:19:33 -03:00
wechman
aba5ac5e2a User-defined operators: Tests 2023-02-22 00:40:03 +01:00
Kamil Śliwak
fa0d3a44a7 Tests for using enums and fixed-point types as user-defined types 2023-02-21 23:42:22 +01:00
Kamil Śliwak
38b5ae578b Fix typo in test name: singed -> signed 2023-02-21 21:30:03 +01:00
Kamil Śliwak
1a981af548 Only suggest removing parentheses from a construction call if they're empty 2023-02-15 14:27:03 +01:00
Kamil Śliwak
73183d3df9 Fix missing base constructor arguments being treated as an unimplemented function 2023-02-15 14:27:03 +01:00
Kamil Śliwak
bc3cbfa18d Add more tests tests for calls to base constructor with missing or wrong arguments 2023-02-15 14:17:55 +01:00
Kamil Śliwak
16bc4c6b5f Fix test for replacing base constructor 2023-02-15 14:17:55 +01:00
Matheus Aguiar
2b70b08d5f Allow library external functions to be bound with using for 2023-02-02 13:39:19 -03:00
Nikola Matic
e7543d487d Issue warning when using deprecated SELFDESTRUCT 2023-01-25 16:55:11 +01:00
Rodrigo Q. Saramago
ef6ff2f055
Adds support for the EVM version "Paris".
Deprecates `block.difficulty` and disallow `difficulty()` in inline assembly for EVM versions >= paris.
The change is due to the renaming introduced by EIP-4399 (see: https://eips.ethereum.org/EIPS/eip-4399).
Introduces `block.prevrandao` in Solidity and `prevrandao()` in inline assembly for EVM versions >= paris.

Co-authored-by: Alex Beregszaszi <alex@rtfs.hu>
Co-authored-by: Daniel <daniel@ekpyron.org>
Co-authored-by: matheusaaguiar <95899911+matheusaaguiar@users.noreply.github.com>
Co-authored-by: Nikola Matić <nikola.matic@ethereum.org>
2023-01-23 18:50:36 +00:00
vlad
484ee8a621 Additional tests for edge cases for mutability, visibility, location, experimental, global, indexed and anonymous 2023-01-20 20:05:36 +01:00
vlad
7fbd36855d Disallow usage of the indexed attribute for modifier parameters Added tests for edge cases of several keywords 2023-01-20 19:53:02 +01:00
vlad
6a0ea174b8 Disallow several indexed attributes for the same event parameter 2023-01-20 19:53:02 +01:00
Matheus Aguiar
7779b6f352 Forbid private library functions to be attached outside their declaration scope 2023-01-17 16:27:35 -03:00
Daniel
f441e1323a
Merge pull request #13384 from zemse/develop
Allow named parameters in mapping types
2023-01-09 17:59:29 +01:00
Soham Zemse
fa78e0f3d4 feat: allow named parameters in mapping types
Co-authored-by: Hari <webmail.hari@gmail.com>

test: add parser and abi test cases

docs: add example on using named parameters for mappings

- Add changelog

feat: update antlr grammar to allow named parameters in mappings

fix: prevent conflicting mapping parameter names

ref: change order of mapping initializers

test: update expectations and fix build

test: add more tests

fix: use common error & code for conflicting params

fix: issue with accessing nested mapping

test: add conflicting params tests for more nested levels

Update libsolidity/analysis/DeclarationTypeChecker.cpp

Co-authored-by: Nikola Matić <nikola.matic@ethereum.org>

fix: error reported with the same code twice

test: add more tests for 3 level nested mapping

Address review comments
2022-12-08 11:56:58 +01:00