Skip to content

Add Savings Vault negative-path tests #489

Description

@El-swaggerito

Description

Difficulty: Expert

Type: Test

Summary

Add negative-path tests for the Savings Vault contract.

Current Behaviour

Vault tests may focus on successful deposit and withdrawal flows while missing invalid or unauthorised cases.

Expected Behaviour

The test suite should cover invalid deposit amounts, early withdrawals, unauthorised access, missing initialisation, and invalid lock states.

Suggested Implementation

Create negative-path tests, assert expected errors, and verify state remains unchanged after failure.

Files or Areas Likely Affected

  • contracts/
  • src/
  • tests/
  • docs/

Acceptance Criteria

  • Invalid deposit amount tests are added.
  • Early withdrawal tests are added.
  • Unauthorised access tests are added.
  • Missing initialisation tests are added where applicable.
  • State consistency after failures is verified.
  • Docs reference negative-path coverage.

Additional Notes

This makes contract PRs more evaluation-ready.

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked for GrantFox OSS contributionMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Official GrantFox campaign labelcontractSmart contract related workexpertExpert difficultysorobanSoroban smart contract worktestTesting workvaultVault related work

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions