@opensea/seaport-js 1.0.1-beta.0 → 1.0.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.
Files changed (81) hide show
  1. package/LICENSE +7 -0
  2. package/README.md +141 -5
  3. package/lib/abi/ERC1155.d.ts +29 -29
  4. package/lib/abi/ERC1155.js +319 -0
  5. package/lib/abi/ERC1155.js.map +1 -0
  6. package/lib/abi/ERC20.d.ts +29 -29
  7. package/lib/abi/ERC20.js +317 -0
  8. package/lib/abi/ERC20.js.map +1 -0
  9. package/lib/abi/ERC721.d.ts +29 -29
  10. package/lib/abi/ERC721.js +337 -0
  11. package/lib/abi/ERC721.js.map +1 -0
  12. package/lib/abi/Seaport.d.ts +112 -112
  13. package/lib/abi/Seaport.js +2585 -0
  14. package/lib/abi/Seaport.js.map +1 -0
  15. package/lib/constants.d.ts +53 -49
  16. package/lib/constants.js +78 -0
  17. package/lib/constants.js.map +1 -0
  18. package/lib/index.d.ts +2 -2
  19. package/lib/index.js +6 -2
  20. package/lib/index.js.map +1 -1
  21. package/lib/seaport.d.ts +184 -181
  22. package/lib/seaport.js +732 -0
  23. package/lib/seaport.js.map +1 -0
  24. package/lib/typechain/ERC1155.d.ts +189 -0
  25. package/lib/typechain/ERC1155.js +3 -0
  26. package/lib/typechain/ERC1155.js.map +1 -0
  27. package/lib/typechain/ERC20.d.ts +209 -0
  28. package/lib/typechain/ERC20.js +3 -0
  29. package/lib/typechain/ERC20.js.map +1 -0
  30. package/lib/typechain/ERC721.d.ts +220 -0
  31. package/lib/typechain/ERC721.js +3 -0
  32. package/lib/typechain/ERC721.js.map +1 -0
  33. package/lib/typechain/Seaport.d.ts +686 -0
  34. package/lib/typechain/Seaport.js +3 -0
  35. package/lib/typechain/Seaport.js.map +1 -0
  36. package/lib/typechain/common.d.ts +21 -0
  37. package/lib/typechain/common.js +3 -0
  38. package/lib/typechain/common.js.map +1 -0
  39. package/lib/types.d.ts +221 -207
  40. package/lib/types.js +3 -0
  41. package/lib/types.js.map +1 -0
  42. package/lib/utils/approval.d.ts +9 -9
  43. package/lib/utils/approval.js +108 -0
  44. package/lib/utils/approval.js.map +1 -0
  45. package/lib/utils/balance.d.ts +4 -4
  46. package/lib/utils/balance.js +86 -0
  47. package/lib/utils/balance.js.map +1 -0
  48. package/lib/utils/balanceAndApprovalCheck.d.ts +108 -108
  49. package/lib/utils/balanceAndApprovalCheck.js +322 -0
  50. package/lib/utils/balanceAndApprovalCheck.js.map +1 -0
  51. package/lib/utils/criteria.d.ts +14 -13
  52. package/lib/utils/criteria.js +91 -0
  53. package/lib/utils/criteria.js.map +1 -0
  54. package/lib/utils/fulfill.d.ts +84 -84
  55. package/lib/utils/fulfill.js +573 -0
  56. package/lib/utils/fulfill.js.map +1 -0
  57. package/lib/utils/gcd.d.ts +3 -3
  58. package/lib/utils/gcd.js +25 -0
  59. package/lib/utils/gcd.js.map +1 -0
  60. package/lib/utils/item.d.ts +29 -30
  61. package/lib/utils/item.js +136 -0
  62. package/lib/utils/item.js.map +1 -0
  63. package/lib/utils/match.d.ts +49 -49
  64. package/lib/utils/match.js +56 -0
  65. package/lib/utils/match.js.map +1 -0
  66. package/lib/utils/merkletree.d.ts +11 -11
  67. package/lib/utils/merkletree.js +32 -0
  68. package/lib/utils/merkletree.js.map +1 -0
  69. package/lib/utils/order.d.ts +37 -37
  70. package/lib/utils/order.js +224 -0
  71. package/lib/utils/order.js.map +1 -0
  72. package/lib/utils/usecase.d.ts +4 -4
  73. package/lib/utils/usecase.js +158 -0
  74. package/lib/utils/usecase.js.map +1 -0
  75. package/package.json +43 -43
  76. package/lib/index.esm.mjs +0 -2
  77. package/lib/index.esm.mjs.map +0 -1
  78. package/lib/index.modern.mjs +0 -2
  79. package/lib/index.modern.mjs.map +0 -1
  80. package/lib/index.umd.js +0 -2
  81. package/lib/index.umd.js.map +0 -1
