From 79c1e4cd031fff21201411e292c0c18a113a91d5 Mon Sep 17 00:00:00 2001 From: xapski Date: Thu, 25 May 2023 06:04:50 +0000 Subject: [PATCH] May 25, 2023, 7:04 AM --- contracts/Campaign.sol | 6 +++--- hardhat.config.ts | 12 ++++++++++-- package.json | 2 +- yarn.lock | 9 +++++---- 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/contracts/Campaign.sol b/contracts/Campaign.sol index a0639bb..42d6a63 100644 --- a/contracts/Campaign.sol +++ b/contracts/Campaign.sol @@ -215,9 +215,9 @@ contract Campaign is KeeperCompatibleInterface, ReentrancyGuard{ // } // getter functions - function getRewardKeys() external view returns(uint256[] memory){ - return rKeys; - } + // function getRewardKeys() external view returns(uint256[] memory){ + // return rKeys; + // } // function getReward(uint256 _priceID) external view returns(Reward.RewardObject memory) { // Reward reward = Reward(rewards[_priceID]); diff --git a/hardhat.config.ts b/hardhat.config.ts index 2bd0ca9..eb5e791 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -7,6 +7,7 @@ import "dotenv/config" import "solidity-coverage" import "hardhat-deploy" import "solidity-coverage" +import "hardhat-contract-sizer" import { HardhatUserConfig } from "hardhat/config" @@ -17,12 +18,19 @@ const config: HardhatUserConfig = settings:{ optimizer: { enabled: true, - runs: 2000, + runs: 200, }, "viaIR": true, }, }, - + contractSizer: { + alphaSort: true, + disambiguatePaths: false, + runOnCompile: true, + strict: true, + // only: [":ERC20$"], + unit: "kB" + }, defaultNetwork: "hardhat", networks: { hardhat: { diff --git a/package.json b/package.json index 721284a..e5a9b8f 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "ethereum-waffle": "^3.4.4", "ethers": "^5.4.7", "hardhat": "^2.11.1", - "hardhat-contract-sizer": "^2.6.1", + "hardhat-contract-sizer": "^2.9.0", "hardhat-deploy": "^0.11.19", "hardhat-gas-reporter": "^1.0.9", "solidity-coverage": "^0.8.0", diff --git a/yarn.lock b/yarn.lock index 9b7f4e1..fa5c4ab 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5117,13 +5117,14 @@ har-validator@~5.1.3: ajv "^6.12.3" har-schema "^2.0.0" -hardhat-contract-sizer@^2.6.1: - version "2.6.1" - resolved "https://registry.yarnpkg.com/hardhat-contract-sizer/-/hardhat-contract-sizer-2.6.1.tgz#2b0046a55fa1ec96f19fdab7fde372377401c874" - integrity sha512-b8wS7DBvyo22kmVwpzstAQTdDCThpl/ySBqZh5ga9Yxjf61/uTL12TEg5nl7lDeWy73ntEUzxMwY6XxbQEc2wA== +hardhat-contract-sizer@^2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/hardhat-contract-sizer/-/hardhat-contract-sizer-2.9.0.tgz#2db75a676034ad9657cfe38793d38514ed6349a7" + integrity sha512-0I5lJo0iVPfK3YQNRv+zF4KHcdPbXPp9VCCOTcpDK/mfjWHiPxQwZv7eVt9S1JjvegjAVRtJPe9U5zQtd8LJGA== dependencies: chalk "^4.0.0" cli-table3 "^0.6.0" + strip-ansi "^6.0.0" hardhat-deploy@^0.11.19: version "0.11.19"