chore(forge fmt): change line lenght to 119 to avoid conflicts with solhint

This commit is contained in:
Ricardo Guilherme Schmidt
2025-06-03 22:40:47 -03:00
committed by r4bbit
parent 83d8574867
commit 753e379682
7 changed files with 37 additions and 7 deletions

View File

@@ -35,7 +35,7 @@
[fmt]
bracket_spacing = true
int_types = "long"
line_length = 120
line_length = 119
multiline_func_header = "all"
number_underscore = "thousands"
quote_style = "double"

View File

@@ -27,7 +27,9 @@ abstract contract BaseNFTMetadataGenerator is INFTMetadataGenerator, Ownable {
string memory propName = string(abi.encodePacked(baseName, Strings.toHexString(account)));
string memory propDescription = string(
abi.encodePacked(baseDescription, Strings.toHexString(account), " with balance ", Strings.toString(balance))
abi.encodePacked(
baseDescription, Strings.toHexString(account), " with balance ", Strings.toString(balance)
)
);
(string memory imageField, string memory imageURI) = generateImageURI(account, balance);

View File

@@ -36,7 +36,15 @@ contract NFTMetadataGeneratorSVG is BaseNFTMetadataGenerator {
* @notice Generates the image URI for the NFT based on the owner's address and balance
* @param balance The balance of the NFT owner
*/
function generateImageURI(address, uint256 balance) internal view override returns (string memory, string memory) {
function generateImageURI(
address,
uint256 balance
)
internal
view
override
returns (string memory, string memory)
{
string memory text = Strings.toString(balance / 1e18);
bytes memory svg = abi.encodePacked(imagePrefix, text, imageSuffix);

View File

@@ -34,7 +34,15 @@ contract NFTMetadataGeneratorURL is BaseNFTMetadataGenerator {
* @notice Generates the image URI for the NFT based on the owner's address and balance
* @param account The address of the NFT owner
*/
function generateImageURI(address account, uint256) internal view override returns (string memory, string memory) {
function generateImageURI(
address account,
uint256
)
internal
view
override
returns (string memory, string memory)
{
return ("image", string(abi.encodePacked(urlPrefix, Strings.toHexString(account), urlSuffix)));
}
}

View File

@@ -122,7 +122,9 @@ contract RLN {
require(index < SET_SIZE, "RLN, register: set is full");
require(amount >= MINIMAL_DEPOSIT, "RLN, register: amount is lower than minimal deposit");
require(amount % MINIMAL_DEPOSIT == 0, "RLN, register: amount should be a multiple of minimal deposit");
require(members[identityCommitment].userAddress == address(0), "RLN, register: idCommitment already registered");
require(
members[identityCommitment].userAddress == address(0), "RLN, register: idCommitment already registered"
);
uint256 messageLimit = amount / MINIMAL_DEPOSIT;
require(messageLimit <= MAXIMAL_RATE, "RLN, register: message limit cannot be more than MAXIMAL_RATE");

View File

@@ -232,7 +232,9 @@ contract MathTest is StakeManagerTest {
assertEq(_maxTotalMP(10e18, 0), 50e18, "wrong max total MP");
assertEq(_maxTotalMP(10e18, streamer.MIN_LOCKUP_PERIOD()), 52_465_753_424_657_534_246, "wrong max total MP");
assertEq(
_maxTotalMP(10e18, streamer.MIN_LOCKUP_PERIOD() + 13 days), 52_821_917_808_219_178_082, "wrong max total MP"
_maxTotalMP(10e18, streamer.MIN_LOCKUP_PERIOD() + 13 days),
52_821_917_808_219_178_082,
"wrong max total MP"
);
assertEq(_maxTotalMP(100e18, 0), 500e18, "wrong max total MP");
}

View File

@@ -11,7 +11,15 @@ contract MockMetadataGenerator is BaseNFTMetadataGenerator {
_baseURI = baseURI;
}
function generateImageURI(address account, uint256) internal view override returns (string memory, string memory) {
function generateImageURI(
address account,
uint256
)
internal
view
override
returns (string memory, string memory)
{
bytes memory uri = abi.encodePacked(_baseURI, Strings.toHexString(account));
return ("image", string(uri));
}