From 4a49ef033c5105401489cadc1d56092ea1589967 Mon Sep 17 00:00:00 2001 From: aazhou1 Date: Fri, 20 Dec 2024 10:08:06 -0800 Subject: [PATCH] yearn validation auction existence fix --- hardhat.config.ts | 7 ------- src/TermDiscountRateAdapter.sol | 3 +-- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/hardhat.config.ts b/hardhat.config.ts index ebfd6b05..7de3ed9b 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -49,13 +49,6 @@ const config: HardhatUserConfig = { paths: { sources: "./src", // Specify the main directory for source files }, - solidity: "0.8.23", - paths: { - sources: "./src", // Your contract source directory - libraries: "./lib", // Point Hardhat to Foundry's lib folder - cache: "./cache", // Keep Foundry and Hardhat caches separate - artifacts: "./artifacts", // Keep artifacts separate - }, networks: { sepolia: { diff --git a/src/TermDiscountRateAdapter.sol b/src/TermDiscountRateAdapter.sol index 8ac310d8..e91ccc35 100644 --- a/src/TermDiscountRateAdapter.sol +++ b/src/TermDiscountRateAdapter.sol @@ -143,9 +143,8 @@ contract TermDiscountRateAdapter is ITermDiscountRateAdapter, AccessControl { } - function _validateAuctionExistence(AuctionMetadata[] memory auctionMetadata, bytes32 termAuctionId) private view returns(bool auctionExists) { + function _validateAuctionExistence(AuctionMetadata[] memory auctionMetadata, bytes32 termAuctionId) private pure returns(bool auctionExists) { // Check if the termAuctionId exists in the metadata - bool auctionExists; for (uint256 i = 0; i < auctionMetadata.length; i++) { if (auctionMetadata[i].termAuctionId == termAuctionId) { auctionExists = true;