Variable SPOT_ENGINE_ABIConst
SPOT_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: "lastCumulativeMultiplierX18";
type: "int128";
},
];
internalType: "struct ISpotEngine.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: "struct ISpotEngine.LpBalance";
name: "";
type: "tuple";
},
{
components: readonly [
{ internalType: "int128"; name: "amount"; type: "int128" },
{
internalType: "int128";
name: "lastCumulativeMultiplierX18";
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: "struct ISpotEngine.Config";
name: "";
type: "tuple";
},
];
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" },
{
components: readonly [
{ internalType: "int128"; name: "amount"; type: "int128" },
{
internalType: "int128";
name: "lastCumulativeMultiplierX18";
type: "int128";
},
];
internalType: "struct ISpotEngine.Balance";
name: "quote";
type: "tuple";
},
{
components: readonly [
{ internalType: "int128"; name: "amount"; type: "int128" },
{
internalType: "int128";
name: "lastCumulativeMultiplierX18";
type: "int128";
},
];
internalType: "struct ISpotEngine.Balance";
name: "base";
type: "tuple";
},
];
internalType: "struct ISpotEngine.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 [];
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: "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: "int128";
name: "lastCumulativeMultiplierX18";
type: "int128";
},
];
internalType: "struct ISpotEngine.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" },
{
components: readonly [
{ internalType: "int128"; name: "amount"; type: "int128" },
{
internalType: "int128";
name: "lastCumulativeMultiplierX18";
type: "int128";
},
];
internalType: "struct ISpotEngine.Balance";
name: "quote";
type: "tuple";
},
{
components: readonly [
{ internalType: "int128"; name: "amount"; type: "int128" },
{
internalType: "int128";
name: "lastCumulativeMultiplierX18";
type: "int128";
},
];
internalType: "struct ISpotEngine.Balance";
name: "base";
type: "tuple";
},
];
internalType: "struct ISpotEngine.LpState";
name: "";
type: "tuple";
},
{
components: readonly [
{ internalType: "int128"; name: "amount"; type: "int128" },
];
internalType: "struct ISpotEngine.LpBalance";
name: "";
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: "";
type: "tuple";
},
{
components: readonly [
{ internalType: "int128"; name: "amount"; type: "int128" },
{
internalType: "int128";
name: "lastCumulativeMultiplierX18";
type: "int128";
},
];
internalType: "struct ISpotEngine.Balance";
name: "";
type: "tuple";
},
];
stateMutability: "view";
type: "function";
},
{
inputs: readonly [
{ internalType: "uint32"; name: "productId"; type: "uint32" },
];
name: "getWithdrawFee";
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: "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: "totalDeposits"; type: "int128[]" },
{ internalType: "int128[]"; name: "totalBorrows"; 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" },
];
name: "socializeSubaccount";
outputs: readonly [];
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" },
];
name: "updateStates";
outputs: readonly [];
stateMutability: "nonpayable";
type: "function";
},
] = ...