We need to use tx.origin to get the actual sender of the transaction (not an intermediary contract that talks to the other contract)

This commit is contained in:
bumi 2021-09-28 15:10:05 +02:00
parent 0756569dc7
commit 15a08fdaec
3 changed files with 4 additions and 4 deletions

View File

@ -49,7 +49,7 @@ contract Contribution is Initializable {
event ContributionVetoed(uint32 id, address vetoedByAccount); event ContributionVetoed(uint32 id, address vetoedByAccount);
modifier onlyCore { modifier onlyCore {
require(contributorContract.addressIsCore(msg.sender), "Core only"); require(contributorContract.addressIsCore(tx.origin), "Core only");
_; _;
} }

View File

@ -32,7 +32,7 @@ contract Contributor is Initializable {
event ContributorAdded(uint32 id, address account); event ContributorAdded(uint32 id, address account);
modifier onlyCore { modifier onlyCore {
require(addressIsCore(msg.sender), "Core only"); require(addressIsCore(tx.origin), "Core only");
_; _;
} }

View File

@ -38,7 +38,7 @@ contract Reimbursement is Initializable {
} }
modifier onlyCore { modifier onlyCore {
require(contributorContract.addressIsCore(msg.sender), "Core only"); require(contributorContract.addressIsCore(tx.origin), "Core only");
_; _;
} }