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
1 change: 1 addition & 0 deletions sui/stable_farming/Move.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[package]
name = "Farming"
version = "1.2.0"
published-at = "0xb5d821af5d3d4d40f1f1890502d73e3d7f61edb75e664ff8e827fa01a006f39f"

[dependencies]
cetusclmm = { r.mvr = "@cetuspackages/clmm" }
Expand Down
183 changes: 81 additions & 102 deletions sui/vaults/Move.lock
Original file line number Diff line number Diff line change
@@ -1,104 +1,83 @@
# @generated by Move, please check-in and do not edit manually.
# Generated by move; do not edit
# This file should be checked in.

[move]
version = 3
manifest_digest = "FCCB83CB87B718F55706921DC4C4AB07A11B2334572935A743CBF14704276A96"
deps_digest = "397E6A9F7A624706DBDFEE056CE88391A15876868FD18A88504DA74EB458D697"
dependencies = [
{ id = "Bridge", name = "Bridge" },
{ id = "Farming", name = "Farming" },
{ id = "MoveStdlib", name = "MoveStdlib" },
{ id = "Sui", name = "Sui" },
{ id = "SuiSystem", name = "SuiSystem" },
]

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

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

[[move.package]]
id = "CetusClmm"
source = { git = "https://github.com/CetusProtocol/cetus-contracts.git", rev = "clmm-v14", subdir = "packages/cetus_clmm/" }

dependencies = [
{ id = "Bridge", name = "Bridge" },
{ id = "IntegerMate", name = "IntegerMate" },
{ id = "MoveSTL", name = "MoveSTL" },
{ id = "MoveStdlib", name = "MoveStdlib" },
{ id = "Sui", name = "Sui" },
{ id = "SuiSystem", name = "SuiSystem" },
]

[[move.package]]
id = "Farming"
source = { git = "https://github.com/CetusProtocol/cetus-clmm-interface.git", rev = "mainnet-v1.52.1", subdir = "sui/stable_farming" }

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

[[move.package]]
id = "IntegerMate"
source = { git = "https://github.com/CetusProtocol/integer-mate.git", rev = "mainnet-v1.3.0", subdir = "" }

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

[[move.package]]
id = "MoveSTL"
source = { git = "https://github.com/CetusProtocol/move-stl.git", rev = "mainnet-v1.3.0", subdir = "" }

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

[[move.package]]
id = "MoveStdlib"
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 = "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 = "4e8b6eda7d6411d80c62f39ac8a4f028e8d174c4", subdir = "crates/sui-framework/packages/sui-system" }

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

[move.toolchain-version]
compiler-version = "1.60.1"
edition = "2024"
flavor = "sui"

[env]

[env.mainnet]
chain-id = "35834a8a"
original-published-id = "0xd3453d9be7e35efe222f78a810bb3af1859fd1600926afced8b4936d825c9a05"
latest-published-id = "0xe1a137080f82faaee1225a2ed93df19b52181d6a93fca26c30e3122de4033930"
published-version = "13"
version = 4

[pinned.mainnet.CetusClmm]
source = { git = "https://github.com/CetusProtocol/cetus-contracts.git", subdir = "packages/cetus_clmm", rev = "a31283dd9e29d2b367f76d670ba704a2501de364" }
use_environment = "mainnet"
manifest_digest = "1E932E9C4C15B3E671C5AACEE3107A26421CD5F431977EB48BE64EF5BE1AD9CA"
deps = { IntegerMate = "IntegerMate", MoveSTL = "MoveSTL", std = "MoveStdlib", sui = "Sui" }

[pinned.mainnet.Farming]
source = { git = "https://github.com/CetusProtocol/cetus-clmm-interface.git", subdir = "sui/stable_farming", rev = "89ee106878d42133b3c121e4113c5c3ef01fa5bc" }
use_environment = "mainnet"
manifest_digest = "261273A43635775D5ACF495463EC2AB567360BCD8313AF2AC951552B112B2DD0"
deps = { cetusclmm = "CetusClmm", std = "MoveStdlib", sui = "Sui" }

