forked from MyEtherWallet/ethereum-lists
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add travis, remove unused files, restructure others
- Loading branch information
1 parent
ae21113
commit 29361ff
Showing
1,023 changed files
with
90,496 additions
and
62,217 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
.DS_Store | ||
node_modules/ | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
/test/unit/coverage/ | ||
/test/e2e/reports/ | ||
selenium-debug.log | ||
|
||
# Editor directories and files | ||
.idea | ||
.vscode | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
const fs = require("fs"); | ||
const contractsDirectory = "./src/contracts/"; | ||
const Schema = require("validate"); | ||
const contract = new Schema({ | ||
name: { | ||
type: String, | ||
required: true | ||
}, | ||
address: { | ||
type: String, | ||
required: true | ||
}, | ||
abi: { | ||
type: Array, | ||
required: true | ||
} | ||
}); | ||
|
||
let errors = 0; | ||
|
||
// function createFiles() { | ||
// if (!fs.existsSync("./dist/contracts")) { | ||
// fs.mkdirSync("./dist/contracts"); | ||
// } | ||
// fs.readdirSync(contractsDirectory).forEach(folder => { | ||
// let newArr = []; | ||
// if (!fs.existsSync(`./dist/contracts/${folder}`)) { | ||
// fs.mkdirSync(`./dist/contracts/${folder}`); | ||
// } | ||
// fs.readdirSync(`${contractsDirectory}/${folder}`).forEach(file => { | ||
// const obj = JSON.parse( | ||
// fs.readFileSync(`${contractsDirectory}/${folder}/${file}`, "utf8") | ||
// ); | ||
// newArr.push(obj); | ||
// }); | ||
// const writeArray = newArr.sort(function(a, b) { | ||
// let aSym = a.name.toUpperCase(); | ||
// let bSym = b.name.toUpperCase(); | ||
// return aSym < bSym ? -1 : aSym > bSym ? 1 : 0; | ||
// }); | ||
// | ||
// fs.writeFileSync( | ||
// `./dist/contracts/${folder}/contract-abi-${folder}.min.json`, | ||
// JSON.stringify(writeArray) | ||
// ); | ||
// fs.writeFileSync( | ||
// `./dist/contracts/${folder}/contract-abi-${folder}.json`, | ||
// JSON.stringify(writeArray) | ||
// ); | ||
// }); | ||
// } | ||
|
||
function run() { | ||
fs.readdirSync(contractsDirectory).forEach(folder => { | ||
fs.readdirSync(`${contractsDirectory}/${folder}`).forEach(file => { | ||
const obj = JSON.parse( | ||
fs.readFileSync(`${contractsDirectory}/${folder}/${file}`, "utf8") | ||
); | ||
if (contract.validate(obj) === false) { | ||
errors++; | ||
} | ||
}); | ||
}); | ||
// createFiles(); | ||
return errors; | ||
} | ||
|
||
run(); |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.