Skip to content

Conversation

@DustinTurska
Copy link
Contributor

@DustinTurska DustinTurska commented Nov 25, 2024

Problem solved

FIxes DASH-495

Short description of the bug fixed or feature added

Added Engine Section to playground
-Airdrop
-Mint
-Webhooks

Updated AppSidebar expanded: false to show otherLinks section - previously this was unseen by users and there was no scroll option

Create EngineAPIHeader for Engine CTA and utm link updates

Slack thread for initiative


PR-Codex overview

This PR introduces several enhancements and new features to the playground-web application, including new API routes for transaction handling, updates to the navigation structure, and the addition of several UI components for airdrop and minting functionalities.

Detailed summary

  • Added new environment variables to turbo.json.
  • Updated package.json with new dependencies: @thirdweb-dev/engine and timeago.js.
  • Modified navLinks.ts to collapse certain sections and added an "Engine" section.
  • Implemented new pages for webhooks, airdrop, and minting.
  • Created new API routes for transaction status and minting.
  • Added components for Webhook, Sponsorship, AirdropERC20, and ERC1155MintTo.
  • Enhanced UI with new card and table components for transaction results.

The following files were skipped due to too many changes: pnpm-lock.yaml

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

@vercel
Copy link

vercel bot commented Nov 25, 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 Dec 2, 2024 6:11pm
thirdweb_playground ❌ Failed (Inspect) Dec 2, 2024 6:11pm
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 2, 2024 6:11pm
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 2, 2024 6:11pm

@changeset-bot
Copy link

changeset-bot bot commented Nov 25, 2024

⚠️ No Changeset found

Latest commit: 149ee05

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 25, 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 github-actions bot added the Playground Changes involving the Playground codebase. label Nov 25, 2024
@github-actions
Copy link
Contributor

github-actions bot commented Nov 25, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 47.92 KB (0%) 959 ms (0%) 3.1 s (-8.23% 🔽) 4.1 s
thirdweb (cjs) 107.33 KB (0%) 2.2 s (0%) 6.4 s (-7.4% 🔽) 8.5 s
thirdweb (minimal + tree-shaking) 5.58 KB (0%) 112 ms (0%) 225 ms (+80.94% 🔺) 337 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 85 ms (+42.77% 🔺) 95 ms
thirdweb/react (minimal + tree-shaking) 18.28 KB (0%) 366 ms (0%) 381 ms (-30.13% 🔽) 746 ms

@codecov
Copy link

codecov bot commented Nov 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 46.32%. Comparing base (4ae50f5) to head (149ee05).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5507   +/-   ##
=======================================
  Coverage   46.32%   46.32%           
=======================================
  Files        1082     1082           
  Lines       58672    58672           
  Branches     3950     3950           
=======================================
  Hits        27178    27178           
  Misses      30811    30811           
  Partials      683      683           
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from 4ae50f5
packages 41.91% <ø> (ø)

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

@socket-security
Copy link

socket-security bot commented Nov 25, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@thirdweb-dev/engine@0.0.16 environment, network 0 1.21 MB thirdweb-bot
npm/timeago.js@4.0.2 None 0 262 kB atool

View full report↗︎

const CHAIN_ID = "84532";
const BACKEND_WALLET_ADDRESS = process.env.ENGINE_BACKEND_WALLET as string;

console.log("Environment Variables:");
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove logs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed this file entirely, it is unused, removed logs from the rest as well

return NextResponse.json({ error: "Empty data array" }, { status: 400 });
}

console.log(`Attempting to mint batch to ${data.length} receivers`);
Copy link
Contributor

Choose a reason for hiding this comment

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

More logs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed

name: "Webhooks",
href: "/engine/webhooks",
},
// {
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove these if we don't have them yet

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

<div className="flex w-full flex-col gap-8 md:flex-row">
{/* Form Section */}
<div className="flex flex-col items-center justify-center">
<ConnectButton client={THIRDWEB_CLIENT} chain={baseSepolia} />
Copy link
Contributor

