Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Move.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[move]
version = 3
manifest_digest = "CA4194823C2E420A1E3C0661B2068828DEAA75C7EDFE95E3D9615CBA105910FE"
manifest_digest = "39619702534A23FB87C53C9C8C1BA2371DD54DD31FA14797727E0B531916289A"
deps_digest = "F9B494B64F0615AED0E98FC12A85B85ECD2BC5185C22D30E7F67786BB52E507C"

dependencies = [
Expand All @@ -14,7 +14,7 @@ dependencies = [

[[move.package]]
id = "Bridge"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "2cde80b5766b0bc2073908e10f6e3c81c93fd691", subdir = "crates/sui-framework/packages/bridge" }
source = { git = "https://github.com/MystenLabs/sui.git", rev = "4e8b6eda7d6411d80c62f39ac8a4f028e8d174c4", subdir = "crates/sui-framework/packages/bridge" }

dependencies = [
{ id = "MoveStdlib", name = "MoveStdlib" },
Expand All @@ -24,26 +24,26 @@ dependencies = [

[[move.package]]
id = "MoveStdlib"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "2cde80b5766b0bc2073908e10f6e3c81c93fd691", subdir = "crates/sui-framework/packages/move-stdlib" }
source = { git = "https://github.com/MystenLabs/sui.git", rev = "4e8b6eda7d6411d80c62f39ac8a4f028e8d174c4", subdir = "crates/sui-framework/packages/move-stdlib" }

[[move.package]]
id = "Sui"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "2cde80b5766b0bc2073908e10f6e3c81c93fd691", subdir = "crates/sui-framework/packages/sui-framework" }
source = { git = "https://github.com/MystenLabs/sui.git", rev = "4e8b6eda7d6411d80c62f39ac8a4f028e8d174c4", subdir = "crates/sui-framework/packages/sui-framework" }

dependencies = [
{ id = "MoveStdlib", name = "MoveStdlib" },
]

[[move.package]]
id = "SuiSystem"
source = { git = "https://github.com/MystenLabs/sui.git", rev = "2cde80b5766b0bc2073908e10f6e3c81c93fd691", subdir = "crates/sui-framework/packages/sui-system" }
source = { git = "https://github.com/MystenLabs/sui.git", rev = "4e8b6eda7d6411d80c62f39ac8a4f028e8d174c4", subdir = "crates/sui-framework/packages/sui-system" }

dependencies = [
{ id = "MoveStdlib", name = "MoveStdlib" },
{ id = "Sui", name = "Sui" },
]

[move.toolchain-version]
compiler-version = "1.55.0"
compiler-version = "1.58.1"
edition = "2024"
flavor = "sui"
3 changes: 2 additions & 1 deletion sources/skip_list.move
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module move_stl::skip_list {
#[allow(unused_const)]
const ESkipListIsEmpty: u64 = 4;
const EInvalidListP: u64 = 5;

const EInvalidMaxLevel: u64 = 6;
/// The skip list.
public struct SkipList<phantom V: store> has key, store {
/// The id of this skip list.
Expand Down Expand Up @@ -49,6 +49,7 @@ module move_stl::skip_list {
/// Create a new empty skip list.
public fun new<V: store>(max_level: u64, list_p: u64, seed: u64, ctx: &mut TxContext): SkipList<V> {
assert!(list_p > 1, EInvalidListP);
assert!(max_level > 0, EInvalidMaxLevel);
let list = SkipList<V> {
id: object::new(ctx),
head: vector::empty(),
Expand Down
2 changes: 2 additions & 0 deletions sources/skip_list_u128.move
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ module move_stl::skip_list_u128 {
const ENodeDoesNotExist: u64 = 1;
const ESkipListNotEmpty: u64 = 3;
const EInvalidListP: u64 = 4;
const EInvalidMaxLevel: u64 = 5;

/// The skip list.
public struct SkipList<V: store> has key, store{
Expand Down Expand Up @@ -46,6 +47,7 @@ module move_stl::skip_list_u128 {
/// Create a new empty skip list.
public fun new<V: store>(max_level: u64, list_p: u64, seed: u64, ctx: &mut TxContext): SkipList<V> {
assert!(list_p > 1, EInvalidListP);
assert!(max_level > 0, EInvalidMaxLevel);
let list = SkipList<V> {
id: object::new(ctx),
head: vector::empty(),
Expand Down