@velora-dex/sdk 9.5.1 → 9.5.2
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/methods/delta/deltaTokenModule.d.ts +0 -1
- package/dist/methods/delta/deltaTokenModule.d.ts.map +1 -1
- package/dist/sdk.cjs.development.js +70 -107
- package/dist/sdk.cjs.development.js.map +1 -1
- package/dist/sdk.cjs.production.min.js +1 -1
- package/dist/sdk.cjs.production.min.js.map +1 -1
- package/dist/sdk.esm.js +70 -107
- package/dist/sdk.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/methods/delta/deltaTokenModule.ts +80 -128
package/dist/sdk.esm.js
CHANGED
|
@@ -5626,112 +5626,86 @@ var DeltaTokenModuleAbi = [{
|
|
|
5626
5626
|
type: 'function',
|
|
5627
5627
|
name: 'cancelAndWithdraw',
|
|
5628
5628
|
inputs: [{
|
|
5629
|
-
name: '
|
|
5629
|
+
name: 'order',
|
|
5630
5630
|
type: 'tuple',
|
|
5631
|
-
internalType: 'struct
|
|
5631
|
+
internalType: 'struct Order',
|
|
5632
5632
|
components: [{
|
|
5633
|
-
name: '
|
|
5634
|
-
type: '
|
|
5635
|
-
internalType: '
|
|
5636
|
-
|
|
5637
|
-
|
|
5638
|
-
|
|
5639
|
-
|
|
5640
|
-
}, {
|
|
5641
|
-
name: 'beneficiary',
|
|
5642
|
-
type: 'address',
|
|
5643
|
-
internalType: 'address'
|
|
5644
|
-
}, {
|
|
5645
|
-
name: 'srcToken',
|
|
5646
|
-
type: 'address',
|
|
5647
|
-
internalType: 'address'
|
|
5648
|
-
}, {
|
|
5649
|
-
name: 'destToken',
|
|
5650
|
-
type: 'address',
|
|
5651
|
-
internalType: 'address'
|
|
5652
|
-
}, {
|
|
5653
|
-
name: 'srcAmount',
|
|
5654
|
-
type: 'uint256',
|
|
5655
|
-
internalType: 'uint256'
|
|
5656
|
-
}, {
|
|
5657
|
-
name: 'destAmount',
|
|
5658
|
-
type: 'uint256',
|
|
5659
|
-
internalType: 'uint256'
|
|
5660
|
-
}, {
|
|
5661
|
-
name: 'expectedAmount',
|
|
5662
|
-
type: 'uint256',
|
|
5663
|
-
internalType: 'uint256'
|
|
5664
|
-
}, {
|
|
5665
|
-
name: 'deadline',
|
|
5666
|
-
type: 'uint256',
|
|
5667
|
-
internalType: 'uint256'
|
|
5668
|
-
}, {
|
|
5669
|
-
name: 'kind',
|
|
5670
|
-
type: 'uint8',
|
|
5671
|
-
internalType: 'enum OrderKind'
|
|
5672
|
-
}, {
|
|
5673
|
-
name: 'nonce',
|
|
5674
|
-
type: 'uint256',
|
|
5675
|
-
internalType: 'uint256'
|
|
5676
|
-
}, {
|
|
5677
|
-
name: 'partnerAndFee',
|
|
5678
|
-
type: 'uint256',
|
|
5679
|
-
internalType: 'uint256'
|
|
5680
|
-
}, {
|
|
5681
|
-
name: 'permit',
|
|
5682
|
-
type: 'bytes',
|
|
5683
|
-
internalType: 'bytes'
|
|
5684
|
-
}, {
|
|
5685
|
-
name: 'metadata',
|
|
5686
|
-
type: 'bytes',
|
|
5687
|
-
internalType: 'bytes'
|
|
5688
|
-
}, {
|
|
5689
|
-
name: 'bridge',
|
|
5690
|
-
type: 'tuple',
|
|
5691
|
-
internalType: 'struct Bridge',
|
|
5692
|
-
components: [{
|
|
5693
|
-
name: 'protocolSelector',
|
|
5694
|
-
type: 'bytes4',
|
|
5695
|
-
internalType: 'bytes4'
|
|
5696
|
-
}, {
|
|
5697
|
-
name: 'destinationChainId',
|
|
5698
|
-
type: 'uint256',
|
|
5699
|
-
internalType: 'uint256'
|
|
5700
|
-
}, {
|
|
5701
|
-
name: 'outputToken',
|
|
5702
|
-
type: 'address',
|
|
5703
|
-
internalType: 'address'
|
|
5704
|
-
}, {
|
|
5705
|
-
name: 'scalingFactor',
|
|
5706
|
-
type: 'int8',
|
|
5707
|
-
internalType: 'int8'
|
|
5708
|
-
}, {
|
|
5709
|
-
name: 'protocolData',
|
|
5710
|
-
type: 'bytes',
|
|
5711
|
-
internalType: 'bytes'
|
|
5712
|
-
}]
|
|
5713
|
-
}]
|
|
5633
|
+
name: 'owner',
|
|
5634
|
+
type: 'address',
|
|
5635
|
+
internalType: 'address'
|
|
5636
|
+
}, {
|
|
5637
|
+
name: 'beneficiary',
|
|
5638
|
+
type: 'address',
|
|
5639
|
+
internalType: 'address'
|
|
5714
5640
|
}, {
|
|
5715
|
-
name: '
|
|
5641
|
+
name: 'srcToken',
|
|
5642
|
+
type: 'address',
|
|
5643
|
+
internalType: 'address'
|
|
5644
|
+
}, {
|
|
5645
|
+
name: 'destToken',
|
|
5646
|
+
type: 'address',
|
|
5647
|
+
internalType: 'address'
|
|
5648
|
+
}, {
|
|
5649
|
+
name: 'srcAmount',
|
|
5650
|
+
type: 'uint256',
|
|
5651
|
+
internalType: 'uint256'
|
|
5652
|
+
}, {
|
|
5653
|
+
name: 'destAmount',
|
|
5654
|
+
type: 'uint256',
|
|
5655
|
+
internalType: 'uint256'
|
|
5656
|
+
}, {
|
|
5657
|
+
name: 'expectedAmount',
|
|
5658
|
+
type: 'uint256',
|
|
5659
|
+
internalType: 'uint256'
|
|
5660
|
+
}, {
|
|
5661
|
+
name: 'deadline',
|
|
5662
|
+
type: 'uint256',
|
|
5663
|
+
internalType: 'uint256'
|
|
5664
|
+
}, {
|
|
5665
|
+
name: 'kind',
|
|
5666
|
+
type: 'uint8',
|
|
5667
|
+
internalType: 'enum OrderKind'
|
|
5668
|
+
}, {
|
|
5669
|
+
name: 'nonce',
|
|
5670
|
+
type: 'uint256',
|
|
5671
|
+
internalType: 'uint256'
|
|
5672
|
+
}, {
|
|
5673
|
+
name: 'partnerAndFee',
|
|
5674
|
+
type: 'uint256',
|
|
5675
|
+
internalType: 'uint256'
|
|
5676
|
+
}, {
|
|
5677
|
+
name: 'permit',
|
|
5678
|
+
type: 'bytes',
|
|
5679
|
+
internalType: 'bytes'
|
|
5680
|
+
}, {
|
|
5681
|
+
name: 'metadata',
|
|
5716
5682
|
type: 'bytes',
|
|
5717
5683
|
internalType: 'bytes'
|
|
5718
5684
|
}, {
|
|
5719
|
-
name: '
|
|
5685
|
+
name: 'bridge',
|
|
5720
5686
|
type: 'tuple',
|
|
5721
|
-
internalType: 'struct
|
|
5687
|
+
internalType: 'struct Bridge',
|
|
5722
5688
|
components: [{
|
|
5723
5689
|
name: 'protocolSelector',
|
|
5724
5690
|
type: 'bytes4',
|
|
5725
5691
|
internalType: 'bytes4'
|
|
5692
|
+
}, {
|
|
5693
|
+
name: 'destinationChainId',
|
|
5694
|
+
type: 'uint256',
|
|
5695
|
+
internalType: 'uint256'
|
|
5696
|
+
}, {
|
|
5697
|
+
name: 'outputToken',
|
|
5698
|
+
type: 'address',
|
|
5699
|
+
internalType: 'address'
|
|
5700
|
+
}, {
|
|
5701
|
+
name: 'scalingFactor',
|
|
5702
|
+
type: 'int8',
|
|
5703
|
+
internalType: 'int8'
|
|
5726
5704
|
}, {
|
|
5727
5705
|
name: 'protocolData',
|
|
5728
5706
|
type: 'bytes',
|
|
5729
5707
|
internalType: 'bytes'
|
|
5730
5708
|
}]
|
|
5731
|
-
}, {
|
|
5732
|
-
name: 'cosignature',
|
|
5733
|
-
type: 'bytes',
|
|
5734
|
-
internalType: 'bytes'
|
|
5735
5709
|
}]
|
|
5736
5710
|
}, {
|
|
5737
5711
|
name: 'isFillable',
|
|
@@ -5945,11 +5919,11 @@ var constructDeltaTokenModule = function constructDeltaTokenModule(options) {
|
|
|
5945
5919
|
getDeltaContract = _constructGetDeltaCon.getDeltaContract;
|
|
5946
5920
|
var cancelAndWithdrawDeltaOrder = /*#__PURE__*/function () {
|
|
5947
5921
|
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref, overrides, requestParams) {
|
|
5948
|
-
var order,
|
|
5922
|
+
var order, _ref$isFillable, isFillable, ParaswapDelta, res;
|
|
5949
5923
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
5950
5924
|
while (1) switch (_context.prev = _context.next) {
|
|
5951
5925
|
case 0:
|
|
5952
|
-
order = _ref.order,
|
|
5926
|
+
order = _ref.order, _ref$isFillable = _ref.isFillable, isFillable = _ref$isFillable === void 0 ? false : _ref$isFillable;
|
|
5953
5927
|
if (overrides === void 0) {
|
|
5954
5928
|
overrides = {};
|
|
5955
5929
|
}
|
|
@@ -5963,29 +5937,18 @@ var constructDeltaTokenModule = function constructDeltaTokenModule(options) {
|
|
|
5963
5937
|
}
|
|
5964
5938
|
throw new Error("Delta is not available on chain " + options.chainId);
|
|
5965
5939
|
case 7:
|
|
5966
|
-
|
|
5967
|
-
order: sanitizeDeltaOrderData(order),
|
|
5968
|
-
signature: signature,
|
|
5969
|
-
// bridgeOverride and cosignature are not used by the contract,
|
|
5970
|
-
// can always provide defaults
|
|
5971
|
-
bridgeOverride: {
|
|
5972
|
-
protocolData: DEFAULT_BRIDGE.protocolData,
|
|
5973
|
-
protocolSelector: DEFAULT_BRIDGE.protocolSelector
|
|
5974
|
-
},
|
|
5975
|
-
cosignature: '0x'
|
|
5976
|
-
};
|
|
5977
|
-
_context.next = 10;
|
|
5940
|
+
_context.next = 9;
|
|
5978
5941
|
return options.contractCaller.transactCall({
|
|
5979
5942
|
address: ParaswapDelta,
|
|
5980
5943
|
abi: DeltaTokenModuleAbi,
|
|
5981
5944
|
contractMethod: 'cancelAndWithdraw',
|
|
5982
|
-
args: [
|
|
5945
|
+
args: [sanitizeDeltaOrderData(order), isFillable],
|
|
5983
5946
|
overrides: overrides
|
|
5984
5947
|
});
|
|
5985
|
-
case
|
|
5948
|
+
case 9:
|
|
5986
5949
|
res = _context.sent;
|
|
5987
5950
|
return _context.abrupt("return", res);
|
|
5988
|
-
case
|
|
5951
|
+
case 11:
|
|
5989
5952
|
case "end":
|
|
5990
5953
|
return _context.stop();
|
|
5991
5954
|
}
|