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
2
.github/workflows/status.yml
vendored
2
.github/workflows/status.yml
vendored
|
@ -33,7 +33,7 @@ jobs:
|
||||||
id: status_check
|
id: status_check
|
||||||
run: |
|
run: |
|
||||||
# Run status checks, Remove ANSI colors from the text
|
# 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
|
# Escape newlines so _all_ the output is included in the set-output
|
||||||
output="${output//'%'/'%25'}"
|
output="${output//'%'/'%25'}"
|
||||||
output="${output//$'\n'/'%0A'}"
|
output="${output//$'\n'/'%0A'}"
|
||||||
|
|
|
@ -20,6 +20,7 @@ abstract contract SushipswapIncentiveResolver is Helpers, Events {
|
||||||
* @param amount amount of LP token
|
* @param amount amount of LP token
|
||||||
* @param getId ID to retrieve amount
|
* @param getId ID to retrieve amount
|
||||||
* @param setId ID stores Pool ID
|
* @param setId ID stores Pool ID
|
||||||
|
* @param data the metadata struct
|
||||||
*/
|
*/
|
||||||
function deposit(
|
function deposit(
|
||||||
address token1,
|
address token1,
|
||||||
|
@ -66,6 +67,7 @@ abstract contract SushipswapIncentiveResolver is Helpers, Events {
|
||||||
* @param amount amount of LP token
|
* @param amount amount of LP token
|
||||||
* @param getId ID to retrieve amount
|
* @param getId ID to retrieve amount
|
||||||
* @param setId ID stores Pool ID
|
* @param setId ID stores Pool ID
|
||||||
|
* @param data the metadata struct
|
||||||
*/
|
*/
|
||||||
function withdraw(
|
function withdraw(
|
||||||
address token1,
|
address token1,
|
||||||
|
@ -104,6 +106,7 @@ abstract contract SushipswapIncentiveResolver is Helpers, Events {
|
||||||
* @param token1 token1 deposited of LP token
|
* @param token1 token1 deposited of LP token
|
||||||
* @param token2 token2 deposited LP token
|
* @param token2 token2 deposited LP token
|
||||||
* @param setId ID stores Pool ID
|
* @param setId ID stores Pool ID
|
||||||
|
* @param data the metadata struct
|
||||||
*/
|
*/
|
||||||
function harvest(
|
function harvest(
|
||||||
address token1,
|
address token1,
|
||||||
|
@ -143,6 +146,7 @@ abstract contract SushipswapIncentiveResolver is Helpers, Events {
|
||||||
* @param amount amount of LP token
|
* @param amount amount of LP token
|
||||||
* @param getId ID to retrieve amount
|
* @param getId ID to retrieve amount
|
||||||
* @param setId ID stores Pool ID
|
* @param setId ID stores Pool ID
|
||||||
|
* @param data the metadata struct
|
||||||
*/
|
*/
|
||||||
function withdrawAndHarvest(
|
function withdrawAndHarvest(
|
||||||
address token1,
|
address token1,
|
||||||
|
@ -183,6 +187,7 @@ abstract contract SushipswapIncentiveResolver is Helpers, Events {
|
||||||
* @param token1 token1 deposited of LP token
|
* @param token1 token1 deposited of LP token
|
||||||
* @param token2 token2 deposited LP token
|
* @param token2 token2 deposited LP token
|
||||||
* @param setId ID stores Pool ID
|
* @param setId ID stores Pool ID
|
||||||
|
* @param data the metadata struct
|
||||||
*/
|
*/
|
||||||
function emergencyWithdraw(
|
function emergencyWithdraw(
|
||||||
address token1,
|
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": {
|
"scripts": {
|
||||||
"test": "hardhat run scripts/tests/global-test.ts",
|
"test": "hardhat run scripts/tests/global-test.ts",
|
||||||
"coverage": "./node_modules/.bin/solidity-coverage",
|
"coverage": "./node_modules/.bin/solidity-coverage",
|
||||||
"check": "ts-node status-checks/huskyCheck.ts",
|
"check": "ts-node status-checks/huskyCheck.ts",
|
||||||
"check-husky": "ts-node status-checks/huskyCheck.ts",
|
"check-husky": "ts-node status-checks/huskyCheck.ts",
|
||||||
"deploy": "node scripts/deployConnectorsFromCmd.js",
|
"deploy": "ts-node scripts/deployConnectorsFromCmd.ts",
|
||||||
"test:runner": "hardhat run scripts/tests/run-tests.ts",
|
"test:runner": "hardhat run scripts/tests/run-tests.ts",
|
||||||
"typechain": "hardhat typechain",
|
"typechain": "hardhat typechain",
|
||||||
"compile": "hardhat compile",
|
"compile": "hardhat compile",
|
||||||
|
|
|
@ -317,7 +317,7 @@ const checkComments = async (connector:any) => {
|
||||||
}
|
}
|
||||||
const reqs = ["@dev", "@notice"];
|
const reqs = ["@dev", "@notice"];
|
||||||
for (let i3 = 0; i3 < reqs.length; i3++) {
|
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(
|
errors.push(
|
||||||
`no ${reqs[i3]} for function ${func.name} at ${connector.path}/main.sol:${func.firstLine}`
|
`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";
|
import checks from "./checks";
|
||||||
|
|
||||||
const [owner, repo] = process.env.GITHUB_REPOSITORY.split("/");
|
const [owner, repo] = String(process.env.GITHUB_REPOSITORY).split("/");
|
||||||
|
|
||||||
function getCurrentCommitSha() {
|
function getCurrentCommitSha() {
|
||||||
return cp
|
return cp
|
||||||
|
@ -45,7 +45,7 @@ async function setStatus(context: any, state: string, description: string) {
|
||||||
try {
|
try {
|
||||||
const response = await callback();
|
const response = await callback();
|
||||||
await setStatus(name, "success", response);
|
await setStatus(name, "success", response);
|
||||||
} catch (err) {
|
} catch (err: any) {
|
||||||
const message = err ? err.message : "Something went wrong";
|
const message = err ? err.message : "Something went wrong";
|
||||||
await setStatus(name, "failure", message);
|
await setStatus(name, "failure", message);
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
"tasks/**/*",
|
"tasks/**/*",
|
||||||
"test/**/*",
|
"test/**/*",
|
||||||
"typechain/**/*",
|
"typechain/**/*",
|
||||||
"types/**/*"
|
"types/**/*",
|
||||||
|
"status-checks/*"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user