@defisaver/positions-sdk 0.0.5 → 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/cjs/aaveV2/index.d.ts +2 -2
- package/cjs/aaveV2/index.js +5 -3
- package/cjs/aaveV3/index.js +1 -1
- package/cjs/chickenBonds/index.js +2 -1
- package/cjs/compoundV3/index.d.ts +2 -2
- package/cjs/compoundV3/index.js +8 -5
- package/cjs/config/contracts.d.ts +144 -0
- package/cjs/config/contracts.js +18 -0
- package/cjs/contracts.d.ts +3 -0
- package/cjs/contracts.js +4 -1
- package/cjs/helpers/aaveHelpers/index.js +14 -2
- package/cjs/helpers/chickenBondsHelpers/index.d.ts +1 -0
- package/cjs/helpers/chickenBondsHelpers/index.js +14 -1
- package/cjs/helpers/compoundHelpers/index.d.ts +2 -2
- package/cjs/helpers/compoundHelpers/index.js +5 -4
- package/cjs/morphoAaveV2/index.d.ts +2 -2
- package/cjs/morphoAaveV2/index.js +5 -3
- package/cjs/services/priceService.d.ts +4 -0
- package/cjs/services/priceService.js +36 -0
- package/cjs/types/chickenBonds.d.ts +1 -0
- package/cjs/types/contracts/generated/COMPPriceFeed.d.ts +135 -0
- package/cjs/types/contracts/generated/COMPPriceFeed.js +5 -0
- package/cjs/types/contracts/generated/ETHPriceFeed.d.ts +135 -0
- package/cjs/types/contracts/generated/ETHPriceFeed.js +5 -0
- package/cjs/types/contracts/generated/USDCPriceFeed.d.ts +135 -0
- package/cjs/types/contracts/generated/USDCPriceFeed.js +5 -0
- package/cjs/types/contracts/generated/index.d.ts +3 -0
- package/esm/aaveV2/index.d.ts +2 -2
- package/esm/aaveV2/index.js +5 -3
- package/esm/aaveV3/index.js +1 -1
- package/esm/chickenBonds/index.js +3 -2
- package/esm/compoundV3/index.d.ts +2 -2
- package/esm/compoundV3/index.js +8 -5
- package/esm/config/contracts.d.ts +144 -0
- package/esm/config/contracts.js +18 -0
- package/esm/contracts.d.ts +3 -0
- package/esm/contracts.js +3 -0
- package/esm/helpers/aaveHelpers/index.js +14 -2
- package/esm/helpers/chickenBondsHelpers/index.d.ts +1 -0
- package/esm/helpers/chickenBondsHelpers/index.js +12 -0
- package/esm/helpers/compoundHelpers/index.d.ts +2 -2
- package/esm/helpers/compoundHelpers/index.js +5 -4
- package/esm/morphoAaveV2/index.d.ts +2 -2
- package/esm/morphoAaveV2/index.js +5 -3
- package/esm/services/priceService.d.ts +4 -0
- package/esm/services/priceService.js +27 -0
- package/esm/types/chickenBonds.d.ts +1 -0
- package/esm/types/contracts/generated/COMPPriceFeed.d.ts +135 -0
- package/esm/types/contracts/generated/COMPPriceFeed.js +4 -0
- package/esm/types/contracts/generated/ETHPriceFeed.d.ts +135 -0
- package/esm/types/contracts/generated/ETHPriceFeed.js +4 -0
- package/esm/types/contracts/generated/USDCPriceFeed.d.ts +135 -0
- package/esm/types/contracts/generated/USDCPriceFeed.js +4 -0
- package/esm/types/contracts/generated/index.d.ts +3 -0
- package/package.json +1 -1
- package/src/aaveV2/index.ts +5 -3
- package/src/aaveV3/index.ts +1 -0
- package/src/chickenBonds/index.ts +3 -2
- package/src/compoundV3/index.ts +8 -5
- package/src/config/contracts.js +18 -0
- package/src/contracts.ts +5 -1
- package/src/helpers/aaveHelpers/index.ts +16 -2
- package/src/helpers/chickenBondsHelpers/index.ts +11 -0
- package/src/helpers/compoundHelpers/index.ts +7 -4
- package/src/morphoAaveV2/index.ts +5 -3
- package/src/services/priceService.ts +22 -0
- package/src/types/chickenBonds.ts +1 -0
- package/src/types/contracts/generated/COMPPriceFeed.ts +202 -0
- package/src/types/contracts/generated/ETHPriceFeed.ts +202 -0
- package/src/types/contracts/generated/USDCPriceFeed.ts +202 -0
- package/src/types/contracts/generated/index.ts +3 -0
- package/yarn-error.log +64 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import Web3 from 'web3';
|
|
2
|
+
import Dec from 'decimal.js';
|
|
3
|
+
import { COMPPriceFeedContract, ETHPriceFeedContract, USDCPriceFeedContract } from '../contracts';
|
|
4
|
+
import { NetworkNumber } from '../types/common';
|
|
5
|
+
|
|
6
|
+
export const getEthPrice = async (web3: Web3) => {
|
|
7
|
+
const contract = ETHPriceFeedContract(web3, NetworkNumber.Eth);
|
|
8
|
+
const price = await contract.methods.latestAnswer().call();
|
|
9
|
+
return new Dec(price).div(1e8).toString();
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const getUSDCPrice = async (web3: Web3) => {
|
|
13
|
+
const contract = USDCPriceFeedContract(web3, NetworkNumber.Eth);
|
|
14
|
+
const price = await contract.methods.latestAnswer().call();
|
|
15
|
+
return new Dec(price).div(1e8).toString();
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const getCompPrice = async (web3: Web3) => {
|
|
19
|
+
const contract = COMPPriceFeedContract(web3, NetworkNumber.Eth);
|
|
20
|
+
const price = await contract.methods.latestAnswer().call();
|
|
21
|
+
return new Dec(price).div(1e8).toString();
|
|
22
|
+
};
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
/* Autogenerated file. Do not edit manually. */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
|
|
5
|
+
import type BN from "bn.js";
|
|
6
|
+
import type { ContractOptions } from "web3-eth-contract";
|
|
7
|
+
import type { EventLog } from "web3-core";
|
|
8
|
+
import type { EventEmitter } from "events";
|
|
9
|
+
import type {
|
|
10
|
+
Callback,
|
|
11
|
+
PayableTransactionObject,
|
|
12
|
+
NonPayableTransactionObject,
|
|
13
|
+
BlockType,
|
|
14
|
+
ContractEventLog,
|
|
15
|
+
BaseContract,
|
|
16
|
+
} from "./types";
|
|
17
|
+
|
|
18
|
+
export interface EventOptions {
|
|
19
|
+
filter?: object;
|
|
20
|
+
fromBlock?: BlockType;
|
|
21
|
+
topics?: string[];
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type AnswerUpdated = ContractEventLog<{
|
|
25
|
+
current: string;
|
|
26
|
+
roundId: string;
|
|
27
|
+
updatedAt: string;
|
|
28
|
+
0: string;
|
|
29
|
+
1: string;
|
|
30
|
+
2: string;
|
|
31
|
+
}>;
|
|
32
|
+
export type NewRound = ContractEventLog<{
|
|
33
|
+
roundId: string;
|
|
34
|
+
startedBy: string;
|
|
35
|
+
startedAt: string;
|
|
36
|
+
0: string;
|
|
37
|
+
1: string;
|
|
38
|
+
2: string;
|
|
39
|
+
}>;
|
|
40
|
+
export type OwnershipTransferRequested = ContractEventLog<{
|
|
41
|
+
from: string;
|
|
42
|
+
to: string;
|
|
43
|
+
0: string;
|
|
44
|
+
1: string;
|
|
45
|
+
}>;
|
|
46
|
+
export type OwnershipTransferred = ContractEventLog<{
|
|
47
|
+
from: string;
|
|
48
|
+
to: string;
|
|
49
|
+
0: string;
|
|
50
|
+
1: string;
|
|
51
|
+
}>;
|
|
52
|
+
|
|
53
|
+
export interface COMPPriceFeed extends BaseContract {
|
|
54
|
+
constructor(
|
|
55
|
+
jsonInterface: any[],
|
|
56
|
+
address?: string,
|
|
57
|
+
options?: ContractOptions
|
|
58
|
+
): COMPPriceFeed;
|
|
59
|
+
clone(): COMPPriceFeed;
|
|
60
|
+
methods: {
|
|
61
|
+
acceptOwnership(): NonPayableTransactionObject<void>;
|
|
62
|
+
|
|
63
|
+
accessController(): NonPayableTransactionObject<string>;
|
|
64
|
+
|
|
65
|
+
aggregator(): NonPayableTransactionObject<string>;
|
|
66
|
+
|
|
67
|
+
confirmAggregator(_aggregator: string): NonPayableTransactionObject<void>;
|
|
68
|
+
|
|
69
|
+
decimals(): NonPayableTransactionObject<string>;
|
|
70
|
+
|
|
71
|
+
description(): NonPayableTransactionObject<string>;
|
|
72
|
+
|
|
73
|
+
getAnswer(
|
|
74
|
+
_roundId: number | string | BN
|
|
75
|
+
): NonPayableTransactionObject<string>;
|
|
76
|
+
|
|
77
|
+
getRoundData(
|
|
78
|
+
_roundId: number | string | BN
|
|
79
|
+
): NonPayableTransactionObject<
|
|
80
|
+
[string, string, string, string, string] & {
|
|
81
|
+
roundId: string;
|
|
82
|
+
answer: string;
|
|
83
|
+
startedAt: string;
|
|
84
|
+
updatedAt: string;
|
|
85
|
+
answeredInRound: string;
|
|
86
|
+
}
|
|
87
|
+
>;
|
|
88
|
+
|
|
89
|
+
getTimestamp(
|
|
90
|
+
_roundId: number | string | BN
|
|
91
|
+
): NonPayableTransactionObject<string>;
|
|
92
|
+
|
|
93
|
+
latestAnswer(): NonPayableTransactionObject<string>;
|
|
94
|
+
|
|
95
|
+
latestRound(): NonPayableTransactionObject<string>;
|
|
96
|
+
|
|
97
|
+
latestRoundData(): NonPayableTransactionObject<
|
|
98
|
+
[string, string, string, string, string] & {
|
|
99
|
+
roundId: string;
|
|
100
|
+
answer: string;
|
|
101
|
+
startedAt: string;
|
|
102
|
+
updatedAt: string;
|
|
103
|
+
answeredInRound: string;
|
|
104
|
+
}
|
|
105
|
+
>;
|
|
106
|
+
|
|
107
|
+
latestTimestamp(): NonPayableTransactionObject<string>;
|
|
108
|
+
|
|
109
|
+
owner(): NonPayableTransactionObject<string>;
|
|
110
|
+
|
|
111
|
+
phaseAggregators(
|
|
112
|
+
arg0: number | string | BN
|
|
113
|
+
): NonPayableTransactionObject<string>;
|
|
114
|
+
|
|
115
|
+
phaseId(): NonPayableTransactionObject<string>;
|
|
116
|
+
|
|
117
|
+
proposeAggregator(_aggregator: string): NonPayableTransactionObject<void>;
|
|
118
|
+
|
|
119
|
+
proposedAggregator(): NonPayableTransactionObject<string>;
|
|
120
|
+
|
|
121
|
+
proposedGetRoundData(
|
|
122
|
+
_roundId: number | string | BN
|
|
123
|
+
): NonPayableTransactionObject<
|
|
124
|
+
[string, string, string, string, string] & {
|
|
125
|
+
roundId: string;
|
|
126
|
+
answer: string;
|
|
127
|
+
startedAt: string;
|
|
128
|
+
updatedAt: string;
|
|
129
|
+
answeredInRound: string;
|
|
130
|
+
}
|
|
131
|
+
>;
|
|
132
|
+
|
|
133
|
+
proposedLatestRoundData(): NonPayableTransactionObject<
|
|
134
|
+
[string, string, string, string, string] & {
|
|
135
|
+
roundId: string;
|
|
136
|
+
answer: string;
|
|
137
|
+
startedAt: string;
|
|
138
|
+
updatedAt: string;
|
|
139
|
+
answeredInRound: string;
|
|
140
|
+
}
|
|
141
|
+
>;
|
|
142
|
+
|
|
143
|
+
setController(_accessController: string): NonPayableTransactionObject<void>;
|
|
144
|
+
|
|
145
|
+
transferOwnership(_to: string): NonPayableTransactionObject<void>;
|
|
146
|
+
|
|
147
|
+
version(): NonPayableTransactionObject<string>;
|
|
148
|
+
};
|
|
149
|
+
events: {
|
|
150
|
+
AnswerUpdated(cb?: Callback<AnswerUpdated>): EventEmitter;
|
|
151
|
+
AnswerUpdated(
|
|
152
|
+
options?: EventOptions,
|
|
153
|
+
cb?: Callback<AnswerUpdated>
|
|
154
|
+
): EventEmitter;
|
|
155
|
+
|
|
156
|
+
NewRound(cb?: Callback<NewRound>): EventEmitter;
|
|
157
|
+
NewRound(options?: EventOptions, cb?: Callback<NewRound>): EventEmitter;
|
|
158
|
+
|
|
159
|
+
OwnershipTransferRequested(
|
|
160
|
+
cb?: Callback<OwnershipTransferRequested>
|
|
161
|
+
): EventEmitter;
|
|
162
|
+
OwnershipTransferRequested(
|
|
163
|
+
options?: EventOptions,
|
|
164
|
+
cb?: Callback<OwnershipTransferRequested>
|
|
165
|
+
): EventEmitter;
|
|
166
|
+
|
|
167
|
+
OwnershipTransferred(cb?: Callback<OwnershipTransferred>): EventEmitter;
|
|
168
|
+
OwnershipTransferred(
|
|
169
|
+
options?: EventOptions,
|
|
170
|
+
cb?: Callback<OwnershipTransferred>
|
|
171
|
+
): EventEmitter;
|
|
172
|
+
|
|
173
|
+
allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
once(event: "AnswerUpdated", cb: Callback<AnswerUpdated>): void;
|
|
177
|
+
once(
|
|
178
|
+
event: "AnswerUpdated",
|
|
179
|
+
options: EventOptions,
|
|
180
|
+
cb: Callback<AnswerUpdated>
|
|
181
|
+
): void;
|
|
182
|
+
|
|
183
|
+
once(event: "NewRound", cb: Callback<NewRound>): void;
|
|
184
|
+
once(event: "NewRound", options: EventOptions, cb: Callback<NewRound>): void;
|
|
185
|
+
|
|
186
|
+
once(
|
|
187
|
+
event: "OwnershipTransferRequested",
|
|
188
|
+
cb: Callback<OwnershipTransferRequested>
|
|
189
|
+
): void;
|
|
190
|
+
once(
|
|
191
|
+
event: "OwnershipTransferRequested",
|
|
192
|
+
options: EventOptions,
|
|
193
|
+
cb: Callback<OwnershipTransferRequested>
|
|
194
|
+
): void;
|
|
195
|
+
|
|
196
|
+
once(event: "OwnershipTransferred", cb: Callback<OwnershipTransferred>): void;
|
|
197
|
+
once(
|
|
198
|
+
event: "OwnershipTransferred",
|
|
199
|
+
options: EventOptions,
|
|
200
|
+
cb: Callback<OwnershipTransferred>
|
|
201
|
+
): void;
|
|
202
|
+
}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
/* Autogenerated file. Do not edit manually. */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
|
|
5
|
+
import type BN from "bn.js";
|
|
6
|
+
import type { ContractOptions } from "web3-eth-contract";
|
|
7
|
+
import type { EventLog } from "web3-core";
|
|
8
|
+
import type { EventEmitter } from "events";
|
|
9
|
+
import type {
|
|
10
|
+
Callback,
|
|
11
|
+
PayableTransactionObject,
|
|
12
|
+
NonPayableTransactionObject,
|
|
13
|
+
BlockType,
|
|
14
|
+
ContractEventLog,
|
|
15
|
+
BaseContract,
|
|
16
|
+
} from "./types";
|
|
17
|
+
|
|
18
|
+
export interface EventOptions {
|
|
19
|
+
filter?: object;
|
|
20
|
+
fromBlock?: BlockType;
|
|
21
|
+
topics?: string[];
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type AnswerUpdated = ContractEventLog<{
|
|
25
|
+
current: string;
|
|
26
|
+
roundId: string;
|
|
27
|
+
updatedAt: string;
|
|
28
|
+
0: string;
|
|
29
|
+
1: string;
|
|
30
|
+
2: string;
|
|
31
|
+
}>;
|
|
32
|
+
export type NewRound = ContractEventLog<{
|
|
33
|
+
roundId: string;
|
|
34
|
+
startedBy: string;
|
|
35
|
+
startedAt: string;
|
|
36
|
+
0: string;
|
|
37
|
+
1: string;
|
|
38
|
+
2: string;
|
|
39
|
+
}>;
|
|
40
|
+
export type OwnershipTransferRequested = ContractEventLog<{
|
|
41
|
+
from: string;
|
|
42
|
+
to: string;
|
|
43
|
+
0: string;
|
|
44
|
+
1: string;
|
|
45
|
+
}>;
|
|
46
|
+
export type OwnershipTransferred = ContractEventLog<{
|
|
47
|
+
from: string;
|
|
48
|
+
to: string;
|
|
49
|
+
0: string;
|
|
50
|
+
1: string;
|
|
51
|
+
}>;
|
|
52
|
+
|
|
53
|
+
export interface ETHPriceFeed extends BaseContract {
|
|
54
|
+
constructor(
|
|
55
|
+
jsonInterface: any[],
|
|
56
|
+
address?: string,
|
|
57
|
+
options?: ContractOptions
|
|
58
|
+
): ETHPriceFeed;
|
|
59
|
+
clone(): ETHPriceFeed;
|
|
60
|
+
methods: {
|
|
61
|
+
acceptOwnership(): NonPayableTransactionObject<void>;
|
|
62
|
+
|
|
63
|
+
accessController(): NonPayableTransactionObject<string>;
|
|
64
|
+
|
|
65
|
+
aggregator(): NonPayableTransactionObject<string>;
|
|
66
|
+
|
|
67
|
+
confirmAggregator(_aggregator: string): NonPayableTransactionObject<void>;
|
|
68
|
+
|
|
69
|
+
decimals(): NonPayableTransactionObject<string>;
|
|
70
|
+
|
|
71
|
+
description(): NonPayableTransactionObject<string>;
|
|
72
|
+
|
|
73
|
+
getAnswer(
|
|
74
|
+
_roundId: number | string | BN
|
|
75
|
+
): NonPayableTransactionObject<string>;
|
|
76
|
+
|
|
77
|
+
getRoundData(
|
|
78
|
+
_roundId: number | string | BN
|
|
79
|
+
): NonPayableTransactionObject<
|
|
80
|
+
[string, string, string, string, string] & {
|
|
81
|
+
roundId: string;
|
|
82
|
+
answer: string;
|
|
83
|
+
startedAt: string;
|
|
84
|
+
updatedAt: string;
|
|
85
|
+
answeredInRound: string;
|
|
86
|
+
}
|
|
87
|
+
>;
|
|
88
|
+
|
|
89
|
+
getTimestamp(
|
|
90
|
+
_roundId: number | string | BN
|
|
91
|
+
): NonPayableTransactionObject<string>;
|
|
92
|
+
|
|
93
|
+
latestAnswer(): NonPayableTransactionObject<string>;
|
|
94
|
+
|
|
95
|
+
latestRound(): NonPayableTransactionObject<string>;
|
|
96
|
+
|
|
97
|
+
latestRoundData(): NonPayableTransactionObject<
|
|
98
|
+
[string, string, string, string, string] & {
|
|
99
|
+
roundId: string;
|
|
100
|
+
answer: string;
|
|
101
|
+
startedAt: string;
|
|
102
|
+
updatedAt: string;
|
|
103
|
+
answeredInRound: string;
|
|
104
|
+
}
|
|
105
|
+
>;
|
|
106
|
+
|
|
107
|
+
latestTimestamp(): NonPayableTransactionObject<string>;
|
|
108
|
+
|
|
109
|
+
owner(): NonPayableTransactionObject<string>;
|
|
110
|
+
|
|
111
|
+
phaseAggregators(
|
|
112
|
+
arg0: number | string | BN
|
|
113
|
+
): NonPayableTransactionObject<string>;
|
|
114
|
+
|
|
115
|
+
phaseId(): NonPayableTransactionObject<string>;
|
|
116
|
+
|
|
117
|
+
proposeAggregator(_aggregator: string): NonPayableTransactionObject<void>;
|
|
118
|
+
|
|
119
|
+
proposedAggregator(): NonPayableTransactionObject<string>;
|
|
120
|
+
|
|
121
|
+
proposedGetRoundData(
|
|
122
|
+
_roundId: number | string | BN
|
|
123
|
+
): NonPayableTransactionObject<
|
|
124
|
+
[string, string, string, string, string] & {
|
|
125
|
+
roundId: string;
|
|
126
|
+
answer: string;
|
|
127
|
+
startedAt: string;
|
|
128
|
+
updatedAt: string;
|
|
129
|
+
answeredInRound: string;
|
|
130
|
+
}
|
|
131
|
+
>;
|
|
132
|
+
|
|
133
|
+
proposedLatestRoundData(): NonPayableTransactionObject<
|
|
134
|
+
[string, string, string, string, string] & {
|
|
135
|
+
roundId: string;
|
|
136
|
+
answer: string;
|
|
137
|
+
startedAt: string;
|
|
138
|
+
updatedAt: string;
|
|
139
|
+
answeredInRound: string;
|
|
140
|
+
}
|
|
141
|
+
>;
|
|
142
|
+
|
|
143
|
+
setController(_accessController: string): NonPayableTransactionObject<void>;
|
|
144
|
+
|
|
145
|
+
transferOwnership(_to: string): NonPayableTransactionObject<void>;
|
|
146
|
+
|
|
147
|
+
version(): NonPayableTransactionObject<string>;
|
|
148
|
+
};
|
|
149
|
+
events: {
|
|
150
|
+
AnswerUpdated(cb?: Callback<AnswerUpdated>): EventEmitter;
|
|
151
|
+
AnswerUpdated(
|
|
152
|
+
options?: EventOptions,
|
|
153
|
+
cb?: Callback<AnswerUpdated>
|
|
154
|
+
): EventEmitter;
|
|
155
|
+
|
|
156
|
+
NewRound(cb?: Callback<NewRound>): EventEmitter;
|
|
157
|
+
NewRound(options?: EventOptions, cb?: Callback<NewRound>): EventEmitter;
|
|
158
|
+
|
|
159
|
+
OwnershipTransferRequested(
|
|
160
|
+
cb?: Callback<OwnershipTransferRequested>
|
|
161
|
+
): EventEmitter;
|
|
162
|
+
OwnershipTransferRequested(
|
|
163
|
+
options?: EventOptions,
|
|
164
|
+
cb?: Callback<OwnershipTransferRequested>
|
|
165
|
+
): EventEmitter;
|
|
166
|
+
|
|
167
|
+
OwnershipTransferred(cb?: Callback<OwnershipTransferred>): EventEmitter;
|
|
168
|
+
OwnershipTransferred(
|
|
169
|
+
options?: EventOptions,
|
|
170
|
+
cb?: Callback<OwnershipTransferred>
|
|
171
|
+
): EventEmitter;
|
|
172
|
+
|
|
173
|
+
allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
once(event: "AnswerUpdated", cb: Callback<AnswerUpdated>): void;
|
|
177
|
+
once(
|
|
178
|
+
event: "AnswerUpdated",
|
|
179
|
+
options: EventOptions,
|
|
180
|
+
cb: Callback<AnswerUpdated>
|
|
181
|
+
): void;
|
|
182
|
+
|
|
183
|
+
once(event: "NewRound", cb: Callback<NewRound>): void;
|
|
184
|
+
once(event: "NewRound", options: EventOptions, cb: Callback<NewRound>): void;
|
|
185
|
+
|
|
186
|
+
once(
|
|
187
|
+
event: "OwnershipTransferRequested",
|
|
188
|
+
cb: Callback<OwnershipTransferRequested>
|
|
189
|
+
): void;
|
|
190
|
+
once(
|
|
191
|
+
event: "OwnershipTransferRequested",
|
|
192
|
+
options: EventOptions,
|
|
193
|
+
cb: Callback<OwnershipTransferRequested>
|
|
194
|
+
): void;
|
|
195
|
+
|
|
196
|
+
once(event: "OwnershipTransferred", cb: Callback<OwnershipTransferred>): void;
|
|
197
|
+
once(
|
|
198
|
+
event: "OwnershipTransferred",
|
|
199
|
+
options: EventOptions,
|
|
200
|
+
cb: Callback<OwnershipTransferred>
|
|
201
|
+
): void;
|
|
202
|
+
}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
/* Autogenerated file. Do not edit manually. */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
|
|
5
|
+
import type BN from "bn.js";
|
|
6
|
+
import type { ContractOptions } from "web3-eth-contract";
|
|
7
|
+
import type { EventLog } from "web3-core";
|
|
8
|
+
import type { EventEmitter } from "events";
|
|
9
|
+
import type {
|
|
10
|
+
Callback,
|
|
11
|
+
PayableTransactionObject,
|
|
12
|
+
NonPayableTransactionObject,
|
|
13
|
+
BlockType,
|
|
14
|
+
ContractEventLog,
|
|
15
|
+
BaseContract,
|
|
16
|
+
} from "./types";
|
|
17
|
+
|
|
18
|
+
export interface EventOptions {
|
|
19
|
+
filter?: object;
|
|
20
|
+
fromBlock?: BlockType;
|
|
21
|
+
topics?: string[];
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type AnswerUpdated = ContractEventLog<{
|
|
25
|
+
current: string;
|
|
26
|
+
roundId: string;
|
|
27
|
+
updatedAt: string;
|
|
28
|
+
0: string;
|
|
29
|
+
1: string;
|
|
30
|
+
2: string;
|
|
31
|
+
}>;
|
|
32
|
+
export type NewRound = ContractEventLog<{
|
|
33
|
+
roundId: string;
|
|
34
|
+
startedBy: string;
|
|
35
|
+
startedAt: string;
|
|
36
|
+
0: string;
|
|
37
|
+
1: string;
|
|
38
|
+
2: string;
|
|
39
|
+
}>;
|
|
40
|
+
export type OwnershipTransferRequested = ContractEventLog<{
|
|
41
|
+
from: string;
|
|
42
|
+
to: string;
|
|
43
|
+
0: string;
|
|
44
|
+
1: string;
|
|
45
|
+
}>;
|
|
46
|
+
export type OwnershipTransferred = ContractEventLog<{
|
|
47
|
+
from: string;
|
|
48
|
+
to: string;
|
|
49
|
+
0: string;
|
|
50
|
+
1: string;
|
|
51
|
+
}>;
|
|
52
|
+
|
|
53
|
+
export interface USDCPriceFeed extends BaseContract {
|
|
54
|
+
constructor(
|
|
55
|
+
jsonInterface: any[],
|
|
56
|
+
address?: string,
|
|
57
|
+
options?: ContractOptions
|
|
58
|
+
): USDCPriceFeed;
|
|
59
|
+
clone(): USDCPriceFeed;
|
|
60
|
+
methods: {
|
|
61
|
+
acceptOwnership(): NonPayableTransactionObject<void>;
|
|
62
|
+
|
|
63
|
+
accessController(): NonPayableTransactionObject<string>;
|
|
64
|
+
|
|
65
|
+
aggregator(): NonPayableTransactionObject<string>;
|
|
66
|
+
|
|
67
|
+
confirmAggregator(_aggregator: string): NonPayableTransactionObject<void>;
|
|
68
|
+
|
|
69
|
+
decimals(): NonPayableTransactionObject<string>;
|
|
70
|
+
|
|
71
|
+
description(): NonPayableTransactionObject<string>;
|
|
72
|
+
|
|
73
|
+
getAnswer(
|
|
74
|
+
_roundId: number | string | BN
|
|
75
|
+
): NonPayableTransactionObject<string>;
|
|
76
|
+
|
|
77
|
+
getRoundData(
|
|
78
|
+
_roundId: number | string | BN
|
|
79
|
+
): NonPayableTransactionObject<
|
|
80
|
+
[string, string, string, string, string] & {
|
|
81
|
+
roundId: string;
|
|
82
|
+
answer: string;
|
|
83
|
+
startedAt: string;
|
|
84
|
+
updatedAt: string;
|
|
85
|
+
answeredInRound: string;
|
|
86
|
+
}
|
|
87
|
+
>;
|
|
88
|
+
|
|
89
|
+
getTimestamp(
|
|
90
|
+
_roundId: number | string | BN
|
|
91
|
+
): NonPayableTransactionObject<string>;
|
|
92
|
+
|
|
93
|
+
latestAnswer(): NonPayableTransactionObject<string>;
|
|
94
|
+
|
|
95
|
+
latestRound(): NonPayableTransactionObject<string>;
|
|
96
|
+
|
|
97
|
+
latestRoundData(): NonPayableTransactionObject<
|
|
98
|
+
[string, string, string, string, string] & {
|
|
99
|
+
roundId: string;
|
|
100
|
+
answer: string;
|
|
101
|
+
startedAt: string;
|
|
102
|
+
updatedAt: string;
|
|
103
|
+
answeredInRound: string;
|
|
104
|
+
}
|
|
105
|
+
>;
|
|
106
|
+
|
|
107
|
+
latestTimestamp(): NonPayableTransactionObject<string>;
|
|
108
|
+
|
|
109
|
+
owner(): NonPayableTransactionObject<string>;
|
|
110
|
+
|
|
111
|
+
phaseAggregators(
|
|
112
|
+
arg0: number | string | BN
|
|
113
|
+
): NonPayableTransactionObject<string>;
|
|
114
|
+
|
|
115
|
+
phaseId(): NonPayableTransactionObject<string>;
|
|
116
|
+
|
|
117
|
+
proposeAggregator(_aggregator: string): NonPayableTransactionObject<void>;
|
|
118
|
+
|
|
119
|
+
proposedAggregator(): NonPayableTransactionObject<string>;
|
|
120
|
+
|
|
121
|
+
proposedGetRoundData(
|
|
122
|
+
_roundId: number | string | BN
|
|
123
|
+
): NonPayableTransactionObject<
|
|
124
|
+
[string, string, string, string, string] & {
|
|
125
|
+
roundId: string;
|
|
126
|
+
answer: string;
|
|
127
|
+
startedAt: string;
|
|
128
|
+
updatedAt: string;
|
|
129
|
+
answeredInRound: string;
|
|
130
|
+
}
|
|
131
|
+
>;
|
|
132
|
+
|
|
133
|
+
proposedLatestRoundData(): NonPayableTransactionObject<
|
|
134
|
+
[string, string, string, string, string] & {
|
|
135
|
+
roundId: string;
|
|
136
|
+
answer: string;
|
|
137
|
+
startedAt: string;
|
|
138
|
+
updatedAt: string;
|
|
139
|
+
answeredInRound: string;
|
|
140
|
+
}
|
|
141
|
+
>;
|
|
142
|
+
|
|
143
|
+
setController(_accessController: string): NonPayableTransactionObject<void>;
|
|
144
|
+
|
|
145
|
+
transferOwnership(_to: string): NonPayableTransactionObject<void>;
|
|
146
|
+
|
|
147
|
+
version(): NonPayableTransactionObject<string>;
|
|
148
|
+
};
|
|
149
|
+
events: {
|
|
150
|
+
AnswerUpdated(cb?: Callback<AnswerUpdated>): EventEmitter;
|
|
151
|
+
AnswerUpdated(
|
|
152
|
+
options?: EventOptions,
|
|
153
|
+
cb?: Callback<AnswerUpdated>
|
|
154
|
+
): EventEmitter;
|
|
155
|
+
|
|
156
|
+
NewRound(cb?: Callback<NewRound>): EventEmitter;
|
|
157
|
+
NewRound(options?: EventOptions, cb?: Callback<NewRound>): EventEmitter;
|
|
158
|
+
|
|
159
|
+
OwnershipTransferRequested(
|
|
160
|
+
cb?: Callback<OwnershipTransferRequested>
|
|
161
|
+
): EventEmitter;
|
|
162
|
+
OwnershipTransferRequested(
|
|
163
|
+
options?: EventOptions,
|
|
164
|
+
cb?: Callback<OwnershipTransferRequested>
|
|
165
|
+
): EventEmitter;
|
|
166
|
+
|
|
167
|
+
OwnershipTransferred(cb?: Callback<OwnershipTransferred>): EventEmitter;
|
|
168
|
+
OwnershipTransferred(
|
|
169
|
+
options?: EventOptions,
|
|
170
|
+
cb?: Callback<OwnershipTransferred>
|
|
171
|
+
): EventEmitter;
|
|
172
|
+
|
|
173
|
+
allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
once(event: "AnswerUpdated", cb: Callback<AnswerUpdated>): void;
|
|
177
|
+
once(
|
|
178
|
+
event: "AnswerUpdated",
|
|
179
|
+
options: EventOptions,
|
|
180
|
+
cb: Callback<AnswerUpdated>
|
|
181
|
+
): void;
|
|
182
|
+
|
|
183
|
+
once(event: "NewRound", cb: Callback<NewRound>): void;
|
|
184
|
+
once(event: "NewRound", options: EventOptions, cb: Callback<NewRound>): void;
|
|
185
|
+
|
|
186
|
+
once(
|
|
187
|
+
event: "OwnershipTransferRequested",
|
|
188
|
+
cb: Callback<OwnershipTransferRequested>
|
|
189
|
+
): void;
|
|
190
|
+
once(
|
|
191
|
+
event: "OwnershipTransferRequested",
|
|
192
|
+
options: EventOptions,
|
|
193
|
+
cb: Callback<OwnershipTransferRequested>
|
|
194
|
+
): void;
|
|
195
|
+
|
|
196
|
+
once(event: "OwnershipTransferred", cb: Callback<OwnershipTransferred>): void;
|
|
197
|
+
once(
|
|
198
|
+
event: "OwnershipTransferred",
|
|
199
|
+
options: EventOptions,
|
|
200
|
+
cb: Callback<OwnershipTransferred>
|
|
201
|
+
): void;
|
|
202
|
+
}
|
|
@@ -10,6 +10,7 @@ export type { AaveV3PoolAddressesProvider } from "./AaveV3PoolAddressesProvider"
|
|
|
10
10
|
export type { AaveV3ProtocolDataProvider } from "./AaveV3ProtocolDataProvider";
|
|
11
11
|
export type { AaveV3View } from "./AaveV3View";
|
|
12
12
|
export type { BalanceScanner } from "./BalanceScanner";
|
|
13
|
+
export type { COMPPriceFeed } from "./COMPPriceFeed";
|
|
13
14
|
export type { CbEth } from "./CbEth";
|
|
14
15
|
export type { ChickenBondsManager } from "./ChickenBondsManager";
|
|
15
16
|
export type { ChickenBondsView } from "./ChickenBondsView";
|
|
@@ -20,6 +21,7 @@ export type { CompV3USDbCBulker } from "./CompV3USDbCBulker";
|
|
|
20
21
|
export type { CompV3View } from "./CompV3View";
|
|
21
22
|
export type { CompoundLoanInfo } from "./CompoundLoanInfo";
|
|
22
23
|
export type { Comptroller } from "./Comptroller";
|
|
24
|
+
export type { ETHPriceFeed } from "./ETHPriceFeed";
|
|
23
25
|
export type { Erc20 } from "./Erc20";
|
|
24
26
|
export type { GHO } from "./GHO";
|
|
25
27
|
export type { GhoDiscountRateStrategy } from "./GhoDiscountRateStrategy";
|
|
@@ -46,6 +48,7 @@ export type { SparkPoolAddressesProvider } from "./SparkPoolAddressesProvider";
|
|
|
46
48
|
export type { SparkProtocolDataProvider } from "./SparkProtocolDataProvider";
|
|
47
49
|
export type { SparkView } from "./SparkView";
|
|
48
50
|
export type { TroveManager } from "./TroveManager";
|
|
51
|
+
export type { USDCPriceFeed } from "./USDCPriceFeed";
|
|
49
52
|
export type { UniMulticall } from "./UniMulticall";
|
|
50
53
|
export type { CETHv3 } from "./CETHv3";
|
|
51
54
|
export type { CUSDCv3 } from "./CUSDCv3";
|