Skip to content

Commit

Permalink
Fix reading file
Browse files Browse the repository at this point in the history
  • Loading branch information
mikolajgs committed Feb 16, 2024
1 parent ca8ba5b commit 97fd004
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion generate-contract-spec/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30858,7 +30858,7 @@ try {
throw new Error('Invalid contract prefix, should be ^[a-zA-Z0-9_-]{0,50}$');
}

let fileJSON = require('./' + srcFileArr[0]);
let fileJSON = JSON.parse(fs.readFileSync(srcFileArr[0], { encoding: 'utf-8' }))
for (const addr in fileJSON) {
result.addresses[srcFileArr[1] + addr] = {
contract: srcFileArr[1] + addr,
Expand Down
2 changes: 1 addition & 1 deletion generate-contract-spec/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ try {
throw new Error('Invalid contract prefix, should be ^[a-zA-Z0-9_-]{0,50}$');
}

let fileJSON = require('./' + srcFileArr[0]);
let fileJSON = JSON.parse(fs.readFileSync(srcFileArr[0], { encoding: 'utf-8' }))
for (const addr in fileJSON) {
result.addresses[srcFileArr[1] + addr] = {
contract: srcFileArr[1] + addr,
Expand Down

0 comments on commit 97fd004

Please sign in to comment.