@imtbl/sdk 0.1.8-alpha.2 → 0.1.9-alpha
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/blockchain-data.d.ts +402 -110
- package/dist/blockchain-data.js +1699 -232
- package/dist/browser/checkout.js +2 -2
- package/dist/checkout_sdk.d.ts +163 -68
- package/dist/checkout_sdk.js +570 -215
- package/dist/checkout_widgets.d.ts +63 -156
- package/dist/checkout_widgets.js +20 -80
- package/dist/erc20.d.ts +180 -11
- package/dist/erc20.js +22 -22
- package/dist/erc721-permissioned-mintable.d.ts +258 -84
- package/dist/erc721-permissioned-mintable.js +134 -114
- package/dist/immutablex_client.js +1 -1
- package/dist/index.cjs +6966 -1834
- package/dist/index.d.ts +712 -413
- package/dist/index.js +6988 -1855
- package/dist/orderbook.d.ts +16 -16
- package/dist/orderbook.js +221 -114
- package/dist/passport.d.ts +3 -4
- package/dist/passport.js +3681 -436
- package/package.json +6 -1
package/dist/checkout_widgets.js
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import 'react';
|
|
3
3
|
|
|
4
|
-
var Environment;
|
|
5
|
-
(function (Environment) {
|
|
6
|
-
Environment["PRODUCTION"] = "production";
|
|
7
|
-
Environment["SANDBOX"] = "sandbox";
|
|
8
|
-
})(Environment || (Environment = {}));
|
|
9
|
-
|
|
10
4
|
function $parcel$export(e, n, v, s) {
|
|
11
5
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
12
6
|
}
|
|
@@ -14,21 +8,19 @@ function $parcel$export(e, n, v, s) {
|
|
|
14
8
|
var $207ed853f11d19d5$exports = {};
|
|
15
9
|
|
|
16
10
|
$parcel$export($207ed853f11d19d5$exports, "IMTBLWidgetEvents", () => $207ed853f11d19d5$export$5a0ace85cae72d45);
|
|
17
|
-
|
|
11
|
+
var $207ed853f11d19d5$export$5a0ace85cae72d45;
|
|
18
12
|
(function(IMTBLWidgetEvents) {
|
|
19
13
|
IMTBLWidgetEvents["IMTBL_CONNECT_WIDGET_EVENT"] = "imtbl-connect-widget";
|
|
20
14
|
IMTBLWidgetEvents["IMTBL_WALLET_WIDGET_EVENT"] = "imtbl-wallet-widget";
|
|
21
15
|
IMTBLWidgetEvents["IMTBL_SWAP_WIDGET_EVENT"] = "imtbl-swap-widget";
|
|
22
16
|
IMTBLWidgetEvents["IMTBL_BRIDGE_WIDGET_EVENT"] = "imtbl-bridge-widget";
|
|
23
|
-
IMTBLWidgetEvents["IMTBL_BUY_WIDGET_EVENT"] = "imtbl-buy-widget";
|
|
24
|
-
IMTBLWidgetEvents["IMTBL_ONRAMP_WIDGET_EVENT"] = "imtbl-onramp-widget";
|
|
25
17
|
})($207ed853f11d19d5$export$5a0ace85cae72d45 || ($207ed853f11d19d5$export$5a0ace85cae72d45 = {}));
|
|
26
18
|
|
|
27
19
|
|
|
28
20
|
var $a85ecdbd885c58ad$exports = {};
|
|
29
21
|
|
|
30
22
|
$parcel$export($a85ecdbd885c58ad$exports, "ConnectEventType", () => $a85ecdbd885c58ad$export$e72e7f9969a47dd3);
|
|
31
|
-
|
|
23
|
+
var $a85ecdbd885c58ad$export$e72e7f9969a47dd3;
|
|
32
24
|
(function(ConnectEventType) {
|
|
33
25
|
ConnectEventType["CLOSE_WIDGET"] = "close-widget";
|
|
34
26
|
ConnectEventType["SUCCESS"] = "success";
|
|
@@ -39,9 +31,7 @@ let $a85ecdbd885c58ad$export$e72e7f9969a47dd3;
|
|
|
39
31
|
var $77b6aac5c353d4a9$exports = {};
|
|
40
32
|
|
|
41
33
|
$parcel$export($77b6aac5c353d4a9$exports, "WalletEventType", () => $77b6aac5c353d4a9$export$d9be06b70b28c742);
|
|
42
|
-
|
|
43
|
-
* Enum representing possible Wallet Widget event types.
|
|
44
|
-
*/ let $77b6aac5c353d4a9$export$d9be06b70b28c742;
|
|
34
|
+
var $77b6aac5c353d4a9$export$d9be06b70b28c742;
|
|
45
35
|
(function(WalletEventType) {
|
|
46
36
|
WalletEventType["CLOSE_WIDGET"] = "close-widget";
|
|
47
37
|
WalletEventType["NETWORK_SWITCH"] = "network-switch";
|
|
@@ -54,7 +44,7 @@ var $53d219e7f6bf0cd6$exports = {};
|
|
|
54
44
|
$parcel$export($53d219e7f6bf0cd6$exports, "SwapEventType", () => $53d219e7f6bf0cd6$export$140a49745ab55563);
|
|
55
45
|
/**
|
|
56
46
|
* Enum representing possible Swap Widget event types.
|
|
57
|
-
*/
|
|
47
|
+
*/ var $53d219e7f6bf0cd6$export$140a49745ab55563;
|
|
58
48
|
(function(SwapEventType) {
|
|
59
49
|
SwapEventType["CLOSE_WIDGET"] = "close-widget";
|
|
60
50
|
SwapEventType["SUCCESS"] = "success";
|
|
@@ -68,7 +58,7 @@ var $15cc9e120aa6f3bf$exports = {};
|
|
|
68
58
|
$parcel$export($15cc9e120aa6f3bf$exports, "BridgeEventType", () => $15cc9e120aa6f3bf$export$d1bfa21f7c76447a);
|
|
69
59
|
/**
|
|
70
60
|
* Enum of possible Bridge Widget event types.
|
|
71
|
-
*/
|
|
61
|
+
*/ var $15cc9e120aa6f3bf$export$d1bfa21f7c76447a;
|
|
72
62
|
(function(BridgeEventType) {
|
|
73
63
|
BridgeEventType["CLOSE_WIDGET"] = "close-widget";
|
|
74
64
|
BridgeEventType["SUCCESS"] = "success";
|
|
@@ -76,24 +66,10 @@ $parcel$export($15cc9e120aa6f3bf$exports, "BridgeEventType", () => $15cc9e120aa6
|
|
|
76
66
|
})($15cc9e120aa6f3bf$export$d1bfa21f7c76447a || ($15cc9e120aa6f3bf$export$d1bfa21f7c76447a = {}));
|
|
77
67
|
|
|
78
68
|
|
|
79
|
-
var $98cbcca465beec95$exports = {};
|
|
80
|
-
|
|
81
|
-
$parcel$export($98cbcca465beec95$exports, "BuyEventType", () => $98cbcca465beec95$export$90db5fe1be5993c1);
|
|
82
|
-
/**
|
|
83
|
-
* Enum representing possible Buy Widget event types.
|
|
84
|
-
*/ let $98cbcca465beec95$export$90db5fe1be5993c1;
|
|
85
|
-
(function(BuyEventType) {
|
|
86
|
-
BuyEventType["CLOSE_WIDGET"] = "close-widget";
|
|
87
|
-
BuyEventType["SUCCESS"] = "success";
|
|
88
|
-
BuyEventType["FAILURE"] = "failure";
|
|
89
|
-
BuyEventType["NOT_CONNECTED"] = "not_connected";
|
|
90
|
-
})($98cbcca465beec95$export$90db5fe1be5993c1 || ($98cbcca465beec95$export$90db5fe1be5993c1 = {}));
|
|
91
|
-
|
|
92
|
-
|
|
93
69
|
var $ad06b030b1a3ba34$exports = {};
|
|
94
70
|
|
|
95
71
|
$parcel$export($ad06b030b1a3ba34$exports, "OrchestrationEventType", () => $ad06b030b1a3ba34$export$b80d2daf830437b9);
|
|
96
|
-
|
|
72
|
+
var $ad06b030b1a3ba34$export$b80d2daf830437b9;
|
|
97
73
|
(function(OrchestrationEventType) {
|
|
98
74
|
OrchestrationEventType["REQUEST_CONNECT"] = "request-connect";
|
|
99
75
|
OrchestrationEventType["REQUEST_WALLET"] = "request-wallet";
|
|
@@ -110,7 +86,7 @@ $parcel$export($045213b18e9f1f94$exports, "WidgetTheme", () => $045213b18e9f1f94
|
|
|
110
86
|
$parcel$export($045213b18e9f1f94$exports, "CheckoutWidgetTagNames", () => $045213b18e9f1f94$export$75be0f6af9650f2c);
|
|
111
87
|
/**
|
|
112
88
|
* Enum representing the networks supported by Checkout.
|
|
113
|
-
*/
|
|
89
|
+
*/ var $045213b18e9f1f94$export$95be4ae94445245a;
|
|
114
90
|
(function(Network) {
|
|
115
91
|
Network["ETHEREUM"] = "Ethereum";
|
|
116
92
|
Network["SEPOLIA"] = "Sepolia";
|
|
@@ -119,20 +95,18 @@ $parcel$export($045213b18e9f1f94$exports, "CheckoutWidgetTagNames", () => $04521
|
|
|
119
95
|
Network["POLYGON_ZKEVM_TESTNET"] = "Polygon zkEVM Testnet";
|
|
120
96
|
Network["POLYGON_ZKEVM"] = "Polygon zkEVM";
|
|
121
97
|
})($045213b18e9f1f94$export$95be4ae94445245a || ($045213b18e9f1f94$export$95be4ae94445245a = {}));
|
|
122
|
-
|
|
98
|
+
var $045213b18e9f1f94$export$c88931fdc51854eb;
|
|
123
99
|
(function(WidgetTheme) {
|
|
124
100
|
WidgetTheme["LIGHT"] = "light";
|
|
125
101
|
WidgetTheme["DARK"] = "dark";
|
|
126
102
|
WidgetTheme["CUSTOM"] = "custom";
|
|
127
103
|
})($045213b18e9f1f94$export$c88931fdc51854eb || ($045213b18e9f1f94$export$c88931fdc51854eb = {}));
|
|
128
|
-
|
|
104
|
+
var $045213b18e9f1f94$export$75be0f6af9650f2c;
|
|
129
105
|
(function(CheckoutWidgetTagNames) {
|
|
130
106
|
CheckoutWidgetTagNames["CONNECT"] = "imtbl-connect";
|
|
131
107
|
CheckoutWidgetTagNames["WALLET"] = "imtbl-wallet";
|
|
132
108
|
CheckoutWidgetTagNames["SWAP"] = "imtbl-swap";
|
|
133
|
-
CheckoutWidgetTagNames["BUY"] = "imtbl-buy";
|
|
134
109
|
CheckoutWidgetTagNames["BRIDGE"] = "imtbl-bridge";
|
|
135
|
-
CheckoutWidgetTagNames["EXAMPLE"] = "imtbl-example";
|
|
136
110
|
})($045213b18e9f1f94$export$75be0f6af9650f2c || ($045213b18e9f1f94$export$75be0f6af9650f2c = {}));
|
|
137
111
|
|
|
138
112
|
|
|
@@ -142,11 +116,11 @@ $parcel$export($1f969328e5988c99$exports, "BridgeReact", () => $1f969328e5988c99
|
|
|
142
116
|
|
|
143
117
|
|
|
144
118
|
function $1f969328e5988c99$export$30f61ebf204c69f6(props) {
|
|
145
|
-
const {
|
|
119
|
+
const { walletProvider: walletProvider , fromContractAddress: fromContractAddress , amount: amount , fromNetwork: fromNetwork } = props;
|
|
146
120
|
const config = window.ImtblCheckoutWidgetConfig;
|
|
147
121
|
return /*#__PURE__*/ (jsx)("imtbl-bridge", {
|
|
148
122
|
widgetConfig: config,
|
|
149
|
-
|
|
123
|
+
walletProvider: walletProvider,
|
|
150
124
|
fromContractAddress: fromContractAddress ?? "",
|
|
151
125
|
fromNetwork: fromNetwork ?? "",
|
|
152
126
|
amount: amount ?? ""
|
|
@@ -154,33 +128,17 @@ function $1f969328e5988c99$export$30f61ebf204c69f6(props) {
|
|
|
154
128
|
}
|
|
155
129
|
|
|
156
130
|
|
|
157
|
-
var $f22931ca9e2f35b6$exports = {};
|
|
158
|
-
|
|
159
|
-
$parcel$export($f22931ca9e2f35b6$exports, "BuyReact", () => $f22931ca9e2f35b6$export$d13582032b79b401);
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
function $f22931ca9e2f35b6$export$d13582032b79b401(props) {
|
|
163
|
-
const { providerPreference: providerPreference , orderId: orderId } = props;
|
|
164
|
-
const config = window.ImtblCheckoutWidgetConfig;
|
|
165
|
-
return /*#__PURE__*/ (jsx)("imtbl-buy", {
|
|
166
|
-
widgetConfig: config,
|
|
167
|
-
providerPreference: providerPreference,
|
|
168
|
-
orderId: orderId
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
|
|
173
131
|
var $f2083cd30e2f5c56$exports = {};
|
|
174
132
|
|
|
175
133
|
$parcel$export($f2083cd30e2f5c56$exports, "ConnectReact", () => $f2083cd30e2f5c56$export$49d62957f420a1e2);
|
|
176
134
|
|
|
177
135
|
|
|
178
136
|
function $f2083cd30e2f5c56$export$49d62957f420a1e2(props) {
|
|
179
|
-
const {
|
|
137
|
+
const { walletProvider: walletProvider } = props;
|
|
180
138
|
const config = window.ImtblCheckoutWidgetConfig;
|
|
181
139
|
return /*#__PURE__*/ (jsx)("imtbl-connect", {
|
|
182
140
|
widgetConfig: config,
|
|
183
|
-
|
|
141
|
+
walletProvider: walletProvider
|
|
184
142
|
});
|
|
185
143
|
}
|
|
186
144
|
|
|
@@ -191,11 +149,11 @@ $parcel$export($a4fbb8e3a6aeff58$exports, "SwapReact", () => $a4fbb8e3a6aeff58$e
|
|
|
191
149
|
/* eslint-disable max-len */
|
|
192
150
|
|
|
193
151
|
function $a4fbb8e3a6aeff58$export$971e031379577f4(props) {
|
|
194
|
-
const {
|
|
152
|
+
const { walletProvider: walletProvider , fromContractAddress: fromContractAddress , amount: amount , toContractAddress: toContractAddress } = props;
|
|
195
153
|
const config = window.ImtblCheckoutWidgetConfig;
|
|
196
154
|
return /*#__PURE__*/ (jsx)("imtbl-swap", {
|
|
197
155
|
widgetConfig: config,
|
|
198
|
-
|
|
156
|
+
walletProvider: walletProvider,
|
|
199
157
|
fromContractAddress: fromContractAddress ?? "",
|
|
200
158
|
toContractAddress: toContractAddress ?? "",
|
|
201
159
|
amount: amount ?? ""
|
|
@@ -209,29 +167,11 @@ $parcel$export($89d55ace0f8f1c07$exports, "WalletReact", () => $89d55ace0f8f1c07
|
|
|
209
167
|
|
|
210
168
|
|
|
211
169
|
function $89d55ace0f8f1c07$export$ceaac94f34dba154(props) {
|
|
212
|
-
const {
|
|
170
|
+
const { walletProvider: walletProvider } = props;
|
|
213
171
|
const config = window.ImtblCheckoutWidgetConfig;
|
|
214
172
|
return /*#__PURE__*/ (jsx)("imtbl-wallet", {
|
|
215
173
|
widgetConfig: config,
|
|
216
|
-
|
|
217
|
-
providerPreference: providerPreference ?? "metamask"
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
var $d087956fd1002f80$exports = {};
|
|
223
|
-
|
|
224
|
-
$parcel$export($d087956fd1002f80$exports, "ExampleReact", () => $d087956fd1002f80$export$fa517eee6594d26c);
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
function $d087956fd1002f80$export$fa517eee6594d26c(props) {
|
|
229
|
-
const { providerPreference: // eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
230
|
-
providerPreference , environment: environment , theme: theme } = props;
|
|
231
|
-
return /*#__PURE__*/ (jsx)("imtbl-example", {
|
|
232
|
-
environment: environment ?? (Environment).SANDBOX,
|
|
233
|
-
theme: theme ?? "dark",
|
|
234
|
-
providerPreference: providerPreference
|
|
174
|
+
walletProvider: walletProvider
|
|
235
175
|
});
|
|
236
176
|
}
|
|
237
177
|
|
|
@@ -256,13 +196,13 @@ function $430e3eda76fa4d5f$export$931068bc678f0d73(tagName, provider) {
|
|
|
256
196
|
console.error("no provider parsed");
|
|
257
197
|
return;
|
|
258
198
|
}
|
|
259
|
-
const elements = document.getElementsByTagName(tagName);
|
|
260
|
-
const widget = elements[0];
|
|
261
199
|
let attempts = 0;
|
|
262
200
|
const maxAttempts = 10;
|
|
263
201
|
let timer;
|
|
264
202
|
const attemptToSetProvider = ()=>{
|
|
265
203
|
try {
|
|
204
|
+
const elements = document.getElementsByTagName(tagName);
|
|
205
|
+
const widget = elements[0];
|
|
266
206
|
widget.setProvider(provider);
|
|
267
207
|
window.clearInterval(timer);
|
|
268
208
|
} catch (err) {
|
|
@@ -278,4 +218,4 @@ function $430e3eda76fa4d5f$export$931068bc678f0d73(tagName, provider) {
|
|
|
278
218
|
attemptToSetProvider();
|
|
279
219
|
}
|
|
280
220
|
|
|
281
|
-
export { $15cc9e120aa6f3bf$export$d1bfa21f7c76447a as BridgeEventType, $1f969328e5988c99$export$30f61ebf204c69f6 as BridgeReact, $
|
|
221
|
+
export { $15cc9e120aa6f3bf$export$d1bfa21f7c76447a as BridgeEventType, $1f969328e5988c99$export$30f61ebf204c69f6 as BridgeReact, $045213b18e9f1f94$export$75be0f6af9650f2c as CheckoutWidgetTagNames, $430e3eda76fa4d5f$export$af210a0808087845 as CheckoutWidgets, $a85ecdbd885c58ad$export$e72e7f9969a47dd3 as ConnectEventType, $f2083cd30e2f5c56$export$49d62957f420a1e2 as ConnectReact, $207ed853f11d19d5$export$5a0ace85cae72d45 as IMTBLWidgetEvents, $045213b18e9f1f94$export$95be4ae94445245a as Network, $ad06b030b1a3ba34$export$b80d2daf830437b9 as OrchestrationEventType, $430e3eda76fa4d5f$export$931068bc678f0d73 as SetProvider, $53d219e7f6bf0cd6$export$140a49745ab55563 as SwapEventType, $a4fbb8e3a6aeff58$export$971e031379577f4 as SwapReact, $430e3eda76fa4d5f$export$bf1548ba7e61c17f as UpdateConfig, $77b6aac5c353d4a9$export$d9be06b70b28c742 as WalletEventType, $89d55ace0f8f1c07$export$ceaac94f34dba154 as WalletReact, $045213b18e9f1f94$export$c88931fdc51854eb as WidgetTheme };
|
package/dist/erc20.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
declare type Bytes = ArrayLike<number>;
|
|
2
|
+
declare type BytesLike = Bytes | string;
|
|
2
3
|
interface Hexable {
|
|
3
4
|
toHexString(): string;
|
|
4
5
|
}
|
|
@@ -39,13 +40,181 @@ declare class BigNumber implements Hexable {
|
|
|
39
40
|
static isBigNumber(value: any): value is BigNumber;
|
|
40
41
|
}
|
|
41
42
|
|
|
43
|
+
declare type Deferrable<T> = {
|
|
44
|
+
[K in keyof T]: T[K] | Promise<T[K]>;
|
|
45
|
+
};
|
|
46
|
+
declare class Description<T = any> {
|
|
47
|
+
constructor(info: {
|
|
48
|
+
[K in keyof T]: T[K];
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
declare type Network = {
|
|
53
|
+
name: string;
|
|
54
|
+
chainId: number;
|
|
55
|
+
ensAddress?: string;
|
|
56
|
+
_defaultProvider?: (providers: any, options?: any) => any;
|
|
57
|
+
};
|
|
58
|
+
|
|
42
59
|
declare type AccessList = Array<{
|
|
43
60
|
address: string;
|
|
44
61
|
storageKeys: Array<string>;
|
|
45
62
|
}>;
|
|
46
63
|
declare type AccessListish = AccessList | Array<[string, Array<string>]> | Record<string, Array<string>>;
|
|
64
|
+
interface Transaction {
|
|
65
|
+
hash?: string;
|
|
66
|
+
to?: string;
|
|
67
|
+
from?: string;
|
|
68
|
+
nonce: number;
|
|
69
|
+
gasLimit: BigNumber;
|
|
70
|
+
gasPrice?: BigNumber;
|
|
71
|
+
data: string;
|
|
72
|
+
value: BigNumber;
|
|
73
|
+
chainId: number;
|
|
74
|
+
r?: string;
|
|
75
|
+
s?: string;
|
|
76
|
+
v?: number;
|
|
77
|
+
type?: number | null;
|
|
78
|
+
accessList?: AccessList;
|
|
79
|
+
maxPriorityFeePerGas?: BigNumber;
|
|
80
|
+
maxFeePerGas?: BigNumber;
|
|
81
|
+
}
|
|
47
82
|
|
|
83
|
+
interface OnceBlockable {
|
|
84
|
+
once(eventName: "block", handler: () => void): void;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
declare type TransactionRequest = {
|
|
88
|
+
to?: string;
|
|
89
|
+
from?: string;
|
|
90
|
+
nonce?: BigNumberish;
|
|
91
|
+
gasLimit?: BigNumberish;
|
|
92
|
+
gasPrice?: BigNumberish;
|
|
93
|
+
data?: BytesLike;
|
|
94
|
+
value?: BigNumberish;
|
|
95
|
+
chainId?: number;
|
|
96
|
+
type?: number;
|
|
97
|
+
accessList?: AccessListish;
|
|
98
|
+
maxPriorityFeePerGas?: BigNumberish;
|
|
99
|
+
maxFeePerGas?: BigNumberish;
|
|
100
|
+
customData?: Record<string, any>;
|
|
101
|
+
ccipReadEnabled?: boolean;
|
|
102
|
+
};
|
|
103
|
+
interface TransactionResponse extends Transaction {
|
|
104
|
+
hash: string;
|
|
105
|
+
blockNumber?: number;
|
|
106
|
+
blockHash?: string;
|
|
107
|
+
timestamp?: number;
|
|
108
|
+
confirmations: number;
|
|
109
|
+
from: string;
|
|
110
|
+
raw?: string;
|
|
111
|
+
wait: (confirmations?: number) => Promise<TransactionReceipt>;
|
|
112
|
+
}
|
|
48
113
|
declare type BlockTag = string | number;
|
|
114
|
+
interface _Block {
|
|
115
|
+
hash: string;
|
|
116
|
+
parentHash: string;
|
|
117
|
+
number: number;
|
|
118
|
+
timestamp: number;
|
|
119
|
+
nonce: string;
|
|
120
|
+
difficulty: number;
|
|
121
|
+
_difficulty: BigNumber;
|
|
122
|
+
gasLimit: BigNumber;
|
|
123
|
+
gasUsed: BigNumber;
|
|
124
|
+
miner: string;
|
|
125
|
+
extraData: string;
|
|
126
|
+
baseFeePerGas?: null | BigNumber;
|
|
127
|
+
}
|
|
128
|
+
interface Block extends _Block {
|
|
129
|
+
transactions: Array<string>;
|
|
130
|
+
}
|
|
131
|
+
interface BlockWithTransactions extends _Block {
|
|
132
|
+
transactions: Array<TransactionResponse>;
|
|
133
|
+
}
|
|
134
|
+
interface Log {
|
|
135
|
+
blockNumber: number;
|
|
136
|
+
blockHash: string;
|
|
137
|
+
transactionIndex: number;
|
|
138
|
+
removed: boolean;
|
|
139
|
+
address: string;
|
|
140
|
+
data: string;
|
|
141
|
+
topics: Array<string>;
|
|
142
|
+
transactionHash: string;
|
|
143
|
+
logIndex: number;
|
|
144
|
+
}
|
|
145
|
+
interface TransactionReceipt {
|
|
146
|
+
to: string;
|
|
147
|
+
from: string;
|
|
148
|
+
contractAddress: string;
|
|
149
|
+
transactionIndex: number;
|
|
150
|
+
root?: string;
|
|
151
|
+
gasUsed: BigNumber;
|
|
152
|
+
logsBloom: string;
|
|
153
|
+
blockHash: string;
|
|
154
|
+
transactionHash: string;
|
|
155
|
+
logs: Array<Log>;
|
|
156
|
+
blockNumber: number;
|
|
157
|
+
confirmations: number;
|
|
158
|
+
cumulativeGasUsed: BigNumber;
|
|
159
|
+
effectiveGasPrice: BigNumber;
|
|
160
|
+
byzantium: boolean;
|
|
161
|
+
type: number;
|
|
162
|
+
status?: number;
|
|
163
|
+
}
|
|
164
|
+
interface FeeData {
|
|
165
|
+
lastBaseFeePerGas: null | BigNumber;
|
|
166
|
+
maxFeePerGas: null | BigNumber;
|
|
167
|
+
maxPriorityFeePerGas: null | BigNumber;
|
|
168
|
+
gasPrice: null | BigNumber;
|
|
169
|
+
}
|
|
170
|
+
interface EventFilter {
|
|
171
|
+
address?: string;
|
|
172
|
+
topics?: Array<string | Array<string> | null>;
|
|
173
|
+
}
|
|
174
|
+
interface Filter extends EventFilter {
|
|
175
|
+
fromBlock?: BlockTag;
|
|
176
|
+
toBlock?: BlockTag;
|
|
177
|
+
}
|
|
178
|
+
declare abstract class ForkEvent extends Description {
|
|
179
|
+
readonly expiry: number;
|
|
180
|
+
readonly _isForkEvent?: boolean;
|
|
181
|
+
static isForkEvent(value: any): value is ForkEvent;
|
|
182
|
+
}
|
|
183
|
+
declare type EventType = string | Array<string | Array<string>> | EventFilter | ForkEvent;
|
|
184
|
+
declare type Listener = (...args: Array<any>) => void;
|
|
185
|
+
declare abstract class Provider implements OnceBlockable {
|
|
186
|
+
abstract getNetwork(): Promise<Network>;
|
|
187
|
+
abstract getBlockNumber(): Promise<number>;
|
|
188
|
+
abstract getGasPrice(): Promise<BigNumber>;
|
|
189
|
+
getFeeData(): Promise<FeeData>;
|
|
190
|
+
abstract getBalance(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<BigNumber>;
|
|
191
|
+
abstract getTransactionCount(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<number>;
|
|
192
|
+
abstract getCode(addressOrName: string | Promise<string>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
|
|
193
|
+
abstract getStorageAt(addressOrName: string | Promise<string>, position: BigNumberish | Promise<BigNumberish>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
|
|
194
|
+
abstract sendTransaction(signedTransaction: string | Promise<string>): Promise<TransactionResponse>;
|
|
195
|
+
abstract call(transaction: Deferrable<TransactionRequest>, blockTag?: BlockTag | Promise<BlockTag>): Promise<string>;
|
|
196
|
+
abstract estimateGas(transaction: Deferrable<TransactionRequest>): Promise<BigNumber>;
|
|
197
|
+
abstract getBlock(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>): Promise<Block>;
|
|
198
|
+
abstract getBlockWithTransactions(blockHashOrBlockTag: BlockTag | string | Promise<BlockTag | string>): Promise<BlockWithTransactions>;
|
|
199
|
+
abstract getTransaction(transactionHash: string): Promise<TransactionResponse>;
|
|
200
|
+
abstract getTransactionReceipt(transactionHash: string): Promise<TransactionReceipt>;
|
|
201
|
+
abstract getLogs(filter: Filter): Promise<Array<Log>>;
|
|
202
|
+
abstract resolveName(name: string | Promise<string>): Promise<null | string>;
|
|
203
|
+
abstract lookupAddress(address: string | Promise<string>): Promise<null | string>;
|
|
204
|
+
abstract on(eventName: EventType, listener: Listener): Provider;
|
|
205
|
+
abstract once(eventName: EventType, listener: Listener): Provider;
|
|
206
|
+
abstract emit(eventName: EventType, ...args: Array<any>): boolean;
|
|
207
|
+
abstract listenerCount(eventName?: EventType): number;
|
|
208
|
+
abstract listeners(eventName?: EventType): Array<Listener>;
|
|
209
|
+
abstract off(eventName: EventType, listener?: Listener): Provider;
|
|
210
|
+
abstract removeAllListeners(eventName?: EventType): Provider;
|
|
211
|
+
addListener(eventName: EventType, listener: Listener): Provider;
|
|
212
|
+
removeListener(eventName: EventType, listener: Listener): Provider;
|
|
213
|
+
abstract waitForTransaction(transactionHash: string, confirmations?: number, timeout?: number): Promise<TransactionReceipt>;
|
|
214
|
+
readonly _isProvider: boolean;
|
|
215
|
+
constructor();
|
|
216
|
+
static isProvider(value: any): value is Provider;
|
|
217
|
+
}
|
|
49
218
|
|
|
50
219
|
interface Overrides {
|
|
51
220
|
gasLimit?: BigNumberish | Promise<BigNumberish>;
|
|
@@ -93,33 +262,33 @@ declare class ERC20 {
|
|
|
93
262
|
private readonly contract;
|
|
94
263
|
constructor(contractAddress: string);
|
|
95
264
|
/**
|
|
96
|
-
* @returns a promise that resolves with a
|
|
265
|
+
* @returns a promise that resolves with a BigNumber that represents the amount of tokens in existence
|
|
97
266
|
*/
|
|
98
|
-
totalSupply(overrides?: CallOverrides): Promise<
|
|
267
|
+
totalSupply(provider: Provider, overrides?: CallOverrides): Promise<BigNumber>;
|
|
99
268
|
/**
|
|
100
|
-
* @returns a promise that resolves with a
|
|
269
|
+
* @returns a promise that resolves with a BigNumber that represents the amount of tokens owned by account
|
|
101
270
|
*/
|
|
102
|
-
balanceOf(account: PromiseOrValue<string>, overrides?: CallOverrides): Promise<
|
|
271
|
+
balanceOf(provider: Provider, account: PromiseOrValue<string>, overrides?: CallOverrides): Promise<BigNumber>;
|
|
103
272
|
/**
|
|
104
|
-
* @returns a promise that resolves with a
|
|
273
|
+
* @returns a promise that resolves with a BigNumber that represents the remaining number of tokens that spender will be allowed to spend on behalf of owner through transferFrom
|
|
105
274
|
*/
|
|
106
|
-
|
|
107
|
-
from?: PromiseOrValue<string>;
|
|
108
|
-
}): Promise<PopulatedTransaction>;
|
|
275
|
+
allowance(provider: Provider, owner: PromiseOrValue<string>, spender: PromiseOrValue<string>, overrides?: CallOverrides): Promise<BigNumber>;
|
|
109
276
|
/**
|
|
110
277
|
* @returns a promise that resolves with a populated transaction
|
|
111
278
|
*/
|
|
112
|
-
|
|
279
|
+
populateTransfer(to: PromiseOrValue<string>, amount: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
|
|
280
|
+
from?: PromiseOrValue<string>;
|
|
281
|
+
}): Promise<PopulatedTransaction>;
|
|
113
282
|
/**
|
|
114
283
|
* @returns a promise that resolves with a populated transaction
|
|
115
284
|
*/
|
|
116
|
-
|
|
285
|
+
populateApprove(spender: PromiseOrValue<string>, amount: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
|
|
117
286
|
from?: PromiseOrValue<string>;
|
|
118
287
|
}): Promise<PopulatedTransaction>;
|
|
119
288
|
/**
|
|
120
289
|
* @returns a promise that resolves with a populated transaction
|
|
121
290
|
*/
|
|
122
|
-
|
|
291
|
+
populateTransferFrom(from: PromiseOrValue<string>, to: PromiseOrValue<string>, amount: PromiseOrValue<BigNumberish>, overrides?: Overrides & {
|
|
123
292
|
from?: PromiseOrValue<string>;
|
|
124
293
|
}): Promise<PopulatedTransaction>;
|
|
125
294
|
}
|
package/dist/erc20.js
CHANGED
|
@@ -3,7 +3,7 @@ import { ContractFactory, utils, Contract } from 'ethers';
|
|
|
3
3
|
/* Autogenerated file. Do not edit manually. */
|
|
4
4
|
/* tslint:disable */
|
|
5
5
|
/* eslint-disable */
|
|
6
|
-
const _abi$
|
|
6
|
+
const _abi$4 = [
|
|
7
7
|
{
|
|
8
8
|
inputs: [
|
|
9
9
|
{
|
|
@@ -291,15 +291,15 @@ const _abi$1 = [
|
|
|
291
291
|
type: "function",
|
|
292
292
|
},
|
|
293
293
|
];
|
|
294
|
-
const _bytecode$1 = "0x60806040523480156200001157600080fd5b50604051620017ec380380620017ec8339818101604052810190620000379190620001f6565b8160039081620000489190620004c6565b5080600490816200005a9190620004c6565b505050620005ad565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b620000cc8262000081565b810181811067ffffffffffffffff82111715620000ee57620000ed62000092565b5b80604052505050565b60006200010362000063565b9050620001118282620000c1565b919050565b600067ffffffffffffffff82111562000134576200013362000092565b5b6200013f8262000081565b9050602081019050919050565b60005b838110156200016c5780820151818401526020810190506200014f565b60008484015250505050565b60006200018f620001898462000116565b620000f7565b905082815260208101848484011115620001ae57620001ad6200007c565b5b620001bb8482856200014c565b509392505050565b600082601f830112620001db57620001da62000077565b5b8151620001ed84826020860162000178565b91505092915050565b6000806040838503121562000210576200020f6200006d565b5b600083015167ffffffffffffffff81111562000231576200023062000072565b5b6200023f85828601620001c3565b925050602083015167ffffffffffffffff81111562000263576200026262000072565b5b6200027185828601620001c3565b9150509250929050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680620002ce57607f821691505b602082108103620002e457620002e362000286565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026200034e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200030f565b6200035a86836200030f565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620003a7620003a16200039b8462000372565b6200037c565b62000372565b9050919050565b6000819050919050565b620003c38362000386565b620003db620003d282620003ae565b8484546200031c565b825550505050565b600090565b620003f2620003e3565b620003ff818484620003b8565b505050565b5b8181101562000427576200041b600082620003e8565b60018101905062000405565b5050565b601f82111562000476576200044081620002ea565b6200044b84620002ff565b810160208510156200045b578190505b620004736200046a85620002ff565b83018262000404565b50505b505050565b600082821c905092915050565b60006200049b600019846008026200047b565b1980831691505092915050565b6000620004b6838362000488565b9150826002028217905092915050565b620004d1826200027b565b67ffffffffffffffff811115620004ed57620004ec62000092565b5b620004f98254620002b5565b620005068282856200042b565b600060209050601f8311600181146200053e576000841562000529578287015190505b620005358582620004a8565b865550620005a5565b601f1984166200054e86620002ea565b60005b82811015620005785784890151825560018201915060208501945060208101905062000551565b8683101562000598578489015162000594601f89168262000488565b8355505b6001600288020188555050505b505050505050565b61122f80620005bd6000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461016857806370a082311461019857806395d89b41146101c8578063a457c2d7146101e6578063a9059cbb14610216578063dd62ed3e14610246576100a9565b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100fc57806323b872dd1461011a578063313ce5671461014a575b600080fd5b6100b6610276565b6040516100c39190610b0c565b60405180910390f35b6100e660048036038101906100e19190610bc7565b610308565b6040516100f39190610c22565b60405180910390f35b61010461032b565b6040516101119190610c4c565b60405180910390f35b610134600480360381019061012f9190610c67565b610335565b6040516101419190610c22565b60405180910390f35b610152610364565b60405161015f9190610cd6565b60405180910390f35b610182600480360381019061017d9190610bc7565b61036d565b60405161018f9190610c22565b60405180910390f35b6101b260048036038101906101ad9190610cf1565b6103a4565b6040516101bf9190610c4c565b60405180910390f35b6101d06103ec565b6040516101dd9190610b0c565b60405180910390f35b61020060048036038101906101fb9190610bc7565b61047e565b60405161020d9190610c22565b60405180910390f35b610230600480360381019061022b9190610bc7565b6104f5565b60405161023d9190610c22565b60405180910390f35b610260600480360381019061025b9190610d1e565b610518565b60405161026d9190610c4c565b60405180910390f35b60606003805461028590610d8d565b80601f01602080910402602001604051908101604052809291908181526020018280546102b190610d8d565b80156102fe5780601f106102d3576101008083540402835291602001916102fe565b820191906000526020600020905b8154815290600101906020018083116102e157829003601f168201915b5050505050905090565b60008061031361059f565b90506103208185856105a7565b600191505092915050565b6000600254905090565b60008061034061059f565b905061034d858285610770565b6103588585856107fc565b60019150509392505050565b60006012905090565b60008061037861059f565b905061039981858561038a8589610518565b6103949190610ded565b6105a7565b600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6060600480546103fb90610d8d565b80601f016020809104026020016040519081016040528092919081815260200182805461042790610d8d565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b60008061048961059f565b905060006104978286610518565b9050838110156104dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104d390610e93565b60405180910390fd5b6104e982868684036105a7565b60019250505092915050565b60008061050061059f565b905061050d8185856107fc565b600191505092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610616576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161060d90610f25565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610685576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161067c90610fb7565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516107639190610c4c565b60405180910390a3505050565b600061077c8484610518565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146107f657818110156107e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107df90611023565b60405180910390fd5b6107f584848484036105a7565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361086b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610862906110b5565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036108da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108d190611147565b60405180910390fd5b6108e5838383610a72565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508181101561096b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610962906111d9565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610a599190610c4c565b60405180910390a3610a6c848484610a77565b50505050565b505050565b505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610ab6578082015181840152602081019050610a9b565b60008484015250505050565b6000601f19601f8301169050919050565b6000610ade82610a7c565b610ae88185610a87565b9350610af8818560208601610a98565b610b0181610ac2565b840191505092915050565b60006020820190508181036000830152610b268184610ad3565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610b5e82610b33565b9050919050565b610b6e81610b53565b8114610b7957600080fd5b50565b600081359050610b8b81610b65565b92915050565b6000819050919050565b610ba481610b91565b8114610baf57600080fd5b50565b600081359050610bc181610b9b565b92915050565b60008060408385031215610bde57610bdd610b2e565b5b6000610bec85828601610b7c565b9250506020610bfd85828601610bb2565b9150509250929050565b60008115159050919050565b610c1c81610c07565b82525050565b6000602082019050610c376000830184610c13565b92915050565b610c4681610b91565b82525050565b6000602082019050610c616000830184610c3d565b92915050565b600080600060608486031215610c8057610c7f610b2e565b5b6000610c8e86828701610b7c565b9350506020610c9f86828701610b7c565b9250506040610cb086828701610bb2565b9150509250925092565b600060ff82169050919050565b610cd081610cba565b82525050565b6000602082019050610ceb6000830184610cc7565b92915050565b600060208284031215610d0757610d06610b2e565b5b6000610d1584828501610b7c565b91505092915050565b60008060408385031215610d3557610d34610b2e565b5b6000610d4385828601610b7c565b9250506020610d5485828601610b7c565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680610da557607f821691505b602082108103610db857610db7610d5e565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610df882610b91565b9150610e0383610b91565b9250828201905080821115610e1b57610e1a610dbe565b5b92915050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b6000610e7d602583610a87565b9150610e8882610e21565b604082019050919050565b60006020820190508181036000830152610eac81610e70565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000610f0f602483610a87565b9150610f1a82610eb3565b604082019050919050565b60006020820190508181036000830152610f3e81610f02565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000610fa1602283610a87565b9150610fac82610f45565b604082019050919050565b60006020820190508181036000830152610fd081610f94565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b600061100d601d83610a87565b915061101882610fd7565b602082019050919050565b6000602082019050818103600083015261103c81611000565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b600061109f602583610a87565b91506110aa82611043565b604082019050919050565b600060208201905081810360008301526110ce81611092565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000611131602383610a87565b915061113c826110d5565b604082019050919050565b6000602082019050818103600083015261116081611124565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b60006111c3602683610a87565b91506111ce82611167565b604082019050919050565b600060208201905081810360008301526111f2816111b6565b905091905056fea26469706673582212204188b273199f085e1921ec1a1fa55abdee2e425960bda675a51fac85acd9972064736f6c63430008110033";
|
|
295
|
-
const isSuperArgs$
|
|
294
|
+
const _bytecode$2 = "0x60806040523480156200001157600080fd5b50604051620017ec380380620017ec8339818101604052810190620000379190620001f6565b8160039081620000489190620004c6565b5080600490816200005a9190620004c6565b505050620005ad565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b620000cc8262000081565b810181811067ffffffffffffffff82111715620000ee57620000ed62000092565b5b80604052505050565b60006200010362000063565b9050620001118282620000c1565b919050565b600067ffffffffffffffff82111562000134576200013362000092565b5b6200013f8262000081565b9050602081019050919050565b60005b838110156200016c5780820151818401526020810190506200014f565b60008484015250505050565b60006200018f620001898462000116565b620000f7565b905082815260208101848484011115620001ae57620001ad6200007c565b5b620001bb8482856200014c565b509392505050565b600082601f830112620001db57620001da62000077565b5b8151620001ed84826020860162000178565b91505092915050565b6000806040838503121562000210576200020f6200006d565b5b600083015167ffffffffffffffff81111562000231576200023062000072565b5b6200023f85828601620001c3565b925050602083015167ffffffffffffffff81111562000263576200026262000072565b5b6200027185828601620001c3565b9150509250929050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680620002ce57607f821691505b602082108103620002e457620002e362000286565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026200034e7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826200030f565b6200035a86836200030f565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620003a7620003a16200039b8462000372565b6200037c565b62000372565b9050919050565b6000819050919050565b620003c38362000386565b620003db620003d282620003ae565b8484546200031c565b825550505050565b600090565b620003f2620003e3565b620003ff818484620003b8565b505050565b5b8181101562000427576200041b600082620003e8565b60018101905062000405565b5050565b601f82111562000476576200044081620002ea565b6200044b84620002ff565b810160208510156200045b578190505b620004736200046a85620002ff565b83018262000404565b50505b505050565b600082821c905092915050565b60006200049b600019846008026200047b565b1980831691505092915050565b6000620004b6838362000488565b9150826002028217905092915050565b620004d1826200027b565b67ffffffffffffffff811115620004ed57620004ec62000092565b5b620004f98254620002b5565b620005068282856200042b565b600060209050601f8311600181146200053e576000841562000529578287015190505b620005358582620004a8565b865550620005a5565b601f1984166200054e86620002ea565b60005b82811015620005785784890151825560018201915060208501945060208101905062000551565b8683101562000598578489015162000594601f89168262000488565b8355505b6001600288020188555050505b505050505050565b61122f80620005bd6000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c80633950935111610071578063395093511461016857806370a082311461019857806395d89b41146101c8578063a457c2d7146101e6578063a9059cbb14610216578063dd62ed3e14610246576100a9565b806306fdde03146100ae578063095ea7b3146100cc57806318160ddd146100fc57806323b872dd1461011a578063313ce5671461014a575b600080fd5b6100b6610276565b6040516100c39190610b0c565b60405180910390f35b6100e660048036038101906100e19190610bc7565b610308565b6040516100f39190610c22565b60405180910390f35b61010461032b565b6040516101119190610c4c565b60405180910390f35b610134600480360381019061012f9190610c67565b610335565b6040516101419190610c22565b60405180910390f35b610152610364565b60405161015f9190610cd6565b60405180910390f35b610182600480360381019061017d9190610bc7565b61036d565b60405161018f9190610c22565b60405180910390f35b6101b260048036038101906101ad9190610cf1565b6103a4565b6040516101bf9190610c4c565b60405180910390f35b6101d06103ec565b6040516101dd9190610b0c565b60405180910390f35b61020060048036038101906101fb9190610bc7565b61047e565b60405161020d9190610c22565b60405180910390f35b610230600480360381019061022b9190610bc7565b6104f5565b60405161023d9190610c22565b60405180910390f35b610260600480360381019061025b9190610d1e565b610518565b60405161026d9190610c4c565b60405180910390f35b60606003805461028590610d8d565b80601f01602080910402602001604051908101604052809291908181526020018280546102b190610d8d565b80156102fe5780601f106102d3576101008083540402835291602001916102fe565b820191906000526020600020905b8154815290600101906020018083116102e157829003601f168201915b5050505050905090565b60008061031361059f565b90506103208185856105a7565b600191505092915050565b6000600254905090565b60008061034061059f565b905061034d858285610770565b6103588585856107fc565b60019150509392505050565b60006012905090565b60008061037861059f565b905061039981858561038a8589610518565b6103949190610ded565b6105a7565b600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6060600480546103fb90610d8d565b80601f016020809104026020016040519081016040528092919081815260200182805461042790610d8d565b80156104745780601f1061044957610100808354040283529160200191610474565b820191906000526020600020905b81548152906001019060200180831161045757829003601f168201915b5050505050905090565b60008061048961059f565b905060006104978286610518565b9050838110156104dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104d390610e93565b60405180910390fd5b6104e982868684036105a7565b60019250505092915050565b60008061050061059f565b905061050d8185856107fc565b600191505092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610616576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161060d90610f25565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610685576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161067c90610fb7565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516107639190610c4c565b60405180910390a3505050565b600061077c8484610518565b90507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146107f657818110156107e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107df90611023565b60405180910390fd5b6107f584848484036105a7565b5b50505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361086b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610862906110b5565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036108da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108d190611147565b60405180910390fd5b6108e5838383610a72565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508181101561096b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610962906111d9565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610a599190610c4c565b60405180910390a3610a6c848484610a77565b50505050565b505050565b505050565b600081519050919050565b600082825260208201905092915050565b60005b83811015610ab6578082015181840152602081019050610a9b565b60008484015250505050565b6000601f19601f8301169050919050565b6000610ade82610a7c565b610ae88185610a87565b9350610af8818560208601610a98565b610b0181610ac2565b840191505092915050565b60006020820190508181036000830152610b268184610ad3565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610b5e82610b33565b9050919050565b610b6e81610b53565b8114610b7957600080fd5b50565b600081359050610b8b81610b65565b92915050565b6000819050919050565b610ba481610b91565b8114610baf57600080fd5b50565b600081359050610bc181610b9b565b92915050565b60008060408385031215610bde57610bdd610b2e565b5b6000610bec85828601610b7c565b9250506020610bfd85828601610bb2565b9150509250929050565b60008115159050919050565b610c1c81610c07565b82525050565b6000602082019050610c376000830184610c13565b92915050565b610c4681610b91565b82525050565b6000602082019050610c616000830184610c3d565b92915050565b600080600060608486031215610c8057610c7f610b2e565b5b6000610c8e86828701610b7c565b9350506020610c9f86828701610b7c565b9250506040610cb086828701610bb2565b9150509250925092565b600060ff82169050919050565b610cd081610cba565b82525050565b6000602082019050610ceb6000830184610cc7565b92915050565b600060208284031215610d0757610d06610b2e565b5b6000610d1584828501610b7c565b91505092915050565b60008060408385031215610d3557610d34610b2e565b5b6000610d4385828601610b7c565b9250506020610d5485828601610b7c565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680610da557607f821691505b602082108103610db857610db7610d5e565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000610df882610b91565b9150610e0383610b91565b9250828201905080821115610e1b57610e1a610dbe565b5b92915050565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b6000610e7d602583610a87565b9150610e8882610e21565b604082019050919050565b60006020820190508181036000830152610eac81610e70565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000610f0f602483610a87565b9150610f1a82610eb3565b604082019050919050565b60006020820190508181036000830152610f3e81610f02565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000610fa1602283610a87565b9150610fac82610f45565b604082019050919050565b60006020820190508181036000830152610fd081610f94565b9050919050565b7f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000600082015250565b600061100d601d83610a87565b915061101882610fd7565b602082019050919050565b6000602082019050818103600083015261103c81611000565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b600061109f602583610a87565b91506110aa82611043565b604082019050919050565b600060208201905081810360008301526110ce81611092565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000611131602383610a87565b915061113c826110d5565b604082019050919050565b6000602082019050818103600083015261116081611124565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b60006111c3602683610a87565b91506111ce82611167565b604082019050919050565b600060208201905081810360008301526111f2816111b6565b905091905056fea26469706673582212204188b273199f085e1921ec1a1fa55abdee2e425960bda675a51fac85acd9972064736f6c63430008110033";
|
|
295
|
+
const isSuperArgs$2 = (xs) => xs.length > 1;
|
|
296
296
|
class ERC20__factory extends ContractFactory {
|
|
297
297
|
constructor(...args) {
|
|
298
|
-
if (isSuperArgs$
|
|
298
|
+
if (isSuperArgs$2(args)) {
|
|
299
299
|
super(...args);
|
|
300
300
|
}
|
|
301
301
|
else {
|
|
302
|
-
super(_abi$
|
|
302
|
+
super(_abi$4, _bytecode$2, args[0]);
|
|
303
303
|
}
|
|
304
304
|
}
|
|
305
305
|
deploy(name_, symbol_, overrides) {
|
|
@@ -314,13 +314,13 @@ class ERC20__factory extends ContractFactory {
|
|
|
314
314
|
connect(signer) {
|
|
315
315
|
return super.connect(signer);
|
|
316
316
|
}
|
|
317
|
-
static bytecode = _bytecode$
|
|
318
|
-
static abi = _abi$
|
|
317
|
+
static bytecode = _bytecode$2;
|
|
318
|
+
static abi = _abi$4;
|
|
319
319
|
static createInterface() {
|
|
320
|
-
return new utils.Interface(_abi$
|
|
320
|
+
return new utils.Interface(_abi$4);
|
|
321
321
|
}
|
|
322
322
|
static connect(address, signerOrProvider) {
|
|
323
|
-
return new Contract(address, _abi$
|
|
323
|
+
return new Contract(address, _abi$4, signerOrProvider);
|
|
324
324
|
}
|
|
325
325
|
}
|
|
326
326
|
|
|
@@ -331,39 +331,39 @@ class ERC20 {
|
|
|
331
331
|
this.contract = factory.attach(contractAddress);
|
|
332
332
|
}
|
|
333
333
|
/**
|
|
334
|
-
* @returns a promise that resolves with a
|
|
334
|
+
* @returns a promise that resolves with a BigNumber that represents the amount of tokens in existence
|
|
335
335
|
*/
|
|
336
|
-
async totalSupply(overrides) {
|
|
337
|
-
return this.contract.
|
|
336
|
+
async totalSupply(provider, overrides = {}) {
|
|
337
|
+
return this.contract.connect(provider).totalSupply(overrides);
|
|
338
338
|
}
|
|
339
339
|
/**
|
|
340
|
-
* @returns a promise that resolves with a
|
|
340
|
+
* @returns a promise that resolves with a BigNumber that represents the amount of tokens owned by account
|
|
341
341
|
*/
|
|
342
|
-
async balanceOf(account, overrides) {
|
|
343
|
-
return this.contract.
|
|
342
|
+
async balanceOf(provider, account, overrides = {}) {
|
|
343
|
+
return this.contract.connect(provider).balanceOf(account, overrides);
|
|
344
344
|
}
|
|
345
345
|
/**
|
|
346
|
-
* @returns a promise that resolves with a
|
|
346
|
+
* @returns a promise that resolves with a BigNumber that represents the remaining number of tokens that spender will be allowed to spend on behalf of owner through transferFrom
|
|
347
347
|
*/
|
|
348
|
-
async
|
|
349
|
-
return this.contract.
|
|
348
|
+
async allowance(provider, owner, spender, overrides = {}) {
|
|
349
|
+
return this.contract.connect(provider).allowance(owner, spender, overrides);
|
|
350
350
|
}
|
|
351
351
|
/**
|
|
352
352
|
* @returns a promise that resolves with a populated transaction
|
|
353
353
|
*/
|
|
354
|
-
async
|
|
355
|
-
return this.contract.populateTransaction.
|
|
354
|
+
async populateTransfer(to, amount, overrides) {
|
|
355
|
+
return this.contract.populateTransaction.transfer(to, amount, overrides);
|
|
356
356
|
}
|
|
357
357
|
/**
|
|
358
358
|
* @returns a promise that resolves with a populated transaction
|
|
359
359
|
*/
|
|
360
|
-
async
|
|
360
|
+
async populateApprove(spender, amount, overrides = {}) {
|
|
361
361
|
return this.contract.populateTransaction.approve(spender, amount, overrides);
|
|
362
362
|
}
|
|
363
363
|
/**
|
|
364
364
|
* @returns a promise that resolves with a populated transaction
|
|
365
365
|
*/
|
|
366
|
-
async
|
|
366
|
+
async populateTransferFrom(from, to, amount, overrides = {}) {
|
|
367
367
|
return this.contract.populateTransaction.transferFrom(from, to, amount, overrides);
|
|
368
368
|
}
|
|
369
369
|
}
|