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

add `NatSpec` comments #49

Closed YouStillAlive closed 2 months ago

YouStillAlive commented 2 months ago

closes #35

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,766 5,882,454 5,723,205 31 3.26
       joinParty(address,uint256) 153,302 5,653,179 1,819,582 20 1.04
       leaveParty(address,uint256,uint256) 174,469 191,569 180,169 3 0.10
       setNonfungiblePositionManager(address,address) 27,399 68,928 66,159 15 0.04
       setSwapRouter(address) 24,119 46,259 44,783 15 0.03
       withdrawFee() - - 31,792 2 0.02
       withdrawPartyLPFee(address[]) - - 173,880 2 0.10
NonfungiblePositionManager
       approve(address,uint256) 46,052 46,383 46,273 3 0.03
SwapRouter
       exactInput((bytes,address,uint256,uint256,uint256)) 132,707 142,139 138,995 3 0.08
       multicall(bytes[]) - - 160,866 2 0.09

Deployments

Min Max Avg Block % usd avg
BNBPartyFactory 3,324,777 3,324,789 3,324,788 2.6 % 1.89
MockNonfungibleTokenPositionDescriptor - - 111,537 0.1 % 0.06
NonfungiblePositionManager 5,171,500 5,171,524 5,171,519 4 % 2.94
SwapRouter 2,201,066 2,201,090 2,201,088 1.7 % 1.25
UniswapV3Factory 5,437,097 5,437,109 5,437,107 4.2 % 3.10

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 1 gwei
Token Price 569.38 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/ba85248b6ec58d9f45736b13ef8405920e569587/contracts/BNBPartyLiquidity.sol#L13-L36

https://github.com/bnb-party/BNBParty.Factory/blob/ba85248b6ec58d9f45736b13ef8405920e569587/contracts/BNBPartyManageable.sol#L36-L42

reentrancy-no-eth

Impact: Medium Confidence: Medium

https://github.com/bnb-party/BNBParty.Factory/blob/ba85248b6ec58d9f45736b13ef8405920e569587/contracts/BNBPartyLiquidity.sol#L86-L127

uninitialized-local

Impact: Medium Confidence: Medium

https://github.com/bnb-party/BNBParty.Factory/blob/ba85248b6ec58d9f45736b13ef8405920e569587/contracts/BNBPartyLiquidity.sol#L16

https://github.com/bnb-party/BNBParty.Factory/blob/ba85248b6ec58d9f45736b13ef8405920e569587/contracts/BNBPartyLiquidity.sol#L15

unused-return

Impact: Medium Confidence: Medium

https://github.com/bnb-party/BNBParty.Factory/blob/ba85248b6ec58d9f45736b13ef8405920e569587/contracts/BNBPartyLiquidity.sol#L86-L127

https://github.com/bnb-party/BNBParty.Factory/blob/ba85248b6ec58d9f45736b13ef8405920e569587/contracts/BNBPartyLiquidity.sol#L86-L127

https://github.com/bnb-party/BNBParty.Factory/blob/ba85248b6ec58d9f45736b13ef8405920e569587/contracts/BNBPartyManageable.sol#L78-L90

https://github.com/bnb-party/BNBParty.Factory/blob/ba85248b6ec58d9f45736b13ef8405920e569587/contracts/BNBPartyLiquidity.sol#L86-L127

https://github.com/bnb-party/BNBParty.Factory/blob/ba85248b6ec58d9f45736b13ef8405920e569587/contracts/BNBPartyLiquidity.sol#L13-L36

https://github.com/bnb-party/BNBParty.Factory/blob/ba85248b6ec58d9f45736b13ef8405920e569587/contracts/BNBPartySwaps.sol#L51-L68

https://github.com/bnb-party/BNBParty.Factory/blob/ba85248b6ec58d9f45736b13ef8405920e569587/contracts/BNBPartyLiquidity.sol#L48-L81

https://github.com/bnb-party/BNBParty.Factory/blob/ba85248b6ec58d9f45736b13ef8405920e569587/contracts/BNBPartyView.sol#L60-L80

https://github.com/bnb-party/BNBParty.Factory/blob/ba85248b6ec58d9f45736b13ef8405920e569587/contracts/BNBPartyLiquidity.sol#L86-L127

shadowing-local

Impact: Low Confidence: High

