Skip to content

Commit 1a3e559

Browse files
committed
Prefer external over public where possible
1 parent 859f9eb commit 1a3e559

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

contracts/DisintermediatedGrants.sol

+5-5
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ contract DisintermediatedGrants {
6363
maxDonationGracePeriod = _maxDonationGracePeriod;
6464
}
6565

66-
function whitelistDonor(address _donor) public whenNotRetired onlyMultisig {
66+
function whitelistDonor(address _donor) external whenNotRetired onlyMultisig {
6767
donorWhitelisted[_donor] = true;
6868
emit WhitelistDonor(_donor);
6969
}
@@ -72,7 +72,7 @@ contract DisintermediatedGrants {
7272
address _token,
7373
uint256 _commitmentAmount,
7474
uint32 _gracePeriod
75-
) public whenNotRetired onlyWhitelistedDonor {
75+
) external whenNotRetired onlyWhitelistedDonor {
7676
require(_commitmentAmount > 0, "commitment amount cannot be zero");
7777
require(_gracePeriod <= maxDonationGracePeriod, "withdrawal grace period is too long");
7878
require(
@@ -112,13 +112,13 @@ contract DisintermediatedGrants {
112112
emit ProposeGrant(grant);
113113
}
114114

115-
function proposeGrants(GrantProposal[] memory _grantProposals) public {
115+
function proposeGrants(GrantProposal[] memory _grantProposals) external {
116116
for (uint16 i = 0; i < _grantProposals.length; i++) {
117117
proposeGrant(_grantProposals[i]);
118118
}
119119
}
120120

121-
function disburseGrant(uint256 _grantId) public whenNotRetired {
121+
function disburseGrant(uint256 _grantId) external whenNotRetired {
122122
require(_grantId < grantCount, "grant does not exist");
123123
Grant storage grant = grants[_grantId];
124124
require(!grant.disbursed, "grant has already been disbursed");
@@ -137,7 +137,7 @@ contract DisintermediatedGrants {
137137
ERC20(donation.token).transferFrom(donation.donor, grant.recipient, grant.amount);
138138
}
139139

140-
function retire() public whenNotRetired onlyMultisig {
140+
function retire() external whenNotRetired onlyMultisig {
141141
retired = true;
142142
emit Retire();
143143
}

0 commit comments

Comments
 (0)