Hello,
I have trying to deploy TransparentUpgradeableProxy contract with implementation contract. I can easily deploy if there is not parameters in initialize() function in implementaion by passing 0x8129fc1c at data field in proxy contract. But I have no idea how to deploy if initialize(address,address) with parameters.
I used following code to generate bytes in remix
web3.utils.sha3('initialize()').substring(0,10)
But I don't know how to generate bytes for function with parameters.
Also, I tried to run initialize function after the proxy is deployed by using null bytes array but it says Initializer already initialized.
Code to reproduce
function initialize(address account_, address owner_) public initializer {
_name = "New Proxy Coin";
_symbol = "NPC";
__ownable_init_unchained(account_, owner_);
_mint(owner_, 200 * 10**6 * 10**18 );
}
Environment
Remix