Skip to content

Self contained tests for each contract #10

@KohliSuraj

Description

@KohliSuraj

Currently the deployment script uses basic 'assert' statements to validate certain conditions while deploying.

We'll have to write proper unit tests for each solidity contract (especially the ones which are not from openzeppelin), to test the external smart contract API calls (i.e. public functions) as well as have some integration tests to validate certain scenarios for Sumero V1.

Example:

ClayBonds.sol
Unit Tests

  • Test issue() function
  • Test CLAY balance of Clay Bonds contract
  • Test zCLAY balance of user issuing
  • Test claim() function after maturity

Integration Test Example

  • User swaps USDC for CLAY using 'Trade' Tab

  • User deposits CLAY to issue a zCLAY Bond

  • User mints new synthetic asset using 'Mint' Tab

  • User increases the collaterization ratio on the EMP

  • User swaps USDC for CLAY using 'Trade' Tab

  • User provides liquidity to the USDC-CLAY pool and gets LP tokens in return

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions