Skip to content

Commit

Permalink
feat: linter updates
Browse files Browse the repository at this point in the history
  • Loading branch information
kyriediculous committed Nov 30, 2023
1 parent 5ba6eeb commit dbfc3af
Show file tree
Hide file tree
Showing 14 changed files with 27 additions and 9 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
},
"scripts": {
"clean": "rimraf cache out",
"lint": "yarn lint:sol && yarn prettier:check",
"lint:sol": "forge fmt --check && yarn solhint \"{src,test}/**/*.sol\"",
"lint": "yarn lint:sol && yarn prettier:write",
"lint:sol": "yarn solhint \"{src,test,script}/**/*.sol\"",
"postinstall": "husky install",
"prettier:check": "prettier --check \"**/*.{json,md,yml}\"",
"prettier:write": "prettier --write \"**/*.{json,md,yml}\""
Expand Down
2 changes: 2 additions & 0 deletions script/Adapter_Deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
//
// Copyright (c) Tenderize Labs Ltd

// solhint-disable no-console

pragma solidity >=0.8.19;

import { Script } from "forge-std/Script.sol";
Expand Down
2 changes: 2 additions & 0 deletions script/Tenderize_Deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
//
// Copyright (c) Tenderize Labs Ltd

// solhint-disable no-console

pragma solidity >=0.8.19;

import { Script, console2 } from "forge-std/Script.sol";
Expand Down
2 changes: 2 additions & 0 deletions script/XYZ_Data.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
//
// Copyright (c) Tenderize Labs Ltd

// solhint-disable no-console

pragma solidity >=0.8.19;

import { Script, console2 } from "forge-std/Script.sol";
Expand Down
2 changes: 2 additions & 0 deletions script/XYZ_Deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
//
// Copyright (c) Tenderize Labs Ltd

// solhint-disable no-console

pragma solidity >=0.8.19;

import { Script, console2 } from "forge-std/Script.sol";
Expand Down
2 changes: 2 additions & 0 deletions script/XYZ_Faucet.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
//
// Copyright (c) Tenderize Labs Ltd

// solhint-disable no-console

pragma solidity >=0.8.19;

import { Script, console2 } from "forge-std/Script.sol";
Expand Down
1 change: 1 addition & 0 deletions src/adapters/PolygonAdapter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ contract PolygonAdapter is Adapter {

// This call will revert if there are no rewards
// In which case we don't throw, just return the current staked amount.
// solhint-disable-next-line no-empty-blocks
try validatorShares.restake() { }
catch {
return currentStake;
Expand Down
2 changes: 2 additions & 0 deletions src/adapters/interfaces/IPolygon.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

// SPDX-License-Identifier: MIT

// solhint-disable func-name-mixedcase

pragma solidity >=0.8.19;

struct DelegatorUnbond {
Expand Down
1 change: 1 addition & 0 deletions src/tenderizer/Tenderizer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ contract Tenderizer is TenderizerImmutableArgs, TenderizerEvents, TToken, Multic
uint256 private constant MAX_FEE = 0.005e6; // 0.5%
uint256 private constant FEE_BASE = 1e6;

// solhint-disable-next-line no-empty-blocks
constructor(address _registry, address _unlocks) TenderizerImmutableArgs(_registry, _unlocks) { }

// @inheritdoc TToken
Expand Down
8 changes: 4 additions & 4 deletions src/utils/TWAP.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@

pragma solidity >=0.8.19;

import "@uniswap/v3-core/interfaces/IUniswapV3Pool.sol";
import "@uniswap/v3-core/libraries/TickMath.sol";
import "@uniswap/v3-core/libraries/FixedPoint96.sol";
import "@uniswap/v3-core/libraries/FullMath.sol";
import { IUniswapV3Pool } from "@uniswap/v3-core/interfaces/IUniswapV3Pool.sol";
import { TickMath } from "@uniswap/v3-core/libraries/TickMath.sol";
import { FixedPoint96 } from "@uniswap/v3-core/libraries/FixedPoint96.sol";
import { FullMath } from "@uniswap/v3-core/libraries/FullMath.sol";

library TWAP {
function getSqrtTwapX96(address uniswapV3Pool, uint32 twapInterval) internal view returns (uint160 sqrtPriceX96) {
Expand Down
3 changes: 3 additions & 0 deletions test/adapters/PolygonAdapter.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
//
// Copyright (c) Tenderize Labs Ltd

// solhint-disable state-visibility
// solhint-disable func-name-mixedcase

pragma solidity >=0.8.19;

import { Test, stdError } from "forge-std/Test.sol";
Expand Down
2 changes: 1 addition & 1 deletion test/helpers/StakingXYZ.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { MockERC20 } from "solmate/test/utils/mocks/MockERC20.sol";
pragma solidity >=0.8.19;

contract StakingXYZ {
address immutable token;
address private immutable token;
uint256 public nextRewardTimeStamp;

uint256 public immutable APR;
Expand Down
4 changes: 2 additions & 2 deletions test/helpers/XYZAdapter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import { StakingXYZ } from "./StakingXYZ.sol";
pragma solidity >=0.8.19;

contract XYZAdapter is Adapter {
address immutable STAKINGXYZ;
address immutable XYZ_TOKEN;
address private immutable STAKINGXYZ;
address private immutable XYZ_TOKEN;

constructor(address _stakingXYZ, address _xyz) {
STAKINGXYZ = _stakingXYZ;
Expand Down
1 change: 1 addition & 0 deletions test/tenderizer/Tenderizer.harness.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { Unlocks } from "core/unlocks/Unlocks.sol";
import { Registry } from "core/registry/Registry.sol";

// solhint-disable func-name-mixedcase
// solhint-disable no-empty-blocks

contract TenderizerHarness is Tenderizer {
constructor(address _registry, address _unlocks) Tenderizer(_registry, _unlocks) { }
Expand Down

0 comments on commit dbfc3af

Please sign in to comment.