Update go version and libraries - #141
Conversation
miiu96
commented
Jul 21, 2026
- Update Go to 1.26, bump Rosetta SDK, implement ConstructionPreprocessOperations endpoint + AllAccountBalances stubs, update CI actions.
Codecov Report❌ Patch coverage is 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. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
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
ConstructionPreprocessOperationsimplementation to generate operations + fee/metadata for transfer construction, plus unit tests. - Add
AllAccountBalancesstubs 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.
|
|
||
| func (service *constructionService) ConstructionPreprocessOperations( |
| 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)) | ||
| } | ||
|
|
There was a problem hiding this comment.
| 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
| if !isNative { | ||
| tx.Value = amountZero | ||
| tx.Data = service.computeDataForCustomCurrencyTransfer(requestOptions.CurrencySymbol, requestOptions.Amount) | ||
| } else if isCustomCurrencyTransfer(string(tx.Data)) { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
for ESDT tokens transfer only function ESDTTransfer is supported.