monorepo icon indicating copy to clipboard operation
monorepo copied to clipboard

Improve root message handling and interface

Open jakekidd opened this issue 3 years ago • 0 comments

  • Added immutable flag IS_HUB set on instantiation.
  • Renamed sendMessage / receiveMessage to sendRoot / receiveRoot to make interface less confusing (we already have process methods)
  • Renamed related events as well.
  • sendRoot takes no arguments and just sends the current outboundRoot
  • Virtual method _receiveRoot, which should be implemented by the specific <Domain>Connector, now returns the new updated root (bytes32). receiveRoot calls internal _receiveRoot, sets the aggregateRoot to the returned value, and if IS_HUB is true, will also update the RootManager (by calling setOutboundRoot(mirrorDomain, aggregateRoot))
  • Added method propagateRoot which can only be called by RootManager on the hub chain (i.e. if IS_HUB is true)

jakekidd avatar Aug 11 '22 00:08 jakekidd