woonetwork/woofi_swap_smart_contracts

WooCheck

Closed this issue · 2 comments

WooGuardian 合约

  1. Interface IWooGuardian
  • checkSwapPrice(…) returns (bool)
  • checkSwapAmount(…) returns (bool)
  1. 实现类: WooGuardian is IWooGuardian
  2. WooPP里
  • 类似 setPool,需要加一个 setWooGuardian 的方法
  • 在交易相关的函数里调用 check

关于 swap 参数里,amount传入的参数是否需要限制?

e.g. 比如 btc 在 0.0001 ~ 1000
e.g. 比如 woo 在 1 ~ 1000000

不知道是否需要先把用户参数限制在一个合理范围,然后对于此范围我们可以更好的做全面的 unit tests。

All planned as features will be added into WooGuardian.