-
Notifications
You must be signed in to change notification settings - Fork 300
feat(sdk-coin-apt): making abi mandatory for custom transactions #6937
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
Merged
Conversation
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
64a3593 to
77a50c6
Compare
sachushaji
previously approved these changes
Sep 10, 2025
baltiyal
reviewed
Sep 11, 2025
modules/sdk-coin-apt/test/unit/transactionBuilder/customTransactionBuilder.ts
Show resolved
Hide resolved
baltiyal
reviewed
Sep 11, 2025
baltiyal
reviewed
Sep 11, 2025
modules/sdk-coin-apt/test/unit/transactionBuilder/customTransactionBuilder.ts
Show resolved
Hide resolved
77a50c6 to
a13b980
Compare
baltiyal
approved these changes
Sep 12, 2025
Contributor
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.
looks good to me
singhlovepreetbitgo9
requested changes
Sep 12, 2025
nvjsr
approved these changes
Sep 12, 2025
kamleshmugdiya
approved these changes
Sep 12, 2025
Contributor
|
ci is failing. |
singhlovepreetbitgo9
approved these changes
Sep 12, 2025
a13b980 to
fc3e879
Compare
Contributor
Author
|
rebased with master for failing vulnerability CI check |
sachushaji
approved these changes
Sep 12, 2025
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.
Ticket: COIN-5586
This pull request enforces stricter type safety for custom Aptos transactions by requiring the ABI (Application Binary Interface) to be explicitly provided and validated for every custom entry function call. It updates the interface, transaction logic, and tests to ensure that all custom transactions include a correct ABI, and adds validation logic to catch and reject invalid ABIs early in the transaction building process.
Custom transaction ABI enforcement and validation:
abifield inCustomTransactionParamsis now required (was optional) and must match the exact function signature of the target entry function, improving type safety and error reporting (modules/sdk-coin-apt/src/lib/iface.ts,modules/sdk-coin-apt/src/lib/transaction/customTransaction.ts).validateAbimethod toCustomTransactionto ensure the ABI structure is correct and provide clear error messages if it is not, causing transaction building to fail early when an invalid ABI is provided (modules/sdk-coin-apt/src/lib/transaction/customTransaction.ts).Test suite updates for ABI requirement:
modules/sdk-coin-apt/test/unit/transactionBuilder/customTransactionBuilder.ts).Behavioral changes and error handling:
modules/sdk-coin-apt/test/unit/transactionBuilder/customTransactionBuilder.ts).These changes ensure that all custom Aptos transactions are built with strict type validation, reducing runtime errors and improving developer experience.