@nadohq/shared 0.1.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/abis/Clearinghouse.cjs +891 -0
- package/dist/abis/Clearinghouse.cjs.map +1 -0
- package/dist/abis/Clearinghouse.d.cts +669 -0
- package/dist/abis/Clearinghouse.d.ts +669 -0
- package/dist/abis/Clearinghouse.js +868 -0
- package/dist/abis/Clearinghouse.js.map +1 -0
- package/dist/abis/ERC20.cjs +215 -0
- package/dist/abis/ERC20.cjs.map +1 -0
- package/dist/abis/ERC20.d.cts +143 -0
- package/dist/abis/ERC20.d.ts +143 -0
- package/dist/abis/ERC20.js +192 -0
- package/dist/abis/ERC20.js.map +1 -0
- package/dist/abis/Endpoint.cjs +589 -0
- package/dist/abis/Endpoint.cjs.map +1 -0
- package/dist/abis/Endpoint.d.cts +433 -0
- package/dist/abis/Endpoint.d.ts +433 -0
- package/dist/abis/Endpoint.js +566 -0
- package/dist/abis/Endpoint.js.map +1 -0
- package/dist/abis/MockERC20.cjs +341 -0
- package/dist/abis/MockERC20.cjs.map +1 -0
- package/dist/abis/MockERC20.d.cts +239 -0
- package/dist/abis/MockERC20.d.ts +239 -0
- package/dist/abis/MockERC20.js +318 -0
- package/dist/abis/MockERC20.js.map +1 -0
- package/dist/abis/PerpEngine.cjs +886 -0
- package/dist/abis/PerpEngine.cjs.map +1 -0
- package/dist/abis/PerpEngine.d.cts +661 -0
- package/dist/abis/PerpEngine.d.ts +661 -0
- package/dist/abis/PerpEngine.js +863 -0
- package/dist/abis/PerpEngine.js.map +1 -0
- package/dist/abis/Querier.cjs +1522 -0
- package/dist/abis/Querier.cjs.map +1 -0
- package/dist/abis/Querier.d.cts +1149 -0
- package/dist/abis/Querier.d.ts +1149 -0
- package/dist/abis/Querier.js +1499 -0
- package/dist/abis/Querier.js.map +1 -0
- package/dist/abis/SpotEngine.cjs +937 -0
- package/dist/abis/SpotEngine.cjs.map +1 -0
- package/dist/abis/SpotEngine.d.cts +701 -0
- package/dist/abis/SpotEngine.d.ts +701 -0
- package/dist/abis/SpotEngine.js +914 -0
- package/dist/abis/SpotEngine.js.map +1 -0
- package/dist/abis/WithdrawPool.cjs +307 -0
- package/dist/abis/WithdrawPool.cjs.map +1 -0
- package/dist/abis/WithdrawPool.d.cts +214 -0
- package/dist/abis/WithdrawPool.d.ts +214 -0
- package/dist/abis/WithdrawPool.js +284 -0
- package/dist/abis/WithdrawPool.js.map +1 -0
- package/dist/abis/index.cjs +41 -0
- package/dist/abis/index.cjs.map +1 -0
- package/dist/abis/index.d.cts +9 -0
- package/dist/abis/index.d.ts +9 -0
- package/dist/abis/index.js +11 -0
- package/dist/abis/index.js.map +1 -0
- package/dist/abis/nadoAbis.cjs +44 -0
- package/dist/abis/nadoAbis.cjs.map +1 -0
- package/dist/abis/nadoAbis.d.cts +3821 -0
- package/dist/abis/nadoAbis.d.ts +3821 -0
- package/dist/abis/nadoAbis.js +21 -0
- package/dist/abis/nadoAbis.js.map +1 -0
- package/dist/chunk-5WRI5ZAA.js +31 -0
- package/dist/chunk-5WRI5ZAA.js.map +1 -0
- package/dist/chunk-TUJ4HQKF.js +33 -0
- package/dist/chunk-TUJ4HQKF.js.map +1 -0
- package/dist/consts/chainEnvToChain.cjs +44 -0
- package/dist/consts/chainEnvToChain.cjs.map +1 -0
- package/dist/consts/chainEnvToChain.d.cts +388 -0
- package/dist/consts/chainEnvToChain.d.ts +388 -0
- package/dist/consts/chainEnvToChain.js +20 -0
- package/dist/consts/chainEnvToChain.js.map +1 -0
- package/dist/consts/index.cjs +27 -0
- package/dist/consts/index.cjs.map +1 -0
- package/dist/consts/index.d.cts +6 -0
- package/dist/consts/index.d.ts +6 -0
- package/dist/consts/index.js +4 -0
- package/dist/consts/index.js.map +1 -0
- package/dist/consts/productIds.cjs +34 -0
- package/dist/consts/productIds.cjs.map +1 -0
- package/dist/consts/productIds.d.cts +4 -0
- package/dist/consts/productIds.d.ts +4 -0
- package/dist/consts/productIds.js +10 -0
- package/dist/consts/productIds.js.map +1 -0
- package/dist/deployments/core/deployment.InkSepolia.json +13 -0
- package/dist/deployments/core/deployment.arbitrumOne.json +18 -0
- package/dist/deployments/core/deployment.localhost.json +18 -0
- package/dist/deployments/index.cjs +65 -0
- package/dist/deployments/index.cjs.map +1 -0
- package/dist/deployments/index.d.cts +13 -0
- package/dist/deployments/index.d.ts +13 -0
- package/dist/deployments/index.js +32 -0
- package/dist/deployments/index.js.map +1 -0
- package/dist/eip712/eip712ValueTypes.cjs +19 -0
- package/dist/eip712/eip712ValueTypes.cjs.map +1 -0
- package/dist/eip712/eip712ValueTypes.d.cts +48 -0
- package/dist/eip712/eip712ValueTypes.d.ts +48 -0
- package/dist/eip712/eip712ValueTypes.js +1 -0
- package/dist/eip712/eip712ValueTypes.js.map +1 -0
- package/dist/eip712/getNadoEIP712Domain.cjs +39 -0
- package/dist/eip712/getNadoEIP712Domain.cjs.map +1 -0
- package/dist/eip712/getNadoEIP712Domain.d.cts +11 -0
- package/dist/eip712/getNadoEIP712Domain.d.ts +11 -0
- package/dist/eip712/getNadoEIP712Domain.js +16 -0
- package/dist/eip712/getNadoEIP712Domain.js.map +1 -0
- package/dist/eip712/getNadoEIP712PrimaryType.cjs +35 -0
- package/dist/eip712/getNadoEIP712PrimaryType.cjs.map +1 -0
- package/dist/eip712/getNadoEIP712PrimaryType.d.cts +16 -0
- package/dist/eip712/getNadoEIP712PrimaryType.d.ts +16 -0
- package/dist/eip712/getNadoEIP712PrimaryType.js +12 -0
- package/dist/eip712/getNadoEIP712PrimaryType.js.map +1 -0
- package/dist/eip712/getNadoEIP712Types.cjs +129 -0
- package/dist/eip712/getNadoEIP712Types.cjs.map +1 -0
- package/dist/eip712/getNadoEIP712Types.d.cts +20 -0
- package/dist/eip712/getNadoEIP712Types.d.ts +20 -0
- package/dist/eip712/getNadoEIP712Types.js +106 -0
- package/dist/eip712/getNadoEIP712Types.js.map +1 -0
- package/dist/eip712/getNadoEIP712Values.cjs +206 -0
- package/dist/eip712/getNadoEIP712Values.cjs.map +1 -0
- package/dist/eip712/getNadoEIP712Values.d.cts +20 -0
- package/dist/eip712/getNadoEIP712Values.d.ts +20 -0
- package/dist/eip712/getNadoEIP712Values.js +183 -0
- package/dist/eip712/getNadoEIP712Values.js.map +1 -0
- package/dist/eip712/getOrderVerifyingAddress.cjs +34 -0
- package/dist/eip712/getOrderVerifyingAddress.cjs.map +1 -0
- package/dist/eip712/getOrderVerifyingAddress.d.cts +9 -0
- package/dist/eip712/getOrderVerifyingAddress.d.ts +9 -0
- package/dist/eip712/getOrderVerifyingAddress.js +11 -0
- package/dist/eip712/getOrderVerifyingAddress.js.map +1 -0
- package/dist/eip712/getSignedTransactionRequest.cjs +42 -0
- package/dist/eip712/getSignedTransactionRequest.cjs.map +1 -0
- package/dist/eip712/getSignedTransactionRequest.d.cts +19 -0
- package/dist/eip712/getSignedTransactionRequest.d.ts +19 -0
- package/dist/eip712/getSignedTransactionRequest.js +19 -0
- package/dist/eip712/getSignedTransactionRequest.js.map +1 -0
- package/dist/eip712/index.cjs +43 -0
- package/dist/eip712/index.cjs.map +1 -0
- package/dist/eip712/index.d.cts +17 -0
- package/dist/eip712/index.d.ts +17 -0
- package/dist/eip712/index.js +12 -0
- package/dist/eip712/index.js.map +1 -0
- package/dist/eip712/orderDigest.cjs +45 -0
- package/dist/eip712/orderDigest.cjs.map +1 -0
- package/dist/eip712/orderDigest.d.cts +20 -0
- package/dist/eip712/orderDigest.d.ts +20 -0
- package/dist/eip712/orderDigest.js +22 -0
- package/dist/eip712/orderDigest.js.map +1 -0
- package/dist/eip712/signableRequestType.cjs +19 -0
- package/dist/eip712/signableRequestType.cjs.map +1 -0
- package/dist/eip712/signableRequestType.d.cts +26 -0
- package/dist/eip712/signableRequestType.d.ts +26 -0
- package/dist/eip712/signableRequestType.js +1 -0
- package/dist/eip712/signableRequestType.js.map +1 -0
- package/dist/eip712/signatureParamTypes.cjs +19 -0
- package/dist/eip712/signatureParamTypes.cjs.map +1 -0
- package/dist/eip712/signatureParamTypes.d.cts +68 -0
- package/dist/eip712/signatureParamTypes.d.ts +68 -0
- package/dist/eip712/signatureParamTypes.js +1 -0
- package/dist/eip712/signatureParamTypes.js.map +1 -0
- package/dist/encoding/encoding.cjs +73 -0
- package/dist/encoding/encoding.cjs.map +1 -0
- package/dist/encoding/encoding.d.cts +11 -0
- package/dist/encoding/encoding.d.ts +11 -0
- package/dist/encoding/encoding.js +49 -0
- package/dist/encoding/encoding.js.map +1 -0
- package/dist/encoding/index.cjs +25 -0
- package/dist/encoding/index.cjs.map +1 -0
- package/dist/encoding/index.d.cts +7 -0
- package/dist/encoding/index.d.ts +7 -0
- package/dist/encoding/index.js +3 -0
- package/dist/encoding/index.js.map +1 -0
- package/dist/execute/approveDepositAllowance.cjs +38 -0
- package/dist/execute/approveDepositAllowance.cjs.map +1 -0
- package/dist/execute/approveDepositAllowance.d.cts +18 -0
- package/dist/execute/approveDepositAllowance.d.ts +18 -0
- package/dist/execute/approveDepositAllowance.js +15 -0
- package/dist/execute/approveDepositAllowance.js.map +1 -0
- package/dist/execute/depositCollateral.cjs +59 -0
- package/dist/execute/depositCollateral.cjs.map +1 -0
- package/dist/execute/depositCollateral.d.cts +21 -0
- package/dist/execute/depositCollateral.d.ts +21 -0
- package/dist/execute/depositCollateral.js +36 -0
- package/dist/execute/depositCollateral.js.map +1 -0
- package/dist/execute/index.cjs +27 -0
- package/dist/execute/index.cjs.map +1 -0
- package/dist/execute/index.d.cts +9 -0
- package/dist/execute/index.d.ts +9 -0
- package/dist/execute/index.js +4 -0
- package/dist/execute/index.js.map +1 -0
- package/dist/index.cjs +39 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +67 -0
- package/dist/index.d.ts +67 -0
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -0
- package/dist/types/ChainEnv.cjs +44 -0
- package/dist/types/ChainEnv.cjs.map +1 -0
- package/dist/types/ChainEnv.d.cts +7 -0
- package/dist/types/ChainEnv.d.ts +7 -0
- package/dist/types/ChainEnv.js +18 -0
- package/dist/types/ChainEnv.js.map +1 -0
- package/dist/types/OrderExecutionType.cjs +19 -0
- package/dist/types/OrderExecutionType.cjs.map +1 -0
- package/dist/types/OrderExecutionType.d.cts +10 -0
- package/dist/types/OrderExecutionType.d.ts +10 -0
- package/dist/types/OrderExecutionType.js +1 -0
- package/dist/types/OrderExecutionType.js.map +1 -0
- package/dist/types/balanceTypes.cjs +19 -0
- package/dist/types/balanceTypes.cjs.map +1 -0
- package/dist/types/balanceTypes.d.cts +38 -0
- package/dist/types/balanceTypes.d.ts +38 -0
- package/dist/types/balanceTypes.js +1 -0
- package/dist/types/balanceTypes.js.map +1 -0
- package/dist/types/bytes.cjs +19 -0
- package/dist/types/bytes.cjs.map +1 -0
- package/dist/types/bytes.d.cts +3 -0
- package/dist/types/bytes.d.ts +3 -0
- package/dist/types/bytes.js +1 -0
- package/dist/types/bytes.js.map +1 -0
- package/dist/types/healthTypes.cjs +19 -0
- package/dist/types/healthTypes.cjs.map +1 -0
- package/dist/types/healthTypes.d.cts +15 -0
- package/dist/types/healthTypes.d.ts +15 -0
- package/dist/types/healthTypes.js +1 -0
- package/dist/types/healthTypes.js.map +1 -0
- package/dist/types/index.cjs +45 -0
- package/dist/types/index.cjs.map +1 -0
- package/dist/types/index.d.cts +15 -0
- package/dist/types/index.d.ts +15 -0
- package/dist/types/index.js +13 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/marketTypes.cjs +19 -0
- package/dist/types/marketTypes.cjs.map +1 -0
- package/dist/types/marketTypes.d.cts +31 -0
- package/dist/types/marketTypes.d.ts +31 -0
- package/dist/types/marketTypes.js +1 -0
- package/dist/types/marketTypes.js.map +1 -0
- package/dist/types/nadoContractTypes.cjs +19 -0
- package/dist/types/nadoContractTypes.cjs.map +1 -0
- package/dist/types/nadoContractTypes.d.cts +14 -0
- package/dist/types/nadoContractTypes.d.ts +14 -0
- package/dist/types/nadoContractTypes.js +1 -0
- package/dist/types/nadoContractTypes.js.map +1 -0
- package/dist/types/orderAppendixTypes.cjs +19 -0
- package/dist/types/orderAppendixTypes.cjs.map +1 -0
- package/dist/types/orderAppendixTypes.d.cts +54 -0
- package/dist/types/orderAppendixTypes.d.ts +54 -0
- package/dist/types/orderAppendixTypes.js +1 -0
- package/dist/types/orderAppendixTypes.js.map +1 -0
- package/dist/types/productTypes.cjs +47 -0
- package/dist/types/productTypes.cjs.map +1 -0
- package/dist/types/productTypes.d.cts +55 -0
- package/dist/types/productTypes.d.ts +55 -0
- package/dist/types/productTypes.js +23 -0
- package/dist/types/productTypes.js.map +1 -0
- package/dist/types/subaccountTypes.cjs +19 -0
- package/dist/types/subaccountTypes.cjs.map +1 -0
- package/dist/types/subaccountTypes.d.cts +13 -0
- package/dist/types/subaccountTypes.d.ts +13 -0
- package/dist/types/subaccountTypes.js +1 -0
- package/dist/types/subaccountTypes.js.map +1 -0
- package/dist/types/viemTypes.cjs +19 -0
- package/dist/types/viemTypes.cjs.map +1 -0
- package/dist/types/viemTypes.d.cts +23 -0
- package/dist/types/viemTypes.d.ts +23 -0
- package/dist/types/viemTypes.js +1 -0
- package/dist/types/viemTypes.js.map +1 -0
- package/dist/utils/asyncResult.cjs +36 -0
- package/dist/utils/asyncResult.cjs.map +1 -0
- package/dist/utils/asyncResult.d.cts +4 -0
- package/dist/utils/asyncResult.d.ts +4 -0
- package/dist/utils/asyncResult.js +13 -0
- package/dist/utils/asyncResult.js.map +1 -0
- package/dist/utils/balanceValue.cjs +43 -0
- package/dist/utils/balanceValue.cjs.map +1 -0
- package/dist/utils/balanceValue.d.cts +25 -0
- package/dist/utils/balanceValue.d.ts +25 -0
- package/dist/utils/balanceValue.js +18 -0
- package/dist/utils/balanceValue.js.map +1 -0
- package/dist/utils/bytes32.cjs +92 -0
- package/dist/utils/bytes32.cjs.map +1 -0
- package/dist/utils/bytes32.d.cts +47 -0
- package/dist/utils/bytes32.d.ts +47 -0
- package/dist/utils/bytes32.js +64 -0
- package/dist/utils/bytes32.js.map +1 -0
- package/dist/utils/bytes32.test.cjs +203 -0
- package/dist/utils/bytes32.test.cjs.map +1 -0
- package/dist/utils/bytes32.test.d.cts +2 -0
- package/dist/utils/bytes32.test.d.ts +2 -0
- package/dist/utils/bytes32.test.js +165 -0
- package/dist/utils/bytes32.test.js.map +1 -0
- package/dist/utils/createDeterministicLinkedSignerPrivateKey.cjs +56 -0
- package/dist/utils/createDeterministicLinkedSignerPrivateKey.cjs.map +1 -0
- package/dist/utils/createDeterministicLinkedSignerPrivateKey.d.cts +20 -0
- package/dist/utils/createDeterministicLinkedSignerPrivateKey.d.ts +20 -0
- package/dist/utils/createDeterministicLinkedSignerPrivateKey.js +33 -0
- package/dist/utils/createDeterministicLinkedSignerPrivateKey.js.map +1 -0
- package/dist/utils/errors/WalletNotProvidedError.cjs +36 -0
- package/dist/utils/errors/WalletNotProvidedError.cjs.map +1 -0
- package/dist/utils/errors/WalletNotProvidedError.d.cts +5 -0
- package/dist/utils/errors/WalletNotProvidedError.d.ts +5 -0
- package/dist/utils/errors/WalletNotProvidedError.js +13 -0
- package/dist/utils/errors/WalletNotProvidedError.js.map +1 -0
- package/dist/utils/errors/index.cjs +25 -0
- package/dist/utils/errors/index.cjs.map +1 -0
- package/dist/utils/errors/index.d.cts +1 -0
- package/dist/utils/errors/index.d.ts +1 -0
- package/dist/utils/errors/index.js +3 -0
- package/dist/utils/errors/index.js.map +1 -0
- package/dist/utils/getValidatedAddress.cjs +37 -0
- package/dist/utils/getValidatedAddress.cjs.map +1 -0
- package/dist/utils/getValidatedAddress.d.cts +9 -0
- package/dist/utils/getValidatedAddress.d.ts +9 -0
- package/dist/utils/getValidatedAddress.js +14 -0
- package/dist/utils/getValidatedAddress.js.map +1 -0
- package/dist/utils/getValidatedHex.cjs +37 -0
- package/dist/utils/getValidatedHex.cjs.map +1 -0
- package/dist/utils/getValidatedHex.d.cts +9 -0
- package/dist/utils/getValidatedHex.d.ts +9 -0
- package/dist/utils/getValidatedHex.js +14 -0
- package/dist/utils/getValidatedHex.js.map +1 -0
- package/dist/utils/index.cjs +53 -0
- package/dist/utils/index.cjs.map +1 -0
- package/dist/utils/index.d.cts +37 -0
- package/dist/utils/index.d.ts +37 -0
- package/dist/utils/index.js +17 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/interest.cjs +94 -0
- package/dist/utils/interest.cjs.map +1 -0
- package/dist/utils/interest.d.cts +50 -0
- package/dist/utils/interest.d.ts +50 -0
- package/dist/utils/interest.js +70 -0
- package/dist/utils/interest.js.map +1 -0
- package/dist/utils/isWriteableContract.cjs +33 -0
- package/dist/utils/isWriteableContract.cjs.map +1 -0
- package/dist/utils/isWriteableContract.d.cts +6 -0
- package/dist/utils/isWriteableContract.d.ts +6 -0
- package/dist/utils/isWriteableContract.js +10 -0
- package/dist/utils/isWriteableContract.js.map +1 -0
- package/dist/utils/mapValues.cjs +38 -0
- package/dist/utils/mapValues.cjs.map +1 -0
- package/dist/utils/mapValues.d.cts +6 -0
- package/dist/utils/mapValues.d.ts +6 -0
- package/dist/utils/mapValues.js +15 -0
- package/dist/utils/mapValues.js.map +1 -0
- package/dist/utils/math/BigDecimals.cjs +37 -0
- package/dist/utils/math/BigDecimals.cjs.map +1 -0
- package/dist/utils/math/BigDecimals.d.cts +8 -0
- package/dist/utils/math/BigDecimals.d.ts +8 -0
- package/dist/utils/math/BigDecimals.js +14 -0
- package/dist/utils/math/BigDecimals.js.map +1 -0
- package/dist/utils/math/bigDecimal.cjs +57 -0
- package/dist/utils/math/bigDecimal.cjs.map +1 -0
- package/dist/utils/math/bigDecimal.d.cts +18 -0
- package/dist/utils/math/bigDecimal.d.ts +18 -0
- package/dist/utils/math/bigDecimal.js +23 -0
- package/dist/utils/math/bigDecimal.js.map +1 -0
- package/dist/utils/math/clamp.cjs +38 -0
- package/dist/utils/math/clamp.cjs.map +1 -0
- package/dist/utils/math/clamp.d.cts +15 -0
- package/dist/utils/math/clamp.d.ts +15 -0
- package/dist/utils/math/clamp.js +15 -0
- package/dist/utils/math/clamp.js.map +1 -0
- package/dist/utils/math/decimalAdjustment.cjs +60 -0
- package/dist/utils/math/decimalAdjustment.cjs.map +1 -0
- package/dist/utils/math/decimalAdjustment.d.cts +31 -0
- package/dist/utils/math/decimalAdjustment.d.ts +31 -0
- package/dist/utils/math/decimalAdjustment.js +35 -0
- package/dist/utils/math/decimalAdjustment.js.map +1 -0
- package/dist/utils/math/index.cjs +37 -0
- package/dist/utils/math/index.cjs.map +1 -0
- package/dist/utils/math/index.d.cts +8 -0
- package/dist/utils/math/index.d.ts +8 -0
- package/dist/utils/math/index.js +9 -0
- package/dist/utils/math/index.js.map +1 -0
- package/dist/utils/math/sumBigDecimalBy.cjs +36 -0
- package/dist/utils/math/sumBigDecimalBy.cjs.map +1 -0
- package/dist/utils/math/sumBigDecimalBy.d.cts +10 -0
- package/dist/utils/math/sumBigDecimalBy.d.ts +10 -0
- package/dist/utils/math/sumBigDecimalBy.js +13 -0
- package/dist/utils/math/sumBigDecimalBy.js.map +1 -0
- package/dist/utils/math/toBigInt.cjs +34 -0
- package/dist/utils/math/toBigInt.cjs.map +1 -0
- package/dist/utils/math/toBigInt.d.cts +11 -0
- package/dist/utils/math/toBigInt.d.ts +11 -0
- package/dist/utils/math/toBigInt.js +11 -0
- package/dist/utils/math/toBigInt.js.map +1 -0
- package/dist/utils/math/toIntegerString.cjs +34 -0
- package/dist/utils/math/toIntegerString.cjs.map +1 -0
- package/dist/utils/math/toIntegerString.d.cts +11 -0
- package/dist/utils/math/toIntegerString.d.ts +11 -0
- package/dist/utils/math/toIntegerString.js +11 -0
- package/dist/utils/math/toIntegerString.js.map +1 -0
- package/dist/utils/orders/appendix/appendixTWAPValue.cjs +50 -0
- package/dist/utils/orders/appendix/appendixTWAPValue.cjs.map +1 -0
- package/dist/utils/orders/appendix/appendixTWAPValue.d.cts +31 -0
- package/dist/utils/orders/appendix/appendixTWAPValue.d.ts +31 -0
- package/dist/utils/orders/appendix/appendixTWAPValue.js +26 -0
- package/dist/utils/orders/appendix/appendixTWAPValue.js.map +1 -0
- package/dist/utils/orders/appendix/bitMaskValue.cjs +34 -0
- package/dist/utils/orders/appendix/bitMaskValue.cjs.map +1 -0
- package/dist/utils/orders/appendix/bitMaskValue.d.cts +10 -0
- package/dist/utils/orders/appendix/bitMaskValue.d.ts +10 -0
- package/dist/utils/orders/appendix/bitMaskValue.js +11 -0
- package/dist/utils/orders/appendix/bitMaskValue.js.map +1 -0
- package/dist/utils/orders/appendix/index.cjs +33 -0
- package/dist/utils/orders/appendix/index.cjs.map +1 -0
- package/dist/utils/orders/appendix/index.d.cts +9 -0
- package/dist/utils/orders/appendix/index.d.ts +9 -0
- package/dist/utils/orders/appendix/index.js +7 -0
- package/dist/utils/orders/appendix/index.js.map +1 -0
- package/dist/utils/orders/appendix/orderAppendix.test.cjs +165 -0
- package/dist/utils/orders/appendix/orderAppendix.test.cjs.map +1 -0
- package/dist/utils/orders/appendix/orderAppendix.test.d.cts +2 -0
- package/dist/utils/orders/appendix/orderAppendix.test.d.ts +2 -0
- package/dist/utils/orders/appendix/orderAppendix.test.js +120 -0
- package/dist/utils/orders/appendix/orderAppendix.test.js.map +1 -0
- package/dist/utils/orders/appendix/packOrderAppendix.cjs +88 -0
- package/dist/utils/orders/appendix/packOrderAppendix.cjs.map +1 -0
- package/dist/utils/orders/appendix/packOrderAppendix.d.cts +12 -0
- package/dist/utils/orders/appendix/packOrderAppendix.d.ts +12 -0
- package/dist/utils/orders/appendix/packOrderAppendix.js +65 -0
- package/dist/utils/orders/appendix/packOrderAppendix.js.map +1 -0
- package/dist/utils/orders/appendix/types.cjs +19 -0
- package/dist/utils/orders/appendix/types.cjs.map +1 -0
- package/dist/utils/orders/appendix/types.d.cts +19 -0
- package/dist/utils/orders/appendix/types.d.ts +19 -0
- package/dist/utils/orders/appendix/types.js +1 -0
- package/dist/utils/orders/appendix/types.js.map +1 -0
- package/dist/utils/orders/appendix/unpackOrderAppendix.cjs +106 -0
- package/dist/utils/orders/appendix/unpackOrderAppendix.cjs.map +1 -0
- package/dist/utils/orders/appendix/unpackOrderAppendix.d.cts +12 -0
- package/dist/utils/orders/appendix/unpackOrderAppendix.d.ts +12 -0
- package/dist/utils/orders/appendix/unpackOrderAppendix.js +83 -0
- package/dist/utils/orders/appendix/unpackOrderAppendix.js.map +1 -0
- package/dist/utils/orders/index.cjs +29 -0
- package/dist/utils/orders/index.cjs.map +1 -0
- package/dist/utils/orders/index.d.cts +11 -0
- package/dist/utils/orders/index.d.ts +11 -0
- package/dist/utils/orders/index.js +5 -0
- package/dist/utils/orders/index.js.map +1 -0
- package/dist/utils/orders/orderNonce.cjs +44 -0
- package/dist/utils/orders/orderNonce.cjs.map +1 -0
- package/dist/utils/orders/orderNonce.d.cts +14 -0
- package/dist/utils/orders/orderNonce.d.ts +14 -0
- package/dist/utils/orders/orderNonce.js +20 -0
- package/dist/utils/orders/orderNonce.js.map +1 -0
- package/dist/utils/orders/recvTime.cjs +33 -0
- package/dist/utils/orders/recvTime.cjs.map +1 -0
- package/dist/utils/orders/recvTime.d.cts +9 -0
- package/dist/utils/orders/recvTime.d.ts +9 -0
- package/dist/utils/orders/recvTime.js +10 -0
- package/dist/utils/orders/recvTime.js.map +1 -0
- package/dist/utils/productTypeFilter.cjs +49 -0
- package/dist/utils/productTypeFilter.cjs.map +1 -0
- package/dist/utils/productTypeFilter.d.cts +11 -0
- package/dist/utils/productTypeFilter.d.ts +11 -0
- package/dist/utils/productTypeFilter.js +25 -0
- package/dist/utils/productTypeFilter.js.map +1 -0
- package/dist/utils/time.cjs +47 -0
- package/dist/utils/time.cjs.map +1 -0
- package/dist/utils/time.d.cts +17 -0
- package/dist/utils/time.d.ts +17 -0
- package/dist/utils/time.js +22 -0
- package/dist/utils/time.js.map +1 -0
- package/dist/utils/toPrintableObject.cjs +51 -0
- package/dist/utils/toPrintableObject.cjs.map +1 -0
- package/dist/utils/toPrintableObject.d.cts +6 -0
- package/dist/utils/toPrintableObject.d.ts +6 -0
- package/dist/utils/toPrintableObject.js +28 -0
- package/dist/utils/toPrintableObject.js.map +1 -0
- package/package.json +49 -0
- package/src/abis/Clearinghouse.ts +861 -0
- package/src/abis/ERC20.ts +185 -0
- package/src/abis/Endpoint.ts +559 -0
- package/src/abis/MockERC20.ts +311 -0
- package/src/abis/PerpEngine.ts +856 -0
- package/src/abis/Querier.ts +1492 -0
- package/src/abis/SpotEngine.ts +907 -0
- package/src/abis/WithdrawPool.ts +277 -0
- package/src/abis/index.ts +9 -0
- package/src/abis/nadoAbis.ts +19 -0
- package/src/consts/chainEnvToChain.ts +16 -0
- package/src/consts/index.ts +2 -0
- package/src/consts/productIds.ts +3 -0
- package/src/deployments/core/deployment.InkSepolia.json +13 -0
- package/src/deployments/core/deployment.arbitrumOne.json +18 -0
- package/src/deployments/core/deployment.localhost.json +18 -0
- package/src/deployments/index.ts +40 -0
- package/src/eip712/eip712ValueTypes.ts +83 -0
- package/src/eip712/getNadoEIP712Domain.ts +20 -0
- package/src/eip712/getNadoEIP712PrimaryType.ts +13 -0
- package/src/eip712/getNadoEIP712Types.ts +113 -0
- package/src/eip712/getNadoEIP712Values.ts +248 -0
- package/src/eip712/getOrderVerifyingAddress.ts +9 -0
- package/src/eip712/getSignedTransactionRequest.ts +30 -0
- package/src/eip712/index.ts +10 -0
- package/src/eip712/orderDigest.ts +28 -0
- package/src/eip712/signableRequestType.ts +32 -0
- package/src/eip712/signatureParamTypes.ts +84 -0
- package/src/encoding/encoding.ts +50 -0
- package/src/encoding/index.ts +1 -0
- package/src/execute/approveDepositAllowance.ts +20 -0
- package/src/execute/depositCollateral.ts +43 -0
- package/src/execute/index.ts +2 -0
- package/src/index.ts +8 -0
- package/src/types/ChainEnv.ts +13 -0
- package/src/types/OrderExecutionType.ts +8 -0
- package/src/types/balanceTypes.ts +47 -0
- package/src/types/bytes.ts +1 -0
- package/src/types/healthTypes.ts +17 -0
- package/src/types/index.ts +11 -0
- package/src/types/marketTypes.ts +40 -0
- package/src/types/nadoContractTypes.ts +14 -0
- package/src/types/orderAppendixTypes.ts +58 -0
- package/src/types/productTypes.ts +76 -0
- package/src/types/subaccountTypes.ts +13 -0
- package/src/types/viemTypes.ts +42 -0
- package/src/utils/asyncResult.ts +12 -0
- package/src/utils/balanceValue.ts +42 -0
- package/src/utils/bytes32.test.ts +117 -0
- package/src/utils/bytes32.ts +110 -0
- package/src/utils/createDeterministicLinkedSignerPrivateKey.ts +46 -0
- package/src/utils/errors/WalletNotProvidedError.ts +6 -0
- package/src/utils/errors/index.ts +1 -0
- package/src/utils/getValidatedAddress.ts +13 -0
- package/src/utils/getValidatedHex.ts +13 -0
- package/src/utils/index.ts +15 -0
- package/src/utils/interest.ts +133 -0
- package/src/utils/isWriteableContract.ts +11 -0
- package/src/utils/mapValues.ts +18 -0
- package/src/utils/math/BigDecimals.ts +8 -0
- package/src/utils/math/bigDecimal.ts +32 -0
- package/src/utils/math/clamp.ts +26 -0
- package/src/utils/math/decimalAdjustment.ts +65 -0
- package/src/utils/math/index.ts +7 -0
- package/src/utils/math/sumBigDecimalBy.ts +18 -0
- package/src/utils/math/toBigInt.ts +11 -0
- package/src/utils/math/toIntegerString.ts +11 -0
- package/src/utils/orders/appendix/appendixTWAPValue.ts +51 -0
- package/src/utils/orders/appendix/bitMaskValue.ts +11 -0
- package/src/utils/orders/appendix/index.ts +5 -0
- package/src/utils/orders/appendix/orderAppendix.test.ts +121 -0
- package/src/utils/orders/appendix/packOrderAppendix.ts +71 -0
- package/src/utils/orders/appendix/types.ts +17 -0
- package/src/utils/orders/appendix/unpackOrderAppendix.ts +90 -0
- package/src/utils/orders/index.ts +3 -0
- package/src/utils/orders/orderNonce.ts +32 -0
- package/src/utils/orders/recvTime.ts +9 -0
- package/src/utils/productTypeFilter.ts +23 -0
- package/src/utils/time.ts +21 -0
- package/src/utils/toPrintableObject.ts +25 -0
|
@@ -0,0 +1,1149 @@
|
|
|
1
|
+
declare const QUERIER_ABI: readonly [{
|
|
2
|
+
readonly inputs: readonly [];
|
|
3
|
+
readonly name: "getAllProducts";
|
|
4
|
+
readonly outputs: readonly [{
|
|
5
|
+
readonly components: readonly [{
|
|
6
|
+
readonly components: readonly [{
|
|
7
|
+
readonly internalType: "uint32";
|
|
8
|
+
readonly name: "productId";
|
|
9
|
+
readonly type: "uint32";
|
|
10
|
+
}, {
|
|
11
|
+
readonly internalType: "int128";
|
|
12
|
+
readonly name: "oraclePriceX18";
|
|
13
|
+
readonly type: "int128";
|
|
14
|
+
}, {
|
|
15
|
+
readonly components: readonly [{
|
|
16
|
+
readonly internalType: "int128";
|
|
17
|
+
readonly name: "longWeightInitialX18";
|
|
18
|
+
readonly type: "int128";
|
|
19
|
+
}, {
|
|
20
|
+
readonly internalType: "int128";
|
|
21
|
+
readonly name: "shortWeightInitialX18";
|
|
22
|
+
readonly type: "int128";
|
|
23
|
+
}, {
|
|
24
|
+
readonly internalType: "int128";
|
|
25
|
+
readonly name: "longWeightMaintenanceX18";
|
|
26
|
+
readonly type: "int128";
|
|
27
|
+
}, {
|
|
28
|
+
readonly internalType: "int128";
|
|
29
|
+
readonly name: "shortWeightMaintenanceX18";
|
|
30
|
+
readonly type: "int128";
|
|
31
|
+
}, {
|
|
32
|
+
readonly internalType: "int128";
|
|
33
|
+
readonly name: "priceX18";
|
|
34
|
+
readonly type: "int128";
|
|
35
|
+
}];
|
|
36
|
+
readonly internalType: "struct RiskHelper.Risk";
|
|
37
|
+
readonly name: "risk";
|
|
38
|
+
readonly type: "tuple";
|
|
39
|
+
}, {
|
|
40
|
+
readonly components: readonly [{
|
|
41
|
+
readonly internalType: "address";
|
|
42
|
+
readonly name: "token";
|
|
43
|
+
readonly type: "address";
|
|
44
|
+
}, {
|
|
45
|
+
readonly internalType: "int128";
|
|
46
|
+
readonly name: "interestInflectionUtilX18";
|
|
47
|
+
readonly type: "int128";
|
|
48
|
+
}, {
|
|
49
|
+
readonly internalType: "int128";
|
|
50
|
+
readonly name: "interestFloorX18";
|
|
51
|
+
readonly type: "int128";
|
|
52
|
+
}, {
|
|
53
|
+
readonly internalType: "int128";
|
|
54
|
+
readonly name: "interestSmallCapX18";
|
|
55
|
+
readonly type: "int128";
|
|
56
|
+
}, {
|
|
57
|
+
readonly internalType: "int128";
|
|
58
|
+
readonly name: "interestLargeCapX18";
|
|
59
|
+
readonly type: "int128";
|
|
60
|
+
}, {
|
|
61
|
+
readonly internalType: "int128";
|
|
62
|
+
readonly name: "withdrawFeeX18";
|
|
63
|
+
readonly type: "int128";
|
|
64
|
+
}, {
|
|
65
|
+
readonly internalType: "int128";
|
|
66
|
+
readonly name: "minDepositRateX18";
|
|
67
|
+
readonly type: "int128";
|
|
68
|
+
}];
|
|
69
|
+
readonly internalType: "struct ISpotEngine.Config";
|
|
70
|
+
readonly name: "config";
|
|
71
|
+
readonly type: "tuple";
|
|
72
|
+
}, {
|
|
73
|
+
readonly components: readonly [{
|
|
74
|
+
readonly internalType: "int128";
|
|
75
|
+
readonly name: "cumulativeDepositsMultiplierX18";
|
|
76
|
+
readonly type: "int128";
|
|
77
|
+
}, {
|
|
78
|
+
readonly internalType: "int128";
|
|
79
|
+
readonly name: "cumulativeBorrowsMultiplierX18";
|
|
80
|
+
readonly type: "int128";
|
|
81
|
+
}, {
|
|
82
|
+
readonly internalType: "int128";
|
|
83
|
+
readonly name: "totalDepositsNormalized";
|
|
84
|
+
readonly type: "int128";
|
|
85
|
+
}, {
|
|
86
|
+
readonly internalType: "int128";
|
|
87
|
+
readonly name: "totalBorrowsNormalized";
|
|
88
|
+
readonly type: "int128";
|
|
89
|
+
}];
|
|
90
|
+
readonly internalType: "struct ISpotEngine.State";
|
|
91
|
+
readonly name: "state";
|
|
92
|
+
readonly type: "tuple";
|
|
93
|
+
}, {
|
|
94
|
+
readonly components: readonly [{
|
|
95
|
+
readonly internalType: "int128";
|
|
96
|
+
readonly name: "sizeIncrement";
|
|
97
|
+
readonly type: "int128";
|
|
98
|
+
}, {
|
|
99
|
+
readonly internalType: "int128";
|
|
100
|
+
readonly name: "priceIncrementX18";
|
|
101
|
+
readonly type: "int128";
|
|
102
|
+
}, {
|
|
103
|
+
readonly internalType: "int128";
|
|
104
|
+
readonly name: "minSize";
|
|
105
|
+
readonly type: "int128";
|
|
106
|
+
}, {
|
|
107
|
+
readonly internalType: "int128";
|
|
108
|
+
readonly name: "collectedFees";
|
|
109
|
+
readonly type: "int128";
|
|
110
|
+
}];
|
|
111
|
+
readonly internalType: "struct FQuerier.BookInfo";
|
|
112
|
+
readonly name: "bookInfo";
|
|
113
|
+
readonly type: "tuple";
|
|
114
|
+
}];
|
|
115
|
+
readonly internalType: "struct FQuerier.SpotProduct[]";
|
|
116
|
+
readonly name: "spotProducts";
|
|
117
|
+
readonly type: "tuple[]";
|
|
118
|
+
}, {
|
|
119
|
+
readonly components: readonly [{
|
|
120
|
+
readonly internalType: "uint32";
|
|
121
|
+
readonly name: "productId";
|
|
122
|
+
readonly type: "uint32";
|
|
123
|
+
}, {
|
|
124
|
+
readonly internalType: "int128";
|
|
125
|
+
readonly name: "oraclePriceX18";
|
|
126
|
+
readonly type: "int128";
|
|
127
|
+
}, {
|
|
128
|
+
readonly components: readonly [{
|
|
129
|
+
readonly internalType: "int128";
|
|
130
|
+
readonly name: "longWeightInitialX18";
|
|
131
|
+
readonly type: "int128";
|
|
132
|
+
}, {
|
|
133
|
+
readonly internalType: "int128";
|
|
134
|
+
readonly name: "shortWeightInitialX18";
|
|
135
|
+
readonly type: "int128";
|
|
136
|
+
}, {
|
|
137
|
+
readonly internalType: "int128";
|
|
138
|
+
readonly name: "longWeightMaintenanceX18";
|
|
139
|
+
readonly type: "int128";
|
|
140
|
+
}, {
|
|
141
|
+
readonly internalType: "int128";
|
|
142
|
+
readonly name: "shortWeightMaintenanceX18";
|
|
143
|
+
readonly type: "int128";
|
|
144
|
+
}, {
|
|
145
|
+
readonly internalType: "int128";
|
|
146
|
+
readonly name: "priceX18";
|
|
147
|
+
readonly type: "int128";
|
|
148
|
+
}];
|
|
149
|
+
readonly internalType: "struct RiskHelper.Risk";
|
|
150
|
+
readonly name: "risk";
|
|
151
|
+
readonly type: "tuple";
|
|
152
|
+
}, {
|
|
153
|
+
readonly components: readonly [{
|
|
154
|
+
readonly internalType: "int128";
|
|
155
|
+
readonly name: "cumulativeFundingLongX18";
|
|
156
|
+
readonly type: "int128";
|
|
157
|
+
}, {
|
|
158
|
+
readonly internalType: "int128";
|
|
159
|
+
readonly name: "cumulativeFundingShortX18";
|
|
160
|
+
readonly type: "int128";
|
|
161
|
+
}, {
|
|
162
|
+
readonly internalType: "int128";
|
|
163
|
+
readonly name: "availableSettle";
|
|
164
|
+
readonly type: "int128";
|
|
165
|
+
}, {
|
|
166
|
+
readonly internalType: "int128";
|
|
167
|
+
readonly name: "openInterest";
|
|
168
|
+
readonly type: "int128";
|
|
169
|
+
}];
|
|
170
|
+
readonly internalType: "struct IPerpEngine.State";
|
|
171
|
+
readonly name: "state";
|
|
172
|
+
readonly type: "tuple";
|
|
173
|
+
}, {
|
|
174
|
+
readonly components: readonly [{
|
|
175
|
+
readonly internalType: "int128";
|
|
176
|
+
readonly name: "sizeIncrement";
|
|
177
|
+
readonly type: "int128";
|
|
178
|
+
}, {
|
|
179
|
+
readonly internalType: "int128";
|
|
180
|
+
readonly name: "priceIncrementX18";
|
|
181
|
+
readonly type: "int128";
|
|
182
|
+
}, {
|
|
183
|
+
readonly internalType: "int128";
|
|
184
|
+
readonly name: "minSize";
|
|
185
|
+
readonly type: "int128";
|
|
186
|
+
}, {
|
|
187
|
+
readonly internalType: "int128";
|
|
188
|
+
readonly name: "collectedFees";
|
|
189
|
+
readonly type: "int128";
|
|
190
|
+
}];
|
|
191
|
+
readonly internalType: "struct FQuerier.BookInfo";
|
|
192
|
+
readonly name: "bookInfo";
|
|
193
|
+
readonly type: "tuple";
|
|
194
|
+
}];
|
|
195
|
+
readonly internalType: "struct FQuerier.PerpProduct[]";
|
|
196
|
+
readonly name: "perpProducts";
|
|
197
|
+
readonly type: "tuple[]";
|
|
198
|
+
}];
|
|
199
|
+
readonly internalType: "struct FQuerier.ProductInfo";
|
|
200
|
+
readonly name: "";
|
|
201
|
+
readonly type: "tuple";
|
|
202
|
+
}];
|
|
203
|
+
readonly stateMutability: "view";
|
|
204
|
+
readonly type: "function";
|
|
205
|
+
}, {
|
|
206
|
+
readonly inputs: readonly [{
|
|
207
|
+
readonly internalType: "uint32";
|
|
208
|
+
readonly name: "productId";
|
|
209
|
+
readonly type: "uint32";
|
|
210
|
+
}];
|
|
211
|
+
readonly name: "getBookInfo";
|
|
212
|
+
readonly outputs: readonly [{
|
|
213
|
+
readonly components: readonly [{
|
|
214
|
+
readonly internalType: "int128";
|
|
215
|
+
readonly name: "sizeIncrement";
|
|
216
|
+
readonly type: "int128";
|
|
217
|
+
}, {
|
|
218
|
+
readonly internalType: "int128";
|
|
219
|
+
readonly name: "priceIncrementX18";
|
|
220
|
+
readonly type: "int128";
|
|
221
|
+
}, {
|
|
222
|
+
readonly internalType: "int128";
|
|
223
|
+
readonly name: "minSize";
|
|
224
|
+
readonly type: "int128";
|
|
225
|
+
}, {
|
|
226
|
+
readonly internalType: "int128";
|
|
227
|
+
readonly name: "collectedFees";
|
|
228
|
+
readonly type: "int128";
|
|
229
|
+
}];
|
|
230
|
+
readonly internalType: "struct FQuerier.BookInfo";
|
|
231
|
+
readonly name: "bookInfo";
|
|
232
|
+
readonly type: "tuple";
|
|
233
|
+
}];
|
|
234
|
+
readonly stateMutability: "view";
|
|
235
|
+
readonly type: "function";
|
|
236
|
+
}, {
|
|
237
|
+
readonly inputs: readonly [];
|
|
238
|
+
readonly name: "getClearinghouse";
|
|
239
|
+
readonly outputs: readonly [{
|
|
240
|
+
readonly internalType: "address";
|
|
241
|
+
readonly name: "";
|
|
242
|
+
readonly type: "address";
|
|
243
|
+
}];
|
|
244
|
+
readonly stateMutability: "view";
|
|
245
|
+
readonly type: "function";
|
|
246
|
+
}, {
|
|
247
|
+
readonly inputs: readonly [];
|
|
248
|
+
readonly name: "getNlpPoolInfo";
|
|
249
|
+
readonly outputs: readonly [{
|
|
250
|
+
readonly components: readonly [{
|
|
251
|
+
readonly components: readonly [{
|
|
252
|
+
readonly internalType: "uint64";
|
|
253
|
+
readonly name: "poolId";
|
|
254
|
+
readonly type: "uint64";
|
|
255
|
+
}, {
|
|
256
|
+
readonly internalType: "bytes32";
|
|
257
|
+
readonly name: "subaccount";
|
|
258
|
+
readonly type: "bytes32";
|
|
259
|
+
}, {
|
|
260
|
+
readonly internalType: "address";
|
|
261
|
+
readonly name: "owner";
|
|
262
|
+
readonly type: "address";
|
|
263
|
+
}, {
|
|
264
|
+
readonly internalType: "uint128";
|
|
265
|
+
readonly name: "balanceWeightX18";
|
|
266
|
+
readonly type: "uint128";
|
|
267
|
+
}];
|
|
268
|
+
readonly internalType: "struct FQuerier.NlpPool[]";
|
|
269
|
+
readonly name: "nlpPools";
|
|
270
|
+
readonly type: "tuple[]";
|
|
271
|
+
}];
|
|
272
|
+
readonly internalType: "struct FQuerier.NlpPoolInfo";
|
|
273
|
+
readonly name: "";
|
|
274
|
+
readonly type: "tuple";
|
|
275
|
+
}];
|
|
276
|
+
readonly stateMutability: "view";
|
|
277
|
+
readonly type: "function";
|
|
278
|
+
}, {
|
|
279
|
+
readonly inputs: readonly [{
|
|
280
|
+
readonly internalType: "bytes32";
|
|
281
|
+
readonly name: "subaccount";
|
|
282
|
+
readonly type: "bytes32";
|
|
283
|
+
}, {
|
|
284
|
+
readonly internalType: "uint32";
|
|
285
|
+
readonly name: "productId";
|
|
286
|
+
readonly type: "uint32";
|
|
287
|
+
}];
|
|
288
|
+
readonly name: "getPerpBalance";
|
|
289
|
+
readonly outputs: readonly [{
|
|
290
|
+
readonly components: readonly [{
|
|
291
|
+
readonly internalType: "uint32";
|
|
292
|
+
readonly name: "productId";
|
|
293
|
+
readonly type: "uint32";
|
|
294
|
+
}, {
|
|
295
|
+
readonly components: readonly [{
|
|
296
|
+
readonly internalType: "int128";
|
|
297
|
+
readonly name: "amount";
|
|
298
|
+
readonly type: "int128";
|
|
299
|
+
}, {
|
|
300
|
+
readonly internalType: "int128";
|
|
301
|
+
readonly name: "vQuoteBalance";
|
|
302
|
+
readonly type: "int128";
|
|
303
|
+
}, {
|
|
304
|
+
readonly internalType: "int128";
|
|
305
|
+
readonly name: "lastCumulativeFundingX18";
|
|
306
|
+
readonly type: "int128";
|
|
307
|
+
}];
|
|
308
|
+
readonly internalType: "struct IPerpEngine.Balance";
|
|
309
|
+
readonly name: "balance";
|
|
310
|
+
readonly type: "tuple";
|
|
311
|
+
}];
|
|
312
|
+
readonly internalType: "struct FQuerier.PerpBalance";
|
|
313
|
+
readonly name: "";
|
|
314
|
+
readonly type: "tuple";
|
|
315
|
+
}];
|
|
316
|
+
readonly stateMutability: "view";
|
|
317
|
+
readonly type: "function";
|
|
318
|
+
}, {
|
|
319
|
+
readonly inputs: readonly [{
|
|
320
|
+
readonly internalType: "bytes32";
|
|
321
|
+
readonly name: "subaccount";
|
|
322
|
+
readonly type: "bytes32";
|
|
323
|
+
}, {
|
|
324
|
+
readonly internalType: "uint32[]";
|
|
325
|
+
readonly name: "productIds";
|
|
326
|
+
readonly type: "uint32[]";
|
|
327
|
+
}];
|
|
328
|
+
readonly name: "getPerpBalances";
|
|
329
|
+
readonly outputs: readonly [{
|
|
330
|
+
readonly components: readonly [{
|
|
331
|
+
readonly internalType: "uint32";
|
|
332
|
+
readonly name: "productId";
|
|
333
|
+
readonly type: "uint32";
|
|
334
|
+
}, {
|
|
335
|
+
readonly components: readonly [{
|
|
336
|
+
readonly internalType: "int128";
|
|
337
|
+
readonly name: "amount";
|
|
338
|
+
readonly type: "int128";
|
|
339
|
+
}, {
|
|
340
|
+
readonly internalType: "int128";
|
|
341
|
+
readonly name: "vQuoteBalance";
|
|
342
|
+
readonly type: "int128";
|
|
343
|
+
}, {
|
|
344
|
+
readonly internalType: "int128";
|
|
345
|
+
readonly name: "lastCumulativeFundingX18";
|
|
346
|
+
readonly type: "int128";
|
|
347
|
+
}];
|
|
348
|
+
readonly internalType: "struct IPerpEngine.Balance";
|
|
349
|
+
readonly name: "balance";
|
|
350
|
+
readonly type: "tuple";
|
|
351
|
+
}];
|
|
352
|
+
readonly internalType: "struct FQuerier.PerpBalance[]";
|
|
353
|
+
readonly name: "perpBalances";
|
|
354
|
+
readonly type: "tuple[]";
|
|
355
|
+
}];
|
|
356
|
+
readonly stateMutability: "view";
|
|
357
|
+
readonly type: "function";
|
|
358
|
+
}, {
|
|
359
|
+
readonly inputs: readonly [{
|
|
360
|
+
readonly internalType: "uint32";
|
|
361
|
+
readonly name: "productId";
|
|
362
|
+
readonly type: "uint32";
|
|
363
|
+
}];
|
|
364
|
+
readonly name: "getPerpProduct";
|
|
365
|
+
readonly outputs: readonly [{
|
|
366
|
+
readonly components: readonly [{
|
|
367
|
+
readonly internalType: "uint32";
|
|
368
|
+
readonly name: "productId";
|
|
369
|
+
readonly type: "uint32";
|
|
370
|
+
}, {
|
|
371
|
+
readonly internalType: "int128";
|
|
372
|
+
readonly name: "oraclePriceX18";
|
|
373
|
+
readonly type: "int128";
|
|
374
|
+
}, {
|
|
375
|
+
readonly components: readonly [{
|
|
376
|
+
readonly internalType: "int128";
|
|
377
|
+
readonly name: "longWeightInitialX18";
|
|
378
|
+
readonly type: "int128";
|
|
379
|
+
}, {
|
|
380
|
+
readonly internalType: "int128";
|
|
381
|
+
readonly name: "shortWeightInitialX18";
|
|
382
|
+
readonly type: "int128";
|
|
383
|
+
}, {
|
|
384
|
+
readonly internalType: "int128";
|
|
385
|
+
readonly name: "longWeightMaintenanceX18";
|
|
386
|
+
readonly type: "int128";
|
|
387
|
+
}, {
|
|
388
|
+
readonly internalType: "int128";
|
|
389
|
+
readonly name: "shortWeightMaintenanceX18";
|
|
390
|
+
readonly type: "int128";
|
|
391
|
+
}, {
|
|
392
|
+
readonly internalType: "int128";
|
|
393
|
+
readonly name: "priceX18";
|
|
394
|
+
readonly type: "int128";
|
|
395
|
+
}];
|
|
396
|
+
readonly internalType: "struct RiskHelper.Risk";
|
|
397
|
+
readonly name: "risk";
|
|
398
|
+
readonly type: "tuple";
|
|
399
|
+
}, {
|
|
400
|
+
readonly components: readonly [{
|
|
401
|
+
readonly internalType: "int128";
|
|
402
|
+
readonly name: "cumulativeFundingLongX18";
|
|
403
|
+
readonly type: "int128";
|
|
404
|
+
}, {
|
|
405
|
+
readonly internalType: "int128";
|
|
406
|
+
readonly name: "cumulativeFundingShortX18";
|
|
407
|
+
readonly type: "int128";
|
|
408
|
+
}, {
|
|
409
|
+
readonly internalType: "int128";
|
|
410
|
+
readonly name: "availableSettle";
|
|
411
|
+
readonly type: "int128";
|
|
412
|
+
}, {
|
|
413
|
+
readonly internalType: "int128";
|
|
414
|
+
readonly name: "openInterest";
|
|
415
|
+
readonly type: "int128";
|
|
416
|
+
}];
|
|
417
|
+
readonly internalType: "struct IPerpEngine.State";
|
|
418
|
+
readonly name: "state";
|
|
419
|
+
readonly type: "tuple";
|
|
420
|
+
}, {
|
|
421
|
+
readonly components: readonly [{
|
|
422
|
+
readonly internalType: "int128";
|
|
423
|
+
readonly name: "sizeIncrement";
|
|
424
|
+
readonly type: "int128";
|
|
425
|
+
}, {
|
|
426
|
+
readonly internalType: "int128";
|
|
427
|
+
readonly name: "priceIncrementX18";
|
|
428
|
+
readonly type: "int128";
|
|
429
|
+
}, {
|
|
430
|
+
readonly internalType: "int128";
|
|
431
|
+
readonly name: "minSize";
|
|
432
|
+
readonly type: "int128";
|
|
433
|
+
}, {
|
|
434
|
+
readonly internalType: "int128";
|
|
435
|
+
readonly name: "collectedFees";
|
|
436
|
+
readonly type: "int128";
|
|
437
|
+
}];
|
|
438
|
+
readonly internalType: "struct FQuerier.BookInfo";
|
|
439
|
+
readonly name: "bookInfo";
|
|
440
|
+
readonly type: "tuple";
|
|
441
|
+
}];
|
|
442
|
+
readonly internalType: "struct FQuerier.PerpProduct";
|
|
443
|
+
readonly name: "";
|
|
444
|
+
readonly type: "tuple";
|
|
445
|
+
}];
|
|
446
|
+
readonly stateMutability: "view";
|
|
447
|
+
readonly type: "function";
|
|
448
|
+
}, {
|
|
449
|
+
readonly inputs: readonly [{
|
|
450
|
+
readonly internalType: "uint32[]";
|
|
451
|
+
readonly name: "productIds";
|
|
452
|
+
readonly type: "uint32[]";
|
|
453
|
+
}];
|
|
454
|
+
readonly name: "getPerpProducts";
|
|
455
|
+
readonly outputs: readonly [{
|
|
456
|
+
readonly components: readonly [{
|
|
457
|
+
readonly internalType: "uint32";
|
|
458
|
+
readonly name: "productId";
|
|
459
|
+
readonly type: "uint32";
|
|
460
|
+
}, {
|
|
461
|
+
readonly internalType: "int128";
|
|
462
|
+
readonly name: "oraclePriceX18";
|
|
463
|
+
readonly type: "int128";
|
|
464
|
+
}, {
|
|
465
|
+
readonly components: readonly [{
|
|
466
|
+
readonly internalType: "int128";
|
|
467
|
+
readonly name: "longWeightInitialX18";
|
|
468
|
+
readonly type: "int128";
|
|
469
|
+
}, {
|
|
470
|
+
readonly internalType: "int128";
|
|
471
|
+
readonly name: "shortWeightInitialX18";
|
|
472
|
+
readonly type: "int128";
|
|
473
|
+
}, {
|
|
474
|
+
readonly internalType: "int128";
|
|
475
|
+
readonly name: "longWeightMaintenanceX18";
|
|
476
|
+
readonly type: "int128";
|
|
477
|
+
}, {
|
|
478
|
+
readonly internalType: "int128";
|
|
479
|
+
readonly name: "shortWeightMaintenanceX18";
|
|
480
|
+
readonly type: "int128";
|
|
481
|
+
}, {
|
|
482
|
+
readonly internalType: "int128";
|
|
483
|
+
readonly name: "priceX18";
|
|
484
|
+
readonly type: "int128";
|
|
485
|
+
}];
|
|
486
|
+
readonly internalType: "struct RiskHelper.Risk";
|
|
487
|
+
readonly name: "risk";
|
|
488
|
+
readonly type: "tuple";
|
|
489
|
+
}, {
|
|
490
|
+
readonly components: readonly [{
|
|
491
|
+
readonly internalType: "int128";
|
|
492
|
+
readonly name: "cumulativeFundingLongX18";
|
|
493
|
+
readonly type: "int128";
|
|
494
|
+
}, {
|
|
495
|
+
readonly internalType: "int128";
|
|
496
|
+
readonly name: "cumulativeFundingShortX18";
|
|
497
|
+
readonly type: "int128";
|
|
498
|
+
}, {
|
|
499
|
+
readonly internalType: "int128";
|
|
500
|
+
readonly name: "availableSettle";
|
|
501
|
+
readonly type: "int128";
|
|
502
|
+
}, {
|
|
503
|
+
readonly internalType: "int128";
|
|
504
|
+
readonly name: "openInterest";
|
|
505
|
+
readonly type: "int128";
|
|
506
|
+
}];
|
|
507
|
+
readonly internalType: "struct IPerpEngine.State";
|
|
508
|
+
readonly name: "state";
|
|
509
|
+
readonly type: "tuple";
|
|
510
|
+
}, {
|
|
511
|
+
readonly components: readonly [{
|
|
512
|
+
readonly internalType: "int128";
|
|
513
|
+
readonly name: "sizeIncrement";
|
|
514
|
+
readonly type: "int128";
|
|
515
|
+
}, {
|
|
516
|
+
readonly internalType: "int128";
|
|
517
|
+
readonly name: "priceIncrementX18";
|
|
518
|
+
readonly type: "int128";
|
|
519
|
+
}, {
|
|
520
|
+
readonly internalType: "int128";
|
|
521
|
+
readonly name: "minSize";
|
|
522
|
+
readonly type: "int128";
|
|
523
|
+
}, {
|
|
524
|
+
readonly internalType: "int128";
|
|
525
|
+
readonly name: "collectedFees";
|
|
526
|
+
readonly type: "int128";
|
|
527
|
+
}];
|
|
528
|
+
readonly internalType: "struct FQuerier.BookInfo";
|
|
529
|
+
readonly name: "bookInfo";
|
|
530
|
+
readonly type: "tuple";
|
|
531
|
+
}];
|
|
532
|
+
readonly internalType: "struct FQuerier.PerpProduct[]";
|
|
533
|
+
readonly name: "perpProducts";
|
|
534
|
+
readonly type: "tuple[]";
|
|
535
|
+
}];
|
|
536
|
+
readonly stateMutability: "view";
|
|
537
|
+
readonly type: "function";
|
|
538
|
+
}, {
|
|
539
|
+
readonly inputs: readonly [{
|
|
540
|
+
readonly internalType: "bytes32";
|
|
541
|
+
readonly name: "subaccount";
|
|
542
|
+
readonly type: "bytes32";
|
|
543
|
+
}, {
|
|
544
|
+
readonly internalType: "uint32";
|
|
545
|
+
readonly name: "productId";
|
|
546
|
+
readonly type: "uint32";
|
|
547
|
+
}];
|
|
548
|
+
readonly name: "getSpotBalance";
|
|
549
|
+
readonly outputs: readonly [{
|
|
550
|
+
readonly components: readonly [{
|
|
551
|
+
readonly internalType: "uint32";
|
|
552
|
+
readonly name: "productId";
|
|
553
|
+
readonly type: "uint32";
|
|
554
|
+
}, {
|
|
555
|
+
readonly components: readonly [{
|
|
556
|
+
readonly internalType: "int128";
|
|
557
|
+
readonly name: "amount";
|
|
558
|
+
readonly type: "int128";
|
|
559
|
+
}];
|
|
560
|
+
readonly internalType: "struct ISpotEngine.Balance";
|
|
561
|
+
readonly name: "balance";
|
|
562
|
+
readonly type: "tuple";
|
|
563
|
+
}];
|
|
564
|
+
readonly internalType: "struct FQuerier.SpotBalance";
|
|
565
|
+
readonly name: "";
|
|
566
|
+
readonly type: "tuple";
|
|
567
|
+
}];
|
|
568
|
+
readonly stateMutability: "view";
|
|
569
|
+
readonly type: "function";
|
|
570
|
+
}, {
|
|
571
|
+
readonly inputs: readonly [{
|
|
572
|
+
readonly internalType: "bytes32";
|
|
573
|
+
readonly name: "subaccount";
|
|
574
|
+
readonly type: "bytes32";
|
|
575
|
+
}, {
|
|
576
|
+
readonly internalType: "uint32[]";
|
|
577
|
+
readonly name: "productIds";
|
|
578
|
+
readonly type: "uint32[]";
|
|
579
|
+
}];
|
|
580
|
+
readonly name: "getSpotBalances";
|
|
581
|
+
readonly outputs: readonly [{
|
|
582
|
+
readonly components: readonly [{
|
|
583
|
+
readonly internalType: "uint32";
|
|
584
|
+
readonly name: "productId";
|
|
585
|
+
readonly type: "uint32";
|
|
586
|
+
}, {
|
|
587
|
+
readonly components: readonly [{
|
|
588
|
+
readonly internalType: "int128";
|
|
589
|
+
readonly name: "amount";
|
|
590
|
+
readonly type: "int128";
|
|
591
|
+
}];
|
|
592
|
+
readonly internalType: "struct ISpotEngine.Balance";
|
|
593
|
+
readonly name: "balance";
|
|
594
|
+
readonly type: "tuple";
|
|
595
|
+
}];
|
|
596
|
+
readonly internalType: "struct FQuerier.SpotBalance[]";
|
|
597
|
+
readonly name: "spotBalances";
|
|
598
|
+
readonly type: "tuple[]";
|
|
599
|
+
}];
|
|
600
|
+
readonly stateMutability: "view";
|
|
601
|
+
readonly type: "function";
|
|
602
|
+
}, {
|
|
603
|
+
readonly inputs: readonly [{
|
|
604
|
+
readonly internalType: "uint32";
|
|
605
|
+
readonly name: "productId";
|
|
606
|
+
readonly type: "uint32";
|
|
607
|
+
}];
|
|
608
|
+
readonly name: "getSpotProduct";
|
|
609
|
+
readonly outputs: readonly [{
|
|
610
|
+
readonly components: readonly [{
|
|
611
|
+
readonly internalType: "uint32";
|
|
612
|
+
readonly name: "productId";
|
|
613
|
+
readonly type: "uint32";
|
|
614
|
+
}, {
|
|
615
|
+
readonly internalType: "int128";
|
|
616
|
+
readonly name: "oraclePriceX18";
|
|
617
|
+
readonly type: "int128";
|
|
618
|
+
}, {
|
|
619
|
+
readonly components: readonly [{
|
|
620
|
+
readonly internalType: "int128";
|
|
621
|
+
readonly name: "longWeightInitialX18";
|
|
622
|
+
readonly type: "int128";
|
|
623
|
+
}, {
|
|
624
|
+
readonly internalType: "int128";
|
|
625
|
+
readonly name: "shortWeightInitialX18";
|
|
626
|
+
readonly type: "int128";
|
|
627
|
+
}, {
|
|
628
|
+
readonly internalType: "int128";
|
|
629
|
+
readonly name: "longWeightMaintenanceX18";
|
|
630
|
+
readonly type: "int128";
|
|
631
|
+
}, {
|
|
632
|
+
readonly internalType: "int128";
|
|
633
|
+
readonly name: "shortWeightMaintenanceX18";
|
|
634
|
+
readonly type: "int128";
|
|
635
|
+
}, {
|
|
636
|
+
readonly internalType: "int128";
|
|
637
|
+
readonly name: "priceX18";
|
|
638
|
+
readonly type: "int128";
|
|
639
|
+
}];
|
|
640
|
+
readonly internalType: "struct RiskHelper.Risk";
|
|
641
|
+
readonly name: "risk";
|
|
642
|
+
readonly type: "tuple";
|
|
643
|
+
}, {
|
|
644
|
+
readonly components: readonly [{
|
|
645
|
+
readonly internalType: "address";
|
|
646
|
+
readonly name: "token";
|
|
647
|
+
readonly type: "address";
|
|
648
|
+
}, {
|
|
649
|
+
readonly internalType: "int128";
|
|
650
|
+
readonly name: "interestInflectionUtilX18";
|
|
651
|
+
readonly type: "int128";
|
|
652
|
+
}, {
|
|
653
|
+
readonly internalType: "int128";
|
|
654
|
+
readonly name: "interestFloorX18";
|
|
655
|
+
readonly type: "int128";
|
|
656
|
+
}, {
|
|
657
|
+
readonly internalType: "int128";
|
|
658
|
+
readonly name: "interestSmallCapX18";
|
|
659
|
+
readonly type: "int128";
|
|
660
|
+
}, {
|
|
661
|
+
readonly internalType: "int128";
|
|
662
|
+
readonly name: "interestLargeCapX18";
|
|
663
|
+
readonly type: "int128";
|
|
664
|
+
}, {
|
|
665
|
+
readonly internalType: "int128";
|
|
666
|
+
readonly name: "withdrawFeeX18";
|
|
667
|
+
readonly type: "int128";
|
|
668
|
+
}, {
|
|
669
|
+
readonly internalType: "int128";
|
|
670
|
+
readonly name: "minDepositRateX18";
|
|
671
|
+
readonly type: "int128";
|
|
672
|
+
}];
|
|
673
|
+
readonly internalType: "struct ISpotEngine.Config";
|
|
674
|
+
readonly name: "config";
|
|
675
|
+
readonly type: "tuple";
|
|
676
|
+
}, {
|
|
677
|
+
readonly components: readonly [{
|
|
678
|
+
readonly internalType: "int128";
|
|
679
|
+
readonly name: "cumulativeDepositsMultiplierX18";
|
|
680
|
+
readonly type: "int128";
|
|
681
|
+
}, {
|
|
682
|
+
readonly internalType: "int128";
|
|
683
|
+
readonly name: "cumulativeBorrowsMultiplierX18";
|
|
684
|
+
readonly type: "int128";
|
|
685
|
+
}, {
|
|
686
|
+
readonly internalType: "int128";
|
|
687
|
+
readonly name: "totalDepositsNormalized";
|
|
688
|
+
readonly type: "int128";
|
|
689
|
+
}, {
|
|
690
|
+
readonly internalType: "int128";
|
|
691
|
+
readonly name: "totalBorrowsNormalized";
|
|
692
|
+
readonly type: "int128";
|
|
693
|
+
}];
|
|
694
|
+
readonly internalType: "struct ISpotEngine.State";
|
|
695
|
+
readonly name: "state";
|
|
696
|
+
readonly type: "tuple";
|
|
697
|
+
}, {
|
|
698
|
+
readonly components: readonly [{
|
|
699
|
+
readonly internalType: "int128";
|
|
700
|
+
readonly name: "sizeIncrement";
|
|
701
|
+
readonly type: "int128";
|
|
702
|
+
}, {
|
|
703
|
+
readonly internalType: "int128";
|
|
704
|
+
readonly name: "priceIncrementX18";
|
|
705
|
+
readonly type: "int128";
|
|
706
|
+
}, {
|
|
707
|
+
readonly internalType: "int128";
|
|
708
|
+
readonly name: "minSize";
|
|
709
|
+
readonly type: "int128";
|
|
710
|
+
}, {
|
|
711
|
+
readonly internalType: "int128";
|
|
712
|
+
readonly name: "collectedFees";
|
|
713
|
+
readonly type: "int128";
|
|
714
|
+
}];
|
|
715
|
+
readonly internalType: "struct FQuerier.BookInfo";
|
|
716
|
+
readonly name: "bookInfo";
|
|
717
|
+
readonly type: "tuple";
|
|
718
|
+
}];
|
|
719
|
+
readonly internalType: "struct FQuerier.SpotProduct";
|
|
720
|
+
readonly name: "";
|
|
721
|
+
readonly type: "tuple";
|
|
722
|
+
}];
|
|
723
|
+
readonly stateMutability: "view";
|
|
724
|
+
readonly type: "function";
|
|
725
|
+
}, {
|
|
726
|
+
readonly inputs: readonly [{
|
|
727
|
+
readonly internalType: "uint32[]";
|
|
728
|
+
readonly name: "productIds";
|
|
729
|
+
readonly type: "uint32[]";
|
|
730
|
+
}];
|
|
731
|
+
readonly name: "getSpotProducts";
|
|
732
|
+
readonly outputs: readonly [{
|
|
733
|
+
readonly components: readonly [{
|
|
734
|
+
readonly internalType: "uint32";
|
|
735
|
+
readonly name: "productId";
|
|
736
|
+
readonly type: "uint32";
|
|
737
|
+
}, {
|
|
738
|
+
readonly internalType: "int128";
|
|
739
|
+
readonly name: "oraclePriceX18";
|
|
740
|
+
readonly type: "int128";
|
|
741
|
+
}, {
|
|
742
|
+
readonly components: readonly [{
|
|
743
|
+
readonly internalType: "int128";
|
|
744
|
+
readonly name: "longWeightInitialX18";
|
|
745
|
+
readonly type: "int128";
|
|
746
|
+
}, {
|
|
747
|
+
readonly internalType: "int128";
|
|
748
|
+
readonly name: "shortWeightInitialX18";
|
|
749
|
+
readonly type: "int128";
|
|
750
|
+
}, {
|
|
751
|
+
readonly internalType: "int128";
|
|
752
|
+
readonly name: "longWeightMaintenanceX18";
|
|
753
|
+
readonly type: "int128";
|
|
754
|
+
}, {
|
|
755
|
+
readonly internalType: "int128";
|
|
756
|
+
readonly name: "shortWeightMaintenanceX18";
|
|
757
|
+
readonly type: "int128";
|
|
758
|
+
}, {
|
|
759
|
+
readonly internalType: "int128";
|
|
760
|
+
readonly name: "priceX18";
|
|
761
|
+
readonly type: "int128";
|
|
762
|
+
}];
|
|
763
|
+
readonly internalType: "struct RiskHelper.Risk";
|
|
764
|
+
readonly name: "risk";
|
|
765
|
+
readonly type: "tuple";
|
|
766
|
+
}, {
|
|
767
|
+
readonly components: readonly [{
|
|
768
|
+
readonly internalType: "address";
|
|
769
|
+
readonly name: "token";
|
|
770
|
+
readonly type: "address";
|
|
771
|
+
}, {
|
|
772
|
+
readonly internalType: "int128";
|
|
773
|
+
readonly name: "interestInflectionUtilX18";
|
|
774
|
+
readonly type: "int128";
|
|
775
|
+
}, {
|
|
776
|
+
readonly internalType: "int128";
|
|
777
|
+
readonly name: "interestFloorX18";
|
|
778
|
+
readonly type: "int128";
|
|
779
|
+
}, {
|
|
780
|
+
readonly internalType: "int128";
|
|
781
|
+
readonly name: "interestSmallCapX18";
|
|
782
|
+
readonly type: "int128";
|
|
783
|
+
}, {
|
|
784
|
+
readonly internalType: "int128";
|
|
785
|
+
readonly name: "interestLargeCapX18";
|
|
786
|
+
readonly type: "int128";
|
|
787
|
+
}, {
|
|
788
|
+
readonly internalType: "int128";
|
|
789
|
+
readonly name: "withdrawFeeX18";
|
|
790
|
+
readonly type: "int128";
|
|
791
|
+
}, {
|
|
792
|
+
readonly internalType: "int128";
|
|
793
|
+
readonly name: "minDepositRateX18";
|
|
794
|
+
readonly type: "int128";
|
|
795
|
+
}];
|
|
796
|
+
readonly internalType: "struct ISpotEngine.Config";
|
|
797
|
+
readonly name: "config";
|
|
798
|
+
readonly type: "tuple";
|
|
799
|
+
}, {
|
|
800
|
+
readonly components: readonly [{
|
|
801
|
+
readonly internalType: "int128";
|
|
802
|
+
readonly name: "cumulativeDepositsMultiplierX18";
|
|
803
|
+
readonly type: "int128";
|
|
804
|
+
}, {
|
|
805
|
+
readonly internalType: "int128";
|
|
806
|
+
readonly name: "cumulativeBorrowsMultiplierX18";
|
|
807
|
+
readonly type: "int128";
|
|
808
|
+
}, {
|
|
809
|
+
readonly internalType: "int128";
|
|
810
|
+
readonly name: "totalDepositsNormalized";
|
|
811
|
+
readonly type: "int128";
|
|
812
|
+
}, {
|
|
813
|
+
readonly internalType: "int128";
|
|
814
|
+
readonly name: "totalBorrowsNormalized";
|
|
815
|
+
readonly type: "int128";
|
|
816
|
+
}];
|
|
817
|
+
readonly internalType: "struct ISpotEngine.State";
|
|
818
|
+
readonly name: "state";
|
|
819
|
+
readonly type: "tuple";
|
|
820
|
+
}, {
|
|
821
|
+
readonly components: readonly [{
|
|
822
|
+
readonly internalType: "int128";
|
|
823
|
+
readonly name: "sizeIncrement";
|
|
824
|
+
readonly type: "int128";
|
|
825
|
+
}, {
|
|
826
|
+
readonly internalType: "int128";
|
|
827
|
+
readonly name: "priceIncrementX18";
|
|
828
|
+
readonly type: "int128";
|
|
829
|
+
}, {
|
|
830
|
+
readonly internalType: "int128";
|
|
831
|
+
readonly name: "minSize";
|
|
832
|
+
readonly type: "int128";
|
|
833
|
+
}, {
|
|
834
|
+
readonly internalType: "int128";
|
|
835
|
+
readonly name: "collectedFees";
|
|
836
|
+
readonly type: "int128";
|
|
837
|
+
}];
|
|
838
|
+
readonly internalType: "struct FQuerier.BookInfo";
|
|
839
|
+
readonly name: "bookInfo";
|
|
840
|
+
readonly type: "tuple";
|
|
841
|
+
}];
|
|
842
|
+
readonly internalType: "struct FQuerier.SpotProduct[]";
|
|
843
|
+
readonly name: "spotProducts";
|
|
844
|
+
readonly type: "tuple[]";
|
|
845
|
+
}];
|
|
846
|
+
readonly stateMutability: "view";
|
|
847
|
+
readonly type: "function";
|
|
848
|
+
}, {
|
|
849
|
+
readonly inputs: readonly [{
|
|
850
|
+
readonly internalType: "bytes32";
|
|
851
|
+
readonly name: "subaccount";
|
|
852
|
+
readonly type: "bytes32";
|
|
853
|
+
}];
|
|
854
|
+
readonly name: "getSubaccountInfo";
|
|
855
|
+
readonly outputs: readonly [{
|
|
856
|
+
readonly components: readonly [{
|
|
857
|
+
readonly internalType: "bytes32";
|
|
858
|
+
readonly name: "subaccount";
|
|
859
|
+
readonly type: "bytes32";
|
|
860
|
+
}, {
|
|
861
|
+
readonly internalType: "bool";
|
|
862
|
+
readonly name: "exists";
|
|
863
|
+
readonly type: "bool";
|
|
864
|
+
}, {
|
|
865
|
+
readonly components: readonly [{
|
|
866
|
+
readonly internalType: "int128";
|
|
867
|
+
readonly name: "assets";
|
|
868
|
+
readonly type: "int128";
|
|
869
|
+
}, {
|
|
870
|
+
readonly internalType: "int128";
|
|
871
|
+
readonly name: "liabilities";
|
|
872
|
+
readonly type: "int128";
|
|
873
|
+
}, {
|
|
874
|
+
readonly internalType: "int128";
|
|
875
|
+
readonly name: "health";
|
|
876
|
+
readonly type: "int128";
|
|
877
|
+
}];
|
|
878
|
+
readonly internalType: "struct FQuerier.HealthInfo[]";
|
|
879
|
+
readonly name: "healths";
|
|
880
|
+
readonly type: "tuple[]";
|
|
881
|
+
}, {
|
|
882
|
+
readonly internalType: "int128[][]";
|
|
883
|
+
readonly name: "healthContributions";
|
|
884
|
+
readonly type: "int128[][]";
|
|
885
|
+
}, {
|
|
886
|
+
readonly internalType: "uint32";
|
|
887
|
+
readonly name: "spotCount";
|
|
888
|
+
readonly type: "uint32";
|
|
889
|
+
}, {
|
|
890
|
+
readonly internalType: "uint32";
|
|
891
|
+
readonly name: "perpCount";
|
|
892
|
+
readonly type: "uint32";
|
|
893
|
+
}, {
|
|
894
|
+
readonly components: readonly [{
|
|
895
|
+
readonly internalType: "uint32";
|
|
896
|
+
readonly name: "productId";
|
|
897
|
+
readonly type: "uint32";
|
|
898
|
+
}, {
|
|
899
|
+
readonly components: readonly [{
|
|
900
|
+
readonly internalType: "int128";
|
|
901
|
+
readonly name: "amount";
|
|
902
|
+
readonly type: "int128";
|
|
903
|
+
}];
|
|
904
|
+
readonly internalType: "struct ISpotEngine.Balance";
|
|
905
|
+
readonly name: "balance";
|
|
906
|
+
readonly type: "tuple";
|
|
907
|
+
}];
|
|
908
|
+
readonly internalType: "struct FQuerier.SpotBalance[]";
|
|
909
|
+
readonly name: "spotBalances";
|
|
910
|
+
readonly type: "tuple[]";
|
|
911
|
+
}, {
|
|
912
|
+
readonly components: readonly [{
|
|
913
|
+
readonly internalType: "uint32";
|
|
914
|
+
readonly name: "productId";
|
|
915
|
+
readonly type: "uint32";
|
|
916
|
+
}, {
|
|
917
|
+
readonly components: readonly [{
|
|
918
|
+
readonly internalType: "int128";
|
|
919
|
+
readonly name: "amount";
|
|
920
|
+
readonly type: "int128";
|
|
921
|
+
}, {
|
|
922
|
+
readonly internalType: "int128";
|
|
923
|
+
readonly name: "vQuoteBalance";
|
|
924
|
+
readonly type: "int128";
|
|
925
|
+
}, {
|
|
926
|
+
readonly internalType: "int128";
|
|
927
|
+
readonly name: "lastCumulativeFundingX18";
|
|
928
|
+
readonly type: "int128";
|
|
929
|
+
}];
|
|
930
|
+
readonly internalType: "struct IPerpEngine.Balance";
|
|
931
|
+
readonly name: "balance";
|
|
932
|
+
readonly type: "tuple";
|
|
933
|
+
}];
|
|
934
|
+
readonly internalType: "struct FQuerier.PerpBalance[]";
|
|
935
|
+
readonly name: "perpBalances";
|
|
936
|
+
readonly type: "tuple[]";
|
|
937
|
+
}, {
|
|
938
|
+
readonly components: readonly [{
|
|
939
|
+
readonly internalType: "uint32";
|
|
940
|
+
readonly name: "productId";
|
|
941
|
+
readonly type: "uint32";
|
|
942
|
+
}, {
|
|
943
|
+
readonly internalType: "int128";
|
|
944
|
+
readonly name: "oraclePriceX18";
|
|
945
|
+
readonly type: "int128";
|
|
946
|
+
}, {
|
|
947
|
+
readonly components: readonly [{
|
|
948
|
+
readonly internalType: "int128";
|
|
949
|
+
readonly name: "longWeightInitialX18";
|
|
950
|
+
readonly type: "int128";
|
|
951
|
+
}, {
|
|
952
|
+
readonly internalType: "int128";
|
|
953
|
+
readonly name: "shortWeightInitialX18";
|
|
954
|
+
readonly type: "int128";
|
|
955
|
+
}, {
|
|
956
|
+
readonly internalType: "int128";
|
|
957
|
+
readonly name: "longWeightMaintenanceX18";
|
|
958
|
+
readonly type: "int128";
|
|
959
|
+
}, {
|
|
960
|
+
readonly internalType: "int128";
|
|
961
|
+
readonly name: "shortWeightMaintenanceX18";
|
|
962
|
+
readonly type: "int128";
|
|
963
|
+
}, {
|
|
964
|
+
readonly internalType: "int128";
|
|
965
|
+
readonly name: "priceX18";
|
|
966
|
+
readonly type: "int128";
|
|
967
|
+
}];
|
|
968
|
+
readonly internalType: "struct RiskHelper.Risk";
|
|
969
|
+
readonly name: "risk";
|
|
970
|
+
readonly type: "tuple";
|
|
971
|
+
}, {
|
|
972
|
+
readonly components: readonly [{
|
|
973
|
+
readonly internalType: "address";
|
|
974
|
+
readonly name: "token";
|
|
975
|
+
readonly type: "address";
|
|
976
|
+
}, {
|
|
977
|
+
readonly internalType: "int128";
|
|
978
|
+
readonly name: "interestInflectionUtilX18";
|
|
979
|
+
readonly type: "int128";
|
|
980
|
+
}, {
|
|
981
|
+
readonly internalType: "int128";
|
|
982
|
+
readonly name: "interestFloorX18";
|
|
983
|
+
readonly type: "int128";
|
|
984
|
+
}, {
|
|
985
|
+
readonly internalType: "int128";
|
|
986
|
+
readonly name: "interestSmallCapX18";
|
|
987
|
+
readonly type: "int128";
|
|
988
|
+
}, {
|
|
989
|
+
readonly internalType: "int128";
|
|
990
|
+
readonly name: "interestLargeCapX18";
|
|
991
|
+
readonly type: "int128";
|
|
992
|
+
}, {
|
|
993
|
+
readonly internalType: "int128";
|
|
994
|
+
readonly name: "withdrawFeeX18";
|
|
995
|
+
readonly type: "int128";
|
|
996
|
+
}, {
|
|
997
|
+
readonly internalType: "int128";
|
|
998
|
+
readonly name: "minDepositRateX18";
|
|
999
|
+
readonly type: "int128";
|
|
1000
|
+
}];
|
|
1001
|
+
readonly internalType: "struct ISpotEngine.Config";
|
|
1002
|
+
readonly name: "config";
|
|
1003
|
+
readonly type: "tuple";
|
|
1004
|
+
}, {
|
|
1005
|
+
readonly components: readonly [{
|
|
1006
|
+
readonly internalType: "int128";
|
|
1007
|
+
readonly name: "cumulativeDepositsMultiplierX18";
|
|
1008
|
+
readonly type: "int128";
|
|
1009
|
+
}, {
|
|
1010
|
+
readonly internalType: "int128";
|
|
1011
|
+
readonly name: "cumulativeBorrowsMultiplierX18";
|
|
1012
|
+
readonly type: "int128";
|
|
1013
|
+
}, {
|
|
1014
|
+
readonly internalType: "int128";
|
|
1015
|
+
readonly name: "totalDepositsNormalized";
|
|
1016
|
+
readonly type: "int128";
|
|
1017
|
+
}, {
|
|
1018
|
+
readonly internalType: "int128";
|
|
1019
|
+
readonly name: "totalBorrowsNormalized";
|
|
1020
|
+
readonly type: "int128";
|
|
1021
|
+
}];
|
|
1022
|
+
readonly internalType: "struct ISpotEngine.State";
|
|
1023
|
+
readonly name: "state";
|
|
1024
|
+
readonly type: "tuple";
|
|
1025
|
+
}, {
|
|
1026
|
+
readonly components: readonly [{
|
|
1027
|
+
readonly internalType: "int128";
|
|
1028
|
+
readonly name: "sizeIncrement";
|
|
1029
|
+
readonly type: "int128";
|
|
1030
|
+
}, {
|
|
1031
|
+
readonly internalType: "int128";
|
|
1032
|
+
readonly name: "priceIncrementX18";
|
|
1033
|
+
readonly type: "int128";
|
|
1034
|
+
}, {
|
|
1035
|
+
readonly internalType: "int128";
|
|
1036
|
+
readonly name: "minSize";
|
|
1037
|
+
readonly type: "int128";
|
|
1038
|
+
}, {
|
|
1039
|
+
readonly internalType: "int128";
|
|
1040
|
+
readonly name: "collectedFees";
|
|
1041
|
+
readonly type: "int128";
|
|
1042
|
+
}];
|
|
1043
|
+
readonly internalType: "struct FQuerier.BookInfo";
|
|
1044
|
+
readonly name: "bookInfo";
|
|
1045
|
+
readonly type: "tuple";
|
|
1046
|
+
}];
|
|
1047
|
+
readonly internalType: "struct FQuerier.SpotProduct[]";
|
|
1048
|
+
readonly name: "spotProducts";
|
|
1049
|
+
readonly type: "tuple[]";
|
|
1050
|
+
}, {
|
|
1051
|
+
readonly components: readonly [{
|
|
1052
|
+
readonly internalType: "uint32";
|
|
1053
|
+
readonly name: "productId";
|
|
1054
|
+
readonly type: "uint32";
|
|
1055
|
+
}, {
|
|
1056
|
+
readonly internalType: "int128";
|
|
1057
|
+
readonly name: "oraclePriceX18";
|
|
1058
|
+
readonly type: "int128";
|
|
1059
|
+
}, {
|
|
1060
|
+
readonly components: readonly [{
|
|
1061
|
+
readonly internalType: "int128";
|
|
1062
|
+
readonly name: "longWeightInitialX18";
|
|
1063
|
+
readonly type: "int128";
|
|
1064
|
+
}, {
|
|
1065
|
+
readonly internalType: "int128";
|
|
1066
|
+
readonly name: "shortWeightInitialX18";
|
|
1067
|
+
readonly type: "int128";
|
|
1068
|
+
}, {
|
|
1069
|
+
readonly internalType: "int128";
|
|
1070
|
+
readonly name: "longWeightMaintenanceX18";
|
|
1071
|
+
readonly type: "int128";
|
|
1072
|
+
}, {
|
|
1073
|
+
readonly internalType: "int128";
|
|
1074
|
+
readonly name: "shortWeightMaintenanceX18";
|
|
1075
|
+
readonly type: "int128";
|
|
1076
|
+
}, {
|
|
1077
|
+
readonly internalType: "int128";
|
|
1078
|
+
readonly name: "priceX18";
|
|
1079
|
+
readonly type: "int128";
|
|
1080
|
+
}];
|
|
1081
|
+
readonly internalType: "struct RiskHelper.Risk";
|
|
1082
|
+
readonly name: "risk";
|
|
1083
|
+
readonly type: "tuple";
|
|
1084
|
+
}, {
|
|
1085
|
+
readonly components: readonly [{
|
|
1086
|
+
readonly internalType: "int128";
|
|
1087
|
+
readonly name: "cumulativeFundingLongX18";
|
|
1088
|
+
readonly type: "int128";
|
|
1089
|
+
}, {
|
|
1090
|
+
readonly internalType: "int128";
|
|
1091
|
+
readonly name: "cumulativeFundingShortX18";
|
|
1092
|
+
readonly type: "int128";
|
|
1093
|
+
}, {
|
|
1094
|
+
readonly internalType: "int128";
|
|
1095
|
+
readonly name: "availableSettle";
|
|
1096
|
+
readonly type: "int128";
|
|
1097
|
+
}, {
|
|
1098
|
+
readonly internalType: "int128";
|
|
1099
|
+
readonly name: "openInterest";
|
|
1100
|
+
readonly type: "int128";
|
|
1101
|
+
}];
|
|
1102
|
+
readonly internalType: "struct IPerpEngine.State";
|
|
1103
|
+
readonly name: "state";
|
|
1104
|
+
readonly type: "tuple";
|
|
1105
|
+
}, {
|
|
1106
|
+
readonly components: readonly [{
|
|
1107
|
+
readonly internalType: "int128";
|
|
1108
|
+
readonly name: "sizeIncrement";
|
|
1109
|
+
readonly type: "int128";
|
|
1110
|
+
}, {
|
|
1111
|
+
readonly internalType: "int128";
|
|
1112
|
+
readonly name: "priceIncrementX18";
|
|
1113
|
+
readonly type: "int128";
|
|
1114
|
+
}, {
|
|
1115
|
+
readonly internalType: "int128";
|
|
1116
|
+
readonly name: "minSize";
|
|
1117
|
+
readonly type: "int128";
|
|
1118
|
+
}, {
|
|
1119
|
+
readonly internalType: "int128";
|
|
1120
|
+
readonly name: "collectedFees";
|
|
1121
|
+
readonly type: "int128";
|
|
1122
|
+
}];
|
|
1123
|
+
readonly internalType: "struct FQuerier.BookInfo";
|
|
1124
|
+
readonly name: "bookInfo";
|
|
1125
|
+
readonly type: "tuple";
|
|
1126
|
+
}];
|
|
1127
|
+
readonly internalType: "struct FQuerier.PerpProduct[]";
|
|
1128
|
+
readonly name: "perpProducts";
|
|
1129
|
+
readonly type: "tuple[]";
|
|
1130
|
+
}];
|
|
1131
|
+
readonly internalType: "struct FQuerier.SubaccountInfo";
|
|
1132
|
+
readonly name: "";
|
|
1133
|
+
readonly type: "tuple";
|
|
1134
|
+
}];
|
|
1135
|
+
readonly stateMutability: "view";
|
|
1136
|
+
readonly type: "function";
|
|
1137
|
+
}, {
|
|
1138
|
+
readonly inputs: readonly [{
|
|
1139
|
+
readonly internalType: "address";
|
|
1140
|
+
readonly name: "_clearinghouse";
|
|
1141
|
+
readonly type: "address";
|
|
1142
|
+
}];
|
|
1143
|
+
readonly name: "initialize";
|
|
1144
|
+
readonly outputs: readonly [];
|
|
1145
|
+
readonly stateMutability: "nonpayable";
|
|
1146
|
+
readonly type: "function";
|
|
1147
|
+
}];
|
|
1148
|
+
|
|
1149
|
+
export { QUERIER_ABI };
|