package/LICENSE ADDED
@@ -0,0 +1,7 @@
1
+ Copyright 2022 Ozone Networks, Inc.
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4
+
5
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -1,6 +1,14 @@
1
+ [![Version][version-badge]][version-link]
2
+ [![npm][npm-badge]][npm-link]
3
+ [![Test CI][ci-badge]][ci-link]
4
+ [![Code Coverage][coverage-badge]][coverage-link]
5
+ [![License][license-badge]][license-link]
6
+ [![Docs][docs-badge]][docs-link]
7
+ [![Discussions][discussions-badge]][discussions-link]
8
+
1
9
  # Seaport.js
2
10
 
3
- [Seaport](https://github.com/ProjectOpenSea/seaport) is a new marketplace protocol for safely and efficiently buying and selling NFTs. This is a JavaScript library intended to make interfacing with the contract reasonable and easy.
11
+ [Seaport][seaport-link] is a new marketplace protocol for safely and efficiently buying and selling NFTs. This is a JavaScript library intended to make interfacing with the contract reasonable and easy.
4
12
 
5
13
  - [Synopsis](#synopsis)
6
14
  - [Installation](#installation)
@@ -10,7 +18,7 @@
10
18
 
11
19
  ## Synopsis
12
20
 
13
- This is a JavaScript library to help interface with Seaport. It includes various helper methods and constants that makes interfacing with Seaport easier. These include creating orders, fulfilling orders, doing the necessary balance and approval checks, and more. We recommend taking a look at the [Seaport](https://github.com/ProjectOpenSea/seaport) docs to get a better understanding of how the Seaport marketplace works.
21
+ This is a JavaScript library to help interface with Seaport. It includes various helper methods and constants that makes interfacing with Seaport easier. These include creating orders, fulfilling orders, doing the necessary balance and approval checks, and more. We recommend taking a look at the [Seaport][seaport-link] docs to get a better understanding of how the Seaport marketplace works.
14
22
 
15
23
  ## Installation
16
24
 
@@ -18,7 +26,7 @@ We recommend using [nvm](https://github.com/nvm-sh/nvm) to manage Node.js versio
18
26
 
19
27
  Then, in your project, run:
20
28
 
21
- ```
29
+ ```console
22
30
  npm install --save @opensea/seaport-js
23
31
  ```
24
32
 
@@ -26,20 +34,148 @@ npm install --save @opensea/seaport-js
26
34
 
27
35
  Instantiate your instance of seaport using your ethers provider:
28
36
 
29
- ```JavaScript
37
+ ### Examples
38
+
39
+ #### Through a browser provider (i.e. Metamask)
40
+
41
+ ```js
42
+ import { Seaport } from "@opensea/seaport-js";
43
+ import { ethers } from "ethers";
44
+
45
+ const provider = new ethers.providers.Web3Provider(window.ethereum);
46
+
47
+ const seaport = new Seaport(provider);
48
+ ```
49
+
50
+ #### Through a RPC Provider (i.e. Alchemy)
51
+
52
+ ```js
30
53
  import { Seaport } from "@opensea/seaport-js";
54
+ import { ethers } from "ethers";
31
55
 
32
- const provider = ethers.getDefaultProvider();
56
+ const provider = new ethers.provider.JsonRpcProvider(
57
+ "https://<network>.alchemyapi.io/v2/YOUR-API-KEY"
58
+ );
33
59
 
34
60
  const seaport = new Seaport(provider);
35
61
  ```
36
62
 
63
+ #### With custom signer
64
+
65
+ ```js
66
+ import { Seaport } from "@opensea/seaport-js";
67
+ import { ethers } from "ethers";
68
+
69
+ // Provider must be provided to the signer when supplying a custom signer
70
+ const provider = new ethers.provider.JsonRpcProvider(
71
+ "https://<network>.alchemyapi.io/v2/YOUR-API-KEY"
72
+ );
73
+
74
+ const signer = new ethers.Wallet("YOUR_PK", provider);
75
+
76
+ const seaport = new Seaport(signer);
77
+ ```
78
+
37
79
  Look at the relevant definitions in `seaport.ts` in order to see the different functionality this library offers.
38
80
 
39
81
  ### Use Cases
40
82
 
41
83
  Many of the main core flows return _use cases_. What this means is that if you were to create an order (a la `createOrder`), the library helps perform the necessary balance and approval checks based on the `offer` of the order being created. If the `offerer` requires approvals on one asset contract, the `actions` field of the use case would contain an approval action that the user should execute first in order for the trade to succeed in the future.
42
84
 
85
+ ### Examples
86
+
87
+ #### Listing an ERC-721 for 10 ETH and fulfilling it
88
+
89
+ ```js
90
+ const offerer = "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266";
91
+ const fulfiller = "0x70997970c51812dc3a010c7d01b50e0d17dc79c8";
92
+ const { executeAllActions } = await seaport.createOrder(
93
+ {
94
+ offer: [
95
+ {
96
+ itemType: ItemType.ERC721,
97
+ token: "0x8a90cab2b38dba80c64b7734e58ee1db38b8992e",
98
+ identifier: "1",
99
+ },
100
+ ],
101
+ consideration: [
102
+ {
103
+ amount: parseEther("10").toString(),
104
+ recipient: offerer,
105
+ },
106
+ ],
107
+ },
108
+ offerer
109
+ );
110
+
111
+ const order = await executeAllActions();
112
+
113
+ const { executeAllActions: executeAllFulfillActions } =
114
+ await seaport.fulfillOrder({
115
+ order,
116
+ accountAddress: fulfiller,
117
+ });
118
+
119
+ const transaction = executeAllFulfillActions();
120
+ ```
121
+
122
+ #### Making an offer for an ERC-721 for 10 WETH and fulfilling it
123
+
124
+ ```js
125
+ const offerer = "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266";
126
+ const fulfiller = "0x70997970c51812dc3a010c7d01b50e0d17dc79c8";
127
+ const { executeAllActions } = await seaport.createOrder(
128
+ {
129
+ offer: [
130
+ {
131
+ amount: parseEther("10").toString(),
132
+ // WETH
133
+ token: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
134
+ },
135
+ ],
136
+ consideration: [
137
+ {
138
+ itemType: ItemType.ERC721,
139
+ token: "0x8a90cab2b38dba80c64b7734e58ee1db38b8992e",
140
+ identifier: "1",
141
+ recipient: offerer,
142
+ },
143
+ ],
144
+ },
145
+ offerer
146
+ );
147
+
148
+ const order = await executeAllActions();
149
+
150
+ const { executeAllActions: executeAllFulfillActions } =
151
+ await seaport.fulfillOrder({
152
+ order,
153
+ accountAddress: fulfiller.address,
154
+ });
155
+
156
+ const transaction = executeAllFulfillActions();
157
+ ```
158
+
43
159
  ## Contributing
44
160
 
45
161
  See [the contributing guide](CONTRIBUTING.md) for detailed instructions on how to get started with this project.
162
+
163
+ ## License
164
+
165
+ [MIT](LICENSE) Copyright 2022 Ozone Networks, Inc.
166
+
167
+ [seaport-link]: https://github.com/ProjectOpenSea/seaport
168
+ [version-badge]: https://img.shields.io/github/package-json/v/ProjectOpenSea/seaport-js
169
+ [version-link]: https://github.com/ProjectOpenSea/seaport-js/releases
170
+ [npm-badge]: https://img.shields.io/npm/v/@opensea/seaport-js?color=red
171
+ [npm-link]: https://www.npmjs.com/package/@opensea/seaport-js
172
+ [ci-badge]: https://github.com/ProjectOpenSea/seaport-js/actions/workflows/main.yaml/badge.svg
173
+ [ci-link]: https://github.com/ProjectOpenSea/seaport-js/actions/workflows/main.yaml
174
+ [coverage-badge]: https://codecov.io/gh/ProjectOpenSea/seaport-js/branch/main/graph/badge.svg
175
+ [coverage-link]: https://codecov.io/gh/ProjectOpenSea/seaport-js
176
+ [license-badge]: https://img.shields.io/github/license/ProjectOpenSea/seaport-js
177
+ [license-link]: https://github.com/ProjectOpenSea/seaport-js/blob/main/LICENSE
178
+ [docs-badge]: https://img.shields.io/badge/Seaport.js-documentation-informational
179
+ [docs-link]: https://github.com/ProjectOpenSea/seaport-js/blob/main/README.md#getting-started
180
+ [discussions-badge]: https://img.shields.io/badge/Seaport.js-discussions-blueviolet
181
+ [discussions-link]: https://github.com/ProjectOpenSea/seaport-js/discussions
@@ -1,29 +1,29 @@
1
- declare const ERC1155ABI: ({
2
- anonymous: boolean;
3
- inputs: {
4
- indexed: boolean;
5
- internalType: string;
6
- name: string;
7
- type: string;
8
- }[];
9
- name: string;
10
- type: string;
11
- outputs?: undefined;
12
- stateMutability?: undefined;
13
- } | {
14
- inputs: {
15
- internalType: string;
16
- name: string;
17
- type: string;
18
- }[];
19
- name: string;
20
- outputs: {
21
- internalType: string;
22
- name: string;
23
- type: string;
24
- }[];
25
- stateMutability: string;
26
- type: string;
27
- anonymous?: undefined;
28
- })[];
29
- export { ERC1155ABI };
1
+ declare const ERC1155ABI: ({
2
+ anonymous: boolean;
3
+ inputs: {
4
+ indexed: boolean;
5
+ internalType: string;
6
+ name: string;
7
+ type: string;
8
+ }[];
9
+ name: string;
10
+ type: string;
11
+ outputs?: undefined;
12
+ stateMutability?: undefined;
13
+ } | {
14
+ inputs: {
15
+ internalType: string;
16
+ name: string;
17
+ type: string;
18
+ }[];
19
+ name: string;
20
+ outputs: {
21
+ internalType: string;
22
+ name: string;
23
+ type: string;
24
+ }[];
25
+ stateMutability: string;
26
+ type: string;
27
+ anonymous?: undefined;
28
+ })[];
29
+ export { ERC1155ABI };
@@ -0,0 +1,319 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ERC1155ABI = void 0;
4
+ var ERC1155ABI = [
5
+ {
6
+ anonymous: false,
7
+ inputs: [
8
+ {
9
+ indexed: true,
10
+ internalType: "address",
11
+ name: "owner",
12
+ type: "address",
13
+ },
14
+ {
15
+ indexed: true,
16
+ internalType: "address",
17
+ name: "operator",
18
+ type: "address",
19
+ },
20
+ {
21
+ indexed: false,
22
+ internalType: "bool",
23
+ name: "approved",
24
+ type: "bool",
25
+ },
26
+ ],
27
+ name: "ApprovalForAll",
28
+ type: "event",
29
+ },
30
+ {
31
+ anonymous: false,
32
+ inputs: [
33
+ {
34
+ indexed: true,
35
+ internalType: "address",
36
+ name: "operator",
37
+ type: "address",
38
+ },
39
+ {
40
+ indexed: true,
41
+ internalType: "address",
42
+ name: "from",
43
+ type: "address",
44
+ },
45
+ {
46
+ indexed: true,
47
+ internalType: "address",
48
+ name: "to",
49
+ type: "address",
50
+ },
51
+ {
52
+ indexed: false,
53
+ internalType: "uint256[]",
54
+ name: "ids",
55
+ type: "uint256[]",
56
+ },
57
+ {
58
+ indexed: false,
59
+ internalType: "uint256[]",
60
+ name: "amounts",
61
+ type: "uint256[]",
62
+ },
63
+ ],
64
+ name: "TransferBatch",
65
+ type: "event",
66
+ },
67
+ {
68
+ anonymous: false,
69
+ inputs: [
70
+ {
71
+ indexed: true,
72
+ internalType: "address",
73
+ name: "operator",
74
+ type: "address",
75
+ },
76
+ {
77
+ indexed: true,
78
+ internalType: "address",
79
+ name: "from",
80
+ type: "address",
81
+ },
82
+ {
83
+ indexed: true,
84
+ internalType: "address",
85
+ name: "to",
86
+ type: "address",
87
+ },
88
+ {
89
+ indexed: false,
90
+ internalType: "uint256",
91
+ name: "id",
92
+ type: "uint256",
93
+ },
94
+ {
95
+ indexed: false,
96
+ internalType: "uint256",
97
+ name: "amount",
98
+ type: "uint256",
99
+ },
100
+ ],
101
+ name: "TransferSingle",
102
+ type: "event",
103
+ },
104
+ {
105
+ anonymous: false,
106
+ inputs: [
107
+ {
108
+ indexed: false,
109
+ internalType: "string",
110
+ name: "value",
111
+ type: "string",
112
+ },
113
+ {
114
+ indexed: true,
115
+ internalType: "uint256",
116
+ name: "id",
117
+ type: "uint256",
118
+ },
119
+ ],
120
+ name: "URI",
121
+ type: "event",
122
+ },
123
+ {
124
+ inputs: [
125
+ {
126
+ internalType: "address",
127
+ name: "",
128
+ type: "address",
129
+ },
130
+ {
131
+ internalType: "uint256",
132
+ name: "",
133
+ type: "uint256",
134
+ },
135
+ ],
136
+ name: "balanceOf",
137
+ outputs: [
138
+ {
139
+ internalType: "uint256",
140
+ name: "",
141
+ type: "uint256",
142
+ },
143
+ ],
144
+ stateMutability: "view",
145
+ type: "function",
146
+ },
147
+ {
148
+ inputs: [
149
+ {
150
+ internalType: "address[]",
151
+ name: "owners",
152
+ type: "address[]",
153
+ },
154
+ {
155
+ internalType: "uint256[]",
156
+ name: "ids",
157
+ type: "uint256[]",
158
+ },
159
+ ],
160
+ name: "balanceOfBatch",
161
+ outputs: [
162
+ {
163
+ internalType: "uint256[]",
164
+ name: "balances",
165
+ type: "uint256[]",
166
+ },
167
+ ],
168
+ stateMutability: "view",
169
+ type: "function",
170
+ },
171
+ {
172
+ inputs: [
173
+ {
174
+ internalType: "address",
175
+ name: "",
176
+ type: "address",
177
+ },
178
+ {
179
+ internalType: "address",
180
+ name: "",
181
+ type: "address",
182
+ },
183
+ ],
184
+ name: "isApprovedForAll",
185
+ outputs: [
186
+ {
187
+ internalType: "bool",
188
+ name: "",
189
+ type: "bool",
190
+ },
191
+ ],
192
+ stateMutability: "view",
193
+ type: "function",
194
+ },
195
+ {
196
+ inputs: [
197
+ {
198
+ internalType: "address",
199
+ name: "from",
200
+ type: "address",
201
+ },
202
+ {
203
+ internalType: "address",
204
+ name: "to",
205
+ type: "address",
206
+ },
207
+ {
208
+ internalType: "uint256[]",
209
+ name: "ids",
210
+ type: "uint256[]",
211
+ },
212
+ {
213
+ internalType: "uint256[]",
214
+ name: "amounts",
215
+ type: "uint256[]",
216
+ },
217
+ {
218
+ internalType: "bytes",
219
+ name: "data",
220
+ type: "bytes",
221
+ },
222
+ ],
223
+ name: "safeBatchTransferFrom",
224
+ outputs: [],
225
+ stateMutability: "nonpayable",
226
+ type: "function",
227
+ },
228
+ {
229
+ inputs: [
230
+ {
231
+ internalType: "address",
232
+ name: "from",
233
+ type: "address",
234
+ },
235
+ {
236
+ internalType: "address",
237
+ name: "to",
238
+ type: "address",
239
+ },
240
+ {
241
+ internalType: "uint256",
242
+ name: "id",
243
+ type: "uint256",
244
+ },
245
+ {
246
+ internalType: "uint256",
247
+ name: "amount",
248
+ type: "uint256",
249
+ },
250
+ {
251
+ internalType: "bytes",
252
+ name: "data",
253
+ type: "bytes",
254
+ },
255
+ ],
256
+ name: "safeTransferFrom",
257
+ outputs: [],
258
+ stateMutability: "nonpayable",
259
+ type: "function",
260
+ },
261
+ {
262
+ inputs: [
263
+ {
264
+ internalType: "address",
265
+ name: "operator",
266
+ type: "address",
267
+ },
268
+ {
269
+ internalType: "bool",
270
+ name: "approved",
271
+ type: "bool",
272
+ },
273
+ ],
274
+ name: "setApprovalForAll",
275
+ outputs: [],
276
+ stateMutability: "nonpayable",
277
+ type: "function",
278
+ },
279
+ {
280
+ inputs: [
281
+ {
282
+ internalType: "bytes4",
283
+ name: "interfaceId",
284
+ type: "bytes4",
285
+ },
286
+ ],
287
+ name: "supportsInterface",
288
+ outputs: [
289
+ {
290
+ internalType: "bool",
291
+ name: "",
292
+ type: "bool",
293
+ },
294
+ ],
295
+ stateMutability: "pure",
296
+ type: "function",
297
+ },
298
+ {
299
+ inputs: [
300
+ {
301
+ internalType: "uint256",
302
+ name: "id",
303
+ type: "uint256",
304
+ },
305
+ ],
306
+ name: "uri",
307
+ outputs: [
308
+ {
309
+ internalType: "string",
310
+ name: "",
311
+ type: "string",
312
+ },
313
+ ],
314
+ stateMutability: "view",
315
+ type: "function",
316
+ },
317
+ ];
318
+ exports.ERC1155ABI = ERC1155ABI;
319
+ //# sourceMappingURL=ERC1155.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ERC1155.js","sourceRoot":"","sources":["../../src/abi/ERC1155.ts"],"names":[],"mappings":";;;AAAA,IAAM,UAAU,GAAG;IACjB;QACE,SAAS,EAAE,KAAK;QAChB,MAAM,EAAE;YACN;gBACE,OAAO,EAAE,IAAI;gBACb,YAAY,EAAE,SAAS;gBACvB,IAAI,EAAE,OAAO;gBACb,IAAI,EAAE,SAAS;aAChB;YACD;gBACE,OAAO,EAAE,IAAI;gBACb,YAAY,EAAE,SAAS;gBACvB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,SAAS;aAChB;YACD;gBACE,OAAO,EAAE,KAAK;gBACd,YAAY,EAAE,MAAM;gBACpB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,MAAM;aACb;SACF;QACD,IAAI,EAAE,gBAAg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ChB;YACD;gBACE,YAAY,EAAE,OAAO;gBACrB,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,OAAO;aACd;SACF;QACD,IAAI,EAAE,kBAAkB;QACxB,OAAO,EAAE,EAAE;QACX,eAAe,EAAE,YAAY;QAC7B,IAAI,EAAE,UAAU;KACjB;IACD;QACE,MAAM,EAAE;YACN;gBACE,YAAY,EAAE,SAAS;gBACvB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,SAAS;aAChB;YACD;gBACE,YAAY,EAAE,MAAM;gBACpB,IAAI,EAAE,UAAU;gBAChB,IAAI,EAAE,MAAM;aACb;SACF;QACD,IAAI,EAAE,mBAAmB;QACzB,OAAO,EAAE,EAAE;QACX,eAAe,EAAE,YAAY;QAC7B,IAAI,EAAE,UAAU;KACjB;IACD;QACE,MAAM,EAAE;YACN;gBACE,YAAY,EAAE,QAAQ;gBACtB,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,QAAQ;aACf;SACF;QACD,IAAI,EAAE,mBAAmB;QACzB,OAAO,EAAE;YACP;gBACE,YAAY,EAAE,MAAM;gBACpB,IAAI,EAAE,EAAE;gBACR,IAAI,EAAE,MAAM;aACb;SACF;QACD,eAAe,EAAE,MAAM;QACvB,IAAI,EAAE,UAAU;KACjB;IACD;QACE,MAAM,EAAE;YACN;gBACE,YAAY,EAAE,SAAS;gBACvB,IAAI,EAAE,IAAI;gBACV,IAAI,EAAE,SAAS;aAChB;SACF;QACD,IAAI,EAAE,KAAK;QACX,OAAO,EAAE;YACP;gBACE,YAAY,EAAE,QAAQ;gBACtB,IAAI,EAAE,EAAE;gBACR,IAAI,EAAE,QAAQ;aACf;SACF;QACD,eAAe,EAAE,MAAM;QACvB,IAAI,EAAE,UAAU;KACjB;CACF,CAAC;AAEO,gCAAU"}
@@ -1,29 +1,29 @@
1
- declare const ERC20ABI: ({
2
- anonymous: boolean;
3
- inputs: {
4
- indexed: boolean;
5
- internalType: string;
6
- name: string;
7
- type: string;
8
- }[];
9
- name: string;
10
- type: string;
11
- outputs?: undefined;
12
- stateMutability?: undefined;
13
- } | {
14
- inputs: {
15
- internalType: string;
16
- name: string;
17
- type: string;
18
- }[];
19
- name: string;
20
- outputs: {
21
- internalType: string;
22
- name: string;
23
- type: string;
24
- }[];
25
- stateMutability: string;
26
- type: string;
27
- anonymous?: undefined;
28
- })[];
29
- export { ERC20ABI };
1
+ declare const ERC20ABI: ({
2
+ anonymous: boolean;
3
+ inputs: {
4
+ indexed: boolean;
5
+ internalType: string;
6
+ name: string;
7
+ type: string;
8
+ }[];
9
+ name: string;
10
+ type: string;
11
+ outputs?: undefined;
12
+ stateMutability?: undefined;
13
+ } | {
14
+ inputs: {
15
+ internalType: string;
16
+ name: string;
17
+ type: string;
18
+ }[];
19
+ name: string;
20
+ outputs: {
21
+ internalType: string;
22
+ name: string;
23
+ type: string;
24
+ }[];
25
+ stateMutability: string;
26
+ type: string;
27
+ anonymous?: undefined;
28
+ })[];
29
+ export { ERC20ABI };