From 04fff0934df56457b201e5171e12e87e8c06ec13 Mon Sep 17 00:00:00 2001 From: Michael Bumann Date: Thu, 3 Feb 2022 22:06:52 +0100 Subject: [PATCH] Explicit core check for the deployer account The deployer account has the same rights as a core contributor. This is handled now explicitly in the addressIsCore function. This allows us to run seeds and such from the deployer account. --- contracts/Contributor.sol | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/contracts/Contributor.sol b/contracts/Contributor.sol index d90236b..a2255b4 100644 --- a/contracts/Contributor.sol +++ b/contracts/Contributor.sol @@ -99,7 +99,7 @@ contract Contributor is Initializable { function isCoreTeam(uint32 id) view public returns (bool) { // TODO: for simplicity we simply define the first contributors as core // later this needs to be changed to something more dynamic - return id > 1 && id < 7 || msg.sender == deployer; + return id > 0 && id < 7; } function exists(uint32 id) view public returns (bool) { @@ -107,6 +107,10 @@ contract Contributor is Initializable { } function addressIsCore(address account) view public returns (bool) { + // the deployer is always core + if(account == deployer) { + return true; + } uint32 id = getContributorIdByAddress(account); return isCoreTeam(id); }