openzeppelin-contracts icon indicating copy to clipboard operation
openzeppelin-contracts copied to clipboard

[Breaking changes] For 6.0

Open Amxx opened this issue 11 months ago • 8 comments

  • Enumerable{Set,Map}
    • Flatten structure using procedural generation (avoid using inner structures and casting)
    • Add support for non value type in code generation (ref)

PLEASE: DO NO START WORKING ON THIS !

Amxx avatar Feb 11 '25 20:02 Amxx

  • Reorganize the /utils, /cryptography, and /types folders now that they have grown significantly.

gonzaotc avatar Jun 03 '25 20:06 gonzaotc

https://github.com/OpenZeppelin/openzeppelin-contracts/pull/5711#issuecomment-2938293803

I'd like to merge the Token > Common into just Token

Amxx avatar Jun 04 '25 07:06 Amxx

  • Add an utils/encoding folder
    • Hex (extract toHexString and parseXxx from Strings.sol)
    • Base58
    • Base64
  • Add a meta library utils/Encoding.sol that includes all the functions from the encoding libraries
import { Hex } from "./encoding/Hex.sol";
import { Base58 } from "./encoding/Base58.sol";
import { Base64 } from "./encoding/Base64.sol";

library Encoding {
    function base58encode(bytes memory input) internal pure returns (string memory) {
        return Base58.encode(input);
    }

    function base58decode(string memory input) internal pure returns (bytes memory) {
        return Base58.decode(input);
    }

    function base64encode(string memory input) internal pure returns (bytes memory) {
        return Base64.encode(input);
    }

    function hexEncode(bytes memory input) internal pure returns (string memory) {
        return Hex.encode(input);
    }

    function hexEncodeAddr(address input) internal pure returns (string memory) {
        return Hex.encodeChecksumed(input);
    }

    function hexDecodeAddr(string memory input) internal pure returns (address) {
        return Hex.decodeAddress(input);
    }
}

Amxx avatar Jun 22 '25 21:06 Amxx

Maybe address the risk of quantum computing for the internal storage structure.

arr00 avatar Jun 24 '25 17:06 arr00

james-toussaint avatar Jul 07 '25 09:07 james-toussaint

  • Move ReentrancyGuardTransient's logic to ReentrancyGuard, and drop the non-transient version.
  • Mark ReentrancyGuard as stateless to avoid transpilation.
  • ~Do not transpile Initializable.sol~ (done in 5.5)
  • Remove Context.sol and ERC2771Forwarder.sol
    • Add utils library to get msgSender is ERC-2771 cases (usefull for ERC-7579)
    • Removing Context from Multicall will make it stateless, removing the need for an Upgradeable version of Multicall.

Amxx avatar Aug 27 '25 20:08 Amxx

  • ~Do not transpile UUPSUpgradeable, ERC721Holder, ERC1155Holder~ (done in 5.5)
    • other stateless contracts?

Amxx avatar Sep 10 '25 13:09 Amxx