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.disputeManager
isRepOf
canRepresent
defendantOf
challengerOf
canSubmitEvidenceFor
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
bool allowed
: whether the given_representative
has allowed the given_client
to be its representative.
address _submitter
: address which wants to submit evidenceuint256 _depositId
: the deposit for which the submitter wants to submit evidence
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.
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 representativecanSubmitEvidenceFor()
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. setPartiesOf
setRepStatus
allowRepresentation
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
PartiesSet(uint256 indexed disputeId, address indexed defendant, address indexed challenger)
: emitted with method parameters if the method successfully runs
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.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
RepStateSet(address indexed client, address indexed rep, bool isActive)
: emitted with method parameters and themsg.sender
as client if the method successfully runs
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
.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
AllowRepresentation(address indexed rep, address indexed client, bool allowed)
: emitted with method parameters and themsg.sender
as repRepStateSet(address indexed client, address indexed rep, bool isActive)
: emitted with method parameters and themsg.sender
as rep if representation allowance is being set tofalse
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 modified 1yr ago