NADO_ABIS: {
querier: readonly [
{
inputs: readonly [];
name: "getAllProducts";
outputs: readonly [
{
components: readonly [
{
components: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "int128"; name: "oraclePriceX18"; type: "int128" },
{
components: readonly [
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
];
internalType: "struct RiskHelper.Risk";
name: "risk";
type: "tuple";
},
{
components: readonly [
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
];
internalType: "struct ISpotEngine.Config";
name: "config";
type: "tuple";
},
{
components: readonly [
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
];
internalType: "struct ISpotEngine.State";
name: "state";
type: "tuple";
},
{
components: readonly [
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
];
internalType: "struct FQuerier.BookInfo";
name: "bookInfo";
type: "tuple";
},
];
internalType: "struct FQuerier.SpotProduct[]";
name: "spotProducts";
type: "tuple[]";
},
{
components: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "int128"; name: "oraclePriceX18"; type: "int128" },
{
components: readonly [
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
];
internalType: "struct RiskHelper.Risk";
name: "risk";
type: "tuple";
},
{
components: readonly [
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
];
internalType: "struct IPerpEngine.State";
name: "state";
type: "tuple";
},
{
components: readonly [
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
];
internalType: "struct FQuerier.BookInfo";
name: "bookInfo";
type: "tuple";
},
];
internalType: "struct FQuerier.PerpProduct[]";
name: "perpProducts";
type: "tuple[]";
},
];
internalType: "struct FQuerier.ProductInfo";
name: "";
type: "tuple";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
];
name: "getBookInfo";
outputs: readonly [
{
components: readonly [
{ internalType: "int128"; name: "sizeIncrement"; type: "int128" },
{ internalType: "int128"; name: "priceIncrementX18"; type: "int128" },
{ internalType: "int128"; name: "minSize"; type: "int128" },
{ internalType: "int128"; name: "collectedFees"; type: "int128" },
];
internalType: "struct FQuerier.BookInfo";
name: "bookInfo";
type: "tuple";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "getClearinghouse";
outputs: readonly [
{ internalType: "address"; name: ""; type: "address" },
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "getNlpPoolInfo";
outputs: readonly [
{
components: readonly [
{
components: readonly [
{ internalType: "uint64"; name: "poolId"; type: "uint64" },
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
{ internalType: "address"; name: "owner"; type: "address" },
{
internalType: "uint128";
name: "balanceWeightX18";
type: "uint128";
},
];
internalType: "struct FQuerier.NlpPool[]";
name: "nlpPools";
type: "tuple[]";
},
];
internalType: "struct FQuerier.NlpPoolInfo";
name: "";
type: "tuple";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
{ internalType: "uint32"; name: "productId"; type: "uint32" },
];
name: "getPerpBalance";
outputs: readonly [
{
components: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{
components: readonly [
{ internalType: "int128"; name: "amount"; type: "int128" },
{ internalType: "int128"; name: "vQuoteBalance"; type: "int128" },
{
internalType: "int128";
name: "lastCumulativeFundingX18";
type: "int128";
},
];
internalType: "struct IPerpEngine.Balance";
name: "balance";
type: "tuple";
},
];
internalType: "struct FQuerier.PerpBalance";
name: "";
type: "tuple";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
{ internalType: "uint32[]"; name: "productIds"; type: "uint32[]" },
];
name: "getPerpBalances";
outputs: readonly [
{
components: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{
components: readonly [
{ internalType: "int128"; name: "amount"; type: "int128" },
{ internalType: "int128"; name: "vQuoteBalance"; type: "int128" },
{
internalType: "int128";
name: "lastCumulativeFundingX18";
type: "int128";
},
];
internalType: "struct IPerpEngine.Balance";
name: "balance";
type: "tuple";
},
];
internalType: "struct FQuerier.PerpBalance[]";
name: "perpBalances";
type: "tuple[]";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
];
name: "getPerpProduct";
outputs: readonly [
{
components: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "int128"; name: "oraclePriceX18"; type: "int128" },
{
components: readonly [
{
internalType: "int128";
name: "longWeightInitialX18";
type: "int128";
},
{
internalType: "int128";
name: "shortWeightInitialX18";
type: "int128";
},
{
internalType: "int128";
name: "longWeightMaintenanceX18";
type: "int128";
},
{
internalType: "int128";
name: "shortWeightMaintenanceX18";
type: "int128";
},
{ internalType: "int128"; name: "priceX18"; type: "int128" },
];
internalType: "struct RiskHelper.Risk";
name: "risk";
type: "tuple";
},
{
components: readonly [
{
internalType: "int128";
name: "cumulativeFundingLongX18";
type: "int128";
},
{
internalType: "int128";
name: "cumulativeFundingShortX18";
type: "int128";
},
{ internalType: "int128"; name: "availableSettle"; type: "int128" },
{ internalType: "int128"; name: "openInterest"; type: "int128" },
];
internalType: "struct IPerpEngine.State";
name: "state";
type: "tuple";
},
{
components: readonly [
{ internalType: "int128"; name: "sizeIncrement"; type: "int128" },
{
internalType: "int128";
name: "priceIncrementX18";
type: "int128";
},
{ internalType: "int128"; name: "minSize"; type: "int128" },
{ internalType: "int128"; name: "collectedFees"; type: "int128" },
];
internalType: "struct FQuerier.BookInfo";
name: "bookInfo";
type: "tuple";
},
];
internalType: "struct FQuerier.PerpProduct";
name: "";
type: "tuple";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32[]"; name: "productIds"; type: "uint32[]" },
];
name: "getPerpProducts";
outputs: readonly [
{
components: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "int128"; name: "oraclePriceX18"; type: "int128" },
{
components: readonly [
{
internalType: "int128";
name: "longWeightInitialX18";
type: "int128";
},
{
internalType: "int128";
name: "shortWeightInitialX18";
type: "int128";
},
{
internalType: "int128";
name: "longWeightMaintenanceX18";
type: "int128";
},
{
internalType: "int128";
name: "shortWeightMaintenanceX18";
type: "int128";
},
{ internalType: "int128"; name: "priceX18"; type: "int128" },
];
internalType: "struct RiskHelper.Risk";
name: "risk";
type: "tuple";
},
{
components: readonly [
{
internalType: "int128";
name: "cumulativeFundingLongX18";
type: "int128";
},
{
internalType: "int128";
name: "cumulativeFundingShortX18";
type: "int128";
},
{ internalType: "int128"; name: "availableSettle"; type: "int128" },
{ internalType: "int128"; name: "openInterest"; type: "int128" },
];
internalType: "struct IPerpEngine.State";
name: "state";
type: "tuple";
},
{
components: readonly [
{ internalType: "int128"; name: "sizeIncrement"; type: "int128" },
{
internalType: "int128";
name: "priceIncrementX18";
type: "int128";
},
{ internalType: "int128"; name: "minSize"; type: "int128" },
{ internalType: "int128"; name: "collectedFees"; type: "int128" },
];
internalType: "struct FQuerier.BookInfo";
name: "bookInfo";
type: "tuple";
},
];
internalType: "struct FQuerier.PerpProduct[]";
name: "perpProducts";
type: "tuple[]";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
{ internalType: "uint32"; name: "productId"; type: "uint32" },
];
name: "getSpotBalance";
outputs: readonly [
{
components: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{
components: readonly [
{ internalType: "int128"; name: "amount"; type: "int128" },
];
internalType: "struct ISpotEngine.Balance";
name: "balance";
type: "tuple";
},
];
internalType: "struct FQuerier.SpotBalance";
name: "";
type: "tuple";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
{ internalType: "uint32[]"; name: "productIds"; type: "uint32[]" },
];
name: "getSpotBalances";
outputs: readonly [
{
components: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{
components: readonly [
{ internalType: "int128"; name: "amount"; type: "int128" },
];
internalType: "struct ISpotEngine.Balance";
name: "balance";
type: "tuple";
},
];
internalType: "struct FQuerier.SpotBalance[]";
name: "spotBalances";
type: "tuple[]";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
];
name: "getSpotProduct";
outputs: readonly [
{
components: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "int128"; name: "oraclePriceX18"; type: "int128" },
{
components: readonly [
{
internalType: "int128";
name: "longWeightInitialX18";
type: "int128";
},
{
internalType: "int128";
name: "shortWeightInitialX18";
type: "int128";
},
{
internalType: "int128";
name: "longWeightMaintenanceX18";
type: "int128";
},
{
internalType: "int128";
name: "shortWeightMaintenanceX18";
type: "int128";
},
{ internalType: "int128"; name: "priceX18"; type: "int128" },
];
internalType: "struct RiskHelper.Risk";
name: "risk";
type: "tuple";
},
{
components: readonly [
{ internalType: "address"; name: "token"; type: "address" },
{
internalType: "int128";
name: "interestInflectionUtilX18";
type: "int128";
},
{ internalType: "int128"; name: "interestFloorX18"; type: "int128" },
{
internalType: "int128";
name: "interestSmallCapX18";
type: "int128";
},
{
internalType: "int128";
name: "interestLargeCapX18";
type: "int128";
},
{ internalType: "int128"; name: "withdrawFeeX18"; type: "int128" },
{
internalType: "int128";
name: "minDepositRateX18";
type: "int128";
},
];
internalType: "struct ISpotEngine.Config";
name: "config";
type: "tuple";
},
{
components: readonly [
{
internalType: "int128";
name: "cumulativeDepositsMultiplierX18";
type: "int128";
},
{
internalType: "int128";
name: "cumulativeBorrowsMultiplierX18";
type: "int128";
},
{
internalType: "int128";
name: "totalDepositsNormalized";
type: "int128";
},
{
internalType: "int128";
name: "totalBorrowsNormalized";
type: "int128";
},
];
internalType: "struct ISpotEngine.State";
name: "state";
type: "tuple";
},
{
components: readonly [
{ internalType: "int128"; name: "sizeIncrement"; type: "int128" },
{
internalType: "int128";
name: "priceIncrementX18";
type: "int128";
},
{ internalType: "int128"; name: "minSize"; type: "int128" },
{ internalType: "int128"; name: "collectedFees"; type: "int128" },
];
internalType: "struct FQuerier.BookInfo";
name: "bookInfo";
type: "tuple";
},
];
internalType: "struct FQuerier.SpotProduct";
name: "";
type: "tuple";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32[]"; name: "productIds"; type: "uint32[]" },
];
name: "getSpotProducts";
outputs: readonly [
{
components: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "int128"; name: "oraclePriceX18"; type: "int128" },
{
components: readonly [
{
internalType: "int128";
name: "longWeightInitialX18";
type: "int128";
},
{
internalType: "int128";
name: "shortWeightInitialX18";
type: "int128";
},
{
internalType: "int128";
name: "longWeightMaintenanceX18";
type: "int128";
},
{
internalType: "int128";
name: "shortWeightMaintenanceX18";
type: "int128";
},
{ internalType: "int128"; name: "priceX18"; type: "int128" },
];
internalType: "struct RiskHelper.Risk";
name: "risk";
type: "tuple";
},
{
components: readonly [
{ internalType: "address"; name: "token"; type: "address" },
{
internalType: "int128";
name: "interestInflectionUtilX18";
type: "int128";
},
{ internalType: "int128"; name: "interestFloorX18"; type: "int128" },
{
internalType: "int128";
name: "interestSmallCapX18";
type: "int128";
},
{
internalType: "int128";
name: "interestLargeCapX18";
type: "int128";
},
{ internalType: "int128"; name: "withdrawFeeX18"; type: "int128" },
{
internalType: "int128";
name: "minDepositRateX18";
type: "int128";
},
];
internalType: "struct ISpotEngine.Config";
name: "config";
type: "tuple";
},
{
components: readonly [
{
internalType: "int128";
name: "cumulativeDepositsMultiplierX18";
type: "int128";
},
{
internalType: "int128";
name: "cumulativeBorrowsMultiplierX18";
type: "int128";
},
{
internalType: "int128";
name: "totalDepositsNormalized";
type: "int128";
},
{
internalType: "int128";
name: "totalBorrowsNormalized";
type: "int128";
},
];
internalType: "struct ISpotEngine.State";
name: "state";
type: "tuple";
},
{
components: readonly [
{ internalType: "int128"; name: "sizeIncrement"; type: "int128" },
{
internalType: "int128";
name: "priceIncrementX18";
type: "int128";
},
{ internalType: "int128"; name: "minSize"; type: "int128" },
{ internalType: "int128"; name: "collectedFees"; type: "int128" },
];
internalType: "struct FQuerier.BookInfo";
name: "bookInfo";
type: "tuple";
},
];
internalType: "struct FQuerier.SpotProduct[]";
name: "spotProducts";
type: "tuple[]";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
];
name: "getSubaccountInfo";
outputs: readonly [
{
components: readonly [
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
{ internalType: "bool"; name: "exists"; type: "bool" },
{
components: readonly [
{ internalType: "int128"; name: "assets"; type: "int128" },
{ internalType: "int128"; name: "liabilities"; type: "int128" },
{ internalType: "int128"; name: "health"; type: "int128" },
];
internalType: "struct FQuerier.HealthInfo[]";
name: "healths";
type: "tuple[]";
},
{
internalType: "int128[][]";
name: "healthContributions";
type: "int128[][]";
},
{ internalType: "uint32"; name: "spotCount"; type: "uint32" },
{ internalType: "uint32"; name: "perpCount"; type: "uint32" },
{
components: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{
components: readonly [
{ internalType: ...; name: ...; type: ... },
];
internalType: "struct ISpotEngine.Balance";
name: "balance";
type: "tuple";
},
];
internalType: "struct FQuerier.SpotBalance[]";
name: "spotBalances";
type: "tuple[]";
},
{
components: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{
components: readonly [
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
];
internalType: "struct IPerpEngine.Balance";
name: "balance";
type: "tuple";
},
];
internalType: "struct FQuerier.PerpBalance[]";
name: "perpBalances";
type: "tuple[]";
},
{
components: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "int128"; name: "oraclePriceX18"; type: "int128" },
{
components: readonly [
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
];
internalType: "struct RiskHelper.Risk";
name: "risk";
type: "tuple";
},
{
components: readonly [
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
];
internalType: "struct ISpotEngine.Config";
name: "config";
type: "tuple";
},
{
components: readonly [
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
];
internalType: "struct ISpotEngine.State";
name: "state";
type: "tuple";
},
{
components: readonly [
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
];
internalType: "struct FQuerier.BookInfo";
name: "bookInfo";
type: "tuple";
},
];
internalType: "struct FQuerier.SpotProduct[]";
name: "spotProducts";
type: "tuple[]";
},
{
components: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "int128"; name: "oraclePriceX18"; type: "int128" },
{
components: readonly [
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
];
internalType: "struct RiskHelper.Risk";
name: "risk";
type: "tuple";
},
{
components: readonly [
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
];
internalType: "struct IPerpEngine.State";
name: "state";
type: "tuple";
},
{
components: readonly [
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
];
internalType: "struct FQuerier.BookInfo";
name: "bookInfo";
type: "tuple";
},
];
internalType: "struct FQuerier.PerpProduct[]";
name: "perpProducts";
type: "tuple[]";
},
];
internalType: "struct FQuerier.SubaccountInfo";
name: "";
type: "tuple";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "address"; name: "_clearinghouse"; type: "address" },
];
name: "initialize";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
];
endpoint: readonly [
{
anonymous: false;
inputs: readonly [
{
indexed: false;
internalType: "uint8";
name: "version";
type: "uint8";
},
];
name: "Initialized";
type: "event";
},
{
anonymous: false;
inputs: readonly [
{
indexed: true;
internalType: "address";
name: "previousOwner";
type: "address";
},
{
indexed: true;
internalType: "address";
name: "newOwner";
type: "address";
},
];
name: "OwnershipTransferred";
type: "event";
},
{
anonymous: false;
inputs: readonly [];
name: "SubmitTransactions";
type: "event";
},
{
inputs: readonly [];
name: "clearinghouse";
outputs: readonly [
{
internalType: "contract IClearinghouse";
name: "";
type: "address";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes12"; name: "subaccountName"; type: "bytes12" },
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "uint128"; name: "amount"; type: "uint128" },
];
name: "depositCollateral";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "uint128"; name: "amount"; type: "uint128" },
{ internalType: "string"; name: "referralCode"; type: "string" },
];
name: "depositCollateralWithReferral";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes12"; name: "subaccountName"; type: "bytes12" },
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "uint128"; name: "amount"; type: "uint128" },
{ internalType: "string"; name: "referralCode"; type: "string" },
];
name: "depositCollateralWithReferral";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [];
name: "executeSlowModeTransaction";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
];
name: "getLinkedSigner";
outputs: readonly [
{ internalType: "address"; name: ""; type: "address" },
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "getNlpPools";
outputs: readonly [
{
components: readonly [
{ internalType: "uint64"; name: "poolId"; type: "uint64" },
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
{ internalType: "address"; name: "owner"; type: "address" },
{ internalType: "uint128"; name: "balanceWeightX18"; type: "uint128" },
];
internalType: "struct IEndpoint.NlpPool[]";
name: "";
type: "tuple[]";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "address"; name: "sender"; type: "address" },
];
name: "getNonce";
outputs: readonly [{ internalType: "uint64"; name: ""; type: "uint64" }];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "getOffchainExchange";
outputs: readonly [
{ internalType: "address"; name: ""; type: "address" },
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
];
name: "getPriceX18";
outputs: readonly [
{ internalType: "int128"; name: "_priceX18"; type: "int128" },
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "getSequencer";
outputs: readonly [
{ internalType: "address"; name: ""; type: "address" },
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint64"; name: "idx"; type: "uint64" },
];
name: "getSlowModeTx";
outputs: readonly [
{
components: readonly [
{ internalType: "uint64"; name: "executableAt"; type: "uint64" },
{ internalType: "address"; name: "sender"; type: "address" },
{ internalType: "bytes"; name: "tx"; type: "bytes" },
];
internalType: "struct IEndpoint.SlowModeTx";
name: "";
type: "tuple";
},
{ internalType: "uint64"; name: ""; type: "uint64" },
{ internalType: "uint64"; name: ""; type: "uint64" },
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
];
name: "getSubaccountId";
outputs: readonly [{ internalType: "uint64"; name: ""; type: "uint64" }];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "getTime";
outputs: readonly [
{ internalType: "uint128"; name: ""; type: "uint128" },
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "address"; name: "_sanctions"; type: "address" },
{ internalType: "address"; name: "_sequencer"; type: "address" },
{ internalType: "address"; name: "_offchainExchange"; type: "address" },
{
internalType: "contract IClearinghouse";
name: "_clearinghouse";
type: "address";
},
{ internalType: "address"; name: "_verifier"; type: "address" },
{ internalType: "int128[]"; name: "initialPrices"; type: "int128[]" },
];
name: "initialize";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [];
name: "nSubmissions";
outputs: readonly [{ internalType: "uint64"; name: ""; type: "uint64" }];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint256"; name: ""; type: "uint256" },
];
name: "nlpPools";
outputs: readonly [
{ internalType: "uint64"; name: "poolId"; type: "uint64" },
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
{ internalType: "address"; name: "owner"; type: "address" },
{ internalType: "uint128"; name: "balanceWeightX18"; type: "uint128" },
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "owner";
outputs: readonly [
{ internalType: "address"; name: ""; type: "address" },
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "address"; name: "sender"; type: "address" },
{ internalType: "bytes"; name: "transaction"; type: "bytes" },
];
name: "processSlowModeTransaction";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "address"; name: ""; type: "address" },
];
name: "referralCodes";
outputs: readonly [{ internalType: "string"; name: ""; type: "string" }];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "renounceOwnership";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes"; name: "transaction"; type: "bytes" },
];
name: "submitSlowModeTransaction";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint64"; name: "idx"; type: "uint64" },
{ internalType: "bytes[]"; name: "transactions"; type: "bytes[]" },
{ internalType: "bytes32"; name: "e"; type: "bytes32" },
{ internalType: "bytes32"; name: "s"; type: "bytes32" },
{ internalType: "uint8"; name: "signerBitmask"; type: "uint8" },
];
name: "submitTransactionsChecked";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint64"; name: "idx"; type: "uint64" },
{ internalType: "bytes[]"; name: "transactions"; type: "bytes[]" },
{ internalType: "uint256"; name: "gasLimit"; type: "uint256" },
];
name: "submitTransactionsCheckedWithGasLimit";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "address"; name: "newOwner"; type: "address" },
];
name: "transferOwnership";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
];
clearinghouse: readonly [
{
anonymous: false;
inputs: readonly [
{
indexed: false;
internalType: "address";
name: "endpoint";
type: "address";
},
{
indexed: false;
internalType: "address";
name: "quote";
type: "address";
},
];
name: "ClearinghouseInitialized";
type: "event";
},
{
anonymous: false;
inputs: readonly [
{
indexed: false;
internalType: "uint8";
name: "version";
type: "uint8";
},
];
name: "Initialized";
type: "event";
},
{
anonymous: false;
inputs: readonly [
{
indexed: true;
internalType: "bytes32";
name: "liquidatorSubaccount";
type: "bytes32";
},
{
indexed: true;
internalType: "bytes32";
name: "liquidateeSubaccount";
type: "bytes32";
},
{
indexed: false;
internalType: "uint32";
name: "productId";
type: "uint32";
},
{
indexed: false;
internalType: "bool";
name: "isEncodedSpread";
type: "bool";
},
{
indexed: false;
internalType: "int128";
name: "amount";
type: "int128";
},
{
indexed: false;
internalType: "int128";
name: "amountQuote";
type: "int128";
},
];
name: "Liquidation";
type: "event";
},
{
anonymous: false;
inputs: readonly [
{
indexed: false;
internalType: "int128";
name: "amount";
type: "int128";
},
{
indexed: true;
internalType: "bytes32";
name: "subaccount";
type: "bytes32";
},
{
indexed: false;
internalType: "uint32";
name: "productId";
type: "uint32";
},
];
name: "ModifyCollateral";
type: "event";
},
{
anonymous: false;
inputs: readonly [
{
indexed: true;
internalType: "address";
name: "previousOwner";
type: "address";
},
{
indexed: true;
internalType: "address";
name: "newOwner";
type: "address";
},
];
name: "OwnershipTransferred";
type: "event";
},
{
inputs: readonly [
{ internalType: "address"; name: "engine"; type: "address" },
{ internalType: "address"; name: "offchainExchange"; type: "address" },
{
internalType: "enum IProductEngine.EngineType";
name: "engineType";
type: "uint8";
},
];
name: "addEngine";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes"; name: "transaction"; type: "bytes" },
];
name: "assertCode";
outputs: readonly [];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{
components: readonly [
{ internalType: "bytes32"; name: "sender"; type: "bytes32" },
{ internalType: "uint128"; name: "nlpAmount"; type: "uint128" },
{ internalType: "uint64"; name: "nonce"; type: "uint64" },
];
internalType: "struct IEndpoint.BurnNlp";
name: "txn";
type: "tuple";
},
{ internalType: "int128"; name: "oraclePriceX18"; type: "int128" },
{
components: readonly [
{ internalType: "uint64"; name: "poolId"; type: "uint64" },
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
{ internalType: "address"; name: "owner"; type: "address" },
{ internalType: "uint128"; name: "balanceWeightX18"; type: "uint128" },
];
internalType: "struct IEndpoint.NlpPool[]";
name: "nlpPools";
type: "tuple[]";
},
{
internalType: "int128[]";
name: "nlpPoolRebalanceX18";
type: "int128[]";
},
];
name: "burnNlp";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "int128[]"; name: "fees"; type: "int128[]" },
];
name: "claimSequencerFees";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
];
name: "clearNlpPoolPosition";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes"; name: "transaction"; type: "bytes" },
];
name: "delistProduct";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{
components: readonly [
{ internalType: "bytes32"; name: "sender"; type: "bytes32" },
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "uint128"; name: "amount"; type: "uint128" },
];
internalType: "struct IEndpoint.DepositCollateral";
name: "txn";
type: "tuple";
},
];
name: "depositCollateral";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes"; name: "transaction"; type: "bytes" },
];
name: "depositInsurance";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [];
name: "getClearinghouseLiq";
outputs: readonly [
{ internalType: "address"; name: ""; type: "address" },
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "getEndpoint";
outputs: readonly [
{ internalType: "address"; name: ""; type: "address" },
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
];
name: "getEngineByProduct";
outputs: readonly [
{ internalType: "address"; name: ""; type: "address" },
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{
internalType: "enum IProductEngine.EngineType";
name: "engineType";
type: "uint8";
},
];
name: "getEngineByType";
outputs: readonly [
{ internalType: "address"; name: ""; type: "address" },
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
{
internalType: "enum IProductEngine.HealthType";
name: "healthType";
type: "uint8";
},
];
name: "getHealth";
outputs: readonly [
{ internalType: "int128"; name: "health"; type: "int128" },
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "getInsurance";
outputs: readonly [{ internalType: "int128"; name: ""; type: "int128" }];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "getQuote";
outputs: readonly [
{ internalType: "address"; name: ""; type: "address" },
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "getSlowModeFee";
outputs: readonly [
{ internalType: "uint256"; name: ""; type: "uint256" },
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "getSpreads";
outputs: readonly [
{ internalType: "uint256"; name: ""; type: "uint256" },
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "getWithdrawPool";
outputs: readonly [
{ internalType: "address"; name: ""; type: "address" },
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "address"; name: "_endpoint"; type: "address" },
{ internalType: "address"; name: "_quote"; type: "address" },
{ internalType: "address"; name: "_clearinghouseLiq"; type: "address" },
{ internalType: "uint256"; name: "_spreads"; type: "uint256" },
{ internalType: "address"; name: "_withdrawPool"; type: "address" },
];
name: "initialize";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{
components: readonly [
{ internalType: "bytes32"; name: "sender"; type: "bytes32" },
{ internalType: "bytes32"; name: "liquidatee"; type: "bytes32" },
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "bool"; name: "isEncodedSpread"; type: "bool" },
{ internalType: "int128"; name: "amount"; type: "int128" },
{ internalType: "uint64"; name: "nonce"; type: "uint64" },
];
internalType: "struct IEndpoint.LiquidateSubaccount";
name: "txn";
type: "tuple";
},
];
name: "liquidateSubaccount";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes"; name: "transaction"; type: "bytes" },
];
name: "manualAssert";
outputs: readonly [];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{
components: readonly [
{ internalType: "bytes32"; name: "sender"; type: "bytes32" },
{ internalType: "uint128"; name: "quoteAmount"; type: "uint128" },
{ internalType: "uint64"; name: "nonce"; type: "uint64" },
];
internalType: "struct IEndpoint.MintNlp";
name: "txn";
type: "tuple";
},
{ internalType: "int128"; name: "oraclePriceX18"; type: "int128" },
{
components: readonly [
{ internalType: "uint64"; name: "poolId"; type: "uint64" },
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
{ internalType: "address"; name: "owner"; type: "address" },
{ internalType: "uint128"; name: "balanceWeightX18"; type: "uint128" },
];
internalType: "struct IEndpoint.NlpPool[]";
name: "nlpPools";
type: "tuple[]";
},
{
internalType: "int128[]";
name: "nlpPoolRebalanceX18";
type: "int128[]";
},
];
name: "mintNlp";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [];
name: "owner";
outputs: readonly [
{ internalType: "address"; name: ""; type: "address" },
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes"; name: "transaction"; type: "bytes" },
{ internalType: "uint64"; name: "nSubmissions"; type: "uint64" },
];
name: "rebalanceXWithdraw";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
];
name: "registerProduct";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [];
name: "renounceOwnership";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "uint128"; name: "amount"; type: "uint128" },
];
name: "requireMinDeposit";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "address"; name: "_withdrawPool"; type: "address" },
];
name: "setWithdrawPool";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes"; name: "transaction"; type: "bytes" },
];
name: "settlePnl";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "address"; name: "newOwner"; type: "address" },
];
name: "transferOwnership";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{
components: readonly [
{ internalType: "bytes32"; name: "sender"; type: "bytes32" },
{ internalType: "bytes32"; name: "recipient"; type: "bytes32" },
{ internalType: "uint128"; name: "amount"; type: "uint128" },
{ internalType: "uint64"; name: "nonce"; type: "uint64" },
];
internalType: "struct IEndpoint.TransferQuote";
name: "txn";
type: "tuple";
},
];
name: "transferQuote";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes"; name: "transaction"; type: "bytes" },
];
name: "updateFeeTier";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes"; name: "transaction"; type: "bytes" },
];
name: "updatePrice";
outputs: readonly [
{ internalType: "uint32"; name: ""; type: "uint32" },
{ internalType: "int128"; name: ""; type: "int128" },
];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{
internalType: "address";
name: "_clearinghouseLiq";
type: "address";
},
];
name: "upgradeClearinghouseLiq";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes32"; name: "sender"; type: "bytes32" },
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "uint128"; name: "amount"; type: "uint128" },
{ internalType: "address"; name: "sendTo"; type: "address" },
{ internalType: "uint64"; name: "idx"; type: "uint64" },
];
name: "withdrawCollateral";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes"; name: "transaction"; type: "bytes" },
{ internalType: "uint64"; name: "idx"; type: "uint64" },
];
name: "withdrawInsurance";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
];
spotEngine: readonly [
{
anonymous: false;
inputs: readonly [
{
indexed: false;
internalType: "uint32";
name: "productId";
type: "uint32";
},
];
name: "AddProduct";
type: "event";
},
{
anonymous: false;
inputs: readonly [
{
indexed: false;
internalType: "uint32";
name: "productId";
type: "uint32";
},
{
indexed: false;
internalType: "bytes32";
name: "subaccount";
type: "bytes32";
},
];
name: "BalanceUpdate";
type: "event";
},
{
anonymous: false;
inputs: readonly [
{
indexed: false;
internalType: "uint8";
name: "version";
type: "uint8";
},
];
name: "Initialized";
type: "event";
},
{
anonymous: false;
inputs: readonly [
{
indexed: false;
internalType: "uint32";
name: "productId";
type: "uint32";
},
{ indexed: false; internalType: "uint128"; name: "dt"; type: "uint128" },
{
indexed: false;
internalType: "int128";
name: "depositRateMultiplierX18";
type: "int128";
},
{
indexed: false;
internalType: "int128";
name: "borrowRateMultiplierX18";
type: "int128";
},
{
indexed: false;
internalType: "int128";
name: "feeAmount";
type: "int128";
},
];
name: "InterestPayment";
type: "event";
},
{
anonymous: false;
inputs: readonly [
{
indexed: true;
internalType: "address";
name: "previousOwner";
type: "address";
},
{
indexed: true;
internalType: "address";
name: "newOwner";
type: "address";
},
];
name: "OwnershipTransferred";
type: "event";
},
{
anonymous: false;
inputs: readonly [
{
indexed: false;
internalType: "uint32";
name: "productId";
type: "uint32";
},
];
name: "ProductUpdate";
type: "event";
},
{
anonymous: false;
inputs: readonly [
{
indexed: true;
internalType: "bytes32";
name: "subaccount";
type: "bytes32";
},
{
indexed: true;
internalType: "uint32";
name: "productId";
type: "uint32";
},
{
indexed: false;
internalType: "int128";
name: "amount";
type: "int128";
},
{
indexed: false;
internalType: "int128";
name: "lastCumulativeMultiplierX18";
type: "int128";
},
];
name: "SpotBalance";
type: "event";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "uint32"; name: "quoteId"; type: "uint32" },
{ internalType: "int128"; name: "sizeIncrement"; type: "int128" },
{ internalType: "int128"; name: "minSize"; type: "int128" },
{
components: readonly [
{ internalType: "address"; name: "token"; type: "address" },
{
internalType: "int128";
name: "interestInflectionUtilX18";
type: "int128";
},
{ internalType: "int128"; name: "interestFloorX18"; type: "int128" },
{
internalType: "int128";
name: "interestSmallCapX18";
type: "int128";
},
{
internalType: "int128";
name: "interestLargeCapX18";
type: "int128";
},
{ internalType: "int128"; name: "withdrawFeeX18"; type: "int128" },
{ internalType: "int128"; name: "minDepositRateX18"; type: "int128" },
];
internalType: "struct ISpotEngine.Config";
name: "config";
type: "tuple";
},
{
components: readonly [
{ internalType: "int32"; name: "longWeightInitial"; type: "int32" },
{ internalType: "int32"; name: "shortWeightInitial"; type: "int32" },
{
internalType: "int32";
name: "longWeightMaintenance";
type: "int32";
},
{
internalType: "int32";
name: "shortWeightMaintenance";
type: "int32";
},
{ internalType: "int128"; name: "priceX18"; type: "int128" },
];
internalType: "struct RiskHelper.RiskStore";
name: "riskStore";
type: "tuple";
},
];
name: "addProduct";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
];
name: "assertUtilization";
outputs: readonly [];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
];
name: "getBalance";
outputs: readonly [
{
components: readonly [
{ internalType: "int128"; name: "amount"; type: "int128" },
];
internalType: "struct ISpotEngine.Balance";
name: "";
type: "tuple";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "getClearinghouse";
outputs: readonly [
{ internalType: "address"; name: ""; type: "address" },
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
];
name: "getConfig";
outputs: readonly [
{
components: readonly [
{ internalType: "address"; name: "token"; type: "address" },
{
internalType: "int128";
name: "interestInflectionUtilX18";
type: "int128";
},
{ internalType: "int128"; name: "interestFloorX18"; type: "int128" },
{
internalType: "int128";
name: "interestSmallCapX18";
type: "int128";
},
{
internalType: "int128";
name: "interestLargeCapX18";
type: "int128";
},
{ internalType: "int128"; name: "withdrawFeeX18"; type: "int128" },
{ internalType: "int128"; name: "minDepositRateX18"; type: "int128" },
];
internalType: "struct ISpotEngine.Config";
name: "";
type: "tuple";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{
internalType: "enum IProductEngine.HealthType";
name: "healthType";
type: "uint8";
},
];
name: "getCoreRisk";
outputs: readonly [
{
components: readonly [
{ internalType: "int128"; name: "amount"; type: "int128" },
{ internalType: "int128"; name: "price"; type: "int128" },
{ internalType: "int128"; name: "longWeight"; type: "int128" },
];
internalType: "struct IProductEngine.CoreRisk";
name: "";
type: "tuple";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "getEndpoint";
outputs: readonly [
{ internalType: "address"; name: ""; type: "address" },
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "getEngineType";
outputs: readonly [
{
internalType: "enum IProductEngine.EngineType";
name: "";
type: "uint8";
},
];
stateMutability: "pure";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
{
internalType: "enum IProductEngine.HealthType";
name: "healthType";
type: "uint8";
},
];
name: "getHealthContribution";
outputs: readonly [
{ internalType: "int128"; name: "health"; type: "int128" },
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
];
name: "getNlpUnlockedBalance";
outputs: readonly [
{
components: readonly [
{ internalType: "int128"; name: "amount"; type: "int128" },
];
internalType: "struct ISpotEngine.Balance";
name: "";
type: "tuple";
},
];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [];
name: "getProductIds";
outputs: readonly [
{ internalType: "uint32[]"; name: ""; type: "uint32[]" },
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
];
name: "getRisk";
outputs: readonly [
{
components: readonly [
{
internalType: "int128";
name: "longWeightInitialX18";
type: "int128";
},
{
internalType: "int128";
name: "shortWeightInitialX18";
type: "int128";
},
{
internalType: "int128";
name: "longWeightMaintenanceX18";
type: "int128";
},
{
internalType: "int128";
name: "shortWeightMaintenanceX18";
type: "int128";
},
{ internalType: "int128"; name: "priceX18"; type: "int128" },
];
internalType: "struct RiskHelper.Risk";
name: "";
type: "tuple";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
];
name: "getStateAndBalance";
outputs: readonly [
{
components: readonly [
{
internalType: "int128";
name: "cumulativeDepositsMultiplierX18";
type: "int128";
},
{
internalType: "int128";
name: "cumulativeBorrowsMultiplierX18";
type: "int128";
},
{
internalType: "int128";
name: "totalDepositsNormalized";
type: "int128";
},
{
internalType: "int128";
name: "totalBorrowsNormalized";
type: "int128";
},
];
internalType: "struct ISpotEngine.State";
name: "";
type: "tuple";
},
{
components: readonly [
{ internalType: "int128"; name: "amount"; type: "int128" },
];
internalType: "struct ISpotEngine.Balance";
name: "";
type: "tuple";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
];
name: "getToken";
outputs: readonly [
{ internalType: "address"; name: ""; type: "address" },
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "address"; name: "_clearinghouse"; type: "address" },
{ internalType: "address"; name: "_offchainExchange"; type: "address" },
{ internalType: "address"; name: "_quote"; type: "address" },
{ internalType: "address"; name: "_endpoint"; type: "address" },
{ internalType: "address"; name: "_admin"; type: "address" },
];
name: "initialize";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "int128[]"; name: "totalDeposits"; type: "int128[]" },
{ internalType: "int128[]"; name: "totalBorrows"; type: "int128[]" },
];
name: "manualAssert";
outputs: readonly [];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "owner";
outputs: readonly [
{ internalType: "address"; name: ""; type: "address" },
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "renounceOwnership";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
];
name: "socializeSubaccount";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "address"; name: "newOwner"; type: "address" },
];
name: "transferOwnership";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
];
name: "tryUnlockNlpBalance";
outputs: readonly [
{
components: readonly [
{ internalType: "int128"; name: "amount"; type: "int128" },
];
internalType: "struct ISpotEngine.Balance";
name: "";
type: "tuple";
},
];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
{ internalType: "int128"; name: "amountDelta"; type: "int128" },
];
name: "updateBalance";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
{ internalType: "int128"; name: "amountDelta"; type: "int128" },
{ internalType: "int128"; name: "quoteDelta"; type: "int128" },
];
name: "updateBalance";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "int128"; name: "priceX18"; type: "int128" },
];
name: "updatePrice";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes"; name: "rawTxn"; type: "bytes" },
];
name: "updateProduct";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
{ internalType: "int128"; name: "insurance"; type: "int128" },
];
name: "updateQuoteFromInsurance";
outputs: readonly [{ internalType: "int128"; name: ""; type: "int128" }];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{
components: readonly [
{ internalType: "int32"; name: "longWeightInitial"; type: "int32" },
{ internalType: "int32"; name: "shortWeightInitial"; type: "int32" },
{
internalType: "int32";
name: "longWeightMaintenance";
type: "int32";
},
{
internalType: "int32";
name: "shortWeightMaintenance";
type: "int32";
},
{ internalType: "int128"; name: "priceX18"; type: "int128" },
];
internalType: "struct RiskHelper.RiskStore";
name: "riskStore";
type: "tuple";
},
];
name: "updateRisk";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint128"; name: "dt"; type: "uint128" },
];
name: "updateStates";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
];
perpEngine: readonly [
{
anonymous: false;
inputs: readonly [
{
indexed: false;
internalType: "uint32";
name: "productId";
type: "uint32";
},
];
name: "AddProduct";
type: "event";
},
{
anonymous: false;
inputs: readonly [
{
indexed: false;
internalType: "uint32";
name: "productId";
type: "uint32";
},
{
indexed: false;
internalType: "bytes32";
name: "subaccount";
type: "bytes32";
},
];
name: "BalanceUpdate";
type: "event";
},
{
anonymous: false;
inputs: readonly [
{
indexed: false;
internalType: "uint32";
name: "productId";
type: "uint32";
},
{ indexed: false; internalType: "uint128"; name: "dt"; type: "uint128" },
{
indexed: false;
internalType: "int128";
name: "openInterest";
type: "int128";
},
{
indexed: false;
internalType: "int128";
name: "payment";
type: "int128";
},
];
name: "FundingPayment";
type: "event";
},
{
anonymous: false;
inputs: readonly [
{
indexed: false;
internalType: "uint8";
name: "version";
type: "uint8";
},
];
name: "Initialized";
type: "event";
},
{
anonymous: false;
inputs: readonly [
{
indexed: true;
internalType: "address";
name: "previousOwner";
type: "address";
},
{
indexed: true;
internalType: "address";
name: "newOwner";
type: "address";
},
];
name: "OwnershipTransferred";
type: "event";
},
{
anonymous: false;
inputs: readonly [
{
indexed: false;
internalType: "uint32";
name: "productId";
type: "uint32";
},
];
name: "ProductUpdate";
type: "event";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "int128"; name: "sizeIncrement"; type: "int128" },
{ internalType: "int128"; name: "minSize"; type: "int128" },
{
components: readonly [
{ internalType: "int32"; name: "longWeightInitial"; type: "int32" },
{ internalType: "int32"; name: "shortWeightInitial"; type: "int32" },
{
internalType: "int32";
name: "longWeightMaintenance";
type: "int32";
},
{
internalType: "int32";
name: "shortWeightMaintenance";
type: "int32";
},
{ internalType: "int128"; name: "priceX18"; type: "int128" },
];
internalType: "struct RiskHelper.RiskStore";
name: "riskStore";
type: "tuple";
},
];
name: "addProduct";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: ""; type: "uint32" },
{ internalType: "bytes32"; name: ""; type: "bytes32" },
];
name: "balances";
outputs: readonly [
{ internalType: "int128"; name: "amount"; type: "int128" },
{ internalType: "int128"; name: "vQuoteBalance"; type: "int128" },
{
internalType: "int128";
name: "lastCumulativeFundingX18";
type: "int128";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
];
name: "getBalance";
outputs: readonly [
{
components: readonly [
{ internalType: "int128"; name: "amount"; type: "int128" },
{ internalType: "int128"; name: "vQuoteBalance"; type: "int128" },
{
internalType: "int128";
name: "lastCumulativeFundingX18";
type: "int128";
},
];
internalType: "struct IPerpEngine.Balance";
name: "";
type: "tuple";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "getClearinghouse";
outputs: readonly [
{ internalType: "address"; name: ""; type: "address" },
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{
internalType: "enum IProductEngine.HealthType";
name: "healthType";
type: "uint8";
},
];
name: "getCoreRisk";
outputs: readonly [
{
components: readonly [
{ internalType: "int128"; name: "amount"; type: "int128" },
{ internalType: "int128"; name: "price"; type: "int128" },
{ internalType: "int128"; name: "longWeight"; type: "int128" },
];
internalType: "struct IProductEngine.CoreRisk";
name: "";
type: "tuple";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "getEndpoint";
outputs: readonly [
{ internalType: "address"; name: ""; type: "address" },
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "getEngineType";
outputs: readonly [
{
internalType: "enum IProductEngine.EngineType";
name: "";
type: "uint8";
},
];
stateMutability: "pure";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
{
internalType: "enum IProductEngine.HealthType";
name: "healthType";
type: "uint8";
},
];
name: "getHealthContribution";
outputs: readonly [
{ internalType: "int128"; name: "health"; type: "int128" },
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
];
name: "getPositionPnl";
outputs: readonly [{ internalType: "int128"; name: ""; type: "int128" }];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "getProductIds";
outputs: readonly [
{ internalType: "uint32[]"; name: ""; type: "uint32[]" },
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
];
name: "getRisk";
outputs: readonly [
{
components: readonly [
{
internalType: "int128";
name: "longWeightInitialX18";
type: "int128";
},
{
internalType: "int128";
name: "shortWeightInitialX18";
type: "int128";
},
{
internalType: "int128";
name: "longWeightMaintenanceX18";
type: "int128";
},
{
internalType: "int128";
name: "shortWeightMaintenanceX18";
type: "int128";
},
{ internalType: "int128"; name: "priceX18"; type: "int128" },
];
internalType: "struct RiskHelper.Risk";
name: "";
type: "tuple";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
];
name: "getSettlementState";
outputs: readonly [
{ internalType: "int128"; name: "availableSettle"; type: "int128" },
{
components: readonly [
{
internalType: "int128";
name: "cumulativeFundingLongX18";
type: "int128";
},
{
internalType: "int128";
name: "cumulativeFundingShortX18";
type: "int128";
},
{ internalType: "int128"; name: "availableSettle"; type: "int128" },
{ internalType: "int128"; name: "openInterest"; type: "int128" },
];
internalType: "struct IPerpEngine.State";
name: "state";
type: "tuple";
},
{
components: readonly [
{ internalType: "int128"; name: "amount"; type: "int128" },
{ internalType: "int128"; name: "vQuoteBalance"; type: "int128" },
{
internalType: "int128";
name: "lastCumulativeFundingX18";
type: "int128";
},
];
internalType: "struct IPerpEngine.Balance";
name: "balance";
type: "tuple";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
];
name: "getStateAndBalance";
outputs: readonly [
{
components: readonly [
{
internalType: "int128";
name: "cumulativeFundingLongX18";
type: "int128";
},
{
internalType: "int128";
name: "cumulativeFundingShortX18";
type: "int128";
},
{ internalType: "int128"; name: "availableSettle"; type: "int128" },
{ internalType: "int128"; name: "openInterest"; type: "int128" },
];
internalType: "struct IPerpEngine.State";
name: "";
type: "tuple";
},
{
components: readonly [
{ internalType: "int128"; name: "amount"; type: "int128" },
{ internalType: "int128"; name: "vQuoteBalance"; type: "int128" },
{
internalType: "int128";
name: "lastCumulativeFundingX18";
type: "int128";
},
];
internalType: "struct IPerpEngine.Balance";
name: "";
type: "tuple";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "address"; name: "_clearinghouse"; type: "address" },
{ internalType: "address"; name: "_offchainExchange"; type: "address" },
{ internalType: "address"; name: ""; type: "address" },
{ internalType: "address"; name: "_endpoint"; type: "address" },
{ internalType: "address"; name: "_admin"; type: "address" },
];
name: "initialize";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "int128[]"; name: "openInterests"; type: "int128[]" },
];
name: "manualAssert";
outputs: readonly [];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "owner";
outputs: readonly [
{ internalType: "address"; name: ""; type: "address" },
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "renounceOwnership";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
{ internalType: "uint256"; name: "productIds"; type: "uint256" },
];
name: "settlePnl";
outputs: readonly [{ internalType: "int128"; name: ""; type: "int128" }];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
{ internalType: "int128"; name: "insurance"; type: "int128" },
];
name: "socializeSubaccount";
outputs: readonly [{ internalType: "int128"; name: ""; type: "int128" }];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: ""; type: "uint32" },
];
name: "states";
outputs: readonly [
{
internalType: "int128";
name: "cumulativeFundingLongX18";
type: "int128";
},
{
internalType: "int128";
name: "cumulativeFundingShortX18";
type: "int128";
},
{ internalType: "int128"; name: "availableSettle"; type: "int128" },
{ internalType: "int128"; name: "openInterest"; type: "int128" },
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "address"; name: "newOwner"; type: "address" },
];
name: "transferOwnership";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
{ internalType: "int128"; name: "amountDelta"; type: "int128" },
{ internalType: "int128"; name: "vQuoteDelta"; type: "int128" },
];
name: "updateBalance";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "int128"; name: "priceX18"; type: "int128" },
];
name: "updatePrice";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes"; name: "rawTxn"; type: "bytes" },
];
name: "updateProduct";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{
components: readonly [
{ internalType: "int32"; name: "longWeightInitial"; type: "int32" },
{ internalType: "int32"; name: "shortWeightInitial"; type: "int32" },
{
internalType: "int32";
name: "longWeightMaintenance";
type: "int32";
},
{
internalType: "int32";
name: "shortWeightMaintenance";
type: "int32";
},
{ internalType: "int128"; name: "priceX18"; type: "int128" },
];
internalType: "struct RiskHelper.RiskStore";
name: "riskStore";
type: "tuple";
},
];
name: "updateRisk";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint128"; name: "dt"; type: "uint128" },
{ internalType: "int128[]"; name: "avgPriceDiffs"; type: "int128[]" },
];
name: "updateStates";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
];
withdrawPool: readonly [
{
anonymous: false;
inputs: readonly [
{
indexed: false;
internalType: "uint8";
name: "version";
type: "uint8";
},
];
name: "Initialized";
type: "event";
},
{
anonymous: false;
inputs: readonly [
{
indexed: true;
internalType: "address";
name: "previousOwner";
type: "address";
},
{
indexed: true;
internalType: "address";
name: "newOwner";
type: "address";
},
];
name: "OwnershipTransferred";
type: "event";
},
{
inputs: readonly [
{ internalType: "uint64[]"; name: "idxs"; type: "uint64[]" },
];
name: "checkMarkedIdxs";
outputs: readonly [{ internalType: "bool[]"; name: ""; type: "bool[]" }];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32[]"; name: "productIds"; type: "uint32[]" },
];
name: "checkProductBalances";
outputs: readonly [
{ internalType: "uint256[]"; name: ""; type: "uint256[]" },
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{
internalType: "contract IERC20Base";
name: "token";
type: "address";
},
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "uint128"; name: "amount"; type: "uint128" },
];
name: "fastWithdrawalFeeAmount";
outputs: readonly [{ internalType: "int128"; name: ""; type: "int128" }];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: ""; type: "uint32" },
];
name: "fees";
outputs: readonly [{ internalType: "int128"; name: ""; type: "int128" }];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "address"; name: "_clearinghouse"; type: "address" },
{ internalType: "address"; name: "_verifier"; type: "address" },
];
name: "initialize";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint64"; name: ""; type: "uint64" },
];
name: "markedIdxs";
outputs: readonly [{ internalType: "bool"; name: ""; type: "bool" }];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "minIdx";
outputs: readonly [{ internalType: "uint64"; name: ""; type: "uint64" }];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "owner";
outputs: readonly [
{ internalType: "address"; name: ""; type: "address" },
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "uint128"; name: "amount"; type: "uint128" },
{ internalType: "address"; name: "sendTo"; type: "address" },
];
name: "removeLiquidity";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [];
name: "renounceOwnership";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint64"; name: "idx"; type: "uint64" },
{ internalType: "bytes"; name: "transaction"; type: "bytes" },
{ internalType: "bytes[]"; name: "signatures"; type: "bytes[]" },
];
name: "submitFastWithdrawal";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{
internalType: "contract IERC20Base";
name: "token";
type: "address";
},
{ internalType: "address"; name: "sendTo"; type: "address" },
{ internalType: "uint128"; name: "amount"; type: "uint128" },
{ internalType: "uint64"; name: "idx"; type: "uint64" },
];
name: "submitWithdrawal";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "address"; name: "newOwner"; type: "address" },
];
name: "transferOwnership";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
];
} = ...
Type Declaration
Readonlyquerier: readonly [
{
inputs: readonly [];
name: "getAllProducts";
outputs: readonly [
{
components: readonly [
{
components: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "int128"; name: "oraclePriceX18"; type: "int128" },
{
components: readonly [
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
];
internalType: "struct RiskHelper.Risk";
name: "risk";
type: "tuple";
},
{
components: readonly [
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
];
internalType: "struct ISpotEngine.Config";
name: "config";
type: "tuple";
},
{
components: readonly [
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
];
internalType: "struct ISpotEngine.State";
name: "state";
type: "tuple";
},
{
components: readonly [
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
];
internalType: "struct FQuerier.BookInfo";
name: "bookInfo";
type: "tuple";
},
];
internalType: "struct FQuerier.SpotProduct[]";
name: "spotProducts";
type: "tuple[]";
},
{
components: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "int128"; name: "oraclePriceX18"; type: "int128" },
{
components: readonly [
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
];
internalType: "struct RiskHelper.Risk";
name: "risk";
type: "tuple";
},
{
components: readonly [
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
];
internalType: "struct IPerpEngine.State";
name: "state";
type: "tuple";
},
{
components: readonly [
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
];
internalType: "struct FQuerier.BookInfo";
name: "bookInfo";
type: "tuple";
},
];
internalType: "struct FQuerier.PerpProduct[]";
name: "perpProducts";
type: "tuple[]";
},
];
internalType: "struct FQuerier.ProductInfo";
name: "";
type: "tuple";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
];
name: "getBookInfo";
outputs: readonly [
{
components: readonly [
{ internalType: "int128"; name: "sizeIncrement"; type: "int128" },
{ internalType: "int128"; name: "priceIncrementX18"; type: "int128" },
{ internalType: "int128"; name: "minSize"; type: "int128" },
{ internalType: "int128"; name: "collectedFees"; type: "int128" },
];
internalType: "struct FQuerier.BookInfo";
name: "bookInfo";
type: "tuple";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "getClearinghouse";
outputs: readonly [{ internalType: "address"; name: ""; type: "address" }];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "getNlpPoolInfo";
outputs: readonly [
{
components: readonly [
{
components: readonly [
{ internalType: "uint64"; name: "poolId"; type: "uint64" },
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
{ internalType: "address"; name: "owner"; type: "address" },
{
internalType: "uint128";
name: "balanceWeightX18";
type: "uint128";
},
];
internalType: "struct FQuerier.NlpPool[]";
name: "nlpPools";
type: "tuple[]";
},
];
internalType: "struct FQuerier.NlpPoolInfo";
name: "";
type: "tuple";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
{ internalType: "uint32"; name: "productId"; type: "uint32" },
];
name: "getPerpBalance";
outputs: readonly [
{
components: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{
components: readonly [
{ internalType: "int128"; name: "amount"; type: "int128" },
{ internalType: "int128"; name: "vQuoteBalance"; type: "int128" },
{
internalType: "int128";
name: "lastCumulativeFundingX18";
type: "int128";
},
];
internalType: "struct IPerpEngine.Balance";
name: "balance";
type: "tuple";
},
];
internalType: "struct FQuerier.PerpBalance";
name: "";
type: "tuple";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
{ internalType: "uint32[]"; name: "productIds"; type: "uint32[]" },
];
name: "getPerpBalances";
outputs: readonly [
{
components: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{
components: readonly [
{ internalType: "int128"; name: "amount"; type: "int128" },
{ internalType: "int128"; name: "vQuoteBalance"; type: "int128" },
{
internalType: "int128";
name: "lastCumulativeFundingX18";
type: "int128";
},
];
internalType: "struct IPerpEngine.Balance";
name: "balance";
type: "tuple";
},
];
internalType: "struct FQuerier.PerpBalance[]";
name: "perpBalances";
type: "tuple[]";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
];
name: "getPerpProduct";
outputs: readonly [
{
components: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "int128"; name: "oraclePriceX18"; type: "int128" },
{
components: readonly [
{
internalType: "int128";
name: "longWeightInitialX18";
type: "int128";
},
{
internalType: "int128";
name: "shortWeightInitialX18";
type: "int128";
},
{
internalType: "int128";
name: "longWeightMaintenanceX18";
type: "int128";
},
{
internalType: "int128";
name: "shortWeightMaintenanceX18";
type: "int128";
},
{ internalType: "int128"; name: "priceX18"; type: "int128" },
];
internalType: "struct RiskHelper.Risk";
name: "risk";
type: "tuple";
},
{
components: readonly [
{
internalType: "int128";
name: "cumulativeFundingLongX18";
type: "int128";
},
{
internalType: "int128";
name: "cumulativeFundingShortX18";
type: "int128";
},
{ internalType: "int128"; name: "availableSettle"; type: "int128" },
{ internalType: "int128"; name: "openInterest"; type: "int128" },
];
internalType: "struct IPerpEngine.State";
name: "state";
type: "tuple";
},
{
components: readonly [
{ internalType: "int128"; name: "sizeIncrement"; type: "int128" },
{ internalType: "int128"; name: "priceIncrementX18"; type: "int128" },
{ internalType: "int128"; name: "minSize"; type: "int128" },
{ internalType: "int128"; name: "collectedFees"; type: "int128" },
];
internalType: "struct FQuerier.BookInfo";
name: "bookInfo";
type: "tuple";
},
];
internalType: "struct FQuerier.PerpProduct";
name: "";
type: "tuple";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32[]"; name: "productIds"; type: "uint32[]" },
];
name: "getPerpProducts";
outputs: readonly [
{
components: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "int128"; name: "oraclePriceX18"; type: "int128" },
{
components: readonly [
{
internalType: "int128";
name: "longWeightInitialX18";
type: "int128";
},
{
internalType: "int128";
name: "shortWeightInitialX18";
type: "int128";
},
{
internalType: "int128";
name: "longWeightMaintenanceX18";
type: "int128";
},
{
internalType: "int128";
name: "shortWeightMaintenanceX18";
type: "int128";
},
{ internalType: "int128"; name: "priceX18"; type: "int128" },
];
internalType: "struct RiskHelper.Risk";
name: "risk";
type: "tuple";
},
{
components: readonly [
{
internalType: "int128";
name: "cumulativeFundingLongX18";
type: "int128";
},
{
internalType: "int128";
name: "cumulativeFundingShortX18";
type: "int128";
},
{ internalType: "int128"; name: "availableSettle"; type: "int128" },
{ internalType: "int128"; name: "openInterest"; type: "int128" },
];
internalType: "struct IPerpEngine.State";
name: "state";
type: "tuple";
},
{
components: readonly [
{ internalType: "int128"; name: "sizeIncrement"; type: "int128" },
{ internalType: "int128"; name: "priceIncrementX18"; type: "int128" },
{ internalType: "int128"; name: "minSize"; type: "int128" },
{ internalType: "int128"; name: "collectedFees"; type: "int128" },
];
internalType: "struct FQuerier.BookInfo";
name: "bookInfo";
type: "tuple";
},
];
internalType: "struct FQuerier.PerpProduct[]";
name: "perpProducts";
type: "tuple[]";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
{ internalType: "uint32"; name: "productId"; type: "uint32" },
];
name: "getSpotBalance";
outputs: readonly [
{
components: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{
components: readonly [
{ internalType: "int128"; name: "amount"; type: "int128" },
];
internalType: "struct ISpotEngine.Balance";
name: "balance";
type: "tuple";
},
];
internalType: "struct FQuerier.SpotBalance";
name: "";
type: "tuple";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
{ internalType: "uint32[]"; name: "productIds"; type: "uint32[]" },
];
name: "getSpotBalances";
outputs: readonly [
{
components: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{
components: readonly [
{ internalType: "int128"; name: "amount"; type: "int128" },
];
internalType: "struct ISpotEngine.Balance";
name: "balance";
type: "tuple";
},
];
internalType: "struct FQuerier.SpotBalance[]";
name: "spotBalances";
type: "tuple[]";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
];
name: "getSpotProduct";
outputs: readonly [
{
components: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "int128"; name: "oraclePriceX18"; type: "int128" },
{
components: readonly [
{
internalType: "int128";
name: "longWeightInitialX18";
type: "int128";
},
{
internalType: "int128";
name: "shortWeightInitialX18";
type: "int128";
},
{
internalType: "int128";
name: "longWeightMaintenanceX18";
type: "int128";
},
{
internalType: "int128";
name: "shortWeightMaintenanceX18";
type: "int128";
},
{ internalType: "int128"; name: "priceX18"; type: "int128" },
];
internalType: "struct RiskHelper.Risk";
name: "risk";
type: "tuple";
},
{
components: readonly [
{ internalType: "address"; name: "token"; type: "address" },
{
internalType: "int128";
name: "interestInflectionUtilX18";
type: "int128";
},
{ internalType: "int128"; name: "interestFloorX18"; type: "int128" },
{
internalType: "int128";
name: "interestSmallCapX18";
type: "int128";
},
{
internalType: "int128";
name: "interestLargeCapX18";
type: "int128";
},
{ internalType: "int128"; name: "withdrawFeeX18"; type: "int128" },
{ internalType: "int128"; name: "minDepositRateX18"; type: "int128" },
];
internalType: "struct ISpotEngine.Config";
name: "config";
type: "tuple";
},
{
components: readonly [
{
internalType: "int128";
name: "cumulativeDepositsMultiplierX18";
type: "int128";
},
{
internalType: "int128";
name: "cumulativeBorrowsMultiplierX18";
type: "int128";
},
{
internalType: "int128";
name: "totalDepositsNormalized";
type: "int128";
},
{
internalType: "int128";
name: "totalBorrowsNormalized";
type: "int128";
},
];
internalType: "struct ISpotEngine.State";
name: "state";
type: "tuple";
},
{
components: readonly [
{ internalType: "int128"; name: "sizeIncrement"; type: "int128" },
{ internalType: "int128"; name: "priceIncrementX18"; type: "int128" },
{ internalType: "int128"; name: "minSize"; type: "int128" },
{ internalType: "int128"; name: "collectedFees"; type: "int128" },
];
internalType: "struct FQuerier.BookInfo";
name: "bookInfo";
type: "tuple";
},
];
internalType: "struct FQuerier.SpotProduct";
name: "";
type: "tuple";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32[]"; name: "productIds"; type: "uint32[]" },
];
name: "getSpotProducts";
outputs: readonly [
{
components: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "int128"; name: "oraclePriceX18"; type: "int128" },
{
components: readonly [
{
internalType: "int128";
name: "longWeightInitialX18";
type: "int128";
},
{
internalType: "int128";
name: "shortWeightInitialX18";
type: "int128";
},
{
internalType: "int128";
name: "longWeightMaintenanceX18";
type: "int128";
},
{
internalType: "int128";
name: "shortWeightMaintenanceX18";
type: "int128";
},
{ internalType: "int128"; name: "priceX18"; type: "int128" },
];
internalType: "struct RiskHelper.Risk";
name: "risk";
type: "tuple";
},
{
components: readonly [
{ internalType: "address"; name: "token"; type: "address" },
{
internalType: "int128";
name: "interestInflectionUtilX18";
type: "int128";
},
{ internalType: "int128"; name: "interestFloorX18"; type: "int128" },
{
internalType: "int128";
name: "interestSmallCapX18";
type: "int128";
},
{
internalType: "int128";
name: "interestLargeCapX18";
type: "int128";
},
{ internalType: "int128"; name: "withdrawFeeX18"; type: "int128" },
{ internalType: "int128"; name: "minDepositRateX18"; type: "int128" },
];
internalType: "struct ISpotEngine.Config";
name: "config";
type: "tuple";
},
{
components: readonly [
{
internalType: "int128";
name: "cumulativeDepositsMultiplierX18";
type: "int128";
},
{
internalType: "int128";
name: "cumulativeBorrowsMultiplierX18";
type: "int128";
},
{
internalType: "int128";
name: "totalDepositsNormalized";
type: "int128";
},
{
internalType: "int128";
name: "totalBorrowsNormalized";
type: "int128";
},
];
internalType: "struct ISpotEngine.State";
name: "state";
type: "tuple";
},
{
components: readonly [
{ internalType: "int128"; name: "sizeIncrement"; type: "int128" },
{ internalType: "int128"; name: "priceIncrementX18"; type: "int128" },
{ internalType: "int128"; name: "minSize"; type: "int128" },
{ internalType: "int128"; name: "collectedFees"; type: "int128" },
];
internalType: "struct FQuerier.BookInfo";
name: "bookInfo";
type: "tuple";
},
];
internalType: "struct FQuerier.SpotProduct[]";
name: "spotProducts";
type: "tuple[]";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
];
name: "getSubaccountInfo";
outputs: readonly [
{
components: readonly [
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
{ internalType: "bool"; name: "exists"; type: "bool" },
{
components: readonly [
{ internalType: "int128"; name: "assets"; type: "int128" },
{ internalType: "int128"; name: "liabilities"; type: "int128" },
{ internalType: "int128"; name: "health"; type: "int128" },
];
internalType: "struct FQuerier.HealthInfo[]";
name: "healths";
type: "tuple[]";
},
{
internalType: "int128[][]";
name: "healthContributions";
type: "int128[][]";
},
{ internalType: "uint32"; name: "spotCount"; type: "uint32" },
{ internalType: "uint32"; name: "perpCount"; type: "uint32" },
{
components: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{
components: readonly [
{ internalType: ...; name: ...; type: ... },
];
internalType: "struct ISpotEngine.Balance";
name: "balance";
type: "tuple";
},
];
internalType: "struct FQuerier.SpotBalance[]";
name: "spotBalances";
type: "tuple[]";
},
{
components: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{
components: readonly [
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
];
internalType: "struct IPerpEngine.Balance";
name: "balance";
type: "tuple";
},
];
internalType: "struct FQuerier.PerpBalance[]";
name: "perpBalances";
type: "tuple[]";
},
{
components: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "int128"; name: "oraclePriceX18"; type: "int128" },
{
components: readonly [
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
];
internalType: "struct RiskHelper.Risk";
name: "risk";
type: "tuple";
},
{
components: readonly [
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
];
internalType: "struct ISpotEngine.Config";
name: "config";
type: "tuple";
},
{
components: readonly [
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
];
internalType: "struct ISpotEngine.State";
name: "state";
type: "tuple";
},
{
components: readonly [
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
];
internalType: "struct FQuerier.BookInfo";
name: "bookInfo";
type: "tuple";
},
];
internalType: "struct FQuerier.SpotProduct[]";
name: "spotProducts";
type: "tuple[]";
},
{
components: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "int128"; name: "oraclePriceX18"; type: "int128" },
{
components: readonly [
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
];
internalType: "struct RiskHelper.Risk";
name: "risk";
type: "tuple";
},
{
components: readonly [
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
];
internalType: "struct IPerpEngine.State";
name: "state";
type: "tuple";
},
{
components: readonly [
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
{ internalType: ...; name: ...; type: ... },
];
internalType: "struct FQuerier.BookInfo";
name: "bookInfo";
type: "tuple";
},
];
internalType: "struct FQuerier.PerpProduct[]";
name: "perpProducts";
type: "tuple[]";
},
];
internalType: "struct FQuerier.SubaccountInfo";
name: "";
type: "tuple";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "address"; name: "_clearinghouse"; type: "address" },
];
name: "initialize";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
]
Readonlyendpoint: readonly [
{
anonymous: false;
inputs: readonly [
{
indexed: false;
internalType: "uint8";
name: "version";
type: "uint8";
},
];
name: "Initialized";
type: "event";
},
{
anonymous: false;
inputs: readonly [
{
indexed: true;
internalType: "address";
name: "previousOwner";
type: "address";
},
{
indexed: true;
internalType: "address";
name: "newOwner";
type: "address";
},
];
name: "OwnershipTransferred";
type: "event";
},
{
anonymous: false;
inputs: readonly [];
name: "SubmitTransactions";
type: "event";
},
{
inputs: readonly [];
name: "clearinghouse";
outputs: readonly [
{ internalType: "contract IClearinghouse"; name: ""; type: "address" },
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes12"; name: "subaccountName"; type: "bytes12" },
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "uint128"; name: "amount"; type: "uint128" },
];
name: "depositCollateral";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "uint128"; name: "amount"; type: "uint128" },
{ internalType: "string"; name: "referralCode"; type: "string" },
];
name: "depositCollateralWithReferral";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes12"; name: "subaccountName"; type: "bytes12" },
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "uint128"; name: "amount"; type: "uint128" },
{ internalType: "string"; name: "referralCode"; type: "string" },
];
name: "depositCollateralWithReferral";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [];
name: "executeSlowModeTransaction";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
];
name: "getLinkedSigner";
outputs: readonly [{ internalType: "address"; name: ""; type: "address" }];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "getNlpPools";
outputs: readonly [
{
components: readonly [
{ internalType: "uint64"; name: "poolId"; type: "uint64" },
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
{ internalType: "address"; name: "owner"; type: "address" },
{ internalType: "uint128"; name: "balanceWeightX18"; type: "uint128" },
];
internalType: "struct IEndpoint.NlpPool[]";
name: "";
type: "tuple[]";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "address"; name: "sender"; type: "address" },
];
name: "getNonce";
outputs: readonly [{ internalType: "uint64"; name: ""; type: "uint64" }];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "getOffchainExchange";
outputs: readonly [{ internalType: "address"; name: ""; type: "address" }];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
];
name: "getPriceX18";
outputs: readonly [
{ internalType: "int128"; name: "_priceX18"; type: "int128" },
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "getSequencer";
outputs: readonly [{ internalType: "address"; name: ""; type: "address" }];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint64"; name: "idx"; type: "uint64" },
];
name: "getSlowModeTx";
outputs: readonly [
{
components: readonly [
{ internalType: "uint64"; name: "executableAt"; type: "uint64" },
{ internalType: "address"; name: "sender"; type: "address" },
{ internalType: "bytes"; name: "tx"; type: "bytes" },
];
internalType: "struct IEndpoint.SlowModeTx";
name: "";
type: "tuple";
},
{ internalType: "uint64"; name: ""; type: "uint64" },
{ internalType: "uint64"; name: ""; type: "uint64" },
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
];
name: "getSubaccountId";
outputs: readonly [{ internalType: "uint64"; name: ""; type: "uint64" }];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "getTime";
outputs: readonly [{ internalType: "uint128"; name: ""; type: "uint128" }];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "address"; name: "_sanctions"; type: "address" },
{ internalType: "address"; name: "_sequencer"; type: "address" },
{ internalType: "address"; name: "_offchainExchange"; type: "address" },
{
internalType: "contract IClearinghouse";
name: "_clearinghouse";
type: "address";
},
{ internalType: "address"; name: "_verifier"; type: "address" },
{ internalType: "int128[]"; name: "initialPrices"; type: "int128[]" },
];
name: "initialize";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [];
name: "nSubmissions";
outputs: readonly [{ internalType: "uint64"; name: ""; type: "uint64" }];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint256"; name: ""; type: "uint256" },
];
name: "nlpPools";
outputs: readonly [
{ internalType: "uint64"; name: "poolId"; type: "uint64" },
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
{ internalType: "address"; name: "owner"; type: "address" },
{ internalType: "uint128"; name: "balanceWeightX18"; type: "uint128" },
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "owner";
outputs: readonly [{ internalType: "address"; name: ""; type: "address" }];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "address"; name: "sender"; type: "address" },
{ internalType: "bytes"; name: "transaction"; type: "bytes" },
];
name: "processSlowModeTransaction";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "address"; name: ""; type: "address" },
];
name: "referralCodes";
outputs: readonly [{ internalType: "string"; name: ""; type: "string" }];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "renounceOwnership";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes"; name: "transaction"; type: "bytes" },
];
name: "submitSlowModeTransaction";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint64"; name: "idx"; type: "uint64" },
{ internalType: "bytes[]"; name: "transactions"; type: "bytes[]" },
{ internalType: "bytes32"; name: "e"; type: "bytes32" },
{ internalType: "bytes32"; name: "s"; type: "bytes32" },
{ internalType: "uint8"; name: "signerBitmask"; type: "uint8" },
];
name: "submitTransactionsChecked";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint64"; name: "idx"; type: "uint64" },
{ internalType: "bytes[]"; name: "transactions"; type: "bytes[]" },
{ internalType: "uint256"; name: "gasLimit"; type: "uint256" },
];
name: "submitTransactionsCheckedWithGasLimit";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "address"; name: "newOwner"; type: "address" },
];
name: "transferOwnership";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
]
Readonlyclearinghouse: readonly [
{
anonymous: false;
inputs: readonly [
{
indexed: false;
internalType: "address";
name: "endpoint";
type: "address";
},
{
indexed: false;
internalType: "address";
name: "quote";
type: "address";
},
];
name: "ClearinghouseInitialized";
type: "event";
},
{
anonymous: false;
inputs: readonly [
{
indexed: false;
internalType: "uint8";
name: "version";
type: "uint8";
},
];
name: "Initialized";
type: "event";
},
{
anonymous: false;
inputs: readonly [
{
indexed: true;
internalType: "bytes32";
name: "liquidatorSubaccount";
type: "bytes32";
},
{
indexed: true;
internalType: "bytes32";
name: "liquidateeSubaccount";
type: "bytes32";
},
{
indexed: false;
internalType: "uint32";
name: "productId";
type: "uint32";
},
{
indexed: false;
internalType: "bool";
name: "isEncodedSpread";
type: "bool";
},
{
indexed: false;
internalType: "int128";
name: "amount";
type: "int128";
},
{
indexed: false;
internalType: "int128";
name: "amountQuote";
type: "int128";
},
];
name: "Liquidation";
type: "event";
},
{
anonymous: false;
inputs: readonly [
{
indexed: false;
internalType: "int128";
name: "amount";
type: "int128";
},
{
indexed: true;
internalType: "bytes32";
name: "subaccount";
type: "bytes32";
},
{
indexed: false;
internalType: "uint32";
name: "productId";
type: "uint32";
},
];
name: "ModifyCollateral";
type: "event";
},
{
anonymous: false;
inputs: readonly [
{
indexed: true;
internalType: "address";
name: "previousOwner";
type: "address";
},
{
indexed: true;
internalType: "address";
name: "newOwner";
type: "address";
},
];
name: "OwnershipTransferred";
type: "event";
},
{
inputs: readonly [
{ internalType: "address"; name: "engine"; type: "address" },
{ internalType: "address"; name: "offchainExchange"; type: "address" },
{
internalType: "enum IProductEngine.EngineType";
name: "engineType";
type: "uint8";
},
];
name: "addEngine";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes"; name: "transaction"; type: "bytes" },
];
name: "assertCode";
outputs: readonly [];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{
components: readonly [
{ internalType: "bytes32"; name: "sender"; type: "bytes32" },
{ internalType: "uint128"; name: "nlpAmount"; type: "uint128" },
{ internalType: "uint64"; name: "nonce"; type: "uint64" },
];
internalType: "struct IEndpoint.BurnNlp";
name: "txn";
type: "tuple";
},
{ internalType: "int128"; name: "oraclePriceX18"; type: "int128" },
{
components: readonly [
{ internalType: "uint64"; name: "poolId"; type: "uint64" },
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
{ internalType: "address"; name: "owner"; type: "address" },
{ internalType: "uint128"; name: "balanceWeightX18"; type: "uint128" },
];
internalType: "struct IEndpoint.NlpPool[]";
name: "nlpPools";
type: "tuple[]";
},
{
internalType: "int128[]";
name: "nlpPoolRebalanceX18";
type: "int128[]";
},
];
name: "burnNlp";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "int128[]"; name: "fees"; type: "int128[]" },
];
name: "claimSequencerFees";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
];
name: "clearNlpPoolPosition";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes"; name: "transaction"; type: "bytes" },
];
name: "delistProduct";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{
components: readonly [
{ internalType: "bytes32"; name: "sender"; type: "bytes32" },
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "uint128"; name: "amount"; type: "uint128" },
];
internalType: "struct IEndpoint.DepositCollateral";
name: "txn";
type: "tuple";
},
];
name: "depositCollateral";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes"; name: "transaction"; type: "bytes" },
];
name: "depositInsurance";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [];
name: "getClearinghouseLiq";
outputs: readonly [{ internalType: "address"; name: ""; type: "address" }];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "getEndpoint";
outputs: readonly [{ internalType: "address"; name: ""; type: "address" }];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
];
name: "getEngineByProduct";
outputs: readonly [{ internalType: "address"; name: ""; type: "address" }];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{
internalType: "enum IProductEngine.EngineType";
name: "engineType";
type: "uint8";
},
];
name: "getEngineByType";
outputs: readonly [{ internalType: "address"; name: ""; type: "address" }];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
{
internalType: "enum IProductEngine.HealthType";
name: "healthType";
type: "uint8";
},
];
name: "getHealth";
outputs: readonly [
{ internalType: "int128"; name: "health"; type: "int128" },
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "getInsurance";
outputs: readonly [{ internalType: "int128"; name: ""; type: "int128" }];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "getQuote";
outputs: readonly [{ internalType: "address"; name: ""; type: "address" }];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "getSlowModeFee";
outputs: readonly [{ internalType: "uint256"; name: ""; type: "uint256" }];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "getSpreads";
outputs: readonly [{ internalType: "uint256"; name: ""; type: "uint256" }];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "getWithdrawPool";
outputs: readonly [{ internalType: "address"; name: ""; type: "address" }];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "address"; name: "_endpoint"; type: "address" },
{ internalType: "address"; name: "_quote"; type: "address" },
{ internalType: "address"; name: "_clearinghouseLiq"; type: "address" },
{ internalType: "uint256"; name: "_spreads"; type: "uint256" },
{ internalType: "address"; name: "_withdrawPool"; type: "address" },
];
name: "initialize";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{
components: readonly [
{ internalType: "bytes32"; name: "sender"; type: "bytes32" },
{ internalType: "bytes32"; name: "liquidatee"; type: "bytes32" },
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "bool"; name: "isEncodedSpread"; type: "bool" },
{ internalType: "int128"; name: "amount"; type: "int128" },
{ internalType: "uint64"; name: "nonce"; type: "uint64" },
];
internalType: "struct IEndpoint.LiquidateSubaccount";
name: "txn";
type: "tuple";
},
];
name: "liquidateSubaccount";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes"; name: "transaction"; type: "bytes" },
];
name: "manualAssert";
outputs: readonly [];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{
components: readonly [
{ internalType: "bytes32"; name: "sender"; type: "bytes32" },
{ internalType: "uint128"; name: "quoteAmount"; type: "uint128" },
{ internalType: "uint64"; name: "nonce"; type: "uint64" },
];
internalType: "struct IEndpoint.MintNlp";
name: "txn";
type: "tuple";
},
{ internalType: "int128"; name: "oraclePriceX18"; type: "int128" },
{
components: readonly [
{ internalType: "uint64"; name: "poolId"; type: "uint64" },
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
{ internalType: "address"; name: "owner"; type: "address" },
{ internalType: "uint128"; name: "balanceWeightX18"; type: "uint128" },
];
internalType: "struct IEndpoint.NlpPool[]";
name: "nlpPools";
type: "tuple[]";
},
{
internalType: "int128[]";
name: "nlpPoolRebalanceX18";
type: "int128[]";
},
];
name: "mintNlp";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [];
name: "owner";
outputs: readonly [{ internalType: "address"; name: ""; type: "address" }];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes"; name: "transaction"; type: "bytes" },
{ internalType: "uint64"; name: "nSubmissions"; type: "uint64" },
];
name: "rebalanceXWithdraw";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
];
name: "registerProduct";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [];
name: "renounceOwnership";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "uint128"; name: "amount"; type: "uint128" },
];
name: "requireMinDeposit";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "address"; name: "_withdrawPool"; type: "address" },
];
name: "setWithdrawPool";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes"; name: "transaction"; type: "bytes" },
];
name: "settlePnl";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "address"; name: "newOwner"; type: "address" },
];
name: "transferOwnership";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{
components: readonly [
{ internalType: "bytes32"; name: "sender"; type: "bytes32" },
{ internalType: "bytes32"; name: "recipient"; type: "bytes32" },
{ internalType: "uint128"; name: "amount"; type: "uint128" },
{ internalType: "uint64"; name: "nonce"; type: "uint64" },
];
internalType: "struct IEndpoint.TransferQuote";
name: "txn";
type: "tuple";
},
];
name: "transferQuote";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes"; name: "transaction"; type: "bytes" },
];
name: "updateFeeTier";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes"; name: "transaction"; type: "bytes" },
];
name: "updatePrice";
outputs: readonly [
{ internalType: "uint32"; name: ""; type: "uint32" },
{ internalType: "int128"; name: ""; type: "int128" },
];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{
internalType: "address";
name: "_clearinghouseLiq";
type: "address";
},
];
name: "upgradeClearinghouseLiq";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes32"; name: "sender"; type: "bytes32" },
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "uint128"; name: "amount"; type: "uint128" },
{ internalType: "address"; name: "sendTo"; type: "address" },
{ internalType: "uint64"; name: "idx"; type: "uint64" },
];
name: "withdrawCollateral";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes"; name: "transaction"; type: "bytes" },
{ internalType: "uint64"; name: "idx"; type: "uint64" },
];
name: "withdrawInsurance";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
]
ReadonlyspotEngine: readonly [
{
anonymous: false;
inputs: readonly [
{
indexed: false;
internalType: "uint32";
name: "productId";
type: "uint32";
},
];
name: "AddProduct";
type: "event";
},
{
anonymous: false;
inputs: readonly [
{
indexed: false;
internalType: "uint32";
name: "productId";
type: "uint32";
},
{
indexed: false;
internalType: "bytes32";
name: "subaccount";
type: "bytes32";
},
];
name: "BalanceUpdate";
type: "event";
},
{
anonymous: false;
inputs: readonly [
{
indexed: false;
internalType: "uint8";
name: "version";
type: "uint8";
},
];
name: "Initialized";
type: "event";
},
{
anonymous: false;
inputs: readonly [
{
indexed: false;
internalType: "uint32";
name: "productId";
type: "uint32";
},
{ indexed: false; internalType: "uint128"; name: "dt"; type: "uint128" },
{
indexed: false;
internalType: "int128";
name: "depositRateMultiplierX18";
type: "int128";
},
{
indexed: false;
internalType: "int128";
name: "borrowRateMultiplierX18";
type: "int128";
},
{
indexed: false;
internalType: "int128";
name: "feeAmount";
type: "int128";
},
];
name: "InterestPayment";
type: "event";
},
{
anonymous: false;
inputs: readonly [
{
indexed: true;
internalType: "address";
name: "previousOwner";
type: "address";
},
{
indexed: true;
internalType: "address";
name: "newOwner";
type: "address";
},
];
name: "OwnershipTransferred";
type: "event";
},
{
anonymous: false;
inputs: readonly [
{
indexed: false;
internalType: "uint32";
name: "productId";
type: "uint32";
},
];
name: "ProductUpdate";
type: "event";
},
{
anonymous: false;
inputs: readonly [
{
indexed: true;
internalType: "bytes32";
name: "subaccount";
type: "bytes32";
},
{
indexed: true;
internalType: "uint32";
name: "productId";
type: "uint32";
},
{
indexed: false;
internalType: "int128";
name: "amount";
type: "int128";
},
{
indexed: false;
internalType: "int128";
name: "lastCumulativeMultiplierX18";
type: "int128";
},
];
name: "SpotBalance";
type: "event";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "uint32"; name: "quoteId"; type: "uint32" },
{ internalType: "int128"; name: "sizeIncrement"; type: "int128" },
{ internalType: "int128"; name: "minSize"; type: "int128" },
{
components: readonly [
{ internalType: "address"; name: "token"; type: "address" },
{
internalType: "int128";
name: "interestInflectionUtilX18";
type: "int128";
},
{ internalType: "int128"; name: "interestFloorX18"; type: "int128" },
{ internalType: "int128"; name: "interestSmallCapX18"; type: "int128" },
{ internalType: "int128"; name: "interestLargeCapX18"; type: "int128" },
{ internalType: "int128"; name: "withdrawFeeX18"; type: "int128" },
{ internalType: "int128"; name: "minDepositRateX18"; type: "int128" },
];
internalType: "struct ISpotEngine.Config";
name: "config";
type: "tuple";
},
{
components: readonly [
{ internalType: "int32"; name: "longWeightInitial"; type: "int32" },
{ internalType: "int32"; name: "shortWeightInitial"; type: "int32" },
{ internalType: "int32"; name: "longWeightMaintenance"; type: "int32" },
{
internalType: "int32";
name: "shortWeightMaintenance";
type: "int32";
},
{ internalType: "int128"; name: "priceX18"; type: "int128" },
];
internalType: "struct RiskHelper.RiskStore";
name: "riskStore";
type: "tuple";
},
];
name: "addProduct";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
];
name: "assertUtilization";
outputs: readonly [];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
];
name: "getBalance";
outputs: readonly [
{
components: readonly [
{ internalType: "int128"; name: "amount"; type: "int128" },
];
internalType: "struct ISpotEngine.Balance";
name: "";
type: "tuple";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "getClearinghouse";
outputs: readonly [{ internalType: "address"; name: ""; type: "address" }];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
];
name: "getConfig";
outputs: readonly [
{
components: readonly [
{ internalType: "address"; name: "token"; type: "address" },
{
internalType: "int128";
name: "interestInflectionUtilX18";
type: "int128";
},
{ internalType: "int128"; name: "interestFloorX18"; type: "int128" },
{ internalType: "int128"; name: "interestSmallCapX18"; type: "int128" },
{ internalType: "int128"; name: "interestLargeCapX18"; type: "int128" },
{ internalType: "int128"; name: "withdrawFeeX18"; type: "int128" },
{ internalType: "int128"; name: "minDepositRateX18"; type: "int128" },
];
internalType: "struct ISpotEngine.Config";
name: "";
type: "tuple";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{
internalType: "enum IProductEngine.HealthType";
name: "healthType";
type: "uint8";
},
];
name: "getCoreRisk";
outputs: readonly [
{
components: readonly [
{ internalType: "int128"; name: "amount"; type: "int128" },
{ internalType: "int128"; name: "price"; type: "int128" },
{ internalType: "int128"; name: "longWeight"; type: "int128" },
];
internalType: "struct IProductEngine.CoreRisk";
name: "";
type: "tuple";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "getEndpoint";
outputs: readonly [{ internalType: "address"; name: ""; type: "address" }];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "getEngineType";
outputs: readonly [
{
internalType: "enum IProductEngine.EngineType";
name: "";
type: "uint8";
},
];
stateMutability: "pure";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
{
internalType: "enum IProductEngine.HealthType";
name: "healthType";
type: "uint8";
},
];
name: "getHealthContribution";
outputs: readonly [
{ internalType: "int128"; name: "health"; type: "int128" },
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
];
name: "getNlpUnlockedBalance";
outputs: readonly [
{
components: readonly [
{ internalType: "int128"; name: "amount"; type: "int128" },
];
internalType: "struct ISpotEngine.Balance";
name: "";
type: "tuple";
},
];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [];
name: "getProductIds";
outputs: readonly [
{ internalType: "uint32[]"; name: ""; type: "uint32[]" },
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
];
name: "getRisk";
outputs: readonly [
{
components: readonly [
{
internalType: "int128";
name: "longWeightInitialX18";
type: "int128";
},
{
internalType: "int128";
name: "shortWeightInitialX18";
type: "int128";
},
{
internalType: "int128";
name: "longWeightMaintenanceX18";
type: "int128";
},
{
internalType: "int128";
name: "shortWeightMaintenanceX18";
type: "int128";
},
{ internalType: "int128"; name: "priceX18"; type: "int128" },
];
internalType: "struct RiskHelper.Risk";
name: "";
type: "tuple";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
];
name: "getStateAndBalance";
outputs: readonly [
{
components: readonly [
{
internalType: "int128";
name: "cumulativeDepositsMultiplierX18";
type: "int128";
},
{
internalType: "int128";
name: "cumulativeBorrowsMultiplierX18";
type: "int128";
},
{
internalType: "int128";
name: "totalDepositsNormalized";
type: "int128";
},
{
internalType: "int128";
name: "totalBorrowsNormalized";
type: "int128";
},
];
internalType: "struct ISpotEngine.State";
name: "";
type: "tuple";
},
{
components: readonly [
{ internalType: "int128"; name: "amount"; type: "int128" },
];
internalType: "struct ISpotEngine.Balance";
name: "";
type: "tuple";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
];
name: "getToken";
outputs: readonly [{ internalType: "address"; name: ""; type: "address" }];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "address"; name: "_clearinghouse"; type: "address" },
{ internalType: "address"; name: "_offchainExchange"; type: "address" },
{ internalType: "address"; name: "_quote"; type: "address" },
{ internalType: "address"; name: "_endpoint"; type: "address" },
{ internalType: "address"; name: "_admin"; type: "address" },
];
name: "initialize";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "int128[]"; name: "totalDeposits"; type: "int128[]" },
{ internalType: "int128[]"; name: "totalBorrows"; type: "int128[]" },
];
name: "manualAssert";
outputs: readonly [];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "owner";
outputs: readonly [{ internalType: "address"; name: ""; type: "address" }];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "renounceOwnership";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
];
name: "socializeSubaccount";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "address"; name: "newOwner"; type: "address" },
];
name: "transferOwnership";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
];
name: "tryUnlockNlpBalance";
outputs: readonly [
{
components: readonly [
{ internalType: "int128"; name: "amount"; type: "int128" },
];
internalType: "struct ISpotEngine.Balance";
name: "";
type: "tuple";
},
];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
{ internalType: "int128"; name: "amountDelta"; type: "int128" },
];
name: "updateBalance";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
{ internalType: "int128"; name: "amountDelta"; type: "int128" },
{ internalType: "int128"; name: "quoteDelta"; type: "int128" },
];
name: "updateBalance";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "int128"; name: "priceX18"; type: "int128" },
];
name: "updatePrice";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes"; name: "rawTxn"; type: "bytes" },
];
name: "updateProduct";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
{ internalType: "int128"; name: "insurance"; type: "int128" },
];
name: "updateQuoteFromInsurance";
outputs: readonly [{ internalType: "int128"; name: ""; type: "int128" }];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{
components: readonly [
{ internalType: "int32"; name: "longWeightInitial"; type: "int32" },
{ internalType: "int32"; name: "shortWeightInitial"; type: "int32" },
{ internalType: "int32"; name: "longWeightMaintenance"; type: "int32" },
{
internalType: "int32";
name: "shortWeightMaintenance";
type: "int32";
},
{ internalType: "int128"; name: "priceX18"; type: "int128" },
];
internalType: "struct RiskHelper.RiskStore";
name: "riskStore";
type: "tuple";
},
];
name: "updateRisk";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint128"; name: "dt"; type: "uint128" },
];
name: "updateStates";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
]
ReadonlyperpEngine: readonly [
{
anonymous: false;
inputs: readonly [
{
indexed: false;
internalType: "uint32";
name: "productId";
type: "uint32";
},
];
name: "AddProduct";
type: "event";
},
{
anonymous: false;
inputs: readonly [
{
indexed: false;
internalType: "uint32";
name: "productId";
type: "uint32";
},
{
indexed: false;
internalType: "bytes32";
name: "subaccount";
type: "bytes32";
},
];
name: "BalanceUpdate";
type: "event";
},
{
anonymous: false;
inputs: readonly [
{
indexed: false;
internalType: "uint32";
name: "productId";
type: "uint32";
},
{ indexed: false; internalType: "uint128"; name: "dt"; type: "uint128" },
{
indexed: false;
internalType: "int128";
name: "openInterest";
type: "int128";
},
{
indexed: false;
internalType: "int128";
name: "payment";
type: "int128";
},
];
name: "FundingPayment";
type: "event";
},
{
anonymous: false;
inputs: readonly [
{
indexed: false;
internalType: "uint8";
name: "version";
type: "uint8";
},
];
name: "Initialized";
type: "event";
},
{
anonymous: false;
inputs: readonly [
{
indexed: true;
internalType: "address";
name: "previousOwner";
type: "address";
},
{
indexed: true;
internalType: "address";
name: "newOwner";
type: "address";
},
];
name: "OwnershipTransferred";
type: "event";
},
{
anonymous: false;
inputs: readonly [
{
indexed: false;
internalType: "uint32";
name: "productId";
type: "uint32";
},
];
name: "ProductUpdate";
type: "event";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "int128"; name: "sizeIncrement"; type: "int128" },
{ internalType: "int128"; name: "minSize"; type: "int128" },
{
components: readonly [
{ internalType: "int32"; name: "longWeightInitial"; type: "int32" },
{ internalType: "int32"; name: "shortWeightInitial"; type: "int32" },
{ internalType: "int32"; name: "longWeightMaintenance"; type: "int32" },
{
internalType: "int32";
name: "shortWeightMaintenance";
type: "int32";
},
{ internalType: "int128"; name: "priceX18"; type: "int128" },
];
internalType: "struct RiskHelper.RiskStore";
name: "riskStore";
type: "tuple";
},
];
name: "addProduct";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: ""; type: "uint32" },
{ internalType: "bytes32"; name: ""; type: "bytes32" },
];
name: "balances";
outputs: readonly [
{ internalType: "int128"; name: "amount"; type: "int128" },
{ internalType: "int128"; name: "vQuoteBalance"; type: "int128" },
{
internalType: "int128";
name: "lastCumulativeFundingX18";
type: "int128";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
];
name: "getBalance";
outputs: readonly [
{
components: readonly [
{ internalType: "int128"; name: "amount"; type: "int128" },
{ internalType: "int128"; name: "vQuoteBalance"; type: "int128" },
{
internalType: "int128";
name: "lastCumulativeFundingX18";
type: "int128";
},
];
internalType: "struct IPerpEngine.Balance";
name: "";
type: "tuple";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "getClearinghouse";
outputs: readonly [{ internalType: "address"; name: ""; type: "address" }];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{
internalType: "enum IProductEngine.HealthType";
name: "healthType";
type: "uint8";
},
];
name: "getCoreRisk";
outputs: readonly [
{
components: readonly [
{ internalType: "int128"; name: "amount"; type: "int128" },
{ internalType: "int128"; name: "price"; type: "int128" },
{ internalType: "int128"; name: "longWeight"; type: "int128" },
];
internalType: "struct IProductEngine.CoreRisk";
name: "";
type: "tuple";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "getEndpoint";
outputs: readonly [{ internalType: "address"; name: ""; type: "address" }];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "getEngineType";
outputs: readonly [
{
internalType: "enum IProductEngine.EngineType";
name: "";
type: "uint8";
},
];
stateMutability: "pure";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
{
internalType: "enum IProductEngine.HealthType";
name: "healthType";
type: "uint8";
},
];
name: "getHealthContribution";
outputs: readonly [
{ internalType: "int128"; name: "health"; type: "int128" },
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
];
name: "getPositionPnl";
outputs: readonly [{ internalType: "int128"; name: ""; type: "int128" }];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "getProductIds";
outputs: readonly [
{ internalType: "uint32[]"; name: ""; type: "uint32[]" },
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
];
name: "getRisk";
outputs: readonly [
{
components: readonly [
{
internalType: "int128";
name: "longWeightInitialX18";
type: "int128";
},
{
internalType: "int128";
name: "shortWeightInitialX18";
type: "int128";
},
{
internalType: "int128";
name: "longWeightMaintenanceX18";
type: "int128";
},
{
internalType: "int128";
name: "shortWeightMaintenanceX18";
type: "int128";
},
{ internalType: "int128"; name: "priceX18"; type: "int128" },
];
internalType: "struct RiskHelper.Risk";
name: "";
type: "tuple";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
];
name: "getSettlementState";
outputs: readonly [
{ internalType: "int128"; name: "availableSettle"; type: "int128" },
{
components: readonly [
{
internalType: "int128";
name: "cumulativeFundingLongX18";
type: "int128";
},
{
internalType: "int128";
name: "cumulativeFundingShortX18";
type: "int128";
},
{ internalType: "int128"; name: "availableSettle"; type: "int128" },
{ internalType: "int128"; name: "openInterest"; type: "int128" },
];
internalType: "struct IPerpEngine.State";
name: "state";
type: "tuple";
},
{
components: readonly [
{ internalType: "int128"; name: "amount"; type: "int128" },
{ internalType: "int128"; name: "vQuoteBalance"; type: "int128" },
{
internalType: "int128";
name: "lastCumulativeFundingX18";
type: "int128";
},
];
internalType: "struct IPerpEngine.Balance";
name: "balance";
type: "tuple";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
];
name: "getStateAndBalance";
outputs: readonly [
{
components: readonly [
{
internalType: "int128";
name: "cumulativeFundingLongX18";
type: "int128";
},
{
internalType: "int128";
name: "cumulativeFundingShortX18";
type: "int128";
},
{ internalType: "int128"; name: "availableSettle"; type: "int128" },
{ internalType: "int128"; name: "openInterest"; type: "int128" },
];
internalType: "struct IPerpEngine.State";
name: "";
type: "tuple";
},
{
components: readonly [
{ internalType: "int128"; name: "amount"; type: "int128" },
{ internalType: "int128"; name: "vQuoteBalance"; type: "int128" },
{
internalType: "int128";
name: "lastCumulativeFundingX18";
type: "int128";
},
];
internalType: "struct IPerpEngine.Balance";
name: "";
type: "tuple";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "address"; name: "_clearinghouse"; type: "address" },
{ internalType: "address"; name: "_offchainExchange"; type: "address" },
{ internalType: "address"; name: ""; type: "address" },
{ internalType: "address"; name: "_endpoint"; type: "address" },
{ internalType: "address"; name: "_admin"; type: "address" },
];
name: "initialize";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "int128[]"; name: "openInterests"; type: "int128[]" },
];
name: "manualAssert";
outputs: readonly [];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "owner";
outputs: readonly [{ internalType: "address"; name: ""; type: "address" }];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "renounceOwnership";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
{ internalType: "uint256"; name: "productIds"; type: "uint256" },
];
name: "settlePnl";
outputs: readonly [{ internalType: "int128"; name: ""; type: "int128" }];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
{ internalType: "int128"; name: "insurance"; type: "int128" },
];
name: "socializeSubaccount";
outputs: readonly [{ internalType: "int128"; name: ""; type: "int128" }];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [{ internalType: "uint32"; name: ""; type: "uint32" }];
name: "states";
outputs: readonly [
{
internalType: "int128";
name: "cumulativeFundingLongX18";
type: "int128";
},
{
internalType: "int128";
name: "cumulativeFundingShortX18";
type: "int128";
},
{ internalType: "int128"; name: "availableSettle"; type: "int128" },
{ internalType: "int128"; name: "openInterest"; type: "int128" },
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "address"; name: "newOwner"; type: "address" },
];
name: "transferOwnership";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "bytes32"; name: "subaccount"; type: "bytes32" },
{ internalType: "int128"; name: "amountDelta"; type: "int128" },
{ internalType: "int128"; name: "vQuoteDelta"; type: "int128" },
];
name: "updateBalance";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "int128"; name: "priceX18"; type: "int128" },
];
name: "updatePrice";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "bytes"; name: "rawTxn"; type: "bytes" },
];
name: "updateProduct";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{
components: readonly [
{ internalType: "int32"; name: "longWeightInitial"; type: "int32" },
{ internalType: "int32"; name: "shortWeightInitial"; type: "int32" },
{ internalType: "int32"; name: "longWeightMaintenance"; type: "int32" },
{
internalType: "int32";
name: "shortWeightMaintenance";
type: "int32";
},
{ internalType: "int128"; name: "priceX18"; type: "int128" },
];
internalType: "struct RiskHelper.RiskStore";
name: "riskStore";
type: "tuple";
},
];
name: "updateRisk";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint128"; name: "dt"; type: "uint128" },
{ internalType: "int128[]"; name: "avgPriceDiffs"; type: "int128[]" },
];
name: "updateStates";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
]
ReadonlywithdrawPool: readonly [
{
anonymous: false;
inputs: readonly [
{
indexed: false;
internalType: "uint8";
name: "version";
type: "uint8";
},
];
name: "Initialized";
type: "event";
},
{
anonymous: false;
inputs: readonly [
{
indexed: true;
internalType: "address";
name: "previousOwner";
type: "address";
},
{
indexed: true;
internalType: "address";
name: "newOwner";
type: "address";
},
];
name: "OwnershipTransferred";
type: "event";
},
{
inputs: readonly [
{ internalType: "uint64[]"; name: "idxs"; type: "uint64[]" },
];
name: "checkMarkedIdxs";
outputs: readonly [{ internalType: "bool[]"; name: ""; type: "bool[]" }];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32[]"; name: "productIds"; type: "uint32[]" },
];
name: "checkProductBalances";
outputs: readonly [
{ internalType: "uint256[]"; name: ""; type: "uint256[]" },
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{
internalType: "contract IERC20Base";
name: "token";
type: "address";
},
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "uint128"; name: "amount"; type: "uint128" },
];
name: "fastWithdrawalFeeAmount";
outputs: readonly [{ internalType: "int128"; name: ""; type: "int128" }];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [{ internalType: "uint32"; name: ""; type: "uint32" }];
name: "fees";
outputs: readonly [{ internalType: "int128"; name: ""; type: "int128" }];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "address"; name: "_clearinghouse"; type: "address" },
{ internalType: "address"; name: "_verifier"; type: "address" },
];
name: "initialize";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [{ internalType: "uint64"; name: ""; type: "uint64" }];
name: "markedIdxs";
outputs: readonly [{ internalType: "bool"; name: ""; type: "bool" }];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "minIdx";
outputs: readonly [{ internalType: "uint64"; name: ""; type: "uint64" }];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [];
name: "owner";
outputs: readonly [{ internalType: "address"; name: ""; type: "address" }];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
{ internalType: "uint128"; name: "amount"; type: "uint128" },
{ internalType: "address"; name: "sendTo"; type: "address" },
];
name: "removeLiquidity";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [];
name: "renounceOwnership";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint64"; name: "idx"; type: "uint64" },
{ internalType: "bytes"; name: "transaction"; type: "bytes" },
{ internalType: "bytes[]"; name: "signatures"; type: "bytes[]" },
];
name: "submitFastWithdrawal";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{
internalType: "contract IERC20Base";
name: "token";
type: "address";
},
{ internalType: "address"; name: "sendTo"; type: "address" },
{ internalType: "uint128"; name: "amount"; type: "uint128" },
{ internalType: "uint64"; name: "idx"; type: "uint64" },
];
name: "submitWithdrawal";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
{
inputs: readonly [
{ internalType: "address"; name: "newOwner"; type: "address" },
];
name: "transferOwnership";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
]