@kasufinance/kasu-sdk 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +3 -0
- package/.eslintrc.json +90 -0
- package/.github/workflows/ci.yml +0 -0
- package/.github/workflows/main.yml +43 -0
- package/.prettierignore +3 -0
- package/.prettierrc +28 -0
- package/abis/IClearingCoordinator.abi.json +410 -0
- package/abis/IERC20Metadata.abi.json +224 -0
- package/abis/IFeeManager.abi.json +66 -0
- package/abis/IKSULocking.abi.json +754 -0
- package/abis/IKasuAllowList.abi.json +455 -0
- package/abis/IKasuController.abi.json +423 -0
- package/abis/IKasuNFTs.abi.json +1523 -0
- package/abis/IKsuPrice.abi.json +15 -0
- package/abis/ILendingPool.abi.json +1431 -0
- package/abis/ILendingPoolFactory.abi.json +97 -0
- package/abis/ILendingPoolManager.abi.json +1347 -0
- package/abis/ILendingPoolTranche.abi.json +1317 -0
- package/abis/IPriceFeed.abi.json +1 -0
- package/abis/ISystemVariables.abi.json +431 -0
- package/abis/IUserLoyaltyRewards.abi.json +288 -0
- package/abis/IUserManager.abi.json +321 -0
- package/abis/KSULockBonus.abi.json +91 -0
- package/abis/KasuPoolExternalTVL.abi.json +812 -0
- package/abis/Swapper.abi.json +146 -0
- package/copy-abi.ps1 +15 -0
- package/dist/bundle.cjs.js +21646 -0
- package/dist/bundle.esm.js +21644 -0
- package/dist/contracts/IClearingCoordinatorAbi.d.ts +169 -0
- package/dist/contracts/IClearingCoordinatorAbi.js +1 -0
- package/dist/contracts/IERC20MetadataAbi.d.ts +162 -0
- package/dist/contracts/IERC20MetadataAbi.js +1 -0
- package/dist/contracts/IFeeManagerAbi.d.ts +96 -0
- package/dist/contracts/IFeeManagerAbi.js +1 -0
- package/dist/contracts/IKSULockingAbi.d.ts +466 -0
- package/dist/contracts/IKSULockingAbi.js +1 -0
- package/dist/contracts/IKasuAllowListAbi.d.ts +304 -0
- package/dist/contracts/IKasuAllowListAbi.js +1 -0
- package/dist/contracts/IKasuControllerAbi.d.ts +309 -0
- package/dist/contracts/IKasuControllerAbi.js +1 -0
- package/dist/contracts/IKasuNFTsAbi.d.ts +1121 -0
- package/dist/contracts/IKasuNFTsAbi.js +1 -0
- package/dist/contracts/IKsuPriceAbi.d.ts +42 -0
- package/dist/contracts/IKsuPriceAbi.js +1 -0
- package/dist/contracts/ILendingPoolAbi.d.ts +968 -0
- package/dist/contracts/ILendingPoolAbi.js +1 -0
- package/dist/contracts/ILendingPoolFactoryAbi.d.ts +103 -0
- package/dist/contracts/ILendingPoolFactoryAbi.js +1 -0
- package/dist/contracts/ILendingPoolManagerAbi.d.ts +779 -0
- package/dist/contracts/ILendingPoolManagerAbi.js +1 -0
- package/dist/contracts/ILendingPoolTrancheAbi.d.ts +752 -0
- package/dist/contracts/ILendingPoolTrancheAbi.js +1 -0
- package/dist/contracts/ISystemVariablesAbi.d.ts +378 -0
- package/dist/contracts/ISystemVariablesAbi.js +1 -0
- package/dist/contracts/IUserLoyaltyRewardsAbi.d.ts +248 -0
- package/dist/contracts/IUserLoyaltyRewardsAbi.js +1 -0
- package/dist/contracts/IUserManagerAbi.d.ts +270 -0
- package/dist/contracts/IUserManagerAbi.js +1 -0
- package/dist/contracts/KSULockBonusAbi.d.ts +61 -0
- package/dist/contracts/KSULockBonusAbi.js +1 -0
- package/dist/contracts/KasuPoolExternalTVLAbi.d.ts +411 -0
- package/dist/contracts/KasuPoolExternalTVLAbi.js +1 -0
- package/dist/contracts/SwapperAbi.d.ts +120 -0
- package/dist/contracts/SwapperAbi.js +1 -0
- package/dist/contracts/common.d.ts +21 -0
- package/dist/contracts/common.js +1 -0
- package/dist/contracts/factories/IClearingCoordinatorAbi__factory.d.ts +320 -0
- package/dist/contracts/factories/IClearingCoordinatorAbi__factory.js +423 -0
- package/dist/contracts/factories/IERC20MetadataAbi__factory.d.ts +178 -0
- package/dist/contracts/factories/IERC20MetadataAbi__factory.js +237 -0
- package/dist/contracts/factories/IFeeManagerAbi__factory.d.ts +59 -0
- package/dist/contracts/factories/IFeeManagerAbi__factory.js +79 -0
- package/dist/contracts/factories/IKSULockingAbi__factory.d.ts +588 -0
- package/dist/contracts/factories/IKSULockingAbi__factory.js +767 -0
- package/dist/contracts/factories/IKasuAllowListAbi__factory.d.ts +354 -0
- package/dist/contracts/factories/IKasuAllowListAbi__factory.js +468 -0
- package/dist/contracts/factories/IKasuControllerAbi__factory.d.ts +339 -0
- package/dist/contracts/factories/IKasuControllerAbi__factory.js +436 -0
- package/dist/contracts/factories/IKasuNFTsAbi__factory.d.ts +1629 -0
- package/dist/contracts/factories/IKasuNFTsAbi__factory.js +2108 -0
- package/dist/contracts/factories/IKsuPriceAbi__factory.d.ts +18 -0
- package/dist/contracts/factories/IKsuPriceAbi__factory.js +28 -0
- package/dist/contracts/factories/ILendingPoolAbi__factory.d.ts +1109 -0
- package/dist/contracts/factories/ILendingPoolAbi__factory.js +1444 -0
- package/dist/contracts/factories/ILendingPoolFactoryAbi__factory.d.ts +81 -0
- package/dist/contracts/factories/ILendingPoolFactoryAbi__factory.js +110 -0
- package/dist/contracts/factories/ILendingPoolManagerAbi__factory.d.ts +1045 -0
- package/dist/contracts/factories/ILendingPoolManagerAbi__factory.js +1360 -0
- package/dist/contracts/factories/ILendingPoolTrancheAbi__factory.d.ts +1015 -0
- package/dist/contracts/factories/ILendingPoolTrancheAbi__factory.js +1330 -0
- package/dist/contracts/factories/ISystemVariablesAbi__factory.d.ts +338 -0
- package/dist/contracts/factories/ISystemVariablesAbi__factory.js +444 -0
- package/dist/contracts/factories/IUserLoyaltyRewardsAbi__factory.d.ts +230 -0
- package/dist/contracts/factories/IUserLoyaltyRewardsAbi__factory.js +301 -0
- package/dist/contracts/factories/IUserManagerAbi__factory.d.ts +250 -0
- package/dist/contracts/factories/IUserManagerAbi__factory.js +334 -0
- package/dist/contracts/factories/KSULockBonusAbi__factory.d.ts +76 -0
- package/dist/contracts/factories/KSULockBonusAbi__factory.js +104 -0
- package/dist/contracts/factories/KasuPoolExternalTVLAbi__factory.d.ts +631 -0
- package/dist/contracts/factories/KasuPoolExternalTVLAbi__factory.js +825 -0
- package/dist/contracts/factories/SwapperAbi__factory.d.ts +120 -0
- package/dist/contracts/factories/SwapperAbi__factory.js +159 -0
- package/dist/contracts/factories/index.d.ts +18 -0
- package/dist/contracts/factories/index.js +21 -0
- package/dist/contracts/index.d.ts +37 -0
- package/dist/contracts/index.js +19 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +16 -0
- package/dist/sdk-config.d.ts +22 -0
- package/dist/sdk-config.js +9 -0
- package/dist/services/DataService/data-service.d.ts +37 -0
- package/dist/services/DataService/data-service.js +586 -0
- package/dist/services/DataService/directus-types.d.ts +187 -0
- package/dist/services/DataService/directus-types.js +1 -0
- package/dist/services/DataService/queries.d.ts +7 -0
- package/dist/services/DataService/queries.js +158 -0
- package/dist/services/DataService/subgraph-types.d.ts +95 -0
- package/dist/services/DataService/subgraph-types.js +1 -0
- package/dist/services/DataService/types.d.ts +169 -0
- package/dist/services/DataService/types.js +1 -0
- package/dist/services/Locking/locking.d.ts +61 -0
- package/dist/services/Locking/locking.js +344 -0
- package/dist/services/Locking/queries.d.ts +10 -0
- package/dist/services/Locking/queries.js +108 -0
- package/dist/services/Locking/types.d.ts +117 -0
- package/dist/services/Locking/types.js +1 -0
- package/dist/services/Portfolio/portfolio.d.ts +22 -0
- package/dist/services/Portfolio/portfolio.js +325 -0
- package/dist/services/Portfolio/queries.d.ts +2 -0
- package/dist/services/Portfolio/queries.js +164 -0
- package/dist/services/Portfolio/types.d.ts +206 -0
- package/dist/services/Portfolio/types.js +1 -0
- package/dist/services/Swapper/swapper.d.ts +11 -0
- package/dist/services/Swapper/swapper.js +97 -0
- package/dist/services/Swapper/types.d.ts +51 -0
- package/dist/services/Swapper/types.js +1 -0
- package/dist/services/UserLending/helper.d.ts +2 -0
- package/dist/services/UserLending/helper.js +16 -0
- package/dist/services/UserLending/queries.d.ts +8 -0
- package/dist/services/UserLending/queries.js +188 -0
- package/dist/services/UserLending/subgraph-types.d.ts +147 -0
- package/dist/services/UserLending/subgraph-types.js +6 -0
- package/dist/services/UserLending/types.d.ts +102 -0
- package/dist/services/UserLending/types.js +13 -0
- package/dist/services/UserLending/user-lending.d.ts +55 -0
- package/dist/services/UserLending/user-lending.js +490 -0
- package/dist/services/shared.d.ts +1 -0
- package/dist/services/shared.js +11 -0
- package/dist/tests/sample.test.d.ts +1 -0
- package/dist/tests/sample.test.js +32 -0
- package/index.ts +2 -0
- package/jest-config.ts +9 -0
- package/jest.config.js +8 -0
- package/package.json +49 -0
- package/rollup.config.js +45 -0
- package/src/contracts/IClearingCoordinatorAbi.ts +406 -0
- package/src/contracts/IERC20MetadataAbi.ts +364 -0
- package/src/contracts/IFeeManagerAbi.ts +182 -0
- package/src/contracts/IKSULockingAbi.ts +965 -0
- package/src/contracts/IKasuAllowListAbi.ts +605 -0
- package/src/contracts/IKasuControllerAbi.ts +703 -0
- package/src/contracts/IKasuNFTsAbi.ts +2744 -0
- package/src/contracts/IKsuPriceAbi.ts +87 -0
- package/src/contracts/ILendingPoolAbi.ts +2081 -0
- package/src/contracts/ILendingPoolFactoryAbi.ts +161 -0
- package/src/contracts/ILendingPoolManagerAbi.ts +1917 -0
- package/src/contracts/ILendingPoolTrancheAbi.ts +1911 -0
- package/src/contracts/ISystemVariablesAbi.ts +908 -0
- package/src/contracts/IUserLoyaltyRewardsAbi.ts +544 -0
- package/src/contracts/IUserManagerAbi.ts +612 -0
- package/src/contracts/KSULockBonusAbi.ts +124 -0
- package/src/contracts/KasuPoolExternalTVLAbi.ts +1071 -0
- package/src/contracts/SwapperAbi.ts +266 -0
- package/src/contracts/common.ts +44 -0
- package/src/contracts/factories/IClearingCoordinatorAbi__factory.ts +438 -0
- package/src/contracts/factories/IERC20MetadataAbi__factory.ts +248 -0
- package/src/contracts/factories/IFeeManagerAbi__factory.ts +90 -0
- package/src/contracts/factories/IKSULockingAbi__factory.ts +778 -0
- package/src/contracts/factories/IKasuAllowListAbi__factory.ts +479 -0
- package/src/contracts/factories/IKasuControllerAbi__factory.ts +447 -0
- package/src/contracts/factories/IKasuNFTsAbi__factory.ts +2116 -0
- package/src/contracts/factories/IKsuPriceAbi__factory.ts +36 -0
- package/src/contracts/factories/ILendingPoolAbi__factory.ts +1455 -0
- package/src/contracts/factories/ILendingPoolFactoryAbi__factory.ts +125 -0
- package/src/contracts/factories/ILendingPoolManagerAbi__factory.ts +1375 -0
- package/src/contracts/factories/ILendingPoolTrancheAbi__factory.ts +1345 -0
- package/src/contracts/factories/ISystemVariablesAbi__factory.ts +455 -0
- package/src/contracts/factories/IUserLoyaltyRewardsAbi__factory.ts +316 -0
- package/src/contracts/factories/IUserManagerAbi__factory.ts +345 -0
- package/src/contracts/factories/KSULockBonusAbi__factory.ts +115 -0
- package/src/contracts/factories/KasuPoolExternalTVLAbi__factory.ts +840 -0
- package/src/contracts/factories/SwapperAbi__factory.ts +167 -0
- package/src/contracts/factories/index.ts +21 -0
- package/src/contracts/index.ts +40 -0
- package/src/index.ts +27 -0
- package/src/sdk-config.ts +35 -0
- package/src/services/DataService/data-service.ts +1017 -0
- package/src/services/DataService/directus-types.ts +199 -0
- package/src/services/DataService/queries.ts +165 -0
- package/src/services/DataService/subgraph-types.ts +104 -0
- package/src/services/DataService/types.ts +184 -0
- package/src/services/Locking/locking.ts +541 -0
- package/src/services/Locking/queries.ts +118 -0
- package/src/services/Locking/types.ts +141 -0
- package/src/services/Portfolio/portfolio.ts +593 -0
- package/src/services/Portfolio/queries.ts +166 -0
- package/src/services/Portfolio/types.ts +220 -0
- package/src/services/Swapper/swapper.ts +158 -0
- package/src/services/Swapper/types.ts +54 -0
- package/src/services/UserLending/helper.ts +28 -0
- package/src/services/UserLending/queries.ts +196 -0
- package/src/services/UserLending/subgraph-types.ts +173 -0
- package/src/services/UserLending/types.ts +123 -0
- package/src/services/UserLending/user-lending.ts +933 -0
- package/src/services/shared.ts +11 -0
- package/src/tests/sample.test.ts +44 -0
- package/tsconfig.json +27 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/versioner.sh +6 -0
package/.eslintignore
ADDED
package/.eslintrc.json
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": [
|
|
3
|
+
"plugin:@typescript-eslint/strict-type-checked",
|
|
4
|
+
"plugin:@typescript-eslint/stylistic-type-checked",
|
|
5
|
+
"plugin:import/errors",
|
|
6
|
+
"plugin:import/warnings",
|
|
7
|
+
"plugin:import/typescript",
|
|
8
|
+
"prettier"
|
|
9
|
+
],
|
|
10
|
+
"settings": {
|
|
11
|
+
"import/resolver": {
|
|
12
|
+
"node": {
|
|
13
|
+
"extensions": [".js", ".jsx", ".ts", ".tsx", ".d.ts"], // add .d.ts here
|
|
14
|
+
"moduleDirectory": ["src", "node_modules"]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"parserOptions": {
|
|
19
|
+
"project": ["./tsconfig.json"] // Specify it only for TypeScript files
|
|
20
|
+
},
|
|
21
|
+
"ignorePatterns": [
|
|
22
|
+
"node_modules",
|
|
23
|
+
"src/contracts",
|
|
24
|
+
"index.ts",
|
|
25
|
+
"dist/**/*"
|
|
26
|
+
],
|
|
27
|
+
"rules": {
|
|
28
|
+
"@typescript-eslint/no-non-null-assertion": "warn",
|
|
29
|
+
"@typescript-eslint/prefer-ts-expect-error": "warn",
|
|
30
|
+
"@typescript-eslint/restrict-plus-operands": "warn",
|
|
31
|
+
"@typescript-eslint/ban-ts-comment": [
|
|
32
|
+
"warn",
|
|
33
|
+
{
|
|
34
|
+
"ts-expect-error": "allow-with-description",
|
|
35
|
+
"ts-ignore": "allow-with-description"
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"@typescript-eslint/ban-tslint-comment": "warn",
|
|
39
|
+
"@typescript-eslint/no-explicit-any": "warn",
|
|
40
|
+
"testing-library/prefer-screen-queries": "off",
|
|
41
|
+
"@typescript-eslint/no-unused-vars": [
|
|
42
|
+
"warn",
|
|
43
|
+
{
|
|
44
|
+
"argsIgnorePattern": "^_",
|
|
45
|
+
"varsIgnorePattern": "^_"
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
"sort-imports": [
|
|
49
|
+
"warn",
|
|
50
|
+
{
|
|
51
|
+
"ignoreCase": true,
|
|
52
|
+
"ignoreDeclarationSort": true
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"import/order": [
|
|
56
|
+
"error",
|
|
57
|
+
{
|
|
58
|
+
"groups": [
|
|
59
|
+
"builtin",
|
|
60
|
+
"external",
|
|
61
|
+
"internal",
|
|
62
|
+
"parent",
|
|
63
|
+
"sibling",
|
|
64
|
+
"index"
|
|
65
|
+
],
|
|
66
|
+
"pathGroups": [
|
|
67
|
+
{
|
|
68
|
+
"pattern": "src/**",
|
|
69
|
+
"group": "internal",
|
|
70
|
+
"position": "before"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"pattern": "test/**",
|
|
74
|
+
"group": "internal",
|
|
75
|
+
"position": "before"
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
"pathGroupsExcludedImportTypes": ["builtin", "external"],
|
|
79
|
+
"newlines-between": "always",
|
|
80
|
+
"alphabetize": {
|
|
81
|
+
"order": "asc",
|
|
82
|
+
"caseInsensitive": true
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
],
|
|
86
|
+
"@typescript-eslint/explicit-function-return-type": "error",
|
|
87
|
+
"@typescript-eslint/explicit-module-boundary-types": "error"
|
|
88
|
+
},
|
|
89
|
+
"plugins": ["@typescript-eslint", "import"]
|
|
90
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
name: Publish to npm
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v[0-9]+.[0-9]+.[0-9]+'
|
|
7
|
+
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
publish:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
permissions:
|
|
14
|
+
contents: read
|
|
15
|
+
packages: write
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v3
|
|
19
|
+
- name: Get the version
|
|
20
|
+
id: get_version
|
|
21
|
+
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT"
|
|
22
|
+
|
|
23
|
+
- name: Remove leading v
|
|
24
|
+
id: replaced_version
|
|
25
|
+
env:
|
|
26
|
+
IMAGE_TAG: ${{ steps.get_version.outputs.VERSION }}
|
|
27
|
+
run: |
|
|
28
|
+
string=$IMAGE_TAG
|
|
29
|
+
echo "VERSION=${string#v}" >> "$GITHUB_OUTPUT"
|
|
30
|
+
|
|
31
|
+
- name: Replace version inside package.json
|
|
32
|
+
env:
|
|
33
|
+
VERSION: ${{ steps.replaced_version.outputs.VERSION }}
|
|
34
|
+
run: bash versioner.sh $VERSION
|
|
35
|
+
|
|
36
|
+
- uses: actions/setup-node@v3
|
|
37
|
+
with:
|
|
38
|
+
node-version: 18
|
|
39
|
+
registry-url: https://registry.npmjs.org/
|
|
40
|
+
scope: '@kasufinance'
|
|
41
|
+
- run: npm install && npm run build-tc && npm run build && npm run rollup-build && npm publish
|
|
42
|
+
env:
|
|
43
|
+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
package/.prettierignore
ADDED
package/.prettierrc
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"arrowParens": "always",
|
|
3
|
+
"singleQuote": true,
|
|
4
|
+
"tabWidth": 4,
|
|
5
|
+
"semi": true,
|
|
6
|
+
"trailingComma": "all",
|
|
7
|
+
"endOfLine": "auto",
|
|
8
|
+
"overrides": [
|
|
9
|
+
{
|
|
10
|
+
"files": ".prettierrc",
|
|
11
|
+
"options": {
|
|
12
|
+
"parser": "json"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"files": ["*.ts", "*.mts"],
|
|
17
|
+
"options": {
|
|
18
|
+
"parser": "typescript"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"files": ["*.yml", "*.yaml"],
|
|
23
|
+
"options": {
|
|
24
|
+
"tabWidth": 2
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"inputs": [
|
|
4
|
+
{
|
|
5
|
+
"internalType": "contract ISystemVariables",
|
|
6
|
+
"name": "systemVariables_",
|
|
7
|
+
"type": "address"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"internalType": "contract IUserManager",
|
|
11
|
+
"name": "userManager_",
|
|
12
|
+
"type": "address"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"internalType": "contract ILendingPoolManager",
|
|
16
|
+
"name": "lendingPoolManager_",
|
|
17
|
+
"type": "address"
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"stateMutability": "nonpayable",
|
|
21
|
+
"type": "constructor"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"inputs": [
|
|
25
|
+
{
|
|
26
|
+
"internalType": "uint256",
|
|
27
|
+
"name": "epoch",
|
|
28
|
+
"type": "uint256"
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
"name": "ClearingAlreadyExecuted",
|
|
32
|
+
"type": "error"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"inputs": [],
|
|
36
|
+
"name": "ConfigurationAddressZero",
|
|
37
|
+
"type": "error"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"inputs": [
|
|
41
|
+
{
|
|
42
|
+
"internalType": "address",
|
|
43
|
+
"name": "lendingPool",
|
|
44
|
+
"type": "address"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"internalType": "uint256",
|
|
48
|
+
"name": "targetEpoch",
|
|
49
|
+
"type": "uint256"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"internalType": "uint256",
|
|
53
|
+
"name": "nextEpoch",
|
|
54
|
+
"type": "uint256"
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
"name": "InvalidClearingTargetEpochForLendingPool",
|
|
58
|
+
"type": "error"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"inputs": [],
|
|
62
|
+
"name": "InvalidInitialization",
|
|
63
|
+
"type": "error"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"inputs": [
|
|
67
|
+
{
|
|
68
|
+
"internalType": "address",
|
|
69
|
+
"name": "lendingPool",
|
|
70
|
+
"type": "address"
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
"name": "InvalidLendingPool",
|
|
74
|
+
"type": "error"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"inputs": [
|
|
78
|
+
{
|
|
79
|
+
"internalType": "address",
|
|
80
|
+
"name": "lendingPool",
|
|
81
|
+
"type": "address"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"internalType": "address",
|
|
85
|
+
"name": "tranche",
|
|
86
|
+
"type": "address"
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
"name": "InvalidTranche",
|
|
90
|
+
"type": "error"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"inputs": [],
|
|
94
|
+
"name": "LendingPoolIsNotStopped",
|
|
95
|
+
"type": "error"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"inputs": [],
|
|
99
|
+
"name": "LendingPoolIsStopped",
|
|
100
|
+
"type": "error"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"inputs": [],
|
|
104
|
+
"name": "NotInitializing",
|
|
105
|
+
"type": "error"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"inputs": [],
|
|
109
|
+
"name": "OnlyClearingCoordinator",
|
|
110
|
+
"type": "error"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"inputs": [],
|
|
114
|
+
"name": "OnlyLendingPoolManager",
|
|
115
|
+
"type": "error"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"inputs": [
|
|
119
|
+
{
|
|
120
|
+
"internalType": "address",
|
|
121
|
+
"name": "sender",
|
|
122
|
+
"type": "address"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"internalType": "address",
|
|
126
|
+
"name": "ownLendingPool",
|
|
127
|
+
"type": "address"
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
"name": "OnlyOwnLendingPool",
|
|
131
|
+
"type": "error"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
"inputs": [
|
|
135
|
+
{
|
|
136
|
+
"internalType": "address",
|
|
137
|
+
"name": "sender",
|
|
138
|
+
"type": "address"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"internalType": "address",
|
|
142
|
+
"name": "ownPendingPool",
|
|
143
|
+
"type": "address"
|
|
144
|
+
}
|
|
145
|
+
],
|
|
146
|
+
"name": "OnlyOwnPendingPool",
|
|
147
|
+
"type": "error"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"inputs": [
|
|
151
|
+
{
|
|
152
|
+
"internalType": "uint256",
|
|
153
|
+
"name": "targetEpoch",
|
|
154
|
+
"type": "uint256"
|
|
155
|
+
}
|
|
156
|
+
],
|
|
157
|
+
"name": "TargetEpochClearingNotStarted",
|
|
158
|
+
"type": "error"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"inputs": [
|
|
162
|
+
{
|
|
163
|
+
"internalType": "uint256",
|
|
164
|
+
"name": "targetEpoch",
|
|
165
|
+
"type": "uint256"
|
|
166
|
+
}
|
|
167
|
+
],
|
|
168
|
+
"name": "UserLoyaltyLevelsNotYetProcessed",
|
|
169
|
+
"type": "error"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"anonymous": false,
|
|
173
|
+
"inputs": [
|
|
174
|
+
{
|
|
175
|
+
"indexed": true,
|
|
176
|
+
"internalType": "address",
|
|
177
|
+
"name": "lendingPool",
|
|
178
|
+
"type": "address"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"indexed": true,
|
|
182
|
+
"internalType": "uint256",
|
|
183
|
+
"name": "epoch",
|
|
184
|
+
"type": "uint256"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"components": [
|
|
188
|
+
{
|
|
189
|
+
"internalType": "uint256",
|
|
190
|
+
"name": "drawAmount",
|
|
191
|
+
"type": "uint256"
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"internalType": "uint256[]",
|
|
195
|
+
"name": "trancheDesiredRatios",
|
|
196
|
+
"type": "uint256[]"
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"internalType": "uint256",
|
|
200
|
+
"name": "maxExcessPercentage",
|
|
201
|
+
"type": "uint256"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"internalType": "uint256",
|
|
205
|
+
"name": "minExcessPercentage",
|
|
206
|
+
"type": "uint256"
|
|
207
|
+
}
|
|
208
|
+
],
|
|
209
|
+
"indexed": false,
|
|
210
|
+
"internalType": "struct ClearingConfiguration",
|
|
211
|
+
"name": "clearingConfig",
|
|
212
|
+
"type": "tuple"
|
|
213
|
+
}
|
|
214
|
+
],
|
|
215
|
+
"name": "ClearingConfigSet",
|
|
216
|
+
"type": "event"
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"anonymous": false,
|
|
220
|
+
"inputs": [
|
|
221
|
+
{
|
|
222
|
+
"indexed": true,
|
|
223
|
+
"internalType": "address",
|
|
224
|
+
"name": "lendingPool",
|
|
225
|
+
"type": "address"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"indexed": true,
|
|
229
|
+
"internalType": "uint256",
|
|
230
|
+
"name": "epoch",
|
|
231
|
+
"type": "uint256"
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"indexed": false,
|
|
235
|
+
"internalType": "enum ClearingStatus",
|
|
236
|
+
"name": "clearingStatus",
|
|
237
|
+
"type": "uint8"
|
|
238
|
+
}
|
|
239
|
+
],
|
|
240
|
+
"name": "ClearingExecuted",
|
|
241
|
+
"type": "event"
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"anonymous": false,
|
|
245
|
+
"inputs": [
|
|
246
|
+
{
|
|
247
|
+
"indexed": false,
|
|
248
|
+
"internalType": "uint64",
|
|
249
|
+
"name": "version",
|
|
250
|
+
"type": "uint64"
|
|
251
|
+
}
|
|
252
|
+
],
|
|
253
|
+
"name": "Initialized",
|
|
254
|
+
"type": "event"
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
"inputs": [
|
|
258
|
+
{
|
|
259
|
+
"internalType": "address",
|
|
260
|
+
"name": "lendingPool",
|
|
261
|
+
"type": "address"
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"internalType": "uint256",
|
|
265
|
+
"name": "targetEpoch",
|
|
266
|
+
"type": "uint256"
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"internalType": "uint256",
|
|
270
|
+
"name": "priorityCalculationBatchSize",
|
|
271
|
+
"type": "uint256"
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"internalType": "uint256",
|
|
275
|
+
"name": "acceptRequestsBatchSize",
|
|
276
|
+
"type": "uint256"
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"components": [
|
|
280
|
+
{
|
|
281
|
+
"internalType": "uint256",
|
|
282
|
+
"name": "drawAmount",
|
|
283
|
+
"type": "uint256"
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
"internalType": "uint256[]",
|
|
287
|
+
"name": "trancheDesiredRatios",
|
|
288
|
+
"type": "uint256[]"
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"internalType": "uint256",
|
|
292
|
+
"name": "maxExcessPercentage",
|
|
293
|
+
"type": "uint256"
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
"internalType": "uint256",
|
|
297
|
+
"name": "minExcessPercentage",
|
|
298
|
+
"type": "uint256"
|
|
299
|
+
}
|
|
300
|
+
],
|
|
301
|
+
"internalType": "struct ClearingConfiguration",
|
|
302
|
+
"name": "clearingConfig",
|
|
303
|
+
"type": "tuple"
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
"internalType": "bool",
|
|
307
|
+
"name": "isConfigOverridden",
|
|
308
|
+
"type": "bool"
|
|
309
|
+
}
|
|
310
|
+
],
|
|
311
|
+
"name": "doClearing",
|
|
312
|
+
"outputs": [],
|
|
313
|
+
"stateMutability": "nonpayable",
|
|
314
|
+
"type": "function"
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"inputs": [
|
|
318
|
+
{
|
|
319
|
+
"internalType": "address",
|
|
320
|
+
"name": "lendingPool",
|
|
321
|
+
"type": "address"
|
|
322
|
+
}
|
|
323
|
+
],
|
|
324
|
+
"name": "initializeLendingPool",
|
|
325
|
+
"outputs": [],
|
|
326
|
+
"stateMutability": "nonpayable",
|
|
327
|
+
"type": "function"
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
"inputs": [
|
|
331
|
+
{
|
|
332
|
+
"internalType": "address",
|
|
333
|
+
"name": "lendingPool",
|
|
334
|
+
"type": "address"
|
|
335
|
+
}
|
|
336
|
+
],
|
|
337
|
+
"name": "isLendingPoolClearingPending",
|
|
338
|
+
"outputs": [
|
|
339
|
+
{
|
|
340
|
+
"internalType": "bool",
|
|
341
|
+
"name": "isPending",
|
|
342
|
+
"type": "bool"
|
|
343
|
+
}
|
|
344
|
+
],
|
|
345
|
+
"stateMutability": "view",
|
|
346
|
+
"type": "function"
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
"inputs": [
|
|
350
|
+
{
|
|
351
|
+
"internalType": "address",
|
|
352
|
+
"name": "lendingPool",
|
|
353
|
+
"type": "address"
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"internalType": "uint256",
|
|
357
|
+
"name": "epoch",
|
|
358
|
+
"type": "uint256"
|
|
359
|
+
}
|
|
360
|
+
],
|
|
361
|
+
"name": "lendingPoolClearingStatus",
|
|
362
|
+
"outputs": [
|
|
363
|
+
{
|
|
364
|
+
"internalType": "enum ClearingStatus",
|
|
365
|
+
"name": "status",
|
|
366
|
+
"type": "uint8"
|
|
367
|
+
}
|
|
368
|
+
],
|
|
369
|
+
"stateMutability": "view",
|
|
370
|
+
"type": "function"
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
"inputs": [
|
|
374
|
+
{
|
|
375
|
+
"internalType": "address",
|
|
376
|
+
"name": "lendingPool",
|
|
377
|
+
"type": "address"
|
|
378
|
+
}
|
|
379
|
+
],
|
|
380
|
+
"name": "lendingPoolMaxDrawAmount",
|
|
381
|
+
"outputs": [
|
|
382
|
+
{
|
|
383
|
+
"internalType": "uint256",
|
|
384
|
+
"name": "",
|
|
385
|
+
"type": "uint256"
|
|
386
|
+
}
|
|
387
|
+
],
|
|
388
|
+
"stateMutability": "view",
|
|
389
|
+
"type": "function"
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
"inputs": [
|
|
393
|
+
{
|
|
394
|
+
"internalType": "address",
|
|
395
|
+
"name": "lendingPool",
|
|
396
|
+
"type": "address"
|
|
397
|
+
}
|
|
398
|
+
],
|
|
399
|
+
"name": "nextLendingPoolClearingEpoch",
|
|
400
|
+
"outputs": [
|
|
401
|
+
{
|
|
402
|
+
"internalType": "uint256",
|
|
403
|
+
"name": "nextClearingEpoch",
|
|
404
|
+
"type": "uint256"
|
|
405
|
+
}
|
|
406
|
+
],
|
|
407
|
+
"stateMutability": "view",
|
|
408
|
+
"type": "function"
|
|
409
|
+
}
|
|
410
|
+
]
|