You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Optimism Most contracts are proxied and the proxies are managed by the ProxyAdmin contract. In contrast to the Celo Registry contract, no names are given to the contracts which could be used to look up a specific contract. Instead, contracts are assigned a fixed address in the 0x42000000000000000000000000000000000000xx range. All addresses in this range are reserved for the OP-stack by deploying a proxy at each address within this range.
If we want to use OP’s ProxyAdmin instead of our CeloRegistry, we would at least have to provide a contract at the old Celo Registry’s address the resolves name lookups to the new fixed proxy addresses. Other points to check:
How different is the proxy setup? I haven’t seen an initialize method in OP contracts.
Is OP’s layout locking sufficient to allow compatible contract upgrades or do we need to port our checks?
What happens with the GoldToken? We can’t just move it to a new fixed address and geth relies on the registry to get the gold token’s address.
Certainly more… Somebody who knows in detail how contract updates are handled on Celo should refine this.
The text was updated successfully, but these errors were encountered:
ProxyAdmin uses something called AddressManager to help name contracts and find them by name. When comparing our Registry with ProxyAdmin, a big difference is that ProxyAdmin can do things like upgrading and changing owners. For this to work, ProxyAdmin has to be the owner of all the contracts it's looking after.
There are three types of proxies that ProxyAdmin can work with: ERC1967, CHUGSPLASH, and RESOLVED. But none of these match our Proxy. If we decide to use ProxyAdmin, we'd have add support of our type of Proxy or implement their Proxy.sol and change the addresses of our main contract proxies.
Optimism's Proxies: Optimism uses proxy called Proxy.sol. It's a bit different from ours, but it does a lot of the same things. Unlike our Proxies, theirs doesn't use special initialize function but rather allow owner (admin) to call upgrade implementation and in same call also admin can choose to call whichever function on implementation smart contract.
Layout Locking: This is something that seems pretty similar to what we're already doing. If we decide to use their way of doing things, we'd need to take a good look at our current setup.
I believe this would be very risky move since lots of protocols most probably use hardcoded Celo address.
One more thing to think about is how we handle releases. Right now, we have tools that take care of upgrading our core contracts. These tools can compare different releases, create proposals, and do other things. If we decide to switch to Optimism's way of doing things, we'd have to make some changes to these tools.
There are three types of proxies that ProxyAdmin can work with: ERC1967, CHUGSPLASH, and RESOLVED. But none of these match our Proxy. If we decide to use ProxyAdmin, we'd have add support of our type of Proxy or implement their Proxy.sol and change the addresses of our main contract proxies.
We might be able to swap out the proxies when migrating the existing state to cel2. Not sure if this is a reasonable thing to do, but it should be possible and would allow us to keep the existing proxy addresses.
On Optimism Most contracts are proxied and the proxies are managed by the ProxyAdmin contract. In contrast to the Celo Registry contract, no names are given to the contracts which could be used to look up a specific contract. Instead, contracts are assigned a fixed address in the 0x42000000000000000000000000000000000000xx range. All addresses in this range are reserved for the OP-stack by deploying a proxy at each address within this range.
If we want to use OP’s ProxyAdmin instead of our CeloRegistry, we would at least have to provide a contract at the old Celo Registry’s address the resolves name lookups to the new fixed proxy addresses. Other points to check:
initialize
method in OP contracts.The text was updated successfully, but these errors were encountered: