@orbs-network/twap 1.13.7 → 1.14.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.
@@ -749,26 +749,6 @@ export declare const ChainConfigs: {
749
749
  };
750
750
  };
751
751
  ftm: {
752
- chainName: string;
753
- chainId: number;
754
- twapVersion: number;
755
- twapAddress: string;
756
- lensAddress: string;
757
- bidDelaySeconds: number;
758
- minChunkSizeUsd: number;
759
- nativeToken: {
760
- address: string;
761
- symbol: string;
762
- decimals: number;
763
- logoUrl: string;
764
- };
765
- wToken: {
766
- symbol: string;
767
- address: string;
768
- decimals: number;
769
- weth: boolean;
770
- logoUrl: string;
771
- };
772
752
  twapAbi: ({
773
753
  inputs: {
774
754
  internalType: string;
@@ -803,6 +783,26 @@ export declare const ChainConfigs: {
803
783
  type: string;
804
784
  stateMutability?: undefined;
805
785
  outputs?: undefined;
786
+ } | {
787
+ inputs: {
788
+ components: {
789
+ internalType: string;
790
+ name: string;
791
+ type: string;
792
+ }[];
793
+ internalType: string;
794
+ name: string;
795
+ type: string;
796
+ }[];
797
+ name: string;
798
+ outputs: {
799
+ internalType: string;
800
+ name: string;
801
+ type: string;
802
+ }[];
803
+ stateMutability: string;
804
+ type: string;
805
+ anonymous?: undefined;
806
806
  } | {
807
807
  inputs: {
808
808
  internalType: string;
@@ -924,8 +924,21 @@ export declare const ChainConfigs: {
924
924
  }[];
925
925
  stateMutability: string;
926
926
  type: string;
927
+ anonymous?: undefined;
927
928
  name?: undefined;
928
929
  outputs?: undefined;
930
+ } | {
931
+ anonymous: boolean;
932
+ inputs: {
933
+ indexed: boolean;
934
+ internalType: string;
935
+ name: string;
936
+ type: string;
937
+ }[];
938
+ name: string;
939
+ type: string;
940
+ stateMutability?: undefined;
941
+ outputs?: undefined;
929
942
  } | {
930
943
  inputs: {
931
944
  internalType: string;
@@ -940,13 +953,35 @@ export declare const ChainConfigs: {
940
953
  }[];
941
954
  stateMutability: string;
942
955
  type: string;
956
+ anonymous?: undefined;
943
957
  } | {
944
958
  stateMutability: string;
945
959
  type: string;
946
960
  inputs?: undefined;
961
+ anonymous?: undefined;
947
962
  name?: undefined;
948
963
  outputs?: undefined;
949
964
  })[];
965
+ chainName: string;
966
+ chainId: number;
967
+ twapVersion: number;
968
+ twapAddress: string;
969
+ lensAddress: string;
970
+ bidDelaySeconds: number;
971
+ minChunkSizeUsd: number;
972
+ nativeToken: {
973
+ address: string;
974
+ symbol: string;
975
+ decimals: number;
976
+ logoUrl: string;
977
+ };
978
+ wToken: {
979
+ symbol: string;
980
+ address: string;
981
+ decimals: number;
982
+ weth: boolean;
983
+ logoUrl: string;
984
+ };
950
985
  };
951
986
  poly: {
952
987
  twapAbi: ({
@@ -2132,26 +2167,6 @@ export declare const chainConfig: (chainId: number) => {
2132
2167
  logoUrl: string;
2133
2168
  };
2134
2169
  } | {
2135
- chainName: string;
2136
- chainId: number;
2137
- twapVersion: number;
2138
- twapAddress: string;
2139
- lensAddress: string;
2140
- bidDelaySeconds: number;
2141
- minChunkSizeUsd: number;
2142
- nativeToken: {
2143
- address: string;
2144
- symbol: string;
2145
- decimals: number;
2146
- logoUrl: string;
2147
- };
2148
- wToken: {
2149
- symbol: string;
2150
- address: string;
2151
- decimals: number;
2152
- weth: boolean;
2153
- logoUrl: string;
2154
- };
2155
2170
  twapAbi: ({
2156
2171
  inputs: {
2157
2172
  internalType: string;
@@ -2186,6 +2201,26 @@ export declare const chainConfig: (chainId: number) => {
2186
2201
  type: string;
2187
2202
  stateMutability?: undefined;
2188
2203
  outputs?: undefined;
2204
+ } | {
2205
+ inputs: {
2206
+ components: {
2207
+ internalType: string;
2208
+ name: string;
2209
+ type: string;
2210
+ }[];
2211
+ internalType: string;
2212
+ name: string;
2213
+ type: string;
2214
+ }[];
2215
+ name: string;
2216
+ outputs: {
2217
+ internalType: string;
2218
+ name: string;
2219
+ type: string;
2220
+ }[];
2221
+ stateMutability: string;
2222
+ type: string;
2223
+ anonymous?: undefined;
2189
2224
  } | {
2190
2225
  inputs: {
2191
2226
  internalType: string;
@@ -2307,8 +2342,21 @@ export declare const chainConfig: (chainId: number) => {
2307
2342
  }[];
2308
2343
  stateMutability: string;
2309
2344
  type: string;
2345
+ anonymous?: undefined;
2310
2346
  name?: undefined;
2311
2347
  outputs?: undefined;
2348
+ } | {
2349
+ anonymous: boolean;
2350
+ inputs: {
2351
+ indexed: boolean;
2352
+ internalType: string;
2353
+ name: string;
2354
+ type: string;
2355
+ }[];
2356
+ name: string;
2357
+ type: string;
2358
+ stateMutability?: undefined;
2359
+ outputs?: undefined;
2312
2360
  } | {
2313
2361
  inputs: {
2314
2362
  internalType: string;
@@ -2323,13 +2371,35 @@ export declare const chainConfig: (chainId: number) => {
2323
2371
  }[];
2324
2372
  stateMutability: string;
2325
2373
  type: string;
2374
+ anonymous?: undefined;
2326
2375
  } | {
2327
2376
  stateMutability: string;
2328
2377
  type: string;
2329
2378
  inputs?: undefined;
2379
+ anonymous?: undefined;
2330
2380
  name?: undefined;
2331
2381
  outputs?: undefined;
2332
2382
  })[];
2383
+ chainName: string;
2384
+ chainId: number;
2385
+ twapVersion: number;
2386
+ twapAddress: string;
2387
+ lensAddress: string;
2388
+ bidDelaySeconds: number;
2389
+ minChunkSizeUsd: number;
2390
+ nativeToken: {
2391
+ address: string;
2392
+ symbol: string;
2393
+ decimals: number;
2394
+ logoUrl: string;
2395
+ };
2396
+ wToken: {
2397
+ symbol: string;
2398
+ address: string;
2399
+ decimals: number;
2400
+ weth: boolean;
2401
+ logoUrl: string;
2402
+ };
2333
2403
  } | {
2334
2404
  twapAbi: ({
2335
2405
  inputs: {
@@ -9,7 +9,6 @@ const lodash_1 = __importDefault(require("lodash"));
9
9
  const TWAP_json_1 = __importDefault(require("../artifacts/contracts/TWAP.sol/TWAP.json"));
10
10
  const Lens_json_1 = __importDefault(require("../artifacts/contracts/periphery/Lens.sol/Lens.json"));
11
11
  const Taker_json_1 = __importDefault(require("../artifacts/contracts/periphery/Taker.sol/Taker.json"));
12
- const legacy_abi_1 = require("./legacy-abi");
13
12
  var web3_candies_2 = require("@defi.org/web3-candies");
14
13
  Object.defineProperty(exports, "nativeTokenAddresses", { enumerable: true, get: function () { return web3_candies_2.nativeTokenAddresses; } });
15
14
  Object.defineProperty(exports, "zeroAddress", { enumerable: true, get: function () { return web3_candies_2.zeroAddress; } });
@@ -43,31 +42,18 @@ exports.ChainConfigs = {
43
42
  eth: Object.assign({ chainName: "eth", chainId: 1, twapVersion: 0, twapAddress: "", lensAddress: "", bidDelaySeconds: 60, minChunkSizeUsd: 100, nativeToken: web3_candies_1.networks.eth.native, wToken: web3_candies_1.networks.eth.wToken }, defaultAbis),
44
43
  bsc: Object.assign({ chainName: "bsc", chainId: 56, twapVersion: 4, twapAddress: "0x25a0A78f5ad07b2474D3D42F1c1432178465936d", lensAddress: "0x3b7C090857a4068e16396550423ebadae502768F", bidDelaySeconds: 60, minChunkSizeUsd: 10, nativeToken: web3_candies_1.networks.bsc.native, wToken: web3_candies_1.networks.bsc.wToken }, defaultAbis),
45
44
  arb: Object.assign({ chainName: "arb", chainId: 42161, twapVersion: 4, twapAddress: "0xD63430c74C8E70D9dbdCA04C6a9E6E9E929028DA", lensAddress: "0xD13609A8ace04D11Ea2FFE176B69dF77C6d9375E", bidDelaySeconds: 60, minChunkSizeUsd: 10, nativeToken: web3_candies_1.networks.arb.native, wToken: web3_candies_1.networks.arb.wToken }, defaultAbis),
46
- ftm: {
47
- chainName: "ftm",
48
- chainId: 250,
49
- twapVersion: 3,
50
- twapAddress: "0xBb9F828E34A1327607c3e4eA3dD35891398DD5EE",
51
- lensAddress: "0x042799657E971855eD619046aeDf7F30DB56d2D6",
52
- bidDelaySeconds: 60,
53
- minChunkSizeUsd: 10,
54
- nativeToken: web3_candies_1.networks.ftm.native,
55
- wToken: web3_candies_1.networks.ftm.wToken,
56
- twapAbi: legacy_abi_1.twapAbiV3,
57
- lensAbi: legacy_abi_1.lensAbiV3,
58
- takerAbi: legacy_abi_1.takerAbiV3,
59
- },
45
+ ftm: Object.assign({ chainName: "ftm", chainId: 250, twapVersion: 4, twapAddress: "0xdb55107c17Cb433D322052BFA36069fDf7Cb1031", lensAddress: "0x6E78fA5d48aedF302e48ef3fbD97FD11b4e98d8B", bidDelaySeconds: 60, minChunkSizeUsd: 10, nativeToken: web3_candies_1.networks.ftm.native, wToken: web3_candies_1.networks.ftm.wToken }, defaultAbis),
60
46
  poly: Object.assign({ chainName: "poly", chainId: 137, twapVersion: 4, twapAddress: "0xceFf098C9199c5d9cf24078dc14Eb8F787631cC0", lensAddress: "0x8ffde23Fba2d7Aea9C3CBf2d5B7B533BB46754a8", bidDelaySeconds: 60, minChunkSizeUsd: 10, nativeToken: web3_candies_1.networks.poly.native, wToken: web3_candies_1.networks.poly.wToken }, defaultAbis),
61
47
  avax: Object.assign({ chainName: "avax", chainId: 43114, twapVersion: 4, twapAddress: "0xF2687e119B0A4aB00bED9c9F425403566D605020", lensAddress: "0xfA1e5Da0Cbb780b891Cd635264354a9F4d3A726E", bidDelaySeconds: 60, minChunkSizeUsd: 10, nativeToken: web3_candies_1.networks.avax.native, wToken: web3_candies_1.networks.avax.wToken }, defaultAbis),
62
48
  };
63
49
  exports.Configs = {
64
- SpiritSwap: Object.assign(Object.assign({}, exports.ChainConfigs.ftm), { name: "SpiritSwap", partner: "Orbs:TWAP:SpiritSwap", exchangeAddress: "0xAd19179201be5A51D1cBd3bB2fC651BB05822404", exchangeType: "ParaswapExchange", pathfinderKey: ParaswapOnlyDex.SpiritSwap }),
65
- SpookySwap: Object.assign(Object.assign({}, exports.ChainConfigs.ftm), { name: "SpookySwap", partner: "Orbs:TWAP:SpookySwap", exchangeAddress: "0x4b5815D263549Ff9b54a3838693C3DC0dbE7e597", exchangeType: "UniswapV2Exchange", pathfinderKey: ParaswapOnlyDex.SpookySwap }),
50
+ SpiritSwap: Object.assign(Object.assign({}, exports.ChainConfigs.ftm), { twapVersion: 3, name: "SpiritSwap", partner: "Orbs:TWAP:SpiritSwap", exchangeAddress: "0xAd19179201be5A51D1cBd3bB2fC651BB05822404", exchangeType: "ParaswapExchange", pathfinderKey: ParaswapOnlyDex.SpiritSwap }),
51
+ SpookySwap: Object.assign(Object.assign({}, exports.ChainConfigs.ftm), { name: "SpookySwap", partner: "Orbs:TWAP:SpookySwap", exchangeAddress: "0x704b9764cb36B8856f3097845dcc594d82192638", exchangeType: "UniswapV2Exchange", pathfinderKey: ParaswapOnlyDex.SpookySwap }),
66
52
  Pangolin: Object.assign(Object.assign({}, exports.ChainConfigs.avax), { name: "Pangolin", partner: "Orbs:TWAP:Pangolin", exchangeAddress: "0xf2d96E7BE676153d202e1453804E2749923C7c5b", exchangeType: "UniswapV2Exchange", pathfinderKey: ParaswapOnlyDex.Pangolin }),
67
53
  PangolinDaas: Object.assign(Object.assign({}, exports.ChainConfigs.avax), { name: "PangolinDaas", partner: "Orbs:TWAP:PangolinDaas", exchangeAddress: "0x1579EED0527781B1A748043AA1f59a3858Ace4a7", exchangeType: "PangolinDaasExchange", pathfinderKey: ParaswapOnlyDex.Pangolin }),
68
54
  QuickSwap: Object.assign(Object.assign({}, exports.ChainConfigs.poly), { name: "QuickSwap", partner: "Orbs:TWAP:QuickSwap", exchangeAddress: "0x26D0ec4Be402BCE03AAa8aAf0CF67e9428ba54eF", exchangeType: "ParaswapExchange", pathfinderKey: ParaswapOnlyDex.QuickSwap }),
69
55
  Chronos: Object.assign(Object.assign({}, exports.ChainConfigs.arb), { name: "Chronos", partner: "Orbs:TWAP:Chronos", exchangeAddress: "0xA0b07F9a11dFb01388149abBdbc5B4f2196600AB", exchangeType: "OdosExchange", pathfinderKey: OdosOnlyDex.Chronos }),
70
- Thena: Object.assign(Object.assign({}, exports.ChainConfigs.bsc), { name: "Thena", partner: "Orbs:TWAP:Thena", exchangeAddress: "0xc2aBC02acd77Bb2407efA22348dA9afC8B375290", exchangeType: "OpenOceanExchange", pathfinderKey: OpenOceanOnlyDex.Thena }),
56
+ Thena: Object.assign(Object.assign({}, exports.ChainConfigs.bsc), { name: "Thena", partner: "Orbs:TWAP:Thena", exchangeAddress: "0xD63430c74C8E70D9dbdCA04C6a9E6E9E929028DA", exchangeType: "ParaswapExchange", pathfinderKey: ParaswapOnlyDex.Thena }),
71
57
  PancakeSwap: Object.assign(Object.assign({}, exports.ChainConfigs.bsc), { name: "PancakeSwap", partner: "Orbs:TWAP:PancakeSwap", exchangeAddress: "0x3dD428151c697Aa1a3E5d0ee6A52768E70D85daE", exchangeType: "ParaswapExchange", pathfinderKey: ParaswapOnlyDex.PancakeSwap }),
72
58
  };
73
59
  const chainConfig = (chainId) => lodash_1.default.find(exports.ChainConfigs, (c) => c.chainId === chainId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orbs-network/twap",
3
- "version": "1.13.7",
3
+ "version": "1.14.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/orbs-network/twap.git"
@@ -1,178 +0,0 @@
1
- export declare const twapAbiV3: ({
2
- inputs: {
3
- internalType: string;
4
- name: string;
5
- type: string;
6
- }[];
7
- stateMutability: string;
8
- type: string;
9
- anonymous?: undefined;
10
- name?: undefined;
11
- outputs?: undefined;
12
- } | {
13
- anonymous: boolean;
14
- inputs: ({
15
- indexed: boolean;
16
- internalType: string;
17
- name: string;
18
- type: string;
19
- components?: undefined;
20
- } | {
21
- components: {
22
- internalType: string;
23
- name: string;
24
- type: string;
25
- }[];
26
- indexed: boolean;
27
- internalType: string;
28
- name: string;
29
- type: string;
30
- })[];
31
- name: string;
32
- type: string;
33
- stateMutability?: undefined;
34
- outputs?: undefined;
35
- } | {
36
- inputs: {
37
- internalType: string;
38
- name: string;
39
- type: string;
40
- }[];
41
- name: string;
42
- outputs: ({
43
- internalType: string;
44
- name: string;
45
- type: string;
46
- components?: undefined;
47
- } | {
48
- components: {
49
- internalType: string;
50
- name: string;
51
- type: string;
52
- }[];
53
- internalType: string;
54
- name: string;
55
- type: string;
56
- })[];
57
- stateMutability: string;
58
- type: string;
59
- anonymous?: undefined;
60
- } | {
61
- inputs: {
62
- internalType: string;
63
- name: string;
64
- type: string;
65
- }[];
66
- name: string;
67
- outputs: {
68
- components: ({
69
- internalType: string;
70
- name: string;
71
- type: string;
72
- components?: undefined;
73
- } | {
74
- components: {
75
- internalType: string;
76
- name: string;
77
- type: string;
78
- }[];
79
- internalType: string;
80
- name: string;
81
- type: string;
82
- })[];
83
- internalType: string;
84
- name: string;
85
- type: string;
86
- }[];
87
- stateMutability: string;
88
- type: string;
89
- anonymous?: undefined;
90
- } | {
91
- stateMutability: string;
92
- type: string;
93
- inputs?: undefined;
94
- anonymous?: undefined;
95
- name?: undefined;
96
- outputs?: undefined;
97
- })[];
98
- export declare const lensAbiV3: ({
99
- inputs: {
100
- internalType: string;
101
- name: string;
102
- type: string;
103
- }[];
104
- stateMutability: string;
105
- type: string;
106
- name?: undefined;
107
- outputs?: undefined;
108
- } | {
109
- inputs: never[];
110
- name: string;
111
- outputs: {
112
- internalType: string;
113
- name: string;
114
- type: string;
115
- }[];
116
- stateMutability: string;
117
- type: string;
118
- } | {
119
- inputs: {
120
- internalType: string;
121
- name: string;
122
- type: string;
123
- }[];
124
- name: string;
125
- outputs: {
126
- components: ({
127
- internalType: string;
128
- name: string;
129
- type: string;
130
- components?: undefined;
131
- } | {
132
- components: {
133
- internalType: string;
134
- name: string;
135
- type: string;
136
- }[];
137
- internalType: string;
138
- name: string;
139
- type: string;
140
- })[];
141
- internalType: string;
142
- name: string;
143
- type: string;
144
- }[];
145
- stateMutability: string;
146
- type: string;
147
- })[];
148
- export declare const takerAbiV3: ({
149
- inputs: {
150
- internalType: string;
151
- name: string;
152
- type: string;
153
- }[];
154
- stateMutability: string;
155
- type: string;
156
- name?: undefined;
157
- outputs?: undefined;
158
- } | {
159
- inputs: {
160
- internalType: string;
161
- name: string;
162
- type: string;
163
- }[];
164
- name: string;
165
- outputs: {
166
- internalType: string;
167
- name: string;
168
- type: string;
169
- }[];
170
- stateMutability: string;
171
- type: string;
172
- } | {
173
- stateMutability: string;
174
- type: string;
175
- inputs?: undefined;
176
- name?: undefined;
177
- outputs?: undefined;
178
- })[];
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.takerAbiV3 = exports.lensAbiV3 = exports.twapAbiV3 = void 0;
4
- // prettier-ignore
5
- exports.twapAbiV3 = [{ "inputs": [{ "internalType": "address", "name": "_iweth", "type": "address" }], "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "uint64", "name": "id", "type": "uint64" }, { "indexed": true, "internalType": "address", "name": "maker", "type": "address" }, { "indexed": true, "internalType": "address", "name": "exchange", "type": "address" }, { "indexed": false, "internalType": "uint32", "name": "slippagePercent", "type": "uint32" }, { "components": [{ "internalType": "uint32", "name": "time", "type": "uint32" }, { "internalType": "address", "name": "taker", "type": "address" }, { "internalType": "address", "name": "exchange", "type": "address" }, { "internalType": "uint256", "name": "dstAmount", "type": "uint256" }, { "internalType": "uint256", "name": "dstFee", "type": "uint256" }, { "internalType": "bytes", "name": "data", "type": "bytes" }], "indexed": false, "internalType": "struct OrderLib.Bid", "name": "bid", "type": "tuple" }], "name": "OrderBid", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "uint64", "name": "id", "type": "uint64" }, { "indexed": true, "internalType": "address", "name": "maker", "type": "address" }, { "indexed": false, "internalType": "address", "name": "sender", "type": "address" }], "name": "OrderCanceled", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "uint64", "name": "id", "type": "uint64" }, { "indexed": true, "internalType": "address", "name": "maker", "type": "address" }, { "indexed": true, "internalType": "address", "name": "exchange", "type": "address" }, { "indexed": false, "internalType": "address", "name": "taker", "type": "address" }], "name": "OrderCompleted", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "uint64", "name": "id", "type": "uint64" }, { "indexed": true, "internalType": "address", "name": "maker", "type": "address" }, { "indexed": true, "internalType": "address", "name": "exchange", "type": "address" }, { "components": [{ "internalType": "uint32", "name": "time", "type": "uint32" }, { "internalType": "uint32", "name": "deadline", "type": "uint32" }, { "internalType": "uint32", "name": "bidDelay", "type": "uint32" }, { "internalType": "uint32", "name": "fillDelay", "type": "uint32" }, { "internalType": "address", "name": "maker", "type": "address" }, { "internalType": "address", "name": "exchange", "type": "address" }, { "internalType": "address", "name": "srcToken", "type": "address" }, { "internalType": "address", "name": "dstToken", "type": "address" }, { "internalType": "uint256", "name": "srcAmount", "type": "uint256" }, { "internalType": "uint256", "name": "srcBidAmount", "type": "uint256" }, { "internalType": "uint256", "name": "dstMinAmount", "type": "uint256" }], "indexed": false, "internalType": "struct OrderLib.Ask", "name": "ask", "type": "tuple" }], "name": "OrderCreated", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": true, "internalType": "uint64", "name": "id", "type": "uint64" }, { "indexed": true, "internalType": "address", "name": "maker", "type": "address" }, { "indexed": true, "internalType": "address", "name": "exchange", "type": "address" }, { "indexed": false, "internalType": "address", "name": "taker", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "srcAmountIn", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "dstAmountOut", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "dstFee", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "srcFilledAmount", "type": "uint256" }], "name": "OrderFilled", "type": "event" }, { "inputs": [], "name": "MIN_BID_DELAY_SECONDS", "outputs": [{ "internalType": "uint32", "name": "", "type": "uint32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "MIN_OUTBID_PERCENT", "outputs": [{ "internalType": "uint32", "name": "", "type": "uint32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "PERCENT_BASE", "outputs": [{ "internalType": "uint32", "name": "", "type": "uint32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "STALE_BID_DELAY_MUL", "outputs": [{ "internalType": "uint32", "name": "", "type": "uint32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "STATUS_CANCELED", "outputs": [{ "internalType": "uint32", "name": "", "type": "uint32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "STATUS_COMPLETED", "outputs": [{ "internalType": "uint32", "name": "", "type": "uint32" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "VERSION", "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "exchange", "type": "address" }, { "internalType": "address", "name": "srcToken", "type": "address" }, { "internalType": "address", "name": "dstToken", "type": "address" }, { "internalType": "uint256", "name": "srcAmount", "type": "uint256" }, { "internalType": "uint256", "name": "srcBidAmount", "type": "uint256" }, { "internalType": "uint256", "name": "dstMinAmount", "type": "uint256" }, { "internalType": "uint32", "name": "deadline", "type": "uint32" }, { "internalType": "uint32", "name": "bidDelay", "type": "uint32" }, { "internalType": "uint32", "name": "fillDelay", "type": "uint32" }], "name": "ask", "outputs": [{ "internalType": "uint64", "name": "id", "type": "uint64" }], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint64", "name": "id", "type": "uint64" }, { "internalType": "address", "name": "exchange", "type": "address" }, { "internalType": "uint256", "name": "dstFee", "type": "uint256" }, { "internalType": "uint32", "name": "slippagePercent", "type": "uint32" }, { "internalType": "bytes", "name": "data", "type": "bytes" }], "name": "bid", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "name": "book", "outputs": [{ "internalType": "uint64", "name": "id", "type": "uint64" }, { "internalType": "uint32", "name": "status", "type": "uint32" }, { "internalType": "uint32", "name": "filledTime", "type": "uint32" }, { "internalType": "uint256", "name": "srcFilledAmount", "type": "uint256" }, { "components": [{ "internalType": "uint32", "name": "time", "type": "uint32" }, { "internalType": "uint32", "name": "deadline", "type": "uint32" }, { "internalType": "uint32", "name": "bidDelay", "type": "uint32" }, { "internalType": "uint32", "name": "fillDelay", "type": "uint32" }, { "internalType": "address", "name": "maker", "type": "address" }, { "internalType": "address", "name": "exchange", "type": "address" }, { "internalType": "address", "name": "srcToken", "type": "address" }, { "internalType": "address", "name": "dstToken", "type": "address" }, { "internalType": "uint256", "name": "srcAmount", "type": "uint256" }, { "internalType": "uint256", "name": "srcBidAmount", "type": "uint256" }, { "internalType": "uint256", "name": "dstMinAmount", "type": "uint256" }], "internalType": "struct OrderLib.Ask", "name": "ask", "type": "tuple" }, { "components": [{ "internalType": "uint32", "name": "time", "type": "uint32" }, { "internalType": "address", "name": "taker", "type": "address" }, { "internalType": "address", "name": "exchange", "type": "address" }, { "internalType": "uint256", "name": "dstAmount", "type": "uint256" }, { "internalType": "uint256", "name": "dstFee", "type": "uint256" }, { "internalType": "bytes", "name": "data", "type": "bytes" }], "internalType": "struct OrderLib.Bid", "name": "bid", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint64", "name": "id", "type": "uint64" }], "name": "cancel", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint64", "name": "id", "type": "uint64" }], "name": "fill", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "iweth", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "length", "outputs": [{ "internalType": "uint64", "name": "", "type": "uint64" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "", "type": "address" }, { "internalType": "uint256", "name": "", "type": "uint256" }], "name": "makerOrders", "outputs": [{ "internalType": "uint64", "name": "", "type": "uint64" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint64", "name": "id", "type": "uint64" }], "name": "order", "outputs": [{ "components": [{ "internalType": "uint64", "name": "id", "type": "uint64" }, { "internalType": "uint32", "name": "status", "type": "uint32" }, { "internalType": "uint32", "name": "filledTime", "type": "uint32" }, { "internalType": "uint256", "name": "srcFilledAmount", "type": "uint256" }, { "components": [{ "internalType": "uint32", "name": "time", "type": "uint32" }, { "internalType": "uint32", "name": "deadline", "type": "uint32" }, { "internalType": "uint32", "name": "bidDelay", "type": "uint32" }, { "internalType": "uint32", "name": "fillDelay", "type": "uint32" }, { "internalType": "address", "name": "maker", "type": "address" }, { "internalType": "address", "name": "exchange", "type": "address" }, { "internalType": "address", "name": "srcToken", "type": "address" }, { "internalType": "address", "name": "dstToken", "type": "address" }, { "internalType": "uint256", "name": "srcAmount", "type": "uint256" }, { "internalType": "uint256", "name": "srcBidAmount", "type": "uint256" }, { "internalType": "uint256", "name": "dstMinAmount", "type": "uint256" }], "internalType": "struct OrderLib.Ask", "name": "ask", "type": "tuple" }, { "components": [{ "internalType": "uint32", "name": "time", "type": "uint32" }, { "internalType": "address", "name": "taker", "type": "address" }, { "internalType": "address", "name": "exchange", "type": "address" }, { "internalType": "uint256", "name": "dstAmount", "type": "uint256" }, { "internalType": "uint256", "name": "dstFee", "type": "uint256" }, { "internalType": "bytes", "name": "data", "type": "bytes" }], "internalType": "struct OrderLib.Bid", "name": "bid", "type": "tuple" }], "internalType": "struct OrderLib.Order", "name": "", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "maker", "type": "address" }], "name": "orderIdsByMaker", "outputs": [{ "internalType": "uint64[]", "name": "", "type": "uint64[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "uint64", "name": "id", "type": "uint64" }], "name": "prune", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "name": "status", "outputs": [{ "internalType": "uint32", "name": "", "type": "uint32" }], "stateMutability": "view", "type": "function" }, { "stateMutability": "payable", "type": "receive" }];
6
- // prettier-ignore
7
- exports.lensAbiV3 = [{ "inputs": [{ "internalType": "contract TWAP", "name": "_twap", "type": "address" }], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [], "name": "length", "outputs": [{ "internalType": "uint64", "name": "", "type": "uint64" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "maker", "type": "address" }], "name": "makerOrders", "outputs": [{ "components": [{ "internalType": "uint64", "name": "id", "type": "uint64" }, { "internalType": "uint32", "name": "status", "type": "uint32" }, { "internalType": "uint32", "name": "filledTime", "type": "uint32" }, { "internalType": "uint256", "name": "srcFilledAmount", "type": "uint256" }, { "components": [{ "internalType": "uint32", "name": "time", "type": "uint32" }, { "internalType": "uint32", "name": "deadline", "type": "uint32" }, { "internalType": "uint32", "name": "bidDelay", "type": "uint32" }, { "internalType": "uint32", "name": "fillDelay", "type": "uint32" }, { "internalType": "address", "name": "maker", "type": "address" }, { "internalType": "address", "name": "exchange", "type": "address" }, { "internalType": "address", "name": "srcToken", "type": "address" }, { "internalType": "address", "name": "dstToken", "type": "address" }, { "internalType": "uint256", "name": "srcAmount", "type": "uint256" }, { "internalType": "uint256", "name": "srcBidAmount", "type": "uint256" }, { "internalType": "uint256", "name": "dstMinAmount", "type": "uint256" }], "internalType": "struct OrderLib.Ask", "name": "ask", "type": "tuple" }, { "components": [{ "internalType": "uint32", "name": "time", "type": "uint32" }, { "internalType": "address", "name": "taker", "type": "address" }, { "internalType": "address", "name": "exchange", "type": "address" }, { "internalType": "uint256", "name": "dstAmount", "type": "uint256" }, { "internalType": "uint256", "name": "dstFee", "type": "uint256" }, { "internalType": "bytes", "name": "data", "type": "bytes" }], "internalType": "struct OrderLib.Bid", "name": "bid", "type": "tuple" }], "internalType": "struct OrderLib.Order[]", "name": "result", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "taker", "type": "address" }, { "internalType": "uint64", "name": "lastIndex", "type": "uint64" }, { "internalType": "uint64", "name": "pageSize", "type": "uint64" }], "name": "takerBiddableOrders", "outputs": [{ "components": [{ "internalType": "uint64", "name": "id", "type": "uint64" }, { "internalType": "uint32", "name": "status", "type": "uint32" }, { "internalType": "uint32", "name": "filledTime", "type": "uint32" }, { "internalType": "uint256", "name": "srcFilledAmount", "type": "uint256" }, { "components": [{ "internalType": "uint32", "name": "time", "type": "uint32" }, { "internalType": "uint32", "name": "deadline", "type": "uint32" }, { "internalType": "uint32", "name": "bidDelay", "type": "uint32" }, { "internalType": "uint32", "name": "fillDelay", "type": "uint32" }, { "internalType": "address", "name": "maker", "type": "address" }, { "internalType": "address", "name": "exchange", "type": "address" }, { "internalType": "address", "name": "srcToken", "type": "address" }, { "internalType": "address", "name": "dstToken", "type": "address" }, { "internalType": "uint256", "name": "srcAmount", "type": "uint256" }, { "internalType": "uint256", "name": "srcBidAmount", "type": "uint256" }, { "internalType": "uint256", "name": "dstMinAmount", "type": "uint256" }], "internalType": "struct OrderLib.Ask", "name": "ask", "type": "tuple" }, { "components": [{ "internalType": "uint32", "name": "time", "type": "uint32" }, { "internalType": "address", "name": "taker", "type": "address" }, { "internalType": "address", "name": "exchange", "type": "address" }, { "internalType": "uint256", "name": "dstAmount", "type": "uint256" }, { "internalType": "uint256", "name": "dstFee", "type": "uint256" }, { "internalType": "bytes", "name": "data", "type": "bytes" }], "internalType": "struct OrderLib.Bid", "name": "bid", "type": "tuple" }], "internalType": "struct OrderLib.Order[]", "name": "result", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "taker", "type": "address" }, { "internalType": "uint64", "name": "lastIndex", "type": "uint64" }, { "internalType": "uint64", "name": "pageSize", "type": "uint64" }], "name": "takerFillableOrders", "outputs": [{ "components": [{ "internalType": "uint64", "name": "id", "type": "uint64" }, { "internalType": "uint32", "name": "status", "type": "uint32" }, { "internalType": "uint32", "name": "filledTime", "type": "uint32" }, { "internalType": "uint256", "name": "srcFilledAmount", "type": "uint256" }, { "components": [{ "internalType": "uint32", "name": "time", "type": "uint32" }, { "internalType": "uint32", "name": "deadline", "type": "uint32" }, { "internalType": "uint32", "name": "bidDelay", "type": "uint32" }, { "internalType": "uint32", "name": "fillDelay", "type": "uint32" }, { "internalType": "address", "name": "maker", "type": "address" }, { "internalType": "address", "name": "exchange", "type": "address" }, { "internalType": "address", "name": "srcToken", "type": "address" }, { "internalType": "address", "name": "dstToken", "type": "address" }, { "internalType": "uint256", "name": "srcAmount", "type": "uint256" }, { "internalType": "uint256", "name": "srcBidAmount", "type": "uint256" }, { "internalType": "uint256", "name": "dstMinAmount", "type": "uint256" }], "internalType": "struct OrderLib.Ask", "name": "ask", "type": "tuple" }, { "components": [{ "internalType": "uint32", "name": "time", "type": "uint32" }, { "internalType": "address", "name": "taker", "type": "address" }, { "internalType": "address", "name": "exchange", "type": "address" }, { "internalType": "uint256", "name": "dstAmount", "type": "uint256" }, { "internalType": "uint256", "name": "dstFee", "type": "uint256" }, { "internalType": "bytes", "name": "data", "type": "bytes" }], "internalType": "struct OrderLib.Bid", "name": "bid", "type": "tuple" }], "internalType": "struct OrderLib.Order[]", "name": "result", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "twap", "outputs": [{ "internalType": "contract TWAP", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }];
8
- // prettier-ignore
9
- exports.takerAbiV3 = [{ "inputs": [{ "internalType": "contract TWAP", "name": "_twap", "type": "address" }, { "internalType": "address[]", "name": "_owners", "type": "address[]" }], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [{ "internalType": "uint64", "name": "id", "type": "uint64" }, { "internalType": "address", "name": "exchange", "type": "address" }, { "internalType": "uint256", "name": "dstFee", "type": "uint256" }, { "internalType": "uint32", "name": "slippagePercent", "type": "uint32" }, { "internalType": "bytes", "name": "data", "type": "bytes" }], "name": "bid", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint64", "name": "id", "type": "uint64" }, { "internalType": "address", "name": "feeExchange", "type": "address" }, { "internalType": "uint256", "name": "feeMinAmountOut", "type": "uint256" }, { "internalType": "bytes", "name": "feeData", "type": "bytes" }], "name": "fill", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "", "type": "address" }], "name": "owners", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "token", "type": "address" }], "name": "rescue", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "twap", "outputs": [{ "internalType": "contract TWAP", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "stateMutability": "payable", "type": "receive" }];