Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Improve Unit Test Coverage for Smart Contracts #213

Open
19 tasks
LyonSsS opened this issue Jan 15, 2024 · 0 comments
Open
19 tasks

Improve Unit Test Coverage for Smart Contracts #213

LyonSsS opened this issue Jan 15, 2024 · 0 comments

Comments

@LyonSsS
Copy link

LyonSsS commented Jan 15, 2024

Based on https://app.zenhub.com/workspaces/sygma-qa-655233316c6d7b210574d005/issues/zh/12 we identified some new scenarios that can be added to the Solidity Unit tests to improve coverage.

Bridge

  • Fail to be paused Bridge by non admin
  • Fail to be unpaused by non admin
  • Fail to trigger KeyRefresh by admin with incorrect hash
  • Fail to setResource by non Admin
  • Replace Unit tests for PermissionedGenericMessage with PermisionlessGenericMessage ones
  • Fail to Withdraw as NonAdmin
  • Pause Bridge and try some actions like Deposit, Execute Proposal, Withdraw, which should fail.
  • Change Admin AcessControl and try to use Admin functions with the new Admin AND to fail with
    the old Admin

ERC20

  • Deposit with an incorrect resource ID ( notmapped to the handler) should be reverted
  • Deposit to an unmapped dest domain ID should be reverted

Generic

  • Deposit Genric with an incorrect resource ID ( notmapped to the handler) should be reverted
  • Deposit generic to an unmapped dest domain ID should be reverted

Execute Proposals

  • Extend test to GMP execution also

PercentageFeeHandler

  • Set whitelist
  • Unset whitelist
  • Check to not take fee for whitelist
  • Check to fail if not adding fee and for non Whitelisted
  • Check to not take fee, if fee added & Whitelisted
  • Check to request Fee if it was set from Whitelisted to NonWhitelisted
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant