This repository has been archived by the owner on Mar 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
ancientversions.txt
48 lines (45 loc) · 2.38 KB
/
ancientversions.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Notes on compiling ancient Solidity:
*. not quite ancient, but before 0.4.12, there is legacyAST, but no AST!
(you would expect the reverse...)
(actual ancient stuff follows)
*. before 0.4.9, *all* contracts would go under the '' source path
NOTE: this means you'll need to extract primarySource from sourceMap
[ideally constructor sourceMap], rather than ast or legacyAST
*. before 0.4.0, the legacyAST format is different
*. before 0.4.0, there was a "standard library" of sources you could
import...? it seems to be undocumented
Coin, CoinReg, Config, NameReg, coin, configUser, mortal, named, owned,
service, std
[however, only 0.3.6 puts them in the sources output... at least if
they're not imported]
see std.txt for the sources (or at least the 0.3.6 versions of such)
*. In 0.3.6 specifically, runtime sourcemaps don't seem to exist
[or we may just need to do something special to get them?]
*. before 0.3.6, there are no sourcemaps, and ASTs have no source ranges
[this means, at best, you could extract primarySource via searching the
ast :-/]
*. before 0.1.6, only one input source was allowed
[this would require an explicit version check]
*. before 0.1.6, the unique input source would have '' as its source path
*. before 0.1.3, there was no deployed bytecode info
PLAN:
*. allow corresponding sources not to exist, so 0.1.6-0.4.8 can compile
[this would mean no sourcePath, source, ast, legacyAST]
*. ALTERNATE PLAN: if possible, locate the corresponding source by
getting the src, extracting the index, and getting the
corresponding source
*. do not support <0.1.6, duh
*. do not change the null-out
*. do not change language inference
*. do allow primary source inference to look at constructor sourcemap
[don't bother with legacy AST or runtime sourcemap]
if using alternate plan: use legacyAST rather than sourcemap
ALTERNATE ALTERNATE PLAN: (currently looking most plausible)
do *not* allow corresponding sources not to exist, but *do* do a repair using
the src from the constructor source map, so things work back to 0.3.6
OH WAIT: could be interface, then no bytecode, so no sourcemap, would have to
use AST
But using AST relies on there not being multiple contracts of same name...
was that illegal prior to 0.4.9? But that means compilation success/failure
could depend on whether whole project is compiled or not.
[Seems like it wasn't *illegal*, but, uh, it might not work reliably...?]