mirror of
https://github.com/Instadapp/trustwallet-assets.git
synced 2024-07-29 22:37:31 +00:00
Daily update + more test json formatting
This commit is contained in:
parent
3cf44bffa2
commit
87f54ced5b
BIN
blockchains/binance/assets/ONT-33D/logo.png
Normal file
BIN
blockchains/binance/assets/ONT-33D/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
|
@ -170,6 +170,7 @@
|
|||
"0x0AF61aA79Af9e5416E0f5076097B1179E65026cA",
|
||||
"0x0AFDaf5b718C458f135fa2454Fc1B61D90Ff48bB",
|
||||
"0x0aFff15c1103696ffC54D7762F75BDFc38aB51e1",
|
||||
"0x0b23ad11e92FDf87Eb5c9b0F24B9860F9c4689eE",
|
||||
"0x0b2A13BC4A09bf1Ee822964C3619F79791719eC0",
|
||||
"0x0b3A4677Fcc0243611d84bD4F207ceddEdDAa614",
|
||||
"0x0b4DB1d1CA3ac16554D6DbA8F7E9Eab58F311D62",
|
||||
|
@ -310,6 +311,7 @@
|
|||
"0x16231B1846a1B965cb7C6AC7DA7cDe1B41186105",
|
||||
"0x1626c27Dcdd748980270F5377c5b67A7C4399d76",
|
||||
"0x162d3e80D51f96240aE0a44Ab3A5B1ea23920ce4",
|
||||
"0x162EA83AE40Af0b09B3EA68de1a509c051C15534",
|
||||
"0x165A7cbB4C0F88C2aD40eFe141eaD10706ae5f37",
|
||||
"0x166Fc5B2CD97d2B0A618A17b24eB7D6c1FBc6Af9",
|
||||
"0x1680855238bf0dfb458dcF46CEb146b18EF65BD2",
|
||||
|
@ -519,6 +521,7 @@
|
|||
"0x24ef6E747cd17F94915c73f50470fDd5eD9F6d21",
|
||||
"0x24F412072dbb3804B1664A2447901FD27D98F3aA",
|
||||
"0x2501FFF7031448ce3238f1B61EE7591350aFa8E4",
|
||||
"0x250fBFB4Cf33453D419DfbF14eEBf87933a917Aa",
|
||||
"0x2511a5ed6dc83Ca4B1221738172de37F28D0e77d",
|
||||
"0x251C111464ddB5BCCfc28d3Ff12408D9DbA61c8A",
|
||||
"0x251D87E84eCb885c364538071c0b139d9294cCf7",
|
||||
|
@ -560,11 +563,13 @@
|
|||
"0x27F889C3A7504B825e9FD6D8352540117643146c",
|
||||
"0x281092947F058cDAe7F0546d940dAC549Cb93dBE",
|
||||
"0x2814d2De819d258aCD6d37687623F786d295018f",
|
||||
"0x2828380E639Ee92da9409226D448ffC4B6469a1E",
|
||||
"0x2833f00DD6703e2A430fc9dA524eA993742774F2",
|
||||
"0x28361981411fdfe1710fCC637a36A7AD7d7010c2",
|
||||
"0x283AFadad0cB8542f796Fa73D12ee224031b0dCe",
|
||||
"0x28407BA094d3551a15a25B0945e4584c4a8415Af",
|
||||
"0x284eE07e30EF40322023E0b20De9fF97757A069F",
|
||||
"0x285219175E5b64b1a9A3C343938D49Eff86BB95D",
|
||||
"0x286a4b47169b27ebCab6cd94d4A4F58A7BBB4474",
|
||||
"0x2897137dF67B209bE4a7E20F654dadCa720DD113",
|
||||
"0x28A2aFE6B351fc500F42EB3d7f4ce27b98d9dc4E",
|
||||
|
@ -688,6 +693,7 @@
|
|||
"0x31D51e64B4c53a701a09c42C0D4df9e67aF81144",
|
||||
"0x31EfFf6969e66c80696FF4B812a7911d41be6455",
|
||||
"0x321eFbB02EDa92c95856123904D2316ba860c0a0",
|
||||
"0x322d635802A418155Bf9e8A77df728169112e7A6",
|
||||
"0x323a3E1693E7a0959F65972F3bF2DFCb93239DfE",
|
||||
"0x32716ACAcF11f8411A9df8aF4135874cE16E0c12",
|
||||
"0x328bB6C3ac47143CE6F68e9Bc57f3752bdE5e512",
|
||||
|
@ -842,6 +848,7 @@
|
|||
"0x3D1494fC808422EE6FF61384C7786407C6f8356F",
|
||||
"0x3d24C44F6A926D7714137CB813dE8949DAac4BC6",
|
||||
"0x3d28a0Fd4745A55BDe28423bAa93356D27294F33",
|
||||
"0x3d3FB1996ec520e51a5cBa50E1289Ce238e13011",
|
||||
"0x3d44d7A065A66c0E441b34Af15AC714FB54f074d",
|
||||
"0x3D50aE017F336ae968Fcd63c1f48D61a08AeeD68",
|
||||
"0x3D6d9A6067Be6a3844D5a2Ff12F26F43952392AE",
|
||||
|
@ -941,6 +948,7 @@
|
|||
"0x43aBBfcA44Ca5AFF9B6f94cE813f2D37dd7F1Ff8",
|
||||
"0x43d29d6Dc3346A812b10b572ffB52fC7668Bf8BA",
|
||||
"0x43DbEa78dd1a0E6D2fa43f08e109cab95C1679A0",
|
||||
"0x43DEB036422E52f65B372C63072B9d136Dd54c82",
|
||||
"0x442DB1Ecdb2A0B6028AA30E710DF7728Df5cFA55",
|
||||
"0x443aB391bE2b6E048928f59F2544597b008C752d",
|
||||
"0x443B862d3815b1898e85085cAfcA57fC4335a1BE",
|
||||
|
@ -1018,6 +1026,7 @@
|
|||
"0x49802325d0E79405CcBF8d953Da490bA64fF2D1F",
|
||||
"0x499A15c8715F5aa66D3feaEc72aea485cCc7a66f",
|
||||
"0x49AC230A4BfE2A2c69E9D66D75057DFF3dccfC96",
|
||||
"0x49B6e7c838579E5C4d87571E5ee94268692713CD",
|
||||
"0x49ceB57714000F18F3749Cf2D130E135F9c473A4",
|
||||
"0x49D784562e790179D3630DFA0fAea9E59FEe5B61",
|
||||
"0x4A09aA840Da58d53AA9B7ae1147d2b0f50220b94",
|
||||
|
@ -1183,6 +1192,7 @@
|
|||
"0x5640a8e757CD6e25363087b3f65F86455a922c57",
|
||||
"0x5644a28c121F1467FFfad8A9ef70780d48C90378",
|
||||
"0x564cb55c655F727b61D9baF258b547Ca04E9e548",
|
||||
"0x564DA259C5d1759d37A82FB6dc430B1cC7aD55e2",
|
||||
"0x5656BA568B3C0cb8995C8182266ae2Ce515FFCE5",
|
||||
"0x567a98af9419e083c7C89847676d9Ca1d7E1326A",
|
||||
"0x56875daf52FdaE9c4a1b24676772F5138D975bC2",
|
||||
|
@ -1218,6 +1228,7 @@
|
|||
"0x57da1268B21fDc4C2607A4eFa55900829C7C96Bf",
|
||||
"0x57Ed2019e34e9D45b0f4726bbEE5786118423C50",
|
||||
"0x57f1887a8BF19b14fC0dF6Fd9B2acc9Af147eA85",
|
||||
"0x5804eb62e220673A240b1Dd567C5A8f3d8aB5348",
|
||||
"0x580a29FA60B86AaFF102743dE5Cba60Bb5f9de75",
|
||||
"0x58124AfeB40F51BEC09Cba79F3Ca76F7AE05939f",
|
||||
"0x5831Af184B99141Ca8c9C408a5beF03D7EeA6030",
|
||||
|
@ -1505,6 +1516,7 @@
|
|||
"0x6C1A604346F4B568CD78e09ba6371629BE541366",
|
||||
"0x6c24Aa24D954A5b27ff0E9DA4880Ece18dE54D37",
|
||||
"0x6C2A20b920a943237688dD6651200cAB253F5565",
|
||||
"0x6C3c5310B0477B4c971f6BAf24A0fc83a57b7D10",
|
||||
"0x6c4200d16a7b05E3f7040a69D574835382571f8f",
|
||||
"0x6c424C25e9F1ffF9642cB5B7750b0Db7312c29ad",
|
||||
"0x6C48B6721819265A0Ab1Cfb3E47d07E50aB36f0f",
|
||||
|
@ -1698,6 +1710,7 @@
|
|||
"0x78cbB32EC3C51278F5E2cFB1B0affF492E940317",
|
||||
"0x78D2B35af227099139367Ae407b106913738ccfE",
|
||||
"0x78e911d6369a8F42880A41ae9f1405C914A39b90",
|
||||
"0x78FCad8425Ee130E7a7c45a26310Bda69A4163fd",
|
||||
"0x7910254cEe5cb6BdCefd9b8eCE1d0e59B6Daa1d7",
|
||||
"0x7913756896a0f03573cD8838897f85120c4de252",
|
||||
"0x7924520c2e627D27cA641fc78E6918973C8ed80a",
|
||||
|
@ -1784,6 +1797,7 @@
|
|||
"0x7e346D4B6b3530526BfA868879292a9161567c22",
|
||||
"0x7e789E2dd1340971De0A9bca35b14AC0939Aa330",
|
||||
"0x7E7e3e17870930E1E90ad2c9a988b66CF254729c",
|
||||
"0x7e96ecc14fA5C77e1eAb08Eb175b434B47470760",
|
||||
"0x7E97ee409246d8e9D056239EF929a07896762731",
|
||||
"0x7eD90bDf373982A3C12352a8dbF92778D3b7d6AA",
|
||||
"0x7ee1b5CBd032A6258171580484Ac3aDc63Ee130A",
|
||||
|
@ -2045,6 +2059,7 @@
|
|||
"0x90F9A7dFfD55fC1bcCCADF72AdbB0A3f5dAEA7a6",
|
||||
"0x91002310cec24D818F42A169dD0d27eCBFA8bcD5",
|
||||
"0x91047Abf3cAb8da5A9515c8750Ab33B4f1560a7A",
|
||||
"0x9126B817CCca682BeaA9f4EaE734948EE1166Af1",
|
||||
"0x913ae503153d9A335398D0785Ba60A2d63dDB4e2",
|
||||
"0x913b5D0ececaF3a6b267d3eBc29f3361e6E75633",
|
||||
"0x915C5105274E70a0f156967B2cf4e9b0fF89Da68",
|
||||
|
@ -2255,6 +2270,7 @@
|
|||
"0x9F2E6D25cdB1cceF08BAe943D3D1F5f7A5a98E4d",
|
||||
"0x9f306BB6F480fA715d24b9c28106CB2BF73FB906",
|
||||
"0x9F3eE7F32a20aC63506c32692522C96A0FD33A73",
|
||||
"0x9f5B1fa6ec33513b8a9F22ceA0ACdc9c3B2835B2",
|
||||
"0x9f61CbAD5526e4c02D83559FBCAEDaE15b6c1119",
|
||||
"0x9F6309ba7651D1cb47f353fA8f58085A02205Ae7",
|
||||
"0x9f73a3eB789fC7d399f4C54575B60fA17D76158f",
|
||||
|
@ -2422,6 +2438,7 @@
|
|||
"0xAb35c9eFEc14B7BF9c7e4a15634Ff6391CbcacFD",
|
||||
"0xAb3d6a60f458a9438e2326C6E106030351875b6A",
|
||||
"0xaB4A7F33B471Aec753A2C4eb17dfA1365F0D9458",
|
||||
"0xab7FCc33E99cc21701459FB5C200ee2602EaB0BA",
|
||||
"0xaBb2A4e1717f51D379489DF8e784F770Fa6d6511",
|
||||
"0xabC7e6c01237e8EeF355Bba2bF925A730b714d5f",
|
||||
"0xAbF64bA42BF6B70c981823Df8B87119FF45639A7",
|
||||
|
@ -2631,6 +2648,7 @@
|
|||
"0xb8cD54F6bBf7041363f50A9CDe05C3Eae5aCA093",
|
||||
"0xb8d1098d65E60881eF540402e59F352A177B8cE4",
|
||||
"0xB8d1CdCeFe47834971067Bb0B8249f45433B4157",
|
||||
"0xb8e4A7c80444A484fa3cfaaf3F540C5366834b4a",
|
||||
"0xB9250c9581e4594b7c6914897823aD18D6B78e96",
|
||||
"0xb92f3223CfB4D4f22a1129df02c06cb353125196",
|
||||
"0xB9311678431d853330325c52C7642B3c4E34d5B2",
|
||||
|
@ -2677,6 +2695,7 @@
|
|||
"0xBBE87138B61AD684E3B2F0c8F4B0258400D54232",
|
||||
"0xbBe8Efd4E3e59525db73629E07debDfcf2917cb8",
|
||||
"0xbC0a833E4e24e96bF35D1D0e6b07d779FDC4c482",
|
||||
"0xbc0E164eE423B7800e355b012c06446e28b1a29d",
|
||||
"0xBc1C8008aFE498116429fe601E970C2E650D6c76",
|
||||
"0xbc5370374FE08d699cf7fcd2e625A93BF393cCC4",
|
||||
"0xbC5563De646CA6C6d7e2f7cc44FFADf1B5b614EF",
|
||||
|
@ -2974,6 +2993,7 @@
|
|||
"0xCFbbc398C08822924503cA5463aDF24351309379",
|
||||
"0xcFbC9103362AEc4ce3089f155c2DA2EEa1cB7602",
|
||||
"0xCfC0C8e3c0D0C0E3094b58E112F69973Fe660372",
|
||||
"0xcFc78221EB6764A8D88A9D137dbE40152E24a14c",
|
||||
"0xcfd8209065f6669E29b128F7c5e9f2003096B732",
|
||||
"0xCfdf325EC4961B99f55685dC9Cc0ffb30Bb759Fc",
|
||||
"0xcFe9F6C375D1Bb541AB571E12714dD2C29f082B5",
|
||||
|
@ -3127,6 +3147,7 @@
|
|||
"0xdAb189B6DE4D458C9eE8EF7201719fb9E74b7481",
|
||||
"0xdAbe8AcD9B3CFb4770C341565a079808E18150BF",
|
||||
"0xdaD042de7c622AE549641d67793aC65cf988c533",
|
||||
"0xdad917D2FdF8DB6f43DDfE8B97D3658de3f8d0D0",
|
||||
"0xDaF3829FAa2cF2d4bFc031DCAc2748b7bC5AD65F",
|
||||
"0xdB0527a196445483115d5fD7d12334701049b6F2",
|
||||
"0xDB141CBACE1Aa23a0858e14ACE38060734f63Fb5",
|
||||
|
@ -3242,9 +3263,11 @@
|
|||
"0xe271415e289411C0564247357Cb79fb97F7A59cC",
|
||||
"0xe272fdDBD056240149c771F9fD917FA040dceB39",
|
||||
"0xe28FFD8847E2C16CC9d07380ee757D0D37F5DC86",
|
||||
"0xe290A2f83A01bB4228c86b28a4D768f42dEfe710",
|
||||
"0xE2a3Ec2aAD99208048c392E63CeEc746df210504",
|
||||
"0xe2AeE679e50D2f391517E2f4006bA5aB1e6b1D22",
|
||||
"0xE2B339C3283b706c6a6001B4565F0FfB872FB45E",
|
||||
"0xe2b48132060dF95fe7b283397Eb080Df61B25ccD",
|
||||
"0xE2c9eF04009cBb17a0A93b9033a4C1F002B6b485",
|
||||
"0xe2e3D843989ff0c1cc793207F5154C72AE6376BE",
|
||||
"0xE2E7641115147f1575D6092715F066C7ea289a5B",
|
||||
|
@ -3269,6 +3292,7 @@
|
|||
"0xe43F953a39a4681aC36f72977ec6998aDc3d9f6A",
|
||||
"0xe44a5aCF291B9cD923316ed1c1C9CFa289eACE21",
|
||||
"0xe48513B09B216c1026603716A79B3cbEa752D972",
|
||||
"0xe4B7F895C582C4C4ca0a1f9502AC35E88A6Fe21d",
|
||||
"0xe4e0D04B634D174d577De98D2EeA7bF0f62E896F",
|
||||
"0xe4E8c4EC9fcCd1755876E8248Ac464E615B0122c",
|
||||
"0xe4F5E0d5c033f517A943602DF942e794a06Bc123",
|
||||
|
@ -3493,6 +3517,7 @@
|
|||
"0xf4403D9009e280c20174Ae0c372026eA6707D1F7",
|
||||
"0xF446137135009084BeE90FB1A4A15eE7755E1af1",
|
||||
"0xf45952C9B501CcaC5bbE9016ea4a23c3fdF9EB16",
|
||||
"0xF481bDA31A8Fd26b0d07cC690C727D558f464d34",
|
||||
"0xf48693220D333dCbDCCEA111b13Dfd4E3c074E7c",
|
||||
"0xf4878F54DDD8166a71dC71Cbdf0C0E4BcDe59c0d",
|
||||
"0xF48b0daDAc8e82D235e5fD323938c887bF0a5F7A",
|
||||
|
@ -3649,6 +3674,7 @@
|
|||
"0xff362Fca7D583004cEA21E539f64C15bBa9eCe44",
|
||||
"0xff3DA18BC25B4C43cCb5fB6f46f323627E6665e9",
|
||||
"0xfF480A7C447468A44F886daAE019513386198c1B",
|
||||
"0xff487499B8d86eE8179E328549A5e456CF8C62Ac",
|
||||
"0xFf488FD296c38a24CCcC60B43DD7254810dAb64e",
|
||||
"0xFF5425f2b1f789972fd050DF47dccfC2e33fB207",
|
||||
"0xFf61dFDbfa899Bff3dE22f8df9602d343Bc455e2",
|
||||
|
@ -3667,6 +3693,5 @@
|
|||
"0xFFe66c629A9cbd365C2D91E2Caa6d2890464C559",
|
||||
"0xfFE714740Ee83C20590855125B06eb4667F03De2",
|
||||
"0xfff4D3F6037e62428ce467B3DcbFff45A132F423",
|
||||
"0xffF4d70fe53d31D373B0bEE5bD41F5918f50f538",
|
||||
"0x7e96ecc14fA5C77e1eAb08Eb175b434B47470760"
|
||||
"0xffF4d70fe53d31D373B0bEE5bD41F5918f50f538"
|
||||
]
|
|
@ -1568,6 +1568,7 @@
|
|||
"0x5137A403Dd25e48DE528912a4aF62881e625D801",
|
||||
"0x5140e8453f913f53F9412a5AA126B64094d54e89",
|
||||
"0x514910771AF9Ca656af840dff83E8264EcF986CA",
|
||||
"0x5149fFdf642D551539f7B68Bd75fA37b16371eb9",
|
||||
"0x515669d308f887Fd83a471C7764F5d084886D34D",
|
||||
"0x515bA0a2E286AF10115284F151cF398688A69170",
|
||||
"0x516E5436bAfdc11083654DE7Bb9b95382d08d5DE",
|
||||
|
@ -2402,6 +2403,7 @@
|
|||
"0x80e82Dd8707a68D9f26a3035c1bBF2b704549801",
|
||||
"0x80f222a749a2e18Eb7f676D371F19ad7EFEEe3b7",
|
||||
"0x80fB784B7eD66730e8b1DBd9820aFD29931aab03",
|
||||
"0x810908B285f85Af668F6348cD8B26D76B3EC12e1",
|
||||
"0x81311Be50efd05ee4501d884F0152f942015508b",
|
||||
"0x813b428aF3920226E059B68A62e4c04933D4eA7a",
|
||||
"0x814964b1bceAf24e26296D031EaDf134a2Ca4105",
|
||||
|
@ -3797,6 +3799,7 @@
|
|||
"0xcF1D879e7016d654584Bfa0487e10714d24c5eff",
|
||||
"0xcF5A0010072ef3B791792F2D0Ea9A07ed84695d1",
|
||||
"0xCf5dfE6e2fA63AF41E9C01df75e79D3FDa69B5f3",
|
||||
"0xcF7d119BCb6822283003adc7c1a40E9ae7097B75",
|
||||
"0xCf8f9555D55CE45a3A33a81D6eF99a2a2E71Dee2",
|
||||
"0xCF9bBEE48B1e7D8Bf233Ade883dA8Ef7C5e91a45",
|
||||
"0xCFAc2916Ec118a0252A7766C513eE7c71b384b5E",
|
||||
|
@ -4017,6 +4020,7 @@
|
|||
"0xdbf0fac1499a931ed6e5F6122dbbCD3B80f66c7E",
|
||||
"0xDc279799643b6F52A7aDb03497f3cC941ff8f113",
|
||||
"0xdC314366CE447c39348Db014ADD5B2b37329f5Be",
|
||||
"0xdC3c4f132FEA66947CfDd57e287c1fbb94252677",
|
||||
"0xDC4A7A6632b1aF0e4E0A3C424936563A08503126",
|
||||
"0xDc71cf8Ad00Bc7e98FE1Ef40597EA897951F1B88",
|
||||
"0xdc8092AaF83e00Ebf9B01A2e90b7B7eF867ba503",
|
||||
|
|
|
@ -80,8 +80,8 @@
|
|||
"1001500",
|
||||
"1001546",
|
||||
"1001559",
|
||||
"1001581",
|
||||
"1000010",
|
||||
"1001584",
|
||||
"1001596",
|
||||
"1001617",
|
||||
"1001645",
|
||||
|
@ -157,9 +157,10 @@
|
|||
"TW2BkFwvkoH9Cx2zwifTacwkGSGiyiZWmt",
|
||||
"TWGGB35HUudizmcLheQN7kANDnD8KfgKkK",
|
||||
"TXfUT4K3z8tatGAk3rEw5qMuqrPXp28h4g",
|
||||
"TYM9eM22SCynRc5YaMxE2PX1kwv7H2rXAu",
|
||||
"TYNgrZX2eLPZ8UUoZEWuiUZYn3bh8fHU8f",
|
||||
"TYqgBctn2NjCQZLBbh1SMEAsH36mopnNqo",
|
||||
"TYxoK7DAvfze7ByWA7LYnzcoLxdKQpjrD1",
|
||||
"TZGQJY1QbZuXJmMgDgoZVeG4mD1Ef6SdWU",
|
||||
"1001581"
|
||||
"1001584"
|
||||
]
|
|
@ -11,20 +11,24 @@ import {
|
|||
isChainBlacklistExistSync,
|
||||
getChainWhitelistPath,
|
||||
getChainBlacklistPath,
|
||||
getChainValidatorsListPath,
|
||||
writeFileSync,
|
||||
sortDesc,
|
||||
getUnique,
|
||||
mapList
|
||||
mapList,
|
||||
stakingChains
|
||||
} from '../src/test/helpers'
|
||||
|
||||
const assetsChains = ethSidechains.concat([Terra, Tron])
|
||||
formatWhiteBlackList()
|
||||
formatValidators()
|
||||
|
||||
assetsChains.forEach(async chain => {
|
||||
function formatWhiteBlackList() {
|
||||
ethSidechains.forEach(async chain => {
|
||||
const assets = readDirSync(getChainAssetsPath(chain))
|
||||
|
||||
const whitelistPath = getChainWhitelistPath(chain)
|
||||
const blacklistPath = getChainBlacklistPath(chain)
|
||||
|
||||
const validatorsPath = getChainValidatorsListPath(chain)
|
||||
//Create inital lists if they do not exists
|
||||
if (!isChainWhitelistExistSync(chain)) {
|
||||
writeFileSync(whitelistPath, `[]`)
|
||||
|
@ -55,6 +59,16 @@ assetsChains.forEach(async chain => {
|
|||
fs.writeFileSync(whitelistPath, JSON.stringify(sortDesc(assets), null, 4))
|
||||
fs.writeFileSync(blacklistPath, JSON.stringify(getUnique(sortDesc(newBlackList)), null, 4))
|
||||
})
|
||||
}
|
||||
|
||||
function formatValidators() {
|
||||
stakingChains.forEach(chain => {
|
||||
const validatorsPath = getChainValidatorsListPath(chain)
|
||||
const currentValidatorsList = JSON.parse(readFileSync(validatorsPath))
|
||||
|
||||
fs.writeFileSync(validatorsPath, JSON.stringify(currentValidatorsList, null, 4))
|
||||
})
|
||||
}
|
||||
|
||||
function getRemovedAddressesFromAssets(assets: string[], whiteList: string[]): string[] {
|
||||
const mappedAssets = mapList(assets)
|
||||
|
|
|
@ -21,10 +21,12 @@ export const ThunderCore = getChainName(CoinType.thundertoken)
|
|||
export const Terra = getChainName(CoinType.terra)
|
||||
export const TomoChain = getChainName(CoinType.tomochain)
|
||||
export const Tron = getChainName(CoinType.tron)
|
||||
export const Kava = "kava" // TODO add to kava to tw types
|
||||
export const Wanchain = getChainName(CoinType.wanchain)
|
||||
export const Waves = getChainName(CoinType.waves)
|
||||
|
||||
export const ethSidechains = [Ethereum, Classic, POA, TomoChain, GoChain, Wanchain, ThunderCore]
|
||||
export const stakingChains = [Tezos, Cosmos, IoTeX, Tron, Waves, Kava, Terra]
|
||||
|
||||
export const logoName = `logo`
|
||||
export const infoName = `info`
|
||||
|
@ -92,14 +94,21 @@ export const getBinanceBEP2Symbols = async () => axios.get(`https://dex-atlantic
|
|||
export const getFileName = (fileName: string): string => path.basename(fileName, path.extname(fileName))
|
||||
export const getFileExt = (name: string): string => name.slice((Math.max(0, name.lastIndexOf(".")) || Infinity) + 1)
|
||||
|
||||
export const isTRC10 = (string: string): boolean => (/^\d+$/.test(string))
|
||||
export const isTRC20 = address => {
|
||||
export const isTRC10 = (str: string): boolean => (/^\d+$/.test(str))
|
||||
export const isTRC20 = (address: string) => {
|
||||
return address.length == 34 &&
|
||||
address.startsWith("T") &&
|
||||
isLowerCase(address) == false &&
|
||||
isUpperCase(address) == false
|
||||
}
|
||||
|
||||
export const isWavesAddress = (address: string) => {
|
||||
return address.length == 35 &&
|
||||
address.startsWith("3P") &&
|
||||
isLowerCase(address) == false &&
|
||||
isUpperCase(address) == false
|
||||
}
|
||||
|
||||
export const isPathDir = (path: string): boolean => {
|
||||
try {
|
||||
return fs.lstatSync(path).isDirectory()
|
||||
|
|
|
@ -18,7 +18,7 @@ import {
|
|||
isChecksum,
|
||||
isPathDir,
|
||||
getBinanceBEP2Symbols,
|
||||
isTRC10, isTRC20,
|
||||
isTRC10, isTRC20, isWavesAddress,
|
||||
isLogoOK,
|
||||
getChainWhitelistPath,
|
||||
getChainBlacklistPath,
|
||||
|
@ -28,7 +28,10 @@ import {
|
|||
isValidatorHasAllKeys,
|
||||
getChainAssetPath,
|
||||
rootDirAllowedFiles,
|
||||
assetFolderAllowedFiles
|
||||
assetFolderAllowedFiles,
|
||||
stakingChains,
|
||||
Kava,
|
||||
Terra
|
||||
} from "./helpers"
|
||||
import { ValidatorModel } from "./models";
|
||||
import { getHandle } from "../../script/gen_info";
|
||||
|
@ -134,17 +137,18 @@ describe(`Test "blockchains" folder`, () => {
|
|||
})
|
||||
|
||||
describe("Check Staking chains", () => {
|
||||
const stakingChains = [Tezos, Cosmos, IoTeX, Tron, Waves]
|
||||
|
||||
test("Make sure tests added for new staking chain", () => {
|
||||
expect(stakingChains.length).toBe(5)
|
||||
expect(stakingChains.length).toBe(7)
|
||||
})
|
||||
|
||||
stakingChains.forEach(chain => {
|
||||
const validatorsList = JSON.parse(readFileSync(getChainValidatorsListPath(chain)))
|
||||
test(`Make sure ${chain} validators list has correct structure`, () => {
|
||||
const listPath = getChainValidatorsListPath(chain)
|
||||
const validatorsList = JSON.parse(readFileSync(listPath))
|
||||
|
||||
test(`Chain ${chain} validator must have correct structure and valid JSON format`, () => {
|
||||
validatorsList.forEach((val: ValidatorModel) => {
|
||||
expect(isValidatorHasAllKeys(val), `Come key and/or type missing for validator ${JSON.stringify(val)}`).toBe(true)
|
||||
expect(isValidatorHasAllKeys(val), `Some key and/or type missing for validator ${JSON.stringify(val)}`).toBe(true)
|
||||
expect(isValidJSON(listPath), `Not valid json file at path ${listPath}`).toBe(true)
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -164,15 +168,22 @@ describe(`Test "blockchains" folder`, () => {
|
|||
case Cosmos:
|
||||
testCosmosValidatorsAddress(chainValidatorsAssetsList)
|
||||
break;
|
||||
case Kava:
|
||||
testKavaValidatorsAddress(chainValidatorsAssetsList)
|
||||
break;
|
||||
case Terra:
|
||||
testTerraValidatorsAddress(chainValidatorsAssetsList)
|
||||
break;
|
||||
case Tezos:
|
||||
testTezosValidatorsAssets(chainValidatorsAssetsList)
|
||||
break;
|
||||
case Tron:
|
||||
testTronValidatorsAssets(chainValidatorsAssetsList)
|
||||
break;
|
||||
// TODO Add LOOM
|
||||
// TODO Add Waves
|
||||
// TODO Add IoTex
|
||||
case Waves:
|
||||
testWavesValidatorsAssets(chainValidatorsAssetsList)
|
||||
break;
|
||||
// TODO Add IoTex when taking suported by Trust
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -194,7 +205,7 @@ describe(`Test "blockchains" folder`, () => {
|
|||
})
|
||||
})
|
||||
|
||||
function testTezosValidatorsAssets(assets) {
|
||||
function testTezosValidatorsAssets(assets: string[]) {
|
||||
test("Tezos assets must be correctly formated tz1 address", () => {
|
||||
assets.forEach(addr => {
|
||||
expect(eztz.crypto.checkAddress(addr), `Ivalid Tezos address: ${addr}`).toBe(true)
|
||||
|
@ -202,16 +213,23 @@ function testTezosValidatorsAssets(assets) {
|
|||
})
|
||||
}
|
||||
|
||||
function testTronValidatorsAssets(assets) {
|
||||
function testTronValidatorsAssets(assets: string[]) {
|
||||
test("TRON assets must be correctly formated", () => {
|
||||
assets.forEach(addr => {
|
||||
expect(isTRC20(addr), `Address ${addr} should be TRC20`).toBe(true)
|
||||
})
|
||||
})
|
||||
}
|
||||
function testWavesValidatorsAssets(assets: string[]) {
|
||||
test("WAVES assets must have correct format", () => {
|
||||
assets.forEach(addr => {
|
||||
expect(isWavesAddress(addr), `Address ${addr} should be WAVES formated`).toBe(true)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
function testCosmosValidatorsAddress(assets) {
|
||||
test("Cosmos assets must be correctly formated", () => {
|
||||
function testCosmosValidatorsAddress(assets: string[]) {
|
||||
test("Cosmos assets must have correct format", () => {
|
||||
assets.forEach(addr => {
|
||||
expect(addr.startsWith("cosmosvaloper1"), `Address ${addr} should start from "cosmosvaloper1"`).toBe(true)
|
||||
expect(addr.length, `Address ${addr} should have length 52`).toBe(52)
|
||||
|
@ -220,6 +238,26 @@ function testCosmosValidatorsAddress(assets) {
|
|||
})
|
||||
}
|
||||
|
||||
function testKavaValidatorsAddress(assets: string[]) {
|
||||
test("Kava assets must have correct format", () => {
|
||||
assets.forEach(addr => {
|
||||
expect(addr.startsWith("kavavaloper1"), `Address ${addr} should start from "kavavaloper1"`).toBe(true)
|
||||
expect(addr.length, `Address ${addr} should have length 50`).toBe(50)
|
||||
expect(isLowerCase(addr), `Address ${addr} should be in lowercase`).toBe(true)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
function testTerraValidatorsAddress(assets: string[]) {
|
||||
test("Terra assets must have correct format", () => {
|
||||
assets.forEach(addr => {
|
||||
expect(addr.startsWith("terravaloper1"), `Address ${addr} should start from "terravaloper1"`).toBe(true)
|
||||
expect(addr.length, `Address ${addr} should have length 51`).toBe(51)
|
||||
expect(isLowerCase(addr), `Address ${addr} should be in lowercase`).toBe(true)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
describe("Test Coinmarketcap mapping", () => {
|
||||
const cmcMap = JSON.parse(readFileSync("./pricing/coinmarketcap/mapping.json"))
|
||||
|
||||
|
@ -338,7 +376,6 @@ describe("Test coins info.json file", () => {
|
|||
});
|
||||
|
||||
describe("Test all JSON files to have valid content", () => {
|
||||
|
||||
const files = [
|
||||
...findFiles(chainsFolderPath, 'json'),
|
||||
...findFiles(pricingFolderPath, 'json')
|
||||
|
|
Loading…
Reference in New Issue
Block a user