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
1dacf164
Unverified
Commit
1dacf164
authored
Nov 22, 2021
by
Mark Tyneway
Committed by
GitHub
Nov 22, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1795 from ethereum-optimism/develop
Develop -> Master PR
parents
5a8f2bf2
21514e2b
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
90 additions
and
72 deletions
+90
-72
tiny-houses-smoke.md
.changeset/tiny-houses-smoke.md
+9
-0
package.json
packages/batch-submitter/package.json
+1
-1
package.json
packages/contracts/package.json
+1
-1
generate-artifacts.js
packages/contracts/scripts/generate-artifacts.js
+0
-52
generate-artifacts.ts
packages/contracts/scripts/generate-artifacts.ts
+62
-0
generate-deployed-artifacts.ts
packages/contracts/scripts/generate-deployed-artifacts.ts
+13
-14
package.json
packages/core-utils/package.json
+1
-1
package.json
packages/message-relayer/package.json
+1
-1
package.json
packages/regenesis-surgery/package.json
+1
-1
package.json
packages/replica-healthcheck/package.json
+1
-1
No files found.
.changeset/tiny-houses-smoke.md
0 → 100644
View file @
1dacf164
---
'
@eth-optimism/batch-submitter'
:
patch
'
@eth-optimism/core-utils'
:
patch
'
@eth-optimism/message-relayer'
:
patch
'
@eth-optimism/regenesis-surgery'
:
patch
'
@eth-optimism/replica-healthcheck'
:
patch
---
Fix package JSON issues
packages/batch-submitter/package.json
View file @
1dacf164
...
...
@@ -6,7 +6,7 @@
"main"
:
"dist/index"
,
"types"
:
"dist/index"
,
"files"
:
[
"dist/
index
"
"dist/
*
"
],
"scripts"
:
{
"start"
:
"node ./exec/run-batch-submitter.js"
,
...
...
packages/contracts/package.json
View file @
1dacf164
...
...
@@ -22,7 +22,7 @@
"build:contracts"
:
"hardhat compile --show-stack-traces"
,
"build:dump"
:
"ts-node bin/take-dump.ts"
,
"autogen:markdown"
:
"node scripts/generate-markdown.js"
,
"autogen:artifacts"
:
"
node scripts/generate-artifacts.js && node scripts/generate-deployed-artifacts.j
s"
,
"autogen:artifacts"
:
"
ts-node scripts/generate-artifacts.ts && ts-node scripts/generate-deployed-artifacts.t
s"
,
"test"
:
"yarn test:contracts"
,
"test:contracts"
:
"hardhat test --show-stack-traces"
,
"test:coverage"
:
"NODE_OPTIONS=--max_old_space_size=8192 hardhat coverage && istanbul check-coverage --statements 88 --branches 76 --functions 84 --lines 88"
,
...
...
packages/contracts/scripts/generate-artifacts.js
deleted
100644 → 0
View file @
5a8f2bf2
#!/usr/bin/env node
const
path
=
require
(
'
path
'
)
const
glob
=
require
(
'
glob
'
)
const
fs
=
require
(
'
fs
'
)
;(
async
()
=>
{
console
.
log
(
`writing contract artifacts typescript file`
)
const
getContractJsonFiles
=
(
artifactsFolder
)
=>
{
return
glob
.
sync
(
`
${
artifactsFolder
}
/**/*.json`
).
filter
((
match
)
=>
{
return
!
match
.
endsWith
(
'
.dbg.json
'
)
})
}
const
evmArtifactPaths
=
getContractJsonFiles
(
path
.
resolve
(
__dirname
,
`../artifacts/contracts`
)
)
const
content
=
`
/* eslint-disable @typescript-eslint/no-var-requires, no-empty */
/*
THIS FILE IS AUTOMATICALLY GENERATED.
DO NOT EDIT.
*/
${
evmArtifactPaths
.
map
((
artifactPath
)
=>
{
const
artifact
=
require
(
artifactPath
)
const
relPath
=
path
.
relative
(
__dirname
,
artifactPath
)
return
`
let
${
artifact
.
contractName
}
try {
${
artifact
.
contractName
}
= require('
${
relPath
}
')
} catch {}
`
})
.
join
(
'
\n
'
)}
export const getContractArtifact = (name: string): any => {
return {
${
evmArtifactPaths
.
map
((
artifactPath
)
=>
{
const
artifact
=
require
(
artifactPath
)
return
`
${
artifact
.
contractName
}
:
${
artifact
.
contractName
}
`
})
.
join
(
'
,
\n
'
)}
}[name]
}
`
fs
.
writeFileSync
(
`./src/contract-artifacts.ts`
,
content
)
})().
catch
(
console
.
error
)
packages/contracts/scripts/generate-artifacts.ts
0 → 100644
View file @
1dacf164
import
path
from
'
path
'
import
glob
from
'
glob
'
import
fs
from
'
fs
'
/**
* Script for automatically generating a file which has a series of `require` statements for
* importing JSON contract artifacts. We do this to preserve browser compatibility.
*/
const
main
=
async
()
=>
{
const
contractArtifactsFolder
=
path
.
resolve
(
__dirname
,
`../artifacts/contracts`
)
const
artifactPaths
=
glob
.
sync
(
`
${
contractArtifactsFolder
}
/**/*.json`
)
.
filter
((
match
)
=>
{
// Filter out the debug outputs.
return
!
match
.
endsWith
(
'
.dbg.json
'
)
})
const
content
=
`
/* eslint-disable @typescript-eslint/no-var-requires, no-empty */
/*
THIS FILE IS AUTOMATICALLY GENERATED.
DO NOT EDIT.
*/
${
artifactPaths
.
map
((
artifactPath
)
=>
{
// eslint-disable-next-line @typescript-eslint/no-var-requires
const
artifact
=
require
(
artifactPath
)
const
relPath
=
path
.
relative
(
__dirname
,
artifactPath
)
return
`
let
${
artifact
.
contractName
}
try {
${
artifact
.
contractName
}
= require('
${
relPath
}
')
} catch {}
`
})
.
join
(
'
\n
'
)}
export const getContractArtifact = (name: string): any => {
return {
${
artifactPaths
.
map
((
artifactPath
)
=>
{
// eslint-disable-next-line @typescript-eslint/no-var-requires
const
artifact
=
require
(
artifactPath
)
return
`
${
artifact
.
contractName
}
`
})
.
join
(
'
,
\n
'
)}
}[name]
}
`
fs
.
writeFileSync
(
path
.
resolve
(
__dirname
,
`../src/contract-artifacts.ts`
),
content
)
}
main
()
packages/contracts/scripts/generate-deployed-artifacts.
j
s
→
packages/contracts/scripts/generate-deployed-artifacts.
t
s
View file @
1dacf164
#!/usr/bin/env node
const
path
=
require
(
'
path
'
)
const
glob
=
require
(
'
glob
'
)
const
fs
=
require
(
'
fs
'
)
;(
async
()
=>
{
console
.
log
(
`writing deployed contract artifacts typescript file`
)
import
path
from
'
path
'
import
glob
from
'
glob
'
import
fs
from
'
fs
'
/**
* Script for automatically generating a TypeScript file for retrieving deploy artifact JSON files.
* We do this to make sure that this package remains browser compatible.
*/
const
main
=
async
()
=>
{
let
content
=
`
/* eslint-disable */
/*
...
...
@@ -51,14 +52,12 @@ const fs = require('fs')
content
+=
`
export const getDeployedContractArtifact = (name: string, network: string): any => {
return {
${
artifactNames
.
map
((
artifactName
)
=>
{
return
`
${
artifactName
}
:
${
artifactName
}
`
})
.
join
(
'
,
\n
'
)}
${
artifactNames
.
join
(
'
,
\n
'
)}
}[(network + '__' + name).replace(/-/g, '_')]
}
`
fs
.
writeFileSync
(
`./src/contract-deployed-artifacts.ts`
,
content
)
})().
catch
(
console
.
error
)
}
main
()
packages/core-utils/package.json
View file @
1dacf164
...
...
@@ -5,7 +5,7 @@
"main"
:
"dist/index"
,
"types"
:
"dist/index"
,
"files"
:
[
"dist/
index
"
"dist/
*
"
],
"scripts"
:
{
"all"
:
"yarn clean && yarn build && yarn test && yarn lint:fix && yarn lint"
,
...
...
packages/message-relayer/package.json
View file @
1dacf164
...
...
@@ -5,7 +5,7 @@
"main"
:
"dist/index"
,
"types"
:
"dist/index"
,
"files"
:
[
"dist/
index
"
"dist/
*
"
],
"bin"
:
{
"withdraw"
:
"./src/exec/withdraw.ts"
...
...
packages/regenesis-surgery/package.json
View file @
1dacf164
...
...
@@ -6,7 +6,7 @@
"main"
:
"dist/index"
,
"types"
:
"dist/index"
,
"files"
:
[
"dist/
index
"
"dist/
*
"
],
"scripts"
:
{
"clean"
:
"rimraf ./dist ./tsconfig.build.tsbuildinfo"
,
...
...
packages/replica-healthcheck/package.json
View file @
1dacf164
...
...
@@ -6,7 +6,7 @@
"main"
:
"dist/index"
,
"types"
:
"dist/index"
,
"files"
:
[
"dist/
index
"
"dist/
*
"
],
"scripts"
:
{
"clean"
:
"rimraf ./dist ./tsconfig.build.tsbuildinfo"
,
...
...
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