mirror of
https://github.com/Instadapp/dsa-connectors.git
synced 2024-07-29 22:37:00 +00:00
fixed checks (#181)
* fixed checks * updated sushi incentive comments * fixed index.ts errors * removed yarn.lock since it is not used anywhere, updated gh actions config and package-lock.json Co-authored-by: Ishan Jain <contact@ishanjain.me> Co-authored-by: Prayuman Verma <pradyumnverma27@gmail.com>
This commit is contained in:
parent
010af63368
commit
4800889442
4
.github/workflows/status.yml
vendored
4
.github/workflows/status.yml
vendored
|
@ -6,7 +6,7 @@ on:
|
|||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
permissions:
|
||||
contents: write
|
||||
strategy:
|
||||
matrix:
|
||||
|
@ -33,7 +33,7 @@ jobs:
|
|||
id: status_check
|
||||
run: |
|
||||
# Run status checks, Remove ANSI colors from the text
|
||||
output=$(ts-node ./status-checks/index.ts | sed 's/\x1B\[[0-9;]\{1,\}[A-Za-z]//g')
|
||||
output=$(npx ts-node ./status-checks/index.ts | sed 's/\x1B\[[0-9;]\{1,\}[A-Za-z]//g')
|
||||
# Escape newlines so _all_ the output is included in the set-output
|
||||
output="${output//'%'/'%25'}"
|
||||
output="${output//$'\n'/'%0A'}"
|
||||
|
|
|
@ -20,6 +20,7 @@ abstract contract SushipswapIncentiveResolver is Helpers, Events {
|
|||
* @param amount amount of LP token
|
||||
* @param getId ID to retrieve amount
|
||||
* @param setId ID stores Pool ID
|
||||
* @param data the metadata struct
|
||||
*/
|
||||
function deposit(
|
||||
address token1,
|
||||
|
@ -66,6 +67,7 @@ abstract contract SushipswapIncentiveResolver is Helpers, Events {
|
|||
* @param amount amount of LP token
|
||||
* @param getId ID to retrieve amount
|
||||
* @param setId ID stores Pool ID
|
||||
* @param data the metadata struct
|
||||
*/
|
||||
function withdraw(
|
||||
address token1,
|
||||
|
@ -104,6 +106,7 @@ abstract contract SushipswapIncentiveResolver is Helpers, Events {
|
|||
* @param token1 token1 deposited of LP token
|
||||
* @param token2 token2 deposited LP token
|
||||
* @param setId ID stores Pool ID
|
||||
* @param data the metadata struct
|
||||
*/
|
||||
function harvest(
|
||||
address token1,
|
||||
|
@ -143,6 +146,7 @@ abstract contract SushipswapIncentiveResolver is Helpers, Events {
|
|||
* @param amount amount of LP token
|
||||
* @param getId ID to retrieve amount
|
||||
* @param setId ID stores Pool ID
|
||||
* @param data the metadata struct
|
||||
*/
|
||||
function withdrawAndHarvest(
|
||||
address token1,
|
||||
|
@ -183,6 +187,7 @@ abstract contract SushipswapIncentiveResolver is Helpers, Events {
|
|||
* @param token1 token1 deposited of LP token
|
||||
* @param token2 token2 deposited LP token
|
||||
* @param setId ID stores Pool ID
|
||||
* @param data the metadata struct
|
||||
*/
|
||||
function emergencyWithdraw(
|
||||
address token1,
|
||||
|
|
2400
package-lock.json
generated
2400
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
|
@ -6,9 +6,9 @@
|
|||
"scripts": {
|
||||
"test": "hardhat run scripts/tests/global-test.ts",
|
||||
"coverage": "./node_modules/.bin/solidity-coverage",
|
||||
"check": "ts-node status-checks/huskyCheck.ts",
|
||||
"check-husky": "ts-node status-checks/huskyCheck.ts",
|
||||
"deploy": "node scripts/deployConnectorsFromCmd.js",
|
||||
"check": "ts-node status-checks/huskyCheck.ts",
|
||||
"check-husky": "ts-node status-checks/huskyCheck.ts",
|
||||
"deploy": "ts-node scripts/deployConnectorsFromCmd.ts",
|
||||
"test:runner": "hardhat run scripts/tests/run-tests.ts",
|
||||
"typechain": "hardhat typechain",
|
||||
"compile": "hardhat compile",
|
||||
|
|
|
@ -317,7 +317,7 @@ const checkComments = async (connector:any) => {
|
|||
}
|
||||
const reqs = ["@dev", "@notice"];
|
||||
for (let i3 = 0; i3 < reqs.length; i3++) {
|
||||
if (!func.comments.some((comment:string) => comment.startsWith(reqs[i3]))) {
|
||||
if (!func.comments.some((comment: string) => comment.startsWith(reqs[i3]))) {
|
||||
errors.push(
|
||||
`no ${reqs[i3]} for function ${func.name} at ${connector.path}/main.sol:${func.firstLine}`
|
||||
);
|
||||
|
|
|
@ -3,7 +3,7 @@ import fetch from "node-fetch";
|
|||
|
||||
import checks from "./checks";
|
||||
|
||||
const [owner, repo] = process.env.GITHUB_REPOSITORY.split("/");
|
||||
const [owner, repo] = String(process.env.GITHUB_REPOSITORY).split("/");
|
||||
|
||||
function getCurrentCommitSha() {
|
||||
return cp
|
||||
|
@ -45,7 +45,7 @@ async function setStatus(context: any, state: string, description: string) {
|
|||
try {
|
||||
const response = await callback();
|
||||
await setStatus(name, "success", response);
|
||||
} catch (err) {
|
||||
} catch (err: any) {
|
||||
const message = err ? err.message : "Something went wrong";
|
||||
await setStatus(name, "failure", message);
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
"tasks/**/*",
|
||||
"test/**/*",
|
||||
"typechain/**/*",
|
||||
"types/**/*"
|
||||
"types/**/*",
|
||||
"status-checks/*"
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user