Description
Implement the POST /settlements endpoint that proposes a new settlement. The endpoint validates the signer is an authorized settlement signer, confirms the token is on the treasury allowlist, validates the amount, and submits propose_settlement to Soroban RPC.
Requirements and context
- Validate signer is an authorized settlement signer
- Confirm the requested token contract address is on the treasury allowlist
- Validate amount is positive and within acceptable bounds
- Call propose_settlement on the settlement contract via Soroban RPC
- Return settlement ID, initial status, and transaction hash on success
- Follow existing project conventions
Suggested execution
- Fork the repo and create a branch
git checkout -b feat/backend-post-settlements
- Implement changes
- Test and commit
Example commit message
feat: add backend REST endpoint POST /settlements
Guidelines
- Assignment required before starting
- PR description must include:
Closes #[issue_id]
- Keep PR description professional and detailed
Description
Implement the POST /settlements endpoint that proposes a new settlement. The endpoint validates the signer is an authorized settlement signer, confirms the token is on the treasury allowlist, validates the amount, and submits propose_settlement to Soroban RPC.
Requirements and context
Suggested execution
Example commit message
feat: add backend REST endpoint POST /settlementsGuidelines
Closes #[issue_id]