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

Omard Vault Assignment #37

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

OMDraz
Copy link

@OMDraz OMDraz commented Jan 22, 2022

12/12 tests passing

event withdrawalEvent(uint256 _amount);

//Should take in deposit amount. Assume that the contract is pre-approved to transfer that amount
function deposit(uint256 _amount) public payable {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This can be an external function

address public owner = msg.sender;
VaultToken vaultToken = VaultToken(owner);

mapping(address => mapping(ERC20 => uint256)) vaultBalance;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since in this case vaultToken is fixed, why do we need this internal mapping from ERC20 to uint?

payable
positiveAmounts(_amount)
{
transfer(_toAddress, _amount);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why not call the _mint function here?

positiveAmounts(_amount)
{
_burn(_toAddress, _amount);
emit tokensBurned(_toAddress, _amount);
Copy link
Collaborator

Choose a reason for hiding this comment

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

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