Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OETH Base deploy script #2061

Merged
merged 33 commits into from
May 28, 2024
Merged

Conversation

PraneshASP
Copy link
Contributor

If you made a contract change, make sure to complete the checklist below before merging it in master.

Refer to our documentation for more details about contract security best practices.

Contract change checklist:

  • Code reviewed by 2 reviewers.
  • Copy & paste code review security checklist below this checklist.
  • Unit tests pass
  • Slither tests pass with no warning
  • Echidna tests pass if PR includes changes to OUSD contract (not automated, run manually on local)

@PraneshASP PraneshASP marked this pull request as ready for review May 16, 2024 11:03
deployWithConfirmation,
withConfirmation,
} = require("../../utils/deploy");
const { getTxOpts } = require("../../utils/tx");
Copy link
Member

Choose a reason for hiding this comment

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

You can rename this file to 002_woeth_on_base.js

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Member

@sparrowDom sparrowDom left a comment

Choose a reason for hiding this comment

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

Aside from a minor file rename, the CI seems to not work. Would be cool that before deployment the all the unit & fork tests in the CI succeed

Copy link

codecov bot commented May 17, 2024

Codecov Report

Attention: Patch coverage is 94.96403% with 7 lines in your changes are missing coverage. Please review.

Please upload report for BASE (PraneshASP/aerodrome-amo@4fbad41). Learn more about missing BASE report.

Files Patch % Lines
contracts/contracts/harvest/OETHBaseHarvester.sol 84.00% 4 Missing ⚠️
contracts/contracts/harvest/OETHHarvester.sol 97.29% 2 Missing ⚠️
...tracts/contracts/harvest/AbstractHarvesterBase.sol 95.65% 1 Missing ⚠️
Additional details and impacted files
@@                     Coverage Diff                     @@
##             PraneshASP/aerodrome-amo    #2061   +/-   ##
===========================================================
  Coverage                            ?   62.55%           
===========================================================
  Files                               ?       64           
  Lines                               ?     3213           
  Branches                            ?      823           
===========================================================
  Hits                                ?     2010           
  Misses                              ?     1199           
  Partials                            ?        4           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@shahthepro shahthepro left a comment

Choose a reason for hiding this comment

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

Few comments inline. Random question: Storage layout file isn't updated?

@@ -80,6 +80,10 @@ main()
# Run all files with `.holesky.fork-test.js` suffix when no file name param is given
# pass all other params along
params+="test/**/*.holesky.fork-test.js"
elif [[ $FORK_NETWORK_NAME == "holesky" ]]; then
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this be base?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good catch, changed.

@@ -101,7 +105,7 @@ main()
FORK=true IS_TEST=true npx --no-install hardhat coverage --testfiles "${params[@]}"
else
echo "Running fork tests..."
FORK=true IS_TEST=true npx --no-install hardhat test ${params[@]}
FORK=true IS_TEST=true npx --no-install hardhat test ${params[@]} --show-stack-traces
Copy link
Collaborator

Choose a reason for hiding this comment

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

why this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed

@@ -195,6 +205,8 @@ module.exports = {
process.env.FORK === "true"
? isHoleskyFork
? HOLESKY_DEPLOYER
: isBaseFork
? BASE_DEPLOYER
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't agree with this change personally. If we change the governor on fork, we are deploying/testing the contracts in a state that's gonna be completely different from mainnet.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed, this has been removed.

const isArbTestFile = s.file.endsWith(".arb.fork-test.js");
const isBaseTestFile = s.file.endsWith(".base.fork-test.js");

if (isMainnetForkTest) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think I changed the order and fixed it in some PR. isMainnetForkTestFile should always be at the end and should always be fully spread like isMainnetForkTestFile && !isHoleskeyTestFile && !isArbTestFile

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the fix

@@ -5,14 +5,19 @@ const isFork = process.env.FORK === "true";
const isArbitrumFork = process.env.FORK_NETWORK_NAME === "arbitrumOne";
const isHoleskyFork = process.env.FORK_NETWORK_NAME === "holesky";
const isHolesky = process.env.NETWORK_NAME === "holesky";
const isBase = process.env.NETWORK_NAME === "base";
Copy link
Collaborator

Choose a reason for hiding this comment

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

checking chainId would be much better here

Copy link
Member

Choose a reason for hiding this comment

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

Yup agreed, much safer

Copy link

github-actions bot commented May 17, 2024

Warnings
⚠️ 👀 This PR needs at least 2 reviewers

Generated by 🚫 dangerJS against 409946a

@PraneshASP PraneshASP marked this pull request as draft May 20, 2024 09:26
@PraneshASP PraneshASP marked this pull request as ready for review May 28, 2024 13:16
@PraneshASP PraneshASP merged commit 1522fe1 into PraneshASP/aerodrome-amo May 28, 2024
12 of 16 checks passed
@PraneshASP PraneshASP deleted the PraneshASP/oethbase-deploy branch May 28, 2024 13:17
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.

None yet

3 participants