To whom it may concern (let’s be honest, it’s going to be Andrew @abcoathup),
I trust that you are well.
As you may recall, I’m working with the OpenZeppelin proxy contracts at the moment. I have a few questions:
This one is more of a sanity check on the ProxyFactory. As the proxy contract that the factory will deploy is imported into the ProxyFactory contract and then the whole thing is deployed, that means that there is no way to modify the deployable proxy contract, right? I’d just have to create and deploy a new ProxyFactory with a modified deployable proxy contract imported.
In the ProxyAdmin contract, there are functions that accept a proxy contract entity as a parameter. For example,
function getProxyImplementation(AdminUpgradeabilityProxy proxy) public view returns (address)
AdminUpgradeabilityProxy is imported into the ProxyAdmin contract.
How do you pass a contract as an argument from a contract? From web3.js?
I assume that from a contract, you would need to import AdminUpgradeabilityProxy and then deploy it. You then access the address for the new contract and assign that address to the AdminUpgradeabilityProxy object. And then call the getProxyImplementation function with that object. Is that right? Or do you just need an address?
From web3.js would you need an ABI json file?
Is an implementation (logic) contract a library? Does it have to be?
How do use events with libraries? I’ve seen references to defining the event in both the library and calling contract. Would you call the library with a delegatecall within a function in the contract which includes the desired event emission? What is the deal with including an event in both the library and calling contract?
I appreciate any advice or help you can offer. Cheers.