@quantara/sdk
Version:
JavaScript/TypeScript SDK for interacting with Quantara Protocol on Neura Testnet
29 lines (28 loc) • 1.55 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.estimateQntlvWithdrawalOraclePriceCount = exports.estimateQntlvDepositOraclePriceCount = exports.estimateShiftOraclePriceCount = exports.estimateOrderOraclePriceCount = exports.estimateWithdrawalOraclePriceCount = exports.estimateDepositOraclePriceCount = void 0;
// @see https://github.com/quantara-io/quantara-synthetics/blob/6ed9be061d8fcc0dc7bc5d34dee3bf091408a1bf/contracts/gas/GasUtils.sol#L218-L234
function estimateDepositOraclePriceCount(swapsCount) {
return 3n + BigInt(swapsCount);
}
exports.estimateDepositOraclePriceCount = estimateDepositOraclePriceCount;
function estimateWithdrawalOraclePriceCount(swapsCount) {
return 3n + BigInt(swapsCount);
}
exports.estimateWithdrawalOraclePriceCount = estimateWithdrawalOraclePriceCount;
function estimateOrderOraclePriceCount(swapsCount) {
return 3n + BigInt(swapsCount);
}
exports.estimateOrderOraclePriceCount = estimateOrderOraclePriceCount;
function estimateShiftOraclePriceCount() {
return 4n;
}
exports.estimateShiftOraclePriceCount = estimateShiftOraclePriceCount;
function estimateQntlvDepositOraclePriceCount(marketCount, swapsCount = 0n) {
return 2n + marketCount + swapsCount;
}
exports.estimateQntlvDepositOraclePriceCount = estimateQntlvDepositOraclePriceCount;
function estimateQntlvWithdrawalOraclePriceCount(marketCount, swapsCount = 0n) {
return 2n + marketCount + swapsCount;
}
exports.estimateQntlvWithdrawalOraclePriceCount = estimateQntlvWithdrawalOraclePriceCount;
;