Ton-Dynasty / ticton-v0

Innovative price oracle for TON
https://ticton.xyz
7 stars 1 forks source link

Test: cover more complex senario #12

Closed alan890104 closed 7 months ago

alan890104 commented 7 months ago

We need to carry out a step-by-step test under the following scenario:

  1. Assume an existing alarm with ID 10, where both base_asset_scale and quote_asset_scale are set to 2. (remain_scale: 2)
  2. timeKeeper A invokes the wind method on alarm 10, reducing base_asset_scale to 1 and elevating quote_asset_scale to 3. (remain_scale: 1)
  3. Subsequently, timeKeeper B also triggers the wind method for alarm 10, this time elevating base_asset_scale back to 2 and reducing quote_asset_scale to 2. (remain_scale: 0)
  4. When timeKeeper C attempts to engage the wind method on alarm 10, the operation fails due to a remaining scale of 0.
alan890104 commented 7 months ago

@ipromise2324 needs your help

ipromise2324 commented 7 months ago

@ipromise2324 needs your help

ok! I will test this scenario.

ipromise2324 commented 7 months ago

After writing test about issue12, the operation fail as it should be.(Due to remain_scale of alarm10 is 0). Please @alan890104 and @WaterSo0910 review this test case