Skip to content

fix(tokens): remove duplicate CHAIN_IDs.PLASMA key in WETH.addresses#5

Open
Nexory wants to merge 1 commit into
across-protocol:masterfrom
Nexory:fix/weth-plasma-duplicate-key
Open

fix(tokens): remove duplicate CHAIN_IDs.PLASMA key in WETH.addresses#5
Nexory wants to merge 1 commit into
across-protocol:masterfrom
Nexory:fix/weth-plasma-duplicate-key

Conversation

@Nexory
Copy link
Copy Markdown

@Nexory Nexory commented May 29, 2026

Summary

WETH.addresses contains the key [CHAIN_IDs.PLASMA] twice, with both entries mapping to the same address (0x9895D81bB462A195b4922ED7De0e3ACD007c32CB). JavaScript silently overwrites the earlier entry with the later one at parse time, so this has no runtime effect, but it triggers no-dupe-keys lint warnings and signals confusion about intent.

What changed

Removed the duplicate [CHAIN_IDs.PLASMA] entry at line 600 of src/tokens.ts. The first occurrence (also at the same address) remains in the alphabetized chain order.

Impact

  • No behavioral change (both keys mapped to the same address)
  • Resolves the latent no-dupe-keys issue
  • Makes future address changes unambiguous

Verification

```
$ grep -c "CHAIN_IDs.PLASMA" src/tokens.ts

4 before, 3 after (PLASMA still present once in WETH, plus 2 in other token entries)

```

Notes

This issue was found during an audit of the across-protocol SDK ecosystem. The same pattern (PLASMA duplicate key in WETH.addresses) exists at src/tokens.ts:649,652 in across-protocol/constants and may warrant a parallel fix there. Happy to send a follow-up PR for that repo if helpful.

The WETH.addresses object literal contained two entries for [CHAIN_IDs.PLASMA]
with the same address. JavaScript silently overwrites the earlier entry with
the later one at parse time, so this had no runtime effect, but it triggers
no-dupe-keys linting and signals confusion about intent.

Both keys mapped to the same address so removing the duplicate is safe.
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.

1 participant