Skip to content

CircleCI Improvements & All-Around More Parallelism#777

Merged
thomas-waite merged 29 commits intodevelopfrom
feat/ci-improvements
May 5, 2022
Merged

CircleCI Improvements & All-Around More Parallelism#777
thomas-waite merged 29 commits intodevelopfrom
feat/ci-improvements

Conversation

@xklob
Copy link
Contributor

@xklob xklob commented May 5, 2022

No description provided.

@thomas-waite thomas-waite self-requested a review May 5, 2022 13:46
Copy link
Contributor

@thomas-waite thomas-waite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

@thomas-waite thomas-waite merged commit 85ba525 into develop May 5, 2022
@thomas-waite thomas-waite deleted the feat/ci-improvements branch May 5, 2022 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments