Adminupgradeabilityproxy.sol What is _DATA for?


i have a adminupgradeabilityproxy.sol contract which i want to deploy but i dont understand the _DATA: bytes aspect. "Data to send as to the implementation to initialize the proxied contract" .What does that mean? What do i have to put in there? Sorry i am new in solidity.
Thank you for all the answers!

Hi, welcome! :wave:

If _data is non-empty, it's used as data in a delegate call to _logic. This will typically be an encoded
function call, and allows initializating the storage of the proxy like a Solidity constructor.

okey and how does it work together, i still dont get it. If i have for example a masterchef contract which i want as a proxy for upgrades in the future. _Logic : addressofmasterchef and _bytes?:
As far as i understood is bytes for initializing the logic contract or am i wrong?

So what i did is: I took the address of my masterchef contract and put it in _logic. the _admin parameter is my address and i filled in the parameter _data the byte "address" of the contract. I did it per web3.utils.sha3('constructor()').substring(0,10) but if i try to deploy it the result is:

I dont understand what i am doing wrong^^.