@reyaxyz/common 0.344.0 → 0.344.1-perpob.110

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.
Files changed (140) hide show
  1. package/README.md +1 -1
  2. package/dist/commands/exposure/command.js +8 -22
  3. package/dist/commands/exposure/command.js.map +1 -1
  4. package/dist/incentives-api-types.js.map +1 -1
  5. package/dist/rest/helpers/constants.js +12 -0
  6. package/dist/rest/helpers/constants.js.map +1 -1
  7. package/dist/services/getNativeToken.js +1 -0
  8. package/dist/services/getNativeToken.js.map +1 -1
  9. package/dist/services/getSocketAddresses.js +1 -0
  10. package/dist/services/getSocketAddresses.js.map +1 -1
  11. package/dist/trading-api-types.js.map +1 -1
  12. package/dist/transactions/abis/Errors.json +1283 -34
  13. package/dist/transactions/abis/OrdersGateway.json +729 -123
  14. package/dist/transactions/abis/PassivePerpProxy.json +542 -0
  15. package/dist/transactions/buildMulticallTx.js.map +1 -1
  16. package/dist/transactions/consts.js +1 -2
  17. package/dist/transactions/consts.js.map +1 -1
  18. package/dist/transactions/contractAddresses.js +46 -5
  19. package/dist/transactions/contractAddresses.js.map +1 -1
  20. package/dist/transactions/executeTransaction.js +8 -123
  21. package/dist/transactions/executeTransaction.js.map +1 -1
  22. package/dist/transactions/sign.js +285 -79
  23. package/dist/transactions/sign.js.map +1 -1
  24. package/dist/types/commands/exposure/command.d.ts +8 -7
  25. package/dist/types/commands/exposure/command.d.ts.map +1 -1
  26. package/dist/types/incentives-api-types.d.ts +40 -17
  27. package/dist/types/incentives-api-types.d.ts.map +1 -1
  28. package/dist/types/rest/helpers/constants.d.ts +1 -1
  29. package/dist/types/rest/helpers/constants.d.ts.map +1 -1
  30. package/dist/types/services/getNativeToken.d.ts.map +1 -1
  31. package/dist/types/services/getSocketAddresses.d.ts.map +1 -1
  32. package/dist/types/trading-api-types.d.ts +144 -94
  33. package/dist/types/trading-api-types.d.ts.map +1 -1
  34. package/dist/types/transactions/buildMulticallTx.d.ts +1 -0
  35. package/dist/types/transactions/buildMulticallTx.d.ts.map +1 -1
  36. package/dist/types/transactions/consts.d.ts +0 -1
  37. package/dist/types/transactions/consts.d.ts.map +1 -1
  38. package/dist/types/transactions/contractAddresses.d.ts +1 -1
  39. package/dist/types/transactions/contractAddresses.d.ts.map +1 -1
  40. package/dist/types/transactions/executeTransaction.d.ts +2 -15
  41. package/dist/types/transactions/executeTransaction.d.ts.map +1 -1
  42. package/dist/types/transactions/sign.d.ts +117 -6
  43. package/dist/types/transactions/sign.d.ts.map +1 -1
  44. package/dist/types/types.d.ts +52 -64
  45. package/dist/types/types.d.ts.map +1 -1
  46. package/dist/types/utils/calculate.d.ts +14 -2
  47. package/dist/types/utils/calculate.d.ts.map +1 -1
  48. package/dist/types/utils/compute-trade-pnl.d.ts +39 -0
  49. package/dist/types/utils/compute-trade-pnl.d.ts.map +1 -0
  50. package/dist/types/utils/consts.d.ts +2 -2
  51. package/dist/types/utils/consts.d.ts.map +1 -1
  52. package/dist/types/utils/error-sanitizer.d.ts +15 -0
  53. package/dist/types/utils/error-sanitizer.d.ts.map +1 -0
  54. package/dist/types/utils/index.d.ts +3 -0
  55. package/dist/types/utils/index.d.ts.map +1 -1
  56. package/dist/types/utils/layerzero.d.ts +22 -0
  57. package/dist/types/utils/layerzero.d.ts.map +1 -0
  58. package/dist/types/utils/network.d.ts.map +1 -1
  59. package/dist/types/utils/throttled-error.d.ts +42 -0
  60. package/dist/types/utils/throttled-error.d.ts.map +1 -0
  61. package/dist/types/utils/token/batch-token-getters.d.ts +0 -5
  62. package/dist/types/utils/token/batch-token-getters.d.ts.map +1 -1
  63. package/dist/types/utils/token/normalize.d.ts +2 -1
  64. package/dist/types/utils/token/normalize.d.ts.map +1 -1
  65. package/dist/types/utils/token/token-getters.d.ts +0 -2
  66. package/dist/types/utils/token/token-getters.d.ts.map +1 -1
  67. package/dist/types/utils/token/token-info-getters.d.ts.map +1 -1
  68. package/dist/types/utils/token/token-info.d.ts.map +1 -1
  69. package/dist/types.js +41 -11
  70. package/dist/types.js.map +1 -1
  71. package/dist/utils/calculate.js +137 -16
  72. package/dist/utils/calculate.js.map +1 -1
  73. package/dist/utils/compute-trade-pnl.js +60 -0
  74. package/dist/utils/compute-trade-pnl.js.map +1 -0
  75. package/dist/utils/consts.js +8 -13
  76. package/dist/utils/consts.js.map +1 -1
  77. package/dist/utils/error-sanitizer.js +135 -0
  78. package/dist/utils/error-sanitizer.js.map +1 -0
  79. package/dist/utils/index.js +3 -0
  80. package/dist/utils/index.js.map +1 -1
  81. package/dist/utils/layerzero.js +31 -0
  82. package/dist/utils/layerzero.js.map +1 -0
  83. package/dist/utils/network.js +4 -0
  84. package/dist/utils/network.js.map +1 -1
  85. package/dist/utils/throttled-error.js +60 -0
  86. package/dist/utils/throttled-error.js.map +1 -0
  87. package/dist/utils/token/batch-token-getters.js +13 -64
  88. package/dist/utils/token/batch-token-getters.js.map +1 -1
  89. package/dist/utils/token/normalize.js +2 -2
  90. package/dist/utils/token/normalize.js.map +1 -1
  91. package/dist/utils/token/token-getters.js +1 -42
  92. package/dist/utils/token/token-getters.js.map +1 -1
  93. package/dist/utils/token/token-info-getters.js +45 -4
  94. package/dist/utils/token/token-info-getters.js.map +1 -1
  95. package/dist/utils/token/token-info.js +6 -0
  96. package/dist/utils/token/token-info.js.map +1 -1
  97. package/package.json +3 -3
  98. package/src/commands/exposure/command.ts +8 -38
  99. package/src/incentives-api-types.ts +66 -33
  100. package/src/rest/helpers/constants.ts +22 -0
  101. package/src/services/getNativeToken.ts +1 -0
  102. package/src/services/getSocketAddresses.ts +1 -0
  103. package/src/trading-api-types.ts +175 -127
  104. package/src/transactions/abis/Errors.json +5133 -3884
  105. package/src/transactions/abis/OrdersGateway.json +730 -124
  106. package/src/transactions/abis/PassivePerpProxy.json +542 -0
  107. package/src/transactions/buildMulticallTx.ts +4 -0
  108. package/src/transactions/consts.ts +0 -1
  109. package/src/transactions/contractAddresses.ts +43 -6
  110. package/src/transactions/executeTransaction.ts +2 -130
  111. package/src/transactions/sign.ts +347 -93
  112. package/src/types.ts +90 -74
  113. package/src/utils/calculate.ts +181 -21
  114. package/src/utils/compute-trade-pnl.ts +110 -0
  115. package/src/utils/consts.ts +10 -22
  116. package/src/utils/error-sanitizer.ts +137 -0
  117. package/src/utils/index.ts +3 -0
  118. package/src/utils/layerzero.ts +66 -0
  119. package/src/utils/network.ts +4 -0
  120. package/src/utils/throttled-error.ts +85 -0
  121. package/src/utils/token/batch-token-getters.ts +0 -28
  122. package/src/utils/token/normalize.ts +6 -1
  123. package/src/utils/token/token-getters.ts +0 -29
  124. package/src/utils/token/token-info-getters.ts +54 -4
  125. package/src/utils/token/token-info.ts +35 -0
  126. package/dist/types/utils/layerzero/index.d.ts +0 -3
  127. package/dist/types/utils/layerzero/index.d.ts.map +0 -1
  128. package/dist/types/utils/layerzero/oft-config.d.ts +0 -4
  129. package/dist/types/utils/layerzero/oft-config.d.ts.map +0 -1
  130. package/dist/types/utils/layerzero/types.d.ts +0 -23
  131. package/dist/types/utils/layerzero/types.d.ts.map +0 -1
  132. package/dist/utils/layerzero/index.js +0 -19
  133. package/dist/utils/layerzero/index.js.map +0 -1
  134. package/dist/utils/layerzero/oft-config.js +0 -29
  135. package/dist/utils/layerzero/oft-config.js.map +0 -1
  136. package/dist/utils/layerzero/types.js +0 -3
  137. package/dist/utils/layerzero/types.js.map +0 -1
  138. package/src/utils/layerzero/index.ts +0 -2
  139. package/src/utils/layerzero/oft-config.ts +0 -32
  140. package/src/utils/layerzero/types.ts +0 -25
