@optimex-xyz/market-maker-sdk 0.9.0-dev-3e9bb0c → 0.9.0-staging-bbae22c
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/index.d.mts +3 -622
- package/dist/index.d.ts +3 -622
- package/dist/index.js +47 -492
- package/dist/index.mjs +26 -468
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -6,7 +6,6 @@ interface EnvironmentConfig {
|
|
|
6
6
|
backendUrl: string;
|
|
7
7
|
rpcUrl: string;
|
|
8
8
|
paymentAddressMap: Record<string, string>;
|
|
9
|
-
liquidationAddressMap: Record<string, string>;
|
|
10
9
|
protocolFetcherProxyAddress: string;
|
|
11
10
|
}
|
|
12
11
|
interface AppConfig extends EnvironmentConfig {
|
|
@@ -37,8 +36,7 @@ declare class Config {
|
|
|
37
36
|
get(): AppConfig;
|
|
38
37
|
getBackendUrl(): string;
|
|
39
38
|
getRpcUrl(): string;
|
|
40
|
-
getPaymentAddress(networkId: string): string;
|
|
41
|
-
getLiquidationAddress(networkId: string): string;
|
|
39
|
+
getPaymentAddress(networkId: string): string | undefined;
|
|
42
40
|
getProtocolFetcherAddress(): string;
|
|
43
41
|
}
|
|
44
42
|
declare const config: Config;
|
|
@@ -988,266 +986,6 @@ interface ERC20 extends BaseContract {
|
|
|
988
986
|
};
|
|
989
987
|
}
|
|
990
988
|
|
|
991
|
-
interface LendingLiquidationInterface extends Interface {
|
|
992
|
-
getFunction(nameOrSignature: "LENDING_MANAGEMENT" | "MORPHO" | "VALIDATOR_FORCE_CLOSE_TYPEHASH" | "eip712Domain" | "onMorphoLiquidate" | "optimexDomain" | "owBtc" | "payment"): FunctionFragment;
|
|
993
|
-
getEvent(nameOrSignatureOrTopic: "EIP712DomainChanged" | "ForceClose" | "Liquidate" | "Payment"): EventFragment;
|
|
994
|
-
encodeFunctionData(functionFragment: "LENDING_MANAGEMENT", values?: undefined): string;
|
|
995
|
-
encodeFunctionData(functionFragment: "MORPHO", values?: undefined): string;
|
|
996
|
-
encodeFunctionData(functionFragment: "VALIDATOR_FORCE_CLOSE_TYPEHASH", values?: undefined): string;
|
|
997
|
-
encodeFunctionData(functionFragment: "eip712Domain", values?: undefined): string;
|
|
998
|
-
encodeFunctionData(functionFragment: "onMorphoLiquidate", values: [BigNumberish, BytesLike]): string;
|
|
999
|
-
encodeFunctionData(functionFragment: "optimexDomain", values?: undefined): string;
|
|
1000
|
-
encodeFunctionData(functionFragment: "owBtc", values?: undefined): string;
|
|
1001
|
-
encodeFunctionData(functionFragment: "payment", values: [
|
|
1002
|
-
BytesLike,
|
|
1003
|
-
AddressLike,
|
|
1004
|
-
BigNumberish,
|
|
1005
|
-
BytesLike,
|
|
1006
|
-
boolean,
|
|
1007
|
-
BytesLike
|
|
1008
|
-
]): string;
|
|
1009
|
-
decodeFunctionResult(functionFragment: "LENDING_MANAGEMENT", data: BytesLike): Result;
|
|
1010
|
-
decodeFunctionResult(functionFragment: "MORPHO", data: BytesLike): Result;
|
|
1011
|
-
decodeFunctionResult(functionFragment: "VALIDATOR_FORCE_CLOSE_TYPEHASH", data: BytesLike): Result;
|
|
1012
|
-
decodeFunctionResult(functionFragment: "eip712Domain", data: BytesLike): Result;
|
|
1013
|
-
decodeFunctionResult(functionFragment: "onMorphoLiquidate", data: BytesLike): Result;
|
|
1014
|
-
decodeFunctionResult(functionFragment: "optimexDomain", data: BytesLike): Result;
|
|
1015
|
-
decodeFunctionResult(functionFragment: "owBtc", data: BytesLike): Result;
|
|
1016
|
-
decodeFunctionResult(functionFragment: "payment", data: BytesLike): Result;
|
|
1017
|
-
}
|
|
1018
|
-
declare namespace EIP712DomainChangedEvent$1 {
|
|
1019
|
-
type InputTuple = [];
|
|
1020
|
-
type OutputTuple = [];
|
|
1021
|
-
interface OutputObject {
|
|
1022
|
-
}
|
|
1023
|
-
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
1024
|
-
type Filter = TypedDeferredTopicFilter<Event>;
|
|
1025
|
-
type Log = TypedEventLog<Event>;
|
|
1026
|
-
type LogDescription = TypedLogDescription<Event>;
|
|
1027
|
-
}
|
|
1028
|
-
declare namespace ForceCloseEvent {
|
|
1029
|
-
type InputTuple = [
|
|
1030
|
-
positionManager: AddressLike,
|
|
1031
|
-
positionId: BytesLike,
|
|
1032
|
-
tradeId: BytesLike,
|
|
1033
|
-
marketId: BytesLike,
|
|
1034
|
-
repaidLoan: BigNumberish,
|
|
1035
|
-
userRefund: BigNumberish
|
|
1036
|
-
];
|
|
1037
|
-
type OutputTuple = [
|
|
1038
|
-
positionManager: string,
|
|
1039
|
-
positionId: string,
|
|
1040
|
-
tradeId: string,
|
|
1041
|
-
marketId: string,
|
|
1042
|
-
repaidLoan: bigint,
|
|
1043
|
-
userRefund: bigint
|
|
1044
|
-
];
|
|
1045
|
-
interface OutputObject {
|
|
1046
|
-
positionManager: string;
|
|
1047
|
-
positionId: string;
|
|
1048
|
-
tradeId: string;
|
|
1049
|
-
marketId: string;
|
|
1050
|
-
repaidLoan: bigint;
|
|
1051
|
-
userRefund: bigint;
|
|
1052
|
-
}
|
|
1053
|
-
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
1054
|
-
type Filter = TypedDeferredTopicFilter<Event>;
|
|
1055
|
-
type Log = TypedEventLog<Event>;
|
|
1056
|
-
type LogDescription = TypedLogDescription<Event>;
|
|
1057
|
-
}
|
|
1058
|
-
declare namespace LiquidateEvent {
|
|
1059
|
-
type InputTuple = [
|
|
1060
|
-
positionManager: AddressLike,
|
|
1061
|
-
positionId: BytesLike,
|
|
1062
|
-
tradeId: BytesLike,
|
|
1063
|
-
marketId: BytesLike,
|
|
1064
|
-
seizedCollateral: BigNumberish,
|
|
1065
|
-
remainingCollateral: BigNumberish,
|
|
1066
|
-
repaidLoan: BigNumberish,
|
|
1067
|
-
bonusLoan: BigNumberish
|
|
1068
|
-
];
|
|
1069
|
-
type OutputTuple = [
|
|
1070
|
-
positionManager: string,
|
|
1071
|
-
positionId: string,
|
|
1072
|
-
tradeId: string,
|
|
1073
|
-
marketId: string,
|
|
1074
|
-
seizedCollateral: bigint,
|
|
1075
|
-
remainingCollateral: bigint,
|
|
1076
|
-
repaidLoan: bigint,
|
|
1077
|
-
bonusLoan: bigint
|
|
1078
|
-
];
|
|
1079
|
-
interface OutputObject {
|
|
1080
|
-
positionManager: string;
|
|
1081
|
-
positionId: string;
|
|
1082
|
-
tradeId: string;
|
|
1083
|
-
marketId: string;
|
|
1084
|
-
seizedCollateral: bigint;
|
|
1085
|
-
remainingCollateral: bigint;
|
|
1086
|
-
repaidLoan: bigint;
|
|
1087
|
-
bonusLoan: bigint;
|
|
1088
|
-
}
|
|
1089
|
-
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
1090
|
-
type Filter = TypedDeferredTopicFilter<Event>;
|
|
1091
|
-
type Log = TypedEventLog<Event>;
|
|
1092
|
-
type LogDescription = TypedLogDescription<Event>;
|
|
1093
|
-
}
|
|
1094
|
-
declare namespace PaymentEvent {
|
|
1095
|
-
type InputTuple = [
|
|
1096
|
-
positionManager: AddressLike,
|
|
1097
|
-
positionId: BytesLike,
|
|
1098
|
-
tradeId: BytesLike,
|
|
1099
|
-
sender: AddressLike,
|
|
1100
|
-
marketId: BytesLike,
|
|
1101
|
-
amount: BigNumberish,
|
|
1102
|
-
collateral: BigNumberish
|
|
1103
|
-
];
|
|
1104
|
-
type OutputTuple = [
|
|
1105
|
-
positionManager: string,
|
|
1106
|
-
positionId: string,
|
|
1107
|
-
tradeId: string,
|
|
1108
|
-
sender: string,
|
|
1109
|
-
marketId: string,
|
|
1110
|
-
amount: bigint,
|
|
1111
|
-
collateral: bigint
|
|
1112
|
-
];
|
|
1113
|
-
interface OutputObject {
|
|
1114
|
-
positionManager: string;
|
|
1115
|
-
positionId: string;
|
|
1116
|
-
tradeId: string;
|
|
1117
|
-
sender: string;
|
|
1118
|
-
marketId: string;
|
|
1119
|
-
amount: bigint;
|
|
1120
|
-
collateral: bigint;
|
|
1121
|
-
}
|
|
1122
|
-
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
1123
|
-
type Filter = TypedDeferredTopicFilter<Event>;
|
|
1124
|
-
type Log = TypedEventLog<Event>;
|
|
1125
|
-
type LogDescription = TypedLogDescription<Event>;
|
|
1126
|
-
}
|
|
1127
|
-
interface LendingLiquidation extends BaseContract {
|
|
1128
|
-
connect(runner?: ContractRunner | null): LendingLiquidation;
|
|
1129
|
-
waitForDeployment(): Promise<this>;
|
|
1130
|
-
interface: LendingLiquidationInterface;
|
|
1131
|
-
queryFilter<TCEvent extends TypedContractEvent>(event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>;
|
|
1132
|
-
queryFilter<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>;
|
|
1133
|
-
on<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
|
|
1134
|
-
on<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>;
|
|
1135
|
-
once<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
|
|
1136
|
-
once<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>;
|
|
1137
|
-
listeners<TCEvent extends TypedContractEvent>(event: TCEvent): Promise<Array<TypedListener<TCEvent>>>;
|
|
1138
|
-
listeners(eventName?: string): Promise<Array<Listener>>;
|
|
1139
|
-
removeAllListeners<TCEvent extends TypedContractEvent>(event?: TCEvent): Promise<this>;
|
|
1140
|
-
LENDING_MANAGEMENT: TypedContractMethod<[], [string], "view">;
|
|
1141
|
-
MORPHO: TypedContractMethod<[], [string], "view">;
|
|
1142
|
-
VALIDATOR_FORCE_CLOSE_TYPEHASH: TypedContractMethod<[], [string], "view">;
|
|
1143
|
-
eip712Domain: TypedContractMethod<[
|
|
1144
|
-
], [
|
|
1145
|
-
[
|
|
1146
|
-
string,
|
|
1147
|
-
string,
|
|
1148
|
-
string,
|
|
1149
|
-
bigint,
|
|
1150
|
-
string,
|
|
1151
|
-
string,
|
|
1152
|
-
bigint[]
|
|
1153
|
-
] & {
|
|
1154
|
-
fields: string;
|
|
1155
|
-
name: string;
|
|
1156
|
-
version: string;
|
|
1157
|
-
chainId: bigint;
|
|
1158
|
-
verifyingContract: string;
|
|
1159
|
-
salt: string;
|
|
1160
|
-
extensions: bigint[];
|
|
1161
|
-
}
|
|
1162
|
-
], "view">;
|
|
1163
|
-
onMorphoLiquidate: TypedContractMethod<[
|
|
1164
|
-
repaidAssets: BigNumberish,
|
|
1165
|
-
data: BytesLike
|
|
1166
|
-
], [
|
|
1167
|
-
void
|
|
1168
|
-
], "nonpayable">;
|
|
1169
|
-
optimexDomain: TypedContractMethod<[
|
|
1170
|
-
], [
|
|
1171
|
-
[string, string] & {
|
|
1172
|
-
name: string;
|
|
1173
|
-
version: string;
|
|
1174
|
-
}
|
|
1175
|
-
], "view">;
|
|
1176
|
-
owBtc: TypedContractMethod<[], [string], "view">;
|
|
1177
|
-
payment: TypedContractMethod<[
|
|
1178
|
-
tradeId: BytesLike,
|
|
1179
|
-
positionManager: AddressLike,
|
|
1180
|
-
amount: BigNumberish,
|
|
1181
|
-
positionId: BytesLike,
|
|
1182
|
-
isLiquidate: boolean,
|
|
1183
|
-
validatorSignature: BytesLike
|
|
1184
|
-
], [
|
|
1185
|
-
void
|
|
1186
|
-
], "nonpayable">;
|
|
1187
|
-
getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T;
|
|
1188
|
-
getFunction(nameOrSignature: "LENDING_MANAGEMENT"): TypedContractMethod<[], [string], "view">;
|
|
1189
|
-
getFunction(nameOrSignature: "MORPHO"): TypedContractMethod<[], [string], "view">;
|
|
1190
|
-
getFunction(nameOrSignature: "VALIDATOR_FORCE_CLOSE_TYPEHASH"): TypedContractMethod<[], [string], "view">;
|
|
1191
|
-
getFunction(nameOrSignature: "eip712Domain"): TypedContractMethod<[
|
|
1192
|
-
], [
|
|
1193
|
-
[
|
|
1194
|
-
string,
|
|
1195
|
-
string,
|
|
1196
|
-
string,
|
|
1197
|
-
bigint,
|
|
1198
|
-
string,
|
|
1199
|
-
string,
|
|
1200
|
-
bigint[]
|
|
1201
|
-
] & {
|
|
1202
|
-
fields: string;
|
|
1203
|
-
name: string;
|
|
1204
|
-
version: string;
|
|
1205
|
-
chainId: bigint;
|
|
1206
|
-
verifyingContract: string;
|
|
1207
|
-
salt: string;
|
|
1208
|
-
extensions: bigint[];
|
|
1209
|
-
}
|
|
1210
|
-
], "view">;
|
|
1211
|
-
getFunction(nameOrSignature: "onMorphoLiquidate"): TypedContractMethod<[
|
|
1212
|
-
repaidAssets: BigNumberish,
|
|
1213
|
-
data: BytesLike
|
|
1214
|
-
], [
|
|
1215
|
-
void
|
|
1216
|
-
], "nonpayable">;
|
|
1217
|
-
getFunction(nameOrSignature: "optimexDomain"): TypedContractMethod<[
|
|
1218
|
-
], [
|
|
1219
|
-
[string, string] & {
|
|
1220
|
-
name: string;
|
|
1221
|
-
version: string;
|
|
1222
|
-
}
|
|
1223
|
-
], "view">;
|
|
1224
|
-
getFunction(nameOrSignature: "owBtc"): TypedContractMethod<[], [string], "view">;
|
|
1225
|
-
getFunction(nameOrSignature: "payment"): TypedContractMethod<[
|
|
1226
|
-
tradeId: BytesLike,
|
|
1227
|
-
positionManager: AddressLike,
|
|
1228
|
-
amount: BigNumberish,
|
|
1229
|
-
positionId: BytesLike,
|
|
1230
|
-
isLiquidate: boolean,
|
|
1231
|
-
validatorSignature: BytesLike
|
|
1232
|
-
], [
|
|
1233
|
-
void
|
|
1234
|
-
], "nonpayable">;
|
|
1235
|
-
getEvent(key: "EIP712DomainChanged"): TypedContractEvent<EIP712DomainChangedEvent$1.InputTuple, EIP712DomainChangedEvent$1.OutputTuple, EIP712DomainChangedEvent$1.OutputObject>;
|
|
1236
|
-
getEvent(key: "ForceClose"): TypedContractEvent<ForceCloseEvent.InputTuple, ForceCloseEvent.OutputTuple, ForceCloseEvent.OutputObject>;
|
|
1237
|
-
getEvent(key: "Liquidate"): TypedContractEvent<LiquidateEvent.InputTuple, LiquidateEvent.OutputTuple, LiquidateEvent.OutputObject>;
|
|
1238
|
-
getEvent(key: "Payment"): TypedContractEvent<PaymentEvent.InputTuple, PaymentEvent.OutputTuple, PaymentEvent.OutputObject>;
|
|
1239
|
-
filters: {
|
|
1240
|
-
"EIP712DomainChanged()": TypedContractEvent<EIP712DomainChangedEvent$1.InputTuple, EIP712DomainChangedEvent$1.OutputTuple, EIP712DomainChangedEvent$1.OutputObject>;
|
|
1241
|
-
EIP712DomainChanged: TypedContractEvent<EIP712DomainChangedEvent$1.InputTuple, EIP712DomainChangedEvent$1.OutputTuple, EIP712DomainChangedEvent$1.OutputObject>;
|
|
1242
|
-
"ForceClose(address,bytes32,bytes32,bytes32,uint256,uint256)": TypedContractEvent<ForceCloseEvent.InputTuple, ForceCloseEvent.OutputTuple, ForceCloseEvent.OutputObject>;
|
|
1243
|
-
ForceClose: TypedContractEvent<ForceCloseEvent.InputTuple, ForceCloseEvent.OutputTuple, ForceCloseEvent.OutputObject>;
|
|
1244
|
-
"Liquidate(address,bytes32,bytes32,bytes32,uint256,uint256,uint256,uint256)": TypedContractEvent<LiquidateEvent.InputTuple, LiquidateEvent.OutputTuple, LiquidateEvent.OutputObject>;
|
|
1245
|
-
Liquidate: TypedContractEvent<LiquidateEvent.InputTuple, LiquidateEvent.OutputTuple, LiquidateEvent.OutputObject>;
|
|
1246
|
-
"Payment(address,bytes32,bytes32,address,bytes32,uint256,uint256)": TypedContractEvent<PaymentEvent.InputTuple, PaymentEvent.OutputTuple, PaymentEvent.OutputObject>;
|
|
1247
|
-
Payment: TypedContractEvent<PaymentEvent.InputTuple, PaymentEvent.OutputTuple, PaymentEvent.OutputObject>;
|
|
1248
|
-
};
|
|
1249
|
-
}
|
|
1250
|
-
|
|
1251
989
|
interface PaymentInterface extends Interface {
|
|
1252
990
|
getFunction(nameOrSignature: "payment" | "protocol" | "setProtocol"): FunctionFragment;
|
|
1253
991
|
getEvent(nameOrSignatureOrTopic: "PaymentTransferred" | "ProtocolUpdated"): EventFragment;
|
|
@@ -3787,341 +3525,6 @@ declare class ERC20__factory {
|
|
|
3787
3525
|
static connect(address: string, runner?: ContractRunner | null): ERC20;
|
|
3788
3526
|
}
|
|
3789
3527
|
|
|
3790
|
-
declare class LendingLiquidation__factory {
|
|
3791
|
-
static readonly abi: readonly [{
|
|
3792
|
-
readonly inputs: readonly [{
|
|
3793
|
-
readonly internalType: "address";
|
|
3794
|
-
readonly name: "_owBtc";
|
|
3795
|
-
readonly type: "address";
|
|
3796
|
-
}, {
|
|
3797
|
-
readonly internalType: "address";
|
|
3798
|
-
readonly name: "_morpho";
|
|
3799
|
-
readonly type: "address";
|
|
3800
|
-
}, {
|
|
3801
|
-
readonly internalType: "address";
|
|
3802
|
-
readonly name: "_lendingManagement";
|
|
3803
|
-
readonly type: "address";
|
|
3804
|
-
}, {
|
|
3805
|
-
readonly internalType: "string";
|
|
3806
|
-
readonly name: "name";
|
|
3807
|
-
readonly type: "string";
|
|
3808
|
-
}, {
|
|
3809
|
-
readonly internalType: "string";
|
|
3810
|
-
readonly name: "version";
|
|
3811
|
-
readonly type: "string";
|
|
3812
|
-
}];
|
|
3813
|
-
readonly stateMutability: "nonpayable";
|
|
3814
|
-
readonly type: "constructor";
|
|
3815
|
-
}, {
|
|
3816
|
-
readonly inputs: readonly [];
|
|
3817
|
-
readonly name: "ECDSAInvalidSignature";
|
|
3818
|
-
readonly type: "error";
|
|
3819
|
-
}, {
|
|
3820
|
-
readonly inputs: readonly [{
|
|
3821
|
-
readonly internalType: "uint256";
|
|
3822
|
-
readonly name: "length";
|
|
3823
|
-
readonly type: "uint256";
|
|
3824
|
-
}];
|
|
3825
|
-
readonly name: "ECDSAInvalidSignatureLength";
|
|
3826
|
-
readonly type: "error";
|
|
3827
|
-
}, {
|
|
3828
|
-
readonly inputs: readonly [{
|
|
3829
|
-
readonly internalType: "bytes32";
|
|
3830
|
-
readonly name: "s";
|
|
3831
|
-
readonly type: "bytes32";
|
|
3832
|
-
}];
|
|
3833
|
-
readonly name: "ECDSAInvalidSignatureS";
|
|
3834
|
-
readonly type: "error";
|
|
3835
|
-
}, {
|
|
3836
|
-
readonly inputs: readonly [];
|
|
3837
|
-
readonly name: "InvalidMorpho";
|
|
3838
|
-
readonly type: "error";
|
|
3839
|
-
}, {
|
|
3840
|
-
readonly inputs: readonly [];
|
|
3841
|
-
readonly name: "InvalidShortString";
|
|
3842
|
-
readonly type: "error";
|
|
3843
|
-
}, {
|
|
3844
|
-
readonly inputs: readonly [{
|
|
3845
|
-
readonly internalType: "address";
|
|
3846
|
-
readonly name: "validator";
|
|
3847
|
-
readonly type: "address";
|
|
3848
|
-
}];
|
|
3849
|
-
readonly name: "NotAuthorizedValidator";
|
|
3850
|
-
readonly type: "error";
|
|
3851
|
-
}, {
|
|
3852
|
-
readonly inputs: readonly [];
|
|
3853
|
-
readonly name: "NotEnoughPaymentAmount";
|
|
3854
|
-
readonly type: "error";
|
|
3855
|
-
}, {
|
|
3856
|
-
readonly inputs: readonly [{
|
|
3857
|
-
readonly internalType: "string";
|
|
3858
|
-
readonly name: "str";
|
|
3859
|
-
readonly type: "string";
|
|
3860
|
-
}];
|
|
3861
|
-
readonly name: "StringTooLong";
|
|
3862
|
-
readonly type: "error";
|
|
3863
|
-
}, {
|
|
3864
|
-
readonly anonymous: false;
|
|
3865
|
-
readonly inputs: readonly [];
|
|
3866
|
-
readonly name: "EIP712DomainChanged";
|
|
3867
|
-
readonly type: "event";
|
|
3868
|
-
}, {
|
|
3869
|
-
readonly anonymous: false;
|
|
3870
|
-
readonly inputs: readonly [{
|
|
3871
|
-
readonly indexed: true;
|
|
3872
|
-
readonly internalType: "address";
|
|
3873
|
-
readonly name: "positionManager";
|
|
3874
|
-
readonly type: "address";
|
|
3875
|
-
}, {
|
|
3876
|
-
readonly indexed: true;
|
|
3877
|
-
readonly internalType: "bytes32";
|
|
3878
|
-
readonly name: "positionId";
|
|
3879
|
-
readonly type: "bytes32";
|
|
3880
|
-
}, {
|
|
3881
|
-
readonly indexed: true;
|
|
3882
|
-
readonly internalType: "bytes32";
|
|
3883
|
-
readonly name: "tradeId";
|
|
3884
|
-
readonly type: "bytes32";
|
|
3885
|
-
}, {
|
|
3886
|
-
readonly indexed: false;
|
|
3887
|
-
readonly internalType: "bytes32";
|
|
3888
|
-
readonly name: "marketId";
|
|
3889
|
-
readonly type: "bytes32";
|
|
3890
|
-
}, {
|
|
3891
|
-
readonly indexed: false;
|
|
3892
|
-
readonly internalType: "uint256";
|
|
3893
|
-
readonly name: "repaidLoan";
|
|
3894
|
-
readonly type: "uint256";
|
|
3895
|
-
}, {
|
|
3896
|
-
readonly indexed: false;
|
|
3897
|
-
readonly internalType: "uint256";
|
|
3898
|
-
readonly name: "userRefund";
|
|
3899
|
-
readonly type: "uint256";
|
|
3900
|
-
}];
|
|
3901
|
-
readonly name: "ForceClose";
|
|
3902
|
-
readonly type: "event";
|
|
3903
|
-
}, {
|
|
3904
|
-
readonly anonymous: false;
|
|
3905
|
-
readonly inputs: readonly [{
|
|
3906
|
-
readonly indexed: true;
|
|
3907
|
-
readonly internalType: "address";
|
|
3908
|
-
readonly name: "positionManager";
|
|
3909
|
-
readonly type: "address";
|
|
3910
|
-
}, {
|
|
3911
|
-
readonly indexed: true;
|
|
3912
|
-
readonly internalType: "bytes32";
|
|
3913
|
-
readonly name: "positionId";
|
|
3914
|
-
readonly type: "bytes32";
|
|
3915
|
-
}, {
|
|
3916
|
-
readonly indexed: true;
|
|
3917
|
-
readonly internalType: "bytes32";
|
|
3918
|
-
readonly name: "tradeId";
|
|
3919
|
-
readonly type: "bytes32";
|
|
3920
|
-
}, {
|
|
3921
|
-
readonly indexed: false;
|
|
3922
|
-
readonly internalType: "bytes32";
|
|
3923
|
-
readonly name: "marketId";
|
|
3924
|
-
readonly type: "bytes32";
|
|
3925
|
-
}, {
|
|
3926
|
-
readonly indexed: false;
|
|
3927
|
-
readonly internalType: "uint256";
|
|
3928
|
-
readonly name: "seizedCollateral";
|
|
3929
|
-
readonly type: "uint256";
|
|
3930
|
-
}, {
|
|
3931
|
-
readonly indexed: false;
|
|
3932
|
-
readonly internalType: "uint256";
|
|
3933
|
-
readonly name: "remainingCollateral";
|
|
3934
|
-
readonly type: "uint256";
|
|
3935
|
-
}, {
|
|
3936
|
-
readonly indexed: false;
|
|
3937
|
-
readonly internalType: "uint256";
|
|
3938
|
-
readonly name: "repaidLoan";
|
|
3939
|
-
readonly type: "uint256";
|
|
3940
|
-
}, {
|
|
3941
|
-
readonly indexed: false;
|
|
3942
|
-
readonly internalType: "uint256";
|
|
3943
|
-
readonly name: "bonusLoan";
|
|
3944
|
-
readonly type: "uint256";
|
|
3945
|
-
}];
|
|
3946
|
-
readonly name: "Liquidate";
|
|
3947
|
-
readonly type: "event";
|
|
3948
|
-
}, {
|
|
3949
|
-
readonly anonymous: false;
|
|
3950
|
-
readonly inputs: readonly [{
|
|
3951
|
-
readonly indexed: true;
|
|
3952
|
-
readonly internalType: "address";
|
|
3953
|
-
readonly name: "positionManager";
|
|
3954
|
-
readonly type: "address";
|
|
3955
|
-
}, {
|
|
3956
|
-
readonly indexed: true;
|
|
3957
|
-
readonly internalType: "bytes32";
|
|
3958
|
-
readonly name: "positionId";
|
|
3959
|
-
readonly type: "bytes32";
|
|
3960
|
-
}, {
|
|
3961
|
-
readonly indexed: true;
|
|
3962
|
-
readonly internalType: "bytes32";
|
|
3963
|
-
readonly name: "tradeId";
|
|
3964
|
-
readonly type: "bytes32";
|
|
3965
|
-
}, {
|
|
3966
|
-
readonly indexed: false;
|
|
3967
|
-
readonly internalType: "address";
|
|
3968
|
-
readonly name: "sender";
|
|
3969
|
-
readonly type: "address";
|
|
3970
|
-
}, {
|
|
3971
|
-
readonly indexed: false;
|
|
3972
|
-
readonly internalType: "bytes32";
|
|
3973
|
-
readonly name: "marketId";
|
|
3974
|
-
readonly type: "bytes32";
|
|
3975
|
-
}, {
|
|
3976
|
-
readonly indexed: false;
|
|
3977
|
-
readonly internalType: "uint256";
|
|
3978
|
-
readonly name: "amount";
|
|
3979
|
-
readonly type: "uint256";
|
|
3980
|
-
}, {
|
|
3981
|
-
readonly indexed: false;
|
|
3982
|
-
readonly internalType: "uint256";
|
|
3983
|
-
readonly name: "collateral";
|
|
3984
|
-
readonly type: "uint256";
|
|
3985
|
-
}];
|
|
3986
|
-
readonly name: "Payment";
|
|
3987
|
-
readonly type: "event";
|
|
3988
|
-
}, {
|
|
3989
|
-
readonly inputs: readonly [];
|
|
3990
|
-
readonly name: "LENDING_MANAGEMENT";
|
|
3991
|
-
readonly outputs: readonly [{
|
|
3992
|
-
readonly internalType: "contract ILendingManagement";
|
|
3993
|
-
readonly name: "";
|
|
3994
|
-
readonly type: "address";
|
|
3995
|
-
}];
|
|
3996
|
-
readonly stateMutability: "view";
|
|
3997
|
-
readonly type: "function";
|
|
3998
|
-
}, {
|
|
3999
|
-
readonly inputs: readonly [];
|
|
4000
|
-
readonly name: "MORPHO";
|
|
4001
|
-
readonly outputs: readonly [{
|
|
4002
|
-
readonly internalType: "contract IMorpho";
|
|
4003
|
-
readonly name: "";
|
|
4004
|
-
readonly type: "address";
|
|
4005
|
-
}];
|
|
4006
|
-
readonly stateMutability: "view";
|
|
4007
|
-
readonly type: "function";
|
|
4008
|
-
}, {
|
|
4009
|
-
readonly inputs: readonly [];
|
|
4010
|
-
readonly name: "VALIDATOR_FORCE_CLOSE_TYPEHASH";
|
|
4011
|
-
readonly outputs: readonly [{
|
|
4012
|
-
readonly internalType: "bytes32";
|
|
4013
|
-
readonly name: "";
|
|
4014
|
-
readonly type: "bytes32";
|
|
4015
|
-
}];
|
|
4016
|
-
readonly stateMutability: "view";
|
|
4017
|
-
readonly type: "function";
|
|
4018
|
-
}, {
|
|
4019
|
-
readonly inputs: readonly [];
|
|
4020
|
-
readonly name: "eip712Domain";
|
|
4021
|
-
readonly outputs: readonly [{
|
|
4022
|
-
readonly internalType: "bytes1";
|
|
4023
|
-
readonly name: "fields";
|
|
4024
|
-
readonly type: "bytes1";
|
|
4025
|
-
}, {
|
|
4026
|
-
readonly internalType: "string";
|
|
4027
|
-
readonly name: "name";
|
|
4028
|
-
readonly type: "string";
|
|
4029
|
-
}, {
|
|
4030
|
-
readonly internalType: "string";
|
|
4031
|
-
readonly name: "version";
|
|
4032
|
-
readonly type: "string";
|
|
4033
|
-
}, {
|
|
4034
|
-
readonly internalType: "uint256";
|
|
4035
|
-
readonly name: "chainId";
|
|
4036
|
-
readonly type: "uint256";
|
|
4037
|
-
}, {
|
|
4038
|
-
readonly internalType: "address";
|
|
4039
|
-
readonly name: "verifyingContract";
|
|
4040
|
-
readonly type: "address";
|
|
4041
|
-
}, {
|
|
4042
|
-
readonly internalType: "bytes32";
|
|
4043
|
-
readonly name: "salt";
|
|
4044
|
-
readonly type: "bytes32";
|
|
4045
|
-
}, {
|
|
4046
|
-
readonly internalType: "uint256[]";
|
|
4047
|
-
readonly name: "extensions";
|
|
4048
|
-
readonly type: "uint256[]";
|
|
4049
|
-
}];
|
|
4050
|
-
readonly stateMutability: "view";
|
|
4051
|
-
readonly type: "function";
|
|
4052
|
-
}, {
|
|
4053
|
-
readonly inputs: readonly [{
|
|
4054
|
-
readonly internalType: "uint256";
|
|
4055
|
-
readonly name: "repaidAssets";
|
|
4056
|
-
readonly type: "uint256";
|
|
4057
|
-
}, {
|
|
4058
|
-
readonly internalType: "bytes";
|
|
4059
|
-
readonly name: "data";
|
|
4060
|
-
readonly type: "bytes";
|
|
4061
|
-
}];
|
|
4062
|
-
readonly name: "onMorphoLiquidate";
|
|
4063
|
-
readonly outputs: readonly [];
|
|
4064
|
-
readonly stateMutability: "nonpayable";
|
|
4065
|
-
readonly type: "function";
|
|
4066
|
-
}, {
|
|
4067
|
-
readonly inputs: readonly [];
|
|
4068
|
-
readonly name: "optimexDomain";
|
|
4069
|
-
readonly outputs: readonly [{
|
|
4070
|
-
readonly internalType: "string";
|
|
4071
|
-
readonly name: "name";
|
|
4072
|
-
readonly type: "string";
|
|
4073
|
-
}, {
|
|
4074
|
-
readonly internalType: "string";
|
|
4075
|
-
readonly name: "version";
|
|
4076
|
-
readonly type: "string";
|
|
4077
|
-
}];
|
|
4078
|
-
readonly stateMutability: "view";
|
|
4079
|
-
readonly type: "function";
|
|
4080
|
-
}, {
|
|
4081
|
-
readonly inputs: readonly [];
|
|
4082
|
-
readonly name: "owBtc";
|
|
4083
|
-
readonly outputs: readonly [{
|
|
4084
|
-
readonly internalType: "contract OW_BTC";
|
|
4085
|
-
readonly name: "";
|
|
4086
|
-
readonly type: "address";
|
|
4087
|
-
}];
|
|
4088
|
-
readonly stateMutability: "view";
|
|
4089
|
-
readonly type: "function";
|
|
4090
|
-
}, {
|
|
4091
|
-
readonly inputs: readonly [{
|
|
4092
|
-
readonly internalType: "bytes32";
|
|
4093
|
-
readonly name: "tradeId";
|
|
4094
|
-
readonly type: "bytes32";
|
|
4095
|
-
}, {
|
|
4096
|
-
readonly internalType: "contract IAccountPositionManager";
|
|
4097
|
-
readonly name: "positionManager";
|
|
4098
|
-
readonly type: "address";
|
|
4099
|
-
}, {
|
|
4100
|
-
readonly internalType: "uint256";
|
|
4101
|
-
readonly name: "amount";
|
|
4102
|
-
readonly type: "uint256";
|
|
4103
|
-
}, {
|
|
4104
|
-
readonly internalType: "bytes32";
|
|
4105
|
-
readonly name: "positionId";
|
|
4106
|
-
readonly type: "bytes32";
|
|
4107
|
-
}, {
|
|
4108
|
-
readonly internalType: "bool";
|
|
4109
|
-
readonly name: "isLiquidate";
|
|
4110
|
-
readonly type: "bool";
|
|
4111
|
-
}, {
|
|
4112
|
-
readonly internalType: "bytes";
|
|
4113
|
-
readonly name: "validatorSignature";
|
|
4114
|
-
readonly type: "bytes";
|
|
4115
|
-
}];
|
|
4116
|
-
readonly name: "payment";
|
|
4117
|
-
readonly outputs: readonly [];
|
|
4118
|
-
readonly stateMutability: "nonpayable";
|
|
4119
|
-
readonly type: "function";
|
|
4120
|
-
}];
|
|
4121
|
-
static createInterface(): LendingLiquidationInterface;
|
|
4122
|
-
static connect(address: string, runner?: ContractRunner | null): LendingLiquidation;
|
|
4123
|
-
}
|
|
4124
|
-
|
|
4125
3528
|
declare class Payment__factory {
|
|
4126
3529
|
static readonly abi: readonly [{
|
|
4127
3530
|
readonly inputs: readonly [{
|
|
@@ -6115,8 +5518,6 @@ declare class Signer__factory {
|
|
|
6115
5518
|
|
|
6116
5519
|
type index_ERC20__factory = ERC20__factory;
|
|
6117
5520
|
declare const index_ERC20__factory: typeof ERC20__factory;
|
|
6118
|
-
type index_LendingLiquidation__factory = LendingLiquidation__factory;
|
|
6119
|
-
declare const index_LendingLiquidation__factory: typeof LendingLiquidation__factory;
|
|
6120
5521
|
type index_Payment__factory = Payment__factory;
|
|
6121
5522
|
declare const index_Payment__factory: typeof Payment__factory;
|
|
6122
5523
|
type index_ProtocolFetcherProxy__factory = ProtocolFetcherProxy__factory;
|
|
@@ -6126,7 +5527,7 @@ declare const index_Router__factory: typeof Router__factory;
|
|
|
6126
5527
|
type index_Signer__factory = Signer__factory;
|
|
6127
5528
|
declare const index_Signer__factory: typeof Signer__factory;
|
|
6128
5529
|
declare namespace index {
|
|
6129
|
-
export { index_ERC20__factory as ERC20__factory,
|
|
5530
|
+
export { index_ERC20__factory as ERC20__factory, index_Payment__factory as Payment__factory, index_ProtocolFetcherProxy__factory as ProtocolFetcherProxy__factory, index_Router__factory as Router__factory, index_Signer__factory as Signer__factory };
|
|
6130
5531
|
}
|
|
6131
5532
|
|
|
6132
5533
|
declare namespace ITypes {
|
|
@@ -6162,26 +5563,6 @@ declare namespace ITypes {
|
|
|
6162
5563
|
type TradeFinalizationStructOutput = ITypes$1.TradeFinalizationStructOutput;
|
|
6163
5564
|
}
|
|
6164
5565
|
|
|
6165
|
-
declare class ProtocolService implements ConfigObserver {
|
|
6166
|
-
private provider;
|
|
6167
|
-
private contract;
|
|
6168
|
-
constructor();
|
|
6169
|
-
/**
|
|
6170
|
-
* Implementation of ConfigObserver interface
|
|
6171
|
-
* Updates service when config changes
|
|
6172
|
-
*/
|
|
6173
|
-
onConfigUpdate(newConfig: AppConfig): void;
|
|
6174
|
-
getCurrentPubkey(network: string): Promise<ITypes.MPCInfoStructOutput>;
|
|
6175
|
-
getPFeeRate({ fromNetworkId, fromTokenId, toNetworkId, toTokenId, }: {
|
|
6176
|
-
fromNetworkId: string;
|
|
6177
|
-
fromTokenId: string;
|
|
6178
|
-
toNetworkId: string;
|
|
6179
|
-
toTokenId: string;
|
|
6180
|
-
}): Promise<number>;
|
|
6181
|
-
getRouter(): Promise<string>;
|
|
6182
|
-
}
|
|
6183
|
-
declare const protocolService: ProtocolService;
|
|
6184
|
-
|
|
6185
5566
|
declare class RouterService implements ConfigObserver {
|
|
6186
5567
|
private provider;
|
|
6187
5568
|
private contract;
|
|
@@ -6803,4 +6184,4 @@ declare function camelToSnakeCase(str: string): string;
|
|
|
6803
6184
|
declare const ensureHexPrefix: (value: string) => string;
|
|
6804
6185
|
declare const removeHexPrefix: (value: string) => string;
|
|
6805
6186
|
|
|
6806
|
-
export { type AppConfig, type ConfigObserver, type ERC20, ERC20__factory, type Environment, type EnvironmentConfig, ITypes, type
|
|
6187
|
+
export { type AppConfig, type ConfigObserver, type ERC20, ERC20__factory, type Environment, type EnvironmentConfig, ITypes, type Payment, Payment__factory, type ProtocolFetcherProxy, ProtocolFetcherProxy__factory, type Router, RouterService, Router__factory, SDK, SignatureType, type Signer, SignerService, Signer__factory, SolverService, type Token, TokenSchema, TokenService, camelToSnakeCase, config, confirmDepositType, confirmPaymentType, confirmSettlementType, convertToCamelCase, convertToSnakeCase, ensureHexPrefix, index as factories, getCommitInfoHash, getMakePaymentHash, getSignature, getSigner, getTradeIdsHash, makePaymentType, presignType, removeHexPrefix, rfqAuthenticationTypes, routerService, sdk, selectionType, signerService, snakeToCamelCase, solverService, tokenService };
|