CircleCI Improvements & All-Around More Parallelism#777
CircleCI Improvements & All-Around More Parallelism#777thomas-waite merged 29 commits intodevelopfrom
Conversation
thomas-waite
left a comment
There was a problem hiding this comment.
Would remove the solidity cache from git, but this is really awesome. Will really tighten the e2e feedback loop and improve development speed
| } | ||
|
|
||
| return contracts; | ||
| const contractsAsArrayEntries = await Promise.all( |
There was a problem hiding this comment.
I find this very hard to read and follow through what's happening, but it's an internal data structure creation routine so don't feel that strongly
There was a problem hiding this comment.
Basically, we take the object that is MainnetAddresses, and turn it into an array of [key,value] entries with Object.entries(), which leaves us with a 2-dimensional array.
Then we filter out all of the "unknown" artifacts.
Finally we map the value in each subarray (which is the artifact name, the address, and the category as an object) into an initialized Contract object; now we have a 2-dimensional array that is made up of contract names and Contracts for each subarray.
Finally, we use Object.fromEntries() to turn it back into an Object after Promise.all returns, which we need because array.map is async! (Which is the whole point of this change - we don't wait around on each iteration of the loop)
No description provided.