I am trying to write my first upgradeable (UUPS) contract(s) and I'm a little bit puzzled with some logic regarding what goes into the "proxy" and what goes into "implementation" contracts. It would seem logical to me if proxy contract would be very simple one, probably with initialize()
and _authorizeUpgrade()
functions only, while implementation would hold all the business logic (e.g. minting, burning, whatever else), especially if there's plenty of different functions in it.
However, after reading couple of articles about upgradeable contracts, I see that lots of people are adding business logic in the same contract where initialize()
and _authorizeUpgrade()
functions are.
Is it really a common pattern to write the very first version of the business logic in the same place where proxy-related functions are or should I keep my proxy as minimal as possible and write everything else in a separate contract?