bnb-party / BNBParty.Factory

Smart contract manages Liquidity Pools and Token creation, enabling decentralized swaps and liquidity handling
MIT License
2 stars 0 forks source link

tests refactor #45

Closed YouStillAlive closed 2 months ago

YouStillAlive commented 2 months ago

closes #36

github-actions[bot] commented 2 months ago

Methods

Symbol Meaning
Execution gas for this method does not include intrinsic gas overhead
Cost was non-zero but below the precision setting for the currency display (see options)
Min Max Avg Calls usd avg
BNBPartyFactory
       createParty(string,string) 5,668,459 5,882,147 5,728,542 29 16.79
       joinParty(address,uint256) 153,302 5,642,318 1,818,734 20 5.33
       leaveParty(address,uint256,uint256) 174,469 191,569 180,169 3 0.53
       setNonfungiblePositionManager(address,address) 27,399 68,928 66,158 15 0.19
       setSwapRouter(address) 24,119 46,259 44,782 15 0.13
       withdrawFee() - - 31,792 2 0.09
       withdrawPartyLPFee(address[]) 173,830 173,875 173,853 2 0.51
NonfungiblePositionManager
       approve(address,uint256) 46,052 46,383 46,273 3 0.14
SwapRouter
       exactInput((bytes,address,uint256,uint256,uint256)) 132,707 142,139 138,995 3 0.41
       multicall(bytes[]) - - 160,866 2 0.47

Deployments

Min Max Avg Block % usd avg
BNBPartyFactory 3,305,188 3,305,200 3,305,199 2.5 % 9.69
MockNonfungibleTokenPositionDescriptor - - 111,537 0.1 % 0.33
NonfungiblePositionManager 5,171,500 5,171,524 5,171,519 4 % 15.16
SwapRouter 2,201,078 2,201,090 2,201,088 1.7 % 6.45
UniswapV3Factory 5,437,097 5,437,109 5,437,108 4.2 % 15.93

Solidity and Network Config

Settings Value
Solidity: version 0.8.24
Solidity: optimized true
Solidity: runs 200
Solidity: viaIR false
Block Limit 130,000,000
L1 Gas Price 5 gwei
Token Price 586.12 usd/bnb
Network BINANCE
Toolchain hardhat
github-actions[bot] commented 2 months ago

Slither report

THIS CHECKLIST IS NOT COMPLETE. Use --show-ignored-findings to show all the results. Summary

https://github.com/bnb-party/BNBParty.Factory/blob/91611c8c9682690e9dfb2f7e1b6e9115cdf7ec8d/contracts/BNBPartyInternal.sol#L7-L32

https://github.com/bnb-party/BNBParty.Factory/blob/91611c8c9682690e9dfb2f7e1b6e9115cdf7ec8d/contracts/BNBPartyState.sol#L70-L76

reentrancy-no-eth

Impact: Medium Confidence: Medium

https://github.com/bnb-party/BNBParty.Factory/blob/91611c8c9682690e9dfb2f7e1b6e9115cdf7ec8d/contracts/BNBPartyInternal.sol#L89-L130

uninitialized-local

Impact: Medium Confidence: Medium

https://github.com/bnb-party/BNBParty.Factory/blob/91611c8c9682690e9dfb2f7e1b6e9115cdf7ec8d/contracts/BNBPartyInternal.sol#L11

https://github.com/bnb-party/BNBParty.Factory/blob/91611c8c9682690e9dfb2f7e1b6e9115cdf7ec8d/contracts/BNBPartyInternal.sol#L12

unused-return

Impact: Medium Confidence: Medium

https://github.com/bnb-party/BNBParty.Factory/blob/91611c8c9682690e9dfb2f7e1b6e9115cdf7ec8d/contracts/BNBPartyInternal.sol#L7-L32

https://github.com/bnb-party/BNBParty.Factory/blob/91611c8c9682690e9dfb2f7e1b6e9115cdf7ec8d/contracts/BNBPartyInternal.sol#L89-L130

https://github.com/bnb-party/BNBParty.Factory/blob/91611c8c9682690e9dfb2f7e1b6e9115cdf7ec8d/contracts/BNBPartyInternal.sol#L89-L130

https://github.com/bnb-party/BNBParty.Factory/blob/91611c8c9682690e9dfb2f7e1b6e9115cdf7ec8d/contracts/BNBPartyState.sol#L114-L134

https://github.com/bnb-party/BNBParty.Factory/blob/91611c8c9682690e9dfb2f7e1b6e9115cdf7ec8d/contracts/BNBPartyInternal.sol#L34-L67

https://github.com/bnb-party/BNBParty.Factory/blob/91611c8c9682690e9dfb2f7e1b6e9115cdf7ec8d/contracts/BNBPartyInternal.sol#L137-L154

https://github.com/bnb-party/BNBParty.Factory/blob/91611c8c9682690e9dfb2f7e1b6e9115cdf7ec8d/contracts/BNBPartyInternal.sol#L89-L130

https://github.com/bnb-party/BNBParty.Factory/blob/91611c8c9682690e9dfb2f7e1b6e9115cdf7ec8d/contracts/BNBPartyState.sol#L148-L163

https://github.com/bnb-party/BNBParty.Factory/blob/91611c8c9682690e9dfb2f7e1b6e9115cdf7ec8d/contracts/BNBPartyInternal.sol#L89-L130

shadowing-local

