[etherscan] multi-chain support, merchants, Arbitrum One#959
Open
dudkitt wants to merge 1 commit into
Open
Conversation
Add Arbitrum One (chainid=42161) support alongside Ethereum and BSC
Replace single-chain ListPreference with per-chain CheckBoxPreferences (Ethereum enabled by default)
Iterate over all selected chains in scrape loop, fetching balances and transactions for each
Add chain prefix to account id and syncIds ({chainId}-{address}) to avoid collisions across networks
Add ChainMinTimestamp config to prevent "No closest block found" errors for networks with later launch dates
Add common/merchants.ts with per-chain known contract dictionaries (DEX, bridges, lending) and normalizeMerchant helper
Use normalizeMerchant in ether and token converters instead of raw addresses
Add USDT/USDC token configs for Arbitrum One
Fix mergeTransferTransactions: prevent merging movements with the same account id into a transfer
Pass chain explicitly through all API and converter functions instead of reading from preferences.chain
Preserve legacy fallback: old single-chain configs still work via parseChains
Translate all preference dialogs and manifest description to English
Update tests and mocks for new multi-chain structure
Bump build to 5
Member
|
@dudkitt It’s better to preserve the previous architecture, which supports selecting a chain and multiple wallet addresses - just add support for the new chain. |
Contributor
Author
EVM Wallet: 1 address on multiple blockchains. According to the logic of the previous architecture, I need to create multiple syncs for the required number of blockchains, each with the same address and the same API key. This leads to syncing issues due to overlapping addresses (account numbers) currently generated from the wallet address. There is also an issue with the free API plan limitation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to discussion in PR #942
Extends the etherscan plugin to support multiple EVM chains simultaneously via Etherscan APIv2. Adds Arbitrum One alongside existing Ethereum and BSC support. Introduces known contract merchant resolution.
Changes
Multi-chain architecture
ListPreferencewith per-chainCheckBoxPreference(Ethereum enabled by default)chainexplicitly through all API and converter functions instead of reading from preferences.chainparseChains()Arbitrum One
ChainMinTimestampto prevent "No closest block found" errorsAccount ID namespacing
idandsyncIdswithchainId ({chainId}-{address})to avoid collisions when the same wallet is tracked across multiple networksMerchants
normalizeMerchant()resolves contract addresses to human-readable names, marks self-transfers as "Self", and formats unknown contracts asContract 0x1234…5678Bug fix
incomeAccount == outcomeAccount)Other
Risks
{address}to{chainId}-{address}. Users who configured the plugin in a previous version will lose account matching — ZenMoney may create duplicate accounts or fail to link transactions to existing accounts. Manual re-linking of accounts in ZenMoney settings may be required after update.