@@ -1777,39 +1777,6 @@
1777
1777
  }
1778
1778
  ]
1779
1779
  },
1780
- {
1781
- "type": "error",
1782
- "name": "InvalidMatchOrderFees",
1783
- "inputs": [
1784
- {
1785
- "name": "matchOrderFees",
1786
- "type": "tuple",
1787
- "internalType": "struct MatchOrderFees",
1788
- "components": [
1789
- {
1790
- "name": "protocolFeeCredit",
1791
- "type": "uint256",
1792
- "internalType": "uint256"
1793
- },
1794
- {
1795
- "name": "exchangeFeeCredit",
1796
- "type": "uint256",
1797
- "internalType": "uint256"
1798
- },
1799
- {
1800
- "name": "takerFeeDebit",
1801
- "type": "uint256",
1802
- "internalType": "uint256"
1803
- },
1804
- {
1805
- "name": "makerPayments",
1806
- "type": "int256[]",
1807
- "internalType": "int256[]"
1808
- }
1809
- ]
1810
- }
1811
- ]
1812
- },
1813
1780
  {
1814
1781
  "type": "error",
1815
1782
  "name": "InvalidNewParentCollateral",
@@ -3858,7 +3825,8 @@
3858
3825
  "internalType": "uint256"
3859
3826
  }
3860
3827
  ]
3861
- }, {
3828
+ },
3829
+ {
3862
3830
  "type": "error",
3863
3831
  "name": "CamelotSwapMinAmountOutBreached",
3864
3832
  "inputs": [
@@ -3931,6 +3899,1287 @@
3931
3899
  "type": "uint256"
3932
3900
  }
3933
3901
  ]
