Skip to content

Commit

Permalink
ci
Browse files Browse the repository at this point in the history
  • Loading branch information
eternauta1337 committed Mar 16, 2024
1 parent a6c4dd4 commit 5d4150c
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/ethernaut-common/src/io/create-file.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function createFolderIfMissing(folderPath) {
}
}

function createFileIfMissing(filePath, dataFn = () => {}) {
function createFileIfMissing(filePath, dataFn = () => ({})) {
if (!fs.existsSync(filePath)) {
fs.writeFileSync(filePath, JSON.stringify(dataFn(), null, 2))
}
Expand Down
1 change: 0 additions & 1 deletion packages/ethernaut-common/src/test/terminal.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ class Terminal {
}

this.listener = this.process.onData((data) => {
if (data === undefined) return
const txt = this.stripAnsi(data.toString())
this.history += txt
this.output += txt
Expand Down
2 changes: 1 addition & 1 deletion packages/ethernaut-interact/src/internal/storage.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function getInteractFilePath() {

function initStorage() {
createFolderIfMissing(getAbisFilePath())
createFileIfMissing(getAddressesFilePath(), () => {})
createFileIfMissing(getAddressesFilePath(), () => ({}))
}

function readAbiFiles() {
Expand Down
2 changes: 1 addition & 1 deletion packages/ethernaut-interact/test/tasks/contract.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ describe('contract', function () {

before('run contract', async function () {
await terminal.run(
`npx hardhat interact contract --address ${await sample.getAddress()} --no-confirm --abi ${abiPath} --fn incrementCounter --params 42 --verbose`,
`npx hardhat interact contract --address ${await sample.getAddress()} --no-confirm --abi ${abiPath} --fn incrementCounter --params 42`,
)
})

Expand Down

0 comments on commit 5d4150c

Please sign in to comment.