quantumswap 0.0.6 → 0.0.8

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 (38) hide show
  1. package/README.md +307 -307
  2. package/examples/README.md +46 -46
  3. package/examples/package-lock.json +12 -12
  4. package/examples/package.json +1 -1
  5. package/index.d.ts +1 -1
  6. package/index.js +45 -45
  7. package/package.json +32 -32
  8. package/src/IERC20.d.ts +24 -24
  9. package/src/IERC20.js +348 -348
  10. package/src/IERC20__factory.d.ts +10 -10
  11. package/src/IERC20__factory.js +29 -29
  12. package/src/QuantumSwapV2ERC20.d.ts +24 -24
  13. package/src/QuantumSwapV2ERC20.js +353 -353
  14. package/src/QuantumSwapV2ERC20__factory.d.ts +10 -10
  15. package/src/QuantumSwapV2ERC20__factory.js +29 -29
  16. package/src/QuantumSwapV2Factory.d.ts +24 -24
  17. package/src/QuantumSwapV2Factory.js +310 -310
  18. package/src/QuantumSwapV2Factory__factory.d.ts +10 -10
  19. package/src/QuantumSwapV2Factory__factory.js +29 -29
  20. package/src/QuantumSwapV2Pair.d.ts +44 -44
  21. package/src/QuantumSwapV2Pair.js +847 -847
  22. package/src/QuantumSwapV2Pair__factory.d.ts +10 -10
  23. package/src/QuantumSwapV2Pair__factory.js +29 -29
  24. package/src/QuantumSwapV2Router02.d.ts +47 -47
  25. package/src/QuantumSwapV2Router02.js +1109 -1109
  26. package/src/QuantumSwapV2Router02__factory.d.ts +10 -10
  27. package/src/QuantumSwapV2Router02__factory.js +29 -29
  28. package/src/WQ.d.ts +28 -28
  29. package/src/WQ.js +435 -435
  30. package/src/WQ__factory.d.ts +10 -10
  31. package/src/WQ__factory.js +29 -29
  32. package/src/index.d.ts +14 -14
  33. package/src/index.js +15 -15
  34. package/src/quantumcoin-shims.d.ts +25 -25
  35. package/src/types.d.ts +3 -3
  36. package/src/types.js +3 -3
  37. package/test/e2e/IERC20.e2e.test.js +8 -13
  38. package/test/e2e/all-contracts.e2e.test.js +10 -5
