Skip to content

Commit f3ac41b

Browse files
committed
feat: add new leverage for new mintMarkets
feat: add new leverage for new mintMarkets
1 parent 592128e commit f3ac41b

File tree

5 files changed

+1270
-92
lines changed

5 files changed

+1270
-92
lines changed

.eslintrc.js

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
browser: true,
5+
es6: true,
6+
},
7+
parser: "vue-eslint-parser",
8+
parserOptions: {
9+
parser: "babel-eslint",
10+
ecmaVersion: 5,
11+
sourceType: "module",
12+
},
13+
extends: [
14+
"eslint:recommended",
15+
"plugin:@typescript-eslint/eslint-recommended",
16+
"plugin:@typescript-eslint/recommended",
17+
],
18+
plugins: ["@typescript-eslint"],
19+
rules: {
20+
"func-names": 0,
21+
"no-nested-ternary": 0,
22+
"max-len": 0,
23+
"arrow-parens": ["error", "always"],
24+
"no-underscore-dangle": 0,
25+
"comma-dangle": [
26+
"error",
27+
{
28+
arrays: "always-multiline",
29+
objects: "always-multiline",
30+
imports: "always-multiline",
31+
exports: "always-multiline",
32+
functions: "never",
33+
},
34+
],
35+
"no-use-before-define": ["error", "nofunc"],
36+
"no-empty": ["error", { allowEmptyCatch: true }],
37+
"no-mixed-operators": ["error", { allowSamePrecedence: true }],
38+
indent: ["error", 4, { flatTernaryExpressions: true, SwitchCase: 1 }],
39+
"@typescript-eslint/no-explicit-any": "warn",
40+
"@typescript-eslint/ban-ts-comment": "off",
41+
},
42+
overrides: [
43+
{
44+
files: ["**/*.ts", "**/*.tsx"],
45+
parser: "@typescript-eslint/parser",
46+
parserOptions: {
47+
ecmaVersion: 2020,
48+
sourceType: "module",
49+
},
50+
},
51+
],
52+
};

src/interfaces.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ export interface ILlamma {
3333
default_bands: number,
3434
A: number,
3535
monetary_policy_abi: any
36+
is_new_market?: boolean
37+
index?: number
3638
}
3739

3840
export interface ICoin {

src/llamalend.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ class Llamalend implements ILlamalend {
465465
controller_address: controllers[i],
466466
monetary_policy_address,
467467
collateral_address: is_eth ? "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" : collaterals[i],
468-
leverage_zap: "0x0000000000000000000000000000000000000000",
468+
leverage_zap: this.constants.ALIASES.leverage_zap,
469469
deleverage_zap: "0x0000000000000000000000000000000000000000",
470470
collateral_symbol: is_eth ? "ETH" : collateral_symbol,
471471
collateral_decimals,
@@ -474,6 +474,8 @@ class Llamalend implements ILlamalend {
474474
default_bands: 10,
475475
A: AParams[i],
476476
monetary_policy_abi: MonetaryPolicy2ABI,
477+
is_new_market: true,
478+
index: N1 + i,
477479
}
478480
}
479481
}

0 commit comments

Comments
 (0)