Commit Graph

137 Commits

Author SHA1 Message Date
chriseth
ff11aa1927 Change placeholder style. 2016-09-05 21:32:27 +02:00
chriseth
9c64edf110 Change function type to include and propagate payable and constant modifier. 2016-09-05 21:28:28 +02:00
Alex Beregszaszi
962531af96 Merged in changes from chriseth/payable 2016-09-05 21:28:28 +02:00
Alex Beregszaszi
680b83b2a4 Mark every other test payable where neccesary in EndToEndTest 2016-09-05 21:28:28 +02:00
Alex Beregszaszi
34a6afbd77 Include EndToEnd test for payable keyword 2016-09-05 21:28:18 +02:00
chriseth
02984b8de1 Require ";" after "_" 2016-09-05 14:54:50 +02:00
chriseth
18abafe029 Merge pull request #960 from Denton-L/change-else-style
Change else style
2016-08-31 22:34:44 +02:00
chriseth
546aca2a3e Test cases. 2016-08-30 15:31:50 +02:00
chriseth
4bfe09897e Make fallback function throw by default. 2016-08-30 15:31:50 +02:00
Denton Liu
ff756bc94d Make tests more consistent in style 2016-08-26 13:33:42 -04:00
chriseth
fb7836d87b Merge pull request #897 from Denton-L/remove-standard
BREAKING: Remove standard contracts
2016-08-26 19:32:18 +02:00
chriseth
ce42114c41 Fix tests. 2016-08-26 01:00:39 +02:00
chriseth
d5e4b7492e Merge pull request #928 from winsvega/solremove
remove sha256 and rmd160 hash
2016-08-24 19:41:12 +02:00
Dimitry
23acb383d5 remove sha256 and rmd160 hash 2016-08-24 19:52:49 +04:00
Denton Liu
e00f802f72 Remove standard contracts 2016-08-19 10:34:50 -04:00
chriseth
b2507e9f10 Merge pull request #839 from chriseth/checkcode
BREAKING: Make function calls throw if target does not have code.
2016-08-17 16:44:15 +02:00
chriseth
d6579a0a5f Merge pull request #888 from chriseth/throwOnDivZero
Throw on division by zero.
2016-08-17 16:43:13 +02:00
chriseth
774bb8ab3b Make function calls throw if target does not have code.
Low-level calls still just execute and will actually report "success".
This allows `x.call.value(y)()` for x being a non-contract account.
2016-08-17 11:30:40 +02:00
chriseth
9c83109549 BREAKING: return only exits current function/modifier 2016-08-17 11:29:31 +02:00
chriseth
e7683f4722 Merge pull request #836 from chriseth/unusedunderscore
BREAKING: Require modifiers to contain "_".
2016-08-17 11:28:02 +02:00
chriseth
e7084d9e16 Throw on division by zero. 2016-08-17 11:27:15 +02:00
chriseth
d5505e21eb Merge pull request #838 from chriseth/ecrecover
Make ecrecover return zero for malformed input.
2016-08-17 11:05:20 +02:00
chriseth
15b85e2ea8 Fix tests. 2016-08-16 19:04:11 +02:00
chriseth
d731225d02 Actually better to return zero on error. 2016-08-16 14:53:01 +02:00
chriseth
034d436933 Make ecrecover throw for malformed input. 2016-08-16 14:53:01 +02:00
chriseth
2a560b798b Throw if contract creation fails. 2016-08-16 14:49:44 +02:00
Bob Summerwill
4ee2114127 Make the Solidity repository standalone.
This commit is the culmination of several months of work to decouple Solidity from the webthree-umbrella so that it can be developed in parallel with cpp-ethereum (the Ethereum C++ runtime) and so that even for the Solidity unit-tests there is no hard-dependency onto the C++ runtime.

The Tests-over-IPC refactoring was a major step in the same process which was already committed.

This commit contains the following changes:

- A subset of the CMake functionality in webthree-helpers was extracted and tailored for Solidity into ./cmake.   Further cleanup is certainly possible.
- A subset of the libdevcore functionality in libweb3core was extracted and tailored for Solidity into ./libdevcore.   Further cleanup is certainly possible
- The gas price constants in EVMSchedule were orphaned into libevmasm.
- Some other refactorings and cleanups were made to sever unnecessary EVM dependencies in the Solidity unit-tests.
- TravisCI and Appveyor support was added, covering builds and running of the unit-tests (Linux and macOS only for now)
- A bug-fix was made to get the Tests-over-IPC running on macOS.
- There are still reliability issues in the unit-tests, which need immediate attention.    The Travis build has been flipped to run the unit-tests 5 times, to try to flush these out.
- The Emscripten automation which was previously in webthree-umbrella was merged into the TravisCI automation here.
- The development ZIP deployment step has been commented out, but we will want to read that ONLY for release branch.