@@ -1,353 +1,353 @@
1
- // Auto-generated by sdkgen
2
- const { Contract } = require("quantumcoin");
3
-
4
- /**
5
- * QuantumSwapV2ERC20 - A typed contract interface for QuantumSwapV2ERC20
6
- */
7
- class QuantumSwapV2ERC20 extends Contract {
8
- static abi = [
9
- {
10
- "inputs": [],
11
- "stateMutability": "nonpayable",
12
- "type": "constructor"
13
- },
14
- {
15
- "anonymous": false,
16
- "inputs": [
17
- {
18
- "indexed": true,
19
- "internalType": "address",
20
- "name": "owner",
21
- "type": "address"
22
- },
23
- {
24
- "indexed": true,
25
- "internalType": "address",
26
- "name": "spender",
27
- "type": "address"
28
- },
29
- {
30
- "indexed": false,
31
- "internalType": "uint256",
32
- "name": "value",
33
- "type": "uint256"
34
- }
35
- ],
36
- "name": "Approval",
37
- "type": "event"
38
- },
39
- {
40
- "anonymous": false,
41
- "inputs": [
42
- {
43
- "indexed": true,
44
- "internalType": "address",
45
- "name": "from",
46
- "type": "address"
47
- },
48
- {
49
- "indexed": true,
50
- "internalType": "address",
51
- "name": "to",
52
- "type": "address"
53
- },
54
- {
55
- "indexed": false,
56
- "internalType": "uint256",
57
- "name": "value",
58
- "type": "uint256"
59
- }
60
- ],
61
- "name": "Transfer",
62
- "type": "event"
63
- },
64
- {
65
- "inputs": [
66
- {
67
- "internalType": "address",
68
- "name": "",
69
- "type": "address"
70
- },
71
- {
72
- "internalType": "address",
73
- "name": "",
74
- "type": "address"
75
- }
76
- ],
77
- "name": "allowance",
78
- "outputs": [
79
- {
80
- "internalType": "uint256",
81
- "name": "",
82
- "type": "uint256"
83
- }
84
- ],
85
- "stateMutability": "view",
86
- "type": "function"
87
- },
88
- {
89
- "inputs": [
90
- {
91
- "internalType": "address",
92
- "name": "spender",
93
- "type": "address"
94
- },
95
- {
96
- "internalType": "uint256",
97
- "name": "value",
98
- "type": "uint256"
99
- }
100
- ],
101
- "name": "approve",
102
- "outputs": [
103
- {
104
- "internalType": "bool",
105
- "name": "",
106
- "type": "bool"
107
- }
108
- ],
109
- "stateMutability": "nonpayable",
110
- "type": "function"
111
- },
112
- {
113
- "inputs": [
114
- {
115
- "internalType": "address",
116
- "name": "",
117
- "type": "address"
118
- }
119
- ],
120
- "name": "balanceOf",
121
- "outputs": [
122
- {
123
- "internalType": "uint256",
124
- "name": "",
125
- "type": "uint256"
126
- }
127
- ],
128
- "stateMutability": "view",
129
- "type": "function"
130
- },
131
- {
132
- "inputs": [],
133
- "name": "decimals",
134
- "outputs": [
135
- {
136
- "internalType": "uint8",
137
- "name": "",
138
- "type": "uint8"
139
- }
140
- ],
141
- "stateMutability": "view",
142
- "type": "function"
143
- },
144
- {
145
- "inputs": [],
146
- "name": "name",
147
- "outputs": [
148
- {
149
- "internalType": "string",
150
- "name": "",
151
- "type": "string"
152
- }
153
- ],
154
- "stateMutability": "view",
155
- "type": "function"
156
- },
157
- {
158
- "inputs": [],
159
- "name": "symbol",
160
- "outputs": [
161
- {
162
- "internalType": "string",
163
- "name": "",
164
- "type": "string"
165
- }
166
- ],
167
- "stateMutability": "view",
168
- "type": "function"
169
- },
170
- {
171
- "inputs": [],
172
- "name": "totalSupply",
173
- "outputs": [
174
- {
175
- "internalType": "uint256",
176
- "name": "",
177
- "type": "uint256"
178
- }
179
- ],
180
- "stateMutability": "view",
181
- "type": "function"
182
- },
183
- {
184
- "inputs": [
185
- {
186
- "internalType": "address",
187
- "name": "to",
188
- "type": "address"
189
- },
190
- {
191
- "internalType": "uint256",
192
- "name": "value",
193
- "type": "uint256"
194
- }
195
- ],
196
- "name": "transfer",
197
- "outputs": [
198
- {
199
- "internalType": "bool",
200
- "name": "",
201
- "type": "bool"
202
- }
203
- ],
204
- "stateMutability": "nonpayable",
205
- "type": "function"
206
- },
207
- {
208
- "inputs": [
209
- {
210
- "internalType": "address",
211
- "name": "from",
212
- "type": "address"
213
- },
214
- {
215
- "internalType": "address",
216
- "name": "to",
217
- "type": "address"
218
- },
219
- {
220
- "internalType": "uint256",
221
- "name": "value",
222
- "type": "uint256"
223
- }
224
- ],
225
- "name": "transferFrom",
226
- "outputs": [
227
- {
228
- "internalType": "bool",
229
- "name": "",
230
- "type": "bool"
231
- }
232
- ],
233
- "stateMutability": "nonpayable",
234
- "type": "function"
235
- }
236
- ];
237
- static bytecode = "0x608060405234801561001057600080fd5b50600046905050610765806100266000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063313ce56711610066578063313ce567146101df57806370a082311461020057806395d89b4114610242578063a9059cbb146102c5578063dd62ed3e1461031357610093565b806306fdde0314610098578063095ea7b31461011b57806318160ddd1461016957806323b872dd14610187575b600080fd5b6100a061035f565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100e05780820151818401526020810190506100c5565b50505050905090810190601f16801561010d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101516004803603604081101561013157600080fd5b810190808035906020019092919080359060200190929190505050610398565b60405180821515815260200191505060405180910390f35b6101716103af565b6040518082815260200191505060405180910390f35b6101c76004803603606081101561019d57600080fd5b810190808035906020019092919080359060200190929190803590602001909291905050506103b5565b60405180821515815260200191505060405180910390f35b6101e7610478565b604051808260ff16815260200191505060405180910390f35b61022c6004803603602081101561021657600080fd5b810190808035906020019092919050505061047d565b6040518082815260200191505060405180910390f35b61024a610495565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561028a57808201518184015260208101905061026f565b50505050905090810190601f1680156102b75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102fb600480360360408110156102db57600080fd5b8101908080359060200190929190803590602001909291905050506104ce565b60405180821515815260200191505060405180910390f35b6103496004803603604081101561032957600080fd5b8101908080359060200190929190803590602001909291905050506104e5565b6040518082815260200191505060405180910390f35b6040518060400160405280600a81526020017f556e69737761702056320000000000000000000000000000000000000000000081525081565b60006103a533848461050a565b6001905092915050565b60005481565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600260008681526020019081526020016000206000338152602001908152602001600020541461046257610439826002600087815260200190815260200160002060003381526020019081526020016000205461057190919063ffffffff16565b600260008681526020019081526020016000206000338152602001908152602001600020819055505b61046d8484846105f4565b600190509392505050565b601281565b60016020528060005260406000206000915090505481565b6040518060400160405280600681526020017f554e492d5632000000000000000000000000000000000000000000000000000081525081565b60006104db3384846105f4565b6001905092915050565b6002602052816000526040600020602052806000526040600020600091509150505481565b806002600085815260200190815260200160002060008481526020019081526020016000208190555081837f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b60008282840391508111156105ee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f64732d6d6174682d7375622d756e646572666c6f77000000000000000000000081525060200191505060405180910390fd5b92915050565b61061a81600160008681526020019081526020016000205461057190919063ffffffff16565b60016000858152602001908152602001600020819055506106578160016000858152602001908152602001600020546106ac90919063ffffffff16565b600160008481526020019081526020016000208190555081837fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000828284019150811015610729576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f64732d6d6174682d6164642d6f766572666c6f7700000000000000000000000081525060200191505060405180910390fd5b9291505056fea2646970667358221220e48a2d0a171f8442d84eea3ddb68d815456dae50840418568f564b3e96ede40d64736f6c63430007060033";
238
-
239
- static connect(address, runner) {
240
- return new QuantumSwapV2ERC20(address, runner);
241
- }
242
-
243
- constructor(address, runner, _deployTx) {
244
- super(address, QuantumSwapV2ERC20.abi, runner, QuantumSwapV2ERC20.bytecode);
245
- this._deployTx = _deployTx;
246
-
247
- // Typed populateTransaction helpers (offline signing / sendRawTransaction flows)
248
- this.populateTransaction = {
249
- approve: async (spender, value, overrides) => {
250
- const data = this.interface.encodeFunctionData("approve", [spender, value]);
251
- return { to: this.address, data, ...(overrides || {}) };
252
- },
253
- transfer: async (to, value, overrides) => {
254
- const data = this.interface.encodeFunctionData("transfer", [to, value]);
255
- return { to: this.address, data, ...(overrides || {}) };
256
- },
257
- transferFrom: async (from, to, value, overrides) => {
258
- const data = this.interface.encodeFunctionData("transferFrom", [from, to, value]);
259
- return { to: this.address, data, ...(overrides || {}) };
260
- },
261
- };
262
- }
263
-
264
- /**
265
- * allowance
266
- * @param {import("quantumcoin/types").AddressLike} arg
267
- * @param {import("quantumcoin/types").AddressLike} arg
268
- * @returns {Promise<import("quantumcoin/types").Uint256>}
269
- */
270
- async allowance(arg0, arg1) {
271
- const res = await this.call("allowance", [arg0, arg1]);
272
- return Array.isArray(res) ? res[0] : res;
273
- }
274
-
275
- /**
276
- * approve
277
- * @param {import("quantumcoin/types").AddressLike} spender
278
- * @param {import("quantumcoin/types").Uint256Like} value
279
- * @returns {Promise<import("quantumcoin").ContractTransactionResponse>}
280
- */
281
- async approve(spender, value, overrides) {
282
- return this.send("approve", [spender, value], overrides);
283
- }
284
-
285
- /**
286
- * balanceOf
287
- * @param {import("quantumcoin/types").AddressLike} arg
288
- * @returns {Promise<import("quantumcoin/types").Uint256>}
289
- */
290
- async balanceOf(arg0) {
291
- const res = await this.call("balanceOf", [arg0]);
292
- return Array.isArray(res) ? res[0] : res;
293
- }
294
-
295
- /**
296
- * decimals
297
- * @returns {Promise<import("quantumcoin/types").Uint8>}
298
- */
299
- async decimals() {
300
- const res = await this.call("decimals", []);
301
- return Array.isArray(res) ? res[0] : res;
302
- }
303
-
304
- /**
305
- * name
306
- * @returns {Promise<string>}
307
- */
308
- async name() {
309
- const res = await this.call("name", []);
310
- return Array.isArray(res) ? res[0] : res;
311
- }
312
-
313
- /**
314
- * symbol
315
- * @returns {Promise<string>}
316
- */
317
- async symbol() {
318
- const res = await this.call("symbol", []);
319
- return Array.isArray(res) ? res[0] : res;
320
- }
321
-
322
- /**
323
- * totalSupply
324
- * @returns {Promise<import("quantumcoin/types").Uint256>}
325
- */
326
- async totalSupply() {
327
- const res = await this.call("totalSupply", []);
328
- return Array.isArray(res) ? res[0] : res;
329
- }
330
-
331
- /**
332
- * transfer
333
- * @param {import("quantumcoin/types").AddressLike} to
334
- * @param {import("quantumcoin/types").Uint256Like} value
335
- * @returns {Promise<import("quantumcoin").ContractTransactionResponse>}
336
- */
337
- async transfer(to, value, overrides) {
338
- return this.send("transfer", [to, value], overrides);
339
- }
340
-
341
- /**
342
- * transferFrom
343
- * @param {import("quantumcoin/types").AddressLike} from
344
- * @param {import("quantumcoin/types").AddressLike} to
345
- * @param {import("quantumcoin/types").Uint256Like} value
346
- * @returns {Promise<import("quantumcoin").ContractTransactionResponse>}
347
- */
348
- async transferFrom(from, to, value, overrides) {
349
- return this.send("transferFrom", [from, to, value], overrides);
350
- }
351
- }
352
-
353
- module.exports = { QuantumSwapV2ERC20 };
1
+ // Auto-generated by sdkgen
2
+ const { Contract } = require("quantumcoin");
3
+
4
+ /**
5
+ * QuantumSwapV2ERC20 - A typed contract interface for QuantumSwapV2ERC20
6
+ */
7
+ class QuantumSwapV2ERC20 extends Contract {
8
+ static abi = [
9
+ {
10
+ "inputs": [],
11
+ "stateMutability": "nonpayable",
12
+ "type": "constructor"
13
+ },
14
+ {
15
+ "anonymous": false,
16
+ "inputs": [
17
+ {
18
+ "indexed": true,
19
+ "internalType": "address",
20
+ "name": "owner",
21
+ "type": "address"
22
+ },
23
+ {
24
+ "indexed": true,
25
+ "internalType": "address",
26
+ "name": "spender",
27
+ "type": "address"
28
+ },
29
+ {
30
+ "indexed": false,
31
+ "internalType": "uint256",
32
+ "name": "value",
33
+ "type": "uint256"
34
+ }
35
+ ],
36
+ "name": "Approval",
37
+ "type": "event"
38
+ },
39
+ {
40
+ "anonymous": false,
41
+ "inputs": [
42
+ {
43
+ "indexed": true,
44
+ "internalType": "address",
45
+ "name": "from",
46
+ "type": "address"
47
+ },
48
+ {
49
+ "indexed": true,
50
+ "internalType": "address",
51
+ "name": "to",
52
+ "type": "address"
53
+ },
54
+ {
55
+ "indexed": false,
56
+ "internalType": "uint256",
57
+ "name": "value",
58
+ "type": "uint256"
59
+ }
60
+ ],
61
+ "name": "Transfer",
62
+ "type": "event"
63
+ },
64
+ {
65
+ "inputs": [
66
+ {
67
+ "internalType": "address",
68
+ "name": "",
69
+ "type": "address"
70
+ },
71
+ {
72
+ "internalType": "address",
73
+ "name": "",
74
+ "type": "address"
75
+ }
76
+ ],
77
+ "name": "allowance",
78
+ "outputs": [
79
+ {
80
+ "internalType": "uint256",
81
+ "name": "",
82
+ "type": "uint256"
83
+ }
84
+ ],
85
+ "stateMutability": "view",
86
+ "type": "function"
87
+ },
88
+ {
89
+ "inputs": [
90
+ {
91
+ "internalType": "address",
92
+ "name": "spender",
93
+ "type": "address"
94
+ },
95
+ {
96
+ "internalType": "uint256",
97
+ "name": "value",
98
+ "type": "uint256"
99
+ }
100
+ ],
101
+ "name": "approve",
102
+ "outputs": [
103
+ {
104
+ "internalType": "bool",
105
+ "name": "",
106
+ "type": "bool"
107
+ }
108
+ ],
109
+ "stateMutability": "nonpayable",
110
+ "type": "function"
111
+ },
112
+ {
113
+ "inputs": [
114
+ {
115
+ "internalType": "address",
116
+ "name": "",
117
+ "type": "address"
118
+ }
119
+ ],
120
+ "name": "balanceOf",
121
+ "outputs": [
122
+ {
123
+ "internalType": "uint256",
124
+ "name": "",
125
+ "type": "uint256"
126
+ }
127
+ ],
128
+ "stateMutability": "view",
129
+ "type": "function"
130
+ },
131
+ {
132
+ "inputs": [],
133
+ "name": "decimals",
134
+ "outputs": [
135
+ {
136
+ "internalType": "uint8",
137
+ "name": "",
138
+ "type": "uint8"
139
+ }
140
+ ],
141
+ "stateMutability": "view",
142
+ "type": "function"
143
+ },
144
+ {
145
+ "inputs": [],
146
+ "name": "name",
147
+ "outputs": [
148
+ {
149
+ "internalType": "string",
150
+ "name": "",
151
+ "type": "string"
152
+ }
153
+ ],
154
+ "stateMutability": "view",
155
+ "type": "function"
156
+ },
157
+ {
158
+ "inputs": [],
159
+ "name": "symbol",
160
+ "outputs": [
161
+ {
162
+ "internalType": "string",
163
+ "name": "",
164
+ "type": "string"
165
+ }
166
+ ],
167
+ "stateMutability": "view",
168
+ "type": "function"
169
+ },
170
+ {
171
+ "inputs": [],
172
+ "name": "totalSupply",
173
+ "outputs": [
174
+ {
175
+ "internalType": "uint256",
176
+ "name": "",
177
+ "type": "uint256"
178
+ }
179
+ ],
180
+ "stateMutability": "view",
181
+ "type": "function"
182
+ },
183
+ {
184
+ "inputs": [
185
+ {
186
+ "internalType": "address",
187
+ "name": "to",
188
+ "type": "address"
189
+ },
190
+ {
191
+ "internalType": "uint256",
192
+ "name": "value",
193
+ "type": "uint256"
194
+ }
195
+ ],
196
+ "name": "transfer",
197
+ "outputs": [
198
+ {
199
+ "internalType": "bool",
200
+ "name": "",
201
+ "type": "bool"
202
+ }
203
+ ],
204
+ "stateMutability": "nonpayable",
205
+ "type": "function"
206
+ },
207
+ {
208
+ "inputs": [
209
+ {
210
+ "internalType": "address",
211
+ "name": "from",
212
+ "type": "address"
213
+ },
214
+ {
215
+ "internalType": "address",
216
+ "name": "to",
217
+ "type": "address"
218
+ },
219
+ {
220
+ "internalType": "uint256",
221
+ "name": "value",
222
+ "type": "uint256"
223
+ }
224
+ ],
225
+ "name": "transferFrom",
226
+ "outputs": [
227
+ {
228
+ "internalType": "bool",
229
+ "name": "",
230
+ "type": "bool"
231
+ }
232
+ ],
233
+ "stateMutability": "nonpayable",
234
+ "type": "function"
235
+ }
236
+ ];
237
+ static bytecode = "0x608060405234801561001057600080fd5b50600046905050610765806100266000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063313ce56711610066578063313ce567146101df57806370a082311461020057806395d89b4114610242578063a9059cbb146102c5578063dd62ed3e1461031357610093565b806306fdde0314610098578063095ea7b31461011b57806318160ddd1461016957806323b872dd14610187575b600080fd5b6100a061035f565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100e05780820151818401526020810190506100c5565b50505050905090810190601f16801561010d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101516004803603604081101561013157600080fd5b810190808035906020019092919080359060200190929190505050610398565b60405180821515815260200191505060405180910390f35b6101716103af565b6040518082815260200191505060405180910390f35b6101c76004803603606081101561019d57600080fd5b810190808035906020019092919080359060200190929190803590602001909291905050506103b5565b60405180821515815260200191505060405180910390f35b6101e7610478565b604051808260ff16815260200191505060405180910390f35b61022c6004803603602081101561021657600080fd5b810190808035906020019092919050505061047d565b6040518082815260200191505060405180910390f35b61024a610495565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561028a57808201518184015260208101905061026f565b50505050905090810190601f1680156102b75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102fb600480360360408110156102db57600080fd5b8101908080359060200190929190803590602001909291905050506104ce565b60405180821515815260200191505060405180910390f35b6103496004803603604081101561032957600080fd5b8101908080359060200190929190803590602001909291905050506104e5565b6040518082815260200191505060405180910390f35b6040518060400160405280600a81526020017f556e69737761702056320000000000000000000000000000000000000000000081525081565b60006103a533848461050a565b6001905092915050565b60005481565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600260008681526020019081526020016000206000338152602001908152602001600020541461046257610439826002600087815260200190815260200160002060003381526020019081526020016000205461057190919063ffffffff16565b600260008681526020019081526020016000206000338152602001908152602001600020819055505b61046d8484846105f4565b600190509392505050565b601281565b60016020528060005260406000206000915090505481565b6040518060400160405280600681526020017f554e492d5632000000000000000000000000000000000000000000000000000081525081565b60006104db3384846105f4565b6001905092915050565b6002602052816000526040600020602052806000526040600020600091509150505481565b806002600085815260200190815260200160002060008481526020019081526020016000208190555081837f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b60008282840391508111156105ee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f64732d6d6174682d7375622d756e646572666c6f77000000000000000000000081525060200191505060405180910390fd5b92915050565b61061a81600160008681526020019081526020016000205461057190919063ffffffff16565b60016000858152602001908152602001600020819055506106578160016000858152602001908152602001600020546106ac90919063ffffffff16565b600160008481526020019081526020016000208190555081837fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000828284019150811015610729576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f64732d6d6174682d6164642d6f766572666c6f7700000000000000000000000081525060200191505060405180910390fd5b9291505056fea2646970667358221220e48a2d0a171f8442d84eea3ddb68d815456dae50840418568f564b3e96ede40d64736f6c63430007060033";
238
+
239
+ static connect(address, runner) {
240
+ return new QuantumSwapV2ERC20(address, runner);
241
+ }
242
+
243
+ constructor(address, runner, _deployTx) {
244
+ super(address, QuantumSwapV2ERC20.abi, runner, QuantumSwapV2ERC20.bytecode);
245
+ this._deployTx = _deployTx;
246
+
247
+ // Typed populateTransaction helpers (offline signing / sendRawTransaction flows)
248
+ this.populateTransaction = {
249
+ approve: async (spender, value, overrides) => {
250
+ const data = this.interface.encodeFunctionData("approve", [spender, value]);
251
+ return { to: this.address, data, ...(overrides || {}) };
252
+ },
253
+ transfer: async (to, value, overrides) => {
254
+ const data = this.interface.encodeFunctionData("transfer", [to, value]);
255
+ return { to: this.address, data, ...(overrides || {}) };
256
+ },
257
+ transferFrom: async (from, to, value, overrides) => {
258
+ const data = this.interface.encodeFunctionData("transferFrom", [from, to, value]);
259
+ return { to: this.address, data, ...(overrides || {}) };
260
+ },
261
+ };
262
+ }
263
+
264
+ /**
265
+ * allowance
266
+ * @param {import("quantumcoin/types").AddressLike} arg
267
+ * @param {import("quantumcoin/types").AddressLike} arg
268
+ * @returns {Promise<import("quantumcoin/types").Uint256>}
269
+ */
270
+ async allowance(arg0, arg1) {
271
+ const res = await this.call("allowance", [arg0, arg1]);
272
+ return Array.isArray(res) ? res[0] : res;
273
+ }
274
+
275
+ /**
276
+ * approve
277
+ * @param {import("quantumcoin/types").AddressLike} spender
278
+ * @param {import("quantumcoin/types").Uint256Like} value
279
+ * @returns {Promise<import("quantumcoin").ContractTransactionResponse>}
280
+ */
281
+ async approve(spender, value, overrides) {
282
+ return this.send("approve", [spender, value], overrides);
283
+ }
284
+
285
+ /**
286
+ * balanceOf
287
+ * @param {import("quantumcoin/types").AddressLike} arg
288
+ * @returns {Promise<import("quantumcoin/types").Uint256>}
289
+ */
290
+ async balanceOf(arg0) {
291
+ const res = await this.call("balanceOf", [arg0]);
292
+ return Array.isArray(res) ? res[0] : res;
293
+ }
294
+
295
+ /**
296
+ * decimals
297
+ * @returns {Promise<import("quantumcoin/types").Uint8>}
298
+ */
299
+ async decimals() {
300
+ const res = await this.call("decimals", []);
301
+ return Array.isArray(res) ? res[0] : res;
302
+ }
303
+
304
+ /**
305
+ * name
306
+ * @returns {Promise<string>}
307
+ */
308
+ async name() {
309
+ const res = await this.call("name", []);
310
+ return Array.isArray(res) ? res[0] : res;
311
+ }
312
+
313
+ /**
314
+ * symbol
315
+ * @returns {Promise<string>}
316
+ */
317
+ async symbol() {
318
+ const res = await this.call("symbol", []);
319
+ return Array.isArray(res) ? res[0] : res;
320
+ }
321
+
322
+ /**
323
+ * totalSupply
324
+ * @returns {Promise<import("quantumcoin/types").Uint256>}
325
+ */
326
+ async totalSupply() {
327
+ const res = await this.call("totalSupply", []);
328
+ return Array.isArray(res) ? res[0] : res;
329
+ }
330
+
331
+ /**
332
+ * transfer
333
+ * @param {import("quantumcoin/types").AddressLike} to
334
+ * @param {import("quantumcoin/types").Uint256Like} value
335
+ * @returns {Promise<import("quantumcoin").ContractTransactionResponse>}
336
+ */
337
+ async transfer(to, value, overrides) {
338
+ return this.send("transfer", [to, value], overrides);
339
+ }
340
+
341
+ /**
342
+ * transferFrom
343
+ * @param {import("quantumcoin/types").AddressLike} from
344
+ * @param {import("quantumcoin/types").AddressLike} to
345
+ * @param {import("quantumcoin/types").Uint256Like} value
346
+ * @returns {Promise<import("quantumcoin").ContractTransactionResponse>}
347
+ */
348
+ async transferFrom(from, to, value, overrides) {
349
+ return this.send("transferFrom", [from, to, value], overrides);
350
+ }
351
+ }
352
+
353
+ module.exports = { QuantumSwapV2ERC20 };