Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split staking 3 #64

Merged
merged 12 commits into from Aug 1, 2019
Next

WIP: Court: shrink error messages

  • Loading branch information
bingen committed Jul 11, 2019
commit ba6208f3c09505396cb3d9c1bec7b5615541493e
@@ -124,37 +124,37 @@ contract Court is ERC900, ApproveAndCallFallBack, ICRVotingOwner, ISubscriptions
mapping (uint64 => Term) public terms;
Dispute[] public disputes;

string internal constant ERROR_INVALID_ADDR = "COURT_INVALID_ADDR";
string internal constant ERROR_DEPOSIT_FAILED = "COURT_DEPOSIT_FAILED";
string internal constant ERROR_ZERO_TRANSFER = "COURT_ZERO_TRANSFER";
string internal constant ERROR_TOO_MANY_TRANSITIONS = "COURT_TOO_MANY_TRANSITIONS";
string internal constant ERROR_UNFINISHED_TERM = "COURT_UNFINISHED_TERM";
string internal constant ERROR_PAST_TERM_FEE_CHANGE = "COURT_PAST_TERM_FEE_CHANGE";
string internal constant ERROR_INVALID_ACCOUNT_STATE = "COURT_INVALID_ACCOUNT_STATE";
string internal constant ERROR_TOKENS_BELOW_MIN_STAKE = "COURT_TOKENS_BELOW_MIN_STAKE";
string internal constant ERROR_JUROR_TOKENS_AT_STAKE = "COURT_JUROR_TOKENS_AT_STAKE";
string internal constant ERROR_BALANCE_TOO_LOW = "COURT_BALANCE_TOO_LOW";
string internal constant ERROR_OVERFLOW = "COURT_OVERFLOW";
string internal constant ERROR_TOKEN_TRANSFER_FAILED = "COURT_TOKEN_TRANSFER_FAILED";
string internal constant ERROR_ROUND_ALREADY_DRAFTED = "COURT_ROUND_ALREADY_DRAFTED";
string internal constant ERROR_NOT_DRAFT_TERM = "COURT_NOT_DRAFT_TERM";
string internal constant ERROR_TERM_RANDOMNESS_NOT_YET = "COURT_TERM_RANDOMNESS_NOT_YET";
string internal constant ERROR_WRONG_TERM = "COURT_WRONG_TERM";
string internal constant ERROR_TERM_RANDOMNESS_UNAVAIL = "COURT_TERM_RANDOMNESS_UNAVAIL";
string internal constant ERROR_SORTITION_LENGTHS_MISMATCH = "COURT_SORTITION_LENGTHS_MISMATCH";
string internal constant ERROR_INVALID_DISPUTE_STATE = "COURT_INVALID_DISPUTE_STATE";
string internal constant ERROR_INVALID_ADJUDICATION_ROUND = "COURT_INVALID_ADJUDICATION_ROUND";
string internal constant ERROR_INVALID_ADJUDICATION_STATE = "COURT_INVALID_ADJUDICATION_STATE";
string internal constant ERROR_INVALID_JUROR = "COURT_INVALID_JUROR";
// TODO: string internal constant ERROR_INVALID_DISPUTE_CREATOR = "COURT_INVALID_DISPUTE_CREATOR";
string internal constant ERROR_SUBSCRIPTION_NOT_PAID = "COURT_SUBSCRIPTION_NOT_PAID";
string internal constant ERROR_INVALID_RULING_OPTIONS = "COURT_INVALID_RULING_OPTIONS";
string internal constant ERROR_CONFIG_PERIOD_ZERO_TERMS = "COURT_CONFIG_PERIOD_ZERO_TERMS";
string internal constant ERROR_PREV_ROUND_NOT_SETTLED = "COURT_PREV_ROUND_NOT_SETTLED";
string internal constant ERROR_ROUND_ALREADY_SETTLED = "COURT_ROUND_ALREADY_SETTLED";
string internal constant ERROR_ROUND_NOT_SETTLED = "COURT_ROUND_NOT_SETTLED";
string internal constant ERROR_JUROR_ALREADY_REWARDED = "COURT_JUROR_ALREADY_REWARDED";
string internal constant ERROR_JUROR_NOT_COHERENT = "COURT_JUROR_NOT_COHERENT";
string internal constant ERROR_INVALID_ADDR = "CTINVALID_ADDR";
string internal constant ERROR_DEPOSIT_FAILED = "CTDEPOSIT_FAILED";
string internal constant ERROR_ZERO_TRANSFER = "CTZERO_TRANSFER";
string internal constant ERROR_TOO_MANY_TRANSITIONS = "CTTOO_MANY_TRANSITIONS";
string internal constant ERROR_UNFINISHED_TERM = "CTUNFINISHED_TERM";
string internal constant ERROR_PAST_TERM_FEE_CHANGE = "CTPAST_TERM_FEE_CHANGE";
string internal constant ERROR_INVALID_ACCOUNT_STATE = "CTINVALID_ACCOUNT_STATE";
string internal constant ERROR_TOKENS_BELOW_MIN_STAKE = "CTTOKENS_BELOW_MIN_STAKE";
string internal constant ERROR_JUROR_TOKENS_AT_STAKE = "CTJUROR_TOKENS_AT_STAKE";
string internal constant ERROR_BALANCE_TOO_LOW = "CTBALANCE_TOO_LOW";
string internal constant ERROR_OVERFLOW = "CTOVERFLOW";
string internal constant ERROR_TOKEN_TRANSFER_FAILED = "CTTOKEN_TRANSFER_FAILED";
string internal constant ERROR_ROUND_ALREADY_DRAFTED = "CTROUND_ALREADY_DRAFTED";
string internal constant ERROR_NOT_DRAFT_TERM = "CTNOT_DRAFT_TERM";
string internal constant ERROR_TERM_RANDOMNESS_NOT_YET = "CTTERM_RANDOMNESS_NOT_YET";
string internal constant ERROR_WRONG_TERM = "CTWRONG_TERM";
string internal constant ERROR_TERM_RANDOMNESS_UNAVAIL = "CTTERM_RANDOMNESS_UNAVAIL";
string internal constant ERROR_SORTITION_LENGTHS_MISMATCH = "CTSORTITION_LENGTHS_MISMATCH";
string internal constant ERROR_INVALID_DISPUTE_STATE = "CTINVALID_DISPUTE_STATE";
string internal constant ERROR_INVALID_ADJUDICATION_ROUND = "CTINVALID_ADJUDICATION_ROUND";
string internal constant ERROR_INVALID_ADJUDICATION_STATE = "CTINVALID_ADJUDICATION_STATE";
string internal constant ERROR_INVALID_JUROR = "CTINVALID_JUROR";
// TODO: string internal constant ERROR_INVALID_DISPUTE_CREATOR = "CTINVALID_DISPUTE_CREATOR";
string internal constant ERROR_SUBSCRIPTION_NOT_PAID = "CTSUBSCRIPTION_NOT_PAID";
string internal constant ERROR_INVALID_RULING_OPTIONS = "CTINVALID_RULING_OPTIONS";
string internal constant ERROR_CONFIG_PERIOD_ZERO_TERMS = "CTCONFIG_PERIOD_ZERO_TERMS";
string internal constant ERROR_PREV_ROUND_NOT_SETTLED = "CTPREV_ROUND_NOT_SETTLED";
string internal constant ERROR_ROUND_ALREADY_SETTLED = "CTROUND_ALREADY_SETTLED";
string internal constant ERROR_ROUND_NOT_SETTLED = "CTROUND_NOT_SETTLED";
string internal constant ERROR_JUROR_ALREADY_REWARDED = "CTJUROR_ALREADY_REWARDED";
string internal constant ERROR_JUROR_NOT_COHERENT = "CTJUROR_NOT_COHERENT";

uint64 internal constant ZERO_TERM_ID = 0; // invalid term that doesn't accept disputes
uint64 internal constant MODIFIER_ALLOWED_TERM_TRANSITIONS = 1;
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.