monorepo
monorepo copied to clipboard
Improve root message handling and interface
- Added immutable flag
IS_HUBset on instantiation. - Renamed
sendMessage/receiveMessagetosendRoot/receiveRootto make interface less confusing (we already haveprocessmethods) - Renamed related events as well.
sendRoottakes no arguments and just sends the currentoutboundRoot- Virtual method
_receiveRoot, which should be implemented by the specific <Domain>Connector, now returns the new updated root (bytes32).receiveRootcalls internal_receiveRoot, sets theaggregateRootto the returned value, and ifIS_HUBis true, will also update the RootManager (by callingsetOutboundRoot(mirrorDomain, aggregateRoot)) - Added method
propagateRootwhich can only be called byRootManageron the hub chain (i.e. ifIS_HUBis true)