OriginProtocol / origin-dollar

OUSD and OETH are stablecoins that passively accrue yield while you are holding it
https://originprotocol.com
MIT License
112 stars 73 forks source link

Trim down defender action code build size #2114

Open sparrowDom opened 1 week ago

sparrowDom commented 1 week ago

This PR trims down the defender action code. Unfortunately, we can not just mark the hardhat as an external rollup dependency and still use it in the code because the resulting compiled action code will still try to import it and it will throw an error.

For that reason this PR separates dependency files in such a way that no defender action task imports any file that would also import hardhat. This reduces the build size to 2Mbs.

There are other fixes and improvements in the PR as a result of testing the functionality in production.

codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 61.24%. Comparing base (13c1355) to head (f6d92c1).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2114 +/- ## ======================================= Coverage 61.24% 61.24% ======================================= Files 66 66 Lines 3321 3321 Branches 862 862 ======================================= Hits 2034 2034 Misses 1284 1284 Partials 3 3 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.