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
9f9163e
commit 44ee80e
Showing
5 changed files
with
316 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
const fs = require('fs'); | ||
const web3 = require('web3'); | ||
const fetch = require('node-fetch'); | ||
const utils = web3.utils; | ||
const tokensDirectory = './src/tokens/eth/'; | ||
const notInListPath = './notinlist.json'; | ||
const notInList = JSON.parse(fs.readFileSync(notInListPath)); | ||
const api = 'https://api.coingecko.com/api/v3/coins/ethereum/contract'; | ||
|
||
async function createToken() { | ||
for (let index = 0; index < notInList.length; index++) { | ||
const tokenInfo = await fetch(`${api}/${notInList[index]}`).then(response => { | ||
return response.json(); | ||
}); | ||
const tokenTemp = | ||
{ | ||
"symbol": tokenInfo.symbol, | ||
"name": tokenInfo.name, | ||
"type": "ERC20", | ||
"address": notInList[index], | ||
"ens_address": "", | ||
"decimals": "", | ||
"website": tokenInfo.links.homepage[0], | ||
"logo": { | ||
"src": "", | ||
"width": "", | ||
"height": "", | ||
"ipfs_hash": "" | ||
}, | ||
"support": { | ||
"email": "", | ||
"url": "" | ||
}, | ||
"social": { | ||
"blog": "", | ||
"chat": "", | ||
"facebook": "", | ||
"forum": "", | ||
"github": "", | ||
"gitter": "", | ||
"instagram": "", | ||
"linkedin": "", | ||
"reddit": "", | ||
"slack": "", | ||
"telegram": "", | ||
"twitter": "", | ||
"youtube": "" | ||
} | ||
}; | ||
fs.writeFileSync( | ||
`${tokensDirectory}/${utils.toChecksumAddress( | ||
notInList[index].replace('.json', '') | ||
)}.json`, | ||
JSON.stringify(tokenTemp) | ||
); | ||
|
||
} | ||
createToken(); |
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 ethList = './dist/tokens/eth/tokens-eth.json'; | ||
const ethIcons = './src/icons'; | ||
const web3 = require('web3'); | ||
const utils = web3.utils; | ||
const fs = require('fs'); | ||
|
||
function generateMissingToken() { | ||
const icons = fs.readdirSync(ethIcons); | ||
const list = JSON.parse(fs.readFileSync(ethList, 'utf8')); | ||
|
||
const addressOnly = []; | ||
const notInList = []; | ||
icons.forEach(icon => { | ||
const idxOf = icon.indexOf('-'); | ||
const getAddr = icon.substring(idxOf + 1, icon.length - 4); | ||
if(getAddr.length !== 42) { | ||
const actualAddress = getAddr.substring(getAddr.indexOf('0x'), 42); | ||
addressOnly.push(actualAddress); | ||
} else { | ||
addressOnly.push(getAddr); | ||
} | ||
}) | ||
|
||
addressOnly.forEach(addr => { | ||
const found = list.find(item => { | ||
if(addr.substring(0, 2) === '0x' && addr.length === 42) { | ||
return utils.toChecksumAddress(item.address) === utils.toChecksumAddress(addr); | ||
} | ||
}) | ||
// console.log(addr.length, addr, addr.substring(0, 2), found); | ||
if(!found && addr.substring(0, 2) === '0x' && addr.length === 42) notInList.push(addr); | ||
}); | ||
// list.forEach(token => { | ||
// if(!icons.includes(`${token.symbol}-${utils.toChecksumAddress(token.address)}.json`)) { | ||
// notInList.push(token); | ||
// } | ||
|
||
// }) | ||
fs.writeFileSync('notinlist.json', JSON.stringify(notInList)) | ||
} | ||
|
||
generateMissingToken(); |
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,210 @@ | ||
[ | ||
"0x07597255910a51509ca469568b048f2597e72504", | ||
"0x6aba1623ea906d1164cbb007e764ebde2514a2ba", | ||
"0xe75ad3aab14e4b0df8c5da4286608dabb21bd864", | ||
"0xf8b358b3397a8ea5464f8cc753645d42e14b79ea", | ||
"0x9a794dc1939f1d78fa48613b89b8f9d0a20da00e", | ||
"0xf6dbe88ba55f1793ff0773c9b1275300f830914f", | ||
"0x4cef5a02c36253cfb06825ace2a356e78000145f", | ||
"0x584b44853680ee34a0f337b712a8f66d816df151", | ||
"0x8ab7404063ec4dbcfd4598215992dc3f8ec853d7", | ||
"0xa9ff725189fe00da9c5f27a580dc67fea61e3fb2", | ||
"0x082e13494f12ebb7206fbf67e22a6e1975a1a669", | ||
"0xbf8fb919a8bbf28e590852aef2d284494ebc0657", | ||
"0x461733c17b0755ca5649b6db08b3e213fcf22546", | ||
"0xf1ca9cb74685755965c7458528a36934df52a3ef", | ||
"0x304281f3d1023a2039ea930c65f8f721d7c746c8", | ||
"0x3e65e1eefde5ea7ccfc9a9a1634abe90f32262f8", | ||
"0x865d176351f287fe1b0010805b110d08699c200a", | ||
"0x2fb12bccf6f5dd338b76be784a93ade072425690", | ||
"0x786001c9c5ca6e502deb8a8a72480d2147891f32", | ||
"0x01ff50f8b7f74e4f00580d9596cd3d0d6d6e326f", | ||
"0xc9a2c4868f0f96faaa739b59934dc9cb304112ec", | ||
"0xea54c81fe0f72de8e86b6dc78a9271aa3925e3b5", | ||
"0x026e62dded1a6ad07d93d39f96b9eabd59665e0d", | ||
"0xa101e27f06a97985b925e244111b61560ecd97db", | ||
"0xff2b3353c3015e9f1fbf95b9bda23f58aa7ce007", | ||
"0x6a27348483d59150ae76ef4c0f3622a78b0ca698", | ||
"0x34bdf48a8f753de4822a6cfb1fee275f9b4d662e", | ||
"0x1c95b093d6c236d3ef7c796fe33f9cc6b8606714", | ||
"0xdb7eab9ba6be88b869f738f6deeba96d49fe13fd", | ||
"0x1b80eeeadcc590f305945bcc258cfa770bbe1890", | ||
"0x5d551fa77ec2c7dd1387b626c4f33235c3885199", | ||
"0x827d53c8170af52625f414bde00326fc8a085e86", | ||
"0x19055b944806fba2717dc694cf0173a1eb2d1604", | ||
"0x4fe9f52ec23f6805f2fd0332a34da4f1c135b024", | ||
"0x6e605c269e0c92e70beeb85486f1fc550f9380bd", | ||
"0x87026f792d09960232ca406e80c89bd35bafe566", | ||
"0x081f67afa0ccf8c7b17540767bbe95df2ba8d97f", | ||
"0xc5d350b854a6cff0fc5a38a115a90c774dcae1b9", | ||
"0xc4a86561cb0b7ea1214904f26e6d50fd357c7986", | ||
"0x915044526758533dfb918eceb6e44bc21632060d", | ||
"0x3277dd536471a3cbeb0c9486acad494c95a31e73", | ||
"0xad640689e6950b7453729a4686edb3fdfd754616", | ||
"0xc538143202f3b11382d8606aae90a96b042a19db", | ||
"0x6c3be406174349cfa4501654313d97e6a31072e1", | ||
"0x722f2f3eac7e9597c73a593f7cf3de33fbfc3308", | ||
"0x0c6f5f7d555e7518f6841a79436bd2b1eef03381", | ||
"0x3d658390460295fb963f54dc0899cfb1c30776df", | ||
"0xfd45e61e085b3e7a1990a47828d757755b206eee", | ||
"0x4b3c89e986b12f83eed896f02410429a7289526e", | ||
"0x608f006b6813f97097372d0d31fb0f11d1ca3e4e", | ||
"0x115ec79f1de567ec68b7ae7eda501b406626478e", | ||
"0x6400b5522f8d448c0803e6245436dd1c81df09ce", | ||
"0x26cb3641aaa43911f1d4cb2ce544eb652aac7c47", | ||
"0xf8c595d070d104377f58715ce2e6c93e49a87f3c", | ||
"0x56d1ae30c97288da4b58bc39f026091778e4e316", | ||
"0xa353d00fa6d940cb625045d74fef8406854dd0da", | ||
"0x89c6c856a6db3e46107163d0cda7a7ff211bd655", | ||
"0x70861e862e1ac0c96f853c8231826e469ead37b1", | ||
"0xfb8bf095ebcdad57d2e37573a505e7d3bafdd3cc", | ||
"0x6c2adc2073994fb2ccc5032cc2906fa221e9b391", | ||
"0x3aca71c508e06dc6b2758dab6eb20f7654572fb7", | ||
"0x3affcca64c2a6f4e3b6bd9c64cd2c969efd1ecbe", | ||
"0x7d5edcd23daa3fb94317d32ae253ee1af08ba14d", | ||
"0x05860d453c7974cbf46508c06cba14e211c629ce", | ||
"0xf263292e14d9d8ecd55b58dad1f1df825a874b7c", | ||
"0x6020da0f7c1857dbe4431ec92a15cc318d933eaa", | ||
"0xb20043f149817bff5322f1b928e89abfc65a9925", | ||
"0x9b20dabcec77f6289113e61893f7beefaeb1990a", | ||
"0xe6923e9b56db1eed1c9f430ea761da7565e260fe", | ||
"0x1ed7ae1f0e2fa4276dd7ddc786334a3df81d50c0", | ||
"0x50d1c9771902476076ecfc8b2a83ad6b9355a4c9", | ||
"0xbf5496122cf1bb778e0cbe5eab936f2be5fc0940", | ||
"0x14ddda446688b73161aa1382f4e4343353af6fc8", | ||
"0x5c64031c62061865e5fd0f53d3cdaef80f72e99d", | ||
"0xd8bd3958725f216eb236e9dc65b169de48101c6a", | ||
"0x1d464ac5e046e5fe280c9588edf8eb681b07008f", | ||
"0x884181554dfa9e578d36379919c05c25dc4a15bb", | ||
"0xbbc2045d335cb224228f1850b29173d9d7d7b989", | ||
"0x58c69ed6cd6887c0225d1fccecc055127843c69b", | ||
"0x6baf7fcea90b0968dc5ed7b8dcb76c986637ff55", | ||
"0x1b957dc4aefeed3b4a2351a6a6d5cbfbba0cecfa", | ||
"0x2bba3cf6de6058cc1b4457ce00deb359e2703d7f", | ||
"0x6be61833fc4381990e82d7d4a9f4c9b3f67ea941", | ||
"0x9aab071b4129b083b01cb5a0cb513ce7eca26fa5", | ||
"0xdf574c24545e5ffecb9a659c229253d4111d87e1", | ||
"0x4bd70556ae3f8a6ec6c4080a0c327b24325438f3", | ||
"0xb705268213d593b8fd88d3fdeff93aff5cbdcfae", | ||
"0xb6f43025b29196af2dddd69b0a58afba079cd600", | ||
"0x7878424e994d8a2b8e329d31096922b7ceabe660", | ||
"0xe8c09672cfb9cfce6e2edbb01057d9fa569f97c1", | ||
"0x00e150d741eda1d49d341189cae4c08a73a49c95", | ||
"0x83d60e7aed59c6829fb251229061a55f35432c4d", | ||
"0x51fb3da8a67861361281ac56fe2ad8c3b4539ffa", | ||
"0xdac4ae188ace3c8985765edc6c9b4739d4845ddc", | ||
"0x018d7d179350f1bb9853d04982820e37cce13a92", | ||
"0x0e69d0a2bbb30abcb7e5cfea0e4fde19c00a8d47", | ||
"0x622cd54deb2bb7a051515192417109bcf3fe098f", | ||
"0x15223c63a203731db1a2ebfe5277a55f77a453b9", | ||
"0xaf80e6612d9c2e883122e7f2292ee6c34176ad4f", | ||
"0x8a9c67fee641579deba04928c4bc45f66e26343a", | ||
"0xa858bc1b71a895ee83b92f149616f9b3f6afa0fb", | ||
"0xa8262eb913fccea4c3f77fc95b8b4043b384cfbb", | ||
"0x4f76e85d067e219779a863ff18577846b3152f1f", | ||
"0xfa3118b34522580c35ae27f6cf52da1dbb756288", | ||
"0x1295b55fa04fbac6d9e7c351ecb3486e88129027", | ||
"0x578b49c45961f98d8df92854b53f1641af0a5036", | ||
"0x763fa6806e1acf68130d2d0f0df754c93cc546b2", | ||
"0x9f549ebfd4974cd4ed4a1550d40394b44a7382aa", | ||
"0x2ca76b74c148ce6c4f51f47278ef089030e03178", | ||
"0x6556d2ec4d96da39cf75cbe50d58fae90079800a", | ||
"0xa66d83716c7cfe425b44d0f7ef92de263468fb3d", | ||
"0xa66d83716c7cfe425b44d0f7ef92de263468fb3d", | ||
"0xb879da8b24c9b8685de8526cf492e954f165d74b", | ||
"0x4eeea7b48b9c3ac8f70a9c932a8b1e8a5cb624c7", | ||
"0x146d8d942048ad517479c9bab1788712af180fde", | ||
"0xcd23ef2cba177a1b5f5d3818d055868e4b599d18", | ||
"0x9f0f1be08591ab7d990faf910b38ed5d60e4d5bf", | ||
"0x9b4e2b4b13d125238aa0480dd42b4f6fc71b37cc", | ||
"0x8aa688ab789d1848d131c65d98ceaa8875d97ef1", | ||
"0x5d60d8d7ef6d37e16ebabc324de3be57f135e0bc", | ||
"0x1ebd8d3ca115451b9b6bbaa7ee2f7b0f96e49fd8", | ||
"0xfc858154c0b2c4a3323046fb505811f110ebda57", | ||
"0xff0e5e014cf97e0615cb50f6f39da6388e2fae6e", | ||
"0xa86a0da9d05d0771955df05b44ca120661af16de", | ||
"0x1beef31946fbbb40b877a72e4ae04a8d1a5cee06", | ||
"0x62a56a4a2ef4d355d34d10fbf837e747504d38d4", | ||
"0xa6714a2e5f0b1bdb97b895b0913b4fcd3a775e4d", | ||
"0x5f33d158ca7275848f70a3f149b421190df85b32", | ||
"0x089a6d83282fb8988a656189f1e7a73fa6c1cac2", | ||
"0x1864ce27e9f7517047933caae530674e8c70b8a7", | ||
"0x429d83bb0dcb8cdd5311e34680adc8b12070a07f", | ||
"0x53066cddbc0099eb6c96785d9b3df2aaeede5da3", | ||
"0xfc82bb4ba86045af6f327323a46e80412b91b27d", | ||
"0x7c32db0645a259fae61353c1f891151a2e7f8c1e", | ||
"0xfe76be9cec465ed3219a9972c21655d57d21aec6", | ||
"0x7869c4a1a3f6f8684fbcc422a21ad7abe3167834", | ||
"0x687bfc3e73f6af55f0ccca8450114d107e781a0e", | ||
"0x4234f63b1d202f6c016ca3b6a0d41d7d85f17716", | ||
"0x13d0bf45e5f319fa0b58900807049f23cae7c40d", | ||
"0x97208bf5dc25e6fd4719cfc2a3c1d1a59a974c3b", | ||
"0x97208bf5dc25e6fd4719cfc2a3c1d1a59a974c3b", | ||
"0xacaca5b8805636608e14c64b0bfffc2deb2c6cec", | ||
"0xa31b1767e09f842ecfd4bc471fe44f830e3891aa", | ||
"0x8762db106b2c2a0bccb3a80d1ed41273552616e8", | ||
"0x1c5857e110cd8411054660f60b5de6a6958cfae2", | ||
"0x436f0f3a982074c4a05084485d421466a994fe53", | ||
"0x96b0bf939d9460095c15251f71fda11e41dcbddb", | ||
"0x3f5b26b0fa3e9d8547b7cf6725871f96ee91313a", | ||
"0x63b992e6246d88f07fc35a056d2c365e6d441a3d", | ||
"0x4212fea9fec90236ecc51e41e2096b16ceb84555", | ||
"0x8b6cda5cc518c904e8844f445e1a7c7d2db0ff16", | ||
"0x59a17c58daaee299b39a060b9de67bf7c829e4d3", | ||
"0x5dd0815a4cf119ad91ba045bbbf879f3f7de3c68", | ||
"0x851017523ae205adc9195e7f97d029f4cfe7794c", | ||
"0x21f15966e07a10554c364b988e91dab01d32794a", | ||
"0x179e31fb25e433441a2839389a7b8ec9c4654b7b", | ||
"0xff19138b039d938db46bdda0067dc4ba132ec71c", | ||
"0xddd460bbd9f79847ea08681563e8a9696867210c", | ||
"0x4b7ad3a56810032782afce12d7d27122bdb96eff", | ||
"0xc350e846e2c57f9eece90febc253d14c8080871b", | ||
"0x7d3e7d41da367b4fdce7cbe06502b13294deb758", | ||
"0x4257d36df231dc71f7b7a6e1be3ef9c99b9181fd", | ||
"0x2e8c6bbe8e3aa834ef5a851b2cdfc52403d61b87", | ||
"0xa1248c718d52752b2cc257eeb0eba900408daeb8", | ||
"0x8ce9137d39326ad0cd6491fb5cc0cba0e089b6a9", | ||
"0xe49214e4c92dc9bcb3b56c1309afe0d626dd730e", | ||
"0xa806b3fed6891136940cf81c4085661500aa2709", | ||
"0xca694eb79ef355ea0999485d211e68f39ae98493", | ||
"0x9b39a0b97319a9bd5fed217c1db7b030453bac91", | ||
"0x5b11aacb6bddb9ffab908fdce739bf4aed554327", | ||
"0x38a19ba829f192a30ec7e03cda1368c50dad9785", | ||
"0xd31695a1d35e489252ce57b129fd4b1b05e6acac", | ||
"0x667102bd3413bfeaa3dffb48fa8288819e480a88", | ||
"0xd07d9fe2d2cc067015e2b4917d24933804f42cfa", | ||
"0xf6317dd9b04097a9e7b016cd23dcaa7cfe19d9c6", | ||
"0x0ba45a8b5d5575935b8158a88c631e9f9c95a2e5", | ||
"0x8b40761142b9aa6dc8964e61d0585995425c3d94", | ||
"0xa4d17ab1ee0efdd23edc2869e7ba96b89eecf9ab", | ||
"0xe431a4c5db8b73c773e06cf2587da1eb53c41373", | ||
"0x03806ce5ef69bd9780edfb04c29da1f23db96294", | ||
"0x3dc0501c32bee0cc1e629d590302a4b909797474", | ||
"0xeaf61fc150cd5c3bea75744e830d916e60ea5a9f", | ||
"0x01c0987e88f778df6640787226bc96354e1a9766", | ||
"0x2d3e7d4870a51b918919e7b851fe19983e4c38d5", | ||
"0x3c4bea627039f0b7e7d21e34bb9c9fe962977518", | ||
"0xf485c5e679238f9304d986bb2fc28fe3379200e5", | ||
"0xbe6ac6b50f577205c9d107f37b6e205aa6acc5d4", | ||
"0xff8be4b22cedc440591dcb1e641eb2a0dd9d25a5", | ||
"0x4954db6391f4feb5468b6b943d4935353596aec9", | ||
"0x91e64f39c1fe14492e8fdf5a8b0f305bd218c8a1", | ||
"0xcc394f10545aeef24483d2347b32a34a44f20e6f", | ||
"0x94236591125e935f5ac128bb3d5062944c24958c", | ||
"0x2e2e0a28f6585e895dd646a363bae29b77b88a31", | ||
"0xdf1d6405df92d981a2fb3ce68f6a03bac6c0e41f", | ||
"0xac9ce326e95f51b5005e9fe1dd8085a01f18450c", | ||
"0x27f610bf36eca0939093343ac28b1534a721dbb4", | ||
"0xd44bb6663936cab1310584a277f7daa6943d4904", | ||
"0x4f878c0852722b0976a955d68b376e4cd4ae99e5", | ||
"0x66bad545596fb17a0b4ebdc003a85def10e8f6ae", | ||
"0xa982b2e19e90b2d9f7948e9c1b65d119f1ce88d6", | ||
"0x4d13d624a87baa278733c068a174412afa9ca6c8", | ||
"0x44e2ca91cea1147f1b503e669f06cd11fb0c5490", | ||
"0xb9eefc4b0d472a44be93970254df4f4016569d27", | ||
"0x222139425bcb172721dd4c22c29dd841d4358f69", | ||
"0xef65887a05415bf6316204b5ffb350d4d1a19bba", | ||
"0xf9933cb5f0397bf020bb950c307e30dd8f62080f", | ||
"0xc28e931814725bbeb9e670676fabbcb694fe7df2", | ||
"0x0df721639ca2f7ff0e1f618b918a65ffb199ac4e" | ||
] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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