update lending script

This commit is contained in:
2025-12-22 14:12:50 +08:00
parent 682552bfe6
commit 0024e7adb1
25 changed files with 797 additions and 1108 deletions

View File

@@ -86,21 +86,12 @@ contract Lending is
}
}
/**
* @dev 授权升级函数 - 只有 owner 可以升级
*/
function _authorizeUpgrade(address newImplementation) internal override onlyOwner {}
/**
* @notice 暂停合约
*/
function pause() external onlyOwner {
_pause();
}
/**
* @notice 恢复合约
*/
function unpause() external onlyOwner {
_unpause();
}
@@ -527,7 +518,7 @@ contract Lending is
return LendingMath.principalToBalance(principal, supplyIndex);
}
function balanceOf(address account) external view override returns (uint256) {
function supplyBalanceOf(address account) external view override returns (uint256) {
int104 principal = userBasic[account].principal;
if (principal <= 0) return 0;
// 只返回正余额(存款)