[pinned.mainnet.IntegerMate]
source = { git = "https://github.com/CetusProtocol/integer-mate.git", subdir = ".", rev = "09a12d9b171122883d9350039d4ed6e8400033b9" }
use_environment = "mainnet"
manifest_digest = "E41BBD67BE8940D26C79D78B028477EF5B33BA217A1282C78ACB344CF8A5ECF6"
deps = { std = "MoveStdlib", sui = "Sui" }

[pinned.mainnet.MoveSTL]
source = { git = "https://github.com/CetusProtocol/move-stl.git", subdir = ".", rev = "0681fec63a310ae753d03a06f7c05d3e2925bb09" }
use_environment = "mainnet"
manifest_digest = "E41BBD67BE8940D26C79D78B028477EF5B33BA217A1282C78ACB344CF8A5ECF6"
deps = { std = "MoveStdlib", sui = "Sui" }

[pinned.mainnet.MoveStdlib]
source = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/move-stdlib", rev = "b9149cbf0b2cb9ae5ed830407a9b48c7ae3fd36c" }
use_environment = "mainnet"
manifest_digest = "C4FE4C91DE74CBF223B2E380AE40F592177D21870DC2D7EB6227D2D694E05363"
deps = {}

[pinned.mainnet.MoveStdlib_1]
source = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/move-stdlib", rev = "041c5f2bae2fe52079e44b70514333532d69f4e6" }
use_environment = "mainnet"
manifest_digest = "C4FE4C91DE74CBF223B2E380AE40F592177D21870DC2D7EB6227D2D694E05363"
deps = {}

[pinned.mainnet.Pyth]
source = { git = "https://github.com/pyth-network/pyth-crosschain.git", subdir = "target_chains/sui/contracts", rev = "3bd1262dcba9518a6901aa6a15f04072799bfb37" }
use_environment = "mainnet"
manifest_digest = "F2C5AF85C4B72C8F6A8132D05DE4F787F4EB80DBFF812331ED65AE599E7DF92A"
deps = { Sui = "Sui_1", Wormhole = "Wormhole" }

[pinned.mainnet.PythProCompatible]
source = { git = "https://github.com/pyth-network/pyth-crosschain.git", subdir = "target_chains/sui/contracts", rev = "aa291266173173480efef77b9454f2dbc2b4fd62" }
use_environment = "mainnet"
manifest_digest = "3D2B5BBF2058F3C9DCA3527CC2486C518124687B60479CA9875E5475652B7BBC"
deps = { Sui = "Sui_1", WormholeSimpleMajority = "WormholeSimpleMajority" }

[pinned.mainnet.Sui]
source = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "b9149cbf0b2cb9ae5ed830407a9b48c7ae3fd36c" }
use_environment = "mainnet"
manifest_digest = "CD547CB1ACCE0880C835DAED2D8FFCB91D56C833AE5240D3AA5B918398263195"
deps = { MoveStdlib = "MoveStdlib" }

[pinned.mainnet.Sui_1]
source = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "041c5f2bae2fe52079e44b70514333532d69f4e6" }
use_environment = "mainnet"
manifest_digest = "CD547CB1ACCE0880C835DAED2D8FFCB91D56C833AE5240D3AA5B918398263195"
deps = { MoveStdlib = "MoveStdlib_1" }

[pinned.mainnet.Wormhole]
source = { git = "https://github.com/wormhole-foundation/wormhole.git", subdir = "sui/wormhole", rev = "b71be5cbb9537c4aac8e23e74371affa3825efcd" }
use_environment = "mainnet"
manifest_digest = "0D766A0380B75080707CFA6099AF469A2E502B0D9DC334A9E9983B391C5555D9"
deps = { Sui = "Sui_1" }

[pinned.mainnet.WormholeSimpleMajority]
source = { git = "https://github.com/pyth-network/pyth-crosschain.git", subdir = "target_chains/sui/vendor/wormhole_simple_majority/wormhole", rev = "aa291266173173480efef77b9454f2dbc2b4fd62" }
use_environment = "mainnet"
manifest_digest = "0D766A0380B75080707CFA6099AF469A2E502B0D9DC334A9E9983B391C5555D9"
deps = { Sui = "Sui_1" }

