Skip to Content
Tobin Docs

Errors

Contract and token error codes as defined in the SDK.

Source: packages/mvp1-sdk/src/sdk/errors.ts.

Clearing contract

CodeNameMeaning
1SessionNotFoundThere is no session with this id.
2SessionExistsA session with this id already exists; ids are never reused.
3WrongStateThe action is not allowed in the session's current state.
4NotParticipantThe account is not an admitted participant.
5NoProposalThere is no settlement proposal yet.
6MissingApprovalNot every admitted participant has approved the current proposal.
10TooManyParticipantsThe participant capacity is reached.
11ParticipantExistsThe account is already admitted.
12BadAddressKindOnly account (G...) and contract (C...) addresses are accepted; the token must be a contract.
13BadCapacityCapacities must be 2 to 4 participants and 1 to 16 obligations.
20TooManyObligationsThe obligation capacity is reached.
21DuplicateObligationAn obligation with this id already exists.
22BadAmountAn amount must be greater than zero.
23SamePartyDebtor and creditor must differ.
24UnknownPartyAn account named is not an admitted participant.
25ObligationNotFoundThere is no obligation with this id.
30TooFewParticipantsAt least two participants are needed to finalize.
31NoObligationsThere is no obligation to finalize.
33TooManyInstructionsThe plan has more instructions than the ceiling.
34InstructionOrderInstructions must be strictly ascending by payer, then payee.
35InstructionSelfPayAn instruction cannot pay an account to itself.
36FlowMismatchThe instructions do not realise every net position exactly.
37OffsettingFlowsA participant would both pay and receive.
38OverflowAn amount or sum is outside the i128 range.
40DigestMismatchThe digest is not the current proposal digest.
50AlreadySettledThe session is already settled.
90CorruptStateAn integrity check failed; the contract failed closed.

Token contract

CodeNameMeaning
101BadAmountAn amount must be greater than zero.
102InsufficientBalanceA balance is too low; a whole settlement is reverted.
103CapExceededMinting would exceed the supply cap.
104OverflowArithmetic overflow.
105BadCapInvalid cap.

SDK error kinds

TobinError.kind is one of contract, token, auth, host, transport or policy. A policy error is a refusal by the SDK itself before any call (for example, sending one settlement authorisation round twice).

On this page