@ethereansos/interfaces-core 0.4.86 → 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.cjs.js +104 -47
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +101 -48
- 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
|
|
@@ -32263,18 +32251,20 @@ function sendBlockchainTransaction(provider, fromOrPlainPrivateKey, to, data, va
|
|
32263
32251
|
return sendAsync(provider, 'eth_estimateGas', tx);
|
32264
32252
|
|
32265
32253
|
case 65:
|
32254
|
+
tx.gas = tx.gasLimit;
|
32255
|
+
|
32266
32256
|
if (!privateKey) {
|
32267
|
-
_context2.next =
|
32257
|
+
_context2.next = 81;
|
32268
32258
|
break;
|
32269
32259
|
}
|
32270
32260
|
|
32271
32261
|
_context2.t23 = global.EthereumJSTransaction.Transaction;
|
32272
32262
|
_context2.t24 = tx;
|
32273
32263
|
_context2.t25 = parseInt;
|
32274
|
-
_context2.next =
|
32264
|
+
_context2.next = 72;
|
32275
32265
|
return sendAsync(provider, 'eth_chainId');
|
32276
32266
|
|
32277
|
-
case
|
32267
|
+
case 72:
|
32278
32268
|
_context2.t26 = _context2.sent;
|
32279
32269
|
_context2.t27 = (0, _context2.t25)(_context2.t26);
|
32280
32270
|
_context2.t28 = {
|
@@ -32284,17 +32274,17 @@ function sendBlockchainTransaction(provider, fromOrPlainPrivateKey, to, data, va
|
|
32284
32274
|
transaction.sign(privateKey);
|
32285
32275
|
serializedTx = '0x' + transaction.serialize().toString('hex');
|
32286
32276
|
sendTransaction = sendAsync(provider, 'eth_sendRawTransaction', serializedTx);
|
32287
|
-
_context2.next =
|
32277
|
+
_context2.next = 82;
|
32288
32278
|
break;
|
32289
32279
|
|
32290
|
-
case
|
32280
|
+
case 81:
|
32291
32281
|
sendTransaction = sendAsync(provider, 'eth_sendTransaction', tx);
|
32292
32282
|
|
32293
|
-
case
|
32294
|
-
_context2.next =
|
32283
|
+
case 82:
|
32284
|
+
_context2.next = 84;
|
32295
32285
|
return sendTransaction;
|
32296
32286
|
|
32297
|
-
case
|
32287
|
+
case 84:
|
32298
32288
|
transactionHash = _context2.sent;
|
32299
32289
|
console.log(new Date().toUTCString(), 'Transaction!', getEtherscanAddress('tx/' + transactionHash, tx.chainId));
|
32300
32290
|
|
@@ -32352,20 +32342,20 @@ function sendBlockchainTransaction(provider, fromOrPlainPrivateKey, to, data, va
|
|
32352
32342
|
}();
|
32353
32343
|
|
32354
32344
|
setTimeout(timeout);
|
32355
|
-
_context2.next =
|
32345
|
+
_context2.next = 93;
|
32356
32346
|
break;
|
32357
32347
|
|
32358
|
-
case
|
32359
|
-
_context2.prev =
|
32348
|
+
case 90:
|
32349
|
+
_context2.prev = 90;
|
32360
32350
|
_context2.t29 = _context2["catch"](0);
|
32361
32351
|
return _context2.abrupt("return", ko(_context2.t29));
|
32362
32352
|
|
32363
|
-
case
|
32353
|
+
case 93:
|
32364
32354
|
case "end":
|
32365
32355
|
return _context2.stop();
|
32366
32356
|
}
|
32367
32357
|
}
|
32368
|
-
}, _callee2, null, [[0,
|
32358
|
+
}, _callee2, null, [[0, 90], [25, 32]]);
|
32369
32359
|
}));
|
32370
32360
|
|
32371
32361
|
return function (_x, _x2) {
|
@@ -44760,6 +44750,7 @@ var POOL_INIT_CODE_HASH = '0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea8932
|
|
44760
44750
|
var FeeAmount;
|
44761
44751
|
|
44762
44752
|
(function (FeeAmount) {
|
44753
|
+
FeeAmount[FeeAmount["LOWEST"] = 100] = "LOWEST";
|
44763
44754
|
FeeAmount[FeeAmount["LOW"] = 500] = "LOW";
|
44764
44755
|
FeeAmount[FeeAmount["MEDIUM"] = 3000] = "MEDIUM";
|
44765
44756
|
FeeAmount[FeeAmount["HIGH"] = 10000] = "HIGH";
|
@@ -44769,7 +44760,7 @@ var FeeAmount;
|
|
44769
44760
|
*/
|
44770
44761
|
|
44771
44762
|
|
44772
|
-
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);
|
44773
44764
|
|
44774
44765
|
var NEGATIVE_ONE = /*#__PURE__*/JSBI.BigInt(-1);
|
44775
44766
|
var ZERO = /*#__PURE__*/JSBI.BigInt(0);
|
@@ -45300,7 +45291,7 @@ var TickList = /*#__PURE__*/function () {
|
|
45300
45291
|
} else {
|
45301
45292
|
var _wordPos = compressed + 1 >> 8;
|
45302
45293
|
|
45303
|
-
var maximum = (_wordPos + 1 << 8) * tickSpacing
|
45294
|
+
var maximum = ((_wordPos + 1 << 8) - 1) * tickSpacing;
|
45304
45295
|
|
45305
45296
|
if (this.isAtOrAboveLargest(ticks, tick)) {
|
45306
45297
|
return [maximum, false];
|
@@ -45495,6 +45486,23 @@ function nearestUsableTick(tick, tickSpacing) {
|
|
45495
45486
|
if (rounded < TickMath.MIN_TICK) return rounded + tickSpacing;else if (rounded > TickMath.MAX_TICK) return rounded - tickSpacing;else return rounded;
|
45496
45487
|
}
|
45497
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
|
+
|
45498
45506
|
/**
|
45499
45507
|
* Returns a price object corresponding to the input tick and the base/quote token
|
45500
45508
|
* Inputs must be tokens because the address order is used to interpret the price represented by the tick
|
@@ -45533,6 +45541,51 @@ function priceToClosestTick(price) {
|
|
45533
45541
|
return tick;
|
45534
45542
|
}
|
45535
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
|
+
|
45536
45589
|
var Tick = function Tick(_ref) {
|
45537
45590
|
var index = _ref.index,
|
45538
45591
|
liquidityGross = _ref.liquidityGross,
|
@@ -49116,5 +49169,5 @@ var tokenPercentage = function tokenPercentage(amount, totalSupply) {
|
|
49116
49169
|
|
49117
49170
|
var abi = new AbiCoder();
|
49118
49171
|
|
49119
|
-
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 };
|
49120
49173
|
//# sourceMappingURL=index.esm.js.map
|