When should I use App.sol in my project?

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?

1 Like

Hi @asmeedhungana,

The short answer is that you shouldn’t need to.

You would only use App.sol if you were creating Ethereum Packages but the plan is to remove this contract. (See https://github.com/OpenZeppelin/openzeppelin-sdk/issues/1488)

If you wanted to create proxies onchain you could use ProxyFactory.

1 Like

Okay… what does creating a proxy mean? Haven’t been able to grasp it as well…

1 Like

Creating a proxy means deploying a proxy contract that points to a logic/implementation contract.

1 Like

A post was split to a new topic: Is it mandatory to use App.sol?