flash loan

This commit is contained in:
mingda
2020-11-06 00:31:30 +08:00
parent f66a90d7b2
commit 81dc1c15a0
8 changed files with 65 additions and 39 deletions

View File

@@ -110,11 +110,15 @@ contract DVMVault is InitializableOwnable {
}
function transferBaseOut(address to, uint256 amount) public onlyOwner {
IERC20(_BASE_TOKEN_).safeTransfer(to, amount);
if (amount > 0) {
IERC20(_BASE_TOKEN_).safeTransfer(to, amount);
}
}
function transferQuoteOut(address to, uint256 amount) public onlyOwner {
IERC20(_QUOTE_TOKEN_).safeTransfer(to, amount);
if (amount > 0) {
IERC20(_QUOTE_TOKEN_).safeTransfer(to, amount);
}
}
// Shares related