3 ms·
Thanks for the very in-depth reply. I've only been doing it for ~5 months now, so definitely consider myself a "junior" in the space. What we've done is fork a
by pcthrowaway 4y ago
Thanks for the very in-depth reply. I've only been doing it for ~5 months now, so definitely consider myself a "junior" in the space.
What we've done is fork a popular defi protocol (think AAVE/Compound) that consists of >10 core contracts, plus additional for markets, and made a few changes. Then deployed a few custom contracts as well. I've written ~100-200 lines of solidity that are on mainnet now, the rest, as you say, are snapping together Openzeppelin legos.
We're not using The Graph for our frontend (yet) though I think we want to in the future.
Our current stack is Hardhat (with ethers) for both deployment and testing, and react + typescript + react-query on the frontend.
We're able to get contracts deployed on a hardhat node or goerli pretty quickly now, but, for example, if deploying to goerli, the 200-300 transactions for the deployment process take ~1 hour to send through, so it's really just where we deploy right before we release (in addition to testing on a fork of mainnet).
The tooling here is all kind of new though. Example: if I want to fork mainnet, test an upgrade, and then test frontend changes which use that forked net, as an account which I don't have the key for, I just.. can't right now. Hardhat lets you impersonate accounts which is amazing, but no frontend wallet lets you send unsigned transactions using an impersonated account (which effectively uses provider-managed signers).
The "best" way I found to do this is forking an open-source browser wallet extension, hacking it a bit, and hardcoding the account I want to send the unsigned transaction for, to the hardcoded local RPC endpoint, which requires an extension reload, and is still finicky.
Eventually I think the tooling will get there, but for right now it still seems fairly immature to me.