@1inch/fusion-sdk 1.0.1-rc.15 → 1.0.1-rc.17
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/utils/amounts.d.ts
CHANGED
|
@@ -15,4 +15,4 @@ export declare function calcTakingAmount(swapMakerAmount: bigint, orderMakerAmou
|
|
|
15
15
|
* @return Floored maker amount
|
|
16
16
|
* @see https://github.com/1inch/limit-order-protocol/blob/23d655844191dea7960a186652307604a1ed480a/contracts/libraries/AmountCalculatorLib.sol#L6
|
|
17
17
|
*/
|
|
18
|
-
export declare function
|
|
18
|
+
export declare function calcMakingAmount(swapTakerAmount: bigint, orderMakerAmount: bigint, orderTakerAmount: bigint): bigint;
|
package/dist/utils/amounts.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.calcMakingAmount = exports.calcTakingAmount = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Calculates taker amount by linear proportion
|
|
6
6
|
* Note: use for minReturn only, because other amounts calculated based on auction curve
|
|
@@ -22,8 +22,8 @@ exports.calcTakingAmount = calcTakingAmount;
|
|
|
22
22
|
* @return Floored maker amount
|
|
23
23
|
* @see https://github.com/1inch/limit-order-protocol/blob/23d655844191dea7960a186652307604a1ed480a/contracts/libraries/AmountCalculatorLib.sol#L6
|
|
24
24
|
*/
|
|
25
|
-
function
|
|
25
|
+
function calcMakingAmount(swapTakerAmount, orderMakerAmount, orderTakerAmount) {
|
|
26
26
|
return (swapTakerAmount * orderMakerAmount) / orderTakerAmount;
|
|
27
27
|
}
|
|
28
|
-
exports.
|
|
28
|
+
exports.calcMakingAmount = calcMakingAmount;
|
|
29
29
|
//# sourceMappingURL=amounts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"amounts.js","sourceRoot":"","sources":["../../src/utils/amounts.ts"],"names":[],"mappings":";;;AAAA;;;;;;;GAOG;AACH,SAAgB,gBAAgB,CAC5B,eAAuB,EACvB,gBAAwB,EACxB,gBAAwB;IAExB,OAAO,CACH,CAAC,eAAe,GAAG,gBAAgB,GAAG,gBAAgB,GAAG,EAAE,CAAC;QAC5D,gBAAgB,CACnB,CAAA;AACL,CAAC;AATD,4CASC;AAED;;;;;;;GAOG;AACH,SAAgB,
|
|
1
|
+
{"version":3,"file":"amounts.js","sourceRoot":"","sources":["../../src/utils/amounts.ts"],"names":[],"mappings":";;;AAAA;;;;;;;GAOG;AACH,SAAgB,gBAAgB,CAC5B,eAAuB,EACvB,gBAAwB,EACxB,gBAAwB;IAExB,OAAO,CACH,CAAC,eAAe,GAAG,gBAAgB,GAAG,gBAAgB,GAAG,EAAE,CAAC;QAC5D,gBAAgB,CACnB,CAAA;AACL,CAAC;AATD,4CASC;AAED;;;;;;;GAOG;AACH,SAAgB,gBAAgB,CAC5B,eAAuB,EACvB,gBAAwB,EACxB,gBAAwB;IAExB,OAAO,CAAC,eAAe,GAAG,gBAAgB,CAAC,GAAG,gBAAgB,CAAA;AAClE,CAAC;AAND,4CAMC"}
|