Skip to content

Test Token Withdrawal #105

@mialbu

Description

@mialbu

Precondition: Deploy a simple NEP-17 token, register it in the bridge and allocate funds of the NEP-17 token to the bridge contract.

Successful

  • Use withdrawToken() with the deployed NEP-17 token and to as an EOA (not a contract) -> check event TokenWithdrawal
  • Use withdrawToken() with the deployed NEP-17 token and to a contract -> check event TokenClaimable
  • Use withdrawToken() with withdrawals that exceed the bridge's balance -> check event TokenClaimable
  • Check event GasWithdrawalRootUpdate for a successful withdrawal
  • Check updated root and nonce after a successful withdrawal

Invalid Cases

  • Fail to withdraw if token bridge is not registered
  • Fail to withdraw if withdrawals list parameter has size 0
  • Fail if first withdrawal in withdrawals list parameter has not the next nonce
  • Fail if withdrawals in withdrawals list parameter have no subsequent nonces
  • Fail if provided withdrawalRoot is not equal the computed new root
  • Fail if verifyValidatorSignatures() returns false (e.g., not enough signatures)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions