erc721m
erc721m copied to clipboard
feat: downsize contracts
- simplify contract to downsize
·---------------------------------------|--------------------------------|--------------------------------·
| Solc version: 0.8.16 · Optimizer enabled: true · Runs: 200 │
········································|································|·································
| Contract Name · Deployed size (KiB) (change) · Initcode size (KiB) (change) │
········································|································|·································
| Address · 0.084 (0.000) · 0.138 (0.000) │
········································|································|·································
| BucketAuction · 19.020 (0.000) · 20.373 (0.000) │
········································|································|·································
| BucketAuctionOperatorFilterer · 20.019 (0.000) · 21.734 (0.000) │
········································|································|·································
| BytesLib · 0.084 (0.000) · 0.138 (0.000) │
········································|································|·································
| DutchAuction · 16.440 (0.000) · 17.700 (0.000) │
········································|································|·································
| ECDSA · 0.084 (0.000) · 0.138 (0.000) │
········································|································|·································
| EnumerableSet · 0.084 (0.000) · 0.138 (0.000) │
········································|································|·································
| ERC20 · 2.121 (0.000) · 2.859 (0.000) │
········································|································|·································
| ERC721 · 4.261 (0.000) · 4.999 (0.000) │
········································|································|·································
| ERC721A · 3.334 (0.000) · 4.076 (0.000) │
········································|································|·································
| ERC721M · 14.456 (0.000) · 15.698 (0.000) │
········································|································|·································
| ERC721MAutoApprover · 14.694 (0.000) · 15.994 (0.000) │
········································|································|·································
| ERC721MIncreasableOperatorFilterer · 15.747 (0.000) · 17.387 (0.000) │
········································|································|·································
| ERC721MIncreasableSupply · 14.748 (0.000) · 16.027 (0.000) │
········································|································|·································
| ERC721MLite · 13.948 (0.000) · 15.419 (0.000) │
········································|································|·································
| ERC721MOnft · 23.708 (0.000) · 25.406 (0.000) │
········································|································|·································
| ERC721MOperatorFilterer · 15.455 (0.000) · 17.039 (0.000) │
········································|································|·································
| ERC721MOperatorFiltererAutoApprover · 15.712 (0.000) · 17.363 (0.000) │
········································|································|·································
| ERC721MPausable · 14.949 (0.000) · 16.218 (0.000) │
········································|································|·································
| ERC721MPausableOperatorFilterer · 15.948 (0.000) · 17.577 (0.000) │
········································|································|·································
| ExcessivelySafeCall · 0.084 (0.000) · 0.138 (0.000) │
········································|································|·································
| MerkleProof · 0.084 (0.000) · 0.138 (0.000) │
········································|································|·································
| MockERC20 · 2.384 (0.000) · 2.934 (0.000) │
········································|································|·································
| MockLayerZeroEndpoint · 2.150 (0.000) · 2.182 (0.000) │
········································|································|·································
| ONFT721Lite · 15.771 (0.000) · 16.822 (0.000) │
········································|································|·································
| SafeERC20 · 0.084 (0.000) · 0.138 (0.000) │
········································|································|·································
| SignatureChecker · 0.084 (0.000) · 0.138 (0.000) │
········································|································|·································
| Strings · 0.084 (0.000) · 0.138 (0.000) │
········································|································|·································
| TestReentrantExploit · 1.077 (0.000) · 1.221 (0.000) │
········································|································|·································
| TestStaking · 1.377 (0.000) · 1.521 (0.000) │
·---------------------------------------|--------------------------------|--------------------------------·
- Simplify removing
updateStageswheresetStageshas basically the same functionality. - Move some setters directly to constructor since some are rarely updated after deployment, saving some bytes
- remove intermediary variable definitions
- simplify
withdrawandwithdrawERC20into single one - remove some more unused methods
There are some tests failing in regards to cosign, which needs a bit of work because i was not able to find the root cause.
Since you changed most contracts' constructor, you should also update scritps/deployXXX.ts and update hardhat.config.ts to require extra params
Since you changed most contracts' constructor, you should also update
scritps/deployXXX.tsand updatehardhat.config.tsto require extra params
updating now.