Skip to content

Commit

Permalink
fix: remove sourcePath from truffle artifacts upon package prepare
Browse files Browse the repository at this point in the history
  • Loading branch information
guidiaz committed Feb 8, 2024
1 parent 1b27482 commit 331ec75
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions scripts/prepare.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ if (fs.existsSync("./artifacts")) {
exec(`find ./artifacts -name '*.dbg.json' -exec rm -r {} \;`)
}
}

if (fs.existsSync("./build/contracts")) {
exec(`sed -i -- "/\bsourcePath\b/d" build/contracts/*.json`)
}
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ module.exports = {
utils,
}

function supportedNetworks() {
function supportedNetworks(ecosystem) {
return Object
.entries(addresses)
.filter(value => value[0].indexOf(":") > -1)
.filter(value => value[0].indexOf(":") > -1 && (!ecosystem || value[0].startsWith(ecosystem)))
.map(value => value[0])
.sort()
}

0 comments on commit 331ec75

Please sign in to comment.