SIP-235: Update Issuer Modifier

Author
StatusApproved
TypeGovernance
NetworkEthereum & Optimism
ImplementorTBD
ReleaseTBD
ProposalLoading status...
Created2022-05-11

Simple Summary

Adds another require check to the onlyTrustedMinters modifier in Issuer.

Abstract

On each network, only one of those bridge addresses is the trusted contract and the other address has to be 0. Adding this check to the modifier will greatly increase the overall security of the system going forward.

Motivation

To increase the security of this access control for future deployments.

Technical Specification

Issuer.onlyTrustedMinters

We should patch this modifier to either only check the correct address for the chain it's on, or to check that one of the addresses == address(0).

modifier onlyTrustedMinters() {
    require(
      msg.sender == resolver.getAddress(CONTRACT_SYNTHETIXBRIDGETOOPTIMISM) ||
      msg.sender == resolver.getAddress(CONTRACT_SYNTHETIXBRIDGETOBASE),
      "Issuer: Only trusted minters can perform this action"
    );
    require(
      resolver.getAddress(CONTRACT_SYNTHETIXBRIDGETOOPTIMISM) == address(0) ||
      resolver.getAddress(CONTRACT_SYNTHETIXBRIDGETOBASE) == address(0),
      "Issuer: One of the trusted minters is not 0"
    );
    _;
}

Configurable Values (Via SCCP)

N/A

Copyright and related rights waived via CC0.