mirror of
https://github.com/Instadapp/Gelato-automations.git
synced 2024-07-29 22:28:07 +00:00
chore: solhint glob
This commit is contained in:
parent
e5e627ee29
commit
f98dc798da
|
@ -3,10 +3,17 @@
|
||||||
"plugins": ["prettier"],
|
"plugins": ["prettier"],
|
||||||
"rules": {
|
"rules": {
|
||||||
"prettier/prettier": "error",
|
"prettier/prettier": "error",
|
||||||
"code-complexity": ["warn", 5],
|
"code-complexity": ["error", 5],
|
||||||
"function-max-lines": ["warn", 40],
|
"function-max-lines": ["error", 40],
|
||||||
"max-states-count": ["warn", 3],
|
"max-line-length": ["error", 100],
|
||||||
|
"max-states-count": ["error", 3],
|
||||||
|
"no-empty-blocks": "error",
|
||||||
|
"no-unused-vars": "error",
|
||||||
|
"payable-fallback": "off",
|
||||||
"reason-string": ["off", {"maxLength": 32}],
|
"reason-string": ["off", {"maxLength": 32}],
|
||||||
|
"constructor-syntax": "off",
|
||||||
|
"comprehensive-interface": "off",
|
||||||
|
"quotes": ["error", "double"],
|
||||||
"const-name-snakecase": "error",
|
"const-name-snakecase": "error",
|
||||||
"contract-name-camelcase": "error",
|
"contract-name-camelcase": "error",
|
||||||
"event-name-camelcase": "error",
|
"event-name-camelcase": "error",
|
||||||
|
@ -15,13 +22,25 @@
|
||||||
"modifier-name-mixedcase": "error",
|
"modifier-name-mixedcase": "error",
|
||||||
"private-vars-leading-underscore": ["error", {"strict": false}],
|
"private-vars-leading-underscore": ["error", {"strict": false}],
|
||||||
"var-name-mixedcase": "error",
|
"var-name-mixedcase": "error",
|
||||||
"ordering": "warn",
|
"imports-on-top": "error",
|
||||||
|
"ordering": "error",
|
||||||
"visibility-modifier-order": "error",
|
"visibility-modifier-order": "error",
|
||||||
"avoid-call-value": "off",
|
"avoid-call-value": "off",
|
||||||
"avoid-low-level-calls": "off",
|
"avoid-low-level-calls": "off",
|
||||||
"compiler-version": ["warn", "0.7.4"],
|
"avoid-sha3": "error",
|
||||||
|
"avoid-suicide": "error",
|
||||||
|
"avoid-throw": "error",
|
||||||
|
"avoid-tx-origin": "off",
|
||||||
|
"check-send-result": "error",
|
||||||
|
"compiler-version": ["error", "0.7.4"],
|
||||||
|
"mark-callable-contracts": "off",
|
||||||
"func-visibility": ["error", {"ignoreConstructors": true}],
|
"func-visibility": ["error", {"ignoreConstructors": true}],
|
||||||
|
"multiple-sends": "error",
|
||||||
|
"no-complex-fallback": "error",
|
||||||
"no-inline-assembly": "off",
|
"no-inline-assembly": "off",
|
||||||
|
"not-rely-on-block-hash": "error",
|
||||||
|
"not-rely-on-time": "error",
|
||||||
|
"reentrancy": "error",
|
||||||
"state-visibility": "error"
|
"state-visibility": "error"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,6 +119,8 @@ contract ConnectGelatoDataForFullRefinance is ConnectorInterface {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* solhint-disable function-max-lines */
|
||||||
|
|
||||||
/// @notice Generate Task for a full refinancing between Maker to Compound.
|
/// @notice Generate Task for a full refinancing between Maker to Compound.
|
||||||
/// @param _vaultId Id of the unsafe vault of the client.
|
/// @param _vaultId Id of the unsafe vault of the client.
|
||||||
/// @param _token vault's col token address .
|
/// @param _token vault's col token address .
|
||||||
|
@ -176,7 +178,7 @@ contract ConnectGelatoDataForFullRefinance is ConnectorInterface {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @notice Generate Task for a full refinancing between Maker (exemple : ETH-A) to Maker (exemple: ETH-B).
|
/// @notice Generate Task for a full refinancing between Maker e.g. ETH-A to ETH-B.
|
||||||
/// @param _vaultId Id of the unsafe vault of the client.
|
/// @param _vaultId Id of the unsafe vault of the client.
|
||||||
/// @param _token vault's col token address .
|
/// @param _token vault's col token address .
|
||||||
/// @param _colType colType of the new vault, exemple : ETH-B, ETH-A.
|
/// @param _colType colType of the new vault, exemple : ETH-B, ETH-A.
|
||||||
|
@ -236,4 +238,6 @@ contract ConnectGelatoDataForFullRefinance is ConnectorInterface {
|
||||||
abi.encode(_targets, _datas)
|
abi.encode(_targets, _datas)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* solhint-enable function-max-lines */
|
||||||
}
|
}
|
||||||
|
|
|
@ -120,6 +120,8 @@ contract ConnectGelatoDataForPartialRefinance is ConnectorInterface {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* solhint-disable function-max-lines */
|
||||||
|
|
||||||
/// @notice Generate Task for a full refinancing between Maker to Compound.
|
/// @notice Generate Task for a full refinancing between Maker to Compound.
|
||||||
/// @param _payload contain :
|
/// @param _payload contain :
|
||||||
// @param _vaultId Id of the unsafe vault of the client.
|
// @param _vaultId Id of the unsafe vault of the client.
|
||||||
|
@ -198,7 +200,7 @@ contract ConnectGelatoDataForPartialRefinance is ConnectorInterface {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @notice Generate Task for a full refinancing between Maker (exemple : ETH-A) to Maker (exemple: ETH-B).
|
/// @notice Generate Task for a full refinancing between Maker e.g. ETH-A and ETH-B.
|
||||||
/// @param _payload contain :
|
/// @param _payload contain :
|
||||||
// @param _vaultId Id of the unsafe vault of the client.
|
// @param _vaultId Id of the unsafe vault of the client.
|
||||||
// @param _token vault's col token address .
|
// @param _token vault's col token address .
|
||||||
|
@ -289,7 +291,8 @@ contract ConnectGelatoDataForPartialRefinance is ConnectorInterface {
|
||||||
/// e.g. Maker's ETH/USD oracle for ETH collateral pricing.
|
/// e.g. Maker's ETH/USD oracle for ETH collateral pricing.
|
||||||
/// @param _oraclePayload The data for making the staticcall to the oracle's read
|
/// @param _oraclePayload The data for making the staticcall to the oracle's read
|
||||||
/// method e.g. the function selector of MakerOracle's read function.
|
/// method e.g. the function selector of MakerOracle's read function.
|
||||||
/// @return wDaiDebtToMove DAI Debt (wad) to: flashBorrow->repay Maker->withdraw from B->flashPayback.
|
/// @return wDaiDebtToMove DAI Debt (wad) to:
|
||||||
|
/// flashBorrow->repay Maker->withdraw from B->flashPayback.
|
||||||
/// @return wColToWithdrawFromMaker (wad) to: withdraw from Maker and deposit on B.
|
/// @return wColToWithdrawFromMaker (wad) to: withdraw from Maker and deposit on B.
|
||||||
/// @return gasFeesPaidFromCol Gelato automation-gas-fees paid from user's collateral
|
/// @return gasFeesPaidFromCol Gelato automation-gas-fees paid from user's collateral
|
||||||
// solhint-disable function-max-lines
|
// solhint-disable function-max-lines
|
||||||
|
@ -352,4 +355,6 @@ contract ConnectGelatoDataForPartialRefinance is ConnectorInterface {
|
||||||
wDaiDebtOnMaker
|
wDaiDebtOnMaker
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* solhint-enable function-max-lines */
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
"compile": "npx hardhat compile",
|
"compile": "npx hardhat compile",
|
||||||
"format": "prettier --write .",
|
"format": "prettier --write .",
|
||||||
"lint": "eslint --cache . && yarn lint:sol",
|
"lint": "eslint --cache . && yarn lint:sol",
|
||||||
"lint:sol": "solhint contracts/**/**/**/**/**/**/**/*.sol",
|
"lint:sol": "solhint 'contracts/**/*.sol'",
|
||||||
"lint:fix": "eslint --cache --fix . && solhint --fix contracts/**/*.sol",
|
"lint:fix": "eslint --cache --fix . && solhint --fix contracts/**/*.sol",
|
||||||
"test": "yarn compile && npx hardhat test",
|
"test": "yarn compile && npx hardhat test",
|
||||||
"debug": "DEBUG=true yarn compile && npx hardhat test"
|
"debug": "DEBUG=true yarn compile && npx hardhat test"
|
||||||
|
@ -42,6 +42,7 @@
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*.js": "eslint --cache --fix",
|
"*.js": "eslint --cache --fix",
|
||||||
|
"*.sol": "solhint",
|
||||||
"*.{js,sol,css,md}": "prettier --write"
|
"*.{js,sol,css,md}": "prettier --write"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user