Hello
What is constructor data argument in proxy contract? And how to calculate it. Anyone one who can explain it to me .
Feb 24, 2022, 6:06 AM
There are no constructors in proxy contracts
Feb 24, 2022, 6:13 AM
I mean for upgradeable proxy contract.They have 3 constructor arguments
Feb 24, 2022, 6:17 AM
Mm I don't think so. Proxys don't have constructors, only init functions. Which is called right after the deployment
Feb 24, 2022, 6:19 AM
Pls check this proxy contract. It has 3 constructor arguments
https://bscscan.com/address/0xaacb683a934a5e1aee846286049f1a5dd38bdfb9#code
https://bscscan.com/address/0xaacb683a934a5e1aee846286049f1a5dd38bdfb9#code
Feb 24, 2022, 6:23 AM
Aah you meant the proxy itself, not implementation behind it
Feb 24, 2022, 6:27 AM
Yea I mean the proxy . I want to know how I calculate that data argument
Feb 24, 2022, 6:27 AM
Its straightforward, _admin will be the owner address, _implementation is the address of actual contract and _data is the calldata used to call the implementation initially (not necessary, can keep it 0)
Although you don't have to provide them explicitly while using the deployProxy method on truffle/hardhat
Feb 24, 2022, 6:36 AM
Thanks for the help I got it now.
Feb 24, 2022, 6:38 AM