Celeste Manifest
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
Properties and Getters
canRepresent(address, address) -> (bool)
canRepresent(address, address) -> (bool)Parameters:
address _representative: potential account that may have recused itself in respect to the given clientaddress _client: account which may be blocked from being represented by the given_representative
Return values:
bool allowed: whether the given_representativehas allowed the given_clientto be its representative.
canSubmitEvidenceFor(address, uint256) -> (bool, address)
canSubmitEvidenceFor(address, uint256) -> (bool, address)Parameters:
address _submitter: address which wants to submit evidenceuint256 _depositId: the deposit for which the submitter wants to submit evidence
Return values:
bool canSubmit: whether the_submitteraddress 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
_submitteris the defendant or challenger for the given disputeOR the
_submitteris 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.
Methods
setPartiesOf(uint256, address, address) -> ()
setPartiesOf(uint256, address, address) -> ()Parameters:
uint256 _disputeId: dispute for which to set defendant and challengeraddress _defendant: address to be registered as defendant of disputeaddress _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) -> ()
setRepStatus(address, bool) -> ()Parameters:
uint256 _rep: address for which the representative status is to be changedbool _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 themsg.senderas 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) -> ()
allowRepresentation(address, bool) -> ()Parameters:
uint256 _client: address of client for which the caller will set the allow representation statusbool _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 themsg.senderas repRepStateSet(address indexed client, address indexed rep, bool isActive): emitted with method parameters and themsg.senderas rep if representation allowance is being set tofalse
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.
Last updated
Was this helpful?