Skip to content

Expose AssembleEIP1559TransactionService constructor to SDK consumers#957

Open
Copilot wants to merge 4 commits into
release-3.9.0from
copilot/fix-asemble-eip1559-transaction-service-constructo
Open

Expose AssembleEIP1559TransactionService constructor to SDK consumers#957
Copilot wants to merge 4 commits into
release-3.9.0from
copilot/fix-asemble-eip1559-transaction-service-constructo

Conversation

Copilot AI commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

AssembleEIP1559TransactionService was public but not constructible outside transactionv1 because 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

    • Change AssembleEIP1559TransactionService(Client client) from package-private to public.
    • Align its construction model with AssembleTransactionService, which is already directly instantiable by consumers.
  • Regression coverage

    • Add a focused unit test in a different package to verify the service can be instantiated outside org.fisco.bcos.sdk.v3.transaction.manager.transactionv1.
    • This guards the intended external API surface rather than only package-local behavior.
  • Consumer impact

    • External code can now directly create and use the EIP-1559 service for:
      • sendEIP1559Transaction(...)
      • deployContractEIP1559(...)
      • async EIP-1559 variants
Client client = ...;
AssembleEIP1559TransactionService service =
        new AssembleEIP1559TransactionService(client);

Copilot AI and others added 2 commits March 4, 2026 13:34
* 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>
Copilot AI changed the title [WIP] Fix AssembleEIP1559TransactionService constructor accessibility Expose AssembleEIP1559TransactionService constructor to SDK consumers Jun 16, 2026
Copilot AI requested a review from kyonRay June 16, 2026 03:45
@kyonRay kyonRay marked this pull request as ready for review June 17, 2026 04:03
Copilot AI review requested due to automatic review settings June 17, 2026 04:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +3 to +12
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;
@kyonRay kyonRay changed the base branch from master to release-3.9.0 June 22, 2026 09:28
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants