File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change 8
8
},
9
9
"devDependencies" : {
10
10
"ethereumjs-util" : " ^5.0.1" ,
11
+ "solc" : " ^0.4.24" ,
11
12
"standard" : " ^8.4.0" ,
12
13
"swarmhash" : " ^0.1.0"
13
14
},
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ const path = require('path')
7
7
const semver = require ( 'semver' )
8
8
const ethUtil = require ( 'ethereumjs-util' )
9
9
const swarmhash = require ( 'swarmhash' )
10
+ const solc = require ( 'solc/wrapper' )
10
11
11
12
// This script updates the index files list.js and list.txt in the bin directory,
12
13
// as well as the soljson-latest.js files.
@@ -33,6 +34,10 @@ dirs.forEach(function (dir) {
33
34
return fs . readFileSync ( path . join ( __dirname , dir , file ) )
34
35
}
35
36
37
+ function readBuiltinVersion ( file ) {
38
+ return solc ( require ( path . join ( __dirname , '/bin' , file ) ) ) . version ( )
39
+ }
40
+
36
41
// ascending list (oldest version first)
37
42
const parsedList = files
38
43
. map ( function ( file ) { return file . match ( / ^ s o l j s o n - v ( [ 0 - 9 . ] * ) ( - ( [ ^ + ] * ) ) ? ( \+ ( .* ) ) ? .j s $ / ) } )
@@ -41,6 +46,7 @@ dirs.forEach(function (dir) {
41
46
. map ( function ( pars ) {
42
47
console . log ( 'Processing ' + pars . path )
43
48
const fileContent = readFile ( pars . path )
49
+ pars . reportedVersion = readBuiltinVersion ( pars . path )
44
50
pars . longVersion = buildVersion ( pars )
45
51
pars . keccak256 = '0x' + ethUtil . sha3 ( fileContent ) . toString ( 'hex' )
46
52
pars . urls = [ 'bzzr://' + swarmhash ( fileContent ) . toString ( 'hex' ) ]
You can’t perform that action at this time.
0 commit comments