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.
- Loading branch information
1 parent
04dcd3e
commit 7638551
Showing
7 changed files
with
119 additions
and
313 deletions.
There are no files selected for viewing
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 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 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,13 @@ | ||
const recreateFiles = require('./recreateFiles'); | ||
const createFiles = require('./createFiles'); | ||
const checkContract = require('./checkContract'); | ||
const checkToken = require('./checkToken'); | ||
|
||
function compile() { | ||
recreateFiles(); | ||
createFiles(); | ||
checkToken(); | ||
checkContract(); | ||
} | ||
|
||
compile(); |
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 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 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,42 @@ | ||
const fs = require('fs'); | ||
const web3 = require('web3'); | ||
const utiles = web3.utils; | ||
const contractsDirectory = './src/contracts'; | ||
const tokensDirectory = './src/tokens'; | ||
|
||
function renameTokens() { | ||
fs.readdirSync(tokensDirectory).forEach(folder => { | ||
fs.readdirSync(`${tokensDirectory}/${folder}`).forEach(file => { | ||
if (!utils.checkAddressChecksum(file.replace('.json', ''))) { | ||
fs.renameSync( | ||
`${tokensDirectory}/${folder}/${file}`, | ||
`${tokensDirectory}/${folder}/${utils.toChecksumAddress( | ||
file.replace('.json', '') | ||
)}.json` | ||
); | ||
} | ||
}); | ||
}); | ||
} | ||
|
||
function renameContracts() { | ||
fs.readdirSync(contractsDirectory).forEach(folder => { | ||
fs.readdirSync(`${contractsDirectory}/${folder}`).forEach(file => { | ||
if (!utils.checkAddressChecksum(file.replace('.json', ''))) { | ||
fs.renameSync( | ||
`${contractsDirectory}/${folder}/${file}`, | ||
`${contractsDirectory}/${folder}/${utils.toChecksumAddress( | ||
file.replace('.json', '') | ||
)}.json` | ||
); | ||
} | ||
}); | ||
}); | ||
} | ||
|
||
function renameToChecksum() { | ||
renameTokens(); | ||
renameContracts(); | ||
} | ||
|
||
module.exports = renameToChecksum; |
Oops, something went wrong.