mirror of
https://github.com/vacp2p/staking-reward-streamer.git
synced 2026-01-06 22:14:05 -05:00
chore(forge fmt): change line lenght to 119 to avoid conflicts with solhint
This commit is contained in:
committed by
r4bbit
parent
83d8574867
commit
753e379682
@@ -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"
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user