Skip to content

Update go version and libraries - #141

Merged
miiu96 merged 6 commits into
mainfrom
update-go-version
Aug 26, 2026
Merged

Update go version and libraries#141
miiu96 merged 6 commits into
mainfrom
update-go-version

Conversation

@miiu96

@miiu96 miiu96 commented Jul 21, 2026

Copy link
Copy Markdown
Contributor
  • Update Go to 1.26, bump Rosetta SDK, implement ConstructionPreprocessOperations endpoint + AllAccountBalances stubs, update CI actions.

@codecov

codecov Bot commented Jul 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.81818% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.84%. Comparing base (0ad38b9) to head (82db28d).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
server/services/constructionService.go 84.00% 4 Missing and 4 partials ⚠️
server/services/accountService.go 0.00% 2 Missing ⚠️
server/services/offline_services.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #141      +/-   ##
==========================================
- Coverage   62.65%   57.84%   -4.81%     
==========================================
  Files          48       48              
  Lines        2999     3115     +116     
==========================================
- Hits         1879     1802      -77     
- Misses        968     1169     +201     
+ Partials      152      144       -8     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Updates the project’s Go/tooling baseline and Rosetta dependencies, while adding initial server-side support for the new ConstructionPreprocessOperations endpoint and introducing /account/all-balances stubs to satisfy the expanded API surface.

Changes:

  • Bump Go version and Coinbase Rosetta SDK/types versions (go.mod/go.sum) and align CI workflows to the new Go/tooling versions.
  • Add ConstructionPreprocessOperations implementation to generate operations + fee/metadata for transfer construction, plus unit tests.
  • Add AllAccountBalances stubs to both online (accountService) and offline services.

Reviewed changes

Copilot reviewed 15 out of 16 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
server/services/offline_services.go Adds offline-mode stub for AllAccountBalances.
server/services/constructionService.go Implements ConstructionPreprocessOperations endpoint logic.
server/services/constructionService_test.go Adds tests for ConstructionPreprocessOperations.
server/services/accountService.go Adds AllAccountBalances stub returning ErrNotImplemented.
server/provider/currenciesProvider.go Updates doc comment for GetCustomCurrenciesSymbols.
go.mod Updates Go version and bumps Rosetta SDK/types; promotes mx-chain-vm-common-go to direct dependency.
go.sum Updates dependency checksums for bumped Rosetta SDK/types.
.github/workflows/regularly_check_testnet.yml Bumps actions/checkout version in scheduled testnet workflow.
.github/workflows/regularly_check_mainnet.yml Bumps actions/checkout version in scheduled mainnet workflow.
.github/workflows/regularly_check_devnet.yml Bumps actions/checkout version in scheduled devnet workflow.
.github/workflows/pr-build.yml Updates setup-go action and Go version used in PR builds.
.github/workflows/golangci-lint.yml Updates Go setup/checkout actions and golangci-lint action/version/args.
.github/workflows/code-coverage.yml Updates setup-go action and Go version used for coverage builds.
.github/workflows/check_with_mesh_cli.yml Bumps actions/checkout version for Mesh CLI workflow.
.github/workflows/check_with_mesh_cli_on_mainnet.yml Bumps actions/checkout version for Mesh CLI mainnet workflow.
.github/workflows/check_with_mesh_cli_on_localnet.yml Bumps actions/checkout version for Mesh CLI localnet workflow.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread server/services/constructionService.go
Comment thread server/services/constructionService_test.go
Comment thread server/provider/currenciesProvider.go Outdated
Comment on lines +417 to +418

func (service *constructionService) ConstructionPreprocessOperations(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

add comment?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

Comment thread server/services/constructionService.go Outdated
Comment on lines +432 to +437
nativeCurrencySymbol := service.extension.getNativeCurrencySymbol()
isNative := service.extension.isNativeCurrencySymbol(requestOptions.CurrencySymbol)
if !isNative && !service.provider.HasCustomCurrency(requestOptions.CurrencySymbol) {
return nil, service.errFactory.newErrWithOriginal(ErrConstruction, fmt.Errorf("unsupported currency: %s", requestOptions.CurrencySymbol))
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
nativeCurrencySymbol := service.extension.getNativeCurrencySymbol()
isNative := service.extension.isNativeCurrencySymbol(requestOptions.CurrencySymbol)
if !isNative && !service.provider.HasCustomCurrency(requestOptions.CurrencySymbol) {
return nil, service.errFactory.newErrWithOriginal(ErrConstruction, fmt.Errorf("unsupported currency: %s", requestOptions.CurrencySymbol))
}
isNative := service.extension.isNativeCurrencySymbol(requestOptions.CurrencySymbol)
if !isNative && !service.provider.HasCustomCurrency(requestOptions.CurrencySymbol) {
return nil, service.errFactory.newErrWithOriginal(ErrConstruction, fmt.Errorf("unsupported currency: %s", requestOptions.CurrencySymbol))
}
nativeCurrencySymbol := service.extension.getNativeCurrencySymbol()

is this call intensive? it is used only after

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

refactored

if !isNative {
tx.Value = amountZero
tx.Data = service.computeDataForCustomCurrencyTransfer(requestOptions.CurrencySymbol, requestOptions.Amount)
} else if isCustomCurrencyTransfer(string(tx.Data)) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I may not have a very good overview of the code and this might be wrong but, shouldn't this check for other kind of transfers? Currently only the ESDTTransfer prefix is checked leaving ESDTNFTTransfer and MultiESDTNFTTransfer unchecked.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

for ESDT tokens transfer only function ESDTTransfer is supported.

@miiu96
miiu96 merged commit 5e8fcfa into main Aug 26, 2026
8 of 9 checks passed
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.

4 participants