@orbs-network/twap 1.14.2 → 1.14.3
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/src/configs.js +25 -2
- package/dist/src/lib.d.ts +2 -4
- package/package.json +1 -1
- package/dist/typechain-hardhat/contracts/IExchange.d.ts +0 -22
- package/dist/typechain-hardhat/contracts/IExchange.js +0 -5
- package/dist/typechain-hardhat/contracts/IWETH.d.ts +0 -21
- package/dist/typechain-hardhat/contracts/IWETH.js +0 -5
- package/dist/typechain-hardhat/contracts/TWAP.d.ts +0 -216
- package/dist/typechain-hardhat/contracts/TWAP.js +0 -5
- package/dist/typechain-hardhat/contracts/exchange/OdosExchange.d.ts +0 -23
- package/dist/typechain-hardhat/contracts/exchange/OdosExchange.js +0 -5
- package/dist/typechain-hardhat/contracts/exchange/OpenOceanExchange.d.ts +0 -23
- package/dist/typechain-hardhat/contracts/exchange/OpenOceanExchange.js +0 -5
- package/dist/typechain-hardhat/contracts/exchange/PangolinDaasExchange.sol/IPangolinDaas.d.ts +0 -35
- package/dist/typechain-hardhat/contracts/exchange/PangolinDaasExchange.sol/IPangolinDaas.js +0 -5
- package/dist/typechain-hardhat/contracts/exchange/PangolinDaasExchange.sol/PangolinDaasExchange.d.ts +0 -23
- package/dist/typechain-hardhat/contracts/exchange/PangolinDaasExchange.sol/PangolinDaasExchange.js +0 -5
- package/dist/typechain-hardhat/contracts/exchange/PangolinDaasExchange.sol/index.d.ts +0 -2
- package/dist/typechain-hardhat/contracts/exchange/PangolinDaasExchange.sol/index.js +0 -2
- package/dist/typechain-hardhat/contracts/exchange/ParaswapExchange.sol/IParaswap.d.ts +0 -20
- package/dist/typechain-hardhat/contracts/exchange/ParaswapExchange.sol/IParaswap.js +0 -5
- package/dist/typechain-hardhat/contracts/exchange/ParaswapExchange.sol/ParaswapExchange.d.ts +0 -23
- package/dist/typechain-hardhat/contracts/exchange/ParaswapExchange.sol/ParaswapExchange.js +0 -5
- package/dist/typechain-hardhat/contracts/exchange/ParaswapExchange.sol/index.d.ts +0 -2
- package/dist/typechain-hardhat/contracts/exchange/ParaswapExchange.sol/index.js +0 -2
- package/dist/typechain-hardhat/contracts/exchange/UniswapV2Exchange.sol/IUniswapV2.d.ts +0 -23
- package/dist/typechain-hardhat/contracts/exchange/UniswapV2Exchange.sol/IUniswapV2.js +0 -5
- package/dist/typechain-hardhat/contracts/exchange/UniswapV2Exchange.sol/UniswapV2Exchange.d.ts +0 -23
- package/dist/typechain-hardhat/contracts/exchange/UniswapV2Exchange.sol/UniswapV2Exchange.js +0 -5
- package/dist/typechain-hardhat/contracts/exchange/UniswapV2Exchange.sol/index.d.ts +0 -2
- package/dist/typechain-hardhat/contracts/exchange/UniswapV2Exchange.sol/index.js +0 -2
- package/dist/typechain-hardhat/contracts/exchange/index.d.ts +0 -8
- package/dist/typechain-hardhat/contracts/exchange/index.js +0 -2
- package/dist/typechain-hardhat/contracts/index.d.ts +0 -9
- package/dist/typechain-hardhat/contracts/index.js +0 -2
- package/dist/typechain-hardhat/contracts/periphery/Lens.d.ts +0 -106
- package/dist/typechain-hardhat/contracts/periphery/Lens.js +0 -5
- package/dist/typechain-hardhat/contracts/periphery/Taker.d.ts +0 -40
- package/dist/typechain-hardhat/contracts/periphery/Taker.js +0 -5
- package/dist/typechain-hardhat/contracts/periphery/index.d.ts +0 -2
- package/dist/typechain-hardhat/contracts/periphery/index.js +0 -2
- package/dist/typechain-hardhat/contracts/test/MockDeflationaryToken.d.ts +0 -55
- package/dist/typechain-hardhat/contracts/test/MockDeflationaryToken.js +0 -5
- package/dist/typechain-hardhat/contracts/test/MockExchange.d.ts +0 -24
- package/dist/typechain-hardhat/contracts/test/MockExchange.js +0 -5
- package/dist/typechain-hardhat/contracts/test/index.d.ts +0 -2
- package/dist/typechain-hardhat/contracts/test/index.js +0 -2
- package/dist/typechain-hardhat/types.d.ts +0 -54
- package/dist/typechain-hardhat/types.js +0 -5
package/dist/src/configs.js
CHANGED
|
@@ -1,4 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
27
|
};
|
|
@@ -9,7 +32,7 @@ const lodash_1 = __importDefault(require("lodash"));
|
|
|
9
32
|
const TWAP_json_1 = __importDefault(require("../artifacts/contracts/TWAP.sol/TWAP.json"));
|
|
10
33
|
const Lens_json_1 = __importDefault(require("../artifacts/contracts/periphery/Lens.sol/Lens.json"));
|
|
11
34
|
const Taker_json_1 = __importDefault(require("../artifacts/contracts/periphery/Taker.sol/Taker.json"));
|
|
12
|
-
const
|
|
35
|
+
const legacyAbis = __importStar(require("./legacy-abi"));
|
|
13
36
|
var web3_candies_2 = require("@defi.org/web3-candies");
|
|
14
37
|
Object.defineProperty(exports, "nativeTokenAddresses", { enumerable: true, get: function () { return web3_candies_2.nativeTokenAddresses; } });
|
|
15
38
|
Object.defineProperty(exports, "zeroAddress", { enumerable: true, get: function () { return web3_candies_2.zeroAddress; } });
|
|
@@ -48,7 +71,7 @@ exports.ChainConfigs = {
|
|
|
48
71
|
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),
|
|
49
72
|
};
|
|
50
73
|
exports.Configs = {
|
|
51
|
-
SpiritSwap: Object.assign(Object.assign({}, exports.ChainConfigs.ftm), { twapVersion: 3, twapAddress: "0xBb9F828E34A1327607c3e4eA3dD35891398DD5EE", lensAddress: "0x042799657E971855eD619046aeDf7F30DB56d2D6", twapAbi:
|
|
74
|
+
SpiritSwap: Object.assign(Object.assign({}, exports.ChainConfigs.ftm), { twapVersion: 3, twapAddress: "0xBb9F828E34A1327607c3e4eA3dD35891398DD5EE", lensAddress: "0x042799657E971855eD619046aeDf7F30DB56d2D6", twapAbi: legacyAbis.twapAbiV3, lensAbi: legacyAbis.lensAbiV3, takerAbi: legacyAbis.takerAbiV3, name: "SpiritSwap", partner: "Orbs:TWAP:SpiritSwap", exchangeAddress: "0xAd19179201be5A51D1cBd3bB2fC651BB05822404", exchangeType: "ParaswapExchange", pathfinderKey: ParaswapOnlyDex.SpiritSwap }),
|
|
52
75
|
SpookySwap: Object.assign(Object.assign({}, exports.ChainConfigs.ftm), { name: "SpookySwap", partner: "Orbs:TWAP:SpookySwap", exchangeAddress: "0x704b9764cb36B8856f3097845dcc594d82192638", exchangeType: "UniswapV2Exchange", pathfinderKey: ParaswapOnlyDex.SpookySwap }),
|
|
53
76
|
Pangolin: Object.assign(Object.assign({}, exports.ChainConfigs.avax), { name: "Pangolin", partner: "Orbs:TWAP:Pangolin", exchangeAddress: "0xf2d96E7BE676153d202e1453804E2749923C7c5b", exchangeType: "UniswapV2Exchange", pathfinderKey: ParaswapOnlyDex.Pangolin }),
|
|
54
77
|
PangolinDaas: Object.assign(Object.assign({}, exports.ChainConfigs.avax), { name: "PangolinDaas", partner: "Orbs:TWAP:PangolinDaas", exchangeAddress: "0x1579EED0527781B1A748043AA1f59a3858Ace4a7", exchangeType: "PangolinDaasExchange", pathfinderKey: ParaswapOnlyDex.Pangolin }),
|
package/dist/src/lib.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { Config } from "./configs";
|
|
2
2
|
import BN from "bignumber.js";
|
|
3
3
|
import { TokenData } from "@defi.org/web3-candies";
|
|
4
|
-
import type { TWAP } from "../typechain-hardhat/contracts";
|
|
5
|
-
import type { Lens } from "../typechain-hardhat/contracts/periphery";
|
|
6
4
|
import { Paraswap } from "./paraswap";
|
|
7
5
|
import { Odos } from "./odos";
|
|
8
6
|
import { OpenOcean } from "./openocean";
|
|
@@ -11,8 +9,8 @@ export declare class TWAPLib {
|
|
|
11
9
|
maker: string;
|
|
12
10
|
provider?: any;
|
|
13
11
|
static VERSION: number;
|
|
14
|
-
twap:
|
|
15
|
-
lens:
|
|
12
|
+
twap: import("@defi.org/web3-candies").Contract;
|
|
13
|
+
lens: import("@defi.org/web3-candies").Contract;
|
|
16
14
|
constructor(config: Config, maker: string, provider?: any);
|
|
17
15
|
dstAmount: (srcToken: TokenData, dstToken: TokenData, srcAmount: BN.Value, srcUsdMarket: BN.Value, dstUsdMarket: BN.Value, limitDstPriceFor1Src: BN.Value, isMarketOrder: boolean) => BN;
|
|
18
16
|
isNativeToken: (token: TokenData) => boolean;
|
package/package.json
CHANGED
|
@@ -1,22 +0,0 @@
|
|
|
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 IExchange extends BaseContract {
|
|
13
|
-
constructor(jsonInterface: any[], address?: string, options?: ContractOptions): IExchange;
|
|
14
|
-
clone(): IExchange;
|
|
15
|
-
methods: {
|
|
16
|
-
getAmountOut(srcToken: string, dstToken: string, amountIn: number | string | BigNumber, askData: string | number[], bidData: string | number[]): NonPayableTransactionObject<string>;
|
|
17
|
-
swap(srcToken: string, dstToken: string, amountIn: number | string | BigNumber, amountOutMin: number | string | BigNumber, askData: string | number[], bidData: string | number[]): NonPayableTransactionObject<void>;
|
|
18
|
-
};
|
|
19
|
-
events: {
|
|
20
|
-
allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
|
|
21
|
-
};
|
|
22
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
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 IWETH extends BaseContract {
|
|
13
|
-
constructor(jsonInterface: any[], address?: string, options?: ContractOptions): IWETH;
|
|
14
|
-
clone(): IWETH;
|
|
15
|
-
methods: {
|
|
16
|
-
withdraw(wad: number | string | BigNumber): NonPayableTransactionObject<void>;
|
|
17
|
-
};
|
|
18
|
-
events: {
|
|
19
|
-
allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
|
|
20
|
-
};
|
|
21
|
-
}
|
|
@@ -1,216 +0,0 @@
|
|
|
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, ContractEventLog, BaseContract } from "../types";
|
|
7
|
-
export interface EventOptions {
|
|
8
|
-
filter?: object;
|
|
9
|
-
fromBlock?: BlockType;
|
|
10
|
-
topics?: string[];
|
|
11
|
-
}
|
|
12
|
-
export type OrderBid = ContractEventLog<{
|
|
13
|
-
id: string;
|
|
14
|
-
maker: string;
|
|
15
|
-
exchange: string;
|
|
16
|
-
slippagePercent: string;
|
|
17
|
-
bid: [string, string, string, string, string, string];
|
|
18
|
-
0: string;
|
|
19
|
-
1: string;
|
|
20
|
-
2: string;
|
|
21
|
-
3: string;
|
|
22
|
-
4: [string, string, string, string, string, string];
|
|
23
|
-
}>;
|
|
24
|
-
export type OrderCanceled = ContractEventLog<{
|
|
25
|
-
id: string;
|
|
26
|
-
maker: string;
|
|
27
|
-
sender: string;
|
|
28
|
-
0: string;
|
|
29
|
-
1: string;
|
|
30
|
-
2: string;
|
|
31
|
-
}>;
|
|
32
|
-
export type OrderCompleted = ContractEventLog<{
|
|
33
|
-
id: string;
|
|
34
|
-
maker: string;
|
|
35
|
-
exchange: string;
|
|
36
|
-
taker: string;
|
|
37
|
-
0: string;
|
|
38
|
-
1: string;
|
|
39
|
-
2: string;
|
|
40
|
-
3: string;
|
|
41
|
-
}>;
|
|
42
|
-
export type OrderCreated = ContractEventLog<{
|
|
43
|
-
id: string;
|
|
44
|
-
maker: string;
|
|
45
|
-
exchange: string;
|
|
46
|
-
ask: [
|
|
47
|
-
string,
|
|
48
|
-
string,
|
|
49
|
-
string,
|
|
50
|
-
string,
|
|
51
|
-
string,
|
|
52
|
-
string,
|
|
53
|
-
string,
|
|
54
|
-
string,
|
|
55
|
-
string,
|
|
56
|
-
string
|
|
57
|
-
];
|
|
58
|
-
0: string;
|
|
59
|
-
1: string;
|
|
60
|
-
2: string;
|
|
61
|
-
3: [
|
|
62
|
-
string,
|
|
63
|
-
string,
|
|
64
|
-
string,
|
|
65
|
-
string,
|
|
66
|
-
string,
|
|
67
|
-
string,
|
|
68
|
-
string,
|
|
69
|
-
string,
|
|
70
|
-
string,
|
|
71
|
-
string
|
|
72
|
-
];
|
|
73
|
-
}>;
|
|
74
|
-
export type OrderFilled = ContractEventLog<{
|
|
75
|
-
id: string;
|
|
76
|
-
maker: string;
|
|
77
|
-
exchange: string;
|
|
78
|
-
taker: string;
|
|
79
|
-
srcAmountIn: string;
|
|
80
|
-
dstAmountOut: string;
|
|
81
|
-
dstFee: string;
|
|
82
|
-
srcFilledAmount: string;
|
|
83
|
-
0: string;
|
|
84
|
-
1: string;
|
|
85
|
-
2: string;
|
|
86
|
-
3: string;
|
|
87
|
-
4: string;
|
|
88
|
-
5: string;
|
|
89
|
-
6: string;
|
|
90
|
-
7: string;
|
|
91
|
-
}>;
|
|
92
|
-
export interface TWAP extends BaseContract {
|
|
93
|
-
constructor(jsonInterface: any[], address?: string, options?: ContractOptions): TWAP;
|
|
94
|
-
clone(): TWAP;
|
|
95
|
-
methods: {
|
|
96
|
-
MIN_BID_DELAY_SECONDS(): NonPayableTransactionObject<string>;
|
|
97
|
-
MIN_OUTBID_PERCENT(): NonPayableTransactionObject<string>;
|
|
98
|
-
PERCENT_BASE(): NonPayableTransactionObject<string>;
|
|
99
|
-
STALE_BID_SECONDS(): NonPayableTransactionObject<string>;
|
|
100
|
-
STATUS_CANCELED(): NonPayableTransactionObject<string>;
|
|
101
|
-
STATUS_COMPLETED(): NonPayableTransactionObject<string>;
|
|
102
|
-
VERSION(): 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>;
|
|
115
|
-
bid(id: number | string | BigNumber, exchange: string, dstFee: number | string | BigNumber, slippagePercent: number | string | BigNumber, data: string | number[]): NonPayableTransactionObject<void>;
|
|
116
|
-
book(arg0: number | string | BigNumber): NonPayableTransactionObject<{
|
|
117
|
-
id: string;
|
|
118
|
-
status: string;
|
|
119
|
-
time: string;
|
|
120
|
-
filledTime: string;
|
|
121
|
-
srcFilledAmount: string;
|
|
122
|
-
maker: string;
|
|
123
|
-
ask: [
|
|
124
|
-
string,
|
|
125
|
-
string,
|
|
126
|
-
string,
|
|
127
|
-
string,
|
|
128
|
-
string,
|
|
129
|
-
string,
|
|
130
|
-
string,
|
|
131
|
-
string,
|
|
132
|
-
string,
|
|
133
|
-
string
|
|
134
|
-
];
|
|
135
|
-
bid: [string, string, string, string, string, string];
|
|
136
|
-
0: string;
|
|
137
|
-
1: string;
|
|
138
|
-
2: string;
|
|
139
|
-
3: string;
|
|
140
|
-
4: string;
|
|
141
|
-
5: string;
|
|
142
|
-
6: [
|
|
143
|
-
string,
|
|
144
|
-
string,
|
|
145
|
-
string,
|
|
146
|
-
string,
|
|
147
|
-
string,
|
|
148
|
-
string,
|
|
149
|
-
string,
|
|
150
|
-
string,
|
|
151
|
-
string,
|
|
152
|
-
string
|
|
153
|
-
];
|
|
154
|
-
7: [string, string, string, string, string, string];
|
|
155
|
-
}>;
|
|
156
|
-
cancel(id: number | string | BigNumber): NonPayableTransactionObject<void>;
|
|
157
|
-
fill(id: number | string | BigNumber): NonPayableTransactionObject<void>;
|
|
158
|
-
iweth(): NonPayableTransactionObject<string>;
|
|
159
|
-
length(): NonPayableTransactionObject<string>;
|
|
160
|
-
makerOrders(arg0: string, arg1: number | string | BigNumber): NonPayableTransactionObject<string>;
|
|
161
|
-
order(id: number | string | BigNumber): NonPayableTransactionObject<[
|
|
162
|
-
string,
|
|
163
|
-
string,
|
|
164
|
-
string,
|
|
165
|
-
string,
|
|
166
|
-
string,
|
|
167
|
-
string,
|
|
168
|
-
[
|
|
169
|
-
string,
|
|
170
|
-
string,
|
|
171
|
-
string,
|
|
172
|
-
string,
|
|
173
|
-
string,
|
|
174
|
-
string,
|
|
175
|
-
string,
|
|
176
|
-
string,
|
|
177
|
-
string,
|
|
178
|
-
string
|
|
179
|
-
],
|
|
180
|
-
[
|
|
181
|
-
string,
|
|
182
|
-
string,
|
|
183
|
-
string,
|
|
184
|
-
string,
|
|
185
|
-
string,
|
|
186
|
-
string
|
|
187
|
-
]
|
|
188
|
-
]>;
|
|
189
|
-
orderIdsByMaker(maker: string): NonPayableTransactionObject<string[]>;
|
|
190
|
-
prune(id: number | string | BigNumber): NonPayableTransactionObject<void>;
|
|
191
|
-
status(arg0: number | string | BigNumber): NonPayableTransactionObject<string>;
|
|
192
|
-
};
|
|
193
|
-
events: {
|
|
194
|
-
OrderBid(cb?: Callback<OrderBid>): EventEmitter;
|
|
195
|
-
OrderBid(options?: EventOptions, cb?: Callback<OrderBid>): EventEmitter;
|
|
196
|
-
OrderCanceled(cb?: Callback<OrderCanceled>): EventEmitter;
|
|
197
|
-
OrderCanceled(options?: EventOptions, cb?: Callback<OrderCanceled>): EventEmitter;
|
|
198
|
-
OrderCompleted(cb?: Callback<OrderCompleted>): EventEmitter;
|
|
199
|
-
OrderCompleted(options?: EventOptions, cb?: Callback<OrderCompleted>): EventEmitter;
|
|
200
|
-
OrderCreated(cb?: Callback<OrderCreated>): EventEmitter;
|
|
201
|
-
OrderCreated(options?: EventOptions, cb?: Callback<OrderCreated>): EventEmitter;
|
|
202
|
-
OrderFilled(cb?: Callback<OrderFilled>): EventEmitter;
|
|
203
|
-
OrderFilled(options?: EventOptions, cb?: Callback<OrderFilled>): EventEmitter;
|
|
204
|
-
allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
|
|
205
|
-
};
|
|
206
|
-
once(event: "OrderBid", cb: Callback<OrderBid>): void;
|
|
207
|
-
once(event: "OrderBid", options: EventOptions, cb: Callback<OrderBid>): void;
|
|
208
|
-
once(event: "OrderCanceled", cb: Callback<OrderCanceled>): void;
|
|
209
|
-
once(event: "OrderCanceled", options: EventOptions, cb: Callback<OrderCanceled>): void;
|
|
210
|
-
once(event: "OrderCompleted", cb: Callback<OrderCompleted>): void;
|
|
211
|
-
once(event: "OrderCompleted", options: EventOptions, cb: Callback<OrderCompleted>): void;
|
|
212
|
-
once(event: "OrderCreated", cb: Callback<OrderCreated>): void;
|
|
213
|
-
once(event: "OrderCreated", options: EventOptions, cb: Callback<OrderCreated>): void;
|
|
214
|
-
once(event: "OrderFilled", cb: Callback<OrderFilled>): void;
|
|
215
|
-
once(event: "OrderFilled", options: EventOptions, cb: Callback<OrderFilled>): void;
|
|
216
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
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 OdosExchange extends BaseContract {
|
|
13
|
-
constructor(jsonInterface: any[], address?: string, options?: ContractOptions): OdosExchange;
|
|
14
|
-
clone(): OdosExchange;
|
|
15
|
-
methods: {
|
|
16
|
-
getAmountOut(arg0: string, arg1: string, arg2: number | string | BigNumber, arg3: string | number[], bidData: string | number[]): NonPayableTransactionObject<string>;
|
|
17
|
-
odos(): NonPayableTransactionObject<string>;
|
|
18
|
-
swap(_srcToken: string, _dstToken: string, amountIn: number | string | BigNumber, amountOutMin: number | string | BigNumber, arg4: string | number[], bidData: string | number[]): NonPayableTransactionObject<void>;
|
|
19
|
-
};
|
|
20
|
-
events: {
|
|
21
|
-
allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
|
|
22
|
-
};
|
|
23
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
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 OpenOceanExchange extends BaseContract {
|
|
13
|
-
constructor(jsonInterface: any[], address?: string, options?: ContractOptions): OpenOceanExchange;
|
|
14
|
-
clone(): OpenOceanExchange;
|
|
15
|
-
methods: {
|
|
16
|
-
getAmountOut(arg0: string, arg1: string, arg2: number | string | BigNumber, arg3: string | number[], bidData: string | number[]): NonPayableTransactionObject<string>;
|
|
17
|
-
openocean(): NonPayableTransactionObject<string>;
|
|
18
|
-
swap(_srcToken: string, _dstToken: string, amountIn: number | string | BigNumber, amountOutMin: number | string | BigNumber, arg4: string | number[], bidData: string | number[]): NonPayableTransactionObject<void>;
|
|
19
|
-
};
|
|
20
|
-
events: {
|
|
21
|
-
allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
|
|
22
|
-
};
|
|
23
|
-
}
|
package/dist/typechain-hardhat/contracts/exchange/PangolinDaasExchange.sol/IPangolinDaas.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
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
|
-
}
|
package/dist/typechain-hardhat/contracts/exchange/PangolinDaasExchange.sol/PangolinDaasExchange.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import type { ContractOptions } from "web3-eth-contract";
|
|
3
|
-
import type { EventLog } from "web3-core";
|
|
4
|
-
import type { EventEmitter } from "events";
|
|
5
|
-
import type { Callback, NonPayableTransactionObject, BlockType, BaseContract } from "../../../types";
|
|
6
|
-
export interface EventOptions {
|
|
7
|
-
filter?: object;
|
|
8
|
-
fromBlock?: BlockType;
|
|
9
|
-
topics?: string[];
|
|
10
|
-
}
|
|
11
|
-
export interface IParaswap extends BaseContract {
|
|
12
|
-
constructor(jsonInterface: any[], address?: string, options?: ContractOptions): IParaswap;
|
|
13
|
-
clone(): IParaswap;
|
|
14
|
-
methods: {
|
|
15
|
-
getTokenTransferProxy(): NonPayableTransactionObject<string>;
|
|
16
|
-
};
|
|
17
|
-
events: {
|
|
18
|
-
allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
|
|
19
|
-
};
|
|
20
|
-
}
|
package/dist/typechain-hardhat/contracts/exchange/ParaswapExchange.sol/ParaswapExchange.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
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 ParaswapExchange extends BaseContract {
|
|
13
|
-
constructor(jsonInterface: any[], address?: string, options?: ContractOptions): ParaswapExchange;
|
|
14
|
-
clone(): ParaswapExchange;
|
|
15
|
-
methods: {
|
|
16
|
-
getAmountOut(arg0: string, arg1: string, arg2: number | string | BigNumber, arg3: string | number[], bidData: string | number[]): NonPayableTransactionObject<string>;
|
|
17
|
-
paraswap(): NonPayableTransactionObject<string>;
|
|
18
|
-
swap(_srcToken: string, _dstToken: string, amountIn: number | string | BigNumber, amountOutMin: number | string | BigNumber, arg4: string | number[], bidData: string | number[]): NonPayableTransactionObject<void>;
|
|
19
|
-
};
|
|
20
|
-
events: {
|
|
21
|
-
allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
|
|
22
|
-
};
|
|
23
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
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 IUniswapV2 extends BaseContract {
|
|
13
|
-
constructor(jsonInterface: any[], address?: string, options?: ContractOptions): IUniswapV2;
|
|
14
|
-
clone(): IUniswapV2;
|
|
15
|
-
methods: {
|
|
16
|
-
getAmountsOut(amountIn: number | string | BigNumber, path: string[]): NonPayableTransactionObject<string[]>;
|
|
17
|
-
swapExactTokensForTokens(amountIn: number | string | BigNumber, amountOutMin: number | string | BigNumber, path: string[], to: string, deadline: number | string | BigNumber): NonPayableTransactionObject<string[]>;
|
|
18
|
-
swapExactTokensForTokensSupportingFeeOnTransferTokens(amountIn: number | string | BigNumber, amountOutMin: number | string | BigNumber, path: string[], to: string, deadline: number | string | BigNumber): NonPayableTransactionObject<void>;
|
|
19
|
-
};
|
|
20
|
-
events: {
|
|
21
|
-
allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
|
|
22
|
-
};
|
|
23
|
-
}
|
package/dist/typechain-hardhat/contracts/exchange/UniswapV2Exchange.sol/UniswapV2Exchange.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
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 UniswapV2Exchange extends BaseContract {
|
|
13
|
-
constructor(jsonInterface: any[], address?: string, options?: ContractOptions): UniswapV2Exchange;
|
|
14
|
-
clone(): UniswapV2Exchange;
|
|
15
|
-
methods: {
|
|
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
|
-
uniswap(): NonPayableTransactionObject<string>;
|
|
19
|
-
};
|
|
20
|
-
events: {
|
|
21
|
-
allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
|
|
22
|
-
};
|
|
23
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
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 };
|
|
7
|
-
export type { OdosExchange } from "./OdosExchange";
|
|
8
|
-
export type { OpenOceanExchange } from "./OpenOceanExchange";
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type * as exchange from "./exchange";
|
|
2
|
-
export type { exchange };
|
|
3
|
-
import type * as periphery from "./periphery";
|
|
4
|
-
export type { periphery };
|
|
5
|
-
import type * as test from "./test";
|
|
6
|
-
export type { test };
|
|
7
|
-
export type { IExchange } from "./IExchange";
|
|
8
|
-
export type { IWETH } from "./IWETH";
|
|
9
|
-
export type { TWAP } from "./TWAP";
|
|
@@ -1,106 +0,0 @@
|
|
|
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 Lens extends BaseContract {
|
|
13
|
-
constructor(jsonInterface: any[], address?: string, options?: ContractOptions): Lens;
|
|
14
|
-
clone(): Lens;
|
|
15
|
-
methods: {
|
|
16
|
-
length(): NonPayableTransactionObject<string>;
|
|
17
|
-
makerOrders(maker: string): NonPayableTransactionObject<[
|
|
18
|
-
string,
|
|
19
|
-
string,
|
|
20
|
-
string,
|
|
21
|
-
string,
|
|
22
|
-
string,
|
|
23
|
-
string,
|
|
24
|
-
[
|
|
25
|
-
string,
|
|
26
|
-
string,
|
|
27
|
-
string,
|
|
28
|
-
string,
|
|
29
|
-
string,
|
|
30
|
-
string,
|
|
31
|
-
string,
|
|
32
|
-
string,
|
|
33
|
-
string,
|
|
34
|
-
string
|
|
35
|
-
],
|
|
36
|
-
[
|
|
37
|
-
string,
|
|
38
|
-
string,
|
|
39
|
-
string,
|
|
40
|
-
string,
|
|
41
|
-
string,
|
|
42
|
-
string
|
|
43
|
-
]
|
|
44
|
-
][]>;
|
|
45
|
-
takerBiddableOrders(taker: string, lastIndex: number | string | BigNumber, pageSize: number | string | BigNumber): NonPayableTransactionObject<[
|
|
46
|
-
string,
|
|
47
|
-
string,
|
|
48
|
-
string,
|
|
49
|
-
string,
|
|
50
|
-
string,
|
|
51
|
-
string,
|
|
52
|
-
[
|
|
53
|
-
string,
|
|
54
|
-
string,
|
|
55
|
-
string,
|
|
56
|
-
string,
|
|
57
|
-
string,
|
|
58
|
-
string,
|
|
59
|
-
string,
|
|
60
|
-
string,
|
|
61
|
-
string,
|
|
62
|
-
string
|
|
63
|
-
],
|
|
64
|
-
[
|
|
65
|
-
string,
|
|
66
|
-
string,
|
|
67
|
-
string,
|
|
68
|
-
string,
|
|
69
|
-
string,
|
|
70
|
-
string
|
|
71
|
-
]
|
|
72
|
-
][]>;
|
|
73
|
-
takerFillableOrders(taker: string, lastIndex: number | string | BigNumber, pageSize: number | string | BigNumber): NonPayableTransactionObject<[
|
|
74
|
-
string,
|
|
75
|
-
string,
|
|
76
|
-
string,
|
|
77
|
-
string,
|
|
78
|
-
string,
|
|
79
|
-
string,
|
|
80
|
-
[
|
|
81
|
-
string,
|
|
82
|
-
string,
|
|
83
|
-
string,
|
|
84
|
-
string,
|
|
85
|
-
string,
|
|
86
|
-
string,
|
|
87
|
-
string,
|
|
88
|
-
string,
|
|
89
|
-
string,
|
|
90
|
-
string
|
|
91
|
-
],
|
|
92
|
-
[
|
|
93
|
-
string,
|
|
94
|
-
string,
|
|
95
|
-
string,
|
|
96
|
-
string,
|
|
97
|
-
string,
|
|
98
|
-
string
|
|
99
|
-
]
|
|
100
|
-
][]>;
|
|
101
|
-
twap(): NonPayableTransactionObject<string>;
|
|
102
|
-
};
|
|
103
|
-
events: {
|
|
104
|
-
allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
|
|
105
|
-
};
|
|
106
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
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, ContractEventLog, BaseContract } from "../../types";
|
|
7
|
-
export interface EventOptions {
|
|
8
|
-
filter?: object;
|
|
9
|
-
fromBlock?: BlockType;
|
|
10
|
-
topics?: string[];
|
|
11
|
-
}
|
|
12
|
-
export type OwnershipTransferred = ContractEventLog<{
|
|
13
|
-
previousOwner: string;
|
|
14
|
-
newOwner: string;
|
|
15
|
-
0: string;
|
|
16
|
-
1: string;
|
|
17
|
-
}>;
|
|
18
|
-
export interface Taker extends BaseContract {
|
|
19
|
-
constructor(jsonInterface: any[], address?: string, options?: ContractOptions): Taker;
|
|
20
|
-
clone(): Taker;
|
|
21
|
-
methods: {
|
|
22
|
-
addOwners(_owners: string[]): NonPayableTransactionObject<void>;
|
|
23
|
-
bid(id: number | string | BigNumber, exchange: string, dstFee: number | string | BigNumber, slippagePercent: number | string | BigNumber, data: string | number[]): NonPayableTransactionObject<void>;
|
|
24
|
-
fill(id: number | string | BigNumber, feeExchange: string, feeMinAmountOut: number | string | BigNumber, feeData: string | number[]): NonPayableTransactionObject<void>;
|
|
25
|
-
owner(): NonPayableTransactionObject<string>;
|
|
26
|
-
owners(arg0: string): NonPayableTransactionObject<boolean>;
|
|
27
|
-
removeOwners(_owners: string[]): NonPayableTransactionObject<void>;
|
|
28
|
-
renounceOwnership(): NonPayableTransactionObject<void>;
|
|
29
|
-
rescue(token: string): NonPayableTransactionObject<void>;
|
|
30
|
-
transferOwnership(newOwner: string): NonPayableTransactionObject<void>;
|
|
31
|
-
twap(): NonPayableTransactionObject<string>;
|
|
32
|
-
};
|
|
33
|
-
events: {
|
|
34
|
-
OwnershipTransferred(cb?: Callback<OwnershipTransferred>): EventEmitter;
|
|
35
|
-
OwnershipTransferred(options?: EventOptions, cb?: Callback<OwnershipTransferred>): EventEmitter;
|
|
36
|
-
allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
|
|
37
|
-
};
|
|
38
|
-
once(event: "OwnershipTransferred", cb: Callback<OwnershipTransferred>): void;
|
|
39
|
-
once(event: "OwnershipTransferred", options: EventOptions, cb: Callback<OwnershipTransferred>): void;
|
|
40
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
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, ContractEventLog, BaseContract } from "../../types";
|
|
7
|
-
export interface EventOptions {
|
|
8
|
-
filter?: object;
|
|
9
|
-
fromBlock?: BlockType;
|
|
10
|
-
topics?: string[];
|
|
11
|
-
}
|
|
12
|
-
export type Approval = ContractEventLog<{
|
|
13
|
-
owner: string;
|
|
14
|
-
spender: string;
|
|
15
|
-
value: string;
|
|
16
|
-
0: string;
|
|
17
|
-
1: string;
|
|
18
|
-
2: string;
|
|
19
|
-
}>;
|
|
20
|
-
export type Transfer = ContractEventLog<{
|
|
21
|
-
from: string;
|
|
22
|
-
to: string;
|
|
23
|
-
value: string;
|
|
24
|
-
0: string;
|
|
25
|
-
1: string;
|
|
26
|
-
2: string;
|
|
27
|
-
}>;
|
|
28
|
-
export interface MockDeflationaryToken extends BaseContract {
|
|
29
|
-
constructor(jsonInterface: any[], address?: string, options?: ContractOptions): MockDeflationaryToken;
|
|
30
|
-
clone(): MockDeflationaryToken;
|
|
31
|
-
methods: {
|
|
32
|
-
allowance(owner: string, spender: string): NonPayableTransactionObject<string>;
|
|
33
|
-
approve(spender: string, amount: number | string | BigNumber): NonPayableTransactionObject<boolean>;
|
|
34
|
-
balanceOf(account: string): NonPayableTransactionObject<string>;
|
|
35
|
-
decimals(): NonPayableTransactionObject<string>;
|
|
36
|
-
decreaseAllowance(spender: string, subtractedValue: number | string | BigNumber): NonPayableTransactionObject<boolean>;
|
|
37
|
-
increaseAllowance(spender: string, addedValue: number | string | BigNumber): NonPayableTransactionObject<boolean>;
|
|
38
|
-
name(): NonPayableTransactionObject<string>;
|
|
39
|
-
symbol(): NonPayableTransactionObject<string>;
|
|
40
|
-
totalSupply(): NonPayableTransactionObject<string>;
|
|
41
|
-
transfer(to: string, amount: number | string | BigNumber): NonPayableTransactionObject<boolean>;
|
|
42
|
-
transferFrom(from: string, to: string, amount: number | string | BigNumber): NonPayableTransactionObject<boolean>;
|
|
43
|
-
};
|
|
44
|
-
events: {
|
|
45
|
-
Approval(cb?: Callback<Approval>): EventEmitter;
|
|
46
|
-
Approval(options?: EventOptions, cb?: Callback<Approval>): EventEmitter;
|
|
47
|
-
Transfer(cb?: Callback<Transfer>): EventEmitter;
|
|
48
|
-
Transfer(options?: EventOptions, cb?: Callback<Transfer>): EventEmitter;
|
|
49
|
-
allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
|
|
50
|
-
};
|
|
51
|
-
once(event: "Approval", cb: Callback<Approval>): void;
|
|
52
|
-
once(event: "Approval", options: EventOptions, cb: Callback<Approval>): void;
|
|
53
|
-
once(event: "Transfer", cb: Callback<Transfer>): void;
|
|
54
|
-
once(event: "Transfer", options: EventOptions, cb: Callback<Transfer>): void;
|
|
55
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
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 MockExchange extends BaseContract {
|
|
13
|
-
constructor(jsonInterface: any[], address?: string, options?: ContractOptions): MockExchange;
|
|
14
|
-
clone(): MockExchange;
|
|
15
|
-
methods: {
|
|
16
|
-
amounts(arg0: number | string | BigNumber): NonPayableTransactionObject<string>;
|
|
17
|
-
getAmountOut(arg0: string, arg1: string, arg2: number | string | BigNumber, arg3: string | number[], arg4: string | number[]): NonPayableTransactionObject<string>;
|
|
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[], arg5: string | number[]): NonPayableTransactionObject<void>;
|
|
20
|
-
};
|
|
21
|
-
events: {
|
|
22
|
-
allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
|
|
23
|
-
};
|
|
24
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import type BigNumber from "bignumber.js";
|
|
3
|
-
import type { EventEmitter } from "events";
|
|
4
|
-
import type { EventLog, PromiEvent, TransactionReceipt } from "web3-core/types";
|
|
5
|
-
import type { Contract } from "web3-eth-contract";
|
|
6
|
-
export interface EstimateGasOptions {
|
|
7
|
-
from?: string;
|
|
8
|
-
gas?: number;
|
|
9
|
-
value?: number | string | BigNumber;
|
|
10
|
-
}
|
|
11
|
-
export interface EventOptions {
|
|
12
|
-
filter?: object;
|
|
13
|
-
fromBlock?: BlockType;
|
|
14
|
-
topics?: string[];
|
|
15
|
-
}
|
|
16
|
-
export type Callback<T> = (error: Error, result: T) => void;
|
|
17
|
-
export interface ContractEventLog<T> extends EventLog {
|
|
18
|
-
returnValues: T;
|
|
19
|
-
}
|
|
20
|
-
export interface ContractEventEmitter<T> extends EventEmitter {
|
|
21
|
-
on(event: "connected", listener: (subscriptionId: string) => void): this;
|
|
22
|
-
on(event: "data" | "changed", listener: (event: ContractEventLog<T>) => void): this;
|
|
23
|
-
on(event: "error", listener: (error: Error) => void): this;
|
|
24
|
-
}
|
|
25
|
-
export interface NonPayableTx {
|
|
26
|
-
nonce?: string | number | BigNumber;
|
|
27
|
-
chainId?: string | number | BigNumber;
|
|
28
|
-
from?: string;
|
|
29
|
-
to?: string;
|
|
30
|
-
data?: string;
|
|
31
|
-
gas?: string | number | BigNumber;
|
|
32
|
-
maxPriorityFeePerGas?: string | number | BigNumber;
|
|
33
|
-
maxFeePerGas?: string | number | BigNumber;
|
|
34
|
-
gasPrice?: string | number | BigNumber;
|
|
35
|
-
}
|
|
36
|
-
export interface PayableTx extends NonPayableTx {
|
|
37
|
-
value?: string | number | BigNumber;
|
|
38
|
-
}
|
|
39
|
-
export interface NonPayableTransactionObject<T> {
|
|
40
|
-
arguments: any[];
|
|
41
|
-
call(tx?: NonPayableTx, block?: BlockType): Promise<T>;
|
|
42
|
-
send(tx?: NonPayableTx): PromiEvent<TransactionReceipt>;
|
|
43
|
-
estimateGas(tx?: NonPayableTx): Promise<number>;
|
|
44
|
-
encodeABI(): string;
|
|
45
|
-
}
|
|
46
|
-
export interface PayableTransactionObject<T> {
|
|
47
|
-
arguments: any[];
|
|
48
|
-
call(tx?: PayableTx, block?: BlockType): Promise<T>;
|
|
49
|
-
send(tx?: PayableTx): PromiEvent<TransactionReceipt>;
|
|
50
|
-
estimateGas(tx?: PayableTx): Promise<number>;
|
|
51
|
-
encodeABI(): string;
|
|
52
|
-
}
|
|
53
|
-
export type BlockType = "latest" | "pending" | "genesis" | "earliest" | number | BigNumber;
|
|
54
|
-
export type BaseContract = Omit<Contract, "clone" | "once">;
|