Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
02e127b3
Unverified
Commit
02e127b3
authored
Nov 02, 2021
by
Kelvin Fichter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: remove fs-promises import for node 12 compat
parent
7dc40ad9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
solc.ts
packages/regenesis-surgery/scripts/solc.ts
+5
-6
No files found.
packages/regenesis-surgery/scripts/solc.ts
View file @
02e127b3
/* eslint @typescript-eslint/no-var-requires: "off" */
import
{
access
,
mkdir
}
from
'
fs/promises
'
import
fetch
from
'
node-fetch
'
import
path
from
'
path
'
import
fs
,
{
mkdirSync
}
from
'
fs
'
import
fs
from
'
fs
'
import
solc
from
'
solc
'
import
{
ethers
}
from
'
ethers
'
import
{
clone
}
from
'
@eth-optimism/core-utils
'
...
...
@@ -66,7 +65,7 @@ export const downloadSolc = async (version: string, ovm?: boolean) => {
try
{
// Check to see if we already have the file
await
access
(
file
,
fs
.
constants
.
F_OK
)
fs
.
accessSync
(
file
,
fs
.
constants
.
F_OK
)
}
catch
(
e
)
{
console
.
error
(
`Downloading
${
version
}
${
ovm
?
'
ovm
'
:
'
solidity
'
}
`
)
// If we don't have the file, download it
...
...
@@ -81,7 +80,7 @@ export const downloadSolc = async (version: string, ovm?: boolean) => {
*/
export
const
downloadAllSolcVersions
=
async
()
=>
{
try
{
await
mkdir
(
LOCAL_SOLC_DIR
)
fs
.
mkdirSync
(
LOCAL_SOLC_DIR
)
}
catch
(
e
)
{
// directory already exists
}
...
...
@@ -213,14 +212,14 @@ export const compile = (opts: {
ovm
:
boolean
}):
any
=>
{
try
{
mkdirSync
(
EVM_SOLC_CACHE_DIR
,
{
fs
.
mkdirSync
(
EVM_SOLC_CACHE_DIR
,
{
recursive
:
true
,
})
}
catch
(
e
)
{
// directory already exists
}
try
{
mkdirSync
(
OVM_SOLC_CACHE_DIR
,
{
fs
.
mkdirSync
(
OVM_SOLC_CACHE_DIR
,
{
recursive
:
true
,
})
}
catch
(
e
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment