Skip to content

Commit db623f6

Browse files
authored
Merge pull request #135 from ericnordelo/fix/sui-overview-example
Fix Sui overview example
2 parents 4b294ac + 057bd12 commit db623f6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

content/contracts-sui/1.x/index.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,19 @@ Create `sources/quickstart.move`:
4646
```move
4747
module my_sui_app::quickstart;
4848
49-
use openzeppelin_math::{rounding, u64};
50-
use std::option;
49+
use openzeppelin_math::rounding;
50+
use openzeppelin_math::u64::{mul_div, sqrt};
5151
5252
// === Functions ===
5353
5454
public fun quote_with_fee(amount: u64): u64 {
5555
// 2.5% fee, rounded to nearest.
56-
let quoted = amount.mul_div(1025u64, 1000u64, rounding::nearest());
56+
let quoted = mul_div(amount,1025u64, 1000u64, rounding::nearest());
5757
quoted.destroy_some()
5858
}
5959
6060
public fun sqrt_floor(value: u64): u64 {
61-
value.sqrt(rounding::down())
61+
sqrt(value, rounding::down())
6262
}
6363
```
6464

0 commit comments

Comments
 (0)