@ethereansos/interfaces-core 0.4.89 → 0.4.90

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.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
- if (enumerableOnly) {
7519
- symbols = symbols.filter(function (sym) {
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] != null ? arguments[i] : {};
7533
-
7534
- if (i % 2) {
7535
- ownKeys(Object(source), true).forEach(function (key) {
7536
- _defineProperty(target, key, source[key]);
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
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
7554
- _typeof = function (obj) {
7555
- return typeof obj;
7556
- };
7557
- } else {
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
 
@@ -44762,6 +44750,7 @@ var POOL_INIT_CODE_HASH = '0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea8932
44762
44750
  var FeeAmount;
44763
44751
 
44764
44752
  (function (FeeAmount) {
44753
+ FeeAmount[FeeAmount["LOWEST"] = 100] = "LOWEST";
44765
44754
  FeeAmount[FeeAmount["LOW"] = 500] = "LOW";
44766
44755
  FeeAmount[FeeAmount["MEDIUM"] = 3000] = "MEDIUM";
44767
44756
  FeeAmount[FeeAmount["HIGH"] = 10000] = "HIGH";
@@ -44771,7 +44760,7 @@ var FeeAmount;
44771
44760
  */
44772
44761
 
44773
44762
 
44774
- var TICK_SPACINGS = (_TICK_SPACINGS = {}, _TICK_SPACINGS[FeeAmount.LOW] = 10, _TICK_SPACINGS[FeeAmount.MEDIUM] = 60, _TICK_SPACINGS[FeeAmount.HIGH] = 200, _TICK_SPACINGS);
44763
+ 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
44764
 
44776
44765
  var NEGATIVE_ONE = /*#__PURE__*/JSBI.BigInt(-1);
44777
44766
  var ZERO = /*#__PURE__*/JSBI.BigInt(0);
@@ -45302,7 +45291,7 @@ var TickList = /*#__PURE__*/function () {
45302
45291
  } else {
45303
45292
  var _wordPos = compressed + 1 >> 8;
45304
45293
 
45305
- var maximum = (_wordPos + 1 << 8) * tickSpacing - 1;
45294
+ var maximum = ((_wordPos + 1 << 8) - 1) * tickSpacing;
45306
45295
 
45307
45296
  if (this.isAtOrAboveLargest(ticks, tick)) {
45308
45297
  return [maximum, false];
@@ -45497,6 +45486,23 @@ function nearestUsableTick(tick, tickSpacing) {
45497
45486
  if (rounded < TickMath.MIN_TICK) return rounded + tickSpacing;else if (rounded > TickMath.MAX_TICK) return rounded - tickSpacing;else return rounded;
45498
45487
  }
45499
45488
 
45489
+ var Q128 = /*#__PURE__*/JSBI.exponentiate( /*#__PURE__*/JSBI.BigInt(2), /*#__PURE__*/JSBI.BigInt(128));
45490
+ var PositionLibrary = /*#__PURE__*/function () {
45491
+ /**
45492
+ * Cannot be constructed.
45493
+ */
45494
+ function PositionLibrary() {} // replicates the portions of Position#update required to compute unaccounted fees
45495
+
45496
+
45497
+ PositionLibrary.getTokensOwed = function getTokensOwed(feeGrowthInside0LastX128, feeGrowthInside1LastX128, liquidity, feeGrowthInside0X128, feeGrowthInside1X128) {
45498
+ var tokensOwed0 = JSBI.divide(JSBI.multiply(subIn256(feeGrowthInside0X128, feeGrowthInside0LastX128), liquidity), Q128);
45499
+ var tokensOwed1 = JSBI.divide(JSBI.multiply(subIn256(feeGrowthInside1X128, feeGrowthInside1LastX128), liquidity), Q128);
45500
+ return [tokensOwed0, tokensOwed1];
45501
+ };
45502
+
45503
+ return PositionLibrary;
45504
+ }();
45505
+
45500
45506
  /**
45501
45507
  * Returns a price object corresponding to the input tick and the base/quote token
45502
45508
  * Inputs must be tokens because the address order is used to interpret the price represented by the tick
@@ -45535,6 +45541,51 @@ function priceToClosestTick(price) {
45535
45541
  return tick;
45536
45542
  }
45537
45543
 
45544
+ var Q256 = /*#__PURE__*/JSBI.exponentiate( /*#__PURE__*/JSBI.BigInt(2), /*#__PURE__*/JSBI.BigInt(256));
45545
+ function subIn256(x, y) {
45546
+ var difference = JSBI.subtract(x, y);
45547
+
45548
+ if (JSBI.lessThan(difference, ZERO)) {
45549
+ return JSBI.add(Q256, difference);
45550
+ } else {
45551
+ return difference;
45552
+ }
45553
+ }
45554
+ var TickLibrary = /*#__PURE__*/function () {
45555
+ /**
45556
+ * Cannot be constructed.
45557
+ */
45558
+ function TickLibrary() {}
45559
+
45560
+ TickLibrary.getFeeGrowthInside = function getFeeGrowthInside(feeGrowthOutsideLower, feeGrowthOutsideUpper, tickLower, tickUpper, tickCurrent, feeGrowthGlobal0X128, feeGrowthGlobal1X128) {
45561
+ var feeGrowthBelow0X128;
45562
+ var feeGrowthBelow1X128;
45563
+
45564
+ if (tickCurrent >= tickLower) {
45565
+ feeGrowthBelow0X128 = feeGrowthOutsideLower.feeGrowthOutside0X128;
45566
+ feeGrowthBelow1X128 = feeGrowthOutsideLower.feeGrowthOutside1X128;
45567
+ } else {
45568
+ feeGrowthBelow0X128 = subIn256(feeGrowthGlobal0X128, feeGrowthOutsideLower.feeGrowthOutside0X128);
45569
+ feeGrowthBelow1X128 = subIn256(feeGrowthGlobal1X128, feeGrowthOutsideLower.feeGrowthOutside1X128);
45570
+ }
45571
+
45572
+ var feeGrowthAbove0X128;
45573
+ var feeGrowthAbove1X128;
45574
+
45575
+ if (tickCurrent < tickUpper) {
45576
+ feeGrowthAbove0X128 = feeGrowthOutsideUpper.feeGrowthOutside0X128;
45577
+ feeGrowthAbove1X128 = feeGrowthOutsideUpper.feeGrowthOutside1X128;
45578
+ } else {
45579
+ feeGrowthAbove0X128 = subIn256(feeGrowthGlobal0X128, feeGrowthOutsideUpper.feeGrowthOutside0X128);
45580
+ feeGrowthAbove1X128 = subIn256(feeGrowthGlobal1X128, feeGrowthOutsideUpper.feeGrowthOutside1X128);
45581
+ }
45582
+
45583
+ return [subIn256(subIn256(feeGrowthGlobal0X128, feeGrowthBelow0X128), feeGrowthAbove0X128), subIn256(subIn256(feeGrowthGlobal1X128, feeGrowthBelow1X128), feeGrowthAbove1X128)];
45584
+ };
45585
+
45586
+ return TickLibrary;
45587
+ }();
45588
+
45538
45589
  var Tick = function Tick(_ref) {
45539
45590
  var index = _ref.index,
45540
45591
  liquidityGross = _ref.liquidityGross,
@@ -49118,5 +49169,5 @@ var tokenPercentage = function tokenPercentage(amount, totalSupply) {
49118
49169
 
49119
49170
  var abi = new AbiCoder();
49120
49171
 
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 };
49172
+ 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
49173
  //# sourceMappingURL=index.esm.js.map