@orbs-network/twap 1.8.7 → 1.9.0

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.
Files changed (31) hide show
  1. package/dist/artifacts/contracts/TWAP.sol/TWAP.json +138 -121
  2. package/dist/artifacts/contracts/periphery/Lens.sol/Lens.json +92 -77
  3. package/dist/artifacts/contracts/periphery/Taker.sol/Taker.json +2 -2
  4. package/dist/src/configs.d.ts +2 -2
  5. package/dist/src/configs.js +12 -5
  6. package/dist/src/lib.d.ts +4 -3
  7. package/dist/src/lib.js +17 -4
  8. package/dist/typechain-hardhat/contracts/IExchange.d.ts +2 -2
  9. package/dist/typechain-hardhat/contracts/TWAP.d.ts +21 -9
  10. package/dist/typechain-hardhat/contracts/exchange/PangolinDaasExchange.sol/IPangolinDaas.d.ts +35 -0
  11. package/dist/typechain-hardhat/contracts/exchange/{IParaswap.js → PangolinDaasExchange.sol/IPangolinDaas.js} +0 -0
  12. package/dist/typechain-hardhat/contracts/exchange/PangolinDaasExchange.sol/PangolinDaasExchange.d.ts +23 -0
  13. package/dist/typechain-hardhat/contracts/exchange/{IUniswapV2.js → PangolinDaasExchange.sol/PangolinDaasExchange.js} +0 -0
  14. package/dist/typechain-hardhat/contracts/exchange/PangolinDaasExchange.sol/index.d.ts +2 -0
  15. package/dist/typechain-hardhat/contracts/exchange/PangolinDaasExchange.sol/index.js +2 -0
  16. package/dist/typechain-hardhat/contracts/exchange/{IParaswap.d.ts → ParaswapExchange.sol/IParaswap.d.ts} +1 -1
  17. package/dist/typechain-hardhat/contracts/exchange/{ParaswapExchange.js → ParaswapExchange.sol/IParaswap.js} +0 -0
  18. package/dist/typechain-hardhat/contracts/exchange/{ParaswapExchange.d.ts → ParaswapExchange.sol/ParaswapExchange.d.ts} +3 -3
  19. package/dist/typechain-hardhat/contracts/exchange/{UniswapV2Exchange.js → ParaswapExchange.sol/ParaswapExchange.js} +0 -0
  20. package/dist/typechain-hardhat/contracts/exchange/ParaswapExchange.sol/index.d.ts +2 -0
  21. package/dist/typechain-hardhat/contracts/exchange/ParaswapExchange.sol/index.js +2 -0
  22. package/dist/typechain-hardhat/contracts/exchange/{IUniswapV2.d.ts → UniswapV2Exchange.sol/IUniswapV2.d.ts} +1 -1
  23. package/dist/typechain-hardhat/contracts/exchange/UniswapV2Exchange.sol/IUniswapV2.js +5 -0
  24. package/dist/typechain-hardhat/contracts/exchange/{UniswapV2Exchange.d.ts → UniswapV2Exchange.sol/UniswapV2Exchange.d.ts} +3 -3
  25. package/dist/typechain-hardhat/contracts/exchange/UniswapV2Exchange.sol/UniswapV2Exchange.js +5 -0
  26. package/dist/typechain-hardhat/contracts/exchange/UniswapV2Exchange.sol/index.d.ts +2 -0
  27. package/dist/typechain-hardhat/contracts/exchange/UniswapV2Exchange.sol/index.js +2 -0
  28. package/dist/typechain-hardhat/contracts/exchange/index.d.ts +6 -4
  29. package/dist/typechain-hardhat/contracts/periphery/Lens.d.ts +6 -3
  30. package/dist/typechain-hardhat/contracts/test/MockExchange.d.ts +2 -2
  31. package/package.json +1 -1
