-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* stake unused sui (WIP) * refactor borrow, redeem so that they expose the LiquidityRequest type * refactor staker module a little bit * remove the target util stuff * adding borrow_sui, redeem_sui functions * add staker functions * new idea * slightly nicer way of doing stuff * fixes * keep public funcsigs the same * review fixes * test edge case * testing more edge cases * add test for borrow_request * Staker fees (#40) * claim fees when rebalancing staker * leave 1 sui of staker fees in the lst just in case * add more stuff to event * version checks on the new functions * test behavior changes a bit after liquid staking bugfix * Type fixes (#41)
- Loading branch information
Showing
10 changed files
with
1,109 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[package] | ||
name = "sprungsui" | ||
edition = "2024.beta" # edition = "legacy" to use legacy (pre-2024) Move | ||
|
||
[dependencies] | ||
Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "framework/testnet" } | ||
|
||
[addresses] | ||
sprungsui = "0x0" | ||
|
||
[dev-dependencies] | ||
|
||
[dev-addresses] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
module sprungsui::sprungsui { | ||
use sui::coin::{Self}; | ||
|
||
public struct SPRUNGSUI has drop {} | ||
|
||
fun init(witness: SPRUNGSUI, ctx: &mut TxContext) { | ||
let (treasury, metadata) = coin::create_currency( | ||
witness, | ||
9, | ||
b"", | ||
b"Staked SUI", | ||
b"", | ||
option::none(), | ||
ctx | ||
); | ||
|
||
transfer::public_share_object(metadata); | ||
transfer::public_transfer(treasury, ctx.sender()) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.