Skip to content

Commit

Permalink
Merge pull request #61 from 0xProject/fix/solc-compiler-0.8-support
Browse files Browse the repository at this point in the history
fix solc 0.8 support
  • Loading branch information
dorothy-zbornak authored Mar 16, 2022
2 parents 8433908 + b80738e commit 343b40d
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 45 deletions.
9 changes: 9 additions & 0 deletions sol-compiler/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
[
{
"version": "4.8.0",
"changes": [
{
"note": "Fix 0.8 support",
"pr": 61
}
]
},
{
"timestamp": 1645908702,
"version": "4.7.9",
Expand Down
2 changes: 1 addition & 1 deletion sol-compiler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
"pluralize": "^7.0.0",
"require-from-string": "^2.0.1",
"semver": "5.5.0",
"solc": "^0.5.5",
"solc": "^0.8",
"source-map-support": "^0.5.0",
"strip-comments": "^2.0.1",
"web3-eth-abi": "^1.0.0-beta.24",
Expand Down
1 change: 0 additions & 1 deletion sol-compiler/src/solc_wrapper_v06.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export class SolcWrapperV06 extends SolcWrapperV05 {
}
// Shim the old `compileStandardWrapper` function.
const solcInstance = (await getSolcJSAsync(this.solidityVersion, !!this._opts.isOfflineMode)) as SolcV06;
solcInstance.compileStandardWrapper = solcInstance.compile;
return compileSolcJSAsync(solcInstance, input);
}

Expand Down
2 changes: 1 addition & 1 deletion sol-compiler/src/utils/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export async function compileSolcJSAsync(
standardInput: solc.StandardInput,
): Promise<solc.StandardOutput> {
const standardInputStr = JSON.stringify(standardInput);
const standardOutputStr = solcInstance.compileStandardWrapper(standardInputStr);
const standardOutputStr = solcInstance.compile(standardInputStr);
const compiled: solc.StandardOutput = JSON.parse(standardOutputStr);
return compiled;
}
Expand Down
9 changes: 9 additions & 0 deletions sol-tracing-utils/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
[
{
"version": "7.3.0",
"changes": [
{
"note": "Update deps",
"pr": 61
}
]
},
{
"timestamp": 1645908702,
"version": "7.2.9",
Expand Down
2 changes: 1 addition & 1 deletion sol-tracing-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"mkdirp": "^0.5.1",
"rimraf": "^2.6.2",
"semaphore-async-await": "^1.5.1",
"solc": "^0.5.5",
"solc": "^0.8",
"solidity-parser-antlr": "^0.4.2"
},
"devDependencies": {
Expand Down
9 changes: 9 additions & 0 deletions typescript-typings/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
[
{
"version": "5.3.0",
"changes": [
{
"note": "Update typings for solc 0.8",
"pr": 61
}
]
},
{
"timestamp": 1645908702,
"version": "5.2.2",
Expand Down
8 changes: 2 additions & 6 deletions typescript-typings/types/solc/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,8 @@ declare module 'solc' {
settings: CompilerSettings;
}
export interface SolcInstance {
compile(
sources: InputSources,
optimizerEnabled: number,
findImports: (importPath: string) => ImportContents,
): CompilationResult;
compileStandardWrapper(input: string, findImports?: (importPath: string) => ImportContents): string;
compile(sources: InputSources, findImports?: (importPath: string) => ImportContents): CompilationResult;
compile(sources: string, findImports?: (importPath: string) => ImportContents): string;
version(): string;
}
export function loadRemoteVersion(
Expand Down
54 changes: 19 additions & 35 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3823,14 +3823,15 @@ [email protected]:
version "2.18.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.18.0.tgz#2bf063ddee7c7891176981a2cc798e5754bc6970"

[email protected]:
version "3.0.2"
resolved "https://registry.yarnpkg.com/commander/-/commander-3.0.2.tgz#6837c3fb677ad9933d1cfba42dd14d5117d6b39e"

commander@^2.12.1, commander@^2.20.0:
version "2.20.3"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"

commander@^8.1.0:
version "8.3.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-8.3.0.tgz#4837ea1b2da67b9c616a67afbb0fafee567bca66"
integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==

commondir@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b"
Expand Down Expand Up @@ -5604,6 +5605,11 @@ flush-write-stream@^1.0.0, flush-write-stream@^1.0.2:
inherits "^2.0.3"
readable-stream "^2.3.6"

follow-redirects@^1.12.1:
version "1.14.9"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.9.tgz#dd4ea157de7bfaf9ea9b3fbd85aa16951f78d8d7"
integrity sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==

for-each@~0.3.3:
version "0.3.3"
resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e"
Expand Down Expand Up @@ -5664,16 +5670,6 @@ fs-constants@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad"

fs-extra@^0.30.0:
version "0.30.0"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.30.0.tgz#f233ffcc08d4da7d432daa449776989db1df93f0"
dependencies:
graceful-fs "^4.1.2"
jsonfile "^2.1.0"
klaw "^1.0.0"
path-is-absolute "^1.0.0"
rimraf "^2.2.8"

fs-extra@^4.0.2, fs-extra@^4.0.3:
version "4.0.3"
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94"
Expand Down Expand Up @@ -6073,7 +6069,7 @@ got@^7.1.0:
url-parse-lax "^1.0.0"
url-to-options "^1.0.1"

graceful-fs@^4.0.0, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.2:
graceful-fs@^4.0.0, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.2:
version "4.2.4"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb"

Expand Down Expand Up @@ -7033,12 +7029,6 @@ json5@^1.0.1:
dependencies:
minimist "^1.2.0"

jsonfile@^2.1.0:
version "2.4.0"
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8"
optionalDependencies:
graceful-fs "^4.1.6"

jsonfile@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb"
Expand Down Expand Up @@ -7114,12 +7104,6 @@ klaw-sync@^6.0.0:
dependencies:
graceful-fs "^4.1.11"

klaw@^1.0.0:
version "1.3.1"
resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439"
optionalDependencies:
graceful-fs "^4.1.9"

lazystream@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.0.tgz#f6995fe0f820392f61396be89462407bb77168e4"
Expand Down Expand Up @@ -9664,7 +9648,7 @@ require-directory@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42"

require-from-string@^2.0.0, require-from-string@^2.0.1:
require-from-string@^2.0.1:
version "2.0.2"
resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909"

Expand Down Expand Up @@ -9760,7 +9744,7 @@ [email protected]:
version "0.1.8"
resolved "https://registry.yarnpkg.com/revalidator/-/revalidator-0.1.8.tgz#fece61bfa0c1b52a206bd6b18198184bdd523a3b"

rimraf@2, [email protected], rimraf@^2.2.8, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3:
rimraf@2, [email protected], rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3:
version "2.7.1"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec"
dependencies:
Expand Down Expand Up @@ -10166,16 +10150,16 @@ socks@~2.3.2:
ip "1.1.5"
smart-buffer "^4.1.0"

solc@^0.5.5:
version "0.5.17"
resolved "https://registry.yarnpkg.com/solc/-/solc-0.5.17.tgz#8a76c50e98d49ca7610cca2fdc78ff3016540c67"
solc@^0.8:
version "0.8.12"
resolved "https://registry.yarnpkg.com/solc/-/solc-0.8.12.tgz#3002ed3092ee2f7672f1a2ab80c0d8df8df3ef2b"
integrity sha512-TU3anAhKWBQ/WrerJ9EcHrNwGOA1y5vIk5Flz7dBNamLDkX9VQTIwcKd3FiZsT0Ew8rSU7RTmJyGNHRGzP5TBA==
dependencies:
command-exists "^1.2.8"
commander "3.0.2"
fs-extra "^0.30.0"
commander "^8.1.0"
follow-redirects "^1.12.1"
js-sha3 "0.8.0"
memorystream "^0.3.1"
require-from-string "^2.0.0"
semver "^5.5.0"
tmp "0.0.33"

Expand Down

0 comments on commit 343b40d

Please sign in to comment.