@underscore-finance/sdk 0.0.6 → 0.0.7
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/README.md +2 -2
- package/dist/contracts/LegoCommon.d.ts +162 -0
- package/dist/contracts/LegoCommon.d.ts.map +1 -0
- package/dist/contracts/LegoCommon.js +200 -0
- package/dist/contracts/LegoCredit.d.ts +138 -0
- package/dist/contracts/LegoCredit.d.ts.map +1 -0
- package/dist/contracts/LegoCredit.js +177 -0
- package/dist/contracts/LegoDex.d.ts +585 -0
- package/dist/contracts/LegoDex.d.ts.map +1 -0
- package/dist/contracts/LegoDex.js +772 -0
- package/dist/contracts/LegoYield.d.ts +388 -0
- package/dist/contracts/LegoYield.d.ts.map +1 -0
- package/dist/contracts/LegoYield.js +509 -0
- package/dist/contracts/OracleParser.d.ts +205 -0
- package/dist/contracts/OracleParser.d.ts.map +1 -0
- package/dist/contracts/OracleParser.js +262 -0
- package/dist/contracts/index.d.ts +5 -0
- package/dist/contracts/index.d.ts.map +1 -1
- package/dist/contracts/index.js +5 -0
- package/dist/contracts/sdk.d.ts +10 -0
- package/dist/contracts/sdk.d.ts.map +1 -1
- package/dist/contracts/sdk.js +10 -0
- package/dist/index.d.ts +64 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +63 -0
- package/package.json +3 -3
|
@@ -0,0 +1,177 @@
|
|
|
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: '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(address, publicClient, walletClient) {
|
|
171
|
+
return {
|
|
172
|
+
// Queries
|
|
173
|
+
// Mutations
|
|
174
|
+
borrow: (...args) => mutate(walletClient, mutation.borrow, { address })(...args),
|
|
175
|
+
repayDebt: (...args) => mutate(walletClient, mutation.repayDebt, { address })(...args),
|
|
176
|
+
};
|
|
177
|
+
}
|