Skip to content

Governor shadows EIP-712's _name #4214

@ernestognw

Description

@ernestognw

📝 Details

Governor initializes with the following constructor:

constructor(string memory name_) EIP712(name_, version()) {
    _name = name_;
}

However, _name is also the name of the variable in EIP712:

constructor(string memory name, string memory version) {
    _name = name.toShortStringWithFallback(_nameFallback);
    _version = version.toShortStringWithFallback(_versionFallback);
    _hashedName = keccak256(bytes(name));
    _hashedVersion = keccak256(bytes(version));

    _cachedChainId = block.chainid;
    _cachedDomainSeparator = _buildDomainSeparator();
    _cachedThis = address(this);
}

Apparently, there's no point in having the storage variable in the Governor when the name in EIP712 can be used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaking changeChanges that break backwards compatibility of the public API.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions