@myx-trade/sdk 0.1.40 → 0.1.42
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.js +438 -174
- package/dist/index.mjs +438 -174
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1469,7 +1469,7 @@ var ARB_TEST_SEPOLIA = {
|
|
|
1469
1469
|
POOL_MANAGER: "0xA4A1dfbe40cB725A79D34bd529f0C1b54AB46954",
|
|
1470
1470
|
Account: "0x6136899e8c77C452bc46AcD786aA2C09fD31f947",
|
|
1471
1471
|
POSITION_MANAGER: "0x002F28be205E9A1e279d2eeF1f5e472CeA1d910C",
|
|
1472
|
-
ORDER_MANAGER: "
|
|
1472
|
+
ORDER_MANAGER: "0x3A3C7c4588Fb2aE46A4108994a47712E03F96B23",
|
|
1473
1473
|
PYTH: "0x4374e5a8b9C22271E9EB878A2AA31DE97DF15DAF",
|
|
1474
1474
|
// !!! 非Pyth Adapter
|
|
1475
1475
|
ERC20: "0x7E248Ec1721639413A280d9E82e2862Cae2E6E28",
|
|
@@ -1813,7 +1813,7 @@ var RotationProvider = class extends import_providers.BaseProvider {
|
|
|
1813
1813
|
// package.json
|
|
1814
1814
|
var package_default = {
|
|
1815
1815
|
name: "@myx-trade/sdk",
|
|
1816
|
-
version: "0.1.
|
|
1816
|
+
version: "0.1.42",
|
|
1817
1817
|
private: false,
|
|
1818
1818
|
publishConfig: {
|
|
1819
1819
|
access: "public"
|
|
@@ -13850,33 +13850,6 @@ var Emiter_default = [
|
|
|
13850
13850
|
}
|
|
13851
13851
|
]
|
|
13852
13852
|
},
|
|
13853
|
-
{
|
|
13854
|
-
type: "event",
|
|
13855
|
-
anonymous: false,
|
|
13856
|
-
name: "AddOnFeeTierUpdated",
|
|
13857
|
-
inputs: [
|
|
13858
|
-
{
|
|
13859
|
-
type: "address",
|
|
13860
|
-
name: "broker",
|
|
13861
|
-
indexed: false
|
|
13862
|
-
},
|
|
13863
|
-
{
|
|
13864
|
-
type: "uint8",
|
|
13865
|
-
name: "tier",
|
|
13866
|
-
indexed: false
|
|
13867
|
-
},
|
|
13868
|
-
{
|
|
13869
|
-
type: "uint32",
|
|
13870
|
-
name: "takerFeeRate",
|
|
13871
|
-
indexed: false
|
|
13872
|
-
},
|
|
13873
|
-
{
|
|
13874
|
-
type: "uint32",
|
|
13875
|
-
name: "makerFeeRate",
|
|
13876
|
-
indexed: false
|
|
13877
|
-
}
|
|
13878
|
-
]
|
|
13879
|
-
},
|
|
13880
13853
|
{
|
|
13881
13854
|
type: "event",
|
|
13882
13855
|
anonymous: false,
|
|
@@ -13952,7 +13925,7 @@ var Emiter_default = [
|
|
|
13952
13925
|
indexed: false
|
|
13953
13926
|
},
|
|
13954
13927
|
{
|
|
13955
|
-
type: "
|
|
13928
|
+
type: "bytes32",
|
|
13956
13929
|
name: "positionId",
|
|
13957
13930
|
indexed: false
|
|
13958
13931
|
},
|
|
@@ -14063,7 +14036,7 @@ var Emiter_default = [
|
|
|
14063
14036
|
indexed: false
|
|
14064
14037
|
},
|
|
14065
14038
|
{
|
|
14066
|
-
type: "
|
|
14039
|
+
type: "int32",
|
|
14067
14040
|
name: "tradingFeeRate",
|
|
14068
14041
|
indexed: false
|
|
14069
14042
|
},
|
|
@@ -14219,6 +14192,11 @@ var Emiter_default = [
|
|
|
14219
14192
|
type: "bytes32",
|
|
14220
14193
|
name: "poolId",
|
|
14221
14194
|
indexed: false
|
|
14195
|
+
},
|
|
14196
|
+
{
|
|
14197
|
+
type: "string",
|
|
14198
|
+
name: "reason",
|
|
14199
|
+
indexed: false
|
|
14222
14200
|
}
|
|
14223
14201
|
]
|
|
14224
14202
|
},
|
|
@@ -14279,6 +14257,11 @@ var Emiter_default = [
|
|
|
14279
14257
|
name: "orderId",
|
|
14280
14258
|
indexed: false
|
|
14281
14259
|
},
|
|
14260
|
+
{
|
|
14261
|
+
type: "bytes32",
|
|
14262
|
+
name: "poolId",
|
|
14263
|
+
indexed: false
|
|
14264
|
+
},
|
|
14282
14265
|
{
|
|
14283
14266
|
type: "address",
|
|
14284
14267
|
name: "executor",
|
|
@@ -14371,7 +14354,7 @@ var Emiter_default = [
|
|
|
14371
14354
|
indexed: false
|
|
14372
14355
|
},
|
|
14373
14356
|
{
|
|
14374
|
-
type: "
|
|
14357
|
+
type: "bytes32",
|
|
14375
14358
|
name: "positionId",
|
|
14376
14359
|
indexed: false
|
|
14377
14360
|
},
|
|
@@ -14424,6 +14407,21 @@ var Emiter_default = [
|
|
|
14424
14407
|
type: "int256",
|
|
14425
14408
|
name: "fundingFee",
|
|
14426
14409
|
indexed: false
|
|
14410
|
+
},
|
|
14411
|
+
{
|
|
14412
|
+
type: "address",
|
|
14413
|
+
name: "executionFeeToken",
|
|
14414
|
+
indexed: false
|
|
14415
|
+
},
|
|
14416
|
+
{
|
|
14417
|
+
type: "uint256",
|
|
14418
|
+
name: "executionFeeAmount",
|
|
14419
|
+
indexed: false
|
|
14420
|
+
},
|
|
14421
|
+
{
|
|
14422
|
+
type: "address",
|
|
14423
|
+
name: "keeper",
|
|
14424
|
+
indexed: false
|
|
14427
14425
|
}
|
|
14428
14426
|
]
|
|
14429
14427
|
},
|
|
@@ -14485,7 +14483,7 @@ var Emiter_default = [
|
|
|
14485
14483
|
indexed: false
|
|
14486
14484
|
},
|
|
14487
14485
|
{
|
|
14488
|
-
type: "
|
|
14486
|
+
type: "bytes32",
|
|
14489
14487
|
name: "positionId",
|
|
14490
14488
|
indexed: false
|
|
14491
14489
|
},
|
|
@@ -15110,7 +15108,7 @@ var Emiter_default = [
|
|
|
15110
15108
|
indexed: false
|
|
15111
15109
|
},
|
|
15112
15110
|
{
|
|
15113
|
-
type: "
|
|
15111
|
+
type: "bytes32",
|
|
15114
15112
|
name: "positionId",
|
|
15115
15113
|
indexed: false
|
|
15116
15114
|
},
|
|
@@ -15157,7 +15155,7 @@ var Emiter_default = [
|
|
|
15157
15155
|
indexed: false
|
|
15158
15156
|
},
|
|
15159
15157
|
{
|
|
15160
|
-
type: "
|
|
15158
|
+
type: "bytes32",
|
|
15161
15159
|
name: "positionId",
|
|
15162
15160
|
indexed: false
|
|
15163
15161
|
},
|
|
@@ -15214,7 +15212,7 @@ var Emiter_default = [
|
|
|
15214
15212
|
indexed: false
|
|
15215
15213
|
},
|
|
15216
15214
|
{
|
|
15217
|
-
type: "
|
|
15215
|
+
type: "bytes32",
|
|
15218
15216
|
name: "positionId",
|
|
15219
15217
|
indexed: false
|
|
15220
15218
|
},
|
|
@@ -15240,6 +15238,43 @@ var Emiter_default = [
|
|
|
15240
15238
|
}
|
|
15241
15239
|
]
|
|
15242
15240
|
},
|
|
15241
|
+
{
|
|
15242
|
+
type: "event",
|
|
15243
|
+
anonymous: false,
|
|
15244
|
+
name: "PositionNFTMinted",
|
|
15245
|
+
inputs: [
|
|
15246
|
+
{
|
|
15247
|
+
type: "bytes32",
|
|
15248
|
+
name: "poolId",
|
|
15249
|
+
indexed: false
|
|
15250
|
+
},
|
|
15251
|
+
{
|
|
15252
|
+
type: "bytes32",
|
|
15253
|
+
name: "oldPositionId",
|
|
15254
|
+
indexed: false
|
|
15255
|
+
},
|
|
15256
|
+
{
|
|
15257
|
+
type: "bytes32",
|
|
15258
|
+
name: "newPositionId",
|
|
15259
|
+
indexed: false
|
|
15260
|
+
},
|
|
15261
|
+
{
|
|
15262
|
+
type: "uint256",
|
|
15263
|
+
name: "tokenId",
|
|
15264
|
+
indexed: false
|
|
15265
|
+
},
|
|
15266
|
+
{
|
|
15267
|
+
type: "address",
|
|
15268
|
+
name: "owner",
|
|
15269
|
+
indexed: false
|
|
15270
|
+
},
|
|
15271
|
+
{
|
|
15272
|
+
type: "address",
|
|
15273
|
+
name: "recipient",
|
|
15274
|
+
indexed: false
|
|
15275
|
+
}
|
|
15276
|
+
]
|
|
15277
|
+
},
|
|
15243
15278
|
{
|
|
15244
15279
|
type: "event",
|
|
15245
15280
|
anonymous: false,
|
|
@@ -15256,7 +15291,7 @@ var Emiter_default = [
|
|
|
15256
15291
|
indexed: false
|
|
15257
15292
|
},
|
|
15258
15293
|
{
|
|
15259
|
-
type: "
|
|
15294
|
+
type: "bytes32",
|
|
15260
15295
|
name: "positionId",
|
|
15261
15296
|
indexed: false
|
|
15262
15297
|
}
|
|
@@ -15278,7 +15313,7 @@ var Emiter_default = [
|
|
|
15278
15313
|
indexed: false
|
|
15279
15314
|
},
|
|
15280
15315
|
{
|
|
15281
|
-
type: "
|
|
15316
|
+
type: "bytes32",
|
|
15282
15317
|
name: "positionId",
|
|
15283
15318
|
indexed: false
|
|
15284
15319
|
},
|
|
@@ -15475,6 +15510,43 @@ var Emiter_default = [
|
|
|
15475
15510
|
}
|
|
15476
15511
|
]
|
|
15477
15512
|
},
|
|
15513
|
+
{
|
|
15514
|
+
type: "event",
|
|
15515
|
+
anonymous: false,
|
|
15516
|
+
name: "TradingFeeTierUpdated",
|
|
15517
|
+
inputs: [
|
|
15518
|
+
{
|
|
15519
|
+
type: "address",
|
|
15520
|
+
name: "broker",
|
|
15521
|
+
indexed: false
|
|
15522
|
+
},
|
|
15523
|
+
{
|
|
15524
|
+
type: "uint8",
|
|
15525
|
+
name: "feeType",
|
|
15526
|
+
indexed: false
|
|
15527
|
+
},
|
|
15528
|
+
{
|
|
15529
|
+
type: "uint8",
|
|
15530
|
+
name: "tier",
|
|
15531
|
+
indexed: false
|
|
15532
|
+
},
|
|
15533
|
+
{
|
|
15534
|
+
type: "uint32",
|
|
15535
|
+
name: "takerFeeRate",
|
|
15536
|
+
indexed: false
|
|
15537
|
+
},
|
|
15538
|
+
{
|
|
15539
|
+
type: "int32",
|
|
15540
|
+
name: "makerFeeRate",
|
|
15541
|
+
indexed: false
|
|
15542
|
+
},
|
|
15543
|
+
{
|
|
15544
|
+
type: "bool",
|
|
15545
|
+
name: "isEnabled",
|
|
15546
|
+
indexed: false
|
|
15547
|
+
}
|
|
15548
|
+
]
|
|
15549
|
+
},
|
|
15478
15550
|
{
|
|
15479
15551
|
type: "event",
|
|
15480
15552
|
anonymous: false,
|
|
@@ -15571,6 +15643,33 @@ var Emiter_default = [
|
|
|
15571
15643
|
}
|
|
15572
15644
|
]
|
|
15573
15645
|
},
|
|
15646
|
+
{
|
|
15647
|
+
type: "event",
|
|
15648
|
+
anonymous: false,
|
|
15649
|
+
name: "UserSpecialFeeTierUpdated",
|
|
15650
|
+
inputs: [
|
|
15651
|
+
{
|
|
15652
|
+
type: "address",
|
|
15653
|
+
name: "broker",
|
|
15654
|
+
indexed: false
|
|
15655
|
+
},
|
|
15656
|
+
{
|
|
15657
|
+
type: "address",
|
|
15658
|
+
name: "user",
|
|
15659
|
+
indexed: false
|
|
15660
|
+
},
|
|
15661
|
+
{
|
|
15662
|
+
type: "uint8",
|
|
15663
|
+
name: "oldTier",
|
|
15664
|
+
indexed: false
|
|
15665
|
+
},
|
|
15666
|
+
{
|
|
15667
|
+
type: "uint8",
|
|
15668
|
+
name: "newTier",
|
|
15669
|
+
indexed: false
|
|
15670
|
+
}
|
|
15671
|
+
]
|
|
15672
|
+
},
|
|
15574
15673
|
{
|
|
15575
15674
|
type: "function",
|
|
15576
15675
|
name: "UPGRADE_INTERFACE_VERSION",
|
|
@@ -15586,7 +15685,7 @@ var Emiter_default = [
|
|
|
15586
15685
|
},
|
|
15587
15686
|
{
|
|
15588
15687
|
type: "function",
|
|
15589
|
-
name: "
|
|
15688
|
+
name: "emitCollateralAccepted",
|
|
15590
15689
|
constant: false,
|
|
15591
15690
|
payable: false,
|
|
15592
15691
|
inputs: [
|
|
@@ -15595,20 +15694,28 @@ var Emiter_default = [
|
|
|
15595
15694
|
name: "params",
|
|
15596
15695
|
components: [
|
|
15597
15696
|
{
|
|
15598
|
-
type: "
|
|
15599
|
-
name: "
|
|
15697
|
+
type: "bytes32",
|
|
15698
|
+
name: "poolId"
|
|
15600
15699
|
},
|
|
15601
15700
|
{
|
|
15602
|
-
type: "
|
|
15603
|
-
name: "
|
|
15701
|
+
type: "uint256",
|
|
15702
|
+
name: "quoteDebt"
|
|
15604
15703
|
},
|
|
15605
15704
|
{
|
|
15606
|
-
type: "
|
|
15607
|
-
name: "
|
|
15705
|
+
type: "uint256",
|
|
15706
|
+
name: "baseCollateral"
|
|
15608
15707
|
},
|
|
15609
15708
|
{
|
|
15610
|
-
type: "
|
|
15611
|
-
name: "
|
|
15709
|
+
type: "uint256",
|
|
15710
|
+
name: "quoteCollateral"
|
|
15711
|
+
},
|
|
15712
|
+
{
|
|
15713
|
+
type: "uint256",
|
|
15714
|
+
name: "totalQuoteDebt"
|
|
15715
|
+
},
|
|
15716
|
+
{
|
|
15717
|
+
type: "uint256",
|
|
15718
|
+
name: "totalBaseCollateral"
|
|
15612
15719
|
}
|
|
15613
15720
|
]
|
|
15614
15721
|
}
|
|
@@ -15617,7 +15724,7 @@ var Emiter_default = [
|
|
|
15617
15724
|
},
|
|
15618
15725
|
{
|
|
15619
15726
|
type: "function",
|
|
15620
|
-
name: "
|
|
15727
|
+
name: "emitCollateralAdjusted",
|
|
15621
15728
|
constant: false,
|
|
15622
15729
|
payable: false,
|
|
15623
15730
|
inputs: [
|
|
@@ -15626,28 +15733,28 @@ var Emiter_default = [
|
|
|
15626
15733
|
name: "params",
|
|
15627
15734
|
components: [
|
|
15628
15735
|
{
|
|
15629
|
-
type: "
|
|
15630
|
-
name: "
|
|
15736
|
+
type: "address",
|
|
15737
|
+
name: "user"
|
|
15631
15738
|
},
|
|
15632
15739
|
{
|
|
15633
|
-
type: "
|
|
15634
|
-
name: "
|
|
15740
|
+
type: "bytes32",
|
|
15741
|
+
name: "poolId"
|
|
15635
15742
|
},
|
|
15636
15743
|
{
|
|
15637
|
-
type: "
|
|
15638
|
-
name: "
|
|
15744
|
+
type: "bytes32",
|
|
15745
|
+
name: "positionId"
|
|
15639
15746
|
},
|
|
15640
15747
|
{
|
|
15641
|
-
type: "
|
|
15642
|
-
name: "
|
|
15748
|
+
type: "uint8",
|
|
15749
|
+
name: "direction"
|
|
15643
15750
|
},
|
|
15644
15751
|
{
|
|
15645
15752
|
type: "uint256",
|
|
15646
|
-
name: "
|
|
15753
|
+
name: "beforeCollateralAmount"
|
|
15647
15754
|
},
|
|
15648
15755
|
{
|
|
15649
15756
|
type: "uint256",
|
|
15650
|
-
name: "
|
|
15757
|
+
name: "afterCollateralAmount"
|
|
15651
15758
|
}
|
|
15652
15759
|
]
|
|
15653
15760
|
}
|
|
@@ -15827,6 +15934,10 @@ var Emiter_default = [
|
|
|
15827
15934
|
{
|
|
15828
15935
|
type: "bytes32",
|
|
15829
15936
|
name: "poolId"
|
|
15937
|
+
},
|
|
15938
|
+
{
|
|
15939
|
+
type: "string",
|
|
15940
|
+
name: "reason"
|
|
15830
15941
|
}
|
|
15831
15942
|
]
|
|
15832
15943
|
}
|
|
@@ -15894,6 +16005,10 @@ var Emiter_default = [
|
|
|
15894
16005
|
type: "uint256",
|
|
15895
16006
|
name: "orderId"
|
|
15896
16007
|
},
|
|
16008
|
+
{
|
|
16009
|
+
type: "bytes32",
|
|
16010
|
+
name: "poolId"
|
|
16011
|
+
},
|
|
15897
16012
|
{
|
|
15898
16013
|
type: "address",
|
|
15899
16014
|
name: "executor"
|
|
@@ -15996,7 +16111,7 @@ var Emiter_default = [
|
|
|
15996
16111
|
name: "poolId"
|
|
15997
16112
|
},
|
|
15998
16113
|
{
|
|
15999
|
-
type: "
|
|
16114
|
+
type: "bytes32",
|
|
16000
16115
|
name: "positionId"
|
|
16001
16116
|
},
|
|
16002
16117
|
{
|
|
@@ -16038,6 +16153,18 @@ var Emiter_default = [
|
|
|
16038
16153
|
{
|
|
16039
16154
|
type: "int256",
|
|
16040
16155
|
name: "fundingFee"
|
|
16156
|
+
},
|
|
16157
|
+
{
|
|
16158
|
+
type: "address",
|
|
16159
|
+
name: "executionFeeToken"
|
|
16160
|
+
},
|
|
16161
|
+
{
|
|
16162
|
+
type: "uint256",
|
|
16163
|
+
name: "executionFeeAmount"
|
|
16164
|
+
},
|
|
16165
|
+
{
|
|
16166
|
+
type: "address",
|
|
16167
|
+
name: "keeper"
|
|
16041
16168
|
}
|
|
16042
16169
|
]
|
|
16043
16170
|
}
|
|
@@ -16106,7 +16233,7 @@ var Emiter_default = [
|
|
|
16106
16233
|
name: "poolId"
|
|
16107
16234
|
},
|
|
16108
16235
|
{
|
|
16109
|
-
type: "
|
|
16236
|
+
type: "bytes32",
|
|
16110
16237
|
name: "positionId"
|
|
16111
16238
|
},
|
|
16112
16239
|
{
|
|
@@ -16755,7 +16882,7 @@ var Emiter_default = [
|
|
|
16755
16882
|
name: "poolId"
|
|
16756
16883
|
},
|
|
16757
16884
|
{
|
|
16758
|
-
type: "
|
|
16885
|
+
type: "bytes32",
|
|
16759
16886
|
name: "positionId"
|
|
16760
16887
|
},
|
|
16761
16888
|
{
|
|
@@ -16802,7 +16929,7 @@ var Emiter_default = [
|
|
|
16802
16929
|
name: "poolId"
|
|
16803
16930
|
},
|
|
16804
16931
|
{
|
|
16805
|
-
type: "
|
|
16932
|
+
type: "bytes32",
|
|
16806
16933
|
name: "positionId"
|
|
16807
16934
|
},
|
|
16808
16935
|
{
|
|
@@ -16849,7 +16976,7 @@ var Emiter_default = [
|
|
|
16849
16976
|
name: "poolId"
|
|
16850
16977
|
},
|
|
16851
16978
|
{
|
|
16852
|
-
type: "
|
|
16979
|
+
type: "bytes32",
|
|
16853
16980
|
name: "positionId"
|
|
16854
16981
|
},
|
|
16855
16982
|
{
|
|
@@ -16875,7 +17002,7 @@ var Emiter_default = [
|
|
|
16875
17002
|
},
|
|
16876
17003
|
{
|
|
16877
17004
|
type: "function",
|
|
16878
|
-
name: "
|
|
17005
|
+
name: "emitPositionNFTMinted",
|
|
16879
17006
|
constant: false,
|
|
16880
17007
|
payable: false,
|
|
16881
17008
|
inputs: [
|
|
@@ -16884,16 +17011,28 @@ var Emiter_default = [
|
|
|
16884
17011
|
name: "params",
|
|
16885
17012
|
components: [
|
|
16886
17013
|
{
|
|
16887
|
-
type: "
|
|
16888
|
-
name: "
|
|
17014
|
+
type: "bytes32",
|
|
17015
|
+
name: "poolId"
|
|
16889
17016
|
},
|
|
16890
17017
|
{
|
|
16891
|
-
type: "
|
|
16892
|
-
name: "
|
|
17018
|
+
type: "bytes32",
|
|
17019
|
+
name: "oldPositionId"
|
|
17020
|
+
},
|
|
17021
|
+
{
|
|
17022
|
+
type: "bytes32",
|
|
17023
|
+
name: "newPositionId"
|
|
16893
17024
|
},
|
|
16894
17025
|
{
|
|
16895
17026
|
type: "uint256",
|
|
16896
|
-
name: "
|
|
17027
|
+
name: "tokenId"
|
|
17028
|
+
},
|
|
17029
|
+
{
|
|
17030
|
+
type: "address",
|
|
17031
|
+
name: "owner"
|
|
17032
|
+
},
|
|
17033
|
+
{
|
|
17034
|
+
type: "address",
|
|
17035
|
+
name: "recipient"
|
|
16897
17036
|
}
|
|
16898
17037
|
]
|
|
16899
17038
|
}
|
|
@@ -16902,7 +17041,34 @@ var Emiter_default = [
|
|
|
16902
17041
|
},
|
|
16903
17042
|
{
|
|
16904
17043
|
type: "function",
|
|
16905
|
-
name: "
|
|
17044
|
+
name: "emitPositionTransfer",
|
|
17045
|
+
constant: false,
|
|
17046
|
+
payable: false,
|
|
17047
|
+
inputs: [
|
|
17048
|
+
{
|
|
17049
|
+
type: "tuple",
|
|
17050
|
+
name: "params",
|
|
17051
|
+
components: [
|
|
17052
|
+
{
|
|
17053
|
+
type: "address",
|
|
17054
|
+
name: "from"
|
|
17055
|
+
},
|
|
17056
|
+
{
|
|
17057
|
+
type: "address",
|
|
17058
|
+
name: "to"
|
|
17059
|
+
},
|
|
17060
|
+
{
|
|
17061
|
+
type: "bytes32",
|
|
17062
|
+
name: "positionId"
|
|
17063
|
+
}
|
|
17064
|
+
]
|
|
17065
|
+
}
|
|
17066
|
+
],
|
|
17067
|
+
outputs: []
|
|
17068
|
+
},
|
|
17069
|
+
{
|
|
17070
|
+
type: "function",
|
|
17071
|
+
name: "emitPositionUpdated",
|
|
16906
17072
|
constant: false,
|
|
16907
17073
|
payable: false,
|
|
16908
17074
|
inputs: [
|
|
@@ -16919,7 +17085,7 @@ var Emiter_default = [
|
|
|
16919
17085
|
name: "owner"
|
|
16920
17086
|
},
|
|
16921
17087
|
{
|
|
16922
|
-
type: "
|
|
17088
|
+
type: "bytes32",
|
|
16923
17089
|
name: "positionId"
|
|
16924
17090
|
},
|
|
16925
17091
|
{
|
|
@@ -17108,6 +17274,45 @@ var Emiter_default = [
|
|
|
17108
17274
|
],
|
|
17109
17275
|
outputs: []
|
|
17110
17276
|
},
|
|
17277
|
+
{
|
|
17278
|
+
type: "function",
|
|
17279
|
+
name: "emitTradingFeeTierUpdated",
|
|
17280
|
+
constant: false,
|
|
17281
|
+
payable: false,
|
|
17282
|
+
inputs: [
|
|
17283
|
+
{
|
|
17284
|
+
type: "tuple",
|
|
17285
|
+
name: "params",
|
|
17286
|
+
components: [
|
|
17287
|
+
{
|
|
17288
|
+
type: "address",
|
|
17289
|
+
name: "broker"
|
|
17290
|
+
},
|
|
17291
|
+
{
|
|
17292
|
+
type: "uint8",
|
|
17293
|
+
name: "feeType"
|
|
17294
|
+
},
|
|
17295
|
+
{
|
|
17296
|
+
type: "uint8",
|
|
17297
|
+
name: "tier"
|
|
17298
|
+
},
|
|
17299
|
+
{
|
|
17300
|
+
type: "uint32",
|
|
17301
|
+
name: "takerFeeRate"
|
|
17302
|
+
},
|
|
17303
|
+
{
|
|
17304
|
+
type: "int32",
|
|
17305
|
+
name: "makerFeeRate"
|
|
17306
|
+
},
|
|
17307
|
+
{
|
|
17308
|
+
type: "bool",
|
|
17309
|
+
name: "isEnabled"
|
|
17310
|
+
}
|
|
17311
|
+
]
|
|
17312
|
+
}
|
|
17313
|
+
],
|
|
17314
|
+
outputs: []
|
|
17315
|
+
},
|
|
17111
17316
|
{
|
|
17112
17317
|
type: "function",
|
|
17113
17318
|
name: "emitUserFeeDataUpdated",
|
|
@@ -17190,7 +17395,7 @@ var Emiter_default = [
|
|
|
17190
17395
|
name: "fundingFee"
|
|
17191
17396
|
},
|
|
17192
17397
|
{
|
|
17193
|
-
type: "
|
|
17398
|
+
type: "int32",
|
|
17194
17399
|
name: "tradingFeeRate"
|
|
17195
17400
|
},
|
|
17196
17401
|
{
|
|
@@ -17232,29 +17437,42 @@ var Emiter_default = [
|
|
|
17232
17437
|
},
|
|
17233
17438
|
{
|
|
17234
17439
|
type: "function",
|
|
17235
|
-
name: "
|
|
17236
|
-
constant:
|
|
17237
|
-
stateMutability: "view",
|
|
17440
|
+
name: "emitUserSpecialFeeTierUpdated",
|
|
17441
|
+
constant: false,
|
|
17238
17442
|
payable: false,
|
|
17239
|
-
inputs: [
|
|
17240
|
-
outputs: [
|
|
17443
|
+
inputs: [
|
|
17241
17444
|
{
|
|
17242
|
-
type: "
|
|
17445
|
+
type: "tuple",
|
|
17446
|
+
name: "params",
|
|
17447
|
+
components: [
|
|
17448
|
+
{
|
|
17449
|
+
type: "address",
|
|
17450
|
+
name: "broker"
|
|
17451
|
+
},
|
|
17452
|
+
{
|
|
17453
|
+
type: "address",
|
|
17454
|
+
name: "user"
|
|
17455
|
+
},
|
|
17456
|
+
{
|
|
17457
|
+
type: "uint8",
|
|
17458
|
+
name: "oldTier"
|
|
17459
|
+
},
|
|
17460
|
+
{
|
|
17461
|
+
type: "uint8",
|
|
17462
|
+
name: "newTier"
|
|
17463
|
+
}
|
|
17464
|
+
]
|
|
17243
17465
|
}
|
|
17244
|
-
]
|
|
17466
|
+
],
|
|
17467
|
+
outputs: []
|
|
17245
17468
|
},
|
|
17246
17469
|
{
|
|
17247
17470
|
type: "function",
|
|
17248
|
-
name: "
|
|
17471
|
+
name: "getAddressManager",
|
|
17249
17472
|
constant: true,
|
|
17250
17473
|
stateMutability: "view",
|
|
17251
17474
|
payable: false,
|
|
17252
|
-
inputs: [
|
|
17253
|
-
{
|
|
17254
|
-
type: "bytes32",
|
|
17255
|
-
name: "identifier"
|
|
17256
|
-
}
|
|
17257
|
-
],
|
|
17475
|
+
inputs: [],
|
|
17258
17476
|
outputs: [
|
|
17259
17477
|
{
|
|
17260
17478
|
type: "address"
|
|
@@ -17263,19 +17481,19 @@ var Emiter_default = [
|
|
|
17263
17481
|
},
|
|
17264
17482
|
{
|
|
17265
17483
|
type: "function",
|
|
17266
|
-
name: "
|
|
17484
|
+
name: "getDependencyAddress",
|
|
17267
17485
|
constant: true,
|
|
17268
17486
|
stateMutability: "view",
|
|
17269
17487
|
payable: false,
|
|
17270
17488
|
inputs: [
|
|
17271
17489
|
{
|
|
17272
|
-
type: "
|
|
17273
|
-
name: "
|
|
17490
|
+
type: "bytes32",
|
|
17491
|
+
name: "identifier"
|
|
17274
17492
|
}
|
|
17275
17493
|
],
|
|
17276
17494
|
outputs: [
|
|
17277
17495
|
{
|
|
17278
|
-
type: "
|
|
17496
|
+
type: "address"
|
|
17279
17497
|
}
|
|
17280
17498
|
]
|
|
17281
17499
|
},
|
|
@@ -17349,19 +17567,6 @@ var Emiter_default = [
|
|
|
17349
17567
|
],
|
|
17350
17568
|
outputs: []
|
|
17351
17569
|
},
|
|
17352
|
-
{
|
|
17353
|
-
type: "function",
|
|
17354
|
-
name: "registerDependencies",
|
|
17355
|
-
constant: false,
|
|
17356
|
-
payable: false,
|
|
17357
|
-
inputs: [
|
|
17358
|
-
{
|
|
17359
|
-
type: "bytes32[]",
|
|
17360
|
-
name: "identifiers"
|
|
17361
|
-
}
|
|
17362
|
-
],
|
|
17363
|
-
outputs: []
|
|
17364
|
-
},
|
|
17365
17570
|
{
|
|
17366
17571
|
type: "function",
|
|
17367
17572
|
name: "sequencer",
|
|
@@ -17375,36 +17580,6 @@ var Emiter_default = [
|
|
|
17375
17580
|
}
|
|
17376
17581
|
]
|
|
17377
17582
|
},
|
|
17378
|
-
{
|
|
17379
|
-
type: "function",
|
|
17380
|
-
name: "unregisterDependencies",
|
|
17381
|
-
constant: false,
|
|
17382
|
-
payable: false,
|
|
17383
|
-
inputs: [
|
|
17384
|
-
{
|
|
17385
|
-
type: "bytes32[]",
|
|
17386
|
-
name: "identifiers"
|
|
17387
|
-
}
|
|
17388
|
-
],
|
|
17389
|
-
outputs: []
|
|
17390
|
-
},
|
|
17391
|
-
{
|
|
17392
|
-
type: "function",
|
|
17393
|
-
name: "update",
|
|
17394
|
-
constant: false,
|
|
17395
|
-
payable: false,
|
|
17396
|
-
inputs: [
|
|
17397
|
-
{
|
|
17398
|
-
type: "bytes32",
|
|
17399
|
-
name: "identifier"
|
|
17400
|
-
},
|
|
17401
|
-
{
|
|
17402
|
-
type: "address",
|
|
17403
|
-
name: "newAddress"
|
|
17404
|
-
}
|
|
17405
|
-
],
|
|
17406
|
-
outputs: []
|
|
17407
|
-
},
|
|
17408
17583
|
{
|
|
17409
17584
|
type: "function",
|
|
17410
17585
|
name: "upgradeTo",
|
|
@@ -17748,6 +17923,11 @@ var Account_default = [
|
|
|
17748
17923
|
name: "InvalidInitialization",
|
|
17749
17924
|
inputs: []
|
|
17750
17925
|
},
|
|
17926
|
+
{
|
|
17927
|
+
type: "error",
|
|
17928
|
+
name: "NotAddressManager",
|
|
17929
|
+
inputs: []
|
|
17930
|
+
},
|
|
17751
17931
|
{
|
|
17752
17932
|
type: "error",
|
|
17753
17933
|
name: "NotDependencyManager",
|
|
@@ -17957,6 +18137,19 @@ var Account_default = [
|
|
|
17957
18137
|
}
|
|
17958
18138
|
]
|
|
17959
18139
|
},
|
|
18140
|
+
{
|
|
18141
|
+
type: "function",
|
|
18142
|
+
name: "__ERC2771ContextUpgradeable_init",
|
|
18143
|
+
constant: false,
|
|
18144
|
+
payable: false,
|
|
18145
|
+
inputs: [
|
|
18146
|
+
{
|
|
18147
|
+
type: "address",
|
|
18148
|
+
name: "trustedForwarder_"
|
|
18149
|
+
}
|
|
18150
|
+
],
|
|
18151
|
+
outputs: []
|
|
18152
|
+
},
|
|
17960
18153
|
{
|
|
17961
18154
|
type: "function",
|
|
17962
18155
|
name: "deposit",
|
|
@@ -18009,24 +18202,6 @@ var Account_default = [
|
|
|
18009
18202
|
}
|
|
18010
18203
|
]
|
|
18011
18204
|
},
|
|
18012
|
-
{
|
|
18013
|
-
type: "function",
|
|
18014
|
-
name: "getDependencyIdentifier",
|
|
18015
|
-
constant: true,
|
|
18016
|
-
stateMutability: "view",
|
|
18017
|
-
payable: false,
|
|
18018
|
-
inputs: [
|
|
18019
|
-
{
|
|
18020
|
-
type: "address",
|
|
18021
|
-
name: "contractAddress"
|
|
18022
|
-
}
|
|
18023
|
-
],
|
|
18024
|
-
outputs: [
|
|
18025
|
-
{
|
|
18026
|
-
type: "bytes32"
|
|
18027
|
-
}
|
|
18028
|
-
]
|
|
18029
|
-
},
|
|
18030
18205
|
{
|
|
18031
18206
|
type: "function",
|
|
18032
18207
|
name: "getImplementation",
|
|
@@ -18068,6 +18243,28 @@ var Account_default = [
|
|
|
18068
18243
|
}
|
|
18069
18244
|
]
|
|
18070
18245
|
},
|
|
18246
|
+
{
|
|
18247
|
+
type: "function",
|
|
18248
|
+
name: "getUserAsset",
|
|
18249
|
+
constant: true,
|
|
18250
|
+
stateMutability: "view",
|
|
18251
|
+
payable: false,
|
|
18252
|
+
inputs: [
|
|
18253
|
+
{
|
|
18254
|
+
type: "address",
|
|
18255
|
+
name: "account"
|
|
18256
|
+
},
|
|
18257
|
+
{
|
|
18258
|
+
type: "bytes32",
|
|
18259
|
+
name: "marketId"
|
|
18260
|
+
}
|
|
18261
|
+
],
|
|
18262
|
+
outputs: [
|
|
18263
|
+
{
|
|
18264
|
+
type: "uint256"
|
|
18265
|
+
}
|
|
18266
|
+
]
|
|
18267
|
+
},
|
|
18071
18268
|
{
|
|
18072
18269
|
type: "function",
|
|
18073
18270
|
name: "getUserAssets",
|
|
@@ -18109,6 +18306,24 @@ var Account_default = [
|
|
|
18109
18306
|
],
|
|
18110
18307
|
outputs: []
|
|
18111
18308
|
},
|
|
18309
|
+
{
|
|
18310
|
+
type: "function",
|
|
18311
|
+
name: "isTrustedForwarder",
|
|
18312
|
+
constant: true,
|
|
18313
|
+
stateMutability: "view",
|
|
18314
|
+
payable: false,
|
|
18315
|
+
inputs: [
|
|
18316
|
+
{
|
|
18317
|
+
type: "address",
|
|
18318
|
+
name: "forwarder"
|
|
18319
|
+
}
|
|
18320
|
+
],
|
|
18321
|
+
outputs: [
|
|
18322
|
+
{
|
|
18323
|
+
type: "bool"
|
|
18324
|
+
}
|
|
18325
|
+
]
|
|
18326
|
+
},
|
|
18112
18327
|
{
|
|
18113
18328
|
type: "function",
|
|
18114
18329
|
name: "payWithPrincipal",
|
|
@@ -18173,19 +18388,6 @@ var Account_default = [
|
|
|
18173
18388
|
}
|
|
18174
18389
|
]
|
|
18175
18390
|
},
|
|
18176
|
-
{
|
|
18177
|
-
type: "function",
|
|
18178
|
-
name: "registerDependencies",
|
|
18179
|
-
constant: false,
|
|
18180
|
-
payable: false,
|
|
18181
|
-
inputs: [
|
|
18182
|
-
{
|
|
18183
|
-
type: "bytes32[]",
|
|
18184
|
-
name: "identifiers"
|
|
18185
|
-
}
|
|
18186
|
-
],
|
|
18187
|
-
outputs: []
|
|
18188
|
-
},
|
|
18189
18391
|
{
|
|
18190
18392
|
type: "function",
|
|
18191
18393
|
name: "releaseFromProfitUnlock",
|
|
@@ -18222,8 +18424,66 @@ var Account_default = [
|
|
|
18222
18424
|
name: "user"
|
|
18223
18425
|
},
|
|
18224
18426
|
{
|
|
18225
|
-
type: "
|
|
18226
|
-
name: "
|
|
18427
|
+
type: "tuple",
|
|
18428
|
+
name: "pool",
|
|
18429
|
+
components: [
|
|
18430
|
+
{
|
|
18431
|
+
type: "bytes32",
|
|
18432
|
+
name: "marketId"
|
|
18433
|
+
},
|
|
18434
|
+
{
|
|
18435
|
+
type: "bytes32",
|
|
18436
|
+
name: "poolId"
|
|
18437
|
+
},
|
|
18438
|
+
{
|
|
18439
|
+
type: "address",
|
|
18440
|
+
name: "baseToken"
|
|
18441
|
+
},
|
|
18442
|
+
{
|
|
18443
|
+
type: "address",
|
|
18444
|
+
name: "quoteToken"
|
|
18445
|
+
},
|
|
18446
|
+
{
|
|
18447
|
+
type: "uint8",
|
|
18448
|
+
name: "riskTier"
|
|
18449
|
+
},
|
|
18450
|
+
{
|
|
18451
|
+
type: "uint8",
|
|
18452
|
+
name: "state"
|
|
18453
|
+
},
|
|
18454
|
+
{
|
|
18455
|
+
type: "address",
|
|
18456
|
+
name: "basePoolToken"
|
|
18457
|
+
},
|
|
18458
|
+
{
|
|
18459
|
+
type: "address",
|
|
18460
|
+
name: "quotePoolToken"
|
|
18461
|
+
},
|
|
18462
|
+
{
|
|
18463
|
+
type: "uint16",
|
|
18464
|
+
name: "maxPriceDeviation"
|
|
18465
|
+
},
|
|
18466
|
+
{
|
|
18467
|
+
type: "bool",
|
|
18468
|
+
name: "compoundEnabled"
|
|
18469
|
+
},
|
|
18470
|
+
{
|
|
18471
|
+
type: "uint64",
|
|
18472
|
+
name: "windowCapUsd"
|
|
18473
|
+
},
|
|
18474
|
+
{
|
|
18475
|
+
type: "address",
|
|
18476
|
+
name: "poolVault"
|
|
18477
|
+
},
|
|
18478
|
+
{
|
|
18479
|
+
type: "address",
|
|
18480
|
+
name: "settler"
|
|
18481
|
+
},
|
|
18482
|
+
{
|
|
18483
|
+
type: "address",
|
|
18484
|
+
name: "tradingVault"
|
|
18485
|
+
}
|
|
18486
|
+
]
|
|
18227
18487
|
},
|
|
18228
18488
|
{
|
|
18229
18489
|
type: "uint256",
|
|
@@ -18246,16 +18506,16 @@ var Account_default = [
|
|
|
18246
18506
|
},
|
|
18247
18507
|
{
|
|
18248
18508
|
type: "function",
|
|
18249
|
-
name: "
|
|
18250
|
-
constant:
|
|
18509
|
+
name: "trustedForwarder",
|
|
18510
|
+
constant: true,
|
|
18511
|
+
stateMutability: "view",
|
|
18251
18512
|
payable: false,
|
|
18252
|
-
inputs: [
|
|
18513
|
+
inputs: [],
|
|
18514
|
+
outputs: [
|
|
18253
18515
|
{
|
|
18254
|
-
type: "
|
|
18255
|
-
name: "identifiers"
|
|
18516
|
+
type: "address"
|
|
18256
18517
|
}
|
|
18257
|
-
]
|
|
18258
|
-
outputs: []
|
|
18518
|
+
]
|
|
18259
18519
|
},
|
|
18260
18520
|
{
|
|
18261
18521
|
type: "function",
|
|
@@ -18307,6 +18567,10 @@ var Account_default = [
|
|
|
18307
18567
|
type: "address",
|
|
18308
18568
|
name: "receiver"
|
|
18309
18569
|
},
|
|
18570
|
+
{
|
|
18571
|
+
type: "bool",
|
|
18572
|
+
name: "isQuoteToken"
|
|
18573
|
+
},
|
|
18310
18574
|
{
|
|
18311
18575
|
type: "uint256",
|
|
18312
18576
|
name: "amount"
|
|
@@ -18927,7 +19191,7 @@ var Account = class {
|
|
|
18927
19191
|
try {
|
|
18928
19192
|
const account = await config.signer?.getAddress() ?? "";
|
|
18929
19193
|
console.log("withdraw", account, amount, poolId);
|
|
18930
|
-
const rs = await accountContract.withdraw(poolId, account, amount);
|
|
19194
|
+
const rs = await accountContract.withdraw(poolId, account, true, amount);
|
|
18931
19195
|
const receipt = await rs?.wait(1);
|
|
18932
19196
|
return {
|
|
18933
19197
|
code: 0,
|