Skip to content

Conversation

@gregfromstl
Copy link
Contributor

@gregfromstl gregfromstl commented Nov 23, 2024

CNCT-2441


PR-Codex overview

This PR introduces new utility functions for managing infrastructure contracts and contract initialization in the thirdweb SDK, enhancing the deployment process for published contracts.

Detailed summary

  • Added getInitializeTransaction for preparing contract initialization transactions.
  • Added getOrDeployInfraForPublishedContract to retrieve or deploy infrastructure for published contracts.
  • Enhanced documentation for several functions, detailing parameters and return values.
  • Introduced getDeployedCloneFactoryContract to retrieve deployed clone factory instances.
  • Added getAllDefaultConstructorParamsForImplementation to fetch default constructor parameters for contract deployments.
  • Updated the getDeployedInfraContract function with detailed parameter descriptions.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@linear
Copy link

linear bot commented Nov 23, 2024

@changeset-bot
Copy link

changeset-bot bot commented Nov 23, 2024

🦋 Changeset detected

Latest commit: ac42c45

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
thirdweb Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Nov 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 23, 2024 3:41am
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 23, 2024 3:41am
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 23, 2024 3:41am
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 23, 2024 3:41am

@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 23, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 23, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 44.97 KB (0%) 900 ms (0%) 128 ms (+22.08% 🔺) 1.1 s
thirdweb (cjs) 105.01 KB (0%) 2.2 s (0%) 499 ms (+36.35% 🔺) 2.6 s
thirdweb (minimal + tree-shaking) 5.6 KB (0%) 113 ms (0%) 22 ms (+217.14% 🔺) 134 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 8 ms (+170.12% 🔺) 18 ms
thirdweb/react (minimal + tree-shaking) 18.38 KB (0%) 368 ms (0%) 34 ms (+42.98% 🔺) 401 ms

});

// Get default constructor params
const params = await getAllDefaultConstructorParamsForImplementation({
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we keep this one un-exported? i actually want to get rid of it in favor of what yash is working on

});

// Get or deploy infrastructure
const infra = await getOrDeployInfraForPublishedContract({
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we just expose this one for now? instead of getDeployedInfraContract and getDeployedCloneFactory ?

} from "thirdweb";

// Get deployed clone factory
const factory = await getDeployedCloneFactoryContract({
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: remove these from the changeset

@codecov
Copy link

codecov bot commented Nov 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 43.82%. Comparing base (adda60c) to head (ac42c45).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5501      +/-   ##
==========================================
- Coverage   44.09%   43.82%   -0.28%     
==========================================
  Files        1074     1075       +1     
  Lines       55632    55991     +359     
  Branches     3907     3909       +2     
==========================================
+ Hits        24533    24539       +6     
- Misses      30416    30769     +353     
  Partials      683      683              
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from adda60c
packages 38.55% <100.00%> (-0.30%) ⬇️

*This pull request uses carry forward flags. Click here to find out more.

Files with missing lines Coverage Δ
...hirdweb/src/contract/deployment/utils/bootstrap.ts 71.03% <ø> (ø)
...web/src/contract/deployment/utils/clone-factory.ts 89.47% <ø> (ø)
...es/thirdweb/src/contract/deployment/utils/infra.ts 100.00% <ø> (ø)
...rdweb/src/extensions/prebuilts/deploy-published.ts 78.07% <100.00%> (ø)
.../extensions/prebuilts/get-required-transactions.ts 60.43% <ø> (ø)

... and 3 files with indirect coverage changes

---- 🚨 Try these New Features:

@gregfromstl gregfromstl added the merge-queue Adds the pull request to Graphite's merge queue. label Nov 23, 2024
Copy link
Contributor Author

gregfromstl commented Nov 23, 2024

Merge activity

  • Nov 22, 8:23 PM EST: The merge label 'merge-queue' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Nov 22, 8:35 PM EST: A user added this pull request to the Graphite merge queue.
  • Nov 22, 8:37 PM EST: The Graphite merge queue couldn't merge this PR because it was not satisfying all requirements (Failed CI: 'Build Packages', 'Lint Packages', 'Unit Tests', 'E2E Tests (npm, vite)', 'E2E Tests (npm, webpack)', 'E2E Tests (npm, esbuild)', 'E2E Tests (yarn, vite)', 'E2E Tests (yarn, webpack)', 'E2E Tests (yarn, esbuild)', 'E2E Tests (pnpm, vite)', 'E2E Tests (pnpm, webpack)', 'E2E Tests (pnpm, esbuild)', 'E2E Tests (bun, vite)', 'E2E Tests (bun, webpack)', 'E2E Tests (bun, esbuild)', 'Size').
  • Nov 22, 8:38 PM EST: The merge label 'merge-queue' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Nov 23, 1:38 AM UTC: The merge label 'merge-queue' was removed. This PR will no longer be merged by the Graphite merge queue
  • Nov 22, 9:50 PM EST: The merge label 'merge-queue' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Nov 22, 9:50 PM EST: A user added this pull request to the Graphite merge queue.
  • Nov 22, 9:55 PM EST: The Graphite merge queue couldn't merge this PR because it was not satisfying all requirements (Failed CI: 'Vercel – thirdweb-www').
  • Nov 22, 9:55 PM EST: The merge label 'merge-queue' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Nov 23, 2:55 AM UTC: The merge label 'merge-queue' was removed. This PR will no longer be merged by the Graphite merge queue
  • Nov 22, 10:49 PM EST: The merge label 'merge-queue' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Nov 22, 10:49 PM EST: A user added this pull request to the Graphite merge queue.
  • Nov 22, 10:49 PM EST: A user merged this pull request with the Graphite merge queue.

gregfromstl added a commit that referenced this pull request Nov 23, 2024
CNCT-2441

<!-- start pr-codex -->

---

## PR-Codex overview
This PR introduces new utility functions to enhance the management of infrastructure contracts and initialization processes within the `thirdweb` SDK. It also adds detailed documentation for several existing and new functions.

### Detailed summary
- Added `getInitializeTransaction` for preparing contract initialization transactions.
- Added `getOrDeployInfraForPublishedContract` to manage infrastructure for published contracts.
- Documented `getDeployedCloneFactoryContract` with details on its parameters and return values.
- Documented `getAllDefaultConstructorParamsForImplementation` for obtaining default constructor parameters.
- Documented `getDeployedInfraContract` to retrieve infrastructure contract instances.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
@gregfromstl gregfromstl force-pushed the greg/cnct-2441-provide-code-snippet-for-current-api-usage-of-prepare-deploy branch from 8ffb741 to 600c024 Compare November 23, 2024 01:36
@graphite-app graphite-app bot removed the merge-queue Adds the pull request to Graphite's merge queue. label Nov 23, 2024
CNCT-2441

<!-- start pr-codex -->

---

## PR-Codex overview
This PR introduces new utility functions and enhances existing ones to improve the management of infrastructure contracts and initialization processes within the `thirdweb` framework.

### Detailed summary
- Added `getInitializeTransaction` for preparing contract initialization transactions.
- Added `getOrDeployInfraForPublishedContract` to manage infrastructure for published contracts.
- Documented various functions with detailed JSDoc comments.
- Enhanced `getDeployedCloneFactoryContract` and `getDeployedInfraContract` with clearer descriptions.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
@gregfromstl
Copy link
Contributor Author

changelog

2 similar comments
@gregfromstl
Copy link
Contributor Author

changelog

@gregfromstl
Copy link
Contributor Author

changelog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-queue Adds the pull request to Graphite's merge queue. packages SDK Involves changes to the thirdweb SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants