@myx-trade/sdk 0.1.213 → 0.1.216
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 +1529 -79
- package/dist/index.d.ts +1529 -79
- package/dist/index.js +98 -7
- package/dist/index.mjs +98 -7
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as ethers from 'ethers';
|
|
2
|
+
import { ZeroAddress, AddressLike, Signer, ethers as ethers$1, DeferredTopicFilter, EventFragment, EventLog, TransactionRequest, Typed, ContractTransactionResponse, FunctionFragment, ContractTransaction, LogDescription, BaseContract, ContractRunner, Interface, BigNumberish, BytesLike, Result, Listener, ContractMethod } from 'ethers';
|
|
2
3
|
export { formatUnits, parseUnits } from 'ethers';
|
|
3
4
|
import { Options, Event } from 'reconnecting-websocket';
|
|
4
|
-
import { Address as Address$
|
|
5
|
+
import { Address as Address$2, WalletClient } from 'viem';
|
|
5
6
|
|
|
7
|
+
type Address$1 = `0x${string}` | typeof ZeroAddress;
|
|
6
8
|
declare enum ChainId {
|
|
7
9
|
LINEA_SEPOLIA = 59141,
|
|
8
10
|
LINEA_MAINNET = 59144,
|
|
@@ -11,6 +13,24 @@ declare enum ChainId {
|
|
|
11
13
|
BSC_TESTNET = 97,
|
|
12
14
|
BSC_MAINNET = 56
|
|
13
15
|
}
|
|
16
|
+
interface ContractAddress {
|
|
17
|
+
readonly USDC: Address$1;
|
|
18
|
+
readonly Account: Address$1;
|
|
19
|
+
readonly POOL_MANAGER: Address$1;
|
|
20
|
+
readonly POSITION_MANAGER: Address$1;
|
|
21
|
+
readonly ORDER_MANAGER: Address$1;
|
|
22
|
+
readonly PYTH: Address$1;
|
|
23
|
+
readonly ERC20: Address$1;
|
|
24
|
+
readonly LIQUIDITY_ROUTER: Address$1;
|
|
25
|
+
readonly BASE_POOL: Address$1;
|
|
26
|
+
readonly QUOTE_POOL: Address$1;
|
|
27
|
+
readonly ORACLE: Address$1;
|
|
28
|
+
readonly EIP7702Delegation: Address$1;
|
|
29
|
+
readonly MARKET_MANAGER: Address$1;
|
|
30
|
+
readonly DATA_PROVIDER: Address$1;
|
|
31
|
+
readonly ORACLE_RESERVE: Address$1;
|
|
32
|
+
readonly FORWARDER: Address$1;
|
|
33
|
+
}
|
|
14
34
|
|
|
15
35
|
interface CreatePoolRequest {
|
|
16
36
|
chainId: ChainId;
|
|
@@ -48,49 +68,49 @@ interface CancelTpSLParams {
|
|
|
48
68
|
orderId: string;
|
|
49
69
|
}
|
|
50
70
|
|
|
51
|
-
declare const createPool: ({ chainId, baseToken, marketId }: CreatePoolRequest) => Promise<
|
|
71
|
+
declare const createPool: ({ chainId, baseToken, marketId }: CreatePoolRequest) => Promise<string | undefined>;
|
|
52
72
|
|
|
53
|
-
declare const getMarketPoolId: ({ chainId, baseToken, marketId, }: CreatePoolRequest) => Promise<
|
|
54
|
-
declare const getMarketPools: (chainId: ChainId) => Promise<
|
|
73
|
+
declare const getMarketPoolId: ({ chainId, baseToken, marketId, }: CreatePoolRequest) => Promise<string | undefined>;
|
|
74
|
+
declare const getMarketPools: (chainId: ChainId) => Promise<string[]>;
|
|
55
75
|
declare const getPoolInfo$1: (chainId: ChainId, poolId: string, marketPrice?: bigint) => Promise<{
|
|
56
76
|
quotePool: {
|
|
57
|
-
poolToken:
|
|
58
|
-
exchangeRate:
|
|
59
|
-
poolTokenPrice:
|
|
60
|
-
poolTokenSupply:
|
|
77
|
+
poolToken: string;
|
|
78
|
+
exchangeRate: bigint;
|
|
79
|
+
poolTokenPrice: bigint;
|
|
80
|
+
poolTokenSupply: bigint;
|
|
61
81
|
};
|
|
62
82
|
basePool: {
|
|
63
|
-
poolToken:
|
|
64
|
-
exchangeRate:
|
|
65
|
-
poolTokenPrice:
|
|
66
|
-
poolTokenSupply:
|
|
83
|
+
poolToken: string;
|
|
84
|
+
exchangeRate: bigint;
|
|
85
|
+
poolTokenPrice: bigint;
|
|
86
|
+
poolTokenSupply: bigint;
|
|
67
87
|
};
|
|
68
88
|
reserveInfo: {
|
|
69
|
-
baseTotalAmount:
|
|
70
|
-
baseReservedAmount:
|
|
71
|
-
quoteTotalAmount:
|
|
72
|
-
quoteReservedAmount:
|
|
89
|
+
baseTotalAmount: bigint;
|
|
90
|
+
baseReservedAmount: bigint;
|
|
91
|
+
quoteTotalAmount: bigint;
|
|
92
|
+
quoteReservedAmount: bigint;
|
|
73
93
|
};
|
|
74
94
|
fundingInfo: {
|
|
75
|
-
nextFundingRate:
|
|
76
|
-
lastFundingFeeTracker:
|
|
77
|
-
nextEpochTime:
|
|
95
|
+
nextFundingRate: bigint;
|
|
96
|
+
lastFundingFeeTracker: bigint;
|
|
97
|
+
nextEpochTime: bigint;
|
|
78
98
|
};
|
|
79
99
|
ioTracker: {
|
|
80
|
-
tracker:
|
|
81
|
-
longSize:
|
|
82
|
-
shortSize:
|
|
83
|
-
poolEntryPrice:
|
|
100
|
+
tracker: bigint;
|
|
101
|
+
longSize: bigint;
|
|
102
|
+
shortSize: bigint;
|
|
103
|
+
poolEntryPrice: bigint;
|
|
84
104
|
};
|
|
85
105
|
}>;
|
|
86
106
|
|
|
87
|
-
declare const getUserGenesisShare: (chainId: ChainId, tokenAddress: string, account: string) => Promise<
|
|
107
|
+
declare const getUserGenesisShare: (chainId: ChainId, tokenAddress: string, account: string) => Promise<bigint>;
|
|
88
108
|
|
|
89
|
-
declare const addTpSl: (params: AddTpSLParams) => Promise<
|
|
109
|
+
declare const addTpSl: (params: AddTpSLParams) => Promise<ethers.ContractTransactionReceipt | null>;
|
|
90
110
|
|
|
91
|
-
declare const cancelTpSl: (params: CancelTpSLParams) => Promise<
|
|
111
|
+
declare const cancelTpSl: (params: CancelTpSLParams) => Promise<ethers.ContractTransactionReceipt | null>;
|
|
92
112
|
|
|
93
|
-
declare const reprime: (chainId: ChainId, poolId: string, marketId: string) => Promise<
|
|
113
|
+
declare const reprime: (chainId: ChainId, poolId: string, marketId: string) => Promise<ethers.ContractTransactionReceipt | null>;
|
|
94
114
|
|
|
95
115
|
/**
|
|
96
116
|
* Trading related types and enums
|
|
@@ -624,7 +644,7 @@ interface HistoryOrderItem {
|
|
|
624
644
|
orderStatus: OrderStatusEnum;
|
|
625
645
|
execType: ExecTypeEnum;
|
|
626
646
|
slippagePct: number;
|
|
627
|
-
executionFeeToken: Address$
|
|
647
|
+
executionFeeToken: Address$2;
|
|
628
648
|
executionFeeAmount: string;
|
|
629
649
|
tradingFee: string;
|
|
630
650
|
fundingFee: string;
|
|
@@ -680,7 +700,7 @@ declare enum TradeFlowAccountTypeEnum {
|
|
|
680
700
|
interface TradeFlowItem {
|
|
681
701
|
chainId: number;
|
|
682
702
|
orderId: number;
|
|
683
|
-
user: Address$
|
|
703
|
+
user: Address$2;
|
|
684
704
|
poolId: string;
|
|
685
705
|
fundingFee: string;
|
|
686
706
|
tradingFee: string;
|
|
@@ -699,7 +719,7 @@ interface TradeFlowItem {
|
|
|
699
719
|
referrerRebate: string;
|
|
700
720
|
referralRebate: string;
|
|
701
721
|
rebateClaimedAmount: string;
|
|
702
|
-
token?: Address$
|
|
722
|
+
token?: Address$2;
|
|
703
723
|
}
|
|
704
724
|
|
|
705
725
|
type ForwarderTxParams = {
|
|
@@ -890,21 +910,21 @@ interface PreviewWithdrawDataParams {
|
|
|
890
910
|
amount: string | number;
|
|
891
911
|
}
|
|
892
912
|
|
|
893
|
-
declare const claimBasePoolRebate: (params: ClaimParams) => Promise<
|
|
894
|
-
declare const claimBasePoolRebates: (params: ClaimRebatesParams) => Promise<
|
|
913
|
+
declare const claimBasePoolRebate: (params: ClaimParams) => Promise<ethers.ContractTransactionResponse | undefined>;
|
|
914
|
+
declare const claimBasePoolRebates: (params: ClaimRebatesParams) => Promise<ethers.ContractTransactionResponse | undefined>;
|
|
895
915
|
|
|
896
|
-
declare const deposit$1: (params: Deposit) => Promise<
|
|
916
|
+
declare const deposit$1: (params: Deposit) => Promise<ethers.ContractTransactionResponse | undefined>;
|
|
897
917
|
|
|
898
|
-
declare const withdraw$1: (params: WithdrawParams) => Promise<
|
|
918
|
+
declare const withdraw$1: (params: WithdrawParams) => Promise<ethers.ContractTransactionReceipt | null | undefined>;
|
|
899
919
|
|
|
900
|
-
declare const getRewards$1: (params: RewardsParams) => Promise<
|
|
920
|
+
declare const getRewards$1: (params: RewardsParams) => Promise<bigint | undefined>;
|
|
901
921
|
|
|
902
922
|
declare const previewUserWithdrawData: ({ chainId, account, poolId, amount }: PreviewWithdrawDataParams) => Promise<{
|
|
903
|
-
baseAmountOut:
|
|
904
|
-
rebateAmount:
|
|
923
|
+
baseAmountOut: bigint;
|
|
924
|
+
rebateAmount: bigint;
|
|
905
925
|
} | undefined>;
|
|
906
926
|
|
|
907
|
-
declare const getLpPrice$1: (chainId: ChainId, poolId: string) => Promise<
|
|
927
|
+
declare const getLpPrice$1: (chainId: ChainId, poolId: string) => Promise<bigint | undefined>;
|
|
908
928
|
|
|
909
929
|
declare const index$2_claimBasePoolRebate: typeof claimBasePoolRebate;
|
|
910
930
|
declare const index$2_claimBasePoolRebates: typeof claimBasePoolRebates;
|
|
@@ -913,18 +933,18 @@ declare namespace index$2 {
|
|
|
913
933
|
export { index$2_claimBasePoolRebate as claimBasePoolRebate, index$2_claimBasePoolRebates as claimBasePoolRebates, deposit$1 as deposit, getLpPrice$1 as getLpPrice, getRewards$1 as getRewards, index$2_previewUserWithdrawData as previewUserWithdrawData, withdraw$1 as withdraw };
|
|
914
934
|
}
|
|
915
935
|
|
|
916
|
-
declare const deposit: (params: Deposit) => Promise<
|
|
936
|
+
declare const deposit: (params: Deposit) => Promise<ethers.ContractTransactionResponse | undefined>;
|
|
917
937
|
|
|
918
|
-
declare const withdraw: (params: WithdrawParams) => Promise<
|
|
938
|
+
declare const withdraw: (params: WithdrawParams) => Promise<ethers.ContractTransactionReceipt | null | undefined>;
|
|
919
939
|
|
|
920
|
-
declare const transfer: (chainId: ChainId, fromPoolId: string, toPoolId: string, amount: number) => Promise<
|
|
940
|
+
declare const transfer: (chainId: ChainId, fromPoolId: string, toPoolId: string, amount: number) => Promise<ethers.ContractTransactionResponse | null>;
|
|
921
941
|
|
|
922
|
-
declare const getRewards: (params: RewardsParams) => Promise<
|
|
942
|
+
declare const getRewards: (params: RewardsParams) => Promise<bigint | undefined>;
|
|
923
943
|
|
|
924
|
-
declare const claimQuotePoolRebate: (params: ClaimParams) => Promise<
|
|
925
|
-
declare const claimQuotePoolRebates: (params: ClaimRebatesParams) => Promise<
|
|
944
|
+
declare const claimQuotePoolRebate: (params: ClaimParams) => Promise<ethers.ContractTransactionResponse | undefined>;
|
|
945
|
+
declare const claimQuotePoolRebates: (params: ClaimRebatesParams) => Promise<ethers.ContractTransactionResponse | undefined>;
|
|
926
946
|
|
|
927
|
-
declare const getLpPrice: (chainId: ChainId, poolId: string) => Promise<
|
|
947
|
+
declare const getLpPrice: (chainId: ChainId, poolId: string) => Promise<bigint | undefined>;
|
|
928
948
|
|
|
929
949
|
declare const index$1_claimQuotePoolRebate: typeof claimQuotePoolRebate;
|
|
930
950
|
declare const index$1_claimQuotePoolRebates: typeof claimQuotePoolRebates;
|
|
@@ -937,9 +957,16 @@ declare namespace index$1 {
|
|
|
937
957
|
export { index$1_claimQuotePoolRebate as claimQuotePoolRebate, index$1_claimQuotePoolRebates as claimQuotePoolRebates, index$1_deposit as deposit, index$1_getLpPrice as getLpPrice, index$1_getRewards as getRewards, index$1_transfer as transfer, index$1_withdraw as withdraw };
|
|
938
958
|
}
|
|
939
959
|
|
|
940
|
-
declare const getMarket: (chainId: ChainId, marketId: string) => Promise<
|
|
960
|
+
declare const getMarket: (chainId: ChainId, marketId: string) => Promise<([string, bigint, bigint, bigint, bigint, bigint] & {
|
|
961
|
+
quoteToken: string;
|
|
962
|
+
baseReserveRatio: bigint;
|
|
963
|
+
quoteReserveRatio: bigint;
|
|
964
|
+
oracleFeeUsd: bigint;
|
|
965
|
+
oracleRefundFeeUsd: bigint;
|
|
966
|
+
poolPrimeThreshold: bigint;
|
|
967
|
+
}) | undefined>;
|
|
941
968
|
|
|
942
|
-
declare const getOracleFee: (chainId: ChainId, marketId: string) => Promise<
|
|
969
|
+
declare const getOracleFee: (chainId: ChainId, marketId: string) => Promise<bigint | undefined>;
|
|
943
970
|
|
|
944
971
|
declare const index_getMarket: typeof getMarket;
|
|
945
972
|
declare const index_getOracleFee: typeof getOracleFee;
|
|
@@ -982,9 +1009,9 @@ declare const bigintAmountSlipperCalculator: (amount: bigint, slipper?: Number)
|
|
|
982
1009
|
declare const getTokenInfo: (chainId: number, tokenAddress: string, account?: string) => Promise<{
|
|
983
1010
|
balance?: number | undefined;
|
|
984
1011
|
address: string;
|
|
985
|
-
name:
|
|
986
|
-
symbol:
|
|
987
|
-
decimals:
|
|
1012
|
+
name: string;
|
|
1013
|
+
symbol: string;
|
|
1014
|
+
decimals: bigint;
|
|
988
1015
|
icon: string;
|
|
989
1016
|
totalSupply: number;
|
|
990
1017
|
}>;
|
|
@@ -1198,7 +1225,7 @@ interface MyxClientConfig {
|
|
|
1198
1225
|
signer?: Signer;
|
|
1199
1226
|
seamlessAccount?: {
|
|
1200
1227
|
masterAddress: string;
|
|
1201
|
-
wallet: ethers.Wallet | null;
|
|
1228
|
+
wallet: ethers$1.Wallet | null;
|
|
1202
1229
|
authorized: boolean;
|
|
1203
1230
|
};
|
|
1204
1231
|
walletClient?: WalletClient;
|
|
@@ -1218,7 +1245,7 @@ declare class ConfigManager {
|
|
|
1218
1245
|
clear(): void;
|
|
1219
1246
|
startSeamlessMode(open: boolean): MyxClientConfig;
|
|
1220
1247
|
updateSeamlessWallet({ wallet, authorized, masterAddress }: {
|
|
1221
|
-
wallet?: ethers.Wallet;
|
|
1248
|
+
wallet?: ethers$1.Wallet;
|
|
1222
1249
|
authorized?: boolean;
|
|
1223
1250
|
masterAddress?: string;
|
|
1224
1251
|
}): void;
|
|
@@ -1326,7 +1353,7 @@ declare class Utils {
|
|
|
1326
1353
|
quoteAddress: string;
|
|
1327
1354
|
amount?: string;
|
|
1328
1355
|
spenderAddress?: string;
|
|
1329
|
-
signer?: ethers.Signer;
|
|
1356
|
+
signer?: ethers$1.Signer;
|
|
1330
1357
|
}): Promise<{
|
|
1331
1358
|
code: number;
|
|
1332
1359
|
message: any;
|
|
@@ -1369,7 +1396,68 @@ declare class Utils {
|
|
|
1369
1396
|
marketPrice: string;
|
|
1370
1397
|
}): Promise<{
|
|
1371
1398
|
code: number;
|
|
1372
|
-
data:
|
|
1399
|
+
data: [[string, bigint, bigint, bigint] & {
|
|
1400
|
+
poolToken: string;
|
|
1401
|
+
exchangeRate: bigint;
|
|
1402
|
+
poolTokenPrice: bigint;
|
|
1403
|
+
poolTokenSupply: bigint;
|
|
1404
|
+
}, [string, bigint, bigint, bigint] & {
|
|
1405
|
+
poolToken: string;
|
|
1406
|
+
exchangeRate: bigint;
|
|
1407
|
+
poolTokenPrice: bigint;
|
|
1408
|
+
poolTokenSupply: bigint;
|
|
1409
|
+
}, [bigint, bigint, bigint, bigint] & {
|
|
1410
|
+
baseTotalAmount: bigint;
|
|
1411
|
+
baseReservedAmount: bigint;
|
|
1412
|
+
quoteTotalAmount: bigint;
|
|
1413
|
+
quoteReservedAmount: bigint;
|
|
1414
|
+
}, [bigint, bigint, bigint] & {
|
|
1415
|
+
nextFundingRate: bigint;
|
|
1416
|
+
lastFundingFeeTracker: bigint;
|
|
1417
|
+
nextEpochTime: bigint;
|
|
1418
|
+
}, [bigint, bigint, bigint, bigint] & {
|
|
1419
|
+
tracker: bigint;
|
|
1420
|
+
longSize: bigint;
|
|
1421
|
+
shortSize: bigint;
|
|
1422
|
+
poolEntryPrice: bigint;
|
|
1423
|
+
}, [bigint, bigint] & {
|
|
1424
|
+
windowCaps: bigint;
|
|
1425
|
+
openInterest: bigint;
|
|
1426
|
+
}] & {
|
|
1427
|
+
basePool: [string, bigint, bigint, bigint] & {
|
|
1428
|
+
poolToken: string;
|
|
1429
|
+
exchangeRate: bigint;
|
|
1430
|
+
poolTokenPrice: bigint;
|
|
1431
|
+
poolTokenSupply: bigint;
|
|
1432
|
+
};
|
|
1433
|
+
quotePool: [string, bigint, bigint, bigint] & {
|
|
1434
|
+
poolToken: string;
|
|
1435
|
+
exchangeRate: bigint;
|
|
1436
|
+
poolTokenPrice: bigint;
|
|
1437
|
+
poolTokenSupply: bigint;
|
|
1438
|
+
};
|
|
1439
|
+
reserveInfo: [bigint, bigint, bigint, bigint] & {
|
|
1440
|
+
baseTotalAmount: bigint;
|
|
1441
|
+
baseReservedAmount: bigint;
|
|
1442
|
+
quoteTotalAmount: bigint;
|
|
1443
|
+
quoteReservedAmount: bigint;
|
|
1444
|
+
};
|
|
1445
|
+
fundingInfo: [bigint, bigint, bigint] & {
|
|
1446
|
+
nextFundingRate: bigint;
|
|
1447
|
+
lastFundingFeeTracker: bigint;
|
|
1448
|
+
nextEpochTime: bigint;
|
|
1449
|
+
};
|
|
1450
|
+
oi: [bigint, bigint, bigint, bigint] & {
|
|
1451
|
+
tracker: bigint;
|
|
1452
|
+
longSize: bigint;
|
|
1453
|
+
shortSize: bigint;
|
|
1454
|
+
poolEntryPrice: bigint;
|
|
1455
|
+
};
|
|
1456
|
+
liquidityInfo: [bigint, bigint] & {
|
|
1457
|
+
windowCaps: bigint;
|
|
1458
|
+
openInterest: bigint;
|
|
1459
|
+
};
|
|
1460
|
+
};
|
|
1373
1461
|
message?: undefined;
|
|
1374
1462
|
} | {
|
|
1375
1463
|
code: number;
|
|
@@ -1584,9 +1672,9 @@ declare class Seamless {
|
|
|
1584
1672
|
private account;
|
|
1585
1673
|
private api;
|
|
1586
1674
|
constructor(configManager: ConfigManager, logger: Logger, utils: Utils, account: Account, api: Api);
|
|
1587
|
-
onCheckRelayer(account: string, relayer: string, chainId: number): Promise<
|
|
1675
|
+
onCheckRelayer(account: string, relayer: string, chainId: number): Promise<boolean>;
|
|
1588
1676
|
getUSDPermitParams(deadline: number, chainId: number): Promise<{
|
|
1589
|
-
token: string | ethers.Addressable;
|
|
1677
|
+
token: string | ethers$1.Addressable;
|
|
1590
1678
|
owner: string;
|
|
1591
1679
|
spender: string;
|
|
1592
1680
|
value: bigint;
|
|
@@ -1603,7 +1691,7 @@ declare class Seamless {
|
|
|
1603
1691
|
deadline: number;
|
|
1604
1692
|
data: string;
|
|
1605
1693
|
nonce: string;
|
|
1606
|
-
}, chainId: number, provider?: ethers.Signer): Promise<ApiResponse<any>>;
|
|
1694
|
+
}, chainId: number, provider?: ethers$1.Signer): Promise<ApiResponse<any>>;
|
|
1607
1695
|
authorizeSeamlessAccount({ approve, seamlessAddress, chainId }: {
|
|
1608
1696
|
approve: boolean;
|
|
1609
1697
|
seamlessAddress: string;
|
|
@@ -1625,7 +1713,7 @@ declare class Seamless {
|
|
|
1625
1713
|
data: {
|
|
1626
1714
|
masterAddress: string;
|
|
1627
1715
|
seamlessAccount: string;
|
|
1628
|
-
authorized:
|
|
1716
|
+
authorized: boolean;
|
|
1629
1717
|
};
|
|
1630
1718
|
}>;
|
|
1631
1719
|
exportSeamlessPrivateKey({ password, apiKey }: {
|
|
@@ -1644,9 +1732,9 @@ declare class Seamless {
|
|
|
1644
1732
|
}): Promise<{
|
|
1645
1733
|
code: number;
|
|
1646
1734
|
data: {
|
|
1647
|
-
masterAddress:
|
|
1735
|
+
masterAddress: string;
|
|
1648
1736
|
seamlessAccount: string;
|
|
1649
|
-
authorized:
|
|
1737
|
+
authorized: boolean;
|
|
1650
1738
|
apiKey: string;
|
|
1651
1739
|
};
|
|
1652
1740
|
}>;
|
|
@@ -1666,7 +1754,7 @@ declare class Seamless {
|
|
|
1666
1754
|
data: {
|
|
1667
1755
|
masterAddress: string;
|
|
1668
1756
|
seamlessAccount: string;
|
|
1669
|
-
authorized:
|
|
1757
|
+
authorized: boolean;
|
|
1670
1758
|
apiKey: string;
|
|
1671
1759
|
};
|
|
1672
1760
|
message?: undefined;
|
|
@@ -1756,13 +1844,13 @@ declare class Order {
|
|
|
1756
1844
|
message: string;
|
|
1757
1845
|
data: {
|
|
1758
1846
|
success: boolean;
|
|
1759
|
-
transactionHash:
|
|
1760
|
-
blockNumber:
|
|
1761
|
-
gasUsed:
|
|
1847
|
+
transactionHash: string;
|
|
1848
|
+
blockNumber: number | undefined;
|
|
1849
|
+
gasUsed: string | undefined;
|
|
1762
1850
|
status: string;
|
|
1763
1851
|
confirmations: number;
|
|
1764
1852
|
timestamp: number;
|
|
1765
|
-
receipt:
|
|
1853
|
+
receipt: ethers$1.ContractTransactionReceipt | null;
|
|
1766
1854
|
};
|
|
1767
1855
|
} | {
|
|
1768
1856
|
code: number;
|
|
@@ -1783,13 +1871,13 @@ declare class Order {
|
|
|
1783
1871
|
} | {
|
|
1784
1872
|
code: number;
|
|
1785
1873
|
message: string;
|
|
1786
|
-
transactionHash:
|
|
1787
|
-
blockNumber:
|
|
1788
|
-
gasUsed:
|
|
1874
|
+
transactionHash: string;
|
|
1875
|
+
blockNumber: number | undefined;
|
|
1876
|
+
gasUsed: string | undefined;
|
|
1789
1877
|
status: string;
|
|
1790
1878
|
confirmations: number;
|
|
1791
1879
|
timestamp: number;
|
|
1792
|
-
receipt:
|
|
1880
|
+
receipt: ethers$1.ContractTransactionReceipt | null;
|
|
1793
1881
|
data?: undefined;
|
|
1794
1882
|
} | {
|
|
1795
1883
|
code: number;
|
|
@@ -1812,13 +1900,13 @@ declare class Order {
|
|
|
1812
1900
|
message: string;
|
|
1813
1901
|
data: {
|
|
1814
1902
|
success: boolean;
|
|
1815
|
-
transactionHash:
|
|
1816
|
-
blockNumber:
|
|
1817
|
-
gasUsed:
|
|
1903
|
+
transactionHash: string;
|
|
1904
|
+
blockNumber: number | undefined;
|
|
1905
|
+
gasUsed: string | undefined;
|
|
1818
1906
|
status: string;
|
|
1819
1907
|
confirmations: number;
|
|
1820
1908
|
timestamp: number;
|
|
1821
|
-
receipt:
|
|
1909
|
+
receipt: ethers$1.ContractTransactionReceipt | null;
|
|
1822
1910
|
};
|
|
1823
1911
|
} | {
|
|
1824
1912
|
code: number;
|
|
@@ -1834,13 +1922,13 @@ declare class Order {
|
|
|
1834
1922
|
message: string;
|
|
1835
1923
|
data: {
|
|
1836
1924
|
success: boolean;
|
|
1837
|
-
transactionHash:
|
|
1838
|
-
blockNumber:
|
|
1839
|
-
gasUsed:
|
|
1925
|
+
transactionHash: string;
|
|
1926
|
+
blockNumber: number | undefined;
|
|
1927
|
+
gasUsed: string | undefined;
|
|
1840
1928
|
status: string;
|
|
1841
1929
|
confirmations: number;
|
|
1842
1930
|
timestamp: number;
|
|
1843
|
-
receipt:
|
|
1931
|
+
receipt: ethers$1.ContractTransactionReceipt | null;
|
|
1844
1932
|
};
|
|
1845
1933
|
} | {
|
|
1846
1934
|
code: number;
|
|
@@ -1866,7 +1954,7 @@ declare class Order {
|
|
|
1866
1954
|
}>;
|
|
1867
1955
|
updateOrderTpSl(params: UpdateOrderParams, quoteAddress: string, chainId: number): Promise<{
|
|
1868
1956
|
code: number;
|
|
1869
|
-
data:
|
|
1957
|
+
data: ethers$1.ContractTransactionReceipt | null;
|
|
1870
1958
|
message: string;
|
|
1871
1959
|
} | {
|
|
1872
1960
|
code: number;
|
|
@@ -1888,6 +1976,1367 @@ declare class Order {
|
|
|
1888
1976
|
}>;
|
|
1889
1977
|
}
|
|
1890
1978
|
|
|
1979
|
+
interface TypedDeferredTopicFilter<_TCEvent extends TypedContractEvent> extends DeferredTopicFilter {
|
|
1980
|
+
}
|
|
1981
|
+
interface TypedContractEvent<InputTuple extends Array<any> = any, OutputTuple extends Array<any> = any, OutputObject = any> {
|
|
1982
|
+
(...args: Partial<InputTuple>): TypedDeferredTopicFilter<TypedContractEvent<InputTuple, OutputTuple, OutputObject>>;
|
|
1983
|
+
name: string;
|
|
1984
|
+
fragment: EventFragment;
|
|
1985
|
+
getFragment(...args: Partial<InputTuple>): EventFragment;
|
|
1986
|
+
}
|
|
1987
|
+
type __TypechainAOutputTuple<T> = T extends TypedContractEvent<infer _U, infer W> ? W : never;
|
|
1988
|
+
type __TypechainOutputObject<T> = T extends TypedContractEvent<infer _U, infer _W, infer V> ? V : never;
|
|
1989
|
+
interface TypedEventLog<TCEvent extends TypedContractEvent> extends Omit<EventLog, "args"> {
|
|
1990
|
+
args: __TypechainAOutputTuple<TCEvent> & __TypechainOutputObject<TCEvent>;
|
|
1991
|
+
}
|
|
1992
|
+
interface TypedLogDescription<TCEvent extends TypedContractEvent> extends Omit<LogDescription, "args"> {
|
|
1993
|
+
args: __TypechainAOutputTuple<TCEvent> & __TypechainOutputObject<TCEvent>;
|
|
1994
|
+
}
|
|
1995
|
+
type TypedListener<TCEvent extends TypedContractEvent> = (...listenerArg: [
|
|
1996
|
+
...__TypechainAOutputTuple<TCEvent>,
|
|
1997
|
+
TypedEventLog<TCEvent>,
|
|
1998
|
+
...undefined[]
|
|
1999
|
+
]) => void;
|
|
2000
|
+
type StateMutability = "nonpayable" | "payable" | "view";
|
|
2001
|
+
type BaseOverrides = Omit<TransactionRequest, "to" | "data">;
|
|
2002
|
+
type NonPayableOverrides = Omit<BaseOverrides, "value" | "blockTag" | "enableCcipRead">;
|
|
2003
|
+
type PayableOverrides = Omit<BaseOverrides, "blockTag" | "enableCcipRead">;
|
|
2004
|
+
type ViewOverrides = Omit<TransactionRequest, "to" | "data">;
|
|
2005
|
+
type Overrides<S extends StateMutability> = S extends "nonpayable" ? NonPayableOverrides : S extends "payable" ? PayableOverrides : ViewOverrides;
|
|
2006
|
+
type PostfixOverrides<A extends Array<any>, S extends StateMutability> = A | [...A, Overrides<S>];
|
|
2007
|
+
type ContractMethodArgs<A extends Array<any>, S extends StateMutability> = PostfixOverrides<{
|
|
2008
|
+
[I in keyof A]-?: A[I] | Typed;
|
|
2009
|
+
}, S>;
|
|
2010
|
+
type DefaultReturnType<R> = R extends Array<any> ? R[0] : R;
|
|
2011
|
+
interface TypedContractMethod<A extends Array<any> = Array<any>, R = any, S extends StateMutability = "payable"> {
|
|
2012
|
+
(...args: ContractMethodArgs<A, S>): S extends "view" ? Promise<DefaultReturnType<R>> : Promise<ContractTransactionResponse>;
|
|
2013
|
+
name: string;
|
|
2014
|
+
fragment: FunctionFragment;
|
|
2015
|
+
getFragment(...args: ContractMethodArgs<A, S>): FunctionFragment;
|
|
2016
|
+
populateTransaction(...args: ContractMethodArgs<A, S>): Promise<ContractTransaction>;
|
|
2017
|
+
staticCall(...args: ContractMethodArgs<A, "view">): Promise<DefaultReturnType<R>>;
|
|
2018
|
+
send(...args: ContractMethodArgs<A, S>): Promise<ContractTransactionResponse>;
|
|
2019
|
+
estimateGas(...args: ContractMethodArgs<A, S>): Promise<bigint>;
|
|
2020
|
+
staticCallResult(...args: ContractMethodArgs<A, "view">): Promise<R>;
|
|
2021
|
+
}
|
|
2022
|
+
|
|
2023
|
+
interface BrokerInterface extends Interface {
|
|
2024
|
+
getFunction(nameOrSignature: "FEE_TYPEHASH" | "__ERC2771ContextUpgradeable_init" | "acceptOwnership" | "activeFeeTiers" | "activeSpecialFeeTierList" | "addressManager" | "adjustCollateral" | "batchSetSpecialFeeTiers" | "batchUpdateFeeTiers" | "cancelOrder" | "cancelOrders" | "claimRebate" | "claimRebates" | "eip712Domain" | "getAddOnFeeTier" | "getBaseFeeRate" | "getSpecialFeeTier" | "getUserFeeRate" | "initialize" | "isActive" | "isTrustedForwarder" | "name" | "onBrokerFee" | "owner" | "pendingOwner" | "placeOrderWithPosition" | "placeOrderWithSalt" | "placeOrdersWithPosition" | "placeOrdersWithSalt" | "renounceOwnership" | "setSigner" | "setSpecialFeeTier" | "setUserFeeData" | "setUserSpecialFeeTier" | "supportedAssetClasses" | "transferOwnership" | "trustedForwarder" | "updateBaseFeeRates" | "updateBrokerStatus" | "updateFeeTier" | "updateFeeTiers" | "updateOrder" | "updatePriceAndAdjustCollateral" | "userFeeData" | "userNonces" | "userRebates"): FunctionFragment;
|
|
2025
|
+
getEvent(nameOrSignatureOrTopic: "BrokerStatusUpdated" | "EIP712DomainChanged" | "Initialized" | "OwnershipTransferStarted" | "OwnershipTransferred" | "RebateClaimed" | "SignerUpdated" | "UserFeeDataUpdated"): EventFragment;
|
|
2026
|
+
encodeFunctionData(functionFragment: "FEE_TYPEHASH", values?: undefined): string;
|
|
2027
|
+
encodeFunctionData(functionFragment: "__ERC2771ContextUpgradeable_init", values: [AddressLike]): string;
|
|
2028
|
+
encodeFunctionData(functionFragment: "acceptOwnership", values?: undefined): string;
|
|
2029
|
+
encodeFunctionData(functionFragment: "activeFeeTiers", values: [BigNumberish, BigNumberish]): string;
|
|
2030
|
+
encodeFunctionData(functionFragment: "activeSpecialFeeTierList", values: [BigNumberish, BigNumberish]): string;
|
|
2031
|
+
encodeFunctionData(functionFragment: "addressManager", values?: undefined): string;
|
|
2032
|
+
encodeFunctionData(functionFragment: "adjustCollateral", values: [
|
|
2033
|
+
{
|
|
2034
|
+
token: AddressLike;
|
|
2035
|
+
amount: BigNumberish;
|
|
2036
|
+
},
|
|
2037
|
+
BytesLike,
|
|
2038
|
+
BigNumberish
|
|
2039
|
+
]): string;
|
|
2040
|
+
encodeFunctionData(functionFragment: "batchSetSpecialFeeTiers", values: [
|
|
2041
|
+
{
|
|
2042
|
+
assetClass: BigNumberish;
|
|
2043
|
+
riskTier: BigNumberish;
|
|
2044
|
+
feeTier: BigNumberish;
|
|
2045
|
+
makerFeeRate: BigNumberish;
|
|
2046
|
+
takerFeeRate: BigNumberish;
|
|
2047
|
+
}[]
|
|
2048
|
+
]): string;
|
|
2049
|
+
encodeFunctionData(functionFragment: "batchUpdateFeeTiers", values: [
|
|
2050
|
+
{
|
|
2051
|
+
assetClass: BigNumberish;
|
|
2052
|
+
riskTier: BigNumberish;
|
|
2053
|
+
feeTier: BigNumberish;
|
|
2054
|
+
addOnFeeRate: {
|
|
2055
|
+
takerFeeRate: BigNumberish;
|
|
2056
|
+
makerFeeRate: BigNumberish;
|
|
2057
|
+
};
|
|
2058
|
+
}[]
|
|
2059
|
+
]): string;
|
|
2060
|
+
encodeFunctionData(functionFragment: "cancelOrder", values: [BigNumberish]): string;
|
|
2061
|
+
encodeFunctionData(functionFragment: "cancelOrders", values: [BigNumberish[]]): string;
|
|
2062
|
+
encodeFunctionData(functionFragment: "claimRebate", values: [AddressLike]): string;
|
|
2063
|
+
encodeFunctionData(functionFragment: "claimRebates", values: [AddressLike[]]): string;
|
|
2064
|
+
encodeFunctionData(functionFragment: "eip712Domain", values?: undefined): string;
|
|
2065
|
+
encodeFunctionData(functionFragment: "getAddOnFeeTier", values: [BigNumberish, BigNumberish, BigNumberish]): string;
|
|
2066
|
+
encodeFunctionData(functionFragment: "getBaseFeeRate", values: [BigNumberish]): string;
|
|
2067
|
+
encodeFunctionData(functionFragment: "getSpecialFeeTier", values: [BigNumberish, BigNumberish, BigNumberish]): string;
|
|
2068
|
+
encodeFunctionData(functionFragment: "getUserFeeRate", values: [AddressLike, BigNumberish, BigNumberish]): string;
|
|
2069
|
+
encodeFunctionData(functionFragment: "initialize", values: [
|
|
2070
|
+
AddressLike,
|
|
2071
|
+
AddressLike,
|
|
2072
|
+
string,
|
|
2073
|
+
AddressLike[],
|
|
2074
|
+
BigNumberish[],
|
|
2075
|
+
{
|
|
2076
|
+
takerFeeRate: BigNumberish;
|
|
2077
|
+
makerFeeRate: BigNumberish;
|
|
2078
|
+
}[]
|
|
2079
|
+
]): string;
|
|
2080
|
+
encodeFunctionData(functionFragment: "isActive", values?: undefined): string;
|
|
2081
|
+
encodeFunctionData(functionFragment: "isTrustedForwarder", values: [AddressLike]): string;
|
|
2082
|
+
encodeFunctionData(functionFragment: "name", values?: undefined): string;
|
|
2083
|
+
encodeFunctionData(functionFragment: "onBrokerFee", values: [BytesLike, AddressLike, AddressLike, BigNumberish]): string;
|
|
2084
|
+
encodeFunctionData(functionFragment: "owner", values?: undefined): string;
|
|
2085
|
+
encodeFunctionData(functionFragment: "pendingOwner", values?: undefined): string;
|
|
2086
|
+
encodeFunctionData(functionFragment: "placeOrderWithPosition", values: [
|
|
2087
|
+
BytesLike,
|
|
2088
|
+
{
|
|
2089
|
+
token: AddressLike;
|
|
2090
|
+
amount: BigNumberish;
|
|
2091
|
+
},
|
|
2092
|
+
{
|
|
2093
|
+
user: AddressLike;
|
|
2094
|
+
poolId: BytesLike;
|
|
2095
|
+
orderType: BigNumberish;
|
|
2096
|
+
triggerType: BigNumberish;
|
|
2097
|
+
operation: BigNumberish;
|
|
2098
|
+
direction: BigNumberish;
|
|
2099
|
+
collateralAmount: BigNumberish;
|
|
2100
|
+
size: BigNumberish;
|
|
2101
|
+
price: BigNumberish;
|
|
2102
|
+
timeInForce: BigNumberish;
|
|
2103
|
+
postOnly: boolean;
|
|
2104
|
+
slippagePct: BigNumberish;
|
|
2105
|
+
leverage: BigNumberish;
|
|
2106
|
+
tpSize: BigNumberish;
|
|
2107
|
+
tpPrice: BigNumberish;
|
|
2108
|
+
slSize: BigNumberish;
|
|
2109
|
+
slPrice: BigNumberish;
|
|
2110
|
+
}
|
|
2111
|
+
]): string;
|
|
2112
|
+
encodeFunctionData(functionFragment: "placeOrderWithSalt", values: [
|
|
2113
|
+
BigNumberish,
|
|
2114
|
+
{
|
|
2115
|
+
token: AddressLike;
|
|
2116
|
+
amount: BigNumberish;
|
|
2117
|
+
},
|
|
2118
|
+
{
|
|
2119
|
+
user: AddressLike;
|
|
2120
|
+
poolId: BytesLike;
|
|
2121
|
+
orderType: BigNumberish;
|
|
2122
|
+
triggerType: BigNumberish;
|
|
2123
|
+
operation: BigNumberish;
|
|
2124
|
+
direction: BigNumberish;
|
|
2125
|
+
collateralAmount: BigNumberish;
|
|
2126
|
+
size: BigNumberish;
|
|
2127
|
+
price: BigNumberish;
|
|
2128
|
+
timeInForce: BigNumberish;
|
|
2129
|
+
postOnly: boolean;
|
|
2130
|
+
slippagePct: BigNumberish;
|
|
2131
|
+
leverage: BigNumberish;
|
|
2132
|
+
tpSize: BigNumberish;
|
|
2133
|
+
tpPrice: BigNumberish;
|
|
2134
|
+
slSize: BigNumberish;
|
|
2135
|
+
slPrice: BigNumberish;
|
|
2136
|
+
}
|
|
2137
|
+
]): string;
|
|
2138
|
+
encodeFunctionData(functionFragment: "placeOrdersWithPosition", values: [
|
|
2139
|
+
{
|
|
2140
|
+
token: AddressLike;
|
|
2141
|
+
amount: BigNumberish;
|
|
2142
|
+
},
|
|
2143
|
+
BytesLike[],
|
|
2144
|
+
{
|
|
2145
|
+
user: AddressLike;
|
|
2146
|
+
poolId: BytesLike;
|
|
2147
|
+
orderType: BigNumberish;
|
|
2148
|
+
triggerType: BigNumberish;
|
|
2149
|
+
operation: BigNumberish;
|
|
2150
|
+
direction: BigNumberish;
|
|
2151
|
+
collateralAmount: BigNumberish;
|
|
2152
|
+
size: BigNumberish;
|
|
2153
|
+
price: BigNumberish;
|
|
2154
|
+
timeInForce: BigNumberish;
|
|
2155
|
+
postOnly: boolean;
|
|
2156
|
+
slippagePct: BigNumberish;
|
|
2157
|
+
leverage: BigNumberish;
|
|
2158
|
+
tpSize: BigNumberish;
|
|
2159
|
+
tpPrice: BigNumberish;
|
|
2160
|
+
slSize: BigNumberish;
|
|
2161
|
+
slPrice: BigNumberish;
|
|
2162
|
+
}[]
|
|
2163
|
+
]): string;
|
|
2164
|
+
encodeFunctionData(functionFragment: "placeOrdersWithSalt", values: [
|
|
2165
|
+
{
|
|
2166
|
+
token: AddressLike;
|
|
2167
|
+
amount: BigNumberish;
|
|
2168
|
+
},
|
|
2169
|
+
BigNumberish[],
|
|
2170
|
+
{
|
|
2171
|
+
user: AddressLike;
|
|
2172
|
+
poolId: BytesLike;
|
|
2173
|
+
orderType: BigNumberish;
|
|
2174
|
+
triggerType: BigNumberish;
|
|
2175
|
+
operation: BigNumberish;
|
|
2176
|
+
direction: BigNumberish;
|
|
2177
|
+
collateralAmount: BigNumberish;
|
|
2178
|
+
size: BigNumberish;
|
|
2179
|
+
price: BigNumberish;
|
|
2180
|
+
timeInForce: BigNumberish;
|
|
2181
|
+
postOnly: boolean;
|
|
2182
|
+
slippagePct: BigNumberish;
|
|
2183
|
+
leverage: BigNumberish;
|
|
2184
|
+
tpSize: BigNumberish;
|
|
2185
|
+
tpPrice: BigNumberish;
|
|
2186
|
+
slSize: BigNumberish;
|
|
2187
|
+
slPrice: BigNumberish;
|
|
2188
|
+
}[]
|
|
2189
|
+
]): string;
|
|
2190
|
+
encodeFunctionData(functionFragment: "renounceOwnership", values?: undefined): string;
|
|
2191
|
+
encodeFunctionData(functionFragment: "setSigner", values: [AddressLike, boolean]): string;
|
|
2192
|
+
encodeFunctionData(functionFragment: "setSpecialFeeTier", values: [
|
|
2193
|
+
{
|
|
2194
|
+
assetClass: BigNumberish;
|
|
2195
|
+
riskTier: BigNumberish;
|
|
2196
|
+
feeTier: BigNumberish;
|
|
2197
|
+
makerFeeRate: BigNumberish;
|
|
2198
|
+
takerFeeRate: BigNumberish;
|
|
2199
|
+
}
|
|
2200
|
+
]): string;
|
|
2201
|
+
encodeFunctionData(functionFragment: "setUserFeeData", values: [
|
|
2202
|
+
{
|
|
2203
|
+
user: AddressLike;
|
|
2204
|
+
nonce: BigNumberish;
|
|
2205
|
+
deadline: BigNumberish;
|
|
2206
|
+
feeData: {
|
|
2207
|
+
tier: BigNumberish;
|
|
2208
|
+
referrer: AddressLike;
|
|
2209
|
+
totalReferralRebatePct: BigNumberish;
|
|
2210
|
+
referrerRebatePct: BigNumberish;
|
|
2211
|
+
};
|
|
2212
|
+
signature: BytesLike;
|
|
2213
|
+
}
|
|
2214
|
+
]): string;
|
|
2215
|
+
encodeFunctionData(functionFragment: "setUserSpecialFeeTier", values: [AddressLike, BigNumberish]): string;
|
|
2216
|
+
encodeFunctionData(functionFragment: "supportedAssetClasses", values?: undefined): string;
|
|
2217
|
+
encodeFunctionData(functionFragment: "transferOwnership", values: [AddressLike]): string;
|
|
2218
|
+
encodeFunctionData(functionFragment: "trustedForwarder", values?: undefined): string;
|
|
2219
|
+
encodeFunctionData(functionFragment: "updateBaseFeeRates", values: [
|
|
2220
|
+
{
|
|
2221
|
+
assetClass: BigNumberish;
|
|
2222
|
+
isEnable: boolean;
|
|
2223
|
+
baseFeeRate: {
|
|
2224
|
+
takerFeeRate: BigNumberish;
|
|
2225
|
+
makerFeeRate: BigNumberish;
|
|
2226
|
+
};
|
|
2227
|
+
}[]
|
|
2228
|
+
]): string;
|
|
2229
|
+
encodeFunctionData(functionFragment: "updateBrokerStatus", values: [boolean]): string;
|
|
2230
|
+
encodeFunctionData(functionFragment: "updateFeeTier", values: [
|
|
2231
|
+
BigNumberish,
|
|
2232
|
+
BigNumberish,
|
|
2233
|
+
BigNumberish,
|
|
2234
|
+
{
|
|
2235
|
+
takerFeeRate: BigNumberish;
|
|
2236
|
+
makerFeeRate: BigNumberish;
|
|
2237
|
+
}
|
|
2238
|
+
]): string;
|
|
2239
|
+
encodeFunctionData(functionFragment: "updateFeeTiers", values: [
|
|
2240
|
+
BigNumberish,
|
|
2241
|
+
BigNumberish,
|
|
2242
|
+
BigNumberish[],
|
|
2243
|
+
{
|
|
2244
|
+
takerFeeRate: BigNumberish;
|
|
2245
|
+
makerFeeRate: BigNumberish;
|
|
2246
|
+
}[]
|
|
2247
|
+
]): string;
|
|
2248
|
+
encodeFunctionData(functionFragment: "updateOrder", values: [
|
|
2249
|
+
{
|
|
2250
|
+
token: AddressLike;
|
|
2251
|
+
amount: BigNumberish;
|
|
2252
|
+
},
|
|
2253
|
+
{
|
|
2254
|
+
orderId: BigNumberish;
|
|
2255
|
+
size: BigNumberish;
|
|
2256
|
+
price: BigNumberish;
|
|
2257
|
+
tpsl: {
|
|
2258
|
+
tpSize: BigNumberish;
|
|
2259
|
+
tpPrice: BigNumberish;
|
|
2260
|
+
slSize: BigNumberish;
|
|
2261
|
+
slPrice: BigNumberish;
|
|
2262
|
+
};
|
|
2263
|
+
}
|
|
2264
|
+
]): string;
|
|
2265
|
+
encodeFunctionData(functionFragment: "updatePriceAndAdjustCollateral", values: [
|
|
2266
|
+
{
|
|
2267
|
+
poolId: BytesLike;
|
|
2268
|
+
oracleType: BigNumberish;
|
|
2269
|
+
referencePrice: BigNumberish;
|
|
2270
|
+
oracleUpdateData: BytesLike;
|
|
2271
|
+
publishTime: BigNumberish;
|
|
2272
|
+
}[],
|
|
2273
|
+
{
|
|
2274
|
+
token: AddressLike;
|
|
2275
|
+
amount: BigNumberish;
|
|
2276
|
+
},
|
|
2277
|
+
BytesLike,
|
|
2278
|
+
BigNumberish
|
|
2279
|
+
]): string;
|
|
2280
|
+
encodeFunctionData(functionFragment: "userFeeData", values: [AddressLike]): string;
|
|
2281
|
+
encodeFunctionData(functionFragment: "userNonces", values: [AddressLike]): string;
|
|
2282
|
+
encodeFunctionData(functionFragment: "userRebates", values: [AddressLike, AddressLike]): string;
|
|
2283
|
+
decodeFunctionResult(functionFragment: "FEE_TYPEHASH", data: BytesLike): Result;
|
|
2284
|
+
decodeFunctionResult(functionFragment: "__ERC2771ContextUpgradeable_init", data: BytesLike): Result;
|
|
2285
|
+
decodeFunctionResult(functionFragment: "acceptOwnership", data: BytesLike): Result;
|
|
2286
|
+
decodeFunctionResult(functionFragment: "activeFeeTiers", data: BytesLike): Result;
|
|
2287
|
+
decodeFunctionResult(functionFragment: "activeSpecialFeeTierList", data: BytesLike): Result;
|
|
2288
|
+
decodeFunctionResult(functionFragment: "addressManager", data: BytesLike): Result;
|
|
2289
|
+
decodeFunctionResult(functionFragment: "adjustCollateral", data: BytesLike): Result;
|
|
2290
|
+
decodeFunctionResult(functionFragment: "batchSetSpecialFeeTiers", data: BytesLike): Result;
|
|
2291
|
+
decodeFunctionResult(functionFragment: "batchUpdateFeeTiers", data: BytesLike): Result;
|
|
2292
|
+
decodeFunctionResult(functionFragment: "cancelOrder", data: BytesLike): Result;
|
|
2293
|
+
decodeFunctionResult(functionFragment: "cancelOrders", data: BytesLike): Result;
|
|
2294
|
+
decodeFunctionResult(functionFragment: "claimRebate", data: BytesLike): Result;
|
|
2295
|
+
decodeFunctionResult(functionFragment: "claimRebates", data: BytesLike): Result;
|
|
2296
|
+
decodeFunctionResult(functionFragment: "eip712Domain", data: BytesLike): Result;
|
|
2297
|
+
decodeFunctionResult(functionFragment: "getAddOnFeeTier", data: BytesLike): Result;
|
|
2298
|
+
decodeFunctionResult(functionFragment: "getBaseFeeRate", data: BytesLike): Result;
|
|
2299
|
+
decodeFunctionResult(functionFragment: "getSpecialFeeTier", data: BytesLike): Result;
|
|
2300
|
+
decodeFunctionResult(functionFragment: "getUserFeeRate", data: BytesLike): Result;
|
|
2301
|
+
decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result;
|
|
2302
|
+
decodeFunctionResult(functionFragment: "isActive", data: BytesLike): Result;
|
|
2303
|
+
decodeFunctionResult(functionFragment: "isTrustedForwarder", data: BytesLike): Result;
|
|
2304
|
+
decodeFunctionResult(functionFragment: "name", data: BytesLike): Result;
|
|
2305
|
+
decodeFunctionResult(functionFragment: "onBrokerFee", data: BytesLike): Result;
|
|
2306
|
+
decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result;
|
|
2307
|
+
decodeFunctionResult(functionFragment: "pendingOwner", data: BytesLike): Result;
|
|
2308
|
+
decodeFunctionResult(functionFragment: "placeOrderWithPosition", data: BytesLike): Result;
|
|
2309
|
+
decodeFunctionResult(functionFragment: "placeOrderWithSalt", data: BytesLike): Result;
|
|
2310
|
+
decodeFunctionResult(functionFragment: "placeOrdersWithPosition", data: BytesLike): Result;
|
|
2311
|
+
decodeFunctionResult(functionFragment: "placeOrdersWithSalt", data: BytesLike): Result;
|
|
2312
|
+
decodeFunctionResult(functionFragment: "renounceOwnership", data: BytesLike): Result;
|
|
2313
|
+
decodeFunctionResult(functionFragment: "setSigner", data: BytesLike): Result;
|
|
2314
|
+
decodeFunctionResult(functionFragment: "setSpecialFeeTier", data: BytesLike): Result;
|
|
2315
|
+
decodeFunctionResult(functionFragment: "setUserFeeData", data: BytesLike): Result;
|
|
2316
|
+
decodeFunctionResult(functionFragment: "setUserSpecialFeeTier", data: BytesLike): Result;
|
|
2317
|
+
decodeFunctionResult(functionFragment: "supportedAssetClasses", data: BytesLike): Result;
|
|
2318
|
+
decodeFunctionResult(functionFragment: "transferOwnership", data: BytesLike): Result;
|
|
2319
|
+
decodeFunctionResult(functionFragment: "trustedForwarder", data: BytesLike): Result;
|
|
2320
|
+
decodeFunctionResult(functionFragment: "updateBaseFeeRates", data: BytesLike): Result;
|
|
2321
|
+
decodeFunctionResult(functionFragment: "updateBrokerStatus", data: BytesLike): Result;
|
|
2322
|
+
decodeFunctionResult(functionFragment: "updateFeeTier", data: BytesLike): Result;
|
|
2323
|
+
decodeFunctionResult(functionFragment: "updateFeeTiers", data: BytesLike): Result;
|
|
2324
|
+
decodeFunctionResult(functionFragment: "updateOrder", data: BytesLike): Result;
|
|
2325
|
+
decodeFunctionResult(functionFragment: "updatePriceAndAdjustCollateral", data: BytesLike): Result;
|
|
2326
|
+
decodeFunctionResult(functionFragment: "userFeeData", data: BytesLike): Result;
|
|
2327
|
+
decodeFunctionResult(functionFragment: "userNonces", data: BytesLike): Result;
|
|
2328
|
+
decodeFunctionResult(functionFragment: "userRebates", data: BytesLike): Result;
|
|
2329
|
+
}
|
|
2330
|
+
declare namespace BrokerStatusUpdatedEvent {
|
|
2331
|
+
type InputTuple = [broker: AddressLike, isActive: boolean];
|
|
2332
|
+
type OutputTuple = [broker: string, isActive: boolean];
|
|
2333
|
+
interface OutputObject {
|
|
2334
|
+
broker: string;
|
|
2335
|
+
isActive: boolean;
|
|
2336
|
+
}
|
|
2337
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
2338
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
2339
|
+
type Log = TypedEventLog<Event>;
|
|
2340
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
2341
|
+
}
|
|
2342
|
+
declare namespace EIP712DomainChangedEvent {
|
|
2343
|
+
type InputTuple = [];
|
|
2344
|
+
type OutputTuple = [];
|
|
2345
|
+
interface OutputObject {
|
|
2346
|
+
}
|
|
2347
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
2348
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
2349
|
+
type Log = TypedEventLog<Event>;
|
|
2350
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
2351
|
+
}
|
|
2352
|
+
declare namespace InitializedEvent {
|
|
2353
|
+
type InputTuple = [version: BigNumberish];
|
|
2354
|
+
type OutputTuple = [version: bigint];
|
|
2355
|
+
interface OutputObject {
|
|
2356
|
+
version: bigint;
|
|
2357
|
+
}
|
|
2358
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
2359
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
2360
|
+
type Log = TypedEventLog<Event>;
|
|
2361
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
2362
|
+
}
|
|
2363
|
+
declare namespace OwnershipTransferStartedEvent {
|
|
2364
|
+
type InputTuple = [previousOwner: AddressLike, newOwner: AddressLike];
|
|
2365
|
+
type OutputTuple = [previousOwner: string, newOwner: string];
|
|
2366
|
+
interface OutputObject {
|
|
2367
|
+
previousOwner: string;
|
|
2368
|
+
newOwner: string;
|
|
2369
|
+
}
|
|
2370
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
2371
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
2372
|
+
type Log = TypedEventLog<Event>;
|
|
2373
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
2374
|
+
}
|
|
2375
|
+
declare namespace OwnershipTransferredEvent {
|
|
2376
|
+
type InputTuple = [previousOwner: AddressLike, newOwner: AddressLike];
|
|
2377
|
+
type OutputTuple = [previousOwner: string, newOwner: string];
|
|
2378
|
+
interface OutputObject {
|
|
2379
|
+
previousOwner: string;
|
|
2380
|
+
newOwner: string;
|
|
2381
|
+
}
|
|
2382
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
2383
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
2384
|
+
type Log = TypedEventLog<Event>;
|
|
2385
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
2386
|
+
}
|
|
2387
|
+
declare namespace RebateClaimedEvent {
|
|
2388
|
+
type InputTuple = [
|
|
2389
|
+
user: AddressLike,
|
|
2390
|
+
token: AddressLike,
|
|
2391
|
+
amount: BigNumberish
|
|
2392
|
+
];
|
|
2393
|
+
type OutputTuple = [user: string, token: string, amount: bigint];
|
|
2394
|
+
interface OutputObject {
|
|
2395
|
+
user: string;
|
|
2396
|
+
token: string;
|
|
2397
|
+
amount: bigint;
|
|
2398
|
+
}
|
|
2399
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
2400
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
2401
|
+
type Log = TypedEventLog<Event>;
|
|
2402
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
2403
|
+
}
|
|
2404
|
+
declare namespace SignerUpdatedEvent {
|
|
2405
|
+
type InputTuple = [signer: AddressLike, isSigner: boolean];
|
|
2406
|
+
type OutputTuple = [signer: string, isSigner: boolean];
|
|
2407
|
+
interface OutputObject {
|
|
2408
|
+
signer: string;
|
|
2409
|
+
isSigner: boolean;
|
|
2410
|
+
}
|
|
2411
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
2412
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
2413
|
+
type Log = TypedEventLog<Event>;
|
|
2414
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
2415
|
+
}
|
|
2416
|
+
declare namespace UserFeeDataUpdatedEvent {
|
|
2417
|
+
type InputTuple = [
|
|
2418
|
+
broker: AddressLike,
|
|
2419
|
+
signer: AddressLike,
|
|
2420
|
+
user: AddressLike,
|
|
2421
|
+
tier: BigNumberish,
|
|
2422
|
+
referrer: AddressLike,
|
|
2423
|
+
totalReferralRebatePct: BigNumberish,
|
|
2424
|
+
referrerRebatePct: BigNumberish
|
|
2425
|
+
];
|
|
2426
|
+
type OutputTuple = [
|
|
2427
|
+
broker: string,
|
|
2428
|
+
signer: string,
|
|
2429
|
+
user: string,
|
|
2430
|
+
tier: bigint,
|
|
2431
|
+
referrer: string,
|
|
2432
|
+
totalReferralRebatePct: bigint,
|
|
2433
|
+
referrerRebatePct: bigint
|
|
2434
|
+
];
|
|
2435
|
+
interface OutputObject {
|
|
2436
|
+
broker: string;
|
|
2437
|
+
signer: string;
|
|
2438
|
+
user: string;
|
|
2439
|
+
tier: bigint;
|
|
2440
|
+
referrer: string;
|
|
2441
|
+
totalReferralRebatePct: bigint;
|
|
2442
|
+
referrerRebatePct: bigint;
|
|
2443
|
+
}
|
|
2444
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
2445
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
2446
|
+
type Log = TypedEventLog<Event>;
|
|
2447
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
2448
|
+
}
|
|
2449
|
+
interface Broker extends BaseContract {
|
|
2450
|
+
connect(runner?: ContractRunner | null): Broker;
|
|
2451
|
+
waitForDeployment(): Promise<this>;
|
|
2452
|
+
interface: BrokerInterface;
|
|
2453
|
+
queryFilter<TCEvent extends TypedContractEvent>(event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>;
|
|
2454
|
+
queryFilter<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>;
|
|
2455
|
+
on<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
|
|
2456
|
+
on<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>;
|
|
2457
|
+
once<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
|
|
2458
|
+
once<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>;
|
|
2459
|
+
listeners<TCEvent extends TypedContractEvent>(event: TCEvent): Promise<Array<TypedListener<TCEvent>>>;
|
|
2460
|
+
listeners(eventName?: string): Promise<Array<Listener>>;
|
|
2461
|
+
removeAllListeners<TCEvent extends TypedContractEvent>(event?: TCEvent): Promise<this>;
|
|
2462
|
+
FEE_TYPEHASH: TypedContractMethod<[], [string], "view">;
|
|
2463
|
+
__ERC2771ContextUpgradeable_init: TypedContractMethod<[
|
|
2464
|
+
trustedForwarder_: AddressLike
|
|
2465
|
+
], [
|
|
2466
|
+
void
|
|
2467
|
+
], "nonpayable">;
|
|
2468
|
+
acceptOwnership: TypedContractMethod<[], [void], "nonpayable">;
|
|
2469
|
+
activeFeeTiers: TypedContractMethod<[
|
|
2470
|
+
assetClass: BigNumberish,
|
|
2471
|
+
riskTier: BigNumberish
|
|
2472
|
+
], [
|
|
2473
|
+
bigint[]
|
|
2474
|
+
], "view">;
|
|
2475
|
+
activeSpecialFeeTierList: TypedContractMethod<[
|
|
2476
|
+
assetClass: BigNumberish,
|
|
2477
|
+
riskTier: BigNumberish
|
|
2478
|
+
], [
|
|
2479
|
+
bigint[]
|
|
2480
|
+
], "view">;
|
|
2481
|
+
addressManager: TypedContractMethod<[], [string], "view">;
|
|
2482
|
+
adjustCollateral: TypedContractMethod<[
|
|
2483
|
+
depositParams: {
|
|
2484
|
+
token: AddressLike;
|
|
2485
|
+
amount: BigNumberish;
|
|
2486
|
+
},
|
|
2487
|
+
positionId: BytesLike,
|
|
2488
|
+
adjustAmount: BigNumberish
|
|
2489
|
+
], [
|
|
2490
|
+
void
|
|
2491
|
+
], "nonpayable">;
|
|
2492
|
+
batchSetSpecialFeeTiers: TypedContractMethod<[
|
|
2493
|
+
params: {
|
|
2494
|
+
assetClass: BigNumberish;
|
|
2495
|
+
riskTier: BigNumberish;
|
|
2496
|
+
feeTier: BigNumberish;
|
|
2497
|
+
makerFeeRate: BigNumberish;
|
|
2498
|
+
takerFeeRate: BigNumberish;
|
|
2499
|
+
}[]
|
|
2500
|
+
], [
|
|
2501
|
+
void
|
|
2502
|
+
], "nonpayable">;
|
|
2503
|
+
batchUpdateFeeTiers: TypedContractMethod<[
|
|
2504
|
+
params: {
|
|
2505
|
+
assetClass: BigNumberish;
|
|
2506
|
+
riskTier: BigNumberish;
|
|
2507
|
+
feeTier: BigNumberish;
|
|
2508
|
+
addOnFeeRate: {
|
|
2509
|
+
takerFeeRate: BigNumberish;
|
|
2510
|
+
makerFeeRate: BigNumberish;
|
|
2511
|
+
};
|
|
2512
|
+
}[]
|
|
2513
|
+
], [
|
|
2514
|
+
void
|
|
2515
|
+
], "nonpayable">;
|
|
2516
|
+
cancelOrder: TypedContractMethod<[
|
|
2517
|
+
orderId: BigNumberish
|
|
2518
|
+
], [
|
|
2519
|
+
void
|
|
2520
|
+
], "nonpayable">;
|
|
2521
|
+
cancelOrders: TypedContractMethod<[
|
|
2522
|
+
orderIds: BigNumberish[]
|
|
2523
|
+
], [
|
|
2524
|
+
void
|
|
2525
|
+
], "nonpayable">;
|
|
2526
|
+
claimRebate: TypedContractMethod<[token: AddressLike], [void], "nonpayable">;
|
|
2527
|
+
claimRebates: TypedContractMethod<[
|
|
2528
|
+
tokens: AddressLike[]
|
|
2529
|
+
], [
|
|
2530
|
+
void
|
|
2531
|
+
], "nonpayable">;
|
|
2532
|
+
eip712Domain: TypedContractMethod<[
|
|
2533
|
+
], [
|
|
2534
|
+
[
|
|
2535
|
+
string,
|
|
2536
|
+
string,
|
|
2537
|
+
string,
|
|
2538
|
+
bigint,
|
|
2539
|
+
string,
|
|
2540
|
+
string,
|
|
2541
|
+
bigint[]
|
|
2542
|
+
] & {
|
|
2543
|
+
fields: string;
|
|
2544
|
+
name: string;
|
|
2545
|
+
version: string;
|
|
2546
|
+
chainId: bigint;
|
|
2547
|
+
verifyingContract: string;
|
|
2548
|
+
salt: string;
|
|
2549
|
+
extensions: bigint[];
|
|
2550
|
+
}
|
|
2551
|
+
], "view">;
|
|
2552
|
+
getAddOnFeeTier: TypedContractMethod<[
|
|
2553
|
+
assetClass: BigNumberish,
|
|
2554
|
+
riskTier: BigNumberish,
|
|
2555
|
+
feeTier: BigNumberish
|
|
2556
|
+
], [
|
|
2557
|
+
[bigint, bigint] & {
|
|
2558
|
+
takerFeeRate: bigint;
|
|
2559
|
+
makerFeeRate: bigint;
|
|
2560
|
+
}
|
|
2561
|
+
], "view">;
|
|
2562
|
+
getBaseFeeRate: TypedContractMethod<[
|
|
2563
|
+
assetClass: BigNumberish
|
|
2564
|
+
], [
|
|
2565
|
+
[bigint, bigint] & {
|
|
2566
|
+
takerFeeRate: bigint;
|
|
2567
|
+
makerFeeRate: bigint;
|
|
2568
|
+
}
|
|
2569
|
+
], "view">;
|
|
2570
|
+
getSpecialFeeTier: TypedContractMethod<[
|
|
2571
|
+
assetClass: BigNumberish,
|
|
2572
|
+
riskTier: BigNumberish,
|
|
2573
|
+
feeTier: BigNumberish
|
|
2574
|
+
], [
|
|
2575
|
+
[bigint, bigint] & {
|
|
2576
|
+
makerFeeRate: bigint;
|
|
2577
|
+
takerFeeRate: bigint;
|
|
2578
|
+
}
|
|
2579
|
+
], "view">;
|
|
2580
|
+
getUserFeeRate: TypedContractMethod<[
|
|
2581
|
+
user: AddressLike,
|
|
2582
|
+
assetClass: BigNumberish,
|
|
2583
|
+
riskTier: BigNumberish
|
|
2584
|
+
], [
|
|
2585
|
+
[
|
|
2586
|
+
bigint,
|
|
2587
|
+
bigint,
|
|
2588
|
+
bigint,
|
|
2589
|
+
bigint
|
|
2590
|
+
] & {
|
|
2591
|
+
takerFeeRate: bigint;
|
|
2592
|
+
makerFeeRate: bigint;
|
|
2593
|
+
baseTakerFeeRate: bigint;
|
|
2594
|
+
baseMakerFeeRate: bigint;
|
|
2595
|
+
}
|
|
2596
|
+
], "view">;
|
|
2597
|
+
initialize: TypedContractMethod<[
|
|
2598
|
+
_addressManager: AddressLike,
|
|
2599
|
+
owner: AddressLike,
|
|
2600
|
+
_brokerName: string,
|
|
2601
|
+
brokerSigners: AddressLike[],
|
|
2602
|
+
assetClasses: BigNumberish[],
|
|
2603
|
+
baseFeeRates: {
|
|
2604
|
+
takerFeeRate: BigNumberish;
|
|
2605
|
+
makerFeeRate: BigNumberish;
|
|
2606
|
+
}[]
|
|
2607
|
+
], [
|
|
2608
|
+
void
|
|
2609
|
+
], "nonpayable">;
|
|
2610
|
+
isActive: TypedContractMethod<[], [boolean], "view">;
|
|
2611
|
+
isTrustedForwarder: TypedContractMethod<[
|
|
2612
|
+
forwarder: AddressLike
|
|
2613
|
+
], [
|
|
2614
|
+
boolean
|
|
2615
|
+
], "view">;
|
|
2616
|
+
name: TypedContractMethod<[], [string], "view">;
|
|
2617
|
+
onBrokerFee: TypedContractMethod<[
|
|
2618
|
+
poolId: BytesLike,
|
|
2619
|
+
user: AddressLike,
|
|
2620
|
+
token: AddressLike,
|
|
2621
|
+
feeAmount: BigNumberish
|
|
2622
|
+
], [
|
|
2623
|
+
[
|
|
2624
|
+
bigint,
|
|
2625
|
+
bigint,
|
|
2626
|
+
string
|
|
2627
|
+
] & {
|
|
2628
|
+
totalReferralRebate: bigint;
|
|
2629
|
+
referrerRebate: bigint;
|
|
2630
|
+
referrer: string;
|
|
2631
|
+
}
|
|
2632
|
+
], "nonpayable">;
|
|
2633
|
+
owner: TypedContractMethod<[], [string], "view">;
|
|
2634
|
+
pendingOwner: TypedContractMethod<[], [string], "view">;
|
|
2635
|
+
placeOrderWithPosition: TypedContractMethod<[
|
|
2636
|
+
positionId: BytesLike,
|
|
2637
|
+
depositParams: {
|
|
2638
|
+
token: AddressLike;
|
|
2639
|
+
amount: BigNumberish;
|
|
2640
|
+
},
|
|
2641
|
+
orderParams: {
|
|
2642
|
+
user: AddressLike;
|
|
2643
|
+
poolId: BytesLike;
|
|
2644
|
+
orderType: BigNumberish;
|
|
2645
|
+
triggerType: BigNumberish;
|
|
2646
|
+
operation: BigNumberish;
|
|
2647
|
+
direction: BigNumberish;
|
|
2648
|
+
collateralAmount: BigNumberish;
|
|
2649
|
+
size: BigNumberish;
|
|
2650
|
+
price: BigNumberish;
|
|
2651
|
+
timeInForce: BigNumberish;
|
|
2652
|
+
postOnly: boolean;
|
|
2653
|
+
slippagePct: BigNumberish;
|
|
2654
|
+
leverage: BigNumberish;
|
|
2655
|
+
tpSize: BigNumberish;
|
|
2656
|
+
tpPrice: BigNumberish;
|
|
2657
|
+
slSize: BigNumberish;
|
|
2658
|
+
slPrice: BigNumberish;
|
|
2659
|
+
}
|
|
2660
|
+
], [
|
|
2661
|
+
void
|
|
2662
|
+
], "payable">;
|
|
2663
|
+
placeOrderWithSalt: TypedContractMethod<[
|
|
2664
|
+
userPositionSalt: BigNumberish,
|
|
2665
|
+
depositParams: {
|
|
2666
|
+
token: AddressLike;
|
|
2667
|
+
amount: BigNumberish;
|
|
2668
|
+
},
|
|
2669
|
+
orderParams: {
|
|
2670
|
+
user: AddressLike;
|
|
2671
|
+
poolId: BytesLike;
|
|
2672
|
+
orderType: BigNumberish;
|
|
2673
|
+
triggerType: BigNumberish;
|
|
2674
|
+
operation: BigNumberish;
|
|
2675
|
+
direction: BigNumberish;
|
|
2676
|
+
collateralAmount: BigNumberish;
|
|
2677
|
+
size: BigNumberish;
|
|
2678
|
+
price: BigNumberish;
|
|
2679
|
+
timeInForce: BigNumberish;
|
|
2680
|
+
postOnly: boolean;
|
|
2681
|
+
slippagePct: BigNumberish;
|
|
2682
|
+
leverage: BigNumberish;
|
|
2683
|
+
tpSize: BigNumberish;
|
|
2684
|
+
tpPrice: BigNumberish;
|
|
2685
|
+
slSize: BigNumberish;
|
|
2686
|
+
slPrice: BigNumberish;
|
|
2687
|
+
}
|
|
2688
|
+
], [
|
|
2689
|
+
void
|
|
2690
|
+
], "payable">;
|
|
2691
|
+
placeOrdersWithPosition: TypedContractMethod<[
|
|
2692
|
+
depositParams: {
|
|
2693
|
+
token: AddressLike;
|
|
2694
|
+
amount: BigNumberish;
|
|
2695
|
+
},
|
|
2696
|
+
positionIds: BytesLike[],
|
|
2697
|
+
orderParams: {
|
|
2698
|
+
user: AddressLike;
|
|
2699
|
+
poolId: BytesLike;
|
|
2700
|
+
orderType: BigNumberish;
|
|
2701
|
+
triggerType: BigNumberish;
|
|
2702
|
+
operation: BigNumberish;
|
|
2703
|
+
direction: BigNumberish;
|
|
2704
|
+
collateralAmount: BigNumberish;
|
|
2705
|
+
size: BigNumberish;
|
|
2706
|
+
price: BigNumberish;
|
|
2707
|
+
timeInForce: BigNumberish;
|
|
2708
|
+
postOnly: boolean;
|
|
2709
|
+
slippagePct: BigNumberish;
|
|
2710
|
+
leverage: BigNumberish;
|
|
2711
|
+
tpSize: BigNumberish;
|
|
2712
|
+
tpPrice: BigNumberish;
|
|
2713
|
+
slSize: BigNumberish;
|
|
2714
|
+
slPrice: BigNumberish;
|
|
2715
|
+
}[]
|
|
2716
|
+
], [
|
|
2717
|
+
void
|
|
2718
|
+
], "payable">;
|
|
2719
|
+
placeOrdersWithSalt: TypedContractMethod<[
|
|
2720
|
+
depositParams: {
|
|
2721
|
+
token: AddressLike;
|
|
2722
|
+
amount: BigNumberish;
|
|
2723
|
+
},
|
|
2724
|
+
userPositionSalts: BigNumberish[],
|
|
2725
|
+
orderParams: {
|
|
2726
|
+
user: AddressLike;
|
|
2727
|
+
poolId: BytesLike;
|
|
2728
|
+
orderType: BigNumberish;
|
|
2729
|
+
triggerType: BigNumberish;
|
|
2730
|
+
operation: BigNumberish;
|
|
2731
|
+
direction: BigNumberish;
|
|
2732
|
+
collateralAmount: BigNumberish;
|
|
2733
|
+
size: BigNumberish;
|
|
2734
|
+
price: BigNumberish;
|
|
2735
|
+
timeInForce: BigNumberish;
|
|
2736
|
+
postOnly: boolean;
|
|
2737
|
+
slippagePct: BigNumberish;
|
|
2738
|
+
leverage: BigNumberish;
|
|
2739
|
+
tpSize: BigNumberish;
|
|
2740
|
+
tpPrice: BigNumberish;
|
|
2741
|
+
slSize: BigNumberish;
|
|
2742
|
+
slPrice: BigNumberish;
|
|
2743
|
+
}[]
|
|
2744
|
+
], [
|
|
2745
|
+
void
|
|
2746
|
+
], "payable">;
|
|
2747
|
+
renounceOwnership: TypedContractMethod<[], [void], "nonpayable">;
|
|
2748
|
+
setSigner: TypedContractMethod<[
|
|
2749
|
+
signer: AddressLike,
|
|
2750
|
+
isSigner: boolean
|
|
2751
|
+
], [
|
|
2752
|
+
void
|
|
2753
|
+
], "nonpayable">;
|
|
2754
|
+
setSpecialFeeTier: TypedContractMethod<[
|
|
2755
|
+
params: {
|
|
2756
|
+
assetClass: BigNumberish;
|
|
2757
|
+
riskTier: BigNumberish;
|
|
2758
|
+
feeTier: BigNumberish;
|
|
2759
|
+
makerFeeRate: BigNumberish;
|
|
2760
|
+
takerFeeRate: BigNumberish;
|
|
2761
|
+
}
|
|
2762
|
+
], [
|
|
2763
|
+
void
|
|
2764
|
+
], "nonpayable">;
|
|
2765
|
+
setUserFeeData: TypedContractMethod<[
|
|
2766
|
+
params: {
|
|
2767
|
+
user: AddressLike;
|
|
2768
|
+
nonce: BigNumberish;
|
|
2769
|
+
deadline: BigNumberish;
|
|
2770
|
+
feeData: {
|
|
2771
|
+
tier: BigNumberish;
|
|
2772
|
+
referrer: AddressLike;
|
|
2773
|
+
totalReferralRebatePct: BigNumberish;
|
|
2774
|
+
referrerRebatePct: BigNumberish;
|
|
2775
|
+
};
|
|
2776
|
+
signature: BytesLike;
|
|
2777
|
+
}
|
|
2778
|
+
], [
|
|
2779
|
+
void
|
|
2780
|
+
], "nonpayable">;
|
|
2781
|
+
setUserSpecialFeeTier: TypedContractMethod<[
|
|
2782
|
+
user: AddressLike,
|
|
2783
|
+
feeTier: BigNumberish
|
|
2784
|
+
], [
|
|
2785
|
+
void
|
|
2786
|
+
], "nonpayable">;
|
|
2787
|
+
supportedAssetClasses: TypedContractMethod<[], [bigint[]], "view">;
|
|
2788
|
+
transferOwnership: TypedContractMethod<[
|
|
2789
|
+
newOwner: AddressLike
|
|
2790
|
+
], [
|
|
2791
|
+
void
|
|
2792
|
+
], "nonpayable">;
|
|
2793
|
+
trustedForwarder: TypedContractMethod<[], [string], "view">;
|
|
2794
|
+
updateBaseFeeRates: TypedContractMethod<[
|
|
2795
|
+
params: {
|
|
2796
|
+
assetClass: BigNumberish;
|
|
2797
|
+
isEnable: boolean;
|
|
2798
|
+
baseFeeRate: {
|
|
2799
|
+
takerFeeRate: BigNumberish;
|
|
2800
|
+
makerFeeRate: BigNumberish;
|
|
2801
|
+
};
|
|
2802
|
+
}[]
|
|
2803
|
+
], [
|
|
2804
|
+
void
|
|
2805
|
+
], "nonpayable">;
|
|
2806
|
+
updateBrokerStatus: TypedContractMethod<[
|
|
2807
|
+
active: boolean
|
|
2808
|
+
], [
|
|
2809
|
+
void
|
|
2810
|
+
], "nonpayable">;
|
|
2811
|
+
updateFeeTier: TypedContractMethod<[
|
|
2812
|
+
assetClass: BigNumberish,
|
|
2813
|
+
riskTier: BigNumberish,
|
|
2814
|
+
feeTier: BigNumberish,
|
|
2815
|
+
feeRate: {
|
|
2816
|
+
takerFeeRate: BigNumberish;
|
|
2817
|
+
makerFeeRate: BigNumberish;
|
|
2818
|
+
}
|
|
2819
|
+
], [
|
|
2820
|
+
void
|
|
2821
|
+
], "nonpayable">;
|
|
2822
|
+
updateFeeTiers: TypedContractMethod<[
|
|
2823
|
+
assetClass: BigNumberish,
|
|
2824
|
+
riskTier: BigNumberish,
|
|
2825
|
+
feeTiers: BigNumberish[],
|
|
2826
|
+
feeRates: {
|
|
2827
|
+
takerFeeRate: BigNumberish;
|
|
2828
|
+
makerFeeRate: BigNumberish;
|
|
2829
|
+
}[]
|
|
2830
|
+
], [
|
|
2831
|
+
void
|
|
2832
|
+
], "nonpayable">;
|
|
2833
|
+
updateOrder: TypedContractMethod<[
|
|
2834
|
+
depositParams: {
|
|
2835
|
+
token: AddressLike;
|
|
2836
|
+
amount: BigNumberish;
|
|
2837
|
+
},
|
|
2838
|
+
params: {
|
|
2839
|
+
orderId: BigNumberish;
|
|
2840
|
+
size: BigNumberish;
|
|
2841
|
+
price: BigNumberish;
|
|
2842
|
+
tpsl: {
|
|
2843
|
+
tpSize: BigNumberish;
|
|
2844
|
+
tpPrice: BigNumberish;
|
|
2845
|
+
slSize: BigNumberish;
|
|
2846
|
+
slPrice: BigNumberish;
|
|
2847
|
+
};
|
|
2848
|
+
}
|
|
2849
|
+
], [
|
|
2850
|
+
void
|
|
2851
|
+
], "nonpayable">;
|
|
2852
|
+
updatePriceAndAdjustCollateral: TypedContractMethod<[
|
|
2853
|
+
prices: {
|
|
2854
|
+
poolId: BytesLike;
|
|
2855
|
+
oracleType: BigNumberish;
|
|
2856
|
+
referencePrice: BigNumberish;
|
|
2857
|
+
oracleUpdateData: BytesLike;
|
|
2858
|
+
publishTime: BigNumberish;
|
|
2859
|
+
}[],
|
|
2860
|
+
depositParams: {
|
|
2861
|
+
token: AddressLike;
|
|
2862
|
+
amount: BigNumberish;
|
|
2863
|
+
},
|
|
2864
|
+
positionId: BytesLike,
|
|
2865
|
+
adjustAmount: BigNumberish
|
|
2866
|
+
], [
|
|
2867
|
+
void
|
|
2868
|
+
], "payable">;
|
|
2869
|
+
userFeeData: TypedContractMethod<[
|
|
2870
|
+
user: AddressLike
|
|
2871
|
+
], [
|
|
2872
|
+
[
|
|
2873
|
+
bigint,
|
|
2874
|
+
string,
|
|
2875
|
+
bigint,
|
|
2876
|
+
bigint
|
|
2877
|
+
] & {
|
|
2878
|
+
tier: bigint;
|
|
2879
|
+
referrer: string;
|
|
2880
|
+
totalReferralRebatePct: bigint;
|
|
2881
|
+
referrerRebatePct: bigint;
|
|
2882
|
+
}
|
|
2883
|
+
], "view">;
|
|
2884
|
+
userNonces: TypedContractMethod<[user: AddressLike], [bigint], "view">;
|
|
2885
|
+
userRebates: TypedContractMethod<[
|
|
2886
|
+
user: AddressLike,
|
|
2887
|
+
token: AddressLike
|
|
2888
|
+
], [
|
|
2889
|
+
bigint
|
|
2890
|
+
], "view">;
|
|
2891
|
+
getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T;
|
|
2892
|
+
getFunction(nameOrSignature: "FEE_TYPEHASH"): TypedContractMethod<[], [string], "view">;
|
|
2893
|
+
getFunction(nameOrSignature: "__ERC2771ContextUpgradeable_init"): TypedContractMethod<[
|
|
2894
|
+
trustedForwarder_: AddressLike
|
|
2895
|
+
], [
|
|
2896
|
+
void
|
|
2897
|
+
], "nonpayable">;
|
|
2898
|
+
getFunction(nameOrSignature: "acceptOwnership"): TypedContractMethod<[], [void], "nonpayable">;
|
|
2899
|
+
getFunction(nameOrSignature: "activeFeeTiers"): TypedContractMethod<[
|
|
2900
|
+
assetClass: BigNumberish,
|
|
2901
|
+
riskTier: BigNumberish
|
|
2902
|
+
], [
|
|
2903
|
+
bigint[]
|
|
2904
|
+
], "view">;
|
|
2905
|
+
getFunction(nameOrSignature: "activeSpecialFeeTierList"): TypedContractMethod<[
|
|
2906
|
+
assetClass: BigNumberish,
|
|
2907
|
+
riskTier: BigNumberish
|
|
2908
|
+
], [
|
|
2909
|
+
bigint[]
|
|
2910
|
+
], "view">;
|
|
2911
|
+
getFunction(nameOrSignature: "addressManager"): TypedContractMethod<[], [string], "view">;
|
|
2912
|
+
getFunction(nameOrSignature: "adjustCollateral"): TypedContractMethod<[
|
|
2913
|
+
depositParams: {
|
|
2914
|
+
token: AddressLike;
|
|
2915
|
+
amount: BigNumberish;
|
|
2916
|
+
},
|
|
2917
|
+
positionId: BytesLike,
|
|
2918
|
+
adjustAmount: BigNumberish
|
|
2919
|
+
], [
|
|
2920
|
+
void
|
|
2921
|
+
], "nonpayable">;
|
|
2922
|
+
getFunction(nameOrSignature: "batchSetSpecialFeeTiers"): TypedContractMethod<[
|
|
2923
|
+
params: {
|
|
2924
|
+
assetClass: BigNumberish;
|
|
2925
|
+
riskTier: BigNumberish;
|
|
2926
|
+
feeTier: BigNumberish;
|
|
2927
|
+
makerFeeRate: BigNumberish;
|
|
2928
|
+
takerFeeRate: BigNumberish;
|
|
2929
|
+
}[]
|
|
2930
|
+
], [
|
|
2931
|
+
void
|
|
2932
|
+
], "nonpayable">;
|
|
2933
|
+
getFunction(nameOrSignature: "batchUpdateFeeTiers"): TypedContractMethod<[
|
|
2934
|
+
params: {
|
|
2935
|
+
assetClass: BigNumberish;
|
|
2936
|
+
riskTier: BigNumberish;
|
|
2937
|
+
feeTier: BigNumberish;
|
|
2938
|
+
addOnFeeRate: {
|
|
2939
|
+
takerFeeRate: BigNumberish;
|
|
2940
|
+
makerFeeRate: BigNumberish;
|
|
2941
|
+
};
|
|
2942
|
+
}[]
|
|
2943
|
+
], [
|
|
2944
|
+
void
|
|
2945
|
+
], "nonpayable">;
|
|
2946
|
+
getFunction(nameOrSignature: "cancelOrder"): TypedContractMethod<[orderId: BigNumberish], [void], "nonpayable">;
|
|
2947
|
+
getFunction(nameOrSignature: "cancelOrders"): TypedContractMethod<[orderIds: BigNumberish[]], [void], "nonpayable">;
|
|
2948
|
+
getFunction(nameOrSignature: "claimRebate"): TypedContractMethod<[token: AddressLike], [void], "nonpayable">;
|
|
2949
|
+
getFunction(nameOrSignature: "claimRebates"): TypedContractMethod<[tokens: AddressLike[]], [void], "nonpayable">;
|
|
2950
|
+
getFunction(nameOrSignature: "eip712Domain"): TypedContractMethod<[
|
|
2951
|
+
], [
|
|
2952
|
+
[
|
|
2953
|
+
string,
|
|
2954
|
+
string,
|
|
2955
|
+
string,
|
|
2956
|
+
bigint,
|
|
2957
|
+
string,
|
|
2958
|
+
string,
|
|
2959
|
+
bigint[]
|
|
2960
|
+
] & {
|
|
2961
|
+
fields: string;
|
|
2962
|
+
name: string;
|
|
2963
|
+
version: string;
|
|
2964
|
+
chainId: bigint;
|
|
2965
|
+
verifyingContract: string;
|
|
2966
|
+
salt: string;
|
|
2967
|
+
extensions: bigint[];
|
|
2968
|
+
}
|
|
2969
|
+
], "view">;
|
|
2970
|
+
getFunction(nameOrSignature: "getAddOnFeeTier"): TypedContractMethod<[
|
|
2971
|
+
assetClass: BigNumberish,
|
|
2972
|
+
riskTier: BigNumberish,
|
|
2973
|
+
feeTier: BigNumberish
|
|
2974
|
+
], [
|
|
2975
|
+
[bigint, bigint] & {
|
|
2976
|
+
takerFeeRate: bigint;
|
|
2977
|
+
makerFeeRate: bigint;
|
|
2978
|
+
}
|
|
2979
|
+
], "view">;
|
|
2980
|
+
getFunction(nameOrSignature: "getBaseFeeRate"): TypedContractMethod<[
|
|
2981
|
+
assetClass: BigNumberish
|
|
2982
|
+
], [
|
|
2983
|
+
[bigint, bigint] & {
|
|
2984
|
+
takerFeeRate: bigint;
|
|
2985
|
+
makerFeeRate: bigint;
|
|
2986
|
+
}
|
|
2987
|
+
], "view">;
|
|
2988
|
+
getFunction(nameOrSignature: "getSpecialFeeTier"): TypedContractMethod<[
|
|
2989
|
+
assetClass: BigNumberish,
|
|
2990
|
+
riskTier: BigNumberish,
|
|
2991
|
+
feeTier: BigNumberish
|
|
2992
|
+
], [
|
|
2993
|
+
[bigint, bigint] & {
|
|
2994
|
+
makerFeeRate: bigint;
|
|
2995
|
+
takerFeeRate: bigint;
|
|
2996
|
+
}
|
|
2997
|
+
], "view">;
|
|
2998
|
+
getFunction(nameOrSignature: "getUserFeeRate"): TypedContractMethod<[
|
|
2999
|
+
user: AddressLike,
|
|
3000
|
+
assetClass: BigNumberish,
|
|
3001
|
+
riskTier: BigNumberish
|
|
3002
|
+
], [
|
|
3003
|
+
[
|
|
3004
|
+
bigint,
|
|
3005
|
+
bigint,
|
|
3006
|
+
bigint,
|
|
3007
|
+
bigint
|
|
3008
|
+
] & {
|
|
3009
|
+
takerFeeRate: bigint;
|
|
3010
|
+
makerFeeRate: bigint;
|
|
3011
|
+
baseTakerFeeRate: bigint;
|
|
3012
|
+
baseMakerFeeRate: bigint;
|
|
3013
|
+
}
|
|
3014
|
+
], "view">;
|
|
3015
|
+
getFunction(nameOrSignature: "initialize"): TypedContractMethod<[
|
|
3016
|
+
_addressManager: AddressLike,
|
|
3017
|
+
owner: AddressLike,
|
|
3018
|
+
_brokerName: string,
|
|
3019
|
+
brokerSigners: AddressLike[],
|
|
3020
|
+
assetClasses: BigNumberish[],
|
|
3021
|
+
baseFeeRates: {
|
|
3022
|
+
takerFeeRate: BigNumberish;
|
|
3023
|
+
makerFeeRate: BigNumberish;
|
|
3024
|
+
}[]
|
|
3025
|
+
], [
|
|
3026
|
+
void
|
|
3027
|
+
], "nonpayable">;
|
|
3028
|
+
getFunction(nameOrSignature: "isActive"): TypedContractMethod<[], [boolean], "view">;
|
|
3029
|
+
getFunction(nameOrSignature: "isTrustedForwarder"): TypedContractMethod<[forwarder: AddressLike], [boolean], "view">;
|
|
3030
|
+
getFunction(nameOrSignature: "name"): TypedContractMethod<[], [string], "view">;
|
|
3031
|
+
getFunction(nameOrSignature: "onBrokerFee"): TypedContractMethod<[
|
|
3032
|
+
poolId: BytesLike,
|
|
3033
|
+
user: AddressLike,
|
|
3034
|
+
token: AddressLike,
|
|
3035
|
+
feeAmount: BigNumberish
|
|
3036
|
+
], [
|
|
3037
|
+
[
|
|
3038
|
+
bigint,
|
|
3039
|
+
bigint,
|
|
3040
|
+
string
|
|
3041
|
+
] & {
|
|
3042
|
+
totalReferralRebate: bigint;
|
|
3043
|
+
referrerRebate: bigint;
|
|
3044
|
+
referrer: string;
|
|
3045
|
+
}
|
|
3046
|
+
], "nonpayable">;
|
|
3047
|
+
getFunction(nameOrSignature: "owner"): TypedContractMethod<[], [string], "view">;
|
|
3048
|
+
getFunction(nameOrSignature: "pendingOwner"): TypedContractMethod<[], [string], "view">;
|
|
3049
|
+
getFunction(nameOrSignature: "placeOrderWithPosition"): TypedContractMethod<[
|
|
3050
|
+
positionId: BytesLike,
|
|
3051
|
+
depositParams: {
|
|
3052
|
+
token: AddressLike;
|
|
3053
|
+
amount: BigNumberish;
|
|
3054
|
+
},
|
|
3055
|
+
orderParams: {
|
|
3056
|
+
user: AddressLike;
|
|
3057
|
+
poolId: BytesLike;
|
|
3058
|
+
orderType: BigNumberish;
|
|
3059
|
+
triggerType: BigNumberish;
|
|
3060
|
+
operation: BigNumberish;
|
|
3061
|
+
direction: BigNumberish;
|
|
3062
|
+
collateralAmount: BigNumberish;
|
|
3063
|
+
size: BigNumberish;
|
|
3064
|
+
price: BigNumberish;
|
|
3065
|
+
timeInForce: BigNumberish;
|
|
3066
|
+
postOnly: boolean;
|
|
3067
|
+
slippagePct: BigNumberish;
|
|
3068
|
+
leverage: BigNumberish;
|
|
3069
|
+
tpSize: BigNumberish;
|
|
3070
|
+
tpPrice: BigNumberish;
|
|
3071
|
+
slSize: BigNumberish;
|
|
3072
|
+
slPrice: BigNumberish;
|
|
3073
|
+
}
|
|
3074
|
+
], [
|
|
3075
|
+
void
|
|
3076
|
+
], "payable">;
|
|
3077
|
+
getFunction(nameOrSignature: "placeOrderWithSalt"): TypedContractMethod<[
|
|
3078
|
+
userPositionSalt: BigNumberish,
|
|
3079
|
+
depositParams: {
|
|
3080
|
+
token: AddressLike;
|
|
3081
|
+
amount: BigNumberish;
|
|
3082
|
+
},
|
|
3083
|
+
orderParams: {
|
|
3084
|
+
user: AddressLike;
|
|
3085
|
+
poolId: BytesLike;
|
|
3086
|
+
orderType: BigNumberish;
|
|
3087
|
+
triggerType: BigNumberish;
|
|
3088
|
+
operation: BigNumberish;
|
|
3089
|
+
direction: BigNumberish;
|
|
3090
|
+
collateralAmount: BigNumberish;
|
|
3091
|
+
size: BigNumberish;
|
|
3092
|
+
price: BigNumberish;
|
|
3093
|
+
timeInForce: BigNumberish;
|
|
3094
|
+
postOnly: boolean;
|
|
3095
|
+
slippagePct: BigNumberish;
|
|
3096
|
+
leverage: BigNumberish;
|
|
3097
|
+
tpSize: BigNumberish;
|
|
3098
|
+
tpPrice: BigNumberish;
|
|
3099
|
+
slSize: BigNumberish;
|
|
3100
|
+
slPrice: BigNumberish;
|
|
3101
|
+
}
|
|
3102
|
+
], [
|
|
3103
|
+
void
|
|
3104
|
+
], "payable">;
|
|
3105
|
+
getFunction(nameOrSignature: "placeOrdersWithPosition"): TypedContractMethod<[
|
|
3106
|
+
depositParams: {
|
|
3107
|
+
token: AddressLike;
|
|
3108
|
+
amount: BigNumberish;
|
|
3109
|
+
},
|
|
3110
|
+
positionIds: BytesLike[],
|
|
3111
|
+
orderParams: {
|
|
3112
|
+
user: AddressLike;
|
|
3113
|
+
poolId: BytesLike;
|
|
3114
|
+
orderType: BigNumberish;
|
|
3115
|
+
triggerType: BigNumberish;
|
|
3116
|
+
operation: BigNumberish;
|
|
3117
|
+
direction: BigNumberish;
|
|
3118
|
+
collateralAmount: BigNumberish;
|
|
3119
|
+
size: BigNumberish;
|
|
3120
|
+
price: BigNumberish;
|
|
3121
|
+
timeInForce: BigNumberish;
|
|
3122
|
+
postOnly: boolean;
|
|
3123
|
+
slippagePct: BigNumberish;
|
|
3124
|
+
leverage: BigNumberish;
|
|
3125
|
+
tpSize: BigNumberish;
|
|
3126
|
+
tpPrice: BigNumberish;
|
|
3127
|
+
slSize: BigNumberish;
|
|
3128
|
+
slPrice: BigNumberish;
|
|
3129
|
+
}[]
|
|
3130
|
+
], [
|
|
3131
|
+
void
|
|
3132
|
+
], "payable">;
|
|
3133
|
+
getFunction(nameOrSignature: "placeOrdersWithSalt"): TypedContractMethod<[
|
|
3134
|
+
depositParams: {
|
|
3135
|
+
token: AddressLike;
|
|
3136
|
+
amount: BigNumberish;
|
|
3137
|
+
},
|
|
3138
|
+
userPositionSalts: BigNumberish[],
|
|
3139
|
+
orderParams: {
|
|
3140
|
+
user: AddressLike;
|
|
3141
|
+
poolId: BytesLike;
|
|
3142
|
+
orderType: BigNumberish;
|
|
3143
|
+
triggerType: BigNumberish;
|
|
3144
|
+
operation: BigNumberish;
|
|
3145
|
+
direction: BigNumberish;
|
|
3146
|
+
collateralAmount: BigNumberish;
|
|
3147
|
+
size: BigNumberish;
|
|
3148
|
+
price: BigNumberish;
|
|
3149
|
+
timeInForce: BigNumberish;
|
|
3150
|
+
postOnly: boolean;
|
|
3151
|
+
slippagePct: BigNumberish;
|
|
3152
|
+
leverage: BigNumberish;
|
|
3153
|
+
tpSize: BigNumberish;
|
|
3154
|
+
tpPrice: BigNumberish;
|
|
3155
|
+
slSize: BigNumberish;
|
|
3156
|
+
slPrice: BigNumberish;
|
|
3157
|
+
}[]
|
|
3158
|
+
], [
|
|
3159
|
+
void
|
|
3160
|
+
], "payable">;
|
|
3161
|
+
getFunction(nameOrSignature: "renounceOwnership"): TypedContractMethod<[], [void], "nonpayable">;
|
|
3162
|
+
getFunction(nameOrSignature: "setSigner"): TypedContractMethod<[
|
|
3163
|
+
signer: AddressLike,
|
|
3164
|
+
isSigner: boolean
|
|
3165
|
+
], [
|
|
3166
|
+
void
|
|
3167
|
+
], "nonpayable">;
|
|
3168
|
+
getFunction(nameOrSignature: "setSpecialFeeTier"): TypedContractMethod<[
|
|
3169
|
+
params: {
|
|
3170
|
+
assetClass: BigNumberish;
|
|
3171
|
+
riskTier: BigNumberish;
|
|
3172
|
+
feeTier: BigNumberish;
|
|
3173
|
+
makerFeeRate: BigNumberish;
|
|
3174
|
+
takerFeeRate: BigNumberish;
|
|
3175
|
+
}
|
|
3176
|
+
], [
|
|
3177
|
+
void
|
|
3178
|
+
], "nonpayable">;
|
|
3179
|
+
getFunction(nameOrSignature: "setUserFeeData"): TypedContractMethod<[
|
|
3180
|
+
params: {
|
|
3181
|
+
user: AddressLike;
|
|
3182
|
+
nonce: BigNumberish;
|
|
3183
|
+
deadline: BigNumberish;
|
|
3184
|
+
feeData: {
|
|
3185
|
+
tier: BigNumberish;
|
|
3186
|
+
referrer: AddressLike;
|
|
3187
|
+
totalReferralRebatePct: BigNumberish;
|
|
3188
|
+
referrerRebatePct: BigNumberish;
|
|
3189
|
+
};
|
|
3190
|
+
signature: BytesLike;
|
|
3191
|
+
}
|
|
3192
|
+
], [
|
|
3193
|
+
void
|
|
3194
|
+
], "nonpayable">;
|
|
3195
|
+
getFunction(nameOrSignature: "setUserSpecialFeeTier"): TypedContractMethod<[
|
|
3196
|
+
user: AddressLike,
|
|
3197
|
+
feeTier: BigNumberish
|
|
3198
|
+
], [
|
|
3199
|
+
void
|
|
3200
|
+
], "nonpayable">;
|
|
3201
|
+
getFunction(nameOrSignature: "supportedAssetClasses"): TypedContractMethod<[], [bigint[]], "view">;
|
|
3202
|
+
getFunction(nameOrSignature: "transferOwnership"): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">;
|
|
3203
|
+
getFunction(nameOrSignature: "trustedForwarder"): TypedContractMethod<[], [string], "view">;
|
|
3204
|
+
getFunction(nameOrSignature: "updateBaseFeeRates"): TypedContractMethod<[
|
|
3205
|
+
params: {
|
|
3206
|
+
assetClass: BigNumberish;
|
|
3207
|
+
isEnable: boolean;
|
|
3208
|
+
baseFeeRate: {
|
|
3209
|
+
takerFeeRate: BigNumberish;
|
|
3210
|
+
makerFeeRate: BigNumberish;
|
|
3211
|
+
};
|
|
3212
|
+
}[]
|
|
3213
|
+
], [
|
|
3214
|
+
void
|
|
3215
|
+
], "nonpayable">;
|
|
3216
|
+
getFunction(nameOrSignature: "updateBrokerStatus"): TypedContractMethod<[active: boolean], [void], "nonpayable">;
|
|
3217
|
+
getFunction(nameOrSignature: "updateFeeTier"): TypedContractMethod<[
|
|
3218
|
+
assetClass: BigNumberish,
|
|
3219
|
+
riskTier: BigNumberish,
|
|
3220
|
+
feeTier: BigNumberish,
|
|
3221
|
+
feeRate: {
|
|
3222
|
+
takerFeeRate: BigNumberish;
|
|
3223
|
+
makerFeeRate: BigNumberish;
|
|
3224
|
+
}
|
|
3225
|
+
], [
|
|
3226
|
+
void
|
|
3227
|
+
], "nonpayable">;
|
|
3228
|
+
getFunction(nameOrSignature: "updateFeeTiers"): TypedContractMethod<[
|
|
3229
|
+
assetClass: BigNumberish,
|
|
3230
|
+
riskTier: BigNumberish,
|
|
3231
|
+
feeTiers: BigNumberish[],
|
|
3232
|
+
feeRates: {
|
|
3233
|
+
takerFeeRate: BigNumberish;
|
|
3234
|
+
makerFeeRate: BigNumberish;
|
|
3235
|
+
}[]
|
|
3236
|
+
], [
|
|
3237
|
+
void
|
|
3238
|
+
], "nonpayable">;
|
|
3239
|
+
getFunction(nameOrSignature: "updateOrder"): TypedContractMethod<[
|
|
3240
|
+
depositParams: {
|
|
3241
|
+
token: AddressLike;
|
|
3242
|
+
amount: BigNumberish;
|
|
3243
|
+
},
|
|
3244
|
+
params: {
|
|
3245
|
+
orderId: BigNumberish;
|
|
3246
|
+
size: BigNumberish;
|
|
3247
|
+
price: BigNumberish;
|
|
3248
|
+
tpsl: {
|
|
3249
|
+
tpSize: BigNumberish;
|
|
3250
|
+
tpPrice: BigNumberish;
|
|
3251
|
+
slSize: BigNumberish;
|
|
3252
|
+
slPrice: BigNumberish;
|
|
3253
|
+
};
|
|
3254
|
+
}
|
|
3255
|
+
], [
|
|
3256
|
+
void
|
|
3257
|
+
], "nonpayable">;
|
|
3258
|
+
getFunction(nameOrSignature: "updatePriceAndAdjustCollateral"): TypedContractMethod<[
|
|
3259
|
+
prices: {
|
|
3260
|
+
poolId: BytesLike;
|
|
3261
|
+
oracleType: BigNumberish;
|
|
3262
|
+
referencePrice: BigNumberish;
|
|
3263
|
+
oracleUpdateData: BytesLike;
|
|
3264
|
+
publishTime: BigNumberish;
|
|
3265
|
+
}[],
|
|
3266
|
+
depositParams: {
|
|
3267
|
+
token: AddressLike;
|
|
3268
|
+
amount: BigNumberish;
|
|
3269
|
+
},
|
|
3270
|
+
positionId: BytesLike,
|
|
3271
|
+
adjustAmount: BigNumberish
|
|
3272
|
+
], [
|
|
3273
|
+
void
|
|
3274
|
+
], "payable">;
|
|
3275
|
+
getFunction(nameOrSignature: "userFeeData"): TypedContractMethod<[
|
|
3276
|
+
user: AddressLike
|
|
3277
|
+
], [
|
|
3278
|
+
[
|
|
3279
|
+
bigint,
|
|
3280
|
+
string,
|
|
3281
|
+
bigint,
|
|
3282
|
+
bigint
|
|
3283
|
+
] & {
|
|
3284
|
+
tier: bigint;
|
|
3285
|
+
referrer: string;
|
|
3286
|
+
totalReferralRebatePct: bigint;
|
|
3287
|
+
referrerRebatePct: bigint;
|
|
3288
|
+
}
|
|
3289
|
+
], "view">;
|
|
3290
|
+
getFunction(nameOrSignature: "userNonces"): TypedContractMethod<[user: AddressLike], [bigint], "view">;
|
|
3291
|
+
getFunction(nameOrSignature: "userRebates"): TypedContractMethod<[
|
|
3292
|
+
user: AddressLike,
|
|
3293
|
+
token: AddressLike
|
|
3294
|
+
], [
|
|
3295
|
+
bigint
|
|
3296
|
+
], "view">;
|
|
3297
|
+
getEvent(key: "BrokerStatusUpdated"): TypedContractEvent<BrokerStatusUpdatedEvent.InputTuple, BrokerStatusUpdatedEvent.OutputTuple, BrokerStatusUpdatedEvent.OutputObject>;
|
|
3298
|
+
getEvent(key: "EIP712DomainChanged"): TypedContractEvent<EIP712DomainChangedEvent.InputTuple, EIP712DomainChangedEvent.OutputTuple, EIP712DomainChangedEvent.OutputObject>;
|
|
3299
|
+
getEvent(key: "Initialized"): TypedContractEvent<InitializedEvent.InputTuple, InitializedEvent.OutputTuple, InitializedEvent.OutputObject>;
|
|
3300
|
+
getEvent(key: "OwnershipTransferStarted"): TypedContractEvent<OwnershipTransferStartedEvent.InputTuple, OwnershipTransferStartedEvent.OutputTuple, OwnershipTransferStartedEvent.OutputObject>;
|
|
3301
|
+
getEvent(key: "OwnershipTransferred"): TypedContractEvent<OwnershipTransferredEvent.InputTuple, OwnershipTransferredEvent.OutputTuple, OwnershipTransferredEvent.OutputObject>;
|
|
3302
|
+
getEvent(key: "RebateClaimed"): TypedContractEvent<RebateClaimedEvent.InputTuple, RebateClaimedEvent.OutputTuple, RebateClaimedEvent.OutputObject>;
|
|
3303
|
+
getEvent(key: "SignerUpdated"): TypedContractEvent<SignerUpdatedEvent.InputTuple, SignerUpdatedEvent.OutputTuple, SignerUpdatedEvent.OutputObject>;
|
|
3304
|
+
getEvent(key: "UserFeeDataUpdated"): TypedContractEvent<UserFeeDataUpdatedEvent.InputTuple, UserFeeDataUpdatedEvent.OutputTuple, UserFeeDataUpdatedEvent.OutputObject>;
|
|
3305
|
+
filters: {
|
|
3306
|
+
"BrokerStatusUpdated(address,bool)": TypedContractEvent<BrokerStatusUpdatedEvent.InputTuple, BrokerStatusUpdatedEvent.OutputTuple, BrokerStatusUpdatedEvent.OutputObject>;
|
|
3307
|
+
BrokerStatusUpdated: TypedContractEvent<BrokerStatusUpdatedEvent.InputTuple, BrokerStatusUpdatedEvent.OutputTuple, BrokerStatusUpdatedEvent.OutputObject>;
|
|
3308
|
+
"EIP712DomainChanged()": TypedContractEvent<EIP712DomainChangedEvent.InputTuple, EIP712DomainChangedEvent.OutputTuple, EIP712DomainChangedEvent.OutputObject>;
|
|
3309
|
+
EIP712DomainChanged: TypedContractEvent<EIP712DomainChangedEvent.InputTuple, EIP712DomainChangedEvent.OutputTuple, EIP712DomainChangedEvent.OutputObject>;
|
|
3310
|
+
"Initialized(uint64)": TypedContractEvent<InitializedEvent.InputTuple, InitializedEvent.OutputTuple, InitializedEvent.OutputObject>;
|
|
3311
|
+
Initialized: TypedContractEvent<InitializedEvent.InputTuple, InitializedEvent.OutputTuple, InitializedEvent.OutputObject>;
|
|
3312
|
+
"OwnershipTransferStarted(address,address)": TypedContractEvent<OwnershipTransferStartedEvent.InputTuple, OwnershipTransferStartedEvent.OutputTuple, OwnershipTransferStartedEvent.OutputObject>;
|
|
3313
|
+
OwnershipTransferStarted: TypedContractEvent<OwnershipTransferStartedEvent.InputTuple, OwnershipTransferStartedEvent.OutputTuple, OwnershipTransferStartedEvent.OutputObject>;
|
|
3314
|
+
"OwnershipTransferred(address,address)": TypedContractEvent<OwnershipTransferredEvent.InputTuple, OwnershipTransferredEvent.OutputTuple, OwnershipTransferredEvent.OutputObject>;
|
|
3315
|
+
OwnershipTransferred: TypedContractEvent<OwnershipTransferredEvent.InputTuple, OwnershipTransferredEvent.OutputTuple, OwnershipTransferredEvent.OutputObject>;
|
|
3316
|
+
"RebateClaimed(address,address,uint256)": TypedContractEvent<RebateClaimedEvent.InputTuple, RebateClaimedEvent.OutputTuple, RebateClaimedEvent.OutputObject>;
|
|
3317
|
+
RebateClaimed: TypedContractEvent<RebateClaimedEvent.InputTuple, RebateClaimedEvent.OutputTuple, RebateClaimedEvent.OutputObject>;
|
|
3318
|
+
"SignerUpdated(address,bool)": TypedContractEvent<SignerUpdatedEvent.InputTuple, SignerUpdatedEvent.OutputTuple, SignerUpdatedEvent.OutputObject>;
|
|
3319
|
+
SignerUpdated: TypedContractEvent<SignerUpdatedEvent.InputTuple, SignerUpdatedEvent.OutputTuple, SignerUpdatedEvent.OutputObject>;
|
|
3320
|
+
"UserFeeDataUpdated(address,address,address,uint8,address,uint32,uint32)": TypedContractEvent<UserFeeDataUpdatedEvent.InputTuple, UserFeeDataUpdatedEvent.OutputTuple, UserFeeDataUpdatedEvent.OutputObject>;
|
|
3321
|
+
UserFeeDataUpdated: TypedContractEvent<UserFeeDataUpdatedEvent.InputTuple, UserFeeDataUpdatedEvent.OutputTuple, UserFeeDataUpdatedEvent.OutputObject>;
|
|
3322
|
+
};
|
|
3323
|
+
}
|
|
3324
|
+
|
|
3325
|
+
declare class BaseMyxClient {
|
|
3326
|
+
protected client: MyxClient;
|
|
3327
|
+
constructor(client: MyxClient);
|
|
3328
|
+
protected getConfig(): MyxClientConfig;
|
|
3329
|
+
protected getSigner(): Promise<Signer>;
|
|
3330
|
+
protected getAddressConfig(): ContractAddress;
|
|
3331
|
+
protected connectContract<T extends Record<string, any>>(contract: T): Promise<T>;
|
|
3332
|
+
protected getBrokerContract(): Promise<Broker>;
|
|
3333
|
+
}
|
|
3334
|
+
|
|
3335
|
+
declare class Referrals extends BaseMyxClient {
|
|
3336
|
+
constructor(client: MyxClient);
|
|
3337
|
+
claimRebate(): Promise<ethers.ContractTransactionReceipt | null>;
|
|
3338
|
+
}
|
|
3339
|
+
|
|
1891
3340
|
declare class MyxClient {
|
|
1892
3341
|
/**
|
|
1893
3342
|
* private properties
|
|
@@ -1905,6 +3354,7 @@ declare class MyxClient {
|
|
|
1905
3354
|
account: Account;
|
|
1906
3355
|
seamless: Seamless;
|
|
1907
3356
|
api: Api;
|
|
3357
|
+
referrals: Referrals;
|
|
1908
3358
|
/**
|
|
1909
3359
|
* 获取配置管理器(用于访问 accessToken 相关方法)
|
|
1910
3360
|
*/
|