Expose AssembleEIP1559TransactionService constructor to SDK consumers#957
AssembleEIP1559TransactionService constructor to SDK consumers#957Conversation
* Initial plan * Remove fisco-bcos.org URL, replace with GitHub repo URL in build.gradle Co-authored-by: kyonRay <32325790+kyonRay@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: kyonRay <32325790+kyonRay@users.noreply.github.com>
AssembleEIP1559TransactionService constructor to SDK consumers
There was a problem hiding this comment.
Pull request overview
Exposes AssembleEIP1559TransactionService as a truly usable public API by making its Client constructor public, and adds a regression test to ensure SDK consumers can instantiate the service from outside the transactionv1 package.
Changes:
- Make
AssembleEIP1559TransactionService(Client client)public. - Add a unit test in a different package to verify external instantiation works.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/main/java/org/fisco/bcos/sdk/v3/transaction/manager/transactionv1/AssembleEIP1559TransactionService.java | Makes the service constructible by external consumers by changing constructor visibility to public. |
| src/test/java/org/fisco/bcos/sdk/v3/test/transaction/manager/AssembleEIP1559TransactionServiceTest.java | Adds a cross-package unit test to prevent regressions in the intended public API surface. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| import static org.mockito.Mockito.mock; | ||
| import static org.mockito.Mockito.when; | ||
|
|
||
| import org.fisco.bcos.sdk.v3.client.Client; | ||
| import org.fisco.bcos.sdk.v3.crypto.CryptoSuite; | ||
| import org.fisco.bcos.sdk.v3.model.CryptoType; | ||
| import org.fisco.bcos.sdk.v3.transaction.manager.transactionv1.AssembleEIP1559TransactionService; | ||
| import org.fisco.bcos.sdk.v3.transaction.manager.transactionv1.AssembleTransactionService; | ||
| import org.junit.Assert; | ||
| import org.junit.Test; |
…tion-service-constructo
|
…tion-service-constructo
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release-3.9.0 #957 +/- ##
===================================================
+ Coverage 64.05% 64.19% +0.14%
- Complexity 4567 4573 +6
===================================================
Files 430 430
Lines 17628 17628
Branches 1969 1969
===================================================
+ Hits 11292 11317 +25
+ Misses 5576 5548 -28
- Partials 760 763 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|



AssembleEIP1559TransactionServicewas public but not constructible outsidetransactionv1because its only constructor had package-private visibility. As a result, the EIP-1559 transaction assembly API was unreachable to external SDK users despite exposing public send/deploy methods.API accessibility
AssembleEIP1559TransactionService(Client client)from package-private topublic.AssembleTransactionService, which is already directly instantiable by consumers.Regression coverage
org.fisco.bcos.sdk.v3.transaction.manager.transactionv1.Consumer impact
sendEIP1559Transaction(...)deployContractEIP1559(...)