Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(contracts-rfq): CI workflows [SLT-245] #3178

Merged
merged 11 commits into from
Sep 24, 2024
2 changes: 1 addition & 1 deletion packages/contracts-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@typechain/ethers-v5": "10.0.0",
"hardhat": "2.22.2",
"rimraf": "3.0.2",
"solhint": "3.3.8",
"solhint": "5.0.3",
"typechain": "8.0.0",
"typescript": "4.7.3"
},
Expand Down
13 changes: 12 additions & 1 deletion packages/contracts-rfq/.solhint.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
{
"extends": "solhint:recommended"
"extends": "solhint:recommended",
"rules": {
"code-complexity": ["error"],
"func-name-mixedcase": "error",
"func-visibility": ["error", { "ignoreConstructors": true }],
"gas-custom-errors": "off",
"immutable-vars-naming": ["error", { "immutablesAsConstants": false }],
"max-line-length": ["warn", 120],
"modifier-name-mixedcase": "error",
"ordering": "warn",
"var-name-mixedcase": "error"
}
ChiTimesChi marked this conversation as resolved.
Show resolved Hide resolved
}
5 changes: 5 additions & 0 deletions packages/contracts-rfq/.solhintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
contracts/FastBridge.sol
contracts/interfaces/IFastBridge.sol
script/FastBridge.s.sol
test/FastBridge.t.sol
test/FastBridgeMock.sol
ChiTimesChi marked this conversation as resolved.
Show resolved Hide resolved
24 changes: 9 additions & 15 deletions packages/contracts-rfq/package.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,30 @@
{
"name": "FastBridge",
"license": "UNLICENSED",
"name": "@synapsecns/contracts-rfq",
"license": "MIT",
"version": "0.4.1",
"description": "FastBridge contracts.",
"private": true,
"files": [
"src/*.sol"
"contracts/**/*.sol"
ChiTimesChi marked this conversation as resolved.
Show resolved Hide resolved
],
"dependencies": {
"@openzeppelin/contracts": "5.0.1"
},
"devDependencies": {
"@synapsecns/solidity-devops": "^0.4.5",
"prettier": "^2.5.1",
"prettier-plugin-solidity": "^1.0.0-beta.19",
"solhint": "^3.3.6"
"solhint": "5.0.3"
},
"scripts": {
"build": " ",
"build:contracts": "forge build",
"build:slither": "forge build --out=out --build-info --force",
"test:coverage": "echo 'Please use foundry'",
"test": "forge test",
"lint:contracts:fix": "forge fmt && solhint --fix -c .solhint.json '{contracts,script,test}/**/*.sol'",
"lint": "forge fmt && npm run prettier && npm run solhint",
"ci:lint": "yarn lint",
"lint": "forge fmt && npm run solhint",
"lint:check": "forge fmt --check && npm run solhint:check",
"ci:lint": "npm run lint:check",
"build:go": "./flatten.sh contracts/*.sol test/*.sol",
"prettier": "prettier --write **.sol",
"prettier:list": "prettier --list-different **.sol",
"prettier:check": "prettier --check **.sol",
"solhint": "solhint --config ./.solhint.json 'src/**/*.sol' --fix",
"solhint:check": "solhint --config ./.solhint.json 'src/**/*.sol'",
"lint:check": "npm run prettier:check && npm run solhint:check"
"solhint": "solhint '{contracts,script,test}/**/*.sol' --fix --noPrompt",
"solhint:check": "solhint '{contracts,script,test}/**/*.sol'"
}
}
2 changes: 1 addition & 1 deletion packages/contracts-rfq/test/FastBridgeV2.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {IAccessControl} from "@openzeppelin/contracts/access/IAccessControl.sol"
import {Test} from "forge-std/Test.sol";
import {stdStorage, StdStorage} from "forge-std/Test.sol";

// solhint-disable no-empty-blocks
// solhint-disable no-empty-blocks, ordering
abstract contract FastBridgeV2Test is Test {
using stdStorage for StdStorage;

Expand Down
8 changes: 4 additions & 4 deletions packages/contracts-rfq/test/MockERC20.sol
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ contract MockERC20 is ERC20 {
_decimals = decimals_;
}

function decimals() public view override returns (uint8) {
return _decimals;
}

function burn(address account, uint256 amount) external {
_burn(account, amount);
}

function mint(address account, uint256 amount) external {
_mint(account, amount);
}

function decimals() public view override returns (uint8) {
return _decimals;
}
}
1 change: 1 addition & 0 deletions packages/contracts-rfq/test/UniversalTokenLib.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {MockRevertingRecipient} from "./MockRevertingRecipient.sol";

import {Test} from "forge-std/Test.sol";

// solhint-disable ordering
contract UniversalTokenLibraryTest is Test {
UniversalTokenLibHarness public libHarness;
MockERC20 public token;
Expand Down
1 change: 1 addition & 0 deletions packages/contracts-rfq/test/UniversalTokenLibHarness.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ pragma solidity ^0.8.17;

import {UniversalTokenLib} from "../contracts/libs/UniversalToken.sol";

// solhint-disable ordering
contract UniversalTokenLibHarness {
function universalTransfer(address token, address to, uint256 value) public {
UniversalTokenLib.universalTransfer(token, to, value);
Expand Down
2 changes: 1 addition & 1 deletion packages/solidity-devops/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@
"vp": "js/verifyProxy.js"
},
"devDependencies": {
"solhint": "^4.5.4"
"solhint": "5.0.3"
}
}
Loading
Loading