Skip to content

Pull Request: Add Arbitrum One Plugin#942

Open
dudkitt wants to merge 2 commits into
zenmoney:masterfrom
dudkitt:add_arbitrum_one_plugin
Open

Pull Request: Add Arbitrum One Plugin#942
dudkitt wants to merge 2 commits into
zenmoney:masterfrom
dudkitt:add_arbitrum_one_plugin

Conversation

@dudkitt
Copy link
Copy Markdown
Contributor

@dudkitt dudkitt commented Feb 11, 2026

Summary

This pull request introduces a new plugin for the Arbitrum One network.
It enables ZenMoney to retrieve balances and transactions for one or multiple wallet addresses using the Arbiscan API.
Features

Integration with the Arbiscan API

Fetching:

    Native ETH balance

    ERC‑20 token balances

    Native transactions (txlist)

    ERC‑20 token transfers (tokentx)

Multi‑address support:

    preferences.account accepts one or several addresses separated by commas

    Balances and transactions are aggregated across all provided addresses

Conversion of API responses into ZenMoney account and transaction formats

Type definitions for API responses and plugin preferences

Implementation Notes

The API client includes request queueing to avoid rate‑limit issues

Pagination and block‑based filtering are handled in fetchTxPages

Native and token transactions are normalized before conversion

The plugin follows the structure and conventions of existing ZenPlugins

Testing

Verified with multiple real Arbitrum addresses

Confirmed correct behavior for:

    Native ETH balances

    ERC‑20 token balances

    Native transactions

    Token transfers

    Empty transaction histories

    Multiple addresses

Ensured compatibility with ZenMoney’s expected data format

Why This Matters

Arbitrum One is one of the most widely used L2 networks.
This plugin allows ZenMoney users to track their assets and activity on Arbitrum directly within the app.

@skvav
Copy link
Copy Markdown
Member

skvav commented Feb 27, 2026

@dudkitt Hi! Thanks for your contribution. Please fix the code to pass all tests.

@dudkitt dudkitt force-pushed the add_arbitrum_one_plugin branch from a686609 to 85de5fe Compare February 27, 2026 17:44
@dudkitt
Copy link
Copy Markdown
Contributor Author

dudkitt commented Feb 27, 2026

Runtime fix for Arbitrum One plugin:

This patch fixes the runtime error "cannot convert BigInt to number" by coercing bigint/string/number inputs in the converter. It also normalizes ETH/token amounts to micro-units (µ = 1e-6), fixes wei→ETH conversion to preserve fractional fees, supports both micro characters (μ/µ), and includes preferences.xml translation to English plus minor lint fixes.

Verification: ran yarn test arbitrum_one locally — 5 suites, 14 tests passed. Branch was rebased onto upstream/master and force-pushed to update this PR.

@dudkitt dudkitt force-pushed the add_arbitrum_one_plugin branch 4 times, most recently from 6238621 to a686609 Compare February 28, 2026 07:11
@dudkitt dudkitt marked this pull request as draft February 28, 2026 07:57
… известных контрактов, удаление неподдерживаемого токена и правильный вывод ETH в микро‑единицах.

  Внесённые изменения: нормализован адрес Radiant Capital в merchants.ts (lowercase), удалён CAKE из supportedTokens.ts, в converter.ts переведён вывод wei → µETH (деление на 1e12) и скорректированы расчёты комиссий/транзакций, заменён символ единицы на микро‑знак U+00B5 ('µETH'), обновлены
  unit‑тесты и переведены русские комментарии на английский, исправлены ошибки линтера.
@dudkitt dudkitt force-pushed the add_arbitrum_one_plugin branch from c109f47 to aea3eec Compare February 28, 2026 13:39
@dudkitt dudkitt marked this pull request as ready for review February 28, 2026 13:40
@dudkitt
Copy link
Copy Markdown
Contributor Author

dudkitt commented Feb 28, 2026

@dudkitt Hi! Thanks for your contribution. Please fix the code to pass all tests.

@skvav исправлены ошибки, подготовлено к повторному тесту.

@skvav
Copy link
Copy Markdown
Member

skvav commented Mar 2, 2026

@dudkitt It looks like you’re using https://api.etherscan.io/v2/api as the main api. We already have an Etherscan plugin (https://github.com/zenmoney/ZenPlugins/tree/master/src/plugins/etherscan
) that works with the same API.

Could you please consider extending the existing etherscan plugin to support your target chain instead of creating a separate implementation?

@dudkitt
Copy link
Copy Markdown
Contributor Author

dudkitt commented Mar 2, 2026

Could you please consider extending the existing etherscan plugin to support your target chain instead of creating a separate implementation?

Adding the Arbitrum One network to the existing Etherscan plugin implementation was my "Plan A," which I spent some time developing. Unfortunately, my technical skills weren't sufficient to integrate support for another network without completely redesigning the Etherscan plugin. There were some technical limitations related to the Etherscan plugin being originally written for the older APIv1, which only supported Ethereum. Additionally, we're limited by the free Etherscan API plan.

If needed, I can try integrating the new network into the old plugin again.

@skvav
Copy link
Copy Markdown
Member

skvav commented Mar 4, 2026

@dudkitt Maybe the previous developers of the Etherscan plugin can help: @dzhiriki @stek29 @Cr0WD

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.

2 participants