Skip to content

Commit 624d07d

Browse files
authored
fix: remove lens from search (#25)
1 parent eace52f commit 624d07d

File tree

9 files changed

+127
-69
lines changed

9 files changed

+127
-69
lines changed

packages/contracts/src/Core/Donations/DonationsImpl.sol

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ contract DonationsImpl is DonationsStorage {
3030
* @param amount the amount to withdraw
3131
* @dev withdraws the given amount from the storage
3232
*/
33-
function _withdraw(uint256 amount) internal {
33+
function _withdraw(
34+
uint256 amount
35+
) internal {
3436
require(amount > 0, "Insufficient balance");
3537
DonationsStorage.Donations storage donations = _getDonationsStorage();
3638
donations._withdraw(amount);
@@ -42,7 +44,9 @@ contract DonationsImpl is DonationsStorage {
4244
* @dev retrieves the balance from the storage
4345
* @return balance balance of the given account
4446
*/
45-
function _getBalance(address account) internal view returns (uint256) {
47+
function _getBalance(
48+
address account
49+
) internal view returns (uint256) {
4650
DonationsStorage.Donations storage donations = _getDonationsStorage();
4751
return donations._getBalance(account);
4852
}

packages/contracts/src/Core/EAS/EASImpl.sol

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ contract EASImpl is Initializable {
4343
* @dev Sets the EAS address
4444
* @param newEasAddress the new EAS address
4545
*/
46-
function _setNewEasAddress(address newEasAddress) internal {
46+
function _setNewEasAddress(
47+
address newEasAddress
48+
) internal {
4749
if (address(newEasAddress) == address(0)) {
4850
revert InvalidEAS();
4951
}
@@ -54,7 +56,9 @@ contract EASImpl is Initializable {
5456
* @dev sets new schema uid
5557
* @param newSchemaUid the new schema uid
5658
*/
57-
function _setNewSchemaUid(bytes32 newSchemaUid) internal {
59+
function _setNewSchemaUid(
60+
bytes32 newSchemaUid
61+
) internal {
5862
_schemaUid = newSchemaUid;
5963
}
6064

@@ -63,7 +67,9 @@ contract EASImpl is Initializable {
6367
* @param data the attestation data
6468
* @return uid the uid of the new attestation
6569
*/
66-
function _attest(AttestationRequestData memory data) internal returns (bytes32 uid) {
70+
function _attest(
71+
AttestationRequestData memory data
72+
) internal returns (bytes32 uid) {
6773
uid = _eas.attest(AttestationRequest({schema: _schemaUid, data: data}));
6874
}
6975

packages/contracts/src/Core/EESCore.sol

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ contract EESCore is
3232
}
3333

3434
/// @inheritdoc UUPSUpgradeable
35-
function _authorizeUpgrade(address newImplementation) internal override onlyOwner {}
35+
function _authorizeUpgrade(
36+
address newImplementation
37+
) internal override onlyOwner {}
3638

3739
/// @inheritdoc IEESCore
3840
function initialize(address easAddress, bytes32 schemaUid) external initializer {
@@ -67,7 +69,9 @@ contract EESCore is
6769
}
6870

6971
/// @inheritdoc IEESCore
70-
function getBalance(address account) public view returns (uint256 balance) {
72+
function getBalance(
73+
address account
74+
) public view returns (uint256 balance) {
7175
return _getBalance(account);
7276
}
7377

@@ -77,23 +81,31 @@ contract EESCore is
7781
}
7882

7983
/// @inheritdoc IEESCore
80-
function withdrawEndorsementFees(uint256 amount) external onlyOwner nonReentrant {
84+
function withdrawEndorsementFees(
85+
uint256 amount
86+
) external onlyOwner nonReentrant {
8187
_withdrawEndorsementFees(amount);
8288
}
8389

8490
/// @inheritdoc IEESCore
85-
function withdrawDonationFees(uint256 amount) external onlyOwner nonReentrant {
91+
function withdrawDonationFees(
92+
uint256 amount
93+
) external onlyOwner nonReentrant {
8694
_withdrawDonationFees(amount);
8795
}
8896

8997
/// @inheritdoc IEESCore
90-
function setDonationFeePercentage(uint256 newFee) external onlyOwner {
98+
function setDonationFeePercentage(
99+
uint256 newFee
100+
) external onlyOwner {
91101
require(newFee <= MAXIMUM_FEE_PERCENTAGE, "Donation fee percentage cannot exceed 3%");
92102
_setNewDonationFeePercentage(newFee);
93103
}
94104

95105
/// @inheritdoc IEESCore
96-
function setEndorsementPrice(uint256 newPrice) external onlyOwner {
106+
function setEndorsementPrice(
107+
uint256 newPrice
108+
) external onlyOwner {
97109
require(newPrice < _getEndorsementPrice(), "Endorsement price cannot exceed previous price");
98110
_setNewEndorsementPrice(newPrice);
99111
}
@@ -109,12 +121,16 @@ contract EESCore is
109121
}
110122

111123
/// @inheritdoc IEESCore
112-
function setNewEasAddress(address newEasAddress) external onlyOwner {
124+
function setNewEasAddress(
125+
address newEasAddress
126+
) external onlyOwner {
113127
_setNewEasAddress(newEasAddress);
114128
}
115129

116130
/// @inheritdoc IEESCore
117-
function setNewSchemaUid(bytes32 newSchemaUid) external onlyOwner {
131+
function setNewSchemaUid(
132+
bytes32 newSchemaUid
133+
) external onlyOwner {
118134
_setNewSchemaUid(newSchemaUid);
119135
}
120136

packages/contracts/src/Core/Fees/FeesImpl.sol

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ contract FeesImpl is FeesStorage, Initializable {
3737
* @dev Sets the new endorsement fee
3838
* @param newPrice The new endorsement fee
3939
*/
40-
function _setNewEndorsementPrice(uint256 newPrice) internal {
40+
function _setNewEndorsementPrice(
41+
uint256 newPrice
42+
) internal {
4143
require(newPrice < _getEndorsementPrice(), "New endorsement price cannot be higher than the current one");
4244
FeesStorage.Fees storage fees = _getFeesStorage();
4345
fees._setNewEndorsementPrice(newPrice);
@@ -47,7 +49,9 @@ contract FeesImpl is FeesStorage, Initializable {
4749
* @dev Sets the new donation fee percentage
4850
* @param newDonationFeePercentage The new donation fee percentage
4951
*/
50-
function _setNewDonationFeePercentage(uint256 newDonationFeePercentage) internal {
52+
function _setNewDonationFeePercentage(
53+
uint256 newDonationFeePercentage
54+
) internal {
5155
require(newDonationFeePercentage <= MAXIMUM_FEE_PERCENTAGE, "Donation fee percentage cannot exceed 3%");
5256
FeesStorage.Fees storage fees = _getFeesStorage();
5357
fees._donationFeePercentage = newDonationFeePercentage;
@@ -95,7 +99,9 @@ contract FeesImpl is FeesStorage, Initializable {
9599
* @dev Stores the endorsement fee
96100
* @param amount The amount of fees to store
97101
*/
98-
function _storeEndorsementFee(uint256 amount) private {
102+
function _storeEndorsementFee(
103+
uint256 amount
104+
) private {
99105
FeesStorage.Fees storage fees = _getFeesStorage();
100106
fees._storeEndorsementFee(amount);
101107
}
@@ -104,7 +110,9 @@ contract FeesImpl is FeesStorage, Initializable {
104110
* @dev Stores the donation fee
105111
* @param amount The amount of fees to store
106112
*/
107-
function _storeDonationFee(uint256 amount) private {
113+
function _storeDonationFee(
114+
uint256 amount
115+
) private {
108116
FeesStorage.Fees storage fees = _getFeesStorage();
109117
fees._storeDonationFee(amount);
110118
}
@@ -122,7 +130,9 @@ contract FeesImpl is FeesStorage, Initializable {
122130
* @dev Withdraws the fees from endorsements
123131
* @param amount The amount of fees to withdraw
124132
*/
125-
function _withdrawEndorsementFees(uint256 amount) internal {
133+
function _withdrawEndorsementFees(
134+
uint256 amount
135+
) internal {
126136
FeesStorage.Fees storage fees = _getFeesStorage();
127137
fees._withdrawEndorsementFees(amount);
128138
}
@@ -131,7 +141,9 @@ contract FeesImpl is FeesStorage, Initializable {
131141
* @dev Withdraws the fees from donations
132142
* @param amount The amount of fees to withdraw
133143
*/
134-
function _withdrawDonationFees(uint256 amount) internal {
144+
function _withdrawDonationFees(
145+
uint256 amount
146+
) internal {
135147
FeesStorage.Fees storage fees = _getFeesStorage();
136148
fees._withdrawDonationFees(amount);
137149
}

packages/contracts/src/Core/Fees/FeesLib.sol

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ library FeesLib {
5353
* Withdraws all fees (revenue to admins)
5454
* @param feesStorage the storage to use
5555
*/
56-
function _withdrawAll(FeesStorage.Fees storage feesStorage) internal {
56+
function _withdrawAll(
57+
FeesStorage.Fees storage feesStorage
58+
) internal {
5759
uint256 donationsFees = feesStorage._donationFees;
5860
uint256 endorsementsFees = feesStorage._endorsementFees;
5961
feesStorage._donationFees = 0;
@@ -92,11 +94,9 @@ library FeesLib {
9294
* @dev retrieves the donation fees balance from the storage
9395
* @return balance of the fees received by donations
9496
*/
95-
function _getEndorsementsFeesBalance(FeesStorage.Fees storage feesStorage)
96-
internal
97-
view
98-
returns (uint256 balance)
99-
{
97+
function _getEndorsementsFeesBalance(
98+
FeesStorage.Fees storage feesStorage
99+
) internal view returns (uint256 balance) {
100100
return feesStorage._endorsementFees;
101101
}
102102

@@ -106,7 +106,9 @@ library FeesLib {
106106
* @dev retrieves the donation fees balance from the storage
107107
* @return balance of the fees received by donations
108108
*/
109-
function _getDonationsFeesBalance(FeesStorage.Fees storage feesStorage) internal view returns (uint256 balance) {
109+
function _getDonationsFeesBalance(
110+
FeesStorage.Fees storage feesStorage
111+
) internal view returns (uint256 balance) {
110112
return feesStorage._donationFees;
111113
}
112114

@@ -116,7 +118,9 @@ library FeesLib {
116118
* @dev retrieves the total fees balance from the storage
117119
* @return balance of the fees received by donations and endorsements
118120
*/
119-
function _getTotalFeesBalance(FeesStorage.Fees storage feesStorage) internal view returns (uint256 balance) {
121+
function _getTotalFeesBalance(
122+
FeesStorage.Fees storage feesStorage
123+
) internal view returns (uint256 balance) {
120124
return feesStorage._endorsementFees + feesStorage._donationFees;
121125
}
122126

@@ -125,7 +129,9 @@ library FeesLib {
125129
* @param feesStorage the storage to use
126130
* @dev retrieves the endorsement price from the storage
127131
*/
128-
function _getEndorsementPrice(FeesStorage.Fees storage feesStorage) internal view returns (uint256 price) {
132+
function _getEndorsementPrice(
133+
FeesStorage.Fees storage feesStorage
134+
) internal view returns (uint256 price) {
129135
return feesStorage._endorsementPrice;
130136
}
131137

@@ -134,11 +140,9 @@ library FeesLib {
134140
* @param feesStorage the storage to use
135141
* @dev retrieves the donation fee percentage from the storage
136142
*/
137-
function _getDonationFeePercentage(FeesStorage.Fees storage feesStorage)
138-
internal
139-
view
140-
returns (uint256 percentage)
141-
{
143+
function _getDonationFeePercentage(
144+
FeesStorage.Fees storage feesStorage
145+
) internal view returns (uint256 percentage) {
142146
return feesStorage._donationFeePercentage;
143147
}
144148

packages/contracts/src/Core/interfaces/IEESCore.sol

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ interface IEESCore {
4343
* @dev retrieves the balance from the storage
4444
* @return balance balance of the given account
4545
*/
46-
function getBalance(address account) external view returns (uint256 balance);
46+
function getBalance(
47+
address account
48+
) external view returns (uint256 balance);
4749

4850
/**
4951
* @notice Withdraws all revenue received as fees from endorsements and donations
@@ -54,13 +56,17 @@ interface IEESCore {
5456
* @notice Withdraws the fees from endorsements
5557
* @param amount The amount of fees to withdraw
5658
*/
57-
function withdrawEndorsementFees(uint256 amount) external;
59+
function withdrawEndorsementFees(
60+
uint256 amount
61+
) external;
5862

5963
/**
6064
* @notice Withdraws the fees from donations
6165
* @param amount The amount of fees to withdraw
6266
*/
63-
function withdrawDonationFees(uint256 amount) external;
67+
function withdrawDonationFees(
68+
uint256 amount
69+
) external;
6470

6571
/**
6672
* @notice Set donation fee percentage
@@ -69,13 +75,17 @@ interface IEESCore {
6975
* 1% = 100,
7076
* 100% = 10_000
7177
*/
72-
function setDonationFeePercentage(uint256 newFee) external;
78+
function setDonationFeePercentage(
79+
uint256 newFee
80+
) external;
7381

7482
/**
7583
* @notice Set the endorsement price
7684
* @param newPrice The new endorsement price
7785
*/
78-
function setEndorsementPrice(uint256 newPrice) external;
86+
function setEndorsementPrice(
87+
uint256 newPrice
88+
) external;
7989

8090
/**
8191
* @notice Returns the balance of the given account
@@ -101,13 +111,17 @@ interface IEESCore {
101111
* @notice Set new core EAS deployment address
102112
* @param newAddress The new EAS address
103113
*/
104-
function setNewEasAddress(address newAddress) external;
114+
function setNewEasAddress(
115+
address newAddress
116+
) external;
105117

106118
/**
107119
* @notice Set new EAS Schema UID
108120
* @param newSchemaUid The new Schema UID
109121
*/
110-
function setNewSchemaUid(bytes32 newSchemaUid) external;
122+
function setNewSchemaUid(
123+
bytes32 newSchemaUid
124+
) external;
111125

112126
/**
113127
* @notice Returns the endorsement price

0 commit comments

Comments
 (0)