@@ -53,7 +53,6 @@ export type OrderCreated = ContractEventLog<{
53
53
  string,
54
54
  string,
55
55
  string,
56
- string,
57
56
  string
58
57
  ];
59
58
  0: string;
@@ -69,7 +68,6 @@ export type OrderCreated = ContractEventLog<{
69
68
  string,
70
69
  string,
71
70
  string,
72
- string,
73
71
  string
74
72
  ];
75
73
  }>;
@@ -98,17 +96,30 @@ export interface TWAP extends BaseContract {
98
96
  MIN_BID_DELAY_SECONDS(): NonPayableTransactionObject<string>;
99
97
  MIN_OUTBID_PERCENT(): NonPayableTransactionObject<string>;
100
98
  PERCENT_BASE(): NonPayableTransactionObject<string>;
101
- STALE_BID_DELAY_MUL(): NonPayableTransactionObject<string>;
99
+ STALE_BID_SECONDS(): NonPayableTransactionObject<string>;
102
100
  STATUS_CANCELED(): NonPayableTransactionObject<string>;
103
101
  STATUS_COMPLETED(): NonPayableTransactionObject<string>;
104
102
  VERSION(): NonPayableTransactionObject<string>;
105
- ask(exchange: string, srcToken: string, dstToken: string, srcAmount: number | string | BigNumber, srcBidAmount: number | string | BigNumber, dstMinAmount: number | string | BigNumber, deadline: number | string | BigNumber, bidDelay: number | string | BigNumber, fillDelay: number | string | BigNumber): NonPayableTransactionObject<string>;
103
+ ask(_ask: [
104
+ string,
105
+ string,
106
+ string,
107
+ number | string | BigNumber,
108
+ number | string | BigNumber,
109
+ number | string | BigNumber,
110
+ number | string | BigNumber,
111
+ number | string | BigNumber,
112
+ number | string | BigNumber,
113
+ string | number[]
114
+ ]): NonPayableTransactionObject<string>;
106
115
  bid(id: number | string | BigNumber, exchange: string, dstFee: number | string | BigNumber, slippagePercent: number | string | BigNumber, data: string | number[]): NonPayableTransactionObject<void>;
107
116
  book(arg0: number | string | BigNumber): NonPayableTransactionObject<{
108
117
  id: string;
109
118
  status: string;
119
+ time: string;
110
120
  filledTime: string;
111
121
  srcFilledAmount: string;
122
+ maker: string;
112
123
  ask: [
113
124
  string,
114
125
  string,
@@ -119,7 +130,6 @@ export interface TWAP extends BaseContract {
119
130
  string,
120
131
  string,
121
132
  string,
122
- string,
123
133
  string
124
134
  ];
125
135
  bid: [string, string, string, string, string, string];
@@ -127,8 +137,9 @@ export interface TWAP extends BaseContract {
127
137
  1: string;
128
138
  2: string;
129
139
  3: string;
130
- 4: [
131
- string,
140
+ 4: string;
141
+ 5: string;
142
+ 6: [
132
143
  string,
133
144
  string,
134
145
  string,
@@ -140,7 +151,7 @@ export interface TWAP extends BaseContract {
140
151
  string,
141
152
  string
142
153
  ];
143
- 5: [string, string, string, string, string, string];
154
+ 7: [string, string, string, string, string, string];
144
155
  }>;
145
156
  cancel(id: number | string | BigNumber): NonPayableTransactionObject<void>;
146
157
  fill(id: number | string | BigNumber): NonPayableTransactionObject<void>;
@@ -152,6 +163,8 @@ export interface TWAP extends BaseContract {
152
163
  string,
153
164
  string,
154
165
  string,
166
+ string,
167
+ string,
155
168
  [
156
169
  string,
157
170
  string,
@@ -162,7 +175,6 @@ export interface TWAP extends BaseContract {
162
175
  string,
163
176
  string,
164
177
  string,
165
- string,
166
178
  string
167
179
  ],
168
180
  [
@@ -0,0 +1,35 @@
1
+ /// <reference types="node" />
2
+ import type BigNumber from "bignumber.js";
3
+ import type { ContractOptions } from "web3-eth-contract";
4
+ import type { EventLog } from "web3-core";
5
+ import type { EventEmitter } from "events";
6
+ import type { Callback, NonPayableTransactionObject, BlockType, BaseContract } from "../../../types";
7
+ export interface EventOptions {
8
+ filter?: object;
9
+ fromBlock?: BlockType;
10
+ topics?: string[];
11
+ }
12
+ export interface IPangolinDaas extends BaseContract {
13
+ constructor(jsonInterface: any[], address?: string, options?: ContractOptions): IPangolinDaas;
14
+ clone(): IPangolinDaas;
15
+ methods: {
16
+ getAmountsOut(amountIn: number | string | BigNumber, path: string[]): NonPayableTransactionObject<string[]>;
17
+ getFeeInfo(feeTo: string): NonPayableTransactionObject<{
18
+ feePartner: string;
19
+ feeProtocol: string;
20
+ feeTotal: string;
21
+ feeCut: string;
22
+ initialized: boolean;
23
+ 0: string;
24
+ 1: string;
25
+ 2: string;
26
+ 3: string;
27
+ 4: boolean;
28
+ }>;
29
+ swapExactTokensForTokens(amountIn: number | string | BigNumber, amountOutMin: number | string | BigNumber, path: string[], to: string, deadline: number | string | BigNumber, feeTo: string): NonPayableTransactionObject<string[]>;
30
+ swapExactTokensForTokensSupportingFeeOnTransferTokens(amountIn: number | string | BigNumber, amountOutMin: number | string | BigNumber, path: string[], to: string, deadline: number | string | BigNumber, feeTo: string): NonPayableTransactionObject<void>;
31
+ };
32
+ events: {
33
+ allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
34
+ };
35
+ }
@@ -0,0 +1,23 @@
1
+ /// <reference types="node" />
2
+ import type BigNumber from "bignumber.js";
3
+ import type { ContractOptions } from "web3-eth-contract";
4
+ import type { EventLog } from "web3-core";
5
+ import type { EventEmitter } from "events";
6
+ import type { Callback, NonPayableTransactionObject, BlockType, BaseContract } from "../../../types";
7
+ export interface EventOptions {
8
+ filter?: object;
9
+ fromBlock?: BlockType;
10
+ topics?: string[];
11
+ }
12
+ export interface PangolinDaasExchange extends BaseContract {
13
+ constructor(jsonInterface: any[], address?: string, options?: ContractOptions): PangolinDaasExchange;
14
+ clone(): PangolinDaasExchange;
15
+ methods: {
16
+ getAmountOut(srcToken: string, dstToken: string, amountIn: number | string | BigNumber, askData: string | number[], bidData: string | number[]): NonPayableTransactionObject<string>;
17
+ pangolin(): NonPayableTransactionObject<string>;
18
+ swap(_srcToken: string, arg1: string, amountIn: number | string | BigNumber, amountOutMin: number | string | BigNumber, askData: string | number[], bidData: string | number[]): NonPayableTransactionObject<void>;
19
+ };
20
+ events: {
21
+ allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
22
+ };
23
+ }
@@ -0,0 +1,2 @@
1
+ export type { IPangolinDaas } from "./IPangolinDaas";
2
+ export type { PangolinDaasExchange } from "./PangolinDaasExchange";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -2,7 +2,7 @@
2
2
  import type { ContractOptions } from "web3-eth-contract";
3
3
  import type { EventLog } from "web3-core";
4
4
  import type { EventEmitter } from "events";
5
- import type { Callback, NonPayableTransactionObject, BlockType, BaseContract } from "../../types";
5
+ import type { Callback, NonPayableTransactionObject, BlockType, BaseContract } from "../../../types";
6
6
  export interface EventOptions {
7
7
  filter?: object;
8
8
  fromBlock?: BlockType;
@@ -3,7 +3,7 @@ import type BigNumber from "bignumber.js";
3
3
  import type { ContractOptions } from "web3-eth-contract";
4
4
  import type { EventLog } from "web3-core";
5
5
  import type { EventEmitter } from "events";
6
- import type { Callback, NonPayableTransactionObject, BlockType, BaseContract } from "../../types";
6
+ import type { Callback, NonPayableTransactionObject, BlockType, BaseContract } from "../../../types";
7
7
  export interface EventOptions {
8
8
  filter?: object;
9
9
  fromBlock?: BlockType;
@@ -13,9 +13,9 @@ export interface ParaswapExchange extends BaseContract {
13
13
  constructor(jsonInterface: any[], address?: string, options?: ContractOptions): ParaswapExchange;
14
14
  clone(): ParaswapExchange;
15
15
  methods: {
16
- getAmountOut(arg0: string, arg1: string, arg2: number | string | BigNumber, data: string | number[]): NonPayableTransactionObject<string>;
16
+ getAmountOut(arg0: string, arg1: string, arg2: number | string | BigNumber, arg3: string | number[], bidData: string | number[]): NonPayableTransactionObject<string>;
17
17
  paraswap(): NonPayableTransactionObject<string>;
18
- swap(_srcToken: string, _dstToken: string, amountIn: number | string | BigNumber, amountOutMin: number | string | BigNumber, data: string | number[]): NonPayableTransactionObject<void>;
18
+ swap(_srcToken: string, _dstToken: string, amountIn: number | string | BigNumber, amountOutMin: number | string | BigNumber, arg4: string | number[], bidData: string | number[]): NonPayableTransactionObject<void>;
19
19
  };
20
20
  events: {
21
21
  allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
@@ -0,0 +1,2 @@
1
+ export type { IParaswap } from "./IParaswap";
2
+ export type { ParaswapExchange } from "./ParaswapExchange";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -3,7 +3,7 @@ import type BigNumber from "bignumber.js";
3
3
  import type { ContractOptions } from "web3-eth-contract";
4
4
  import type { EventLog } from "web3-core";
5
5
  import type { EventEmitter } from "events";
6
- import type { Callback, NonPayableTransactionObject, BlockType, BaseContract } from "../../types";
6
+ import type { Callback, NonPayableTransactionObject, BlockType, BaseContract } from "../../../types";
7
7
  export interface EventOptions {
8
8
  filter?: object;
9
9
  fromBlock?: BlockType;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /* Autogenerated file. Do not edit manually. */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -3,7 +3,7 @@ import type BigNumber from "bignumber.js";
3
3
  import type { ContractOptions } from "web3-eth-contract";
4
4
  import type { EventLog } from "web3-core";
5
5
  import type { EventEmitter } from "events";
6
- import type { Callback, NonPayableTransactionObject, BlockType, BaseContract } from "../../types";
6
+ import type { Callback, NonPayableTransactionObject, BlockType, BaseContract } from "../../../types";
7
7
  export interface EventOptions {
8
8
  filter?: object;
9
9
  fromBlock?: BlockType;
@@ -13,8 +13,8 @@ export interface UniswapV2Exchange extends BaseContract {
13
13
  constructor(jsonInterface: any[], address?: string, options?: ContractOptions): UniswapV2Exchange;
14
14
  clone(): UniswapV2Exchange;
15
15
  methods: {
16
- getAmountOut(srcToken: string, dstToken: string, amountIn: number | string | BigNumber, data: string | number[]): NonPayableTransactionObject<string>;
17
- swap(_srcToken: string, arg1: string, amountIn: number | string | BigNumber, amountOutMin: number | string | BigNumber, data: string | number[]): NonPayableTransactionObject<void>;
16
+ getAmountOut(srcToken: string, dstToken: string, amountIn: number | string | BigNumber, arg3: string | number[], bidData: string | number[]): NonPayableTransactionObject<string>;
17
+ swap(_srcToken: string, arg1: string, amountIn: number | string | BigNumber, amountOutMin: number | string | BigNumber, arg4: string | number[], bidData: string | number[]): NonPayableTransactionObject<void>;
18
18
  uniswap(): NonPayableTransactionObject<string>;
19
19
  };
20
20
  events: {
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ /* Autogenerated file. Do not edit manually. */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export type { IUniswapV2 } from "./IUniswapV2";
2
+ export type { UniswapV2Exchange } from "./UniswapV2Exchange";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,6 @@
1
- export type { IParaswap } from "./IParaswap";
2
- export type { IUniswapV2 } from "./IUniswapV2";
3
- export type { ParaswapExchange } from "./ParaswapExchange";
4
- export type { UniswapV2Exchange } from "./UniswapV2Exchange";
1
+ import type * as pangolinDaasExchangeSol from "./PangolinDaasExchange.sol";
2
+ export type { pangolinDaasExchangeSol };
3
+ import type * as paraswapExchangeSol from "./ParaswapExchange.sol";
4
+ export type { paraswapExchangeSol };
5
+ import type * as uniswapV2ExchangeSol from "./UniswapV2Exchange.sol";
6
+ export type { uniswapV2ExchangeSol };
@@ -19,6 +19,8 @@ export interface Lens extends BaseContract {
19
19
  string,
20
20
  string,
21
21
  string,
22
+ string,
23
+ string,
22
24
  [
23
25
  string,
24
26
  string,
@@ -29,7 +31,6 @@ export interface Lens extends BaseContract {
29
31
  string,
30
32
  string,
31
33
  string,
32
- string,
33
34
  string
34
35
  ],
35
36
  [
@@ -46,6 +47,8 @@ export interface Lens extends BaseContract {
46
47
  string,
47
48
  string,
48
49
  string,
50
+ string,
51
+ string,
49
52
  [
50
53
  string,
51
54
  string,
@@ -56,7 +59,6 @@ export interface Lens extends BaseContract {
56
59
  string,
57
60
  string,
58
61
  string,
59
- string,
60
62
  string
61
63
  ],
62
64
  [
@@ -73,6 +75,8 @@ export interface Lens extends BaseContract {
73
75
  string,
74
76
  string,
75
77
  string,
78
+ string,
79
+ string,
76
80
  [
77
81
  string,
78
82
  string,
@@ -83,7 +87,6 @@ export interface Lens extends BaseContract {
83
87
  string,
84
88
  string,
85
89
  string,
86
- string,
87
90
  string
88
91
  ],
89
92
  [
@@ -14,9 +14,9 @@ export interface MockExchange extends BaseContract {
14
14
  clone(): MockExchange;
15
15
  methods: {
16
16
  amounts(arg0: number | string | BigNumber): NonPayableTransactionObject<string>;
17
- getAmountOut(arg0: string, arg1: string, arg2: number | string | BigNumber, arg3: string | number[]): NonPayableTransactionObject<string>;
17
+ getAmountOut(arg0: string, arg1: string, arg2: number | string | BigNumber, arg3: string | number[], arg4: string | number[]): NonPayableTransactionObject<string>;
18
18
  setMockAmounts(_amounts: (number | string | BigNumber)[]): NonPayableTransactionObject<void>;
19
- swap(_srcToken: string, _dstToken: string, amountIn: number | string | BigNumber, arg3: number | string | BigNumber, arg4: string | number[]): NonPayableTransactionObject<void>;
19
+ swap(_srcToken: string, _dstToken: string, amountIn: number | string | BigNumber, arg3: number | string | BigNumber, arg4: string | number[], arg5: string | number[]): NonPayableTransactionObject<void>;
20
20
  };
21
21
  events: {
22
22
  allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orbs-network/twap",
3
- "version": "1.8.7",
3
+ "version": "1.9.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/orbs-network/twap.git"