I’m working on a simple game that utilizes ERC20 tokens for its operation…
It’s actually a part of this query: Implementation of ERC20 tokens
It contains a tokenfactory contract and a token contract that inherits ERC20 from openzeppelin-contracts-ethereum-package… I was unable to use v0.5.x+ because of various dependencies from the packages that are not updated to latest versions…
My project mate had inherited and used App.sol from upgrades package in the tokenfactory contract and I got confused…
Do we need to use it even when we’re using Openzeppelin cli?
Why do we need to use it? I read this part from the doc about contracts architecture:
https://docs.openzeppelin.com/cli/2.8/contracts-architecture
I hadn’t been giving any attention to all this before since i had no other dependencies in my previous contract that was to be made upgradeable… but he says it’s essential for this one…
Can you please clarify this to me?
Why do i need to use this in my contracts like this :
…
App private app;
function initialize (App _app) public initializer {
app = _app;
}
…
or why would i need to consider it anyway?