Further iteration on these changes will definitely be needed, but I feel these have got to sufficient maturity than holding them back further isn't winning us anything.    It is go time :-)
2016-08-01 01:45:11 -07:00
chriseth
58cc6cbb37 Bugfix: Allocate empty array. 2016-07-28 17:24:18 +02:00
chriseth
e5db096da9 Fix some more tests. 2016-06-28 23:18:55 +02:00
Dimitry
763faf7b0e replace BalanceAt
add addressHasCode
remove m_state and sealengine
2016-06-28 23:18:55 +02:00
chriseth
ce2258b71e Balance and storage. 2016-06-28 23:18:54 +02:00
chriseth
966709b7d7 logs 2016-06-28 23:18:54 +02:00
chriseth
d6e39054e0 Refactor testing via IPC. 2016-06-28 23:18:54 +02:00
chriseth
1c3a64026b Add a test for a struct accessor. 2016-06-04 21:51:48 +02:00
chriseth
754a992500 Inaccessible dynamic types 2016-06-02 12:52:25 +02:00
chriseth
a09583a2a4 Tests for invalid cleanup and missing bool conversion code. 2016-05-20 16:52:38 +02:00
chriseth
775b757d0e Merge pull request #545 from chriseth/accessFunLabels
Allow access to functions in inline assembly.
2016-05-17 23:59:13 +02:00
chriseth
4b445b898e Merge pull request #546 from chriseth/fixiszero
Correctly use not/bnot/iszero.
2016-05-14 00:58:55 +02:00
chriseth
67ca3bb4b9 Allow access to functions in inline assembly. 2016-05-12 12:30:48 +02:00
chriseth
d4206b7cd0 Remove unused tests and add asserts for not implemented parts in code generation.
quick fix on christian's rational

change so that ubuntu will stop yelling

be more specific with rational declaration for Windows sake

rational in namespace correction for windows
2016-05-10 16:03:33 -05:00
VoR0220
82039b732e added bytes conversion tests, resolved that, converted to binary scaling, refactored the find algo to prevent large numbers and take into account integer bytes
think we're good on solidity type name resolution now

removed couts

updates to documentation and more removed couts along with literal value implementation

forgot semicolons
2016-05-09 11:41:03 -05:00
RJ Catalano
9a075458ad initial work for fixed types...potentially needing a constant literal type for this
notation

Rational implemented...trying to figure out exponential

fix for token bug, also quick fix for the wei and seconds

fixed problem with var...probably a conversion problem for fixed in size capabilities

adding fixed type tests

Removing bitshift and regrouping fixed type tests together

size capabilities functioning properly for fixed types

got exponents up and working with their inverse, changed a few of the tests....something is working that likely shouldn't be

slight changes to how to flip the rational negative around...still trying to figure it out

tests added

updated tests

odd differences in trying soltest from solc binary, let me know if you can replicate

test not working for odd reason

fixed test problem with fixed literals...still need a way to log this error

broken up the tests, added some, changed some things in types and began compiler work

moar tests and prepping for rebuilding much of the types.cpp file

further fixing

initial work for fixed types...potentially needing a constant literal type for this
2016-05-09 11:41:02 -05:00
chriseth
a927efb151 Correctly use not/bnot/iszero.
A long time ago, some opcodes were renamed. Now we should only have
not (bitwise negation) and iszero (logical negation).
2016-05-09 10:52:23 +02:00
chriseth
e6b6e27bd7 Some more tests. 2016-05-03 22:48:53 +02:00
chriseth
7ea3d950d7 Allow calling internal functions of libraries.
Internal functions of libraries can be called as if the library were a
base contract of the calling contract. As the calling convention for
internal functions is to not create a new call context, the code of
these functions will be pulled into the context of the caller,
duplicating their code. This might pull in code of further internal or
even private functions.

The use case for such functions is to allow libraries which can operate
on memory types such that these types can also be modified in place.
2016-05-03 22:41:18 +02:00
chriseth
c126ec84a3 Test for bug in static array constructor argument decoder. 2016-04-15 18:42:44 +02:00
chriseth
82175fbd2b Test for bug when deleting dynamic array of structs. 2016-04-15 16:49:26 +02:00
chriseth
98b686c672 Test to check we correctly clean higher order bits for index access. 2016-03-31 01:25:45 +02:00
chriseth
f049430723 Code generation (missing external access and source locations). 2016-03-30 02:37:00 +02:00
chriseth
1bf87c6c2b Set version to 0.3.0 2016-03-11 17:52:24 +01:00