Variable PERP_ENGINE_ABIConst
PERP_ENGINE_ABI: readonly [{
anonymous: false;
inputs: readonly [{
indexed: false;
internalType: "uint32";
name: "productId";
type: "uint32";
}];
name: "AddProduct";
type: "event";
}, {
inputs: readonly [{
components: 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";
}];
internalType: "struct IProductEngine.ProductDelta[]";
name: "deltas";
type: "tuple[]";
}];
name: "applyDeltas";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
}, {
inputs: readonly [{
internalType: "uint32";
name: "productId";
type: "uint32";
}, {
internalType: "bytes32";
name: "subaccount";
type: "bytes32";
}, {
internalType: "int128";
name: "amountLp";
type: "int128";
}];
name: "burnLp";
outputs: readonly [{
internalType: "int128";
name: "";
type: "int128";
}, {
internalType: "int128";
name: "";
type: "int128";
}];
stateMutability: "nonpayable";
type: "function";
}, {
inputs: readonly [{
internalType: "bytes32";
name: "liquidatee";
type: "bytes32";
}, {
internalType: "bytes32";
name: "liquidator";
type: "bytes32";
}, {
internalType: "address";
name: "feeCalculator";
type: "address";
}];
name: "decomposeLps";
outputs: readonly [{
internalType: "int128";
name: "";
type: "int128";
}];
stateMutability: "nonpayable";
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 [{
internalType: "uint32";
name: "productId";
type: "uint32";
}, {
internalType: "bytes32";
name: "subaccount";
type: "bytes32";
}];
name: "getBalanceAmount";
outputs: readonly [{
internalType: "int128";
name: "";
type: "int128";
}];
stateMutability: "view";
type: "function";
}, {
inputs: readonly [{
internalType: "uint32";
name: "productId";
type: "uint32";
}, {
internalType: "bytes32";
name: "subaccount";
type: "bytes32";
}];
name: "getBalances";
outputs: readonly [{
components: readonly [{
internalType: "int128";
name: "amount";
type: "int128";
}, {
internalType: "int128";
name: "lastCumulativeFundingX18";
type: "int128";
}];
internalType: "struct IPerpEngine.LpBalance";
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 [];
name: "getClearinghouse";
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: "uint32";
name: "productId";
type: "uint32";
}];
name: "getLpState";
outputs: readonly [{
components: readonly [{
internalType: "int128";
name: "supply";
type: "int128";
}, {
internalType: "int128";
name: "lastCumulativeFundingX18";
type: "int128";
}, {
internalType: "int128";
name: "cumulativeFundingPerLpX18";
type: "int128";
}, {
internalType: "int128";
name: "base";
type: "int128";
}, {
internalType: "int128";
name: "quote";
type: "int128";
}];
internalType: "struct IPerpEngine.LpState";
name: "";
type: "tuple";
}];
stateMutability: "view";
type: "function";
}, {
inputs: readonly [{
internalType: "uint32";
name: "productId";
type: "uint32";
}];
name: "getOrderbook";
outputs: readonly [{
internalType: "address";
name: "";
type: "address";
}];
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";
}, {
internalType: "bytes32";
name: "subaccount";
type: "bytes32";
}];
name: "getSettlementState";
outputs: readonly [{
internalType: "int128";
name: "availableSettle";
type: "int128";
}, {
components: readonly [{
internalType: "int128";
name: "supply";
type: "int128";
}, {
internalType: "int128";
name: "lastCumulativeFundingX18";
type: "int128";
}, {
internalType: "int128";
name: "cumulativeFundingPerLpX18";
type: "int128";
}, {
internalType: "int128";
name: "base";
type: "int128";
}, {
internalType: "int128";
name: "quote";
type: "int128";
}];
internalType: "struct IPerpEngine.LpState";
name: "lpState";
type: "tuple";
}, {
components: readonly [{
internalType: "int128";
name: "amount";
type: "int128";
}, {
internalType: "int128";
name: "lastCumulativeFundingX18";
type: "int128";
}];
internalType: "struct IPerpEngine.LpBalance";
name: "lpBalance";
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: "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: "uint32";
name: "productId";
type: "uint32";
}, {
internalType: "bytes32";
name: "subaccount";
type: "bytes32";
}];
name: "getStatesAndBalances";
outputs: readonly [{
components: readonly [{
internalType: "int128";
name: "supply";
type: "int128";
}, {
internalType: "int128";
name: "lastCumulativeFundingX18";
type: "int128";
}, {
internalType: "int128";
name: "cumulativeFundingPerLpX18";
type: "int128";
}, {
internalType: "int128";
name: "base";
type: "int128";
}, {
internalType: "int128";
name: "quote";
type: "int128";
}];
internalType: "struct IPerpEngine.LpState";
name: "";
type: "tuple";
}, {
components: readonly [{
internalType: "int128";
name: "amount";
type: "int128";
}, {
internalType: "int128";
name: "lastCumulativeFundingX18";
type: "int128";
}];
internalType: "struct IPerpEngine.LpBalance";
name: "";
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: "";
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: "uint32";
name: "productId";
type: "uint32";
}, {
internalType: "bytes32";
name: "subaccount";
type: "bytes32";
}];
name: "hasBalance";
outputs: readonly [{
internalType: "bool";
name: "";
type: "bool";
}];
stateMutability: "view";
type: "function";
}, {
inputs: readonly [{
internalType: "address";
name: "_clearinghouse";
type: "address";
}, {
internalType: "address";
name: "_quote";
type: "address";
}, {
internalType: "address";
name: "_endpoint";
type: "address";
}, {
internalType: "address";
name: "_admin";
type: "address";
}, {
internalType: "address";
name: "_fees";
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 [{
internalType: "uint32";
name: "productId";
type: "uint32";
}, {
internalType: "bytes32";
name: "subaccount";
type: "bytes32";
}, {
internalType: "int128";
name: "amountBase";
type: "int128";
}, {
internalType: "int128";
name: "quoteAmountLow";
type: "int128";
}, {
internalType: "int128";
name: "quoteAmountHigh";
type: "int128";
}];
name: "mintLp";
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: "productId";
type: "uint32";
}, {
internalType: "int128";
name: "baseDelta";
type: "int128";
}, {
internalType: "int128";
name: "quoteDelta";
type: "int128";
}];
name: "swapLp";
outputs: readonly [{
internalType: "int128";
name: "";
type: "int128";
}, {
internalType: "int128";
name: "";
type: "int128";
}];
stateMutability: "nonpayable";
type: "function";
}, {
inputs: readonly [{
internalType: "uint32";
name: "productId";
type: "uint32";
}, {
internalType: "int128";
name: "amount";
type: "int128";
}, {
internalType: "int128";
name: "priceX18";
type: "int128";
}, {
internalType: "int128";
name: "sizeIncrement";
type: "int128";
}, {
internalType: "int128";
name: "lpSpreadX18";
type: "int128";
}];
name: "swapLp";
outputs: readonly [{
internalType: "int128";
name: "";
type: "int128";
}, {
internalType: "int128";
name: "";
type: "int128";
}];
stateMutability: "nonpayable";
type: "function";
}, {
inputs: readonly [{
internalType: "bytes";
name: "txn";
type: "bytes";
}];
name: "updateProduct";
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";
}] = ...