-
Notifications
You must be signed in to change notification settings - Fork 2
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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:
- Tests for the function created
- Resolve the comments
- Add round logic: https://specifications.vercel.app/docs/intro/how-titus-works#functioning-of-options-on-titus-finance
- 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 { |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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
The code contains the functions to deposit, withdraw, pause and unpause the contracts.