第二遍走查 snapshot

This commit is contained in:
mingda
2020-11-29 17:38:13 +08:00
parent c52e7960b6
commit d90e031a30
17 changed files with 285 additions and 314 deletions

View File

@@ -23,13 +23,6 @@ contract DPPVault is DPPStorage {
// ============ Get Input ============
function getInput() public view returns (uint256 baseInput, uint256 quoteInput) {
return (
_BASE_TOKEN_.balanceOf(address(this)).sub(_BASE_RESERVE_),
_QUOTE_TOKEN_.balanceOf(address(this)).sub(_QUOTE_RESERVE_)
);
}
function getBaseInput() public view returns (uint256 input) {
return _BASE_TOKEN_.balanceOf(address(this)).sub(_BASE_RESERVE_);
}
@@ -38,11 +31,6 @@ contract DPPVault is DPPStorage {
return _QUOTE_TOKEN_.balanceOf(address(this)).sub(_QUOTE_RESERVE_);
}
// ============ Vault Related
function getVaultReserve() public view returns (uint256 baseReserve, uint256 quoteReserve) {
return (_BASE_RESERVE_, _QUOTE_RESERVE_);
}
// ============ Set States ============
function setTarget(uint256 baseTarget, uint256 quoteTarget) public preventReentrant onlyOwner {
@@ -90,7 +78,7 @@ contract DPPVault is DPPStorage {
}
}
// ============ Assets Transfer ============
// ============ Asset Out ============
function _transferBaseOut(address to, uint256 amount) internal {
if (amount > 0) {