Commit d9fb544
committed
[Dashboard | SDK] Feature: Ref values for address params in publish (#5360)
PROT-932
PROT-864
## Problem solved
https://linear.app/thirdweb/project/[contract-tooling]-deployment-publish-flow-revamp-0194e04e2a84/overview
Handle contract refs in publish form -- Resolve / deploy all linked contracts in publish metadata, and pass the addresses as constructor args for corresponding params.
It recursively deploys all referenced contracts through the ref chain, before deploying the main contract.
<!-- start pr-codex -->
---
## PR-Codex overview
This PR focuses on enhancing the contract deployment and parameter handling in the thirdweb platform, introducing dynamic parameters, improved UI components, and better error handling for contract interactions.
### Detailed summary
- Updated `deploy-with-abi.ts` to return the contract address instead of throwing an error if already deployed.
- Enhanced UI components in `string-input.tsx` and `raw-input.tsx` for better user experience.
- Added dynamic parameter handling in multiple components.
- Introduced new types for dynamic parameters in `deploy-metadata.ts`.
- Improved form handling in `FormFieldSetup` and related components.
- Added reference contract input fields in various components for dynamic contract deployments.
- Enhanced error handling and validation in the deployment forms.
- Updated component structure for better maintainability and clarity.
> The following files were skipped due to too many changes: `apps/dashboard/src/components/contract-components/contract-publish-form/contract-params-fieldset.tsx`
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->1 parent b49dde3 commit d9fb544
File tree
25 files changed
+2136
-311
lines changed- apps/dashboard/src
- @/components/blocks
- app/(dashboard)/contracts/publish/[publish_uri]
- components/contract-components
- contract-deploy-form
- contract-publish-form
- decoded-bytes-input
- ref-contract-impl-input
- ref-contract-input
- contract-ui/components/solidity-inputs
- packages/thirdweb/src
- contract/deployment
- extensions
- prebuilts
- thirdweb/write
- utils/any-evm
25 files changed
+2136
-311
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | | - | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
Lines changed: 39 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
83 | 95 | | |
84 | 96 | | |
85 | 97 | | |
| |||
159 | 171 | | |
160 | 172 | | |
161 | 173 | | |
| 174 | + | |
| 175 | + | |
162 | 176 | | |
163 | 177 | | |
164 | 178 | | |
| |||
206 | 220 | | |
207 | 221 | | |
208 | 222 | | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
209 | 230 | | |
210 | 231 | | |
211 | | - | |
| 232 | + | |
212 | 233 | | |
213 | 234 | | |
214 | 235 | | |
| |||
353 | 374 | | |
354 | 375 | | |
355 | 376 | | |
356 | | - | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
357 | 382 | | |
358 | 383 | | |
359 | 384 | | |
| |||
412 | 437 | | |
413 | 438 | | |
414 | 439 | | |
415 | | - | |
| 440 | + | |
416 | 441 | | |
417 | | - | |
| 442 | + | |
| 443 | + | |
418 | 444 | | |
419 | | - | |
| 445 | + | |
420 | 446 | | |
421 | 447 | | |
422 | 448 | | |
| |||
442 | 468 | | |
443 | 469 | | |
444 | 470 | | |
| 471 | + | |
445 | 472 | | |
446 | 473 | | |
447 | 474 | | |
| |||
652 | 679 | | |
653 | 680 | | |
654 | 681 | | |
655 | | - | |
| 682 | + | |
656 | 683 | | |
657 | 684 | | |
658 | 685 | | |
| |||
749 | 776 | | |
750 | 777 | | |
751 | 778 | | |
752 | | - | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
753 | 784 | | |
754 | 785 | | |
755 | 786 | | |
| |||
Lines changed: 59 additions & 47 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
| |||
11 | 14 | | |
12 | 15 | | |
13 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
14 | 22 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
29 | 39 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
35 | 45 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
42 | 52 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
53 | 63 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
65 | 77 | | |
66 | 78 | | |
0 commit comments