Skip to content
This repository has been archived by the owner on Apr 27, 2022. It is now read-only.

Make allow list manager settable. #405

Closed
nlordell opened this issue Feb 3, 2021 · 2 comments
Closed

Make allow list manager settable. #405

nlordell opened this issue Feb 3, 2021 · 2 comments
Milestone

Comments

@nlordell
Copy link
Contributor

nlordell commented Feb 3, 2021

See discussion in #351

@fedgiac: Upgrading the proxy is a relatively expensive operations (as pointed out by frangio), and changing the manager is something that we might need to do from the start, for example because we want to assign this power to some other staking contract, or a DAO. Note that we use the same owner address on mainnet and Rinkeby for now: the first transaction I expect after releasing is changing the owner of the mainnet contract to some other address. Then also the manager should be changing.

@nlordell nlordell added this to the MVP milestone Feb 3, 2021
@bh2smith
Copy link
Contributor

bh2smith commented Feb 3, 2021

Here is some code we had considered using that allows the proxyAdmin to update the manager

    modifier onlyProxyAdmin() {
        // Slot taken from https://eips.ethereum.org/EIPS/eip-1967#specification
        // obtained as bytes32(uint256(keccak256('eip1967.proxy.admin')) - 1)
        bytes32 slot =
            0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;
        address proxyAdmin;
        // solhint-disable-next-line no-inline-assembly
        assembly {
            proxyAdmin := sload(slot)
        }
        require(msg.sender == proxyAdmin, "GPv2: caller not proxyAdmin");
        _;
    }

    function updateManager(address newManager) external onlyProxyAdmin {
        manager = newManager;
    }

@nlordell
Copy link
Contributor Author

nlordell commented Feb 4, 2021

Implemented by #407

@nlordell nlordell closed this as completed Feb 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants