Skip to content

Problem understanding TransparentUpgradeableProxy #367

Answered by cromewar
carlitox477 asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @carlitox477 I'll try to answer you questions.

What exactly does the encoded_initializer in the TransparentUpgradeableProxy constructor?

contract TransparentUpgradeableProxy is ERC1967Proxy {
    /**
     * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and
     * optionally initialized with `_data` as explained in {ERC1967Proxy-constructor}.
     */
    constructor(
        address _logic,
        address admin_,
        bytes memory _data
    ) payable ERC1967Proxy(_logic, _data) {
        assert(
            _ADMIN_SLOT ==
                bytes32(uint256(keccak256("eip1967.proxy.admin")) - 1)
        );
        _changeAdmin(ad…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@PatrickAlphaC
Comment options

Answer selected by PatrickAlphaC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants