├── README.md └── fol list.js /README.md: -------------------------------------------------------------------------------- 1 | # dispers -------------------------------------------------------------------------------- /fol list.js: -------------------------------------------------------------------------------- 1 | export async function getTokensPrice(tokens) { 2 | let prices = {} 3 | let isFetched = false 4 | let retry = 0 5 | 6 | while (!isFetched) { 7 | const agent = getProxy(0, true) 8 | await axios.get(`https://min-api.cryptocompare.com/data/pricemulti?fsyms=${tokens}&tsyms=USD`, { 9 | httpsAgent: agent 10 | }).then(response => { 11 | prices = response.data 12 | isFetched = true 13 | }).catch(e => { 14 | retry++ 15 | 16 | if (retry > 3) { 17 | isFetched = true 18 | } 19 | }) 20 | } 21 | 22 | return prices 23 | } 24 | 25 | export const entryPoint = async () => { 26 | const questions = [ 27 | { 28 | name: "choice", 29 | type: "list", 30 | message: "Action:", 31 | choices: [ 32 | { 33 | name: "Web version", 34 | value: "web", 35 | }, 36 | { 37 | name: "Eclipse", 38 | value: "eclipse", 39 | }, 40 | { 41 | name: "Story", 42 | value: "story", 43 | }, 44 | { 45 | name: "Jumper", 46 | value: "jumper", 47 | }, 48 | { 49 | name: "ZkSync", 50 | value: "zksync", 51 | }, 52 | { 53 | name: "Layerzero", 54 | value: "layerzero", 55 | }, 56 | { 57 | name: "Debridge", 58 | value: "debridge", 59 | }, 60 | { 61 | name: "Hyperlane", 62 | value: "hyperlane", 63 | }, 64 | { 65 | name: "ZkBridge", 66 | value: "zkbridge", 67 | }, 68 | { 69 | name: "Wormhole", 70 | value: "wormhole", 71 | }, 72 | { 73 | name: "Zora", 74 | value: "zora", 75 | }, 76 | { 77 | name: "Base", 78 | value: "base", 79 | }, 80 | { 81 | name: "Polygon ZK EVM", 82 | value: "polygonzkevm", 83 | }, 84 | { 85 | name: "Aptos", 86 | value: "aptos", 87 | }, 88 | { 89 | name: "Linea", 90 | value: "linea", 91 | }, 92 | { 93 | name: "Linea POH", 94 | value: "linea-poh", 95 | }, 96 | { 97 | name: "Scroll", 98 | value: "scroll", 99 | }, 100 | { 101 | name: "EVM checker", 102 | value: "evm", 103 | }, 104 | { 105 | name: "Balances", 106 | value: "balances", 107 | }, 108 | { 109 | name: "Rabby", 110 | value: "rabby", 111 | }, 112 | { 113 | name: "Galxe", 114 | value: "galxe", 115 | } 116 | ], 117 | default: "web", 118 | loop: false, 119 | }, 120 | ] 121 | 122 | const answers = await inquirer.prompt(questions) 123 | return answers.choice 124 | } 125 | 126 | export const chooiceNetwork = async () => { 127 | const questions = [ 128 | --------------------------------------------------------------------------------