Skip to content

Commit ffb2292

Browse files
author
cetus-developer
committed
Fix checked_shlw in math_u256 module
1 parent 4029e47 commit ffb2292

File tree

5 files changed

+33
-16
lines changed

5 files changed

+33
-16
lines changed

LICENSE

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,20 @@ MIT License
22

33
Copyright (C) Cetus Protocol
44

5-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
611

7-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
814

9-
10-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

aptos/sources/math_u256.move

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module integer_mate::math_u256 {
1616
}
1717

1818
public fun checked_shlw(n: u256): (u256, bool) {
19-
let mask = 0xffffffffffffffff << 192;
19+
let mask = 1 << 192;
2020
if (n > mask) {
2121
(0, true)
2222
} else {

sui/Move.lock

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,26 @@
11
# @generated by Move, please check-in and do not edit manually.
22

33
[move]
4-
version = 0
5-
4+
version = 3
5+
manifest_digest = "ADD4BFD5C6C285E58CCFC58C9BC3CA86C5FD4C34D46957098489063983AB5B24"
6+
deps_digest = "F8BBB0CCB2491CA29A3DF03D6F92277A4F3574266507ACD77214D37ECA3F3082"
67
dependencies = [
7-
{ name = "Sui" },
8+
{ id = "Sui", name = "Sui" },
89
]
910

1011
[[move.package]]
11-
name = "MoveStdlib"
12-
source = { git = "https://github.com/MystenLabs/sui.git", rev = "mainnet-v1.6.3", subdir = "crates/sui-framework/packages/move-stdlib" }
12+
id = "MoveStdlib"
13+
source = { git = "https://github.com/MystenLabs/sui.git", rev = "mainnet-v1.48.2", subdir = "crates/sui-framework/packages/move-stdlib" }
1314

1415
[[move.package]]
15-
name = "Sui"
16-
source = { git = "https://github.com/MystenLabs/sui.git", rev = "mainnet-v1.6.3", subdir = "crates/sui-framework/packages/sui-framework" }
16+
id = "Sui"
17+
source = { git = "https://github.com/MystenLabs/sui.git", rev = "mainnet-v1.48.2", subdir = "crates/sui-framework/packages/sui-framework" }
1718

1819
dependencies = [
19-
{ name = "MoveStdlib" },
20+
{ id = "MoveStdlib", name = "MoveStdlib" },
2021
]
22+
23+
[move.toolchain-version]
24+
compiler-version = "1.48.2"
25+
edition = "2024"
26+
flavor = "sui"

sui/Move.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
# -------------------------------
33
[package]
44
name = "IntegerMate"
5-
version = "1.1.0"
5+
version = "1.1.1"
66
published-at = "0x3de9f4bb29f04331986700afb5ae7f760b3f3b76c5bae9a844bc8f55794baa58"
77

88
[dependencies]
9-
Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "mainnet-v1.6.3" }
9+
Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "mainnet-v1.48.2" }
1010

1111
[addresses]
1212
integer_mate = "0x714a63a0dba6da4f017b42d5d0fb78867f18bcde904868e51d951a5a6f5b7f57"

sui/sources/math_u256.move

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module integer_mate::math_u256 {
1616
}
1717

1818
public fun checked_shlw(n: u256): (u256, bool) {
19-
let mask = 0xffffffffffffffff << 192;
19+
let mask = 1 << 192;
2020
if (n > mask) {
2121
(0, true)
2222
} else {

0 commit comments

Comments
 (0)