3902
+ },
3903
+ {
3904
+ "type": "error",
3905
+ "name": "BaseDeltaWrongSpacing",
3906
+ "inputs": [
3907
+ {
3908
+ "name": "baseDelta",
3909
+ "type": "int256",
3910
+ "internalType": "SD59x18"
3911
+ },
3912
+ {
3913
+ "name": "baseSpacing",
3914
+ "type": "uint256",
3915
+ "internalType": "UD60x18"
3916
+ }
3917
+ ]
3918
+ },
3919
+ {
3920
+ "type": "error",
3921
+ "name": "CoreOutputLengthMismatch",
3922
+ "inputs": []
3923
+ },
3924
+ {
3925
+ "type": "error",
3926
+ "name": "CounterpartyCannotBeReduceOnly",
3927
+ "inputs": []
3928
+ },
3929
+ {
3930
+ "type": "error",
3931
+ "name": "CounterpartyWrongDirection",
3932
+ "inputs": []
3933
+ },
3934
+ {
3935
+ "type": "error",
3936
+ "name": "FillExceedsOrderBaseDelta",
3937
+ "inputs": [
3938
+ {
3939
+ "name": "fillAmount",
3940
+ "type": "int256",
3941
+ "internalType": "SD59x18"
3942
+ },
3943
+ {
3944
+ "name": "orderBaseDelta",
3945
+ "type": "int256",
3946
+ "internalType": "SD59x18"
3947
+ },
3948
+ {
3949
+ "name": "isCounterparty",
3950
+ "type": "bool",
3951
+ "internalType": "bool"
3952
+ }
3953
+ ]
3954
+ },
3955
+ {
3956
+ "type": "error",
3957
+ "name": "InvalidFillPrice",
3958
+ "inputs": [
3959
+ {
3960
+ "name": "fillPrice",
3961
+ "type": "uint256",
3962
+ "internalType": "UD60x18"
3963
+ },
3964
+ {
3965
+ "name": "orderPrice",
3966
+ "type": "uint256",
3967
+ "internalType": "UD60x18"
3968
+ }
3969
+ ]
3970
+ },
3971
+ {
3972
+ "type": "error",
3973
+ "name": "InvalidTimeInForce",
3974
+ "inputs": [
3975
+ {
3976
+ "name": "timeInForce",
3977
+ "type": "uint8",
3978
+ "internalType": "uint8"
3979
+ }
3980
+ ]
3981
+ },
3982
+ {
3983
+ "type": "error",
3984
+ "name": "InvalidTriggerPrice",
3985
+ "inputs": [
3986
+ {
3987
+ "name": "orderType",
3988
+ "type": "uint8",
3989
+ "internalType": "enum OrderType"
3990
+ },
3991
+ {
3992
+ "name": "triggerPrice",
3993
+ "type": "uint256",
3994
+ "internalType": "uint256"
3995
+ }
3996
+ ]
3997
+ },
3998
+ {
3999
+ "type": "error",
4000
+ "name": "MarketIdMismatch",
4001
+ "inputs": [
4002
+ {
4003
+ "name": "accountOrderMarketId",
4004
+ "type": "uint128",
4005
+ "internalType": "uint128"
4006
+ },
4007
+ {
4008
+ "name": "counterpartyOrderMarketId",
4009
+ "type": "uint128",
4010
+ "internalType": "uint128"
4011
+ }
4012
+ ]
4013
+ },
4014
+ {
4015
+ "type": "error",
4016
+ "name": "MarketSpacingNotConfigured",
4017
+ "inputs": []
4018
+ },
4019
+ {
4020
+ "type": "error",
4021
+ "name": "MarketTypeMismatch",
4022
+ "inputs": [
4023
+ {
4024
+ "name": "accountMarketType",
4025
+ "type": "uint8",
4026
+ "internalType": "enum MarketType"
4027
+ },
4028
+ {
4029
+ "name": "counterpartyMarketType",
4030
+ "type": "uint8",
4031
+ "internalType": "enum MarketType"
4032
+ }
4033
+ ]
4034
+ },
4035
+ {
4036
+ "type": "error",
4037
+ "name": "MaxQuantityExceeded",
4038
+ "inputs": [
4039
+ {
4040
+ "name": "amount",
4041
+ "type": "uint256",
4042
+ "internalType": "uint256"
4043
+ },
4044
+ {
4045
+ "name": "maxQuantity",
4046
+ "type": "uint256",
4047
+ "internalType": "uint256"
4048
+ }
4049
+ ]
4050
+ },
4051
+ {
4052
+ "type": "error",
4053
+ "name": "OrderExpired",
4054
+ "inputs": [
4055
+ {
4056
+ "name": "expiresAfter",
4057
+ "type": "uint256",
4058
+ "internalType": "uint256"
4059
+ }
4060
+ ]
4061
+ },
4062
+ {
4063
+ "type": "error",
4064
+ "name": "PriceWrongSpacing",
4065
+ "inputs": [
4066
+ {
4067
+ "name": "price",
4068
+ "type": "uint256",
4069
+ "internalType": "UD60x18"
4070
+ },
4071
+ {
4072
+ "name": "priceSpacing",
4073
+ "type": "uint256",
4074
+ "internalType": "UD60x18"
4075
+ }
4076
+ ]
4077
+ },
4078
+ {
4079
+ "type": "error",
4080
+ "name": "SameOrderId",
4081
+ "inputs": []
4082
+ },
4083
+ {
4084
+ "type": "error",
4085
+ "name": "SignerNonceAlreadyUsed",
4086
+ "inputs": [
4087
+ {
4088
+ "name": "signer",
4089
+ "type": "address",
4090
+ "internalType": "address"
4091
+ },
4092
+ {
4093
+ "name": "nonce",
4094
+ "type": "uint256",
4095
+ "internalType": "uint256"
4096
+ }
4097
+ ]
4098
+ },
4099
+ {
4100
+ "type": "error",
4101
+ "name": "UnauthorizedMatchingEnginePublisher",
4102
+ "inputs": [
4103
+ {
4104
+ "name": "publisher",
4105
+ "type": "address",
4106
+ "internalType": "address"
4107
+ }
4108
+ ]
4109
+ },
4110
+ {
4111
+ "type": "error",
4112
+ "name": "UnauthorizedSigner",
4113
+ "inputs": [
4114
+ {
4115
+ "name": "addr",
4116
+ "type": "address",
4117
+ "internalType": "address"
4118
+ }
4119
+ ]
4120
+ },
4121
+ {
4122
+ "type": "error",
4123
+ "name": "UnsupportedOrderConfiguration",
4124
+ "inputs": [
4125
+ {
4126
+ "name": "marketType",
4127
+ "type": "uint8",
4128
+ "internalType": "enum MarketType"
4129
+ },
4130
+ {
4131
+ "name": "orderType",
4132
+ "type": "uint8",
4133
+ "internalType": "enum OrderType"
4134
+ },
4135
+ {
4136
+ "name": "reduceOnly",
4137
+ "type": "bool",
4138
+ "internalType": "bool"
4139
+ }
4140
+ ]
4141
+ },
4142
+ {
4143
+ "type": "error",
4144
+ "name": "ZeroAccountId",
4145
+ "inputs": []
4146
+ },
4147
+ {
4148
+ "type": "error",
4149
+ "name": "ZeroAmountIncrementNonce",
4150
+ "inputs": []
4151
+ },
4152
+ {
4153
+ "type": "error",
4154
+ "name": "ZeroBaseDelta",
4155
+ "inputs": []
4156
+ },
4157
+ {
4158
+ "type": "error",
4159
+ "name": "ZeroMarketId",
4160
+ "inputs": []
4161
+ },
4162
+ {
4163
+ "type": "error",
4164
+ "name": "ZeroOrderId",
4165
+ "inputs": []
4166
+ },
4167
+ {
4168
+ "type": "error",
4169
+ "name": "ZeroPrice",
4170
+ "inputs": []
4171
+ },
4172
+ {
4173
+ "type": "error",
4174
+ "name": "ZeroQuantity",
4175
+ "inputs": []
4176
+ },
4177
+ {
4178
+ "type": "error",
4179
+ "name": "FundingRateOutOfBounds",
4180
+ "inputs": [
4181
+ {
4182
+ "name": "marketId",
4183
+ "type": "uint128",
4184
+ "internalType": "uint128"
4185
+ },
4186
+ {
4187
+ "name": "rate",
4188
+ "type": "int256",
4189
+ "internalType": "int256"
4190
+ },
4191
+ {
4192
+ "name": "minRate",
4193
+ "type": "int256",
4194
+ "internalType": "int256"
4195
+ },
4196
+ {
4197
+ "name": "maxRate",
4198
+ "type": "int256",
4199
+ "internalType": "int256"
4200
+ }
4201
+ ]
4202
+ },
4203
+ {
4204
+ "type": "error",
4205
+ "name": "FundingRatePayloadIsInTheFuture",
4206
+ "inputs": [
4207
+ {
4208
+ "name": "marketId",
4209
+ "type": "uint128",
4210
+ "internalType": "uint128"
4211
+ },
4212
+ {
4213
+ "name": "payloadTimestamp",
4214
+ "type": "uint256",
4215
+ "internalType": "uint256"
4216
+ },
4217
+ {
4218
+ "name": "blockTimestamp",
4219
+ "type": "uint256",
4220
+ "internalType": "uint256"
4221
+ }
4222
+ ]
4223
+ },
4224
+ {
4225
+ "type": "error",
4226
+ "name": "FundingRatePayloadOlderThanLatest",
4227
+ "inputs": [
4228
+ {
4229
+ "name": "marketId",
4230
+ "type": "uint128",
4231
+ "internalType": "uint128"
4232
+ },
4233
+ {
4234
+ "name": "payloadTimestamp",
4235
+ "type": "uint256",
4236
+ "internalType": "uint256"
4237
+ },
4238
+ {
4239
+ "name": "latestTimestamp",
4240
+ "type": "uint256",
4241
+ "internalType": "uint256"
4242
+ }
4243
+ ]
4244
+ },
4245
+ {
4246
+ "type": "error",
4247
+ "name": "FundingRateStale",
4248
+ "inputs": [
4249
+ {
4250
+ "name": "marketId",
4251
+ "type": "uint128",
4252
+ "internalType": "uint128"
4253
+ },
4254
+ {
4255
+ "name": "rateTimestamp",
4256
+ "type": "uint256",
4257
+ "internalType": "uint256"
4258
+ },
4259
+ {
4260
+ "name": "blockTimestamp",
4261
+ "type": "uint256",
4262
+ "internalType": "uint256"
4263
+ },
4264
+ {
4265
+ "name": "maxStaleDuration",
4266
+ "type": "uint256",
4267
+ "internalType": "uint256"
4268
+ }
4269
+ ]
4270
+ },
4271
+ {
4272
+ "type": "error",
4273
+ "name": "MarkPricePayloadIsInTheFuture",
4274
+ "inputs": [
4275
+ {
4276
+ "name": "marketId",
4277
+ "type": "uint128",
4278
+ "internalType": "uint128"
4279
+ },
4280
+ {
4281
+ "name": "payloadTimestamp",
4282
+ "type": "uint256",
4283
+ "internalType": "uint256"
4284
+ },
4285
+ {
4286
+ "name": "blockTimestamp",
4287
+ "type": "uint256",
4288
+ "internalType": "uint256"
4289
+ }
4290
+ ]
4291
+ },
4292
+ {
4293
+ "type": "error",
4294
+ "name": "MarkPricePayloadOlderThanLatest",
4295
+ "inputs": [
4296
+ {
4297
+ "name": "marketId",
4298
+ "type": "uint128",
4299
+ "internalType": "uint128"
4300
+ },
4301
+ {
4302
+ "name": "payloadTimestamp",
4303
+ "type": "uint256",
4304
+ "internalType": "uint256"
4305
+ },
4306
+ {
4307
+ "name": "latestTimestamp",
4308
+ "type": "uint256",
4309
+ "internalType": "uint256"
4310
+ }
4311
+ ]
4312
+ },
4313
+ {
4314
+ "type": "error",
4315
+ "name": "MarkPriceStale",
4316
+ "inputs": [
4317
+ {
4318
+ "name": "marketId",
4319
+ "type": "uint128",
4320
+ "internalType": "uint128"
4321
+ },
4322
+ {
4323
+ "name": "priceTimestamp",
4324
+ "type": "uint256",
4325
+ "internalType": "uint256"
4326
+ },
4327
+ {
4328
+ "name": "blockTimestamp",
4329
+ "type": "uint256",
4330
+ "internalType": "uint256"
4331
+ },
4332
+ {
4333
+ "name": "maxStaleDuration",
4334
+ "type": "uint256",
4335
+ "internalType": "uint256"
4336
+ }
4337
+ ]
4338
+ },
4339
+ {
4340
+ "type": "error",
4341
+ "name": "OraclePublisherSignerMismatch",
4342
+ "inputs": [
4343
+ {
4344
+ "name": "expected",
4345
+ "type": "address",
4346
+ "internalType": "address"
4347
+ },
4348
+ {
4349
+ "name": "recovered",
4350
+ "type": "address",
4351
+ "internalType": "address"
4352
+ }
4353
+ ]
4354
+ },
4355
+ {
4356
+ "type": "error",
4357
+ "name": "PriceDeviationTooLarge",
4358
+ "inputs": [
4359
+ {
4360
+ "name": "marketId",
4361
+ "type": "uint128",
4362
+ "internalType": "uint128"
4363
+ },
4364
+ {
4365
+ "name": "price",
4366
+ "type": "uint256",
4367
+ "internalType": "UD60x18"
4368
+ },
4369
+ {
4370
+ "name": "referencePrice",
4371
+ "type": "uint256",
4372
+ "internalType": "UD60x18"
4373
+ },
4374
+ {
4375
+ "name": "maxDeviation",
4376
+ "type": "uint256",
4377
+ "internalType": "UD60x18"
4378
+ }
4379
+ ]
4380
+ },
4381
+ {
4382
+ "type": "error",
4383
+ "name": "UnauthorizedOraclePublisher",
4384
+ "inputs": [
4385
+ {
4386
+ "name": "publisher",
4387
+ "type": "address",
4388
+ "internalType": "address"
4389
+ }
4390
+ ]
4391
+ },
4392
+ {
4393
+ "type": "error",
4394
+ "name": "UnauthorizedOraclePusher",
4395
+ "inputs": [
4396
+ {
4397
+ "name": "pusher",
4398
+ "type": "address",
4399
+ "internalType": "address"
4400
+ }
4401
+ ]
4402
+ },
4403
+ {
4404
+ "type": "error",
4405
+ "name": "UnsupportedOracleDataType",
4406
+ "inputs": [
4407
+ {
4408
+ "name": "dataType",
4409
+ "type": "uint8",
4410
+ "internalType": "uint8"
4411
+ }
4412
+ ]
4413
+ },
4414
+ {
4415
+ "type": "error",
4416
+ "name": "BaseSpacingChangeMisalignsPositions",
4417
+ "inputs": [
4418
+ {
4419
+ "name": "marketId",
4420
+ "type": "uint128",
4421
+ "internalType": "uint128"
4422
+ },
4423
+ {
4424
+ "name": "oldBaseSpacing",
4425
+ "type": "uint256",
4426
+ "internalType": "UD60x18"
4427
+ },
4428
+ {
4429
+ "name": "newBaseSpacing",
4430
+ "type": "uint256",
4431
+ "internalType": "UD60x18"
4432
+ }
4433
+ ]
4434
+ },
4435
+ {
4436
+ "type": "error",
4437
+ "name": "ClosePriceAlreadyLocked",
4438
+ "inputs": [
4439
+ {
4440
+ "name": "marketId",
4441
+ "type": "uint128",
4442
+ "internalType": "uint128"
4443
+ }
4444
+ ]
4445
+ },
4446
+ {
4447
+ "type": "error",
4448
+ "name": "ClosePriceNotLocked",
4449
+ "inputs": [
4450
+ {
4451
+ "name": "marketId",
4452
+ "type": "uint128",
4453
+ "internalType": "uint128"
4454
+ }
4455
+ ]
4456
+ },
4457
+ {
4458
+ "type": "error",
4459
+ "name": "CustomAffiliateRateTooLarge",
4460
+ "inputs": []
4461
+ },
4462
+ {
4463
+ "type": "error",
4464
+ "name": "FeeDistributionMismatch",
4465
+ "inputs": [
4466
+ {
4467
+ "name": "distributed",
4468
+ "type": "uint256",
4469
+ "internalType": "uint256"
4470
+ },
4471
+ {
4472
+ "name": "takerFeeDebit",
4473
+ "type": "uint256",
4474
+ "internalType": "uint256"
4475
+ }
4476
+ ]
4477
+ },
4478
+ {
4479
+ "type": "error",
4480
+ "name": "ForceClosureResidueAboveMax",
4481
+ "inputs": [
4482
+ {
4483
+ "name": "closedLongBase",
4484
+ "type": "uint256",
4485
+ "internalType": "UD60x18"
4486
+ },
4487
+ {
4488
+ "name": "closedShortBase",
4489
+ "type": "uint256",
4490
+ "internalType": "UD60x18"
4491
+ },
4492
+ {
4493
+ "name": "openInterest",
4494
+ "type": "uint256",
4495
+ "internalType": "UD60x18"
4496
+ },
4497
+ {
4498
+ "name": "maxResidualBase",
4499
+ "type": "uint256",
4500
+ "internalType": "UD60x18"
4501
+ }
4502
+ ]
4503
+ },
4504
+ {
4505
+ "type": "error",
4506
+ "name": "InvalidPoolFeeShareConfig",
4507
+ "inputs": []
4508
+ },
4509
+ {
4510
+ "type": "error",
4511
+ "name": "MarketLockedForClosure",
4512
+ "inputs": [
4513
+ {
4514
+ "name": "marketId",
4515
+ "type": "uint128",
4516
+ "internalType": "uint128"
4517
+ }
4518
+ ]
4519
+ },
4520
+ {
4521
+ "type": "error",
4522
+ "name": "MarketNotInReduceOnly",
4523
+ "inputs": [
4524
+ {
4525
+ "name": "marketId",
4526
+ "type": "uint128",
4527
+ "internalType": "uint128"
4528
+ },
4529
+ {
4530
+ "name": "maxOpenBase",
4531
+ "type": "uint256",
4532
+ "internalType": "UD60x18"
4533
+ }
4534
+ ]
4535
+ },
4536
+ {
4537
+ "type": "error",
4538
+ "name": "MaxResidualBaseAboveSpacing",
4539
+ "inputs": [
4540
+ {
4541
+ "name": "maxResidualBase",
4542
+ "type": "uint256",
4543
+ "internalType": "UD60x18"
4544
+ },
4545
+ {
4546
+ "name": "baseSpacing",
4547
+ "type": "uint256",
4548
+ "internalType": "UD60x18"
4549
+ }
4550
+ ]
4551
+ },
4552
+ {
4553
+ "type": "error",
4554
+ "name": "NonSentinelStopQuantity",
4555
+ "inputs": [
4556
+ {
4557
+ "name": "quantity",
4558
+ "type": "int256",
4559
+ "internalType": "int256"
4560
+ }
4561
+ ]
4562
+ },
4563
+ {
4564
+ "type": "error",
4565
+ "name": "OgRebateRateTooLarge",
4566
+ "inputs": []
4567
+ },
4568
+ {
4569
+ "type": "error",
4570
+ "name": "OrderBaseNotAlignedToSpacing",
4571
+ "inputs": [
4572
+ {
4573
+ "name": "orderBase",
4574
+ "type": "uint256",
4575
+ "internalType": "UD60x18"
4576
+ },
4577
+ {
4578
+ "name": "baseSpacing",
4579
+ "type": "uint256",
4580
+ "internalType": "UD60x18"
4581
+ }
4582
+ ]
4583
+ },
4584
+ {
4585
+ "type": "error",
4586
+ "name": "RefereeRebateRateTooLarge",
4587
+ "inputs": []
4588
+ },
4589
+ {
4590
+ "type": "error",
4591
+ "name": "ReferrerRebateParameterTooLarge",
4592
+ "inputs": []
4593
+ },
4594
+ {
4595
+ "type": "error",
4596
+ "name": "ReservedSentinelQuantity",
4597
+ "inputs": [
4598
+ {
4599
+ "name": "quantity",
4600
+ "type": "int256",
4601
+ "internalType": "int256"
4602
+ }
4603
+ ]
4604
+ },
4605
+ {
4606
+ "type": "error",
4607
+ "name": "TakerFeeParameterTooLarge",
4608
+ "inputs": []
4609
+ },
4610
+ {
4611
+ "type": "error",
4612
+ "name": "UnexpectedFeeTransferCollateral",
4613
+ "inputs": [
4614
+ {
4615
+ "name": "marketId",
4616
+ "type": "uint128",
4617
+ "internalType": "uint128"
4618
+ },
4619
+ {
4620
+ "name": "collateral",
4621
+ "type": "address",
4622
+ "internalType": "address"
4623
+ },
4624
+ {
4625
+ "name": "quoteCollateral",
4626
+ "type": "address",
4627
+ "internalType": "address"
4628
+ }
4629
+ ]
4630
+ },
4631
+ {
4632
+ "type": "error",
4633
+ "name": "UnexpectedFeeTransferSource",
4634
+ "inputs": [
4635
+ {
4636
+ "name": "fromAccountId",
4637
+ "type": "uint128",
4638
+ "internalType": "uint128"
4639
+ },
4640
+ {
4641
+ "name": "taker",
4642
+ "type": "uint128",
4643
+ "internalType": "uint128"
4644
+ },
4645
+ {
4646
+ "name": "counterparty",
4647
+ "type": "uint128",
4648
+ "internalType": "uint128"
4649
+ },
4650
+ {
4651
+ "name": "protocolFeeCollector",
4652
+ "type": "uint128",
4653
+ "internalType": "uint128"
4654
+ }
4655
+ ]
4656
+ },
4657
+ {
4658
+ "type": "error",
4659
+ "name": "VltzRebateRateTooLarge",
4660
+ "inputs": []
4661
+ },
4662
+ {
4663
+ "type": "error",
4664
+ "name": "ZeroClosePrice",
4665
+ "inputs": []
4666
+ },
4667
+ {
4668
+ "type": "error",
4669
+ "name": "AccountIdOverflow",
4670
+ "inputs": []
4671
+ },
4672
+ {
4673
+ "type": "error",
4674
+ "name": "AccountLacksExposure",
4675
+ "inputs": [
4676
+ {
4677
+ "name": "accountId",
4678
+ "type": "uint128",
4679
+ "internalType": "uint128"
4680
+ },
4681
+ {
4682
+ "name": "markets",
4683
+ "type": "uint256[]",
4684
+ "internalType": "uint256[]"
4685
+ }
4686
+ ]
4687
+ },
4688
+ {
4689
+ "type": "error",
4690
+ "name": "AccountTransferNotAllowedDueToNonce",
4691
+ "inputs": [
4692
+ {
4693
+ "name": "accountId",
4694
+ "type": "uint128",
4695
+ "internalType": "uint128"
4696
+ }
4697
+ ]
4698
+ },
4699
+ {
4700
+ "type": "error",
4701
+ "name": "ArrayLengthMismatch",
4702
+ "inputs": []
4703
+ },
4704
+ {
4705
+ "type": "error",
4706
+ "name": "AutoExchangeConfigNotFound",
4707
+ "inputs": [
4708
+ {
4709
+ "name": "id",
4710
+ "type": "uint128",
4711
+ "internalType": "uint128"
4712
+ }
4713
+ ]
4714
+ },
4715
+ {
4716
+ "type": "error",
4717
+ "name": "BackstopLPConfigNotFound",
4718
+ "inputs": [
4719
+ {
4720
+ "name": "id",
4721
+ "type": "uint128",
4722
+ "internalType": "uint128"
4723
+ }
4724
+ ]
4725
+ },
4726
+ {
4727
+ "type": "error",
4728
+ "name": "CannotSetAdapterForStandardCollateral",
4729
+ "inputs": [
4730
+ {
4731
+ "name": "collateralAddress",
4732
+ "type": "address",
4733
+ "internalType": "address"
4734
+ }
4735
+ ]
4736
+ },
4737
+ {
4738
+ "type": "error",
4739
+ "name": "CannotSettleDustAccount",
4740
+ "inputs": [
4741
+ {
4742
+ "name": "dustAccountId",
4743
+ "type": "uint128",
4744
+ "internalType": "uint128"
4745
+ }
4746
+ ]
4747
+ },
4748
+ {
4749
+ "type": "error",
4750
+ "name": "CollateralDepositDisabled",
4751
+ "inputs": [
4752
+ {
4753
+ "name": "collateralPoolId",
4754
+ "type": "uint128",
4755
+ "internalType": "uint128"
4756
+ },
4757
+ {
4758
+ "name": "collateral",
4759
+ "type": "address",
4760
+ "internalType": "address"
4761
+ }
4762
+ ]
4763
+ },
4764
+ {
4765
+ "type": "error",
4766
+ "name": "CollateralHeightOverflow",
4767
+ "inputs": [
4768
+ {
4769
+ "name": "collateralAddress",
4770
+ "type": "address",
4771
+ "internalType": "address"
4772
+ }
4773
+ ]
4774
+ },
4775
+ {
4776
+ "type": "error",
4777
+ "name": "CounterpartyMustBeLimit",
4778
+ "inputs": [
4779
+ {
4780
+ "name": "orderType",
4781
+ "type": "uint8",
4782
+ "internalType": "enum OrderType"
4783
+ }
4784
+ ]
4785
+ },
4786
+ {
4787
+ "type": "error",
4788
+ "name": "CyclicLinkBetweenCollaterals",
4789
+ "inputs": [
4790
+ {
4791
+ "name": "collateralPoolId",
4792
+ "type": "uint128",
4793
+ "internalType": "uint128"
4794
+ },
4795
+ {
4796
+ "name": "collateralAddress",
4797
+ "type": "address",
4798
+ "internalType": "address"
4799
+ },
4800
+ {
4801
+ "name": "invalidParentCollateralAddress",
4802
+ "type": "address",
4803
+ "internalType": "address"
4804
+ }
4805
+ ]
4806
+ },
4807
+ {
4808
+ "type": "error",
4809
+ "name": "DustAccountNetShort",
4810
+ "inputs": [
4811
+ {
4812
+ "name": "dustAccountId",
4813
+ "type": "uint128",
4814
+ "internalType": "uint128"
4815
+ },
4816
+ {
4817
+ "name": "marketId",
4818
+ "type": "uint128",
4819
+ "internalType": "uint128"
4820
+ }
4821
+ ]
4822
+ },
4823
+ {
4824
+ "type": "error",
4825
+ "name": "DustAccountNotConfigured",
4826
+ "inputs": []
4827
+ },
4828
+ {
4829
+ "type": "error",
4830
+ "name": "EmptyCommands",
4831
+ "inputs": []
4832
+ },
4833
+ {
4834
+ "type": "error",
4835
+ "name": "FundingRatePushedTooSoon",
4836
+ "inputs": [
4837
+ {
4838
+ "name": "marketId",
4839
+ "type": "uint128",
4840
+ "internalType": "uint128"
4841
+ },
4842
+ {
4843
+ "name": "payloadTimestamp",
4844
+ "type": "uint256",
4845
+ "internalType": "uint256"
4846
+ },
4847
+ {
4848
+ "name": "storedTimestamp",
4849
+ "type": "uint256",
4850
+ "internalType": "uint256"
4851
+ },
4852
+ {
4853
+ "name": "minFundingInterval",
4854
+ "type": "uint256",
4855
+ "internalType": "uint256"
4856
+ }
4857
+ ]
4858
+ },
4859
+ {
4860
+ "type": "error",
4861
+ "name": "GlobalCollateralCannotBeZero",
4862
+ "inputs": []
4863
+ },
4864
+ {
4865
+ "type": "error",
4866
+ "name": "InsuranceFundConfigNotFound",
4867
+ "inputs": [
4868
+ {
4869
+ "name": "id",
4870
+ "type": "uint128",
4871
+ "internalType": "uint128"
4872
+ }
4873
+ ]
4874
+ },
4875
+ {
4876
+ "type": "error",
4877
+ "name": "InvalidManagePoolStakeCommand",
4878
+ "inputs": [
4879
+ {
4880
+ "name": "command",
4881
+ "type": "uint8",
4882
+ "internalType": "enum ManagePoolStakeCommand"
4883
+ }
4884
+ ]
4885
+ },
4886
+ {
4887
+ "type": "error",
4888
+ "name": "InvalidQuoteToken",
4889
+ "inputs": []
4890
+ },
4891
+ {
4892
+ "type": "error",
4893
+ "name": "InvalidSpotTokenPair",
4894
+ "inputs": [
4895
+ {
4896
+ "name": "baseToken",
4897
+ "type": "address",
4898
+ "internalType": "address"
4899
+ },
4900
+ {
4901
+ "name": "quoteToken",
4902
+ "type": "address",
4903
+ "internalType": "address"
4904
+ }
4905
+ ]
4906
+ },
4907
+ {
4908
+ "type": "error",
4909
+ "name": "LastFundingTimestampAlreadyInitialized",
4910
+ "inputs": [
4911
+ {
4912
+ "name": "marketId",
4913
+ "type": "uint128",
4914
+ "internalType": "uint128"
4915
+ }
4916
+ ]
4917
+ },
4918
+ {
4919
+ "type": "error",
4920
+ "name": "LastFundingTimestampNotInitialized",
4921
+ "inputs": [
4922
+ {
4923
+ "name": "marketId",
4924
+ "type": "uint128",
4925
+ "internalType": "uint128"
4926
+ }
4927
+ ]
4928
+ },
4929
+ {
4930
+ "type": "error",
4931
+ "name": "LengthMismatch",
4932
+ "inputs": [
4933
+ {
4934
+ "name": "marketIdsLength",
4935
+ "type": "uint256",
4936
+ "internalType": "uint256"
4937
+ },
4938
+ {
4939
+ "name": "configsLength",
4940
+ "type": "uint256",
4941
+ "internalType": "uint256"
4942
+ }
4943
+ ]
4944
+ },
4945
+ {
4946
+ "type": "error",
4947
+ "name": "LiquidationConfigNotFound",
4948
+ "inputs": [
4949
+ {
4950
+ "name": "id",
4951
+ "type": "uint128",
4952
+ "internalType": "uint128"
4953
+ }
4954
+ ]
4955
+ },
4956
+ {
4957
+ "type": "error",
4958
+ "name": "MaxMarketsTooLarge",
4959
+ "inputs": []
4960
+ },
4961
+ {
4962
+ "type": "error",
4963
+ "name": "NotImplemented",
4964
+ "inputs": []
4965
+ },
4966
+ {
4967
+ "type": "error",
4968
+ "name": "NotSpotAccount",
4969
+ "inputs": [
4970
+ {
4971
+ "name": "accountId",
4972
+ "type": "uint128",
4973
+ "internalType": "uint128"
4974
+ }
4975
+ ]
4976
+ },
4977
+ {
4978
+ "type": "error",
4979
+ "name": "OracleDeviationGreaterThanOne",
4980
+ "inputs": []
4981
+ },
4982
+ {
4983
+ "type": "error",
4984
+ "name": "OrderSizeBelowMinimum",
4985
+ "inputs": [
4986
+ {
4987
+ "name": "orderQuantity",
4988
+ "type": "int256",
4989
+ "internalType": "int256"
4990
+ },
4991
+ {
4992
+ "name": "minimumOrderBase",
4993
+ "type": "uint256",
4994
+ "internalType": "UD60x18"
4995
+ }
4996
+ ]
4997
+ },
4998
+ {
4999
+ "type": "error",
5000
+ "name": "QuoteOfBlockMismatch",
5001
+ "inputs": [
5002
+ {
5003
+ "name": "blockId",
5004
+ "type": "uint128",
5005
+ "internalType": "uint128"
5006
+ },
5007
+ {
5008
+ "name": "blockQuoteCollateral",
5009
+ "type": "address",
5010
+ "internalType": "address"
5011
+ },
5012
+ {
5013
+ "name": "marketQuoteCollateral",
5014
+ "type": "address",
5015
+ "internalType": "address"
5016
+ }
5017
+ ]
5018
+ },
5019
+ {
5020
+ "type": "error",
5021
+ "name": "ReferrerAccountOwnerSameAsReferreeAccountOwner",
5022
+ "inputs": []
5023
+ },
5024
+ {
5025
+ "type": "error",
5026
+ "name": "RiskMultipliersNotFound",
5027
+ "inputs": [
5028
+ {
5029
+ "name": "id",
5030
+ "type": "uint128",
5031
+ "internalType": "uint128"
5032
+ }
5033
+ ]
5034
+ },
5035
+ {
5036
+ "type": "error",
5037
+ "name": "RoundingPriceDeviationTooLarge",
5038
+ "inputs": []
5039
+ },
5040
+ {
5041
+ "type": "error",
5042
+ "name": "SameAccountId",
5043
+ "inputs": []
5044
+ },
5045
+ {
5046
+ "type": "error",
5047
+ "name": "SpotAccount",
5048
+ "inputs": [
5049
+ {
5050
+ "name": "accountId",
5051
+ "type": "uint128",
5052
+ "internalType": "uint128"
5053
+ }
5054
+ ]
5055
+ },
5056
+ {
5057
+ "type": "error",
5058
+ "name": "SpotMarketNotFound",
5059
+ "inputs": [
5060
+ {
5061
+ "name": "spotMarketId",
5062
+ "type": "uint128",
5063
+ "internalType": "uint128"
5064
+ }
5065
+ ]
5066
+ },
5067
+ {
5068
+ "type": "error",
5069
+ "name": "SpotMarketPairAlreadySet",
5070
+ "inputs": [
5071
+ {
5072
+ "name": "baseToken",
5073
+ "type": "address",
5074
+ "internalType": "address"
5075
+ },
5076
+ {
5077
+ "name": "quoteToken",
5078
+ "type": "address",
5079
+ "internalType": "address"
5080
+ }
5081
+ ]
5082
+ },
5083
+ {
5084
+ "type": "error",
5085
+ "name": "SpotTradeAmountZero",
5086
+ "inputs": []
5087
+ },
5088
+ {
5089
+ "type": "error",
5090
+ "name": "UnauthorizedMatchOrderPublisher",
5091
+ "inputs": [
5092
+ {
5093
+ "name": "publisher",
5094
+ "type": "address",
5095
+ "internalType": "address"
5096
+ }
5097
+ ]
5098
+ },
5099
+ {
5100
+ "type": "error",
5101
+ "name": "UnauthorizedTransfer",
5102
+ "inputs": [
5103
+ {
5104
+ "name": "accountId",
5105
+ "type": "uint128",
5106
+ "internalType": "uint128"
5107
+ },
5108
+ {
5109
+ "name": "destAccountId",
5110
+ "type": "uint128",
5111
+ "internalType": "uint128"
5112
+ },
5113
+ {
5114
+ "name": "accountOwner",
5115
+ "type": "address",
5116
+ "internalType": "address"
5117
+ },
5118
+ {
5119
+ "name": "destAccountOwner",
5120
+ "type": "address",
5121
+ "internalType": "address"
5122
+ }
5123
+ ]
5124
+ },
5125
+ {
5126
+ "type": "error",
5127
+ "name": "UnlinkedCollaterals",
5128
+ "inputs": [
5129
+ {
5130
+ "name": "collateralPoolId",
5131
+ "type": "uint128",
5132
+ "internalType": "uint128"
5133
+ },
5134
+ {
5135
+ "name": "collateral",
5136
+ "type": "address",
5137
+ "internalType": "address"
5138
+ },
5139
+ {
5140
+ "name": "baseCollateral",
5141
+ "type": "address",
5142
+ "internalType": "address"
5143
+ }
5144
+ ]
5145
+ },
5146
+ {
5147
+ "type": "error",
5148
+ "name": "ZeroMarkPrice",
5149
+ "inputs": [
5150
+ {
5151
+ "name": "marketId",
5152
+ "type": "uint128",
5153
+ "internalType": "uint128"
5154
+ }
5155
+ ]
5156
+ },
5157
+ {
5158
+ "type": "error",
5159
+ "name": "ZeroOracleNodeId",
5160
+ "inputs": []
5161
+ },
5162
+ {
5163
+ "type": "error",
5164
+ "name": "ZeroStake",
5165
+ "inputs": [
5166
+ {
5167
+ "name": "accountId",
5168
+ "type": "uint128",
5169
+ "internalType": "uint128"
5170
+ }
5171
+ ]
5172
+ },
5173
+ {
5174
+ "type": "error",
5175
+ "name": "ZeroUnstake",
5176
+ "inputs": [
5177
+ {
5178
+ "name": "accountId",
5179
+ "type": "uint128",
5180
+ "internalType": "uint128"
5181
+ }
5182
+ ]
3934
5183
  }
3935
5184
  ]
3936
5185
  }