@ethereansos/interfaces-core 0.4.88 → 0.4.92
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +100 -56
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +97 -57
- package/dist/index.esm.js.map +1 -1
- package/package.json +11 -11
package/dist/index.esm.js
CHANGED
@@ -7514,14 +7514,9 @@ function ownKeys(object, enumerableOnly) {
|
|
7514
7514
|
|
7515
7515
|
if (Object.getOwnPropertySymbols) {
|
7516
7516
|
var symbols = Object.getOwnPropertySymbols(object);
|
7517
|
-
|
7518
|
-
|
7519
|
-
|
7520
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
7521
|
-
});
|
7522
|
-
}
|
7523
|
-
|
7524
|
-
keys.push.apply(keys, symbols);
|
7517
|
+
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
7518
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
7519
|
+
})), keys.push.apply(keys, symbols);
|
7525
7520
|
}
|
7526
7521
|
|
7527
7522
|
return keys;
|
@@ -7529,19 +7524,12 @@ function ownKeys(object, enumerableOnly) {
|
|
7529
7524
|
|
7530
7525
|
function _objectSpread2(target) {
|
7531
7526
|
for (var i = 1; i < arguments.length; i++) {
|
7532
|
-
var source = arguments[i]
|
7533
|
-
|
7534
|
-
|
7535
|
-
|
7536
|
-
|
7537
|
-
|
7538
|
-
} else if (Object.getOwnPropertyDescriptors) {
|
7539
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
7540
|
-
} else {
|
7541
|
-
ownKeys(Object(source)).forEach(function (key) {
|
7542
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
7543
|
-
});
|
7544
|
-
}
|
7527
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
7528
|
+
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
7529
|
+
_defineProperty(target, key, source[key]);
|
7530
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
7531
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
7532
|
+
});
|
7545
7533
|
}
|
7546
7534
|
|
7547
7535
|
return target;
|
@@ -7550,17 +7538,11 @@ function _objectSpread2(target) {
|
|
7550
7538
|
function _typeof(obj) {
|
7551
7539
|
"@babel/helpers - typeof";
|
7552
7540
|
|
7553
|
-
|
7554
|
-
|
7555
|
-
|
7556
|
-
|
7557
|
-
}
|
7558
|
-
_typeof = function (obj) {
|
7559
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
7560
|
-
};
|
7561
|
-
}
|
7562
|
-
|
7563
|
-
return _typeof(obj);
|
7541
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
7542
|
+
return typeof obj;
|
7543
|
+
} : function (obj) {
|
7544
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
7545
|
+
}, _typeof(obj);
|
7564
7546
|
}
|
7565
7547
|
|
7566
7548
|
function asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, key, arg) {
|
@@ -7618,6 +7600,9 @@ function _defineProperties$2(target, props) {
|
|
7618
7600
|
function _createClass$2(Constructor, protoProps, staticProps) {
|
7619
7601
|
if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
|
7620
7602
|
if (staticProps) _defineProperties$2(Constructor, staticProps);
|
7603
|
+
Object.defineProperty(Constructor, "prototype", {
|
7604
|
+
writable: false
|
7605
|
+
});
|
7621
7606
|
return Constructor;
|
7622
7607
|
}
|
7623
7608
|
|
@@ -7648,6 +7633,9 @@ function _inherits(subClass, superClass) {
|
|
7648
7633
|
configurable: true
|
7649
7634
|
}
|
7650
7635
|
});
|
7636
|
+
Object.defineProperty(subClass, "prototype", {
|
7637
|
+
writable: false
|
7638
|
+
});
|
7651
7639
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
7652
7640
|
}
|
7653
7641
|
|
@@ -32312,35 +32300,24 @@ function sendBlockchainTransaction(provider, fromOrPlainPrivateKey, to, data, va
|
|
32312
32300
|
|
32313
32301
|
case 2:
|
32314
32302
|
receipt = _context.sent;
|
32315
|
-
_context.t0 = !receipt || !receipt.blockNumber;
|
32316
32303
|
|
32317
|
-
if (
|
32318
|
-
|
32319
|
-
|
32320
|
-
|
32321
|
-
|
32322
|
-
|
32323
|
-
|
32324
|
-
|
32325
|
-
|
32326
|
-
case 8:
|
32327
|
-
_context.t2 = _context.sent.number;
|
32328
|
-
_context.t3 = (0, _context.t1)(_context.t2);
|
32329
|
-
_context.t4 = parseInt(receipt.blockNumber);
|
32330
|
-
_context.t0 = _context.t3 <= _context.t4;
|
32331
|
-
|
32332
|
-
case 12:
|
32333
|
-
if (!_context.t0) {
|
32334
|
-
_context.next = 14;
|
32304
|
+
if (!(!receipt || !receipt.blockNumber
|
32305
|
+
/* ||
|
32306
|
+
parseInt(
|
32307
|
+
(await sendAsync(provider, 'eth_getBlockByNumber', 'latest', false))
|
32308
|
+
.number
|
32309
|
+
) <= parseInt(receipt.blockNumber)*/
|
32310
|
+
)) {
|
32311
|
+
_context.next = 5;
|
32335
32312
|
break;
|
32336
32313
|
}
|
32337
32314
|
|
32338
32315
|
return _context.abrupt("return", setTimeout(timeout, 3000));
|
32339
32316
|
|
32340
|
-
case
|
32317
|
+
case 5:
|
32341
32318
|
return _context.abrupt("return", ok(receipt));
|
32342
32319
|
|
32343
|
-
case
|
32320
|
+
case 6:
|
32344
32321
|
case "end":
|
32345
32322
|
return _context.stop();
|
32346
32323
|
}
|
@@ -34698,7 +34675,7 @@ var symbols = {
|
|
34698
34675
|
*/
|
34699
34676
|
|
34700
34677
|
function toEthereumSymbol(decimals) {
|
34701
|
-
var d = '1' + new Array(decimals + 1).join('0');
|
34678
|
+
var d = '1' + new Array(parseInt(decimals) + 1).join('0');
|
34702
34679
|
return (Object.entries(symbols).find(function (_ref) {
|
34703
34680
|
var _ref2 = _slicedToArray(_ref, 2);
|
34704
34681
|
_ref2[0];
|
@@ -44762,6 +44739,7 @@ var POOL_INIT_CODE_HASH = '0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea8932
|
|
44762
44739
|
var FeeAmount;
|
44763
44740
|
|
44764
44741
|
(function (FeeAmount) {
|
44742
|
+
FeeAmount[FeeAmount["LOWEST"] = 100] = "LOWEST";
|
44765
44743
|
FeeAmount[FeeAmount["LOW"] = 500] = "LOW";
|
44766
44744
|
FeeAmount[FeeAmount["MEDIUM"] = 3000] = "MEDIUM";
|
44767
44745
|
FeeAmount[FeeAmount["HIGH"] = 10000] = "HIGH";
|
@@ -44771,7 +44749,7 @@ var FeeAmount;
|
|
44771
44749
|
*/
|
44772
44750
|
|
44773
44751
|
|
44774
|
-
var TICK_SPACINGS = (_TICK_SPACINGS = {}, _TICK_SPACINGS[FeeAmount.LOW] = 10, _TICK_SPACINGS[FeeAmount.MEDIUM] = 60, _TICK_SPACINGS[FeeAmount.HIGH] = 200, _TICK_SPACINGS);
|
44752
|
+
var TICK_SPACINGS = (_TICK_SPACINGS = {}, _TICK_SPACINGS[FeeAmount.LOWEST] = 1, _TICK_SPACINGS[FeeAmount.LOW] = 10, _TICK_SPACINGS[FeeAmount.MEDIUM] = 60, _TICK_SPACINGS[FeeAmount.HIGH] = 200, _TICK_SPACINGS);
|
44775
44753
|
|
44776
44754
|
var NEGATIVE_ONE = /*#__PURE__*/JSBI.BigInt(-1);
|
44777
44755
|
var ZERO = /*#__PURE__*/JSBI.BigInt(0);
|
@@ -45302,7 +45280,7 @@ var TickList = /*#__PURE__*/function () {
|
|
45302
45280
|
} else {
|
45303
45281
|
var _wordPos = compressed + 1 >> 8;
|
45304
45282
|
|
45305
|
-
var maximum = (_wordPos + 1 << 8) * tickSpacing
|
45283
|
+
var maximum = ((_wordPos + 1 << 8) - 1) * tickSpacing;
|
45306
45284
|
|
45307
45285
|
if (this.isAtOrAboveLargest(ticks, tick)) {
|
45308
45286
|
return [maximum, false];
|
@@ -45497,6 +45475,23 @@ function nearestUsableTick(tick, tickSpacing) {
|
|
45497
45475
|
if (rounded < TickMath.MIN_TICK) return rounded + tickSpacing;else if (rounded > TickMath.MAX_TICK) return rounded - tickSpacing;else return rounded;
|
45498
45476
|
}
|
45499
45477
|
|
45478
|
+
var Q128 = /*#__PURE__*/JSBI.exponentiate( /*#__PURE__*/JSBI.BigInt(2), /*#__PURE__*/JSBI.BigInt(128));
|
45479
|
+
var PositionLibrary = /*#__PURE__*/function () {
|
45480
|
+
/**
|
45481
|
+
* Cannot be constructed.
|
45482
|
+
*/
|
45483
|
+
function PositionLibrary() {} // replicates the portions of Position#update required to compute unaccounted fees
|
45484
|
+
|
45485
|
+
|
45486
|
+
PositionLibrary.getTokensOwed = function getTokensOwed(feeGrowthInside0LastX128, feeGrowthInside1LastX128, liquidity, feeGrowthInside0X128, feeGrowthInside1X128) {
|
45487
|
+
var tokensOwed0 = JSBI.divide(JSBI.multiply(subIn256(feeGrowthInside0X128, feeGrowthInside0LastX128), liquidity), Q128);
|
45488
|
+
var tokensOwed1 = JSBI.divide(JSBI.multiply(subIn256(feeGrowthInside1X128, feeGrowthInside1LastX128), liquidity), Q128);
|
45489
|
+
return [tokensOwed0, tokensOwed1];
|
45490
|
+
};
|
45491
|
+
|
45492
|
+
return PositionLibrary;
|
45493
|
+
}();
|
45494
|
+
|
45500
45495
|
/**
|
45501
45496
|
* Returns a price object corresponding to the input tick and the base/quote token
|
45502
45497
|
* Inputs must be tokens because the address order is used to interpret the price represented by the tick
|
@@ -45535,6 +45530,51 @@ function priceToClosestTick(price) {
|
|
45535
45530
|
return tick;
|
45536
45531
|
}
|
45537
45532
|
|
45533
|
+
var Q256 = /*#__PURE__*/JSBI.exponentiate( /*#__PURE__*/JSBI.BigInt(2), /*#__PURE__*/JSBI.BigInt(256));
|
45534
|
+
function subIn256(x, y) {
|
45535
|
+
var difference = JSBI.subtract(x, y);
|
45536
|
+
|
45537
|
+
if (JSBI.lessThan(difference, ZERO)) {
|
45538
|
+
return JSBI.add(Q256, difference);
|
45539
|
+
} else {
|
45540
|
+
return difference;
|
45541
|
+
}
|
45542
|
+
}
|
45543
|
+
var TickLibrary = /*#__PURE__*/function () {
|
45544
|
+
/**
|
45545
|
+
* Cannot be constructed.
|
45546
|
+
*/
|
45547
|
+
function TickLibrary() {}
|
45548
|
+
|
45549
|
+
TickLibrary.getFeeGrowthInside = function getFeeGrowthInside(feeGrowthOutsideLower, feeGrowthOutsideUpper, tickLower, tickUpper, tickCurrent, feeGrowthGlobal0X128, feeGrowthGlobal1X128) {
|
45550
|
+
var feeGrowthBelow0X128;
|
45551
|
+
var feeGrowthBelow1X128;
|
45552
|
+
|
45553
|
+
if (tickCurrent >= tickLower) {
|
45554
|
+
feeGrowthBelow0X128 = feeGrowthOutsideLower.feeGrowthOutside0X128;
|
45555
|
+
feeGrowthBelow1X128 = feeGrowthOutsideLower.feeGrowthOutside1X128;
|
45556
|
+
} else {
|
45557
|
+
feeGrowthBelow0X128 = subIn256(feeGrowthGlobal0X128, feeGrowthOutsideLower.feeGrowthOutside0X128);
|
45558
|
+
feeGrowthBelow1X128 = subIn256(feeGrowthGlobal1X128, feeGrowthOutsideLower.feeGrowthOutside1X128);
|
45559
|
+
}
|
45560
|
+
|
45561
|
+
var feeGrowthAbove0X128;
|
45562
|
+
var feeGrowthAbove1X128;
|
45563
|
+
|
45564
|
+
if (tickCurrent < tickUpper) {
|
45565
|
+
feeGrowthAbove0X128 = feeGrowthOutsideUpper.feeGrowthOutside0X128;
|
45566
|
+
feeGrowthAbove1X128 = feeGrowthOutsideUpper.feeGrowthOutside1X128;
|
45567
|
+
} else {
|
45568
|
+
feeGrowthAbove0X128 = subIn256(feeGrowthGlobal0X128, feeGrowthOutsideUpper.feeGrowthOutside0X128);
|
45569
|
+
feeGrowthAbove1X128 = subIn256(feeGrowthGlobal1X128, feeGrowthOutsideUpper.feeGrowthOutside1X128);
|
45570
|
+
}
|
45571
|
+
|
45572
|
+
return [subIn256(subIn256(feeGrowthGlobal0X128, feeGrowthBelow0X128), feeGrowthAbove0X128), subIn256(subIn256(feeGrowthGlobal1X128, feeGrowthBelow1X128), feeGrowthAbove1X128)];
|
45573
|
+
};
|
45574
|
+
|
45575
|
+
return TickLibrary;
|
45576
|
+
}();
|
45577
|
+
|
45538
45578
|
var Tick = function Tick(_ref) {
|
45539
45579
|
var index = _ref.index,
|
45540
45580
|
liquidityGross = _ref.liquidityGross,
|
@@ -49118,5 +49158,5 @@ var tokenPercentage = function tokenPercentage(amount, totalSupply) {
|
|
49118
49158
|
|
49119
49159
|
var abi = new AbiCoder();
|
49120
49160
|
|
49121
|
-
export { ADDRESS_ZERO, BASE64_REGEXP, BLOCK_SEARCH_SIZE, gBase64 as Base64, CurrencyAmount, DFO_DEPLOYED_EVENT, Ether, FACTORY_ADDRESS, FeeAmount, Fraction, FullMath, GlobalContextsProvider, InitContextProvider, LiquidityMath, MaxUint256, Multicall, NEW_DFO_DEPLOYED_EVENT, NativeCurrency, NoTickDataProvider, NonfungiblePositionManager, POOL_INIT_CODE_HASH, Payments, Percent, PluginsContextProvider, Pool, Position, Price, Rounding, Route, SelfPermit, SqrtPriceMath, Staker, SwapQuoter, SwapRouter, TICK_SPACINGS, Tick, TickList, TickListDataProvider, TickMath, Token, Trade, TradeType, URL_REGEXP, VOID_BYTES32, VOID_ETHEREUM_ADDRESS, WETH9, Web3ContextProvider, abi, add, blockchainCall, checkCoverSize, computePoolAddress, computePriceImpact, createContract, deployMetadataLink, div, eliminateFloatingFinalZeroes, encodeRouteToPath, encodeSqrtRatioX96, PubSub as ethosEvents, extractComment, extractHTMLDescription, formatLink, formatMoney, formatMoneyUniV3, formatNumber, formatString, fromDecimals, generateAndCompileContract, generateFunctionalityMetadataLink, getAllContracts, getEthereumPrice, getLogs, getNetworkElement, getRandomArrayElement, getRandomArrayIndex, SolidityUtilities as getSolidityUtilities, getSupportedSolidityVersion, getTokenPriceInDollarsOnUniswap, getTokenPriceInDollarsOnUniswapV3, hasEthereumAddress, isEthereumAddress, isSorted, loadBlockSearchTranches, loadContent, loadFunctionality, loadFunctionalityNames, loadMetadatas, loadOffChainWallets as loadOffchainWallets, maxLiquidityForAmounts, methodSignatureMatch, mint, mostSignificantBit, mul, nearestUsableTick, newContract, normalizeValue, numberToString, packCollection, pragmaSolidityRule, priceToClosestTick, refreshBalances, resetContracts, searchForCodeErrors, sendAsync, sendGeneratedProposal, shortenWord, sleep, solidityImportRule, sortedInsert, split, sqrt, toLines as stringToLines, sub, swap, tickToPrice, toDecimals, toEthereumSymbol, toHex, toSubArrays, tokenPercentage, tradeComparator, transfer, truncatedWord, tryRetrieveMetadata, uploadMetadata, uploadToIPFS, useEthosContext, useInit, useIsUnmounted, useLoadUniswapPairs, useLocalStorage, usePlaceholder, usePlugins, usePrevious, useSinglePlaceholder, useWeb3, validateAndParseAddress, validateDFOMetadata, web3States };
|
49161
|
+
export { ADDRESS_ZERO, BASE64_REGEXP, BLOCK_SEARCH_SIZE, gBase64 as Base64, CurrencyAmount, DFO_DEPLOYED_EVENT, Ether, FACTORY_ADDRESS, FeeAmount, Fraction, FullMath, GlobalContextsProvider, InitContextProvider, LiquidityMath, MaxUint256, Multicall, NEW_DFO_DEPLOYED_EVENT, NativeCurrency, NoTickDataProvider, NonfungiblePositionManager, POOL_INIT_CODE_HASH, Payments, Percent, PluginsContextProvider, Pool, Position, PositionLibrary, Price, Rounding, Route, SelfPermit, SqrtPriceMath, Staker, SwapMath, SwapQuoter, SwapRouter, TICK_SPACINGS, Tick, TickLibrary, TickList, TickListDataProvider, TickMath, Token, Trade, TradeType, URL_REGEXP, VOID_BYTES32, VOID_ETHEREUM_ADDRESS, WETH9, Web3ContextProvider, abi, add, blockchainCall, checkCoverSize, computePoolAddress, computePriceImpact, createContract, deployMetadataLink, div, eliminateFloatingFinalZeroes, encodeRouteToPath, encodeSqrtRatioX96, PubSub as ethosEvents, extractComment, extractHTMLDescription, formatLink, formatMoney, formatMoneyUniV3, formatNumber, formatString, fromDecimals, generateAndCompileContract, generateFunctionalityMetadataLink, getAllContracts, getEthereumPrice, getLogs, getNetworkElement, getRandomArrayElement, getRandomArrayIndex, SolidityUtilities as getSolidityUtilities, getSupportedSolidityVersion, getTokenPriceInDollarsOnUniswap, getTokenPriceInDollarsOnUniswapV3, hasEthereumAddress, isEthereumAddress, isSorted, loadBlockSearchTranches, loadContent, loadFunctionality, loadFunctionalityNames, loadMetadatas, loadOffChainWallets as loadOffchainWallets, maxLiquidityForAmounts, methodSignatureMatch, mint, mostSignificantBit, mul, nearestUsableTick, newContract, normalizeValue, numberToString, packCollection, pragmaSolidityRule, priceToClosestTick, refreshBalances, resetContracts, searchForCodeErrors, sendAsync, sendGeneratedProposal, shortenWord, sleep, solidityImportRule, sortedInsert, split, sqrt, toLines as stringToLines, sub, subIn256, swap, tickToPrice, toDecimals, toEthereumSymbol, toHex, toSubArrays, tokenPercentage, tradeComparator, transfer, truncatedWord, tryRetrieveMetadata, uploadMetadata, uploadToIPFS, useEthosContext, useInit, useIsUnmounted, useLoadUniswapPairs, useLocalStorage, usePlaceholder, usePlugins, usePrevious, useSinglePlaceholder, useWeb3, validateAndParseAddress, validateDFOMetadata, web3States };
|
49122
49162
|
//# sourceMappingURL=index.esm.js.map
|