feat: add send generic input#438
Open
brunomenezes wants to merge 2 commits intofeat/add-abi-encoding-and-decodingfrom
Open
feat: add send generic input#438brunomenezes wants to merge 2 commits intofeat/add-abi-encoding-and-decodingfrom
brunomenezes wants to merge 2 commits intofeat/add-abi-encoding-and-decodingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
3 tasks
There was a problem hiding this comment.
Pull request overview
Adds support in the Dave webapp to send generic inputs to an application via the Cartesi InputBox, with multiple input encoding modes (raw hex, string-to-hex, and ABI-based encoding) to reach feature parity with existing “send” flows.
Changes:
- Introduces a new
GenericInputFormwith validation, ABI/spec selection, and encoding helpers. - Wires “Input” into the Send menu/modal and passes JSON_ABI specifications into the form.
- Temporarily disables publishing Coveralls reports in CI.
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| apps/dave/src/components/transactions/GenericInputForm/index.tsx | Main generic input UI and transaction execution flow |
| apps/dave/src/components/transactions/GenericInputForm/useGenericInputForm.tsx | Form setup, validation wiring, and transformed values/spec selection |
| apps/dave/src/components/transactions/GenericInputForm/validations.ts | Field validators for app address, hex input, ABI inputs/params |
| apps/dave/src/components/transactions/GenericInputForm/utils.ts | ABI parsing/spec generation, tuple flattening, and argument encoding helpers |
| apps/dave/src/components/transactions/GenericInputForm/types.ts | Form and ABI-related types |
| apps/dave/src/components/transactions/GenericInputForm/initialValues.ts | Initial form values |
| apps/dave/src/components/transactions/GenericInputForm/context.tsx | Mantine form context for the feature |
| apps/dave/src/components/transactions/GenericInputForm/hooks/useInputBoxAddInput.tsx | Wagmi simulate/write/wait wrapper for InputBox addInput |
| apps/dave/src/components/transactions/GenericInputForm/AbiFields.tsx | ABI method/spec selection and display of encoded hex output |
| apps/dave/src/components/transactions/GenericInputForm/AbiFunctionName.tsx | Function selection UI for JSON_ABI specs |
| apps/dave/src/components/transactions/GenericInputForm/AbiFunctionParams.tsx | Function argument inputs (incl. tuple handling) |
| apps/dave/src/components/transactions/GenericInputForm/TupleComponents.tsx | Recursive tuple component rendering |
| apps/dave/src/components/transactions/GenericInputForm/AbiParameter.tsx | ABI-params entry flow for encoding without selectors |
| apps/dave/src/components/transactions/GenericInputForm/FunctionSignature.tsx | Function signature/label rendering helpers |
| apps/dave/src/components/send/SendMenu.tsx | Enables “Input” send action and forwards filtered specifications |
| apps/dave/src/components/send/SendModal.tsx | Renders GenericInputForm for generic_input transaction type |
| apps/dave/src/components/send/SendProvider.tsx | Stores specifications in send state for generic input actions |
| apps/dave/src/components/send/SendContexts.tsx | Extends send state/action types to include specifications |
| apps/dave/src/components/send/hooks.tsx | Updates sendGenericInput action signature to accept specs |
| .github/workflows/ci.yml | Disables Coveralls publish step |
Comments suppressed due to low confidence (1)
apps/dave/src/components/transactions/GenericInputForm/AbiFunctionParams.tsx:55
- Typo in
data-testid:empty-inputs-argments-alertshould beempty-inputs-arguments-alertto avoid propagating the misspelling into tests and tooling.
data-testid="empty-inputs-argments-alert"
>
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
apps/dave/src/components/transactions/GenericInputForm/TupleComponents.tsx
Show resolved
Hide resolved
apps/dave/src/components/transactions/GenericInputForm/useGenericInputForm.tsx
Show resolved
Hide resolved
959af0b to
6101d4d
Compare
5d156e4 to
15ae89f
Compare
15ae89f to
e612f01
Compare
6101d4d to
3416106
Compare
* Support to raw hex value added. * Support to string to hex added. * Support ABI encoding added.
e612f01 to
e365510
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The code changes in this PR achieve feature parity in terms of a user be able to send transactions (i.e. deposits through portals and generic input through the input box).
Even though the add-input is the simplest in terms of smart contract interface, it was the last to be added as it depends on the PR #434 (ABI encoding/decoding support), since we provide ways for the user to choose how they want to send the data i.e. using a raw hex value, or a string to be converted to hex, or ABI encoding to define the input to be sent.
PS: Currently I am skipping the CI step to publish the test reports to coveralls. It is having service outage for a couple of days at the moment of writing. They don't have an ETA, more details here: https://status.coveralls.io/
closes: #435