Skip to content

Commit

Permalink
feat: impl withdraw
Browse files Browse the repository at this point in the history
  • Loading branch information
cryptowen committed Jan 31, 2024
1 parent 15eedbf commit 241cac3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions sources/SocialCoin.move
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,15 @@ module socialcoin::socialcoin {
transfer_from_vault(global, protocol_fee, protocol_fee_destination, ctx);
}

public fun withdraw(
global: &mut Global,
_: &AdminCap,
ctx: &mut TxContext,
) {
let left = balance::value(&global.vault);
transfer_from_vault(global, left, sender(ctx), ctx);
}

#[test]
fun test_social_coin() {
let admin = @0xBABE;
Expand Down

0 comments on commit 241cac3

Please sign in to comment.