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
326a2aaa
Commit
326a2aaa
authored
Jun 24, 2023
by
Mark Tyneway
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
contracts-bedrock: lint
parent
de7d5f6e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
validate-spacers.ts
packages/contracts-bedrock/scripts/validate-spacers.ts
+6
-5
No files found.
packages/contracts-bedrock/scripts/validate-spacers.ts
View file @
326a2aaa
...
...
@@ -8,7 +8,8 @@ import layoutLock from '../layout-lock.json'
* Can be configured as the first argument to the script or
* defaults to the forge-artifacts directory.
*/
const
directoryPath
=
process
.
argv
[
2
]
||
path
.
join
(
__dirname
,
'
..
'
,
'
forge-artifacts
'
);
const
directoryPath
=
process
.
argv
[
2
]
||
path
.
join
(
__dirname
,
'
..
'
,
'
forge-artifacts
'
)
/**
* Returns true if the contract should be skipped when inspecting its storage layout.
...
...
@@ -30,7 +31,6 @@ const parseFqn = (name: string): string => {
return
parts
[
parts
.
length
-
1
]
}
/**
* Parses out variable info from the variable structure in standard compiler json output.
*
...
...
@@ -95,7 +95,7 @@ const main = async () => {
const
paths
=
[]
const
readFilesRecursively
=
(
dir
:
string
)
=>
{
const
files
=
fs
.
readdirSync
(
dir
)
;
const
files
=
fs
.
readdirSync
(
dir
)
for
(
const
file
of
files
)
{
const
filePath
=
path
.
join
(
dir
,
file
)
...
...
@@ -109,13 +109,14 @@ const main = async () => {
}
}
readFilesRecursively
(
directoryPath
)
;
readFilesRecursively
(
directoryPath
)
for
(
const
filePath
of
paths
)
{
if
(
filePath
.
includes
(
'
t.sol
'
))
{
continue
}
const
artifact
=
require
(
filePath
)
const
raw
=
fs
.
readFileSync
(
filePath
,
'
utf8
'
).
toString
()
const
artifact
=
JSON
.
parse
(
raw
)
// Handle contracts without storage
const
storageLayout
=
artifact
.
storageLayout
||
{}
...
...
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