[pinned.mainnet.vaults]
source = { root = true }
use_environment = "mainnet"
manifest_digest = "279D49BE893CDF895CCF2C1EB6D604B7813A4DB1565880216B486543A9C8C61A"
deps = { cetus_clmm = "CetusClmm", farming = "Farming", integer_mate = "IntegerMate", move_stl = "MoveSTL", pyth = "Pyth", pyth_pro_compatible = "PythProCompatible", std = "MoveStdlib", sui = "Sui" }
24 changes: 17 additions & 7 deletions sui/vaults/Move.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
[package]
name = "vaults"
version = "1.2.0"
version = "mainnet-v1.33.0"
edition = "2024"
published-at = "0x9eeac6aa7bd9059fb61b26d031152c2d9e87f120f391aa58b54f4d23e7f52d05"

[dependencies]
Farming = { git = "https://github.com/CetusProtocol/cetus-clmm-interface.git", subdir = "sui/stable_farming", rev = "mainnet-v1.52.3" }
[dependencies.pyth]
git = "https://github.com/pyth-network/pyth-crosschain.git"
subdir = "target_chains/sui/contracts"
rev = "sui-contract-mainnet"

[addresses]
vaults = "0xd3453d9be7e35efe222f78a810bb3af1859fd1600926afced8b4936d825c9a05"
[dependencies.pyth_pro_compatible]
git = "https://github.com/pyth-network/pyth-crosschain.git"
subdir = "target_chains/sui/contracts"
rev = "sui-pro-compatible-contract-mainnet"
rename-from = "pyth"

[r.mvr]
network = "mainnet"
[dependencies]
farming = { git = "https://github.com/CetusProtocol/cetus-clmm-interface.git", subdir = "sui/stable_farming", rev = "mainnet-v1.52.3" }
cetus_clmm = { r.mvr = "@cetuspackages/clmm" }
integer_mate = { git = "https://github.com/CetusProtocol/integer-mate.git", rev = "mainnet-v1.3.0", override = true }
move_stl = { git = "https://github.com/CetusProtocol/move-stl.git", rev = "mainnet-v1.3.0", override = true }
9 changes: 9 additions & 0 deletions sui/vaults/Published.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Generated by Move
# This file contains metadata about published versions of this package in different environments
# This file SHOULD be committed to source control

[published.mainnet]
chain-id = "35834a8a"
published-at = "0x9eeac6aa7bd9059fb61b26d031152c2d9e87f120f391aa58b54f4d23e7f52d05"
original-id = "0xd3453d9be7e35efe222f78a810bb3af1859fd1600926afced8b4936d825c9a05"
version = 16
4 changes: 2 additions & 2 deletions sui/vaults/sources/acl.move
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ module vaults::acl {
const EMemberNotExists: u64 = 1;

/// @dev Maps addresses to `u128`s with each bit representing the presence of (or lack of) each role.
struct ACL has store {
public struct ACL has store {
permissions: LinkedTable<address, u128>
}

struct Member has store, drop, copy {
public struct Member has store, drop, copy {
address: address,
permission: u128
}
Expand Down
2 changes: 1 addition & 1 deletion sui/vaults/sources/fetcher.move
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module vaults::fetcher {


/// Events
struct LpTokenValueEvent has copy, drop {
public struct LpTokenValueEvent has copy, drop {
lp_amount: u64,
amount_a: u64,
amount_b: u64,
Expand Down
40 changes: 40 additions & 0 deletions sui/vaults/sources/oracle_registry.move
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#[allow(unused_type_parameter, unused_field, unused_const)]
module vaults::oracle_registry {

use std::type_name::TypeName;

use sui::object::{ID, UID};
use sui::table::Table;


public struct OracleRegistry has key {
id: UID,
prices: Table<TypeName, Price>,
coin_infos: Table<TypeName, CoinInfo>,
}

public struct Price has copy, drop, store {
price: u64,
decimal: u8,
last_update_time: u64,
}

public struct CoinInfo has drop, store {
price_feed_id: vector<u8>,
price_info_object_id: ID,
max_age: u64,
decimal: u8,
slippage: u64,
}

public struct CoinInfoPyth2Key has copy, drop, store {
coin_type: TypeName,
}

public fun contain_coin_info_pyth2(
_: &OracleRegistry,
_: TypeName,
): bool {
abort 0
}
}
Loading