contracts icon indicating copy to clipboard operation
contracts copied to clipboard

replace duplicated Bitmaps with an powerful already importd one

Open yuhuajing opened this issue 1 year ago • 4 comments

The flattern files will faile because the duplicated BitMaps import, thus we strongly suggest that you could replace the imported BitMaps library in the /contracts/token/erc721/abstract/ERC721Hybrid.sol with _import {BitMaps} from "solidity-bits/contracts/BitMaps.sol"; in the \contracts\token\erc721\erc721psi\ERC721PsiBurnable.sol.

yuhuajing avatar Apr 25 '24 07:04 yuhuajing

@yuhuajing we are discussing the merits of your PR. One decision we have made is that we won't include IDE specific files in the repo. As such, could you update your PR to gitignore the whole .idea directory, and remove the associated files from your PR

drinkcoffee avatar Apr 26 '24 03:04 drinkcoffee

A result of the change beyond flatten files possibly being easier, is that the resulting contract should be smaller. ERC721Psi calls set and get on solidity-bits version of BitMaps, where as ImmutableERC721Base uses the same functions in Open Zeppelin's code. This means that two copies of these functions will be included in the final contract bytecode. Making the change described in this PR will mean there is only one copy of the set and get functions.

drinkcoffee avatar Apr 26 '24 03:04 drinkcoffee

replace duplicated Bitmaps with an powerful already importd one

Generated at commit: 2f24a4829eb77aa1a0f5d0d5ceda8e5b84c295d0

🚨 Report Summary

Severity Level Results
Contracts Critical High Medium Low Note Total 2 1 0 11 28 42
Dependencies Critical High Medium Low Note Total 0 0 0 0 0 0

For more details view the full report in OpenZeppelin Code Inspector

openzeppelin-code[bot] avatar May 06 '24 02:05 openzeppelin-code[bot]

Please .gitignore the whole .idea directory, and remove .idea files. We have decided not to include IDE specific files in the repo.

Already done

yuhuajing avatar May 06 '24 02:05 yuhuajing