Since ENS will be undergoing additional upgrades, it'll be useful if we put OfferingRegistry behind proxy contract, so its address stays the same even if we need to update the code. OfferingRegistry is responsible for firing all NameBazaar events, so being able to listen to just 1 address is very handy.
In our other project we use MutableForwarder.sol, which is just like regular Forwarder except its target can be changed by authorised address.
So, during deployment we'll first deploy OfferingRegistry, then we deploy MutableForwarder with its target being OfferingRegistry address. In smart_contracts.cljs, :offering-registry will be address of MutableForwarder. Also, anywhere in deployment code, where we pass OfferingRegistry address to other contracts, we should pass MutableForwarder address.
So later in future, if we need to update OfferingRegistry code, we'll deploy new OfferingRegistry and then call setTarget on existing MutableForwarder with the new address. Of course OfferingRegistry updates will need to be append-only, otherwise existing state could get messed up.
Since ENS will be undergoing additional upgrades, it'll be useful if we put OfferingRegistry behind proxy contract, so its address stays the same even if we need to update the code. OfferingRegistry is responsible for firing all NameBazaar events, so being able to listen to just 1 address is very handy.
In our other project we use MutableForwarder.sol, which is just like regular Forwarder except its target can be changed by authorised address.
So, during deployment we'll first deploy OfferingRegistry, then we deploy MutableForwarder with its target being OfferingRegistry address. In smart_contracts.cljs,
:offering-registry
will be address of MutableForwarder. Also, anywhere in deployment code, where we pass OfferingRegistry address to other contracts, we should pass MutableForwarder address.So later in future, if we need to update OfferingRegistry code, we'll deploy new OfferingRegistry and then call
setTarget
on existing MutableForwarder with the new address. Of course OfferingRegistry updates will need to be append-only, otherwise existing state could get messed up.