aiia-vault-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/SeedRoundFundraiser.ts +742 -0
- package/TradingVault.ts +863 -0
- package/abis/SeedRoundFundraiser.json +1519 -0
- package/abis/TradingVault.json +1647 -0
- package/common.ts +131 -0
- package/contracts/SeedRoundFundraiser.ts +1670 -0
- package/contracts/TradingVault.ts +1752 -0
- package/contracts/common.ts +131 -0
- package/contracts/factories/SeedRoundFundraiser__factory.ts +1495 -0
- package/contracts/factories/index.ts +4 -0
- package/contracts/index.ts +6 -0
- package/contracts.json +28 -0
- package/dist/SeedRoundFundraiser.d.ts +130 -0
- package/dist/SeedRoundFundraiser.js +445 -0
- package/dist/TradingVault.d.ts +175 -0
- package/dist/TradingVault.js +521 -0
- package/dist/abis/SeedRoundFundraiser.json +1519 -0
- package/dist/abis/TradingVault.json +1647 -0
- package/dist/common.d.ts +50 -0
- package/dist/common.js +2 -0
- package/dist/contracts/SeedRoundFundraiser.d.ts +936 -0
- package/dist/contracts/SeedRoundFundraiser.js +2 -0
- package/dist/contracts/TradingVault.d.ts +930 -0
- package/dist/contracts/TradingVault.js +2 -0
- package/dist/contracts.json +28 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +19 -0
- package/dist/types.d.ts +291 -0
- package/dist/types.js +2 -0
- package/dist/utils.d.ts +95 -0
- package/dist/utils.js +370 -0
- package/dist/whitelist-tokens.json +14 -0
- package/index.ts +3 -0
- package/package.json +21 -0
- package/temp/aiia-vault-sdk-1.0.0.tgz +0 -0
- package/tsconfig.json +15 -0
- package/types.ts +301 -0
- package/utils.ts +576 -0
- package/whitelist-tokens.json +14 -0
@@ -0,0 +1,930 @@
|
|
1
|
+
import type { BaseContract, BigNumberish, BytesLike, FunctionFragment, Result, Interface, EventFragment, AddressLike, ContractRunner, ContractMethod, Listener } from "ethers";
|
2
|
+
import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedLogDescription, TypedListener, TypedContractMethod } from "../common";
|
3
|
+
export declare namespace TradingVault {
|
4
|
+
type RewardConfigStruct = {
|
5
|
+
weight: BigNumberish;
|
6
|
+
duration: BigNumberish;
|
7
|
+
};
|
8
|
+
type RewardConfigStructOutput = [weight: bigint, duration: bigint] & {
|
9
|
+
weight: bigint;
|
10
|
+
duration: bigint;
|
11
|
+
};
|
12
|
+
}
|
13
|
+
export interface TradingVaultInterface extends Interface {
|
14
|
+
getFunction(nameOrSignature: "BASE_WEIGHT" | "DEFAULT_ADMIN_ROLE" | "EXPO" | "EXPO_100" | "OPERATOR_ROLE" | "approve" | "balanceOf" | "borrowCurrency" | "claimERC20" | "createPosition" | "createPositionForUser" | "currency" | "getApproved" | "getRewardConfigsLength" | "getRoleAdmin" | "grantOperatorRole" | "grantRole" | "hasRole" | "initialize" | "isApprovedForAll" | "isReduceEnabled" | "name" | "owner" | "ownerOf" | "positions" | "price" | "reducePosition" | "reducePositions" | "renounceOwnership" | "renounceRole" | "repayCurrency" | "revokeRole" | "rewardConfigs" | "rewardToken" | "safeTransferFrom(address,address,uint256)" | "safeTransferFrom(address,address,uint256,bytes)" | "setApprovalForAll" | "setCurrency" | "setPrice" | "setReduceEnabled" | "setRewardToken" | "setTreasury" | "supportsInterface" | "symbol" | "tokenURI" | "totalAmount" | "totalBorrowed" | "totalRewardsAdded" | "totalRewardsHarvested" | "transferFrom" | "transferOwnership" | "treasury" | "updateRewardConfigs"): FunctionFragment;
|
15
|
+
getEvent(nameOrSignatureOrTopic: "Approval" | "ApprovalForAll" | "CurrencyBorrowed" | "CurrencyRepaid" | "CurrencyUpdated" | "Initialized" | "OwnershipTransferred" | "PositionCreated" | "PositionReduced" | "PriceUpdated" | "ReduceEnabledUpdated" | "RewardConfigsUpdated" | "RewardTokenUpdated" | "RoleAdminChanged" | "RoleGranted" | "RoleRevoked" | "TotalAmountUpdated" | "TotalRewardsHarvestedUpdated" | "TotalRewardsUpdated" | "Transfer" | "TreasuryUpdated"): EventFragment;
|
16
|
+
encodeFunctionData(functionFragment: "BASE_WEIGHT", values?: undefined): string;
|
17
|
+
encodeFunctionData(functionFragment: "DEFAULT_ADMIN_ROLE", values?: undefined): string;
|
18
|
+
encodeFunctionData(functionFragment: "EXPO", values?: undefined): string;
|
19
|
+
encodeFunctionData(functionFragment: "EXPO_100", values?: undefined): string;
|
20
|
+
encodeFunctionData(functionFragment: "OPERATOR_ROLE", values?: undefined): string;
|
21
|
+
encodeFunctionData(functionFragment: "approve", values: [AddressLike, BigNumberish]): string;
|
22
|
+
encodeFunctionData(functionFragment: "balanceOf", values: [AddressLike]): string;
|
23
|
+
encodeFunctionData(functionFragment: "borrowCurrency", values: [BigNumberish]): string;
|
24
|
+
encodeFunctionData(functionFragment: "claimERC20", values: [AddressLike, BigNumberish]): string;
|
25
|
+
encodeFunctionData(functionFragment: "createPosition", values: [BigNumberish]): string;
|
26
|
+
encodeFunctionData(functionFragment: "createPositionForUser", values: [AddressLike, BigNumberish]): string;
|
27
|
+
encodeFunctionData(functionFragment: "currency", values?: undefined): string;
|
28
|
+
encodeFunctionData(functionFragment: "getApproved", values: [BigNumberish]): string;
|
29
|
+
encodeFunctionData(functionFragment: "getRewardConfigsLength", values?: undefined): string;
|
30
|
+
encodeFunctionData(functionFragment: "getRoleAdmin", values: [BytesLike]): string;
|
31
|
+
encodeFunctionData(functionFragment: "grantOperatorRole", values: [AddressLike]): string;
|
32
|
+
encodeFunctionData(functionFragment: "grantRole", values: [BytesLike, AddressLike]): string;
|
33
|
+
encodeFunctionData(functionFragment: "hasRole", values: [BytesLike, AddressLike]): string;
|
34
|
+
encodeFunctionData(functionFragment: "initialize", values: [AddressLike, AddressLike]): string;
|
35
|
+
encodeFunctionData(functionFragment: "isApprovedForAll", values: [AddressLike, AddressLike]): string;
|
36
|
+
encodeFunctionData(functionFragment: "isReduceEnabled", values?: undefined): string;
|
37
|
+
encodeFunctionData(functionFragment: "name", values?: undefined): string;
|
38
|
+
encodeFunctionData(functionFragment: "owner", values?: undefined): string;
|
39
|
+
encodeFunctionData(functionFragment: "ownerOf", values: [BigNumberish]): string;
|
40
|
+
encodeFunctionData(functionFragment: "positions", values: [BigNumberish]): string;
|
41
|
+
encodeFunctionData(functionFragment: "price", values?: undefined): string;
|
42
|
+
encodeFunctionData(functionFragment: "reducePosition", values: [BigNumberish, BigNumberish]): string;
|
43
|
+
encodeFunctionData(functionFragment: "reducePositions", values: [BigNumberish[], BigNumberish[]]): string;
|
44
|
+
encodeFunctionData(functionFragment: "renounceOwnership", values?: undefined): string;
|
45
|
+
encodeFunctionData(functionFragment: "renounceRole", values: [BytesLike, AddressLike]): string;
|
46
|
+
encodeFunctionData(functionFragment: "repayCurrency", values: [BigNumberish]): string;
|
47
|
+
encodeFunctionData(functionFragment: "revokeRole", values: [BytesLike, AddressLike]): string;
|
48
|
+
encodeFunctionData(functionFragment: "rewardConfigs", values: [BigNumberish]): string;
|
49
|
+
encodeFunctionData(functionFragment: "rewardToken", values?: undefined): string;
|
50
|
+
encodeFunctionData(functionFragment: "safeTransferFrom(address,address,uint256)", values: [AddressLike, AddressLike, BigNumberish]): string;
|
51
|
+
encodeFunctionData(functionFragment: "safeTransferFrom(address,address,uint256,bytes)", values: [AddressLike, AddressLike, BigNumberish, BytesLike]): string;
|
52
|
+
encodeFunctionData(functionFragment: "setApprovalForAll", values: [AddressLike, boolean]): string;
|
53
|
+
encodeFunctionData(functionFragment: "setCurrency", values: [AddressLike]): string;
|
54
|
+
encodeFunctionData(functionFragment: "setPrice", values: [BigNumberish, BigNumberish]): string;
|
55
|
+
encodeFunctionData(functionFragment: "setReduceEnabled", values: [boolean]): string;
|
56
|
+
encodeFunctionData(functionFragment: "setRewardToken", values: [AddressLike]): string;
|
57
|
+
encodeFunctionData(functionFragment: "setTreasury", values: [AddressLike]): string;
|
58
|
+
encodeFunctionData(functionFragment: "supportsInterface", values: [BytesLike]): string;
|
59
|
+
encodeFunctionData(functionFragment: "symbol", values?: undefined): string;
|
60
|
+
encodeFunctionData(functionFragment: "tokenURI", values: [BigNumberish]): string;
|
61
|
+
encodeFunctionData(functionFragment: "totalAmount", values?: undefined): string;
|
62
|
+
encodeFunctionData(functionFragment: "totalBorrowed", values?: undefined): string;
|
63
|
+
encodeFunctionData(functionFragment: "totalRewardsAdded", values?: undefined): string;
|
64
|
+
encodeFunctionData(functionFragment: "totalRewardsHarvested", values?: undefined): string;
|
65
|
+
encodeFunctionData(functionFragment: "transferFrom", values: [AddressLike, AddressLike, BigNumberish]): string;
|
66
|
+
encodeFunctionData(functionFragment: "transferOwnership", values: [AddressLike]): string;
|
67
|
+
encodeFunctionData(functionFragment: "treasury", values?: undefined): string;
|
68
|
+
encodeFunctionData(functionFragment: "updateRewardConfigs", values: [TradingVault.RewardConfigStruct[]]): string;
|
69
|
+
decodeFunctionResult(functionFragment: "BASE_WEIGHT", data: BytesLike): Result;
|
70
|
+
decodeFunctionResult(functionFragment: "DEFAULT_ADMIN_ROLE", data: BytesLike): Result;
|
71
|
+
decodeFunctionResult(functionFragment: "EXPO", data: BytesLike): Result;
|
72
|
+
decodeFunctionResult(functionFragment: "EXPO_100", data: BytesLike): Result;
|
73
|
+
decodeFunctionResult(functionFragment: "OPERATOR_ROLE", data: BytesLike): Result;
|
74
|
+
decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result;
|
75
|
+
decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result;
|
76
|
+
decodeFunctionResult(functionFragment: "borrowCurrency", data: BytesLike): Result;
|
77
|
+
decodeFunctionResult(functionFragment: "claimERC20", data: BytesLike): Result;
|
78
|
+
decodeFunctionResult(functionFragment: "createPosition", data: BytesLike): Result;
|
79
|
+
decodeFunctionResult(functionFragment: "createPositionForUser", data: BytesLike): Result;
|
80
|
+
decodeFunctionResult(functionFragment: "currency", data: BytesLike): Result;
|
81
|
+
decodeFunctionResult(functionFragment: "getApproved", data: BytesLike): Result;
|
82
|
+
decodeFunctionResult(functionFragment: "getRewardConfigsLength", data: BytesLike): Result;
|
83
|
+
decodeFunctionResult(functionFragment: "getRoleAdmin", data: BytesLike): Result;
|
84
|
+
decodeFunctionResult(functionFragment: "grantOperatorRole", data: BytesLike): Result;
|
85
|
+
decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result;
|
86
|
+
decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result;
|
87
|
+
decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result;
|
88
|
+
decodeFunctionResult(functionFragment: "isApprovedForAll", data: BytesLike): Result;
|
89
|
+
decodeFunctionResult(functionFragment: "isReduceEnabled", data: BytesLike): Result;
|
90
|
+
decodeFunctionResult(functionFragment: "name", data: BytesLike): Result;
|
91
|
+
decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result;
|
92
|
+
decodeFunctionResult(functionFragment: "ownerOf", data: BytesLike): Result;
|
93
|
+
decodeFunctionResult(functionFragment: "positions", data: BytesLike): Result;
|
94
|
+
decodeFunctionResult(functionFragment: "price", data: BytesLike): Result;
|
95
|
+
decodeFunctionResult(functionFragment: "reducePosition", data: BytesLike): Result;
|
96
|
+
decodeFunctionResult(functionFragment: "reducePositions", data: BytesLike): Result;
|
97
|
+
decodeFunctionResult(functionFragment: "renounceOwnership", data: BytesLike): Result;
|
98
|
+
decodeFunctionResult(functionFragment: "renounceRole", data: BytesLike): Result;
|
99
|
+
decodeFunctionResult(functionFragment: "repayCurrency", data: BytesLike): Result;
|
100
|
+
decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result;
|
101
|
+
decodeFunctionResult(functionFragment: "rewardConfigs", data: BytesLike): Result;
|
102
|
+
decodeFunctionResult(functionFragment: "rewardToken", data: BytesLike): Result;
|
103
|
+
decodeFunctionResult(functionFragment: "safeTransferFrom(address,address,uint256)", data: BytesLike): Result;
|
104
|
+
decodeFunctionResult(functionFragment: "safeTransferFrom(address,address,uint256,bytes)", data: BytesLike): Result;
|
105
|
+
decodeFunctionResult(functionFragment: "setApprovalForAll", data: BytesLike): Result;
|
106
|
+
decodeFunctionResult(functionFragment: "setCurrency", data: BytesLike): Result;
|
107
|
+
decodeFunctionResult(functionFragment: "setPrice", data: BytesLike): Result;
|
108
|
+
decodeFunctionResult(functionFragment: "setReduceEnabled", data: BytesLike): Result;
|
109
|
+
decodeFunctionResult(functionFragment: "setRewardToken", data: BytesLike): Result;
|
110
|
+
decodeFunctionResult(functionFragment: "setTreasury", data: BytesLike): Result;
|
111
|
+
decodeFunctionResult(functionFragment: "supportsInterface", data: BytesLike): Result;
|
112
|
+
decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result;
|
113
|
+
decodeFunctionResult(functionFragment: "tokenURI", data: BytesLike): Result;
|
114
|
+
decodeFunctionResult(functionFragment: "totalAmount", data: BytesLike): Result;
|
115
|
+
decodeFunctionResult(functionFragment: "totalBorrowed", data: BytesLike): Result;
|
116
|
+
decodeFunctionResult(functionFragment: "totalRewardsAdded", data: BytesLike): Result;
|
117
|
+
decodeFunctionResult(functionFragment: "totalRewardsHarvested", data: BytesLike): Result;
|
118
|
+
decodeFunctionResult(functionFragment: "transferFrom", data: BytesLike): Result;
|
119
|
+
decodeFunctionResult(functionFragment: "transferOwnership", data: BytesLike): Result;
|
120
|
+
decodeFunctionResult(functionFragment: "treasury", data: BytesLike): Result;
|
121
|
+
decodeFunctionResult(functionFragment: "updateRewardConfigs", data: BytesLike): Result;
|
122
|
+
}
|
123
|
+
export declare namespace ApprovalEvent {
|
124
|
+
type InputTuple = [
|
125
|
+
owner: AddressLike,
|
126
|
+
approved: AddressLike,
|
127
|
+
tokenId: BigNumberish
|
128
|
+
];
|
129
|
+
type OutputTuple = [owner: string, approved: string, tokenId: bigint];
|
130
|
+
interface OutputObject {
|
131
|
+
owner: string;
|
132
|
+
approved: string;
|
133
|
+
tokenId: bigint;
|
134
|
+
}
|
135
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
136
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
137
|
+
type Log = TypedEventLog<Event>;
|
138
|
+
type LogDescription = TypedLogDescription<Event>;
|
139
|
+
}
|
140
|
+
export declare namespace ApprovalForAllEvent {
|
141
|
+
type InputTuple = [
|
142
|
+
owner: AddressLike,
|
143
|
+
operator: AddressLike,
|
144
|
+
approved: boolean
|
145
|
+
];
|
146
|
+
type OutputTuple = [
|
147
|
+
owner: string,
|
148
|
+
operator: string,
|
149
|
+
approved: boolean
|
150
|
+
];
|
151
|
+
interface OutputObject {
|
152
|
+
owner: string;
|
153
|
+
operator: string;
|
154
|
+
approved: boolean;
|
155
|
+
}
|
156
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
157
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
158
|
+
type Log = TypedEventLog<Event>;
|
159
|
+
type LogDescription = TypedLogDescription<Event>;
|
160
|
+
}
|
161
|
+
export declare namespace CurrencyBorrowedEvent {
|
162
|
+
type InputTuple = [borrower: AddressLike, amount: BigNumberish];
|
163
|
+
type OutputTuple = [borrower: string, amount: bigint];
|
164
|
+
interface OutputObject {
|
165
|
+
borrower: string;
|
166
|
+
amount: bigint;
|
167
|
+
}
|
168
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
169
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
170
|
+
type Log = TypedEventLog<Event>;
|
171
|
+
type LogDescription = TypedLogDescription<Event>;
|
172
|
+
}
|
173
|
+
export declare namespace CurrencyRepaidEvent {
|
174
|
+
type InputTuple = [borrower: AddressLike, amount: BigNumberish];
|
175
|
+
type OutputTuple = [borrower: string, amount: bigint];
|
176
|
+
interface OutputObject {
|
177
|
+
borrower: string;
|
178
|
+
amount: bigint;
|
179
|
+
}
|
180
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
181
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
182
|
+
type Log = TypedEventLog<Event>;
|
183
|
+
type LogDescription = TypedLogDescription<Event>;
|
184
|
+
}
|
185
|
+
export declare namespace CurrencyUpdatedEvent {
|
186
|
+
type InputTuple = [oldCurrency: AddressLike, newCurrency: AddressLike];
|
187
|
+
type OutputTuple = [oldCurrency: string, newCurrency: string];
|
188
|
+
interface OutputObject {
|
189
|
+
oldCurrency: string;
|
190
|
+
newCurrency: string;
|
191
|
+
}
|
192
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
193
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
194
|
+
type Log = TypedEventLog<Event>;
|
195
|
+
type LogDescription = TypedLogDescription<Event>;
|
196
|
+
}
|
197
|
+
export declare namespace InitializedEvent {
|
198
|
+
type InputTuple = [version: BigNumberish];
|
199
|
+
type OutputTuple = [version: bigint];
|
200
|
+
interface OutputObject {
|
201
|
+
version: bigint;
|
202
|
+
}
|
203
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
204
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
205
|
+
type Log = TypedEventLog<Event>;
|
206
|
+
type LogDescription = TypedLogDescription<Event>;
|
207
|
+
}
|
208
|
+
export declare namespace OwnershipTransferredEvent {
|
209
|
+
type InputTuple = [previousOwner: AddressLike, newOwner: AddressLike];
|
210
|
+
type OutputTuple = [previousOwner: string, newOwner: string];
|
211
|
+
interface OutputObject {
|
212
|
+
previousOwner: string;
|
213
|
+
newOwner: string;
|
214
|
+
}
|
215
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
216
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
217
|
+
type Log = TypedEventLog<Event>;
|
218
|
+
type LogDescription = TypedLogDescription<Event>;
|
219
|
+
}
|
220
|
+
export declare namespace PositionCreatedEvent {
|
221
|
+
type InputTuple = [
|
222
|
+
user: AddressLike,
|
223
|
+
tokenId: BigNumberish,
|
224
|
+
entryPrice: BigNumberish,
|
225
|
+
amount: BigNumberish,
|
226
|
+
openedAt: BigNumberish
|
227
|
+
];
|
228
|
+
type OutputTuple = [
|
229
|
+
user: string,
|
230
|
+
tokenId: bigint,
|
231
|
+
entryPrice: bigint,
|
232
|
+
amount: bigint,
|
233
|
+
openedAt: bigint
|
234
|
+
];
|
235
|
+
interface OutputObject {
|
236
|
+
user: string;
|
237
|
+
tokenId: bigint;
|
238
|
+
entryPrice: bigint;
|
239
|
+
amount: bigint;
|
240
|
+
openedAt: bigint;
|
241
|
+
}
|
242
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
243
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
244
|
+
type Log = TypedEventLog<Event>;
|
245
|
+
type LogDescription = TypedLogDescription<Event>;
|
246
|
+
}
|
247
|
+
export declare namespace PositionReducedEvent {
|
248
|
+
type InputTuple = [
|
249
|
+
user: AddressLike,
|
250
|
+
tokenId: BigNumberish,
|
251
|
+
reducedAmount: BigNumberish,
|
252
|
+
remainingAmount: BigNumberish,
|
253
|
+
totalReward: BigNumberish,
|
254
|
+
weight: BigNumberish,
|
255
|
+
userReward: BigNumberish,
|
256
|
+
treasuryReward: BigNumberish,
|
257
|
+
lossAmount: BigNumberish,
|
258
|
+
price: BigNumberish,
|
259
|
+
rewardedAmount: BigNumberish,
|
260
|
+
loss: BigNumberish
|
261
|
+
];
|
262
|
+
type OutputTuple = [
|
263
|
+
user: string,
|
264
|
+
tokenId: bigint,
|
265
|
+
reducedAmount: bigint,
|
266
|
+
remainingAmount: bigint,
|
267
|
+
totalReward: bigint,
|
268
|
+
weight: bigint,
|
269
|
+
userReward: bigint,
|
270
|
+
treasuryReward: bigint,
|
271
|
+
lossAmount: bigint,
|
272
|
+
price: bigint,
|
273
|
+
rewardedAmount: bigint,
|
274
|
+
loss: bigint
|
275
|
+
];
|
276
|
+
interface OutputObject {
|
277
|
+
user: string;
|
278
|
+
tokenId: bigint;
|
279
|
+
reducedAmount: bigint;
|
280
|
+
remainingAmount: bigint;
|
281
|
+
totalReward: bigint;
|
282
|
+
weight: bigint;
|
283
|
+
userReward: bigint;
|
284
|
+
treasuryReward: bigint;
|
285
|
+
lossAmount: bigint;
|
286
|
+
price: bigint;
|
287
|
+
rewardedAmount: bigint;
|
288
|
+
loss: bigint;
|
289
|
+
}
|
290
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
291
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
292
|
+
type Log = TypedEventLog<Event>;
|
293
|
+
type LogDescription = TypedLogDescription<Event>;
|
294
|
+
}
|
295
|
+
export declare namespace PriceUpdatedEvent {
|
296
|
+
type InputTuple = [
|
297
|
+
oldPrice: BigNumberish,
|
298
|
+
newPrice: BigNumberish,
|
299
|
+
requiredReward: BigNumberish
|
300
|
+
];
|
301
|
+
type OutputTuple = [
|
302
|
+
oldPrice: bigint,
|
303
|
+
newPrice: bigint,
|
304
|
+
requiredReward: bigint
|
305
|
+
];
|
306
|
+
interface OutputObject {
|
307
|
+
oldPrice: bigint;
|
308
|
+
newPrice: bigint;
|
309
|
+
requiredReward: bigint;
|
310
|
+
}
|
311
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
312
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
313
|
+
type Log = TypedEventLog<Event>;
|
314
|
+
type LogDescription = TypedLogDescription<Event>;
|
315
|
+
}
|
316
|
+
export declare namespace ReduceEnabledUpdatedEvent {
|
317
|
+
type InputTuple = [enabled: boolean];
|
318
|
+
type OutputTuple = [enabled: boolean];
|
319
|
+
interface OutputObject {
|
320
|
+
enabled: boolean;
|
321
|
+
}
|
322
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
323
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
324
|
+
type Log = TypedEventLog<Event>;
|
325
|
+
type LogDescription = TypedLogDescription<Event>;
|
326
|
+
}
|
327
|
+
export declare namespace RewardConfigsUpdatedEvent {
|
328
|
+
type InputTuple = [];
|
329
|
+
type OutputTuple = [];
|
330
|
+
interface OutputObject {
|
331
|
+
}
|
332
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
333
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
334
|
+
type Log = TypedEventLog<Event>;
|
335
|
+
type LogDescription = TypedLogDescription<Event>;
|
336
|
+
}
|
337
|
+
export declare namespace RewardTokenUpdatedEvent {
|
338
|
+
type InputTuple = [
|
339
|
+
oldRewardToken: AddressLike,
|
340
|
+
newRewardToken: AddressLike
|
341
|
+
];
|
342
|
+
type OutputTuple = [oldRewardToken: string, newRewardToken: string];
|
343
|
+
interface OutputObject {
|
344
|
+
oldRewardToken: string;
|
345
|
+
newRewardToken: string;
|
346
|
+
}
|
347
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
348
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
349
|
+
type Log = TypedEventLog<Event>;
|
350
|
+
type LogDescription = TypedLogDescription<Event>;
|
351
|
+
}
|
352
|
+
export declare namespace RoleAdminChangedEvent {
|
353
|
+
type InputTuple = [
|
354
|
+
role: BytesLike,
|
355
|
+
previousAdminRole: BytesLike,
|
356
|
+
newAdminRole: BytesLike
|
357
|
+
];
|
358
|
+
type OutputTuple = [
|
359
|
+
role: string,
|
360
|
+
previousAdminRole: string,
|
361
|
+
newAdminRole: string
|
362
|
+
];
|
363
|
+
interface OutputObject {
|
364
|
+
role: string;
|
365
|
+
previousAdminRole: string;
|
366
|
+
newAdminRole: string;
|
367
|
+
}
|
368
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
369
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
370
|
+
type Log = TypedEventLog<Event>;
|
371
|
+
type LogDescription = TypedLogDescription<Event>;
|
372
|
+
}
|
373
|
+
export declare namespace RoleGrantedEvent {
|
374
|
+
type InputTuple = [
|
375
|
+
role: BytesLike,
|
376
|
+
account: AddressLike,
|
377
|
+
sender: AddressLike
|
378
|
+
];
|
379
|
+
type OutputTuple = [role: string, account: string, sender: string];
|
380
|
+
interface OutputObject {
|
381
|
+
role: string;
|
382
|
+
account: string;
|
383
|
+
sender: string;
|
384
|
+
}
|
385
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
386
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
387
|
+
type Log = TypedEventLog<Event>;
|
388
|
+
type LogDescription = TypedLogDescription<Event>;
|
389
|
+
}
|
390
|
+
export declare namespace RoleRevokedEvent {
|
391
|
+
type InputTuple = [
|
392
|
+
role: BytesLike,
|
393
|
+
account: AddressLike,
|
394
|
+
sender: AddressLike
|
395
|
+
];
|
396
|
+
type OutputTuple = [role: string, account: string, sender: string];
|
397
|
+
interface OutputObject {
|
398
|
+
role: string;
|
399
|
+
account: string;
|
400
|
+
sender: string;
|
401
|
+
}
|
402
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
403
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
404
|
+
type Log = TypedEventLog<Event>;
|
405
|
+
type LogDescription = TypedLogDescription<Event>;
|
406
|
+
}
|
407
|
+
export declare namespace TotalAmountUpdatedEvent {
|
408
|
+
type InputTuple = [newTotalAmount: BigNumberish];
|
409
|
+
type OutputTuple = [newTotalAmount: bigint];
|
410
|
+
interface OutputObject {
|
411
|
+
newTotalAmount: bigint;
|
412
|
+
}
|
413
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
414
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
415
|
+
type Log = TypedEventLog<Event>;
|
416
|
+
type LogDescription = TypedLogDescription<Event>;
|
417
|
+
}
|
418
|
+
export declare namespace TotalRewardsHarvestedUpdatedEvent {
|
419
|
+
type InputTuple = [oldAmount: BigNumberish, newAmount: BigNumberish];
|
420
|
+
type OutputTuple = [oldAmount: bigint, newAmount: bigint];
|
421
|
+
interface OutputObject {
|
422
|
+
oldAmount: bigint;
|
423
|
+
newAmount: bigint;
|
424
|
+
}
|
425
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
426
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
427
|
+
type Log = TypedEventLog<Event>;
|
428
|
+
type LogDescription = TypedLogDescription<Event>;
|
429
|
+
}
|
430
|
+
export declare namespace TotalRewardsUpdatedEvent {
|
431
|
+
type InputTuple = [oldAmount: BigNumberish, newAmount: BigNumberish];
|
432
|
+
type OutputTuple = [oldAmount: bigint, newAmount: bigint];
|
433
|
+
interface OutputObject {
|
434
|
+
oldAmount: bigint;
|
435
|
+
newAmount: bigint;
|
436
|
+
}
|
437
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
438
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
439
|
+
type Log = TypedEventLog<Event>;
|
440
|
+
type LogDescription = TypedLogDescription<Event>;
|
441
|
+
}
|
442
|
+
export declare namespace TransferEvent {
|
443
|
+
type InputTuple = [
|
444
|
+
from: AddressLike,
|
445
|
+
to: AddressLike,
|
446
|
+
tokenId: BigNumberish
|
447
|
+
];
|
448
|
+
type OutputTuple = [from: string, to: string, tokenId: bigint];
|
449
|
+
interface OutputObject {
|
450
|
+
from: string;
|
451
|
+
to: string;
|
452
|
+
tokenId: bigint;
|
453
|
+
}
|
454
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
455
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
456
|
+
type Log = TypedEventLog<Event>;
|
457
|
+
type LogDescription = TypedLogDescription<Event>;
|
458
|
+
}
|
459
|
+
export declare namespace TreasuryUpdatedEvent {
|
460
|
+
type InputTuple = [oldTreasury: AddressLike, newTreasury: AddressLike];
|
461
|
+
type OutputTuple = [oldTreasury: string, newTreasury: string];
|
462
|
+
interface OutputObject {
|
463
|
+
oldTreasury: string;
|
464
|
+
newTreasury: string;
|
465
|
+
}
|
466
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
467
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
468
|
+
type Log = TypedEventLog<Event>;
|
469
|
+
type LogDescription = TypedLogDescription<Event>;
|
470
|
+
}
|
471
|
+
export interface TradingVault extends BaseContract {
|
472
|
+
connect(runner?: ContractRunner | null): TradingVault;
|
473
|
+
waitForDeployment(): Promise<this>;
|
474
|
+
interface: TradingVaultInterface;
|
475
|
+
queryFilter<TCEvent extends TypedContractEvent>(event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>;
|
476
|
+
queryFilter<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>;
|
477
|
+
on<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
|
478
|
+
on<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>;
|
479
|
+
once<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
|
480
|
+
once<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>;
|
481
|
+
listeners<TCEvent extends TypedContractEvent>(event: TCEvent): Promise<Array<TypedListener<TCEvent>>>;
|
482
|
+
listeners(eventName?: string): Promise<Array<Listener>>;
|
483
|
+
removeAllListeners<TCEvent extends TypedContractEvent>(event?: TCEvent): Promise<this>;
|
484
|
+
BASE_WEIGHT: TypedContractMethod<[], [bigint], "view">;
|
485
|
+
DEFAULT_ADMIN_ROLE: TypedContractMethod<[], [string], "view">;
|
486
|
+
EXPO: TypedContractMethod<[], [bigint], "view">;
|
487
|
+
EXPO_100: TypedContractMethod<[], [bigint], "view">;
|
488
|
+
OPERATOR_ROLE: TypedContractMethod<[], [string], "view">;
|
489
|
+
approve: TypedContractMethod<[
|
490
|
+
to: AddressLike,
|
491
|
+
tokenId: BigNumberish
|
492
|
+
], [
|
493
|
+
void
|
494
|
+
], "nonpayable">;
|
495
|
+
balanceOf: TypedContractMethod<[owner: AddressLike], [bigint], "view">;
|
496
|
+
borrowCurrency: TypedContractMethod<[
|
497
|
+
_amount: BigNumberish
|
498
|
+
], [
|
499
|
+
void
|
500
|
+
], "nonpayable">;
|
501
|
+
claimERC20: TypedContractMethod<[
|
502
|
+
_token: AddressLike,
|
503
|
+
_amount: BigNumberish
|
504
|
+
], [
|
505
|
+
void
|
506
|
+
], "nonpayable">;
|
507
|
+
createPosition: TypedContractMethod<[
|
508
|
+
_amount: BigNumberish
|
509
|
+
], [
|
510
|
+
bigint
|
511
|
+
], "nonpayable">;
|
512
|
+
createPositionForUser: TypedContractMethod<[
|
513
|
+
_user: AddressLike,
|
514
|
+
_amount: BigNumberish
|
515
|
+
], [
|
516
|
+
bigint
|
517
|
+
], "nonpayable">;
|
518
|
+
currency: TypedContractMethod<[], [string], "view">;
|
519
|
+
getApproved: TypedContractMethod<[tokenId: BigNumberish], [string], "view">;
|
520
|
+
getRewardConfigsLength: TypedContractMethod<[], [bigint], "view">;
|
521
|
+
getRoleAdmin: TypedContractMethod<[role: BytesLike], [string], "view">;
|
522
|
+
grantOperatorRole: TypedContractMethod<[
|
523
|
+
operator: AddressLike
|
524
|
+
], [
|
525
|
+
void
|
526
|
+
], "nonpayable">;
|
527
|
+
grantRole: TypedContractMethod<[
|
528
|
+
role: BytesLike,
|
529
|
+
account: AddressLike
|
530
|
+
], [
|
531
|
+
void
|
532
|
+
], "nonpayable">;
|
533
|
+
hasRole: TypedContractMethod<[
|
534
|
+
role: BytesLike,
|
535
|
+
account: AddressLike
|
536
|
+
], [
|
537
|
+
boolean
|
538
|
+
], "view">;
|
539
|
+
initialize: TypedContractMethod<[
|
540
|
+
_currency: AddressLike,
|
541
|
+
_rewardToken: AddressLike
|
542
|
+
], [
|
543
|
+
void
|
544
|
+
], "nonpayable">;
|
545
|
+
isApprovedForAll: TypedContractMethod<[
|
546
|
+
owner: AddressLike,
|
547
|
+
operator: AddressLike
|
548
|
+
], [
|
549
|
+
boolean
|
550
|
+
], "view">;
|
551
|
+
isReduceEnabled: TypedContractMethod<[], [boolean], "view">;
|
552
|
+
name: TypedContractMethod<[], [string], "view">;
|
553
|
+
owner: TypedContractMethod<[], [string], "view">;
|
554
|
+
ownerOf: TypedContractMethod<[tokenId: BigNumberish], [string], "view">;
|
555
|
+
positions: TypedContractMethod<[
|
556
|
+
arg0: BigNumberish
|
557
|
+
], [
|
558
|
+
[
|
559
|
+
bigint,
|
560
|
+
bigint,
|
561
|
+
bigint,
|
562
|
+
bigint,
|
563
|
+
bigint,
|
564
|
+
bigint,
|
565
|
+
bigint,
|
566
|
+
bigint
|
567
|
+
] & {
|
568
|
+
entryPrice: bigint;
|
569
|
+
outPrice: bigint;
|
570
|
+
remainingAmount: bigint;
|
571
|
+
initAmount: bigint;
|
572
|
+
openedAt: bigint;
|
573
|
+
closedAt: bigint;
|
574
|
+
rewardedAmount: bigint;
|
575
|
+
lossAmount: bigint;
|
576
|
+
}
|
577
|
+
], "view">;
|
578
|
+
price: TypedContractMethod<[], [bigint], "view">;
|
579
|
+
reducePosition: TypedContractMethod<[
|
580
|
+
_tokenId: BigNumberish,
|
581
|
+
_amount: BigNumberish
|
582
|
+
], [
|
583
|
+
void
|
584
|
+
], "nonpayable">;
|
585
|
+
reducePositions: TypedContractMethod<[
|
586
|
+
_tokenIds: BigNumberish[],
|
587
|
+
_amounts: BigNumberish[]
|
588
|
+
], [
|
589
|
+
void
|
590
|
+
], "nonpayable">;
|
591
|
+
renounceOwnership: TypedContractMethod<[], [void], "nonpayable">;
|
592
|
+
renounceRole: TypedContractMethod<[
|
593
|
+
role: BytesLike,
|
594
|
+
callerConfirmation: AddressLike
|
595
|
+
], [
|
596
|
+
void
|
597
|
+
], "nonpayable">;
|
598
|
+
repayCurrency: TypedContractMethod<[
|
599
|
+
_amount: BigNumberish
|
600
|
+
], [
|
601
|
+
void
|
602
|
+
], "nonpayable">;
|
603
|
+
revokeRole: TypedContractMethod<[
|
604
|
+
role: BytesLike,
|
605
|
+
account: AddressLike
|
606
|
+
], [
|
607
|
+
void
|
608
|
+
], "nonpayable">;
|
609
|
+
rewardConfigs: TypedContractMethod<[
|
610
|
+
arg0: BigNumberish
|
611
|
+
], [
|
612
|
+
[bigint, bigint] & {
|
613
|
+
weight: bigint;
|
614
|
+
duration: bigint;
|
615
|
+
}
|
616
|
+
], "view">;
|
617
|
+
rewardToken: TypedContractMethod<[], [string], "view">;
|
618
|
+
"safeTransferFrom(address,address,uint256)": TypedContractMethod<[
|
619
|
+
from: AddressLike,
|
620
|
+
to: AddressLike,
|
621
|
+
tokenId: BigNumberish
|
622
|
+
], [
|
623
|
+
void
|
624
|
+
], "nonpayable">;
|
625
|
+
"safeTransferFrom(address,address,uint256,bytes)": TypedContractMethod<[
|
626
|
+
from: AddressLike,
|
627
|
+
to: AddressLike,
|
628
|
+
tokenId: BigNumberish,
|
629
|
+
data: BytesLike
|
630
|
+
], [
|
631
|
+
void
|
632
|
+
], "nonpayable">;
|
633
|
+
setApprovalForAll: TypedContractMethod<[
|
634
|
+
operator: AddressLike,
|
635
|
+
approved: boolean
|
636
|
+
], [
|
637
|
+
void
|
638
|
+
], "nonpayable">;
|
639
|
+
setCurrency: TypedContractMethod<[
|
640
|
+
_currency: AddressLike
|
641
|
+
], [
|
642
|
+
void
|
643
|
+
], "nonpayable">;
|
644
|
+
setPrice: TypedContractMethod<[
|
645
|
+
_newPrice: BigNumberish,
|
646
|
+
_rewardAmount: BigNumberish
|
647
|
+
], [
|
648
|
+
void
|
649
|
+
], "nonpayable">;
|
650
|
+
setReduceEnabled: TypedContractMethod<[
|
651
|
+
_enabled: boolean
|
652
|
+
], [
|
653
|
+
void
|
654
|
+
], "nonpayable">;
|
655
|
+
setRewardToken: TypedContractMethod<[
|
656
|
+
_rewardToken: AddressLike
|
657
|
+
], [
|
658
|
+
void
|
659
|
+
], "nonpayable">;
|
660
|
+
setTreasury: TypedContractMethod<[
|
661
|
+
_treasury: AddressLike
|
662
|
+
], [
|
663
|
+
void
|
664
|
+
], "nonpayable">;
|
665
|
+
supportsInterface: TypedContractMethod<[
|
666
|
+
interfaceId: BytesLike
|
667
|
+
], [
|
668
|
+
boolean
|
669
|
+
], "view">;
|
670
|
+
symbol: TypedContractMethod<[], [string], "view">;
|
671
|
+
tokenURI: TypedContractMethod<[tokenId: BigNumberish], [string], "view">;
|
672
|
+
totalAmount: TypedContractMethod<[], [bigint], "view">;
|
673
|
+
totalBorrowed: TypedContractMethod<[], [bigint], "view">;
|
674
|
+
totalRewardsAdded: TypedContractMethod<[], [bigint], "view">;
|
675
|
+
totalRewardsHarvested: TypedContractMethod<[], [bigint], "view">;
|
676
|
+
transferFrom: TypedContractMethod<[
|
677
|
+
from: AddressLike,
|
678
|
+
to: AddressLike,
|
679
|
+
tokenId: BigNumberish
|
680
|
+
], [
|
681
|
+
void
|
682
|
+
], "nonpayable">;
|
683
|
+
transferOwnership: TypedContractMethod<[
|
684
|
+
newOwner: AddressLike
|
685
|
+
], [
|
686
|
+
void
|
687
|
+
], "nonpayable">;
|
688
|
+
treasury: TypedContractMethod<[], [string], "view">;
|
689
|
+
updateRewardConfigs: TypedContractMethod<[
|
690
|
+
_configs: TradingVault.RewardConfigStruct[]
|
691
|
+
], [
|
692
|
+
void
|
693
|
+
], "nonpayable">;
|
694
|
+
getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T;
|
695
|
+
getFunction(nameOrSignature: "BASE_WEIGHT"): TypedContractMethod<[], [bigint], "view">;
|
696
|
+
getFunction(nameOrSignature: "DEFAULT_ADMIN_ROLE"): TypedContractMethod<[], [string], "view">;
|
697
|
+
getFunction(nameOrSignature: "EXPO"): TypedContractMethod<[], [bigint], "view">;
|
698
|
+
getFunction(nameOrSignature: "EXPO_100"): TypedContractMethod<[], [bigint], "view">;
|
699
|
+
getFunction(nameOrSignature: "OPERATOR_ROLE"): TypedContractMethod<[], [string], "view">;
|
700
|
+
getFunction(nameOrSignature: "approve"): TypedContractMethod<[
|
701
|
+
to: AddressLike,
|
702
|
+
tokenId: BigNumberish
|
703
|
+
], [
|
704
|
+
void
|
705
|
+
], "nonpayable">;
|
706
|
+
getFunction(nameOrSignature: "balanceOf"): TypedContractMethod<[owner: AddressLike], [bigint], "view">;
|
707
|
+
getFunction(nameOrSignature: "borrowCurrency"): TypedContractMethod<[_amount: BigNumberish], [void], "nonpayable">;
|
708
|
+
getFunction(nameOrSignature: "claimERC20"): TypedContractMethod<[
|
709
|
+
_token: AddressLike,
|
710
|
+
_amount: BigNumberish
|
711
|
+
], [
|
712
|
+
void
|
713
|
+
], "nonpayable">;
|
714
|
+
getFunction(nameOrSignature: "createPosition"): TypedContractMethod<[_amount: BigNumberish], [bigint], "nonpayable">;
|
715
|
+
getFunction(nameOrSignature: "createPositionForUser"): TypedContractMethod<[
|
716
|
+
_user: AddressLike,
|
717
|
+
_amount: BigNumberish
|
718
|
+
], [
|
719
|
+
bigint
|
720
|
+
], "nonpayable">;
|
721
|
+
getFunction(nameOrSignature: "currency"): TypedContractMethod<[], [string], "view">;
|
722
|
+
getFunction(nameOrSignature: "getApproved"): TypedContractMethod<[tokenId: BigNumberish], [string], "view">;
|
723
|
+
getFunction(nameOrSignature: "getRewardConfigsLength"): TypedContractMethod<[], [bigint], "view">;
|
724
|
+
getFunction(nameOrSignature: "getRoleAdmin"): TypedContractMethod<[role: BytesLike], [string], "view">;
|
725
|
+
getFunction(nameOrSignature: "grantOperatorRole"): TypedContractMethod<[operator: AddressLike], [void], "nonpayable">;
|
726
|
+
getFunction(nameOrSignature: "grantRole"): TypedContractMethod<[
|
727
|
+
role: BytesLike,
|
728
|
+
account: AddressLike
|
729
|
+
], [
|
730
|
+
void
|
731
|
+
], "nonpayable">;
|
732
|
+
getFunction(nameOrSignature: "hasRole"): TypedContractMethod<[
|
733
|
+
role: BytesLike,
|
734
|
+
account: AddressLike
|
735
|
+
], [
|
736
|
+
boolean
|
737
|
+
], "view">;
|
738
|
+
getFunction(nameOrSignature: "initialize"): TypedContractMethod<[
|
739
|
+
_currency: AddressLike,
|
740
|
+
_rewardToken: AddressLike
|
741
|
+
], [
|
742
|
+
void
|
743
|
+
], "nonpayable">;
|
744
|
+
getFunction(nameOrSignature: "isApprovedForAll"): TypedContractMethod<[
|
745
|
+
owner: AddressLike,
|
746
|
+
operator: AddressLike
|
747
|
+
], [
|
748
|
+
boolean
|
749
|
+
], "view">;
|
750
|
+
getFunction(nameOrSignature: "isReduceEnabled"): TypedContractMethod<[], [boolean], "view">;
|
751
|
+
getFunction(nameOrSignature: "name"): TypedContractMethod<[], [string], "view">;
|
752
|
+
getFunction(nameOrSignature: "owner"): TypedContractMethod<[], [string], "view">;
|
753
|
+
getFunction(nameOrSignature: "ownerOf"): TypedContractMethod<[tokenId: BigNumberish], [string], "view">;
|
754
|
+
getFunction(nameOrSignature: "positions"): TypedContractMethod<[
|
755
|
+
arg0: BigNumberish
|
756
|
+
], [
|
757
|
+
[
|
758
|
+
bigint,
|
759
|
+
bigint,
|
760
|
+
bigint,
|
761
|
+
bigint,
|
762
|
+
bigint,
|
763
|
+
bigint,
|
764
|
+
bigint,
|
765
|
+
bigint
|
766
|
+
] & {
|
767
|
+
entryPrice: bigint;
|
768
|
+
outPrice: bigint;
|
769
|
+
remainingAmount: bigint;
|
770
|
+
initAmount: bigint;
|
771
|
+
openedAt: bigint;
|
772
|
+
closedAt: bigint;
|
773
|
+
rewardedAmount: bigint;
|
774
|
+
lossAmount: bigint;
|
775
|
+
}
|
776
|
+
], "view">;
|
777
|
+
getFunction(nameOrSignature: "price"): TypedContractMethod<[], [bigint], "view">;
|
778
|
+
getFunction(nameOrSignature: "reducePosition"): TypedContractMethod<[
|
779
|
+
_tokenId: BigNumberish,
|
780
|
+
_amount: BigNumberish
|
781
|
+
], [
|
782
|
+
void
|
783
|
+
], "nonpayable">;
|
784
|
+
getFunction(nameOrSignature: "reducePositions"): TypedContractMethod<[
|
785
|
+
_tokenIds: BigNumberish[],
|
786
|
+
_amounts: BigNumberish[]
|
787
|
+
], [
|
788
|
+
void
|
789
|
+
], "nonpayable">;
|
790
|
+
getFunction(nameOrSignature: "renounceOwnership"): TypedContractMethod<[], [void], "nonpayable">;
|
791
|
+
getFunction(nameOrSignature: "renounceRole"): TypedContractMethod<[
|
792
|
+
role: BytesLike,
|
793
|
+
callerConfirmation: AddressLike
|
794
|
+
], [
|
795
|
+
void
|
796
|
+
], "nonpayable">;
|
797
|
+
getFunction(nameOrSignature: "repayCurrency"): TypedContractMethod<[_amount: BigNumberish], [void], "nonpayable">;
|
798
|
+
getFunction(nameOrSignature: "revokeRole"): TypedContractMethod<[
|
799
|
+
role: BytesLike,
|
800
|
+
account: AddressLike
|
801
|
+
], [
|
802
|
+
void
|
803
|
+
], "nonpayable">;
|
804
|
+
getFunction(nameOrSignature: "rewardConfigs"): TypedContractMethod<[
|
805
|
+
arg0: BigNumberish
|
806
|
+
], [
|
807
|
+
[bigint, bigint] & {
|
808
|
+
weight: bigint;
|
809
|
+
duration: bigint;
|
810
|
+
}
|
811
|
+
], "view">;
|
812
|
+
getFunction(nameOrSignature: "rewardToken"): TypedContractMethod<[], [string], "view">;
|
813
|
+
getFunction(nameOrSignature: "safeTransferFrom(address,address,uint256)"): TypedContractMethod<[
|
814
|
+
from: AddressLike,
|
815
|
+
to: AddressLike,
|
816
|
+
tokenId: BigNumberish
|
817
|
+
], [
|
818
|
+
void
|
819
|
+
], "nonpayable">;
|
820
|
+
getFunction(nameOrSignature: "safeTransferFrom(address,address,uint256,bytes)"): TypedContractMethod<[
|
821
|
+
from: AddressLike,
|
822
|
+
to: AddressLike,
|
823
|
+
tokenId: BigNumberish,
|
824
|
+
data: BytesLike
|
825
|
+
], [
|
826
|
+
void
|
827
|
+
], "nonpayable">;
|
828
|
+
getFunction(nameOrSignature: "setApprovalForAll"): TypedContractMethod<[
|
829
|
+
operator: AddressLike,
|
830
|
+
approved: boolean
|
831
|
+
], [
|
832
|
+
void
|
833
|
+
], "nonpayable">;
|
834
|
+
getFunction(nameOrSignature: "setCurrency"): TypedContractMethod<[_currency: AddressLike], [void], "nonpayable">;
|
835
|
+
getFunction(nameOrSignature: "setPrice"): TypedContractMethod<[
|
836
|
+
_newPrice: BigNumberish,
|
837
|
+
_rewardAmount: BigNumberish
|
838
|
+
], [
|
839
|
+
void
|
840
|
+
], "nonpayable">;
|
841
|
+
getFunction(nameOrSignature: "setReduceEnabled"): TypedContractMethod<[_enabled: boolean], [void], "nonpayable">;
|
842
|
+
getFunction(nameOrSignature: "setRewardToken"): TypedContractMethod<[_rewardToken: AddressLike], [void], "nonpayable">;
|
843
|
+
getFunction(nameOrSignature: "setTreasury"): TypedContractMethod<[_treasury: AddressLike], [void], "nonpayable">;
|
844
|
+
getFunction(nameOrSignature: "supportsInterface"): TypedContractMethod<[interfaceId: BytesLike], [boolean], "view">;
|
845
|
+
getFunction(nameOrSignature: "symbol"): TypedContractMethod<[], [string], "view">;
|
846
|
+
getFunction(nameOrSignature: "tokenURI"): TypedContractMethod<[tokenId: BigNumberish], [string], "view">;
|
847
|
+
getFunction(nameOrSignature: "totalAmount"): TypedContractMethod<[], [bigint], "view">;
|
848
|
+
getFunction(nameOrSignature: "totalBorrowed"): TypedContractMethod<[], [bigint], "view">;
|
849
|
+
getFunction(nameOrSignature: "totalRewardsAdded"): TypedContractMethod<[], [bigint], "view">;
|
850
|
+
getFunction(nameOrSignature: "totalRewardsHarvested"): TypedContractMethod<[], [bigint], "view">;
|
851
|
+
getFunction(nameOrSignature: "transferFrom"): TypedContractMethod<[
|
852
|
+
from: AddressLike,
|
853
|
+
to: AddressLike,
|
854
|
+
tokenId: BigNumberish
|
855
|
+
], [
|
856
|
+
void
|
857
|
+
], "nonpayable">;
|
858
|
+
getFunction(nameOrSignature: "transferOwnership"): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">;
|
859
|
+
getFunction(nameOrSignature: "treasury"): TypedContractMethod<[], [string], "view">;
|
860
|
+
getFunction(nameOrSignature: "updateRewardConfigs"): TypedContractMethod<[
|
861
|
+
_configs: TradingVault.RewardConfigStruct[]
|
862
|
+
], [
|
863
|
+
void
|
864
|
+
], "nonpayable">;
|
865
|
+
getEvent(key: "Approval"): TypedContractEvent<ApprovalEvent.InputTuple, ApprovalEvent.OutputTuple, ApprovalEvent.OutputObject>;
|
866
|
+
getEvent(key: "ApprovalForAll"): TypedContractEvent<ApprovalForAllEvent.InputTuple, ApprovalForAllEvent.OutputTuple, ApprovalForAllEvent.OutputObject>;
|
867
|
+
getEvent(key: "CurrencyBorrowed"): TypedContractEvent<CurrencyBorrowedEvent.InputTuple, CurrencyBorrowedEvent.OutputTuple, CurrencyBorrowedEvent.OutputObject>;
|
868
|
+
getEvent(key: "CurrencyRepaid"): TypedContractEvent<CurrencyRepaidEvent.InputTuple, CurrencyRepaidEvent.OutputTuple, CurrencyRepaidEvent.OutputObject>;
|
869
|
+
getEvent(key: "CurrencyUpdated"): TypedContractEvent<CurrencyUpdatedEvent.InputTuple, CurrencyUpdatedEvent.OutputTuple, CurrencyUpdatedEvent.OutputObject>;
|
870
|
+
getEvent(key: "Initialized"): TypedContractEvent<InitializedEvent.InputTuple, InitializedEvent.OutputTuple, InitializedEvent.OutputObject>;
|
871
|
+
getEvent(key: "OwnershipTransferred"): TypedContractEvent<OwnershipTransferredEvent.InputTuple, OwnershipTransferredEvent.OutputTuple, OwnershipTransferredEvent.OutputObject>;
|
872
|
+
getEvent(key: "PositionCreated"): TypedContractEvent<PositionCreatedEvent.InputTuple, PositionCreatedEvent.OutputTuple, PositionCreatedEvent.OutputObject>;
|
873
|
+
getEvent(key: "PositionReduced"): TypedContractEvent<PositionReducedEvent.InputTuple, PositionReducedEvent.OutputTuple, PositionReducedEvent.OutputObject>;
|
874
|
+
getEvent(key: "PriceUpdated"): TypedContractEvent<PriceUpdatedEvent.InputTuple, PriceUpdatedEvent.OutputTuple, PriceUpdatedEvent.OutputObject>;
|
875
|
+
getEvent(key: "ReduceEnabledUpdated"): TypedContractEvent<ReduceEnabledUpdatedEvent.InputTuple, ReduceEnabledUpdatedEvent.OutputTuple, ReduceEnabledUpdatedEvent.OutputObject>;
|
876
|
+
getEvent(key: "RewardConfigsUpdated"): TypedContractEvent<RewardConfigsUpdatedEvent.InputTuple, RewardConfigsUpdatedEvent.OutputTuple, RewardConfigsUpdatedEvent.OutputObject>;
|
877
|
+
getEvent(key: "RewardTokenUpdated"): TypedContractEvent<RewardTokenUpdatedEvent.InputTuple, RewardTokenUpdatedEvent.OutputTuple, RewardTokenUpdatedEvent.OutputObject>;
|
878
|
+
getEvent(key: "RoleAdminChanged"): TypedContractEvent<RoleAdminChangedEvent.InputTuple, RoleAdminChangedEvent.OutputTuple, RoleAdminChangedEvent.OutputObject>;
|
879
|
+
getEvent(key: "RoleGranted"): TypedContractEvent<RoleGrantedEvent.InputTuple, RoleGrantedEvent.OutputTuple, RoleGrantedEvent.OutputObject>;
|
880
|
+
getEvent(key: "RoleRevoked"): TypedContractEvent<RoleRevokedEvent.InputTuple, RoleRevokedEvent.OutputTuple, RoleRevokedEvent.OutputObject>;
|
881
|
+
getEvent(key: "TotalAmountUpdated"): TypedContractEvent<TotalAmountUpdatedEvent.InputTuple, TotalAmountUpdatedEvent.OutputTuple, TotalAmountUpdatedEvent.OutputObject>;
|
882
|
+
getEvent(key: "TotalRewardsHarvestedUpdated"): TypedContractEvent<TotalRewardsHarvestedUpdatedEvent.InputTuple, TotalRewardsHarvestedUpdatedEvent.OutputTuple, TotalRewardsHarvestedUpdatedEvent.OutputObject>;
|
883
|
+
getEvent(key: "TotalRewardsUpdated"): TypedContractEvent<TotalRewardsUpdatedEvent.InputTuple, TotalRewardsUpdatedEvent.OutputTuple, TotalRewardsUpdatedEvent.OutputObject>;
|
884
|
+
getEvent(key: "Transfer"): TypedContractEvent<TransferEvent.InputTuple, TransferEvent.OutputTuple, TransferEvent.OutputObject>;
|
885
|
+
getEvent(key: "TreasuryUpdated"): TypedContractEvent<TreasuryUpdatedEvent.InputTuple, TreasuryUpdatedEvent.OutputTuple, TreasuryUpdatedEvent.OutputObject>;
|
886
|
+
filters: {
|
887
|
+
"Approval(address,address,uint256)": TypedContractEvent<ApprovalEvent.InputTuple, ApprovalEvent.OutputTuple, ApprovalEvent.OutputObject>;
|
888
|
+
Approval: TypedContractEvent<ApprovalEvent.InputTuple, ApprovalEvent.OutputTuple, ApprovalEvent.OutputObject>;
|
889
|
+
"ApprovalForAll(address,address,bool)": TypedContractEvent<ApprovalForAllEvent.InputTuple, ApprovalForAllEvent.OutputTuple, ApprovalForAllEvent.OutputObject>;
|
890
|
+
ApprovalForAll: TypedContractEvent<ApprovalForAllEvent.InputTuple, ApprovalForAllEvent.OutputTuple, ApprovalForAllEvent.OutputObject>;
|
891
|
+
"CurrencyBorrowed(address,uint256)": TypedContractEvent<CurrencyBorrowedEvent.InputTuple, CurrencyBorrowedEvent.OutputTuple, CurrencyBorrowedEvent.OutputObject>;
|
892
|
+
CurrencyBorrowed: TypedContractEvent<CurrencyBorrowedEvent.InputTuple, CurrencyBorrowedEvent.OutputTuple, CurrencyBorrowedEvent.OutputObject>;
|
893
|
+
"CurrencyRepaid(address,uint256)": TypedContractEvent<CurrencyRepaidEvent.InputTuple, CurrencyRepaidEvent.OutputTuple, CurrencyRepaidEvent.OutputObject>;
|
894
|
+
CurrencyRepaid: TypedContractEvent<CurrencyRepaidEvent.InputTuple, CurrencyRepaidEvent.OutputTuple, CurrencyRepaidEvent.OutputObject>;
|
895
|
+
"CurrencyUpdated(address,address)": TypedContractEvent<CurrencyUpdatedEvent.InputTuple, CurrencyUpdatedEvent.OutputTuple, CurrencyUpdatedEvent.OutputObject>;
|
896
|
+
CurrencyUpdated: TypedContractEvent<CurrencyUpdatedEvent.InputTuple, CurrencyUpdatedEvent.OutputTuple, CurrencyUpdatedEvent.OutputObject>;
|
897
|
+
"Initialized(uint64)": TypedContractEvent<InitializedEvent.InputTuple, InitializedEvent.OutputTuple, InitializedEvent.OutputObject>;
|
898
|
+
Initialized: TypedContractEvent<InitializedEvent.InputTuple, InitializedEvent.OutputTuple, InitializedEvent.OutputObject>;
|
899
|
+
"OwnershipTransferred(address,address)": TypedContractEvent<OwnershipTransferredEvent.InputTuple, OwnershipTransferredEvent.OutputTuple, OwnershipTransferredEvent.OutputObject>;
|
900
|
+
OwnershipTransferred: TypedContractEvent<OwnershipTransferredEvent.InputTuple, OwnershipTransferredEvent.OutputTuple, OwnershipTransferredEvent.OutputObject>;
|
901
|
+
"PositionCreated(address,uint256,uint256,uint256,uint256)": TypedContractEvent<PositionCreatedEvent.InputTuple, PositionCreatedEvent.OutputTuple, PositionCreatedEvent.OutputObject>;
|
902
|
+
PositionCreated: TypedContractEvent<PositionCreatedEvent.InputTuple, PositionCreatedEvent.OutputTuple, PositionCreatedEvent.OutputObject>;
|
903
|
+
"PositionReduced(address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256)": TypedContractEvent<PositionReducedEvent.InputTuple, PositionReducedEvent.OutputTuple, PositionReducedEvent.OutputObject>;
|
904
|
+
PositionReduced: TypedContractEvent<PositionReducedEvent.InputTuple, PositionReducedEvent.OutputTuple, PositionReducedEvent.OutputObject>;
|
905
|
+
"PriceUpdated(uint256,uint256,uint256)": TypedContractEvent<PriceUpdatedEvent.InputTuple, PriceUpdatedEvent.OutputTuple, PriceUpdatedEvent.OutputObject>;
|
906
|
+
PriceUpdated: TypedContractEvent<PriceUpdatedEvent.InputTuple, PriceUpdatedEvent.OutputTuple, PriceUpdatedEvent.OutputObject>;
|
907
|
+
"ReduceEnabledUpdated(bool)": TypedContractEvent<ReduceEnabledUpdatedEvent.InputTuple, ReduceEnabledUpdatedEvent.OutputTuple, ReduceEnabledUpdatedEvent.OutputObject>;
|
908
|
+
ReduceEnabledUpdated: TypedContractEvent<ReduceEnabledUpdatedEvent.InputTuple, ReduceEnabledUpdatedEvent.OutputTuple, ReduceEnabledUpdatedEvent.OutputObject>;
|
909
|
+
"RewardConfigsUpdated()": TypedContractEvent<RewardConfigsUpdatedEvent.InputTuple, RewardConfigsUpdatedEvent.OutputTuple, RewardConfigsUpdatedEvent.OutputObject>;
|
910
|
+
RewardConfigsUpdated: TypedContractEvent<RewardConfigsUpdatedEvent.InputTuple, RewardConfigsUpdatedEvent.OutputTuple, RewardConfigsUpdatedEvent.OutputObject>;
|
911
|
+
"RewardTokenUpdated(address,address)": TypedContractEvent<RewardTokenUpdatedEvent.InputTuple, RewardTokenUpdatedEvent.OutputTuple, RewardTokenUpdatedEvent.OutputObject>;
|
912
|
+
RewardTokenUpdated: TypedContractEvent<RewardTokenUpdatedEvent.InputTuple, RewardTokenUpdatedEvent.OutputTuple, RewardTokenUpdatedEvent.OutputObject>;
|
913
|
+
"RoleAdminChanged(bytes32,bytes32,bytes32)": TypedContractEvent<RoleAdminChangedEvent.InputTuple, RoleAdminChangedEvent.OutputTuple, RoleAdminChangedEvent.OutputObject>;
|
914
|
+
RoleAdminChanged: TypedContractEvent<RoleAdminChangedEvent.InputTuple, RoleAdminChangedEvent.OutputTuple, RoleAdminChangedEvent.OutputObject>;
|
915
|
+
"RoleGranted(bytes32,address,address)": TypedContractEvent<RoleGrantedEvent.InputTuple, RoleGrantedEvent.OutputTuple, RoleGrantedEvent.OutputObject>;
|
916
|
+
RoleGranted: TypedContractEvent<RoleGrantedEvent.InputTuple, RoleGrantedEvent.OutputTuple, RoleGrantedEvent.OutputObject>;
|
917
|
+
"RoleRevoked(bytes32,address,address)": TypedContractEvent<RoleRevokedEvent.InputTuple, RoleRevokedEvent.OutputTuple, RoleRevokedEvent.OutputObject>;
|
918
|
+
RoleRevoked: TypedContractEvent<RoleRevokedEvent.InputTuple, RoleRevokedEvent.OutputTuple, RoleRevokedEvent.OutputObject>;
|
919
|
+
"TotalAmountUpdated(uint256)": TypedContractEvent<TotalAmountUpdatedEvent.InputTuple, TotalAmountUpdatedEvent.OutputTuple, TotalAmountUpdatedEvent.OutputObject>;
|
920
|
+
TotalAmountUpdated: TypedContractEvent<TotalAmountUpdatedEvent.InputTuple, TotalAmountUpdatedEvent.OutputTuple, TotalAmountUpdatedEvent.OutputObject>;
|
921
|
+
"TotalRewardsHarvestedUpdated(uint256,uint256)": TypedContractEvent<TotalRewardsHarvestedUpdatedEvent.InputTuple, TotalRewardsHarvestedUpdatedEvent.OutputTuple, TotalRewardsHarvestedUpdatedEvent.OutputObject>;
|
922
|
+
TotalRewardsHarvestedUpdated: TypedContractEvent<TotalRewardsHarvestedUpdatedEvent.InputTuple, TotalRewardsHarvestedUpdatedEvent.OutputTuple, TotalRewardsHarvestedUpdatedEvent.OutputObject>;
|
923
|
+
"TotalRewardsUpdated(uint256,uint256)": TypedContractEvent<TotalRewardsUpdatedEvent.InputTuple, TotalRewardsUpdatedEvent.OutputTuple, TotalRewardsUpdatedEvent.OutputObject>;
|
924
|
+
TotalRewardsUpdated: TypedContractEvent<TotalRewardsUpdatedEvent.InputTuple, TotalRewardsUpdatedEvent.OutputTuple, TotalRewardsUpdatedEvent.OutputObject>;
|
925
|
+
"Transfer(address,address,uint256)": TypedContractEvent<TransferEvent.InputTuple, TransferEvent.OutputTuple, TransferEvent.OutputObject>;
|
926
|
+
Transfer: TypedContractEvent<TransferEvent.InputTuple, TransferEvent.OutputTuple, TransferEvent.OutputObject>;
|
927
|
+
"TreasuryUpdated(address,address)": TypedContractEvent<TreasuryUpdatedEvent.InputTuple, TreasuryUpdatedEvent.OutputTuple, TreasuryUpdatedEvent.OutputObject>;
|
928
|
+
TreasuryUpdated: TypedContractEvent<TreasuryUpdatedEvent.InputTuple, TreasuryUpdatedEvent.OutputTuple, TreasuryUpdatedEvent.OutputObject>;
|
929
|
+
};
|
930
|
+
}
|