Commit 402252b
authored
feat: auto-approve erc20 token (#658)
* test: enhance Erc20 Token Fee Utilities tests with new scenarios and assertions
* feat: enhance contract fee handling with separate ERC20 and WIP payment methods
* refactor: replace Erc20Spender with TokenSpender and integrate WIP token handling across multiple resources
* feat: implement spender merging logic and enhance ERC20 payment handling in contract calls
* refactor: streamline ERC20 payment handling and introduce token spender grouping logic
* feat: enhance fee handle comments
* Feat: Modify logic to auto approve in ipAsset module
* refactor: update IPAssetClient to use unified options structure for WIP and ERC20 handling
* feat: update RegisterIpAssetRequest and RegisterDerivativeIpAssetRequest to use unified ERC20 and WIP options; enhance fee handling tests for ERC20 integration
* test: add integration tests for registering IP assets with WIP token, including derivative IP handling and license terms validation
* feat: update IPAssetClient and tests to support mixed ERC20 and WIP token fees, enhancing fee calculation and registration workflows
* fix: update documentation and types to replace `wipOptions` with `options` for consistency in IP asset handling
* refactor: replace all instances of `wip` with `token` in imports and options for consistency across SDK resources
* fix: update IPAssetClient to include erc20Options in transaction handling, ensuring proper fee management for public and private minting
* refactor: streamline token handling in IPAssetClient and update documentation for clarity on erc20 and wrapped IP token usage
* refactor: unify options handling in IPAssetClient and update response structures for royalty token distribution requests
* refactor: enhance documentation and update variable names in IPAssetClient tests for clarity on ERC20 and WIP token usage
* refactor: clean up imports and improve type formatting in license and registerHelper files for consistency
* refactor: add comments for clarity on WIP token usage in dispute handling and improve type documentation for token spending
* test
* refactor: update options handling in IPAssetClient to disable multicall for WIP token registration and clean up test case for clarity1 parent d8ee21e commit 402252b
File tree
17 files changed
+1629
-752
lines changed- packages/core-sdk
- src
- resources
- types
- resources
- utils
- utils
- registrationUtils
- test
- integration
- unit
- resources
- utils
17 files changed
+1629
-752
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
104 | 103 | | |
105 | 104 | | |
106 | 105 | | |
| |||
114 | 113 | | |
115 | 114 | | |
116 | 115 | | |
| 116 | + | |
| 117 | + | |
117 | 118 | | |
118 | 119 | | |
119 | 120 | | |
| |||
319 | 320 | | |
320 | 321 | | |
321 | 322 | | |
322 | | - | |
323 | 323 | | |
324 | 324 | | |
325 | 325 | | |
| |||
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
| 339 | + | |
| 340 | + | |
339 | 341 | | |
340 | 342 | | |
341 | 343 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | | - | |
| 50 | + | |
| 51 | + | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | | - | |
| 235 | + | |
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
242 | | - | |
243 | | - | |
| 242 | + | |
| 243 | + | |
244 | 244 | | |
245 | 245 | | |
246 | | - | |
| 246 | + | |
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
250 | | - | |
251 | | - | |
| 250 | + | |
252 | 251 | | |
253 | 252 | | |
254 | 253 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
| 269 | + | |
277 | 270 | | |
278 | 271 | | |
279 | 272 | | |
| |||
309 | 302 | | |
310 | 303 | | |
311 | 304 | | |
312 | | - | |
| 305 | + | |
313 | 306 | | |
314 | 307 | | |
315 | 308 | | |
| 309 | + | |
316 | 310 | | |
317 | 311 | | |
318 | 312 | | |
319 | | - | |
320 | | - | |
| 313 | + | |
321 | 314 | | |
322 | 315 | | |
323 | 316 | | |
324 | 317 | | |
325 | 318 | | |
326 | | - | |
327 | 319 | | |
328 | 320 | | |
329 | 321 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
| 121 | + | |
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
| 144 | + | |
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
186 | | - | |
187 | | - | |
| 186 | + | |
188 | 187 | | |
189 | 188 | | |
190 | 189 | | |
| |||
199 | 198 | | |
200 | 199 | | |
201 | 200 | | |
202 | | - | |
| 201 | + | |
203 | 202 | | |
204 | 203 | | |
205 | 204 | | |
| |||
227 | 226 | | |
228 | 227 | | |
229 | 228 | | |
230 | | - | |
| 229 | + | |
231 | 230 | | |
232 | 231 | | |
233 | 232 | | |
| |||
245 | 244 | | |
246 | 245 | | |
247 | 246 | | |
248 | | - | |
| 247 | + | |
249 | 248 | | |
250 | 249 | | |
251 | | - | |
| 250 | + | |
252 | 251 | | |
253 | 252 | | |
254 | 253 | | |
| |||
264 | 263 | | |
265 | 264 | | |
266 | 265 | | |
267 | | - | |
| 266 | + | |
268 | 267 | | |
269 | 268 | | |
270 | 269 | | |
| |||
277 | 276 | | |
278 | 277 | | |
279 | 278 | | |
280 | | - | |
| 279 | + | |
281 | 280 | | |
282 | 281 | | |
283 | 282 | | |
| |||
351 | 350 | | |
352 | 351 | | |
353 | 352 | | |
354 | | - | |
| 353 | + | |
355 | 354 | | |
356 | 355 | | |
357 | 356 | | |
| |||
377 | 376 | | |
378 | 377 | | |
379 | 378 | | |
380 | | - | |
| 379 | + | |
381 | 380 | | |
382 | 381 | | |
383 | 382 | | |
| |||
403 | 402 | | |
404 | 403 | | |
405 | 404 | | |
406 | | - | |
| 405 | + | |
407 | 406 | | |
408 | 407 | | |
409 | 408 | | |
410 | 409 | | |
411 | 410 | | |
412 | 411 | | |
413 | 412 | | |
414 | | - | |
| 413 | + | |
415 | 414 | | |
416 | 415 | | |
417 | 416 | | |
| |||
420 | 419 | | |
421 | 420 | | |
422 | 421 | | |
423 | | - | |
424 | 422 | | |
425 | 423 | | |
426 | 424 | | |
| |||
456 | 454 | | |
457 | 455 | | |
458 | 456 | | |
459 | | - | |
460 | | - | |
| 457 | + | |
461 | 458 | | |
462 | 459 | | |
463 | 460 | | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
464 | 466 | | |
465 | 467 | | |
466 | 468 | | |
467 | 469 | | |
468 | 470 | | |
469 | | - | |
| 471 | + | |
470 | 472 | | |
471 | 473 | | |
472 | 474 | | |
| |||
516 | 518 | | |
517 | 519 | | |
518 | 520 | | |
519 | | - | |
| 521 | + | |
520 | 522 | | |
521 | 523 | | |
522 | 524 | | |
| |||
534 | 536 | | |
535 | 537 | | |
536 | 538 | | |
537 | | - | |
| 539 | + | |
| 540 | + | |
538 | 541 | | |
| 542 | + | |
539 | 543 | | |
540 | 544 | | |
541 | 545 | | |
| |||
637 | 641 | | |
638 | 642 | | |
639 | 643 | | |
640 | | - | |
| 644 | + | |
641 | 645 | | |
642 | 646 | | |
643 | 647 | | |
| |||
764 | 768 | | |
765 | 769 | | |
766 | 770 | | |
767 | | - | |
768 | | - | |
769 | | - | |
770 | | - | |
771 | | - | |
772 | | - | |
773 | | - | |
774 | | - | |
775 | | - | |
776 | | - | |
777 | | - | |
778 | | - | |
779 | | - | |
780 | | - | |
781 | | - | |
782 | | - | |
783 | | - | |
784 | | - | |
785 | | - | |
786 | | - | |
787 | | - | |
788 | | - | |
789 | | - | |
790 | | - | |
791 | | - | |
792 | | - | |
793 | | - | |
794 | | - | |
795 | | - | |
796 | | - | |
797 | | - | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
798 | 803 | | |
799 | 804 | | |
800 | 805 | | |
| |||
0 commit comments