-
Notifications
You must be signed in to change notification settings - Fork 4
Plat 6405 transaction form builder poc v2 #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
# Conflicts: # packages/core/src/adapters/evm/adapter.ts # packages/core/src/services/ContractLoader.ts
…ization and chain agnosticism
…ecific components
…Description component
…hared LoadingButton
…ry structure with other steps
👷 Deploy request for transaction-form-builder pending review.A Netlify team Owner will need to approve the deploy before you can run your build. Are you a team Owner? Visit the deploys page to approve it → Need more help? Learn more in the Netlify docs →
|
Add '@openzeppelin/transaction-form-renderer' and '@openzeppelin/transaction-form-types' to optimizeDeps.include in vitest.shared.config.ts. This aims to resolve 'Failed to resolve entry for package' errors in Vitest/Vite when core tests import from these workspace packages in CI.
Add '@openzeppelin/transaction-form-renderer' and '@openzeppelin/transaction-form-types' to ssr.noExternal in vitest.shared.config.ts. This ensures these workspace packages are processed by Vite during tests, aiming to resolve 'Failed to resolve entry for package' errors in CI.
Add optimizeDeps.include and ssr.noExternal for '@openzeppelin/transaction-form-renderer' and '@openzeppelin/transaction-form-types' directly to packages/core/vitest.config.ts. This addresses Vitest/Vite's failure to resolve these workspace package entries during tests for the core package in CI.
Add resolve.dedupe for form-renderer, form-types, react, and react-dom in packages/core/vitest.config.ts. This attempts to resolve workspace dependency resolution issues in Vitest/Vite for the core package tests.
Ensure all workspace packages are built using 'pnpm -r build' before running export-related tests in export-testing.yml. This mirrors the fix applied to ci.yml and coverage.yml to prevent module resolution errors during tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements proactive network switching for the EVM adapter, fixes issues with ABI transformation by strictly mapping only defined properties, and enhances the overall UI/UX of the Transaction Form Builder.
- Introduces a reusable function for wallet connection with network validation.
- Refines ABI loading (from JSON strings and Etherscan), including robust error handling and logging.
- Updates testing, linters, workflow configurations, and documentation supporting the modular adapter architecture.
Reviewed Changes
Copilot reviewed 388 out of 388 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/adapter-evm/src/abi/loader.ts | Adds functions for loading and parsing ABIs from JSON and Etherscan with detailed logging and error handling. |
| packages/adapter-evm/src/abi/index.ts | Provides a barrel export for the abi module. |
| packages/adapter-evm/src/abi/etherscan.ts | Implements ABI fetching from Etherscan with appropriate network config validations and JSON parsing. |
| packages/adapter-evm/src/abi/tests/transformer.test.ts | Contains extensive tests for ABI transformation covering various cases. |
| packages/adapter-evm/src/tests/wallet-connect.test.ts | Includes tests validating wallet connection logic using a shared network config. |
| packages/adapter-evm/src/tests/mocks/mock-network-configs.ts | Provides a stable mock network configuration for EVM testing. |
| packages/adapter-evm/package.json | Sets up package metadata and dependencies for the EVM adapter package. |
| README.md, CONTRIBUTING.md, etc. | Updates documentation and workflow configuration to support new adapter modules and enforce adapter architecture. |
| lint-adapters.cjs, eslint.config.cjs | Adjusts file search patterns and lint rules to ensure adapter files comply with the ContractAdapter interface. |
|
🎉 This PR is included in version 1.2.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Description
Proactive Network Handling, ABI Transformer Fixes, and UX Enhancements
This Pull Request introduces several key improvements to the Transaction Form Builder, focusing on enhancing the user experience with wallet interactions, ensuring data integrity in ABI transformations, and refining various UI/UX aspects.
Key Features & Fixes:
Wallet Interaction & Network Management
feat(adapter-evm),fix(adapter-evm)):connectWallet).signAndBroadcast).connectAndEnsureCorrectNetworkfunction for better maintainability.Data Integrity & Core Logic
fix(adapter),test(adapter)):abi/transformer.ts) where non-standard properties from raw ABIs (e.g.,internalType) were incorrectly propagated into the internalContractSchema. The transformer now strictly maps only known and defined properties.abi/transformer.tsand the coretypes/src/contracts/schema.tsto clarify type definitions and adapter roles.fix(core)):ContractAddressFormthat occurred when an address from a different network (or an unverified contract) was entered. TheContractLoaderservice now correctly propagates errors.Export System
refactor(export),fix(export),feat(export)):onSubmithandling in exported forms.ContractStateWidgetin exported forms.Architecture & Refactoring
refactor(core),feat(core),feat(adapter),fix(adapter)):form-rendererpackage.UI/UX Improvements
feat(ui),fix(ui),feat(form)):ContractStateWidgetUI and behavior, including auto-querying of simple view functions and better space efficiency.Other Notable Changes:
This PR aims to deliver a more robust, user-friendly, and maintainable Transaction Form Builder.