We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4b294ac + 057bd12 commit db623f6Copy full SHA for db623f6
content/contracts-sui/1.x/index.mdx
@@ -46,19 +46,19 @@ Create `sources/quickstart.move`:
46
```move
47
module my_sui_app::quickstart;
48
49
-use openzeppelin_math::{rounding, u64};
50
-use std::option;
+use openzeppelin_math::rounding;
+use openzeppelin_math::u64::{mul_div, sqrt};
51
52
// === Functions ===
53
54
public fun quote_with_fee(amount: u64): u64 {
55
// 2.5% fee, rounded to nearest.
56
- let quoted = amount.mul_div(1025u64, 1000u64, rounding::nearest());
+ let quoted = mul_div(amount,1025u64, 1000u64, rounding::nearest());
57
quoted.destroy_some()
58
}
59
60
public fun sqrt_floor(value: u64): u64 {
61
- value.sqrt(rounding::down())
+ sqrt(value, rounding::down())
62
63
```
64
0 commit comments