perps-sdk-ts 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/.claude/settings.local.json +11 -0
  2. package/CONTRACT_METHOD_FIXES.md +189 -0
  3. package/INTEGRATION_SUMMARY.md +219 -0
  4. package/OPTIMIZATION_GUIDE.md +238 -0
  5. package/README.md +384 -0
  6. package/SNAPSHOT_FIX_SUMMARY.md +161 -0
  7. package/SNAPSHOT_OPTIMIZATION_SUMMARY.md +199 -0
  8. package/dist/abis/Referral.d.ts +36 -0
  9. package/dist/abis/Referral.js +4 -0
  10. package/dist/abis/Trading.d.ts +57 -0
  11. package/dist/abis/Trading.js +742 -0
  12. package/dist/abis/erc20.d.ts +51 -0
  13. package/dist/abis/erc20.js +4 -0
  14. package/dist/abis/index.d.ts +8 -0
  15. package/dist/abis/index.js +24 -0
  16. package/dist/abis/multicall.d.ts +85 -0
  17. package/dist/abis/multicall.js +4 -0
  18. package/dist/abis/pairInfos.d.ts +77 -0
  19. package/dist/abis/pairInfos.js +4 -0
  20. package/dist/abis/pairStorage.d.ts +124 -0
  21. package/dist/abis/pairStorage.js +4 -0
  22. package/dist/abis/priceAggregator.d.ts +77 -0
  23. package/dist/abis/priceAggregator.js +4 -0
  24. package/dist/abis/tardingStorage.d.ts +97 -0
  25. package/dist/abis/tardingStorage.js +1295 -0
  26. package/dist/abis.d.ts +623 -0
  27. package/dist/abis.js +49 -0
  28. package/dist/client.d.ts +118 -0
  29. package/dist/client.js +224 -0
  30. package/dist/config.d.ts +43 -0
  31. package/dist/config.js +42 -0
  32. package/dist/crypto/spki.d.ts +55 -0
  33. package/dist/crypto/spki.js +160 -0
  34. package/dist/feed/feed_client.d.ts +68 -0
  35. package/dist/feed/feed_client.js +239 -0
  36. package/dist/index.d.ts +28 -0
  37. package/dist/index.js +87 -0
  38. package/dist/rpc/asset_parameters.d.ts +62 -0
  39. package/dist/rpc/asset_parameters.js +169 -0
  40. package/dist/rpc/blended.d.ts +23 -0
  41. package/dist/rpc/blended.js +55 -0
  42. package/dist/rpc/category_parameters.d.ts +34 -0
  43. package/dist/rpc/category_parameters.js +105 -0
  44. package/dist/rpc/delegation.d.ts +81 -0
  45. package/dist/rpc/delegation.js +180 -0
  46. package/dist/rpc/fee_parameters.d.ts +46 -0
  47. package/dist/rpc/fee_parameters.js +113 -0
  48. package/dist/rpc/multicall.d.ts +83 -0
  49. package/dist/rpc/multicall.js +117 -0
  50. package/dist/rpc/pair_info_queries.d.ts +101 -0
  51. package/dist/rpc/pair_info_queries.js +161 -0
  52. package/dist/rpc/pairs_cache.d.ts +62 -0
  53. package/dist/rpc/pairs_cache.js +240 -0
  54. package/dist/rpc/referral_operations.d.ts +67 -0
  55. package/dist/rpc/referral_operations.js +143 -0
  56. package/dist/rpc/snapshot.d.ts +49 -0
  57. package/dist/rpc/snapshot.js +162 -0
  58. package/dist/rpc/trade.d.ts +84 -0
  59. package/dist/rpc/trade.js +249 -0
  60. package/dist/rpc/trading_operations.d.ts +103 -0
  61. package/dist/rpc/trading_operations.js +295 -0
  62. package/dist/rpc/trading_parameters.d.ts +49 -0
  63. package/dist/rpc/trading_parameters.js +94 -0
  64. package/dist/signers/base.d.ts +24 -0
  65. package/dist/signers/base.js +10 -0
  66. package/dist/signers/kms.d.ts +47 -0
  67. package/dist/signers/kms.js +172 -0
  68. package/dist/signers/local.d.ts +43 -0
  69. package/dist/signers/local.js +64 -0
  70. package/dist/types.d.ts +1419 -0
  71. package/dist/types.js +245 -0
  72. package/dist/utils.d.ts +52 -0
  73. package/dist/utils.js +134 -0
  74. package/examples/advanced-queries.ts +181 -0
  75. package/examples/basic-usage.ts +78 -0
  76. package/examples/delegation-and-referrals.ts +130 -0
  77. package/examples/get-pyth-ids.ts +61 -0
  78. package/examples/kms-signer.ts +31 -0
  79. package/examples/optimized-snapshot.ts +153 -0
  80. package/examples/price-feed-with-sdk-ids.ts +97 -0
  81. package/examples/price-feed.ts +36 -0
  82. package/examples/trading-operations.ts +149 -0
  83. package/package.json +41 -0
  84. package/src/abis/Referral.ts +3 -0
  85. package/src/abis/Trading.ts +741 -0
  86. package/src/abis/erc20.ts +3 -0
  87. package/src/abis/index.ts +8 -0
  88. package/src/abis/multicall.ts +3 -0
  89. package/src/abis/pairInfos.ts +3 -0
  90. package/src/abis/pairStorage.ts +3 -0
  91. package/src/abis/priceAggregator.ts +3 -0
  92. package/src/abis/tardingStorage.ts +1294 -0
  93. package/src/abis.ts +56 -0
  94. package/src/client.ts +373 -0
  95. package/src/config.ts +62 -0
  96. package/src/crypto/spki.ts +197 -0
  97. package/src/feed/feed_client.ts +288 -0
  98. package/src/index.ts +114 -0
  99. package/src/rpc/asset_parameters.ts +217 -0
  100. package/src/rpc/blended.ts +77 -0
  101. package/src/rpc/category_parameters.ts +128 -0
  102. package/src/rpc/delegation.ts +225 -0
  103. package/src/rpc/fee_parameters.ts +150 -0
  104. package/src/rpc/multicall.ts +164 -0
  105. package/src/rpc/pair_info_queries.ts +208 -0
  106. package/src/rpc/pairs_cache.ts +268 -0
  107. package/src/rpc/referral_operations.ts +164 -0
  108. package/src/rpc/snapshot.ts +210 -0
  109. package/src/rpc/trade.ts +306 -0
  110. package/src/rpc/trading_operations.ts +378 -0
  111. package/src/rpc/trading_parameters.ts +127 -0
  112. package/src/signers/base.ts +27 -0
  113. package/src/signers/kms.ts +212 -0
  114. package/src/signers/local.ts +70 -0
  115. package/src/types.ts +410 -0
  116. package/src/utils.ts +155 -0
  117. package/tsconfig.json +18 -0
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const abi = [{ "inputs": [], "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [{ "components": [{ "internalType": "uint256", "name": "utilizationThreshold", "type": "uint256" }, { "internalType": "uint256", "name": "borrowFeesMultiplier", "type": "uint256" }, { "internalType": "uint256", "name": "param_11", "type": "uint256" }, { "internalType": "uint256", "name": "param_12", "type": "uint256" }, { "internalType": "uint256", "name": "param_13", "type": "uint256" }, { "internalType": "uint256", "name": "param_14", "type": "uint256" }, { "internalType": "uint256", "name": "param_15", "type": "uint256" }, { "internalType": "uint256", "name": "param_16", "type": "uint256" }, { "internalType": "uint256", "name": "param_17", "type": "uint256" }, { "internalType": "uint256", "name": "param_18", "type": "uint256" }], "indexed": false, "internalType": "struct IPairStorage.AdditionalPairParams", "name": "params", "type": "tuple" }], "name": "AdditionalPairParamsUpdated", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint256[]", "name": "pairIndex", "type": "uint256[]" }, { "indexed": false, "internalType": "uint256[]", "name": "limits", "type": "uint256[]" }], "name": "BlockOILimitsSet", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint256", "name": "index", "type": "uint256" }], "name": "FeeAdded", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint256", "name": "index", "type": "uint256" }], "name": "FeeUpdated", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint256", "name": "index", "type": "uint256" }, { "indexed": false, "internalType": "string", "name": "name", "type": "string" }], "name": "GroupAdded", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint256", "name": "index", "type": "uint256" }], "name": "GroupUpdated", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint8", "name": "version", "type": "uint8" }], "name": "Initialized", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint256", "name": "pairIndex", "type": "uint256" }, { "indexed": false, "internalType": "uint256[]", "name": "tier", "type": "uint256[]" }, { "indexed": false, "internalType": "uint256[]", "name": "multiplier", "type": "uint256[]" }], "name": "LossProtectionAdded", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint256", "name": "multiplier", "type": "uint256" }], "name": "OIMultiplierUpdated", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint256[]", "name": "pairIndex", "type": "uint256[]" }, { "indexed": false, "internalType": "uint256[]", "name": "limits", "type": "uint256[]" }], "name": "OrderLimitsSet", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint256", "name": "index", "type": "uint256" }, { "indexed": false, "internalType": "bytes32", "name": "feedId", "type": "bytes32" }], "name": "PairAdded", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint256", "name": "pairIndex", "type": "uint256" }, { "indexed": false, "internalType": "string", "name": "from", "type": "string" }, { "indexed": false, "internalType": "string", "name": "to", "type": "string" }, { "indexed": false, "internalType": "uint256", "name": "numTiers", "type": "uint256" }, { "indexed": false, "internalType": "uint256[]", "name": "tierthresholds", "type": "uint256[]" }, { "indexed": false, "internalType": "uint256[]", "name": "timers", "type": "uint256[]" }], "name": "PairDataUpdated", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint256", "name": "index", "type": "uint256" }], "name": "PairDelisted", "type": "event" }, { "anonymous": false, "inputs": [{ "components": [{ "internalType": "uint256", "name": "posSpreadCap", "type": "uint256" }, { "internalType": "uint256", "name": "negSpreadCap", "type": "uint256" }, { "internalType": "uint256", "name": "isPnlTypeAllowed", "type": "uint256" }, { "internalType": "uint256", "name": "pnlPriceImpactMultiplier", "type": "uint256" }, { "internalType": "uint256", "name": "pnlSkewImpactMultiplier", "type": "uint256" }, { "internalType": "uint256", "name": "pnlPosSpreadCap", "type": "uint256" }, { "internalType": "uint256", "name": "pnlNegSpreadCap", "type": "uint256" }, { "internalType": "uint256", "name": "minBorrowFee", "type": "uint256" }, { "internalType": "uint256", "name": "param_7", "type": "uint256" }, { "internalType": "uint256", "name": "param_8", "type": "uint256" }], "indexed": false, "internalType": "struct IPairStorage.PairParams", "name": "params", "type": "tuple" }], "name": "PairParamsUpdated", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint256", "name": "index", "type": "uint256" }], "name": "PairUpdated", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint256", "name": "index", "type": "uint256" }], "name": "SkewFeeAdded", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint256", "name": "index", "type": "uint256" }], "name": "SkewFeeUpdated", "type": "event" }, { "inputs": [{ "components": [{ "internalType": "uint256", "name": "openFeeP", "type": "uint256" }, { "internalType": "uint256", "name": "closeFeeP", "type": "uint256" }, { "internalType": "uint256", "name": "limitOrderFeeP", "type": "uint256" }, { "internalType": "uint256", "name": "minLevPosUSDC", "type": "uint256" }, { "components": [{ "internalType": "uint256", "name": "numTiers", "type": "uint256" }, { "internalType": "uint256[]", "name": "tierP", "type": "uint256[]" }, { "internalType": "uint256[]", "name": "feesP", "type": "uint256[]" }], "internalType": "struct IPairStorage.PnlFees", "name": "pnlFees", "type": "tuple" }], "internalType": "struct IPairStorage.Fee", "name": "_fee", "type": "tuple" }], "name": "addFee", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "components": [{ "internalType": "string", "name": "name", "type": "string" }, { "internalType": "uint256", "name": "maxOpenInterestP", "type": "uint256" }, { "internalType": "bool", "name": "isSpreadDynamic", "type": "bool" }], "internalType": "struct IPairStorage.Group", "name": "_group", "type": "tuple" }], "name": "addGroup", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "components": [{ "components": [{ "internalType": "uint256", "name": "maxOpenDeviationP", "type": "uint256" }, { "internalType": "uint256", "name": "maxCloseDeviationP", "type": "uint256" }, { "internalType": "bytes32", "name": "feedId", "type": "bytes32" }], "internalType": "struct IPairStorage.Feed", "name": "feed", "type": "tuple" }, { "components": [{ "internalType": "uint256", "name": "maxDeviationP", "type": "uint256" }, { "internalType": "address", "name": "feedId", "type": "address" }], "internalType": "struct IPairStorage.BackupFeed", "name": "backupFeed", "type": "tuple" }, { "internalType": "uint256", "name": "spreadP", "type": "uint256" }, { "internalType": "uint256", "name": "pnlSpreadP", "type": "uint256" }, { "components": [{ "internalType": "uint256", "name": "minLeverage", "type": "uint256" }, { "internalType": "uint256", "name": "maxLeverage", "type": "uint256" }, { "internalType": "uint256", "name": "pnlMinLeverage", "type": "uint256" }, { "internalType": "uint256", "name": "pnlMaxLeverage", "type": "uint256" }], "internalType": "struct IPairStorage.Leverage", "name": "leverages", "type": "tuple" }, { "internalType": "uint256", "name": "priceImpactMultiplier", "type": "uint256" }, { "internalType": "int256", "name": "skewImpactMultiplier", "type": "int256" }, { "internalType": "uint256", "name": "groupIndex", "type": "uint256" }, { "internalType": "uint256", "name": "feeIndex", "type": "uint256" }, { "components": [{ "internalType": "int256", "name": "maxGainP", "type": "int256" }, { "internalType": "int256", "name": "maxSlP", "type": "int256" }, { "internalType": "uint256", "name": "maxLongOiP", "type": "uint256" }, { "internalType": "uint256", "name": "maxShortOiP", "type": "uint256" }, { "internalType": "uint256", "name": "groupOpenInterestPercentageP", "type": "uint256" }, { "internalType": "uint256", "name": "maxWalletOIP", "type": "uint256" }, { "internalType": "bool", "name": "isUSDCAligned", "type": "bool" }], "internalType": "struct IPairStorage.Values", "name": "values", "type": "tuple" }], "internalType": "struct IPairStorage.Pair", "name": "_pair", "type": "tuple" }], "name": "addPair", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "components": [{ "internalType": "int256[2][10]", "name": "eqParams", "type": "int256[2][10]" }], "internalType": "struct IPairStorage.SkewFee", "name": "_skewFee", "type": "tuple" }], "name": "addSkewOpenFees", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "name": "addtionalPairParams", "outputs": [{ "internalType": "uint256", "name": "utilizationThreshold", "type": "uint256" }, { "internalType": "uint256", "name": "borrowFeesMultiplier", "type": "uint256" }, { "internalType": "uint256", "name": "param_11", "type": "uint256" }, { "internalType": "uint256", "name": "param_12", "type": "uint256" }, { "internalType": "uint256", "name": "param_13", "type": "uint256" }, { "internalType": "uint256", "name": "param_14", "type": "uint256" }, { "internalType": "uint256", "name": "param_15", "type": "uint256" }, { "internalType": "uint256", "name": "param_16", "type": "uint256" }, { "internalType": "uint256", "name": "param_17", "type": "uint256" }, { "internalType": "uint256", "name": "param_18", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "name": "blockOILimit", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "openPrice", "type": "uint256" }, { "internalType": "uint256", "name": "leverage", "type": "uint256" }, { "internalType": "uint256", "name": "sl", "type": "uint256" }, { "internalType": "bool", "name": "buy", "type": "bool" }, { "internalType": "uint256", "name": "pairIndex", "type": "uint256" }], "name": "correctSl", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "openPrice", "type": "uint256" }, { "internalType": "uint256", "name": "leverage", "type": "uint256" }, { "internalType": "uint256", "name": "tp", "type": "uint256" }, { "internalType": "bool", "name": "buy", "type": "bool" }, { "internalType": "uint256", "name": "pairIndex", "type": "uint256" }], "name": "correctTp", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "currentOrderId", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "openPrice", "type": "uint256" }, { "internalType": "uint256", "name": "currentPrice", "type": "uint256" }, { "internalType": "bool", "name": "buy", "type": "bool" }, { "internalType": "uint256", "name": "leverage", "type": "uint256" }, { "internalType": "uint256", "name": "pairIndex", "type": "uint256" }], "name": "currentPercentProfit", "outputs": [{ "internalType": "int256", "name": "p", "type": "int256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }], "name": "delistPair", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "name": "fees", "outputs": [{ "internalType": "uint256", "name": "openFeeP", "type": "uint256" }, { "internalType": "uint256", "name": "closeFeeP", "type": "uint256" }, { "internalType": "uint256", "name": "limitOrderFeeP", "type": "uint256" }, { "internalType": "uint256", "name": "minLevPosUSDC", "type": "uint256" }, { "components": [{ "internalType": "uint256", "name": "numTiers", "type": "uint256" }, { "internalType": "uint256[]", "name": "tierP", "type": "uint256[]" }, { "internalType": "uint256[]", "name": "feesP", "type": "uint256[]" }], "internalType": "struct IPairStorage.PnlFees", "name": "pnlFees", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "feesCount", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getOIMultiplier", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }], "name": "getPairData", "outputs": [{ "internalType": "string", "name": "from", "type": "string" }, { "internalType": "string", "name": "to", "type": "string" }, { "internalType": "uint256", "name": "numTiers", "type": "uint256" }, { "internalType": "uint256[]", "name": "tierThresholds", "type": "uint256[]" }, { "internalType": "uint256[]", "name": "timer", "type": "uint256[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "pairIndex", "type": "uint256" }, { "internalType": "uint256", "name": "collateral", "type": "uint256" }, { "internalType": "int256", "name": "percentProfit", "type": "int256" }], "name": "getPnlBasedFee", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "trader", "type": "address" }, { "internalType": "uint256", "name": "pairIndex", "type": "uint256" }, { "internalType": "uint256", "name": "index", "type": "uint256" }], "name": "getPosType", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }], "name": "getSkewParams", "outputs": [{ "components": [{ "internalType": "int256[2][10]", "name": "eqParams", "type": "int256[2][10]" }], "internalType": "struct IPairStorage.SkewFee", "name": "skewFee", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }], "name": "groupMaxOI", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }], "name": "groupOI", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "uint256", "name": "", "type": "uint256" }], "name": "groupOIs", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "name": "groups", "outputs": [{ "internalType": "string", "name": "name", "type": "string" }, { "internalType": "uint256", "name": "maxOpenInterestP", "type": "uint256" }, { "internalType": "bool", "name": "isSpreadDynamic", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "groupsCount", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }], "name": "guaranteedSlEnabled", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_storageT", "type": "address" }, { "internalType": "uint256", "name": "_currentOrderId", "type": "uint256" }], "name": "initialize", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }], "name": "isDynamicSpreadEnabled", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], "name": "isPairListed", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }], "name": "isPnlOrderTypeAllowed", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }], "name": "isUSDCAligned", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "uint256", "name": "", "type": "uint256" }], "name": "lossProtection", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }, { "internalType": "uint256", "name": "_tier", "type": "uint256" }], "name": "lossProtectionMultiplier", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "pairIndex", "type": "uint256" }], "name": "maxProfitP", "outputs": [{ "internalType": "int256", "name": "", "type": "int256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }], "name": "maxWalletOI", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }], "name": "minBorrowFee", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "oiMultiplier", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }, { "internalType": "uint256", "name": "_leveragePos", "type": "uint256" }], "name": "openCloseThreshold", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "", "type": "address" }, { "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "uint256", "name": "", "type": "uint256" }], "name": "openPosType", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }], "name": "pairBackupFeed", "outputs": [{ "components": [{ "internalType": "uint256", "name": "maxDeviationP", "type": "uint256" }, { "internalType": "address", "name": "feedId", "type": "address" }], "internalType": "struct IPairStorage.BackupFeed", "name": "", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }], "name": "pairBorrowFeesMultiplier", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }], "name": "pairCloseFeeP", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "name": "pairData", "outputs": [{ "internalType": "string", "name": "from", "type": "string" }, { "internalType": "string", "name": "to", "type": "string" }, { "internalType": "uint256", "name": "numTiers", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }], "name": "pairFeed", "outputs": [{ "components": [{ "internalType": "uint256", "name": "maxOpenDeviationP", "type": "uint256" }, { "internalType": "uint256", "name": "maxCloseDeviationP", "type": "uint256" }, { "internalType": "bytes32", "name": "feedId", "type": "bytes32" }], "internalType": "struct IPairStorage.Feed", "name": "", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }], "name": "pairGroupIndex", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }], "name": "pairJob", "outputs": [{ "internalType": "string", "name": "", "type": "string" }, { "internalType": "string", "name": "", "type": "string" }, { "internalType": "bytes32", "name": "", "type": "bytes32" }, { "internalType": "address", "name": "", "type": "address" }, { "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }], "name": "pairLimitOrderFeeP", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }], "name": "pairMaxLeverage", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }, { "internalType": "bool", "name": "_isPnl", "type": "bool" }], "name": "pairMaxLeverage", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }], "name": "pairMaxLongOI", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }], "name": "pairMaxOI", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }], "name": "pairMaxShortOI", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }], "name": "pairMinLevPosUSDC", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }], "name": "pairMinLeverage", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }, { "internalType": "bool", "name": "_isPnl", "type": "bool" }], "name": "pairMinLeverage", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }, { "internalType": "uint256", "name": "_leveragedPosition", "type": "uint256" }, { "internalType": "bool", "name": "_buy", "type": "bool" }], "name": "pairOpenFeeP", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "name": "pairParams", "outputs": [{ "internalType": "uint256", "name": "posSpreadCap", "type": "uint256" }, { "internalType": "uint256", "name": "negSpreadCap", "type": "uint256" }, { "internalType": "uint256", "name": "isPnlTypeAllowed", "type": "uint256" }, { "internalType": "uint256", "name": "pnlPriceImpactMultiplier", "type": "uint256" }, { "internalType": "uint256", "name": "pnlSkewImpactMultiplier", "type": "uint256" }, { "internalType": "uint256", "name": "pnlPosSpreadCap", "type": "uint256" }, { "internalType": "uint256", "name": "pnlNegSpreadCap", "type": "uint256" }, { "internalType": "uint256", "name": "minBorrowFee", "type": "uint256" }, { "internalType": "uint256", "name": "param_7", "type": "uint256" }, { "internalType": "uint256", "name": "param_8", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }, { "internalType": "bool", "name": "isPnl", "type": "bool" }], "name": "pairPriceImpactMultiplier", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }], "name": "pairPriceImpactMultiplier", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }, { "internalType": "bool", "name": "isPnl", "type": "bool" }], "name": "pairSkewImpactMultiplier", "outputs": [{ "internalType": "int256", "name": "", "type": "int256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }], "name": "pairSkewImpactMultiplier", "outputs": [{ "internalType": "int256", "name": "", "type": "int256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }, { "internalType": "bool", "name": "_isPnl", "type": "bool" }], "name": "pairSpreadP", "outputs": [{ "internalType": "uint256", "name": "spreadP", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }], "name": "pairSpreadP", "outputs": [{ "internalType": "uint256", "name": "spreadP", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }], "name": "pairUtililizationThreshold", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "name": "pairs", "outputs": [{ "components": [{ "internalType": "uint256", "name": "maxOpenDeviationP", "type": "uint256" }, { "internalType": "uint256", "name": "maxCloseDeviationP", "type": "uint256" }, { "internalType": "bytes32", "name": "feedId", "type": "bytes32" }], "internalType": "struct IPairStorage.Feed", "name": "feed", "type": "tuple" }, { "components": [{ "internalType": "uint256", "name": "maxDeviationP", "type": "uint256" }, { "internalType": "address", "name": "feedId", "type": "address" }], "internalType": "struct IPairStorage.BackupFeed", "name": "backupFeed", "type": "tuple" }, { "internalType": "uint256", "name": "spreadP", "type": "uint256" }, { "internalType": "uint256", "name": "pnlSpreadP", "type": "uint256" }, { "components": [{ "internalType": "uint256", "name": "minLeverage", "type": "uint256" }, { "internalType": "uint256", "name": "maxLeverage", "type": "uint256" }, { "internalType": "uint256", "name": "pnlMinLeverage", "type": "uint256" }, { "internalType": "uint256", "name": "pnlMaxLeverage", "type": "uint256" }], "internalType": "struct IPairStorage.Leverage", "name": "leverages", "type": "tuple" }, { "internalType": "uint256", "name": "priceImpactMultiplier", "type": "uint256" }, { "internalType": "int256", "name": "skewImpactMultiplier", "type": "int256" }, { "internalType": "uint256", "name": "groupIndex", "type": "uint256" }, { "internalType": "uint256", "name": "feeIndex", "type": "uint256" }, { "components": [{ "internalType": "int256", "name": "maxGainP", "type": "int256" }, { "internalType": "int256", "name": "maxSlP", "type": "int256" }, { "internalType": "uint256", "name": "maxLongOiP", "type": "uint256" }, { "internalType": "uint256", "name": "maxShortOiP", "type": "uint256" }, { "internalType": "uint256", "name": "groupOpenInterestPercentageP", "type": "uint256" }, { "internalType": "uint256", "name": "maxWalletOIP", "type": "uint256" }, { "internalType": "bool", "name": "isUSDCAligned", "type": "bool" }], "internalType": "struct IPairStorage.Values", "name": "values", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_index", "type": "uint256" }], "name": "pairsBackend", "outputs": [{ "components": [{ "components": [{ "internalType": "uint256", "name": "maxOpenDeviationP", "type": "uint256" }, { "internalType": "uint256", "name": "maxCloseDeviationP", "type": "uint256" }, { "internalType": "bytes32", "name": "feedId", "type": "bytes32" }], "internalType": "struct IPairStorage.Feed", "name": "feed", "type": "tuple" }, { "components": [{ "internalType": "uint256", "name": "maxDeviationP", "type": "uint256" }, { "internalType": "address", "name": "feedId", "type": "address" }], "internalType": "struct IPairStorage.BackupFeed", "name": "backupFeed", "type": "tuple" }, { "internalType": "uint256", "name": "spreadP", "type": "uint256" }, { "internalType": "uint256", "name": "pnlSpreadP", "type": "uint256" }, { "components": [{ "internalType": "uint256", "name": "minLeverage", "type": "uint256" }, { "internalType": "uint256", "name": "maxLeverage", "type": "uint256" }, { "internalType": "uint256", "name": "pnlMinLeverage", "type": "uint256" }, { "internalType": "uint256", "name": "pnlMaxLeverage", "type": "uint256" }], "internalType": "struct IPairStorage.Leverage", "name": "leverages", "type": "tuple" }, { "internalType": "uint256", "name": "priceImpactMultiplier", "type": "uint256" }, { "internalType": "int256", "name": "skewImpactMultiplier", "type": "int256" }, { "internalType": "uint256", "name": "groupIndex", "type": "uint256" }, { "internalType": "uint256", "name": "feeIndex", "type": "uint256" }, { "components": [{ "internalType": "int256", "name": "maxGainP", "type": "int256" }, { "internalType": "int256", "name": "maxSlP", "type": "int256" }, { "internalType": "uint256", "name": "maxLongOiP", "type": "uint256" }, { "internalType": "uint256", "name": "maxShortOiP", "type": "uint256" }, { "internalType": "uint256", "name": "groupOpenInterestPercentageP", "type": "uint256" }, { "internalType": "uint256", "name": "maxWalletOIP", "type": "uint256" }, { "internalType": "bool", "name": "isUSDCAligned", "type": "bool" }], "internalType": "struct IPairStorage.Values", "name": "values", "type": "tuple" }], "internalType": "struct IPairStorage.Pair", "name": "", "type": "tuple" }, { "components": [{ "internalType": "string", "name": "name", "type": "string" }, { "internalType": "uint256", "name": "maxOpenInterestP", "type": "uint256" }, { "internalType": "bool", "name": "isSpreadDynamic", "type": "bool" }], "internalType": "struct IPairStorage.Group", "name": "", "type": "tuple" }, { "components": [{ "internalType": "uint256", "name": "openFeeP", "type": "uint256" }, { "internalType": "uint256", "name": "closeFeeP", "type": "uint256" }, { "internalType": "uint256", "name": "limitOrderFeeP", "type": "uint256" }, { "internalType": "uint256", "name": "minLevPosUSDC", "type": "uint256" }, { "components": [{ "internalType": "uint256", "name": "numTiers", "type": "uint256" }, { "internalType": "uint256[]", "name": "tierP", "type": "uint256[]" }, { "internalType": "uint256[]", "name": "feesP", "type": "uint256[]" }], "internalType": "struct IPairStorage.PnlFees", "name": "pnlFees", "type": "tuple" }], "internalType": "struct IPairStorage.Fee", "name": "", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "pairsCount", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "trader", "type": "address" }, { "internalType": "uint256", "name": "pairIndex", "type": "uint256" }, { "internalType": "uint256", "name": "index", "type": "uint256" }], "name": "resetPosType", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256[]", "name": "_pairIndex", "type": "uint256[]" }, { "internalType": "uint256[]", "name": "_limits", "type": "uint256[]" }], "name": "setBlockOILImits", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_multiplier", "type": "uint256" }], "name": "setOIMultiplier", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }, { "internalType": "string", "name": "from", "type": "string" }, { "internalType": "string", "name": "to", "type": "string" }, { "internalType": "uint256", "name": "_numTiers", "type": "uint256" }, { "internalType": "uint256[]", "name": "_tierThresholds", "type": "uint256[]" }, { "internalType": "uint256[]", "name": "_timer", "type": "uint256[]" }], "name": "setPairData", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "skewedFeesCount", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }, { "internalType": "bool", "name": "isPnl", "type": "bool" }], "name": "spreadCaps", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "storageT", "outputs": [{ "internalType": "contract ITradingStorage", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "trader", "type": "address" }, { "internalType": "uint256", "name": "pairIndex", "type": "uint256" }, { "internalType": "uint256", "name": "index", "type": "uint256" }, { "internalType": "bool", "name": "isPnl", "type": "bool" }], "name": "storePosType", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }, { "components": [{ "internalType": "int256[2][10]", "name": "eqParams", "type": "int256[2][10]" }], "internalType": "struct IPairStorage.SkewFee", "name": "_skewFee", "type": "tuple" }], "name": "udpateSkewOpenFees", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }, { "components": [{ "internalType": "uint256", "name": "utilizationThreshold", "type": "uint256" }, { "internalType": "uint256", "name": "borrowFeesMultiplier", "type": "uint256" }, { "internalType": "uint256", "name": "param_11", "type": "uint256" }, { "internalType": "uint256", "name": "param_12", "type": "uint256" }, { "internalType": "uint256", "name": "param_13", "type": "uint256" }, { "internalType": "uint256", "name": "param_14", "type": "uint256" }, { "internalType": "uint256", "name": "param_15", "type": "uint256" }, { "internalType": "uint256", "name": "param_16", "type": "uint256" }, { "internalType": "uint256", "name": "param_17", "type": "uint256" }, { "internalType": "uint256", "name": "param_18", "type": "uint256" }], "internalType": "struct IPairStorage.AdditionalPairParams", "name": "_params", "type": "tuple" }], "name": "updateAdditionalPairParams", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_id", "type": "uint256" }, { "components": [{ "internalType": "uint256", "name": "openFeeP", "type": "uint256" }, { "internalType": "uint256", "name": "closeFeeP", "type": "uint256" }, { "internalType": "uint256", "name": "limitOrderFeeP", "type": "uint256" }, { "internalType": "uint256", "name": "minLevPosUSDC", "type": "uint256" }, { "components": [{ "internalType": "uint256", "name": "numTiers", "type": "uint256" }, { "internalType": "uint256[]", "name": "tierP", "type": "uint256[]" }, { "internalType": "uint256[]", "name": "feesP", "type": "uint256[]" }], "internalType": "struct IPairStorage.PnlFees", "name": "pnlFees", "type": "tuple" }], "internalType": "struct IPairStorage.Fee", "name": "_fee", "type": "tuple" }], "name": "updateFee", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_id", "type": "uint256" }, { "components": [{ "internalType": "string", "name": "name", "type": "string" }, { "internalType": "uint256", "name": "maxOpenInterestP", "type": "uint256" }, { "internalType": "bool", "name": "isSpreadDynamic", "type": "bool" }], "internalType": "struct IPairStorage.Group", "name": "_group", "type": "tuple" }], "name": "updateGroup", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }, { "internalType": "uint256", "name": "_amount", "type": "uint256" }, { "internalType": "bool", "name": "_long", "type": "bool" }, { "internalType": "bool", "name": "_increase", "type": "bool" }], "name": "updateGroupOI", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }, { "internalType": "uint256[]", "name": "_tier", "type": "uint256[]" }, { "internalType": "uint256[]", "name": "_multiplierPercent", "type": "uint256[]" }], "name": "updateLossProtectionMultiplier", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }, { "components": [{ "components": [{ "internalType": "uint256", "name": "maxOpenDeviationP", "type": "uint256" }, { "internalType": "uint256", "name": "maxCloseDeviationP", "type": "uint256" }, { "internalType": "bytes32", "name": "feedId", "type": "bytes32" }], "internalType": "struct IPairStorage.Feed", "name": "feed", "type": "tuple" }, { "components": [{ "internalType": "uint256", "name": "maxDeviationP", "type": "uint256" }, { "internalType": "address", "name": "feedId", "type": "address" }], "internalType": "struct IPairStorage.BackupFeed", "name": "backupFeed", "type": "tuple" }, { "internalType": "uint256", "name": "spreadP", "type": "uint256" }, { "internalType": "uint256", "name": "pnlSpreadP", "type": "uint256" }, { "components": [{ "internalType": "uint256", "name": "minLeverage", "type": "uint256" }, { "internalType": "uint256", "name": "maxLeverage", "type": "uint256" }, { "internalType": "uint256", "name": "pnlMinLeverage", "type": "uint256" }, { "internalType": "uint256", "name": "pnlMaxLeverage", "type": "uint256" }], "internalType": "struct IPairStorage.Leverage", "name": "leverages", "type": "tuple" }, { "internalType": "uint256", "name": "priceImpactMultiplier", "type": "uint256" }, { "internalType": "int256", "name": "skewImpactMultiplier", "type": "int256" }, { "internalType": "uint256", "name": "groupIndex", "type": "uint256" }, { "internalType": "uint256", "name": "feeIndex", "type": "uint256" }, { "components": [{ "internalType": "int256", "name": "maxGainP", "type": "int256" }, { "internalType": "int256", "name": "maxSlP", "type": "int256" }, { "internalType": "uint256", "name": "maxLongOiP", "type": "uint256" }, { "internalType": "uint256", "name": "maxShortOiP", "type": "uint256" }, { "internalType": "uint256", "name": "groupOpenInterestPercentageP", "type": "uint256" }, { "internalType": "uint256", "name": "maxWalletOIP", "type": "uint256" }, { "internalType": "bool", "name": "isUSDCAligned", "type": "bool" }], "internalType": "struct IPairStorage.Values", "name": "values", "type": "tuple" }], "internalType": "struct IPairStorage.Pair", "name": "_pair", "type": "tuple" }], "name": "updatePair", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }, { "components": [{ "internalType": "uint256", "name": "posSpreadCap", "type": "uint256" }, { "internalType": "uint256", "name": "negSpreadCap", "type": "uint256" }, { "internalType": "uint256", "name": "isPnlTypeAllowed", "type": "uint256" }, { "internalType": "uint256", "name": "pnlPriceImpactMultiplier", "type": "uint256" }, { "internalType": "uint256", "name": "pnlSkewImpactMultiplier", "type": "uint256" }, { "internalType": "uint256", "name": "pnlPosSpreadCap", "type": "uint256" }, { "internalType": "uint256", "name": "pnlNegSpreadCap", "type": "uint256" }, { "internalType": "uint256", "name": "minBorrowFee", "type": "uint256" }, { "internalType": "uint256", "name": "param_7", "type": "uint256" }, { "internalType": "uint256", "name": "param_8", "type": "uint256" }], "internalType": "struct IPairStorage.PairParams", "name": "_params", "type": "tuple" }], "name": "updatePairParams", "outputs": [], "stateMutability": "nonpayable", "type": "function" }];
4
+ exports.default = abi;
@@ -0,0 +1,77 @@
1
+ declare const abi: ({
2
+ inputs: never[];
3
+ stateMutability: string;
4
+ type: string;
5
+ anonymous?: undefined;
6
+ name?: undefined;
7
+ outputs?: undefined;
8
+ } | {
9
+ anonymous: boolean;
10
+ inputs: {
11
+ indexed: boolean;
12
+ internalType: string;
13
+ name: string;
14
+ type: string;
15
+ }[];
16
+ name: string;
17
+ type: string;
18
+ stateMutability?: undefined;
19
+ outputs?: undefined;
20
+ } | {
21
+ inputs: {
22
+ internalType: string;
23
+ name: string;
24
+ type: string;
25
+ }[];
26
+ name: string;
27
+ outputs: {
28
+ components: {
29
+ internalType: string;
30
+ name: string;
31
+ type: string;
32
+ }[];
33
+ internalType: string;
34
+ name: string;
35
+ type: string;
36
+ }[];
37
+ stateMutability: string;
38
+ type: string;
39
+ anonymous?: undefined;
40
+ } | {
41
+ inputs: {
42
+ internalType: string;
43
+ name: string;
44
+ type: string;
45
+ }[];
46
+ name: string;
47
+ outputs: {
48
+ internalType: string;
49
+ name: string;
50
+ type: string;
51
+ }[];
52
+ stateMutability: string;
53
+ type: string;
54
+ anonymous?: undefined;
55
+ } | {
56
+ inputs: ({
57
+ internalType: string;
58
+ name: string;
59
+ type: string;
60
+ components?: undefined;
61
+ } | {
62
+ components: {
63
+ internalType: string;
64
+ name: string;
65
+ type: string;
66
+ }[];
67
+ internalType: string;
68
+ name: string;
69
+ type: string;
70
+ })[];
71
+ name: string;
72
+ outputs: never[];
73
+ stateMutability: string;
74
+ type: string;
75
+ anonymous?: undefined;
76
+ })[];
77
+ export default abi;
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const abi = [{ "inputs": [], "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "string", "name": "name", "type": "string" }, { "indexed": false, "internalType": "address", "name": "a", "type": "address" }], "name": "AddressUpdated", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "bool", "name": "_start", "type": "bool" }], "name": "BackUpTriggered", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint256", "name": "orderId", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "pairIndex", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "price", "type": "uint256" }], "name": "BackupPriceReceived", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint8", "name": "version", "type": "uint8" }], "name": "Initialized", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "string", "name": "name", "type": "string" }, { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" }], "name": "NumberUpdated", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint256", "name": "orderId", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "pairIndex", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "price", "type": "uint256" }], "name": "PriceReceived", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "address", "name": "a", "type": "address" }], "name": "PythUpdated", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint256", "name": "_newPeriod", "type": "uint256" }], "name": "chainlinkValidityPeriodSet", "type": "event" }, { "inputs": [], "name": "chainlinkValidityPeriod", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "executions", "outputs": [{ "internalType": "contract IExecute", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_trader", "type": "address" }, { "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }, { "internalType": "uint256", "name": "_index", "type": "uint256" }, { "internalType": "uint256", "name": "_amount", "type": "uint256" }, { "internalType": "uint256", "name": "_price", "type": "uint256" }], "name": "forceCloseTradeMarket", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "orderId", "type": "uint256" }, { "internalType": "bytes[]", "name": "priceUpdateData", "type": "bytes[]" }], "name": "fulfill", "outputs": [], "stateMutability": "payable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_id", "type": "uint256" }], "name": "getOrder", "outputs": [{ "components": [{ "internalType": "uint256", "name": "pairIndex", "type": "uint256" }, { "internalType": "enum IPriceAggregator.OrderType", "name": "orderType", "type": "uint8" }, { "internalType": "bytes32", "name": "job", "type": "bytes32" }, { "internalType": "bool", "name": "initiated", "type": "bool" }], "internalType": "struct IPriceAggregator.Order", "name": "", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }, { "internalType": "enum IPriceAggregator.OrderType", "name": "_orderType", "type": "uint8" }], "name": "getPrice", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_storageT", "type": "address" }, { "internalType": "address", "name": "_pairsStorage", "type": "address" }, { "internalType": "address", "name": "_executions", "type": "address" }], "name": "initialize", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }, { "internalType": "enum IPriceAggregator.OrderType", "name": "_type", "type": "uint8" }], "name": "maxDeviationP", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_pairIndex", "type": "uint256" }, { "internalType": "uint256", "name": "_leveragedPositionSize", "type": "uint256" }, { "internalType": "bool", "name": "_buy", "type": "bool" }], "name": "openFeeP", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "name": "orders", "outputs": [{ "internalType": "uint256", "name": "pairIndex", "type": "uint256" }, { "internalType": "enum IPriceAggregator.OrderType", "name": "orderType", "type": "uint8" }, { "internalType": "bytes32", "name": "job", "type": "bytes32" }, { "internalType": "bool", "name": "initiated", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "uint256", "name": "", "type": "uint256" }], "name": "ordersAnswers", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "pairsStorage", "outputs": [{ "internalType": "contract IPairStorage", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "index", "type": "uint256" }], "name": "pendingMarginUpdateOrders", "outputs": [{ "components": [{ "internalType": "address", "name": "trader", "type": "address" }, { "internalType": "uint256", "name": "pairIndex", "type": "uint256" }, { "internalType": "uint256", "name": "index", "type": "uint256" }, { "internalType": "enum ITradingStorage.updateType", "name": "_type", "type": "uint8" }, { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "uint256", "name": "tier", "type": "uint256" }, { "internalType": "uint256", "name": "marginFees", "type": "uint256" }, { "internalType": "uint256", "name": "oldLeverage", "type": "uint256" }], "internalType": "struct IPriceAggregator.PendingMarginUpdate", "name": "", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "index", "type": "uint256" }], "name": "pendingSlOrders", "outputs": [{ "components": [{ "internalType": "address", "name": "trader", "type": "address" }, { "internalType": "uint256", "name": "pairIndex", "type": "uint256" }, { "internalType": "uint256", "name": "index", "type": "uint256" }, { "internalType": "uint256", "name": "openPrice", "type": "uint256" }, { "internalType": "bool", "name": "buy", "type": "bool" }, { "internalType": "uint256", "name": "newSl", "type": "uint256" }], "internalType": "struct IPriceAggregator.PendingSl", "name": "", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "pyth", "outputs": [{ "internalType": "contract IPyth", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_newPeriod", "type": "uint256" }], "name": "setChainlinkValidityPeriod", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "pythContract", "type": "address" }], "name": "setPyth", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "storageT", "outputs": [{ "internalType": "contract ITradingStorage", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "orderId", "type": "uint256" }, { "components": [{ "internalType": "address", "name": "trader", "type": "address" }, { "internalType": "uint256", "name": "pairIndex", "type": "uint256" }, { "internalType": "uint256", "name": "index", "type": "uint256" }, { "internalType": "enum ITradingStorage.updateType", "name": "_type", "type": "uint8" }, { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "uint256", "name": "tier", "type": "uint256" }, { "internalType": "uint256", "name": "marginFees", "type": "uint256" }, { "internalType": "uint256", "name": "oldLeverage", "type": "uint256" }], "internalType": "struct IPriceAggregator.PendingMarginUpdate", "name": "p", "type": "tuple" }], "name": "storePendingMarginUpdateOrder", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "orderId", "type": "uint256" }, { "components": [{ "internalType": "address", "name": "trader", "type": "address" }, { "internalType": "uint256", "name": "pairIndex", "type": "uint256" }, { "internalType": "uint256", "name": "index", "type": "uint256" }, { "internalType": "uint256", "name": "openPrice", "type": "uint256" }, { "internalType": "bool", "name": "buy", "type": "bool" }, { "internalType": "uint256", "name": "newSl", "type": "uint256" }], "internalType": "struct IPriceAggregator.PendingSl", "name": "p", "type": "tuple" }], "name": "storePendingSlOrder", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "orderId", "type": "uint256" }], "name": "unregisterPendingMarginUpdateOrder", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "orderId", "type": "uint256" }], "name": "unregisterPendingSlOrder", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_pairsStorage", "type": "address" }], "name": "updatePairsStorage", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "bool", "name": "_start", "type": "bool" }], "name": "useBackUpOracleOnly", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "useBackupOnly", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "view", "type": "function" }];
4
+ exports.default = abi;
@@ -0,0 +1,97 @@
1
+ declare const abi: ({
2
+ inputs: never[];
3
+ stateMutability: string;
4
+ type: string;
5
+ anonymous?: undefined;
6
+ name?: undefined;
7
+ outputs?: undefined;
8
+ } | {
9
+ anonymous: boolean;
10
+ inputs: {
11
+ indexed: boolean;
12
+ internalType: string;
13
+ name: string;
14
+ type: string;
15
+ }[];
16
+ name: string;
17
+ type: string;
18
+ stateMutability?: undefined;
19
+ outputs?: undefined;
20
+ } | {
21
+ inputs: {
22
+ internalType: string;
23
+ name: string;
24
+ type: string;
25
+ }[];
26
+ name: string;
27
+ outputs: {
28
+ internalType: string;
29
+ name: string;
30
+ type: string;
31
+ }[];
32
+ stateMutability: string;
33
+ type: string;
34
+ anonymous?: undefined;
35
+ } | {
36
+ inputs: {
37
+ internalType: string;
38
+ name: string;
39
+ type: string;
40
+ }[];
41
+ name: string;
42
+ outputs: {
43
+ components: ({
44
+ components: {
45
+ internalType: string;
46
+ name: string;
47
+ type: string;
48
+ }[];
49
+ internalType: string;
50
+ name: string;
51
+ type: string;
52
+ } | {
53
+ internalType: string;
54
+ name: string;
55
+ type: string;
56
+ components?: undefined;
57
+ })[];
58
+ internalType: string;
59
+ name: string;
60
+ type: string;
61
+ }[];
62
+ stateMutability: string;
63
+ type: string;
64
+ anonymous?: undefined;
65
+ } | {
66
+ inputs: ({
67
+ components: ({
68
+ components: {
69
+ internalType: string;
70
+ name: string;
71
+ type: string;
72
+ }[];
73
+ internalType: string;
74
+ name: string;
75
+ type: string;
76
+ } | {
77
+ internalType: string;
78
+ name: string;
79
+ type: string;
80
+ components?: undefined;
81
+ })[];
82
+ internalType: string;
83
+ name: string;
84
+ type: string;
85
+ } | {
86
+ internalType: string;
87
+ name: string;
88
+ type: string;
89
+ components?: undefined;
90
+ })[];
91
+ name: string;
92
+ outputs: never[];
93
+ stateMutability: string;
94
+ type: string;
95
+ anonymous?: undefined;
96
+ })[];
97
+ export default abi;