Nado Typescript SDK Documentation
    Preparing search index...

    Variable SPOT_ENGINE_ABIConst

    SPOT_ENGINE_ABI: 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";
        },
    ] = ...