@underscore-finance/sdk 0.3.5 → 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/dist/contracts/AaveV3.d.ts +2120 -0
- package/dist/contracts/AaveV3.d.ts.map +1 -0
- package/dist/contracts/AaveV3.js +2714 -0
- package/dist/contracts/AeroClassic.d.ts +2017 -0
- package/dist/contracts/AeroClassic.d.ts.map +1 -0
- package/dist/contracts/AeroClassic.js +2567 -0
- package/dist/contracts/AeroSlipstream.d.ts +2113 -0
- package/dist/contracts/AeroSlipstream.d.ts.map +1 -0
- package/dist/contracts/AeroSlipstream.js +2692 -0
- package/dist/contracts/Agent.d.ts +2189 -1138
- package/dist/contracts/Agent.d.ts.map +1 -1
- package/dist/contracts/Agent.js +2807 -1343
- package/dist/contracts/AgentWrapper.d.ts +3760 -0
- package/dist/contracts/AgentWrapper.d.ts.map +1 -0
- package/dist/contracts/AgentWrapper.js +4922 -0
- package/dist/contracts/Appraiser.d.ts +997 -0
- package/dist/contracts/Appraiser.d.ts.map +1 -0
- package/dist/contracts/Appraiser.js +1285 -0
- package/dist/contracts/Billing.d.ts +420 -0
- package/dist/contracts/Billing.d.ts.map +1 -0
- package/dist/contracts/Billing.js +506 -0
- package/dist/contracts/ChequeBook.d.ts +1184 -0
- package/dist/contracts/ChequeBook.d.ts.map +1 -0
- package/dist/contracts/ChequeBook.js +1352 -0
- package/dist/contracts/CompoundV3.d.ts +2158 -0
- package/dist/contracts/CompoundV3.d.ts.map +1 -0
- package/dist/contracts/CompoundV3.js +2764 -0
- package/dist/contracts/Curve.d.ts +1077 -0
- package/dist/contracts/Curve.d.ts.map +1 -0
- package/dist/contracts/Curve.js +1357 -0
- package/dist/contracts/DefaultsBase.d.ts +290 -0
- package/dist/contracts/DefaultsBase.d.ts.map +1 -0
- package/dist/contracts/DefaultsBase.js +316 -0
- package/dist/contracts/Euler.d.ts +2172 -0
- package/dist/contracts/Euler.d.ts.map +1 -0
- package/dist/contracts/Euler.js +2782 -0
- package/dist/contracts/Fluid.d.ts +2106 -0
- package/dist/contracts/Fluid.d.ts.map +1 -0
- package/dist/contracts/Fluid.js +2696 -0
- package/dist/contracts/Hatchery.d.ts +541 -0
- package/dist/contracts/Hatchery.d.ts.map +1 -0
- package/dist/contracts/Hatchery.js +671 -0
- package/dist/contracts/HighCommand.d.ts +1868 -0
- package/dist/contracts/HighCommand.d.ts.map +1 -0
- package/dist/contracts/HighCommand.js +2149 -0
- package/dist/contracts/Kernel.d.ts +354 -0
- package/dist/contracts/Kernel.d.ts.map +1 -0
- package/dist/contracts/Kernel.js +412 -0
- package/dist/contracts/Ledger.d.ts +694 -0
- package/dist/contracts/Ledger.d.ts.map +1 -0
- package/dist/contracts/Ledger.js +834 -0
- package/dist/contracts/LegoBook.d.ts +1424 -0
- package/dist/contracts/LegoBook.d.ts.map +1 -0
- package/dist/contracts/LegoBook.js +1783 -0
- package/dist/contracts/LegoTools.d.ts +1898 -0
- package/dist/contracts/LegoTools.d.ts.map +1 -0
- package/dist/contracts/LegoTools.js +2378 -0
- package/dist/contracts/LegoUniswapV0_2.d.ts +1204 -0
- package/dist/contracts/LegoUniswapV0_2.d.ts.map +1 -0
- package/dist/contracts/LegoUniswapV0_2.js +1546 -0
- package/dist/contracts/LootDistributor.d.ts +996 -0
- package/dist/contracts/LootDistributor.d.ts.map +1 -0
- package/dist/contracts/LootDistributor.js +1255 -0
- package/dist/contracts/Migrator.d.ts +268 -0
- package/dist/contracts/Migrator.d.ts.map +1 -0
- package/dist/contracts/Migrator.js +324 -0
- package/dist/contracts/MissionControl.d.ts +1331 -0
- package/dist/contracts/MissionControl.d.ts.map +1 -0
- package/dist/contracts/MissionControl.js +1485 -0
- package/dist/contracts/Moonwell.d.ts +2137 -0
- package/dist/contracts/Moonwell.d.ts.map +1 -0
- package/dist/contracts/Moonwell.js +2737 -0
- package/dist/contracts/Morpho.d.ts +2172 -0
- package/dist/contracts/Morpho.d.ts.map +1 -0
- package/dist/contracts/Morpho.js +2782 -0
- package/dist/contracts/Paymaster.d.ts +1679 -0
- package/dist/contracts/Paymaster.d.ts.map +1 -0
- package/dist/contracts/Paymaster.js +2077 -0
- package/dist/contracts/RipeLego.d.ts +2263 -0
- package/dist/contracts/RipeLego.d.ts.map +1 -0
- package/dist/contracts/RipeLego.js +2891 -0
- package/dist/contracts/Sentinel.d.ts +1804 -0
- package/dist/contracts/Sentinel.d.ts.map +1 -0
- package/dist/contracts/Sentinel.js +2152 -0
- package/dist/contracts/Switchboard.d.ts +1395 -0
- package/dist/contracts/Switchboard.d.ts.map +1 -0
- package/dist/contracts/Switchboard.js +1746 -0
- package/dist/contracts/SwitchboardAlpha.d.ts +2228 -0
- package/dist/contracts/SwitchboardAlpha.d.ts.map +1 -0
- package/dist/contracts/SwitchboardAlpha.js +2743 -0
- package/dist/contracts/SwitchboardBravo.d.ts +1498 -0
- package/dist/contracts/SwitchboardBravo.d.ts.map +1 -0
- package/dist/contracts/SwitchboardBravo.js +1855 -0
- package/dist/contracts/UndyHq.d.ts +1580 -0
- package/dist/contracts/UndyHq.d.ts.map +1 -0
- package/dist/contracts/UndyHq.js +1986 -0
- package/dist/contracts/UniswapV2.d.ts +2017 -0
- package/dist/contracts/UniswapV2.d.ts.map +1 -0
- package/dist/contracts/UniswapV2.js +2567 -0
- package/dist/contracts/UniswapV3.d.ts +2113 -0
- package/dist/contracts/UniswapV3.d.ts.map +1 -0
- package/dist/contracts/UniswapV3.js +2692 -0
- package/dist/contracts/UserWallet.d.ts +1438 -784
- package/dist/contracts/UserWallet.d.ts.map +1 -1
- package/dist/contracts/UserWallet.js +1854 -935
- package/dist/contracts/UserWalletConfig.d.ts +3034 -1231
- package/dist/contracts/UserWalletConfig.d.ts.map +1 -1
- package/dist/contracts/UserWalletConfig.js +3395 -1407
- package/dist/contracts/WalletBackpack.d.ts +1183 -0
- package/dist/contracts/WalletBackpack.d.ts.map +1 -0
- package/dist/contracts/WalletBackpack.js +1484 -0
- package/dist/contracts/index.d.ts +72 -36
- package/dist/contracts/index.d.ts.map +1 -1
- package/dist/contracts/index.js +72 -36
- package/dist/contracts/sdk.d.ts +146 -72
- package/dist/contracts/sdk.d.ts.map +1 -1
- package/dist/contracts/sdk.js +146 -72
- package/dist/contracts/v0_1_AddyRegistry.d.ts +473 -0
- package/dist/contracts/v0_1_AddyRegistry.d.ts.map +1 -0
- package/dist/contracts/v0_1_AddyRegistry.js +594 -0
- package/dist/contracts/v0_1_Agent.d.ts +2631 -0
- package/dist/contracts/v0_1_Agent.d.ts.map +1 -0
- package/dist/contracts/v0_1_Agent.js +3372 -0
- package/dist/contracts/v0_1_AgentFactory.d.ts +1054 -0
- package/dist/contracts/v0_1_AgentFactory.d.ts.map +1 -0
- package/dist/contracts/v0_1_AgentFactory.js +1336 -0
- package/dist/contracts/v0_1_UserWallet.d.ts +1980 -0
- package/dist/contracts/v0_1_UserWallet.d.ts.map +1 -0
- package/dist/contracts/v0_1_UserWallet.js +2581 -0
- package/dist/contracts/v0_1_UserWalletConfig.d.ts +1400 -0
- package/dist/contracts/v0_1_UserWalletConfig.d.ts.map +1 -0
- package/dist/contracts/v0_1_UserWalletConfig.js +1676 -0
- package/dist/contracts/v0_2_AddyRegistry.d.ts +1050 -0
- package/dist/contracts/v0_2_AddyRegistry.d.ts.map +1 -0
- package/dist/contracts/v0_2_AddyRegistry.js +1313 -0
- package/dist/contracts/v0_2_Agent.d.ts +2709 -0
- package/dist/contracts/v0_2_Agent.d.ts.map +1 -0
- package/dist/contracts/v0_2_Agent.js +3458 -0
- package/dist/contracts/v0_2_AgentFactory.d.ts +1275 -0
- package/dist/contracts/v0_2_AgentFactory.d.ts.map +1 -0
- package/dist/contracts/v0_2_AgentFactory.js +1609 -0
- package/dist/contracts/v0_2_UserWallet.d.ts +1958 -0
- package/dist/contracts/v0_2_UserWallet.d.ts.map +1 -0
- package/dist/contracts/v0_2_UserWallet.js +2553 -0
- package/dist/contracts/v0_2_UserWalletConfig.d.ts +1468 -0
- package/dist/contracts/v0_2_UserWalletConfig.d.ts.map +1 -0
- package/dist/contracts/v0_2_UserWalletConfig.js +1764 -0
- package/dist/contracts/v0_3_AddyRegistry.d.ts +1109 -0
- package/dist/contracts/v0_3_AddyRegistry.d.ts.map +1 -0
- package/dist/contracts/v0_3_AddyRegistry.js +1392 -0
- package/dist/contracts/v0_3_Agent.d.ts +2709 -0
- package/dist/contracts/v0_3_Agent.d.ts.map +1 -0
- package/dist/contracts/v0_3_Agent.js +3458 -0
- package/dist/contracts/v0_3_AgentFactory.d.ts +1665 -0
- package/dist/contracts/v0_3_AgentFactory.d.ts.map +1 -0
- package/dist/contracts/v0_3_AgentFactory.js +2078 -0
- package/dist/contracts/v0_3_ChainlinkFeeds.d.ts +706 -0
- package/dist/contracts/v0_3_ChainlinkFeeds.d.ts.map +1 -0
- package/dist/contracts/v0_3_ChainlinkFeeds.js +900 -0
- package/dist/contracts/v0_3_LegoAaveV3.d.ts +1033 -0
- package/dist/contracts/v0_3_LegoAaveV3.d.ts.map +1 -0
- package/dist/contracts/v0_3_LegoAaveV3.js +1330 -0
- package/dist/contracts/v0_3_LegoAeroClassic.d.ts +1204 -0
- package/dist/contracts/v0_3_LegoAeroClassic.d.ts.map +1 -0
- package/dist/contracts/v0_3_LegoAeroClassic.js +1546 -0
- package/dist/contracts/v0_3_LegoAeroSlipstream.d.ts +1300 -0
- package/dist/contracts/v0_3_LegoAeroSlipstream.d.ts.map +1 -0
- package/dist/contracts/v0_3_LegoAeroSlipstream.js +1671 -0
- package/dist/contracts/v0_3_LegoCommon.d.ts +164 -0
- package/dist/contracts/v0_3_LegoCommon.d.ts.map +1 -0
- package/dist/contracts/v0_3_LegoCommon.js +202 -0
- package/dist/contracts/v0_3_LegoCompoundV3.d.ts +1060 -0
- package/dist/contracts/v0_3_LegoCompoundV3.d.ts.map +1 -0
- package/dist/contracts/v0_3_LegoCompoundV3.js +1365 -0
- package/dist/contracts/v0_3_LegoCredit.d.ts +140 -0
- package/dist/contracts/v0_3_LegoCredit.d.ts.map +1 -0
- package/dist/contracts/v0_3_LegoCredit.js +179 -0
- package/dist/contracts/v0_3_LegoCurve.d.ts +1189 -0
- package/dist/contracts/v0_3_LegoCurve.d.ts.map +1 -0
- package/dist/contracts/v0_3_LegoCurve.js +1519 -0
- package/dist/contracts/v0_3_LegoDex.d.ts +587 -0
- package/dist/contracts/v0_3_LegoDex.d.ts.map +1 -0
- package/dist/contracts/v0_3_LegoDex.js +774 -0
- package/dist/contracts/v0_3_LegoEuler.d.ts +1074 -0
- package/dist/contracts/v0_3_LegoEuler.d.ts.map +1 -0
- package/dist/contracts/v0_3_LegoEuler.js +1383 -0
- package/dist/contracts/v0_3_LegoFluid.d.ts +1025 -0
- package/dist/contracts/v0_3_LegoFluid.d.ts.map +1 -0
- package/dist/contracts/v0_3_LegoFluid.js +1320 -0
- package/dist/contracts/v0_3_LegoHelper.d.ts +1563 -0
- package/dist/contracts/v0_3_LegoHelper.d.ts.map +1 -0
- package/dist/contracts/v0_3_LegoHelper.js +1947 -0
- package/dist/contracts/v0_3_LegoMoonwell.d.ts +1042 -0
- package/dist/contracts/v0_3_LegoMoonwell.d.ts.map +1 -0
- package/dist/contracts/v0_3_LegoMoonwell.js +1342 -0
- package/dist/contracts/v0_3_LegoMorpho.d.ts +1074 -0
- package/dist/contracts/v0_3_LegoMorpho.d.ts.map +1 -0
- package/dist/contracts/v0_3_LegoMorpho.js +1383 -0
- package/dist/contracts/v0_3_LegoRegistry.d.ts +1079 -0
- package/dist/contracts/v0_3_LegoRegistry.d.ts.map +1 -0
- package/dist/contracts/v0_3_LegoRegistry.js +1368 -0
- package/dist/contracts/v0_3_LegoSky.d.ts +923 -0
- package/dist/contracts/v0_3_LegoSky.d.ts.map +1 -0
- package/dist/contracts/v0_3_LegoSky.js +1180 -0
- package/dist/contracts/v0_3_LegoUniswapV3.d.ts +1338 -0
- package/dist/contracts/v0_3_LegoUniswapV3.d.ts.map +1 -0
- package/dist/contracts/v0_3_LegoUniswapV3.js +1718 -0
- package/dist/contracts/v0_3_LegoYield.d.ts +390 -0
- package/dist/contracts/v0_3_LegoYield.d.ts.map +1 -0
- package/dist/contracts/v0_3_LegoYield.js +511 -0
- package/dist/contracts/v0_3_OracleParser.d.ts +207 -0
- package/dist/contracts/v0_3_OracleParser.d.ts.map +1 -0
- package/dist/contracts/v0_3_OracleParser.js +264 -0
- package/dist/contracts/v0_3_OracleRegistry.d.ts +1221 -0
- package/dist/contracts/v0_3_OracleRegistry.d.ts.map +1 -0
- package/dist/contracts/v0_3_OracleRegistry.js +1562 -0
- package/dist/contracts/v0_3_PriceSheets.d.ts +1127 -0
- package/dist/contracts/v0_3_PriceSheets.d.ts.map +1 -0
- package/dist/contracts/v0_3_PriceSheets.js +1383 -0
- package/dist/contracts/v0_3_PythFeeds.d.ts +640 -0
- package/dist/contracts/v0_3_PythFeeds.d.ts.map +1 -0
- package/dist/contracts/v0_3_PythFeeds.js +813 -0
- package/dist/contracts/v0_3_StorkFeeds.d.ts +640 -0
- package/dist/contracts/v0_3_StorkFeeds.d.ts.map +1 -0
- package/dist/contracts/v0_3_StorkFeeds.js +813 -0
- package/dist/contracts/v0_3_UserWallet.d.ts +1975 -0
- package/dist/contracts/v0_3_UserWallet.d.ts.map +1 -0
- package/dist/contracts/v0_3_UserWallet.js +2577 -0
- package/dist/contracts/v0_3_UserWalletConfig.d.ts +1852 -0
- package/dist/contracts/v0_3_UserWalletConfig.d.ts.map +1 -0
- package/dist/contracts/v0_3_UserWalletConfig.js +2263 -0
- package/dist/getContracts.d.ts +77 -0
- package/dist/getContracts.d.ts.map +1 -0
- package/dist/getContracts.js +67 -0
- package/dist/getLegacyContracts.d.ts +69 -0
- package/dist/getLegacyContracts.d.ts.map +1 -0
- package/dist/getLegacyContracts.js +55 -0
- package/dist/getSwapInstructions.d.ts +60 -0
- package/dist/getSwapInstructions.d.ts.map +1 -0
- package/dist/getSwapInstructions.js +41 -0
- package/dist/index.d.ts +3 -475
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -182
- package/package.json +2 -2
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { PublicClient, WalletClient } from 'viem';
|
|
2
|
+
type ExtractArgs<T> = T extends (...args: infer P) => any ? P : never;
|
|
3
|
+
type Address = `0x${string}`;
|
|
4
|
+
export declare const abi: readonly [{
|
|
5
|
+
readonly stateMutability: "nonpayable";
|
|
6
|
+
readonly type: "function";
|
|
7
|
+
readonly name: "borrow";
|
|
8
|
+
readonly inputs: readonly [{
|
|
9
|
+
readonly name: "_borrowAsset";
|
|
10
|
+
readonly type: "address";
|
|
11
|
+
}, {
|
|
12
|
+
readonly name: "_amount";
|
|
13
|
+
readonly type: "uint256";
|
|
14
|
+
}, {
|
|
15
|
+
readonly name: "_recipient";
|
|
16
|
+
readonly type: "address";
|
|
17
|
+
}];
|
|
18
|
+
readonly outputs: readonly [{
|
|
19
|
+
readonly name: "";
|
|
20
|
+
readonly type: "address";
|
|
21
|
+
}, {
|
|
22
|
+
readonly name: "";
|
|
23
|
+
readonly type: "uint256";
|
|
24
|
+
}, {
|
|
25
|
+
readonly name: "";
|
|
26
|
+
readonly type: "uint256";
|
|
27
|
+
}];
|
|
28
|
+
}, {
|
|
29
|
+
readonly stateMutability: "nonpayable";
|
|
30
|
+
readonly type: "function";
|
|
31
|
+
readonly name: "borrow";
|
|
32
|
+
readonly inputs: readonly [{
|
|
33
|
+
readonly name: "_borrowAsset";
|
|
34
|
+
readonly type: "address";
|
|
35
|
+
}, {
|
|
36
|
+
readonly name: "_amount";
|
|
37
|
+
readonly type: "uint256";
|
|
38
|
+
}, {
|
|
39
|
+
readonly name: "_recipient";
|
|
40
|
+
readonly type: "address";
|
|
41
|
+
}, {
|
|
42
|
+
readonly name: "_oracleRegistry";
|
|
43
|
+
readonly type: "address";
|
|
44
|
+
}];
|
|
45
|
+
readonly outputs: readonly [{
|
|
46
|
+
readonly name: "";
|
|
47
|
+
readonly type: "address";
|
|
48
|
+
}, {
|
|
49
|
+
readonly name: "";
|
|
50
|
+
readonly type: "uint256";
|
|
51
|
+
}, {
|
|
52
|
+
readonly name: "";
|
|
53
|
+
readonly type: "uint256";
|
|
54
|
+
}];
|
|
55
|
+
}, {
|
|
56
|
+
readonly stateMutability: "nonpayable";
|
|
57
|
+
readonly type: "function";
|
|
58
|
+
readonly name: "repayDebt";
|
|
59
|
+
readonly inputs: readonly [{
|
|
60
|
+
readonly name: "_paymentAsset";
|
|
61
|
+
readonly type: "address";
|
|
62
|
+
}, {
|
|
63
|
+
readonly name: "_paymentAmount";
|
|
64
|
+
readonly type: "uint256";
|
|
65
|
+
}, {
|
|
66
|
+
readonly name: "_recipient";
|
|
67
|
+
readonly type: "address";
|
|
68
|
+
}];
|
|
69
|
+
readonly outputs: readonly [{
|
|
70
|
+
readonly name: "";
|
|
71
|
+
readonly type: "address";
|
|
72
|
+
}, {
|
|
73
|
+
readonly name: "";
|
|
74
|
+
readonly type: "uint256";
|
|
75
|
+
}, {
|
|
76
|
+
readonly name: "";
|
|
77
|
+
readonly type: "uint256";
|
|
78
|
+
}, {
|
|
79
|
+
readonly name: "";
|
|
80
|
+
readonly type: "uint256";
|
|
81
|
+
}];
|
|
82
|
+
}, {
|
|
83
|
+
readonly stateMutability: "nonpayable";
|
|
84
|
+
readonly type: "function";
|
|
85
|
+
readonly name: "repayDebt";
|
|
86
|
+
readonly inputs: readonly [{
|
|
87
|
+
readonly name: "_paymentAsset";
|
|
88
|
+
readonly type: "address";
|
|
89
|
+
}, {
|
|
90
|
+
readonly name: "_paymentAmount";
|
|
91
|
+
readonly type: "uint256";
|
|
92
|
+
}, {
|
|
93
|
+
readonly name: "_recipient";
|
|
94
|
+
readonly type: "address";
|
|
95
|
+
}, {
|
|
96
|
+
readonly name: "_oracleRegistry";
|
|
97
|
+
readonly type: "address";
|
|
98
|
+
}];
|
|
99
|
+
readonly outputs: readonly [{
|
|
100
|
+
readonly name: "";
|
|
101
|
+
readonly type: "address";
|
|
102
|
+
}, {
|
|
103
|
+
readonly name: "";
|
|
104
|
+
readonly type: "uint256";
|
|
105
|
+
}, {
|
|
106
|
+
readonly name: "";
|
|
107
|
+
readonly type: "uint256";
|
|
108
|
+
}, {
|
|
109
|
+
readonly name: "";
|
|
110
|
+
readonly type: "uint256";
|
|
111
|
+
}];
|
|
112
|
+
}];
|
|
113
|
+
export declare const deployAddress: Address | undefined;
|
|
114
|
+
export type Contract = {
|
|
115
|
+
calls: {};
|
|
116
|
+
mutations: {
|
|
117
|
+
borrow: (borrowAsset: `0x${string}`, amount: bigint, recipient: `0x${string}`, oracleRegistry?: `0x${string}`) => Promise<[`0x${string}`, bigint, bigint]>;
|
|
118
|
+
repayDebt: (paymentAsset: `0x${string}`, paymentAmount: bigint, recipient: `0x${string}`, oracleRegistry?: `0x${string}`) => Promise<[`0x${string}`, bigint, bigint, bigint]>;
|
|
119
|
+
};
|
|
120
|
+
events: {};
|
|
121
|
+
};
|
|
122
|
+
export type Mutations = keyof Contract['mutations'];
|
|
123
|
+
export declare const mutation: {
|
|
124
|
+
[K in Mutations]: {
|
|
125
|
+
contractName: 'v0_3_LegoCredit';
|
|
126
|
+
deployAddress: Address | undefined;
|
|
127
|
+
getAbi: () => typeof abi;
|
|
128
|
+
functionName: K;
|
|
129
|
+
argsType: ExtractArgs<Contract['mutations'][K]> | undefined;
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
export type SDK = {
|
|
133
|
+
deployAddress: Address | undefined;
|
|
134
|
+
abi: typeof abi;
|
|
135
|
+
borrow: (...args: ExtractArgs<Contract['mutations']['borrow']>) => Promise<Address>;
|
|
136
|
+
repayDebt: (...args: ExtractArgs<Contract['mutations']['repayDebt']>) => Promise<Address>;
|
|
137
|
+
};
|
|
138
|
+
export declare function toSdk(deployAddress: Address, publicClient?: PublicClient, walletClient?: WalletClient): SDK;
|
|
139
|
+
export {};
|
|
140
|
+
//# sourceMappingURL=v0_3_LegoCredit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v0_3_LegoCredit.d.ts","sourceRoot":"","sources":["../../src/contracts/v0_3_LegoCredit.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,MAAM,CAAA;AAEjD,KAAK,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,KAAK,CAAA;AACrE,KAAK,OAAO,GAAG,KAAK,MAAM,EAAE,CAAA;AAE5B,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqJN,CAAA;AAEV,eAAO,MAAM,aAAa,EAAE,OAAO,GAAG,SAAqB,CAAA;AAE3D,MAAM,MAAM,QAAQ,GAAG;IACrB,KAAK,EAAE,EAAE,CAAA;IACT,SAAS,EAAE;QACT,MAAM,EAAE,CACN,WAAW,EAAE,KAAK,MAAM,EAAE,EAC1B,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,KAAK,MAAM,EAAE,EACxB,cAAc,CAAC,EAAE,KAAK,MAAM,EAAE,KAC3B,OAAO,CAAC,CAAC,KAAK,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;QAC7C,SAAS,EAAE,CACT,YAAY,EAAE,KAAK,MAAM,EAAE,EAC3B,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,KAAK,MAAM,EAAE,EACxB,cAAc,CAAC,EAAE,KAAK,MAAM,EAAE,KAC3B,OAAO,CAAC,CAAC,KAAK,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAA;KACtD,CAAA;IACD,MAAM,EAAE,EAAE,CAAA;CACX,CAAA;AAED,MAAM,MAAM,SAAS,GAAG,MAAM,QAAQ,CAAC,WAAW,CAAC,CAAA;AAWnD,eAAO,MAAM,QAAQ,EAAE;KACpB,CAAC,IAAI,SAAS,GAAG;QAChB,YAAY,EAAE,iBAAiB,CAAA;QAC/B,aAAa,EAAE,OAAO,GAAG,SAAS,CAAA;QAClC,MAAM,EAAE,MAAM,OAAO,GAAG,CAAA;QACxB,YAAY,EAAE,CAAC,CAAA;QACf,QAAQ,EAAE,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,CAAA;KAC5D;CAIF,CAAA;AAED,MAAM,MAAM,GAAG,GAAG;IAChB,aAAa,EAAE,OAAO,GAAG,SAAS,CAAA;IAClC,GAAG,EAAE,OAAO,GAAG,CAAA;IAEf,MAAM,EAAE,CAAC,GAAG,IAAI,EAAE,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,QAAQ,CAAC,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;IACnF,SAAS,EAAE,CAAC,GAAG,IAAI,EAAE,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,WAAW,CAAC,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;CAC1F,CAAA;AAED,wBAAgB,KAAK,CAAC,aAAa,EAAE,OAAO,EAAE,YAAY,CAAC,EAAE,YAAY,EAAE,YAAY,CAAC,EAAE,YAAY,GAAG,GAAG,CAY3G"}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
/* Autogenerated file. Do not edit manually. */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/* @ts-nocheck */
|
|
5
|
+
import { mutate } from '@dappql/async';
|
|
6
|
+
export const abi = [
|
|
7
|
+
{
|
|
8
|
+
stateMutability: 'nonpayable',
|
|
9
|
+
type: 'function',
|
|
10
|
+
name: 'borrow',
|
|
11
|
+
inputs: [
|
|
12
|
+
{
|
|
13
|
+
name: '_borrowAsset',
|
|
14
|
+
type: 'address',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
name: '_amount',
|
|
18
|
+
type: 'uint256',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: '_recipient',
|
|
22
|
+
type: 'address',
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
outputs: [
|
|
26
|
+
{
|
|
27
|
+
name: '',
|
|
28
|
+
type: 'address',
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: '',
|
|
32
|
+
type: 'uint256',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: '',
|
|
36
|
+
type: 'uint256',
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
stateMutability: 'nonpayable',
|
|
42
|
+
type: 'function',
|
|
43
|
+
name: 'borrow',
|
|
44
|
+
inputs: [
|
|
45
|
+
{
|
|
46
|
+
name: '_borrowAsset',
|
|
47
|
+
type: 'address',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: '_amount',
|
|
51
|
+
type: 'uint256',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: '_recipient',
|
|
55
|
+
type: 'address',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: '_oracleRegistry',
|
|
59
|
+
type: 'address',
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
outputs: [
|
|
63
|
+
{
|
|
64
|
+
name: '',
|
|
65
|
+
type: 'address',
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: '',
|
|
69
|
+
type: 'uint256',
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: '',
|
|
73
|
+
type: 'uint256',
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
stateMutability: 'nonpayable',
|
|
79
|
+
type: 'function',
|
|
80
|
+
name: 'repayDebt',
|
|
81
|
+
inputs: [
|
|
82
|
+
{
|
|
83
|
+
name: '_paymentAsset',
|
|
84
|
+
type: 'address',
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
name: '_paymentAmount',
|
|
88
|
+
type: 'uint256',
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
name: '_recipient',
|
|
92
|
+
type: 'address',
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
outputs: [
|
|
96
|
+
{
|
|
97
|
+
name: '',
|
|
98
|
+
type: 'address',
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
name: '',
|
|
102
|
+
type: 'uint256',
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
name: '',
|
|
106
|
+
type: 'uint256',
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
name: '',
|
|
110
|
+
type: 'uint256',
|
|
111
|
+
},
|
|
112
|
+
],
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
stateMutability: 'nonpayable',
|
|
116
|
+
type: 'function',
|
|
117
|
+
name: 'repayDebt',
|
|
118
|
+
inputs: [
|
|
119
|
+
{
|
|
120
|
+
name: '_paymentAsset',
|
|
121
|
+
type: 'address',
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
name: '_paymentAmount',
|
|
125
|
+
type: 'uint256',
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
name: '_recipient',
|
|
129
|
+
type: 'address',
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
name: '_oracleRegistry',
|
|
133
|
+
type: 'address',
|
|
134
|
+
},
|
|
135
|
+
],
|
|
136
|
+
outputs: [
|
|
137
|
+
{
|
|
138
|
+
name: '',
|
|
139
|
+
type: 'address',
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
name: '',
|
|
143
|
+
type: 'uint256',
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
name: '',
|
|
147
|
+
type: 'uint256',
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
name: '',
|
|
151
|
+
type: 'uint256',
|
|
152
|
+
},
|
|
153
|
+
],
|
|
154
|
+
},
|
|
155
|
+
];
|
|
156
|
+
export const deployAddress = undefined;
|
|
157
|
+
function getMutation(functionName) {
|
|
158
|
+
return {
|
|
159
|
+
contractName: 'v0_3_LegoCredit',
|
|
160
|
+
functionName,
|
|
161
|
+
deployAddress,
|
|
162
|
+
argsType: undefined,
|
|
163
|
+
getAbi: () => abi,
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
export const mutation = {
|
|
167
|
+
borrow: getMutation('borrow'),
|
|
168
|
+
repayDebt: getMutation('repayDebt'),
|
|
169
|
+
};
|
|
170
|
+
export function toSdk(deployAddress, publicClient, walletClient) {
|
|
171
|
+
return {
|
|
172
|
+
deployAddress,
|
|
173
|
+
abi,
|
|
174
|
+
// Queries
|
|
175
|
+
// Mutations
|
|
176
|
+
borrow: (...args) => mutate(walletClient, mutation.borrow, { address: deployAddress })(...args),
|
|
177
|
+
repayDebt: (...args) => mutate(walletClient, mutation.repayDebt, { address: deployAddress })(...args),
|
|
178
|
+
};
|
|
179
|
+
}
|