From 6492785e667d70ddb20de263110533b27b9c839e Mon Sep 17 00:00:00 2001 From: 0xmad <0xmad@users.noreply.github.com> Date: Tue, 20 Feb 2024 11:11:14 -0600 Subject: [PATCH] fix(contracts): use sender address for ownable constructor args --- contracts/contracts/TallyNonQv.sol | 2 +- contracts/contracts/gatekeepers/EASGatekeeper.sol | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/contracts/contracts/TallyNonQv.sol b/contracts/contracts/TallyNonQv.sol index 96c8af1dff..1fbc6b76db 100644 --- a/contracts/contracts/TallyNonQv.sol +++ b/contracts/contracts/TallyNonQv.sol @@ -14,7 +14,7 @@ import { CommonUtilities } from "./utilities/CommonUtilities.sol"; /// @title TallyNonQv /// @notice The TallyNonQv contract is used during votes tallying /// and by users to verify the tally results. -contract TallyNonQv is Ownable, SnarkCommon, CommonUtilities, Hasher { +contract TallyNonQv is Ownable(msg.sender), SnarkCommon, CommonUtilities, Hasher { uint256 internal constant TREE_ARITY = 5; /// @notice The commitment to the tally results. Its initial value is 0, but after diff --git a/contracts/contracts/gatekeepers/EASGatekeeper.sol b/contracts/contracts/gatekeepers/EASGatekeeper.sol index 0379a8cab8..ad080f4a47 100644 --- a/contracts/contracts/gatekeepers/EASGatekeeper.sol +++ b/contracts/contracts/gatekeepers/EASGatekeeper.sol @@ -9,7 +9,7 @@ import { IEAS } from "../interfaces/IEAS.sol"; /// @title EASGatekeeper /// @notice A gatekeeper contract which allows users to sign up to MACI /// only if they've received an attestation of a specific schema from a trusted attester -contract EASGatekeeper is SignUpGatekeeper, Ownable { +contract EASGatekeeper is SignUpGatekeeper, Ownable(msg.sender) { // the reference to the EAS contract IEAS private immutable eas; @@ -38,7 +38,7 @@ contract EASGatekeeper is SignUpGatekeeper, Ownable { /// @param _eas The EAS contract /// @param _attester The trusted attester /// @param _schema The schema UID - constructor(address _eas, address _attester, bytes32 _schema) payable Ownable() { + constructor(address _eas, address _attester, bytes32 _schema) payable { if (_eas == address(0) || _attester == address(0)) revert ZeroAddress(); eas = IEAS(_eas); schema = _schema;