Impact: Low Confidence: High

https://github.com/bnb-party/BNBParty.Factory/blob/91611c8c9682690e9dfb2f7e1b6e9115cdf7ec8d/contracts/token/ERC20Token.sol#L9

https://github.com/bnb-party/BNBParty.Factory/blob/91611c8c9682690e9dfb2f7e1b6e9115cdf7ec8d/contracts/token/ERC20Token.sol#L10

reentrancy-benign

Impact: Low Confidence: Medium

https://github.com/bnb-party/BNBParty.Factory/blob/91611c8c9682690e9dfb2f7e1b6e9115cdf7ec8d/contracts/BNBPartyFactory.sol#L20-L41

https://github.com/bnb-party/BNBParty.Factory/blob/91611c8c9682690e9dfb2f7e1b6e9115cdf7ec8d/contracts/BNBPartyInternal.sol#L7-L32

https://github.com/bnb-party/BNBParty.Factory/blob/91611c8c9682690e9dfb2f7e1b6e9115cdf7ec8d/contracts/BNBPartyInternal.sol#L34-L67

reentrancy-events

Impact: Low Confidence: Medium

https://github.com/bnb-party/BNBParty.Factory/blob/91611c8c9682690e9dfb2f7e1b6e9115cdf7ec8d/contracts/BNBPartyInternal.sol#L80-L87

https://github.com/bnb-party/BNBParty.Factory/blob/91611c8c9682690e9dfb2f7e1b6e9115cdf7ec8d/contracts/BNBPartyInternal.sol#L89-L130

https://github.com/bnb-party/BNBParty.Factory/blob/91611c8c9682690e9dfb2f7e1b6e9115cdf7ec8d/contracts/BNBPartyInternal.sol#L69-L78

https://github.com/bnb-party/BNBParty.Factory/blob/91611c8c9682690e9dfb2f7e1b6e9115cdf7ec8d/contracts/BNBPartyInternal.sol#L69-L78

https://github.com/bnb-party/BNBParty.Factory/blob/91611c8c9682690e9dfb2f7e1b6e9115cdf7ec8d/contracts/BNBPartyInternal.sol#L69-L78

assembly

Impact: Informational Confidence: High

https://github.com/bnb-party/BNBParty.Factory/blob/91611c8c9682690e9dfb2f7e1b6e9115cdf7ec8d/node_modules/@openzeppelin/contracts/utils/Address.sol#L146-L158

low-level-calls

Impact: Informational Confidence: High

https://github.com/bnb-party/BNBParty.Factory/blob/91611c8c9682690e9dfb2f7e1b6e9115cdf7ec8d/node_modules/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol#L110-L117

https://github.com/bnb-party/BNBParty.Factory/blob/91611c8c9682690e9dfb2f7e1b6e9115cdf7ec8d/contracts/BNBPartyInternal.sol#L80-L87

https://github.com/bnb-party/BNBParty.Factory/blob/91611c8c9682690e9dfb2f7e1b6e9115cdf7ec8d/node_modules/@openzeppelin/contracts/utils/Address.sol#L95-L98

https://github.com/bnb-party/BNBParty.Factory/blob/91611c8c9682690e9dfb2f7e1b6e9115cdf7ec8d/node_modules/@openzeppelin/contracts/utils/Address.sol#L104-L107

https://github.com/bnb-party/BNBParty.Factory/blob/91611c8c9682690e9dfb2f7e1b6e9115cdf7ec8d/node_modules/@openzeppelin/contracts/utils/Address.sol#L41-L50

https://github.com/bnb-party/BNBParty.Factory/blob/91611c8c9682690e9dfb2f7e1b6e9115cdf7ec8d/node_modules/@openzeppelin/contracts/utils/Address.sol#L83-L89

naming-convention

Impact: Informational Confidence: High

https://github.com/bnb-party/BNBParty.Factory/blob/91611c8c9682690e9dfb2f7e1b6e9115cdf7ec8d/contracts/BNBPartyState.sol#L22

https://github.com/bnb-party/BNBParty.Factory/blob/91611c8c9682690e9dfb2f7e1b6e9115cdf7ec8d/contracts/BNBPartyState.sol#L52

https://github.com/bnb-party/BNBParty.Factory/blob/91611c8c9682690e9dfb2f7e1b6e9115cdf7ec8d/contracts/BNBPartyState.sol#L13

https://github.com/bnb-party/BNBParty.Factory/blob/91611c8c9682690e9dfb2f7e1b6e9115cdf7ec8d/contracts/BNBPartyState.sol#L53

https://github.com/bnb-party/BNBParty.Factory/blob/91611c8c9682690e9dfb2f7e1b6e9115cdf7ec8d/contracts/BNBPartyState.sol#L62

https://github.com/bnb-party/BNBParty.Factory/blob/91611c8c9682690e9dfb2f7e1b6e9115cdf7ec8d/contracts/interfaces/INonfungiblePositionManager.sol#L184

https://github.com/bnb-party/BNBParty.Factory/blob/91611c8c9682690e9dfb2f7e1b6e9115cdf7ec8d/node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol#L89

reentrancy-unlimited-gas

Impact: Informational Confidence: Medium

https://github.com/bnb-party/BNBParty.Factory/blob/91611c8c9682690e9dfb2f7e1b6e9115cdf7ec8d/contracts/BNBPartyState.sol#L70-L76