Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

feat: integrate abitype library and format ABI items in code overview and contract function components #2672

Merged
merged 1 commit into from
Jun 15, 2024

Conversation

jnsdls
Copy link
Member

@jnsdls jnsdls commented Jun 15, 2024

TL;DR

Add abitype library and refactor the codebase to utilize formatAbiItem for formatting contract functions and events.

What changed?

  • Added abitype library to package.json and pnpm-lock.yaml files.
  • Refactored multiple files to replace existing ABI formatting logic with formatAbiItem from abitype.
    • contract-function.tsx: Integrated formatAbiItem for formatting contract functions and events.
    • code-overview.tsx: Unified ABI formatting using formatAbiItem.
  • Removed dependency on resolveMethod from thirdweb.

How to test?

  1. Verify the abitype library installation in package.json and pnpm-lock.yaml.
  2. Check the refactored files for correct usage of formatAbiItem.
  3. Run the project and ensure no runtime errors occur related to ABI formatting.
  4. Test contract functions and events to ensure they are formatted correctly.

Why make this change?

To improve the consistency and reliability of ABI formatting across the codebase by using a dedicated library (abitype).



PR-Codex overview

The focus of this PR is to introduce the abitype package, update dependencies, and refactor code snippets for improved readability.

Detailed summary

  • Added abitype package
  • Refactored code snippets in CodePlayground.tsx for better readability
  • Updated dependencies in package.json and pnpm-lock.yaml
  • Introduced formatAbiItem function in code-overview.tsx

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

Copy link

vercel bot commented Jun 15, 2024

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

Name Status Preview Comments Updated (UTC)
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 15, 2024 4:38am

Copy link

graphite-app bot commented Jun 15, 2024

Your org requires 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.

Copy link

socket-security bot commented Jun 15, 2024

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

Package New capabilities Transitives Size Publisher
npm/[email protected] None 0 1.16 MB awkweb

View full report↗︎

@jnsdls jnsdls marked this pull request as ready for review June 15, 2024 03:55
Copy link

graphite-app bot commented Jun 15, 2024

Merge activity

… and contract function components (#2672)

### TL;DR
Add `abitype` library and refactor the codebase to utilize `formatAbiItem` for formatting contract functions and events.

### What changed?
- Added `abitype` library to `package.json` and `pnpm-lock.yaml` files.
- Refactored multiple files to replace existing ABI formatting logic with `formatAbiItem` from `abitype`.
  - `contract-function.tsx`: Integrated `formatAbiItem` for formatting contract functions and events.
  - `code-overview.tsx`: Unified ABI formatting using `formatAbiItem`.
- Removed dependency on `resolveMethod` from `thirdweb`.

### How to test?
1. Verify the `abitype` library installation in `package.json` and `pnpm-lock.yaml`.
2. Check the refactored files for correct usage of `formatAbiItem`.
3. Run the project and ensure no runtime errors occur related to ABI formatting.
4. Test contract functions and events to ensure they are formatted correctly.

### Why make this change?
To improve the consistency and reliability of ABI formatting across the codebase by using a dedicated library (`abitype`).

---

<!-- start pr-codex -->

---

## PR-Codex overview
The focus of this PR is to introduce the `abitype` package, update dependencies, and refactor code snippets in the `CodePlayground` component.

### Detailed summary
- Introduced `abitype` package
- Updated dependencies
- Refactored code snippets in `CodePlayground.tsx`
- Modified imports and functions in various files

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

<!-- end pr-codex -->
@jnsdls jnsdls force-pushed the feat/add-abitype-integration branch from 32f600f to 4faf636 Compare June 15, 2024 04:28
@graphite-app graphite-app bot merged commit 4faf636 into main Jun 15, 2024
11 checks passed
@graphite-app graphite-app bot deleted the feat/add-abitype-integration branch June 15, 2024 04:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants