Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

solicy-vauled deposit and withdraw #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

asadalisiyal
Copy link

The code contains the functions to deposit, withdraw, pause and unpause the contracts.

Copy link
Contributor

@codebuster22 codebuster22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following things needed before this PR can be approved:

  1. Tests for the function created
  2. Resolve the comments
  3. Add round logic: https://specifications.vercel.app/docs/intro/how-titus-works#functioning-of-options-on-titus-finance
  4. Add a admin function to increment the round manually (This is more like a stub which will be removed going forward.)

@@ -0,0 +1,107 @@
module SolicyAdminAddress::SolicyVault {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not Solicy, it's Titus. Please use Titus.

});
}

public entry fun deposit<CoinType>(account: &signer, amount: u64) acquires AppInfo, VaultInfo {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment in the code line, where we are storing a map between depositor address and amount of coins deposited by the depositor?

};
}

public entry fun withdraw<CoinType>(account: &signer, amount: u64) acquires VaultInfo, AppInfo {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to ensure, the depositor cannot withdraw more than what they have deposited.
Also, rename this function to instant_withdraw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants