The Celeste manifest is not directly integrated with Celeste. In combination with the Disputable base contract however it represents a good standard on how to implement access control for evidence submission. The manifest implements a simple representative system: users can set addresses which are allowed to submit evidence on their behalf in any compatible disputes where they are the challenger / defendant. This is similar to how a lawyer will argue on your behalf in a court of law. The idea behind this is that in the future one may engage actual lawyer like professionals who will argue your case in a Celeste dispute.
By default no one can arbitrarily set anyone else as their representative. The potential representative must first enable clients by using the allowRepresentation method on the manifest.
If you use the Disputable base class you'll by default be using the manifest and will not have to worry about integrating with it. Regardless the manifest itself is documented here to help with integrations, whether it be on the frontend side or via custom smart contract integrations.
ArbitratorManifest API
Constructor
constructor(address)
Parameters:
address _disputeManager:
the address of the disputeManager instance.
Properties and Getters
disputeManager() -> (address)
Return values:
address disputeManager_:
The address of the Dispute Manager that the Manifest uses to verify which address is the subject of a certain dispute
isRepOf(address, address) -> (bool)
Parameters:
address _client:
account which is to be represented
address _representative:
potential account that may represent the client
Return values:
bool isRep:
whether the given _representative can current represent the given _client. By default false.
canRepresent(address, address) -> (bool)
Parameters:
address _representative:
potential account that may have recused itself in respect to the given client
address _client:
account which may be blocked from being represented by the given _representative
Return values:
bool allowed:
whether the given _representative has allowed the given _client to be its representative.
defendantOf(uint256) -> (address)
Parameters:
uint256 _disputeId
Return values:
address defendant:
the defendant of the given dispute. Zero address if the dispute does not exist or the dispute subject has not set a defendant in the manifest.
challengerOf(uint256) -> (address)
Parameters:
uint256 _disputeId
Return values:
address challenger:
the challenger of the given dispute. Zero address if the dispute does not exist or the dispute subject has not set a challenger in the manifest.
address _submitter:
address which wants to submit evidence
uint256 _depositId:
the deposit for which the submitter wants to submit evidence
Return values:
bool canSubmit:
whether the _submitter address is allowed to submit evidence for the given dispute.
address submittingFor:
address for which the evidence is being submitted.
General function
Returns true for canSubmit if:
the _submitter is the defendant or challenger for the given dispute
OR the _submitter is a representative of ONLY one of the two
submittingFor is always either the address of the defendant or challenger regardless if _submitter is the actual party or the representative
canSubmitEvidenceFor() returning true for a certain _submitter is not a guarantee that that address will be able to submit evidence through the subject of the dispute as it's up to the implementation of the subject contract whether it enforces this logic.
If a subject contract uses the Disputable base contract and does not substantially override the logic of the inherited submitEvidenceFor method it will automatically enforce this access restriction by querying the manifest.
Methods
setPartiesOf(uint256, address, address) -> ()
Parameters:
uint256 _disputeId:
dispute for which to set defendant and challenger
address _defendant:
address to be registered as defendant of dispute
address _challenger:
address to be registered as challenger of the dispute
Emitted events:
PartiesSet(uint256 indexed disputeId, address indexed defendant, address indexed challenger): emitted with method parameters if the method successfully runs
General function
Registers _defendant and _challenger for the dispute. Reverts if the caller is not the subject of the dispute, this prevents arbitrary addresses from overriding the defendant and challenger.
setRepStatus(address, bool) -> ()
Parameters:
uint256 _rep:
address for which the representative status is to be changed
bool _isActive:
whether the caller wants to set the representative as active or not
Emitted events:
RepStateSet(address indexed client, address indexed rep, bool isActive):
emitted with method parameters and the msg.sender as client if the method successfully runs
General function
Sets the representative status of the _rep for the msg.sender. Reverts if trying to set to active (true) but canRepresent for the client representative pair is false.
allowRepresentation(address, bool) -> ()
Parameters:
uint256 _client:
address of client for which the caller will set the allow representation status
bool _allow:
whether the caller wants to allow representation of _client
Emitted events:
AllowRepresentation(address indexed rep, address indexed client, bool allowed):
emitted with method parameters and the msg.sender as rep
RepStateSet(address indexed client, address indexed rep, bool isActive):
emitted with method parameters and the msg.sender as rep if representation allowance is being set to false
General function
Sets the representation allowance of the caller for a certain potential or existing client. If set to false may reset existing representation to inactive.