Choose a reason for hiding this comment

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

Formatting on this button looks weird when no connected

// Keeping OP here for consistency. Will be adding a component for Optimism soon.
const getExplorerUrl = () => {
switch (result.network) {
case "Base Sep":
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: probably enough room to spell out "Sepolia"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed, good call out

@vercel vercel bot temporarily deployed to Preview – thirdweb-www November 25, 2024 22:41 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 November 25, 2024 22:41 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-ui November 25, 2024 22:41 Inactive
@DustinTurska DustinTurska added the merge-queue Adds the pull request to Graphite's merge queue. label Nov 25, 2024
@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 25, 2024

Merge activity

  • Nov 25, 10:51 PM UTC: @DustinTurska we removed the merge queue label because we could not find a Graphite account associated with your GitHub profile.

You must have a Graphite account in order to use the merge queue. Create an account and try again using this link

  • Nov 25, 5:54 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 26, 1:08 AM EST: Graphite disabled "merge when ready" on this PR due to: a merge conflict with the target branch; resolve the conflict and try again..
  • Nov 26, 1:09 AM EST: The merge label 'merge-queue' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Dec 2, 10:55 AM EST: Graphite disabled "merge when ready" on this PR due to: a merge conflict with the target branch; resolve the conflict and try again..
  • Dec 2, 10:56 AM EST: The merge label 'merge-queue' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Dec 2, 11:45 AM EST: Graphite disabled "merge when ready" on this PR due to: a merge conflict with the target branch; resolve the conflict and try again..
  • Dec 2, 11:45 AM EST: The merge label 'merge-queue' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Dec 2, 1:07 PM EST: A user added this pull request to the Graphite merge queue.
  • Dec 2, 1:12 PM EST: A user merged this pull request with the Graphite merge queue.

@graphite-app graphite-app bot removed the merge-queue Adds the pull request to Graphite's merge queue. label Nov 25, 2024
@DustinTurska DustinTurska added the merge-queue Adds the pull request to Graphite's merge queue. label Nov 25, 2024
Copy link
Member

@joaquim-verges joaquim-verges left a comment

Choose a reason for hiding this comment

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

What's missing from these is the "how" of these engine demos. How do i build this for myself? was expecting to see some code snippets, or at least some high level endpoints that get called in those demos

@DustinTurska

@linear
Copy link

linear bot commented Dec 2, 2024

## Problem solved

FIxes [DASH-495](https://linear.app/thirdweb/issue/DASH-495/engine-playground)

Short description of the bug fixed or feature added

Added Engine Section to playground
-Airdrop
-Mint
-Webhooks

Updated AppSidebar `expanded: false` to show `otherLinks` section - previously this was unseen by users and there was no scroll option

Create EngineAPIHeader for Engine CTA and utm link updates

Slack [thread](https://thirdwebdev.slack.com/archives/C07U1LM6S2W/p1731687004602369) for initiative

<!-- start pr-codex -->

---

## PR-Codex overview
This PR introduces new features and updates to the `playground-web` application, including new API routes for minting and airdropping tokens, enhancements to the UI components, and the addition of new environment variables for build processes.

### Detailed summary
- Added environment variables for `ENGINE_ACCESS_TOKEN`, `ENGINE_BACKEND_WALLET`, and `ENGINE_URL`.
- Introduced new dependencies: `@thirdweb-dev/engine` and `timeago.js`.
- Updated `navLinks.ts` to collapse sections and added a new `Engine` section.
- Created new pages for `Webhooks`, `Airdrop`, and `Minting` with respective UI components.
- Implemented API routes for transaction status, minting, and airdropping.
- Enhanced the `EngineAPIHeader` component to display dynamic content.
- Added polling functionality for transaction status updates in the `Sponsorship` and `AirdropERC20` components.
- Introduced pagination for transaction results in `ClaimTransactionResults` components.

> The following files were skipped due to too many changes: `pnpm-lock.yaml`

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

<!-- end pr-codex -->
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. Playground Changes involving the Playground codebase.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants