Scaffold-ETH-DeFi-Challenges
Scaffold-ETH-DeFi-Challenges copied to clipboard
Bring in Scaffold-ETH v1 AND/OR v2 and Combine with Foundry Setup
Detail
There are challenges associated to bringing in foundry in combination with the hardhat default frameworks used with ScaffoldETH v1. It is assumed that this type of conflict will arise with ScaffoldETH v2 as well, but it is yet to be seen.
TODOs:
- [ ] Incorporate Scaffold-ETH v2 into the mix
- Deploy localhost, edit deployment scripts to make it work with yearn strategies (may have to pull reference from the deploy scripts used with foundry and convert them over to whatever format is used for ScaffoldETH and hardhat)
- Troubleshoot until the yearn strategy solutions show up in the troubleshooting UI for localhost
- Test with its function calls && come up with a good workflow to showcase how it works
It would be great to have a front end that showcases the yearn strategy at play within a testnet or at least a local mainnet fork.
See other issues on these aspects.
Attempting to do this in this forked repo off of ScaffoldETH v2. Link HERE I followed the same processes I took with ScaffoldETH v1 and DEX foundry tests.
I ran into some issues, see the latest commit where I left off in the other repo. My goal is to bring SE v2 into this repo, perhaps create a new branch for DeFi Challenge #1 once SE v2 is merged into main
branch. Get foundry working and everything with this new setup with SE v2. Get debugger working and then get a front end going for the challenge itself from solidoracle.
_Latest commit from other repo:
Troubleshoot errors w/ make build
The tests needed their import paths fixed, but I also noticed that the imported vault.json artifact is not setup correctly due to migrating the foundry-strategy-mix setup to this SE v2 framework. I need to take a closer look. Next steps include:
- [ ] Work through vault.json issue
- [ ] Write deployment code in 00_deploy_your_contracts.ts for vaults and strategies
- [ ] Get frontend debugger UI working w/ contracts && add to the README.md as needed_
@solidoracle now that we have se-2 coming into the main
branch here, we need to coordinate an effective way to combine foundry and se-2.
Context:
-
Challenge #1 repo created before bringing in se-2
-
NOTE: the branch has been made so it is ready for a student to come in and walk through the README.md. If you want to troubleshoot with it to make sure the foundry tests all work when someone is done the tutorial, just
clone
the repo, go to the branch on your local machine, and copy over the files inSolutions
sub-directory to replace the respective Solidity files (Strategy.sol
,StrategyOperations.t.sol,
StrategyShutdown.t.sol
). - Run
make test
, of course with a.env
setup and you'll see everything working.
-
NOTE: the branch has been made so it is ready for a student to come in and walk through the README.md. If you want to troubleshoot with it to make sure the foundry tests all work when someone is done the tutorial, just
Next Steps IMO
- I think I'll make a new branch to replace the current
challenge-1-simple-yearn-strategy
branch. It's either that or I rebase to main which could cause issues. - THEN you can take that branch, and edit the deploy script (hardhat) so it shows up in the "debugging" tab in the localhost for the frontend UI w/ se-2.
Please let me know what you think!
@umphams yes I think it's best to branch off main again, and paste in the challenge-1-simple-yearn-strategy