title: How to add web3js contract calls to Promise.all()
body: <p>Ill try to explain this the best I can because I haven't got much experience with Promise, mostly just used async/await</p>
  <p>Im building a database and have something like this</p>
  <pre><code>let promises = []
  
  for (let j = 0; j &lt; batchSize; j++) {
      let token0Address = token0Addresses[j]
      let token0Contract = new web3.eth.Contract(abis.token, token0Address)
  
      promises.push(token0Contract.methods.name().call())
  }
  
  try {
      let token0Names = await Promise.all(promises)
  } catch {other stuff}
  </code></pre>
  <p>The issue im running into is that some tokens don't have names which I was hoping would be caught by the try catch block. But sometimes the calls are returned before it reaches the try block and throws an error anyway.</p>
  <p>I've also tried something like this</p>
  <pre><code>promises.push(() =&gt; token0Contract.methods.name().call())
  </code></pre>
  <p>but this just makes Promise.all(promises) return a bunch of functions</p>
  <p>I've also tried</p>
  <pre><code>promises.push(new Promise(function(resolve, reject) {
      resolve(token0Contract.methods.symbol().call())
  }))
  </code></pre>
  <p>and</p>
  <pre><code>promises.push(new Promise(function(resolve, reject) {
      token0Contract.methods.name().call(function(error, result)) {
          if (error) {
              reject(error)
          } else {
              resolve(result)
          }
      }
  }))
  </code></pre>