kleros / kleros-v2

Kleros version 2
https://v2.kleros.builders
MIT License
61 stars 43 forks source link

Event `Ruling` is redundant across IArbitrable and IArbitrator interfaces #1306

Open greenlucid opened 10 months ago

greenlucid commented 10 months ago

https://github.com/kleros/kleros-v2/blob/7f8be8eccf53f865fa85cbcab810110f974370d7/contracts/src/arbitration/interfaces/IArbitrableV2.sol#L31

https://github.com/kleros/kleros-v2/blob/7f8be8eccf53f865fa85cbcab810110f974370d7/contracts/src/arbitration/interfaces/IArbitratorV2.sol#L25

In order to simplify the IArbitrableV2 interface as possible, Ruling should be removed from it. If arbitrable frontends or systems are interested in whether a Ruling was given, they can opt to emit it voluntarily, or listen to the Ruling event on the arbitrator.

jaybuidl commented 10 months ago

For context:

IArbitrable: the Ruling event was present there in v1, so there's a backward compatibility aspect. Perhaps it doesn't have to be in the interface, but I suspect that many arbitrable apps find it useful, particularly if their ruling was given by an arbitrator on a different chain. We shouldn't expect a Polygon-native arbitrable frontend to necessarily have a connection to Arbitrum.

IArbitrator: the Ruling event was introduced there for the Court frontend (via the subgraph). Since v2 is cross-chain, it's much simpler for the frontend to track the Ruling event in 1 location on the arbitrator side rather than on the arbitrable side which might be on any foreign chain and any arbitrable address.