diff --git a/check-size.sh b/check-size.sh index 0c7b758..136ff27 100755 --- a/check-size.sh +++ b/check-size.sh @@ -1,15 +1,14 @@ #!/bin/bash -s=$(brownie compile --size) +s=$(brownie compile --size | sed 's/\x1b\[[0-9;]*m//g') # strip ansi color from brownie output echo "${s}" -regex='============ Deployment Bytecode Sizes ============\s*(\w+)\s+-\s+([0-9,B]+)\s+\(' +regex='============ Deployment Bytecode Sizes ============\s*(\w+)\s+-\s+([0-9,B]+)\s+\(([0-9.]+%)\)' [[ "$s" =~ $regex ]] largest_contract=${BASH_REMATCH[1]} largest_size=$(echo "${BASH_REMATCH[2]}" | sed -e 's/,//g' -e 's/B//g') +largest_percent=${BASH_REMATCH[3]} limit=24576 +echo "$largest_contract is $largest_size bytes ($largest_percent of $limit byte size limit)." if (( largest_size > limit)); then - echo "$largest_contract is $largest_size bytes (over size limit of $limit bytes)." exit 1 -else - echo "$largest_contract is $largest_size bytes (under size limit of $limit bytes)." fi; diff --git a/src/base/Pool.sol b/src/base/Pool.sol index cf75e74..be53d56 100644 --- a/src/base/Pool.sol +++ b/src/base/Pool.sol @@ -3,7 +3,6 @@ pragma solidity 0.8.14; import '@clones/Clone.sol'; -import "forge-std/console.sol"; import '@openzeppelin/contracts/token/ERC20/ERC20.sol'; import '@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol'; import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';