https://github.com/bnb-party/BNBParty.Factory/blob/ba85248b6ec58d9f45736b13ef8405920e569587/contracts/token/ERC20Token.sol#L16

https://github.com/bnb-party/BNBParty.Factory/blob/ba85248b6ec58d9f45736b13ef8405920e569587/contracts/token/ERC20Token.sol#L17

reentrancy-benign

Impact: Low Confidence: Medium

https://github.com/bnb-party/BNBParty.Factory/blob/ba85248b6ec58d9f45736b13ef8405920e569587/contracts/BNBPartyFactory.sol#L31-L52

https://github.com/bnb-party/BNBParty.Factory/blob/ba85248b6ec58d9f45736b13ef8405920e569587/contracts/BNBPartyLiquidity.sol#L48-L81

https://github.com/bnb-party/BNBParty.Factory/blob/ba85248b6ec58d9f45736b13ef8405920e569587/contracts/BNBPartyLiquidity.sol#L13-L36

reentrancy-events

Impact: Low Confidence: Medium

https://github.com/bnb-party/BNBParty.Factory/blob/ba85248b6ec58d9f45736b13ef8405920e569587/contracts/BNBPartySwaps.sol#L13-L22

https://github.com/bnb-party/BNBParty.Factory/blob/ba85248b6ec58d9f45736b13ef8405920e569587/contracts/BNBPartySwaps.sol#L28-L34

https://github.com/bnb-party/BNBParty.Factory/blob/ba85248b6ec58d9f45736b13ef8405920e569587/contracts/BNBPartyLiquidity.sol#L86-L127

https://github.com/bnb-party/BNBParty.Factory/blob/ba85248b6ec58d9f45736b13ef8405920e569587/contracts/BNBPartySwaps.sol#L13-L22

https://github.com/bnb-party/BNBParty.Factory/blob/ba85248b6ec58d9f45736b13ef8405920e569587/contracts/BNBPartySwaps.sol#L13-L22

assembly

Impact: Informational Confidence: High

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

low-level-calls

Impact: Informational Confidence: High

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

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

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

https://github.com/bnb-party/BNBParty.Factory/blob/ba85248b6ec58d9f45736b13ef8405920e569587/contracts/BNBPartySwaps.sol#L28-L34

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

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

naming-convention

Impact: Informational Confidence: High

https://github.com/bnb-party/BNBParty.Factory/blob/ba85248b6ec58d9f45736b13ef8405920e569587/contracts/BNBPartyState.sol#L24

https://github.com/bnb-party/BNBParty.Factory/blob/ba85248b6ec58d9f45736b13ef8405920e569587/contracts/BNBPartyState.sol#L15

https://github.com/bnb-party/BNBParty.Factory/blob/ba85248b6ec58d9f45736b13ef8405920e569587/contracts/BNBPartyManageable.sol#L27

https://github.com/bnb-party/BNBParty.Factory/blob/ba85248b6ec58d9f45736b13ef8405920e569587/contracts/BNBPartyManageable.sol#L14

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

https://github.com/bnb-party/BNBParty.Factory/blob/ba85248b6ec58d9f45736b13ef8405920e569587/contracts/BNBPartyManageable.sol#L15

reentrancy-unlimited-gas

Impact: Informational Confidence: Medium

https://github.com/bnb-party/BNBParty.Factory/blob/ba85248b6ec58d9f45736b13ef8405920e569587/contracts/BNBPartyManageable.sol#L36-L42

unused-import

Impact: Informational Confidence: High

codecov-commenter commented 2 months ago

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 77.27273% with 5 lines in your changes missing coverage. Please review.

Files Patch % Lines
contracts/BNBPartyState.sol 0.00% 5 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Files Coverage Δ
contracts/BNBPartyFactory.sol 100.00% <ø> (+12.50%) :arrow_up:
contracts/BNBPartyLiquidity.sol 100.00% <100.00%> (ø)
contracts/BNBPartyManageable.sol 89.28% <100.00%> (ø)
contracts/BNBPartyModifiers.sol 100.00% <100.00%> (ø)
contracts/BNBPartySwaps.sol 96.15% <100.00%> (ø)
contracts/BNBPartyView.sol 100.00% <100.00%> (ø)
contracts/token/ERC20Token.sol 100.00% <100.00%> (ø)
contracts/BNBPartyState.sol 61.53% <0.00%> (-38.47%) :arrow_down: