Skip to content

Name the known swap contracts by provider and role - #1169

Open
0xh3rman wants to merge 4 commits into
mainfrom
scan-address-labels
Open

0xh3rman wants to merge 4 commits into
mainfrom
scan-address-labels

Conversation

@0xh3rman

@0xh3rman 0xh3rman commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

Part of #1036, new Permit2 approvals look consistent (EIP712 and normal ERC20 Approve), our contract labeling shows both Uniswap (address), one of them is Permit2, another one is Router, this pr adds our known swapper contracts to scan address DB

Changes:

  1. Store scan address names as " Permit2" and " Router" so the spender row tells Uniswap's Permit2 apart from its Universal Router instead of showing "Uniswap" for both.
  2. Upsert the names on the (chain, address) key so a rename reaches rows already in the database on the next setup run; the fraud and verification flags stay untouched.
  3. Tag the static THORChain and Maya routers, Chainflip vaults, NEAR Intents treasuries, Mayan contracts and the Squid multicall with their chain at the source, so the provider and the setup step read one table.
  4. Add those addresses and the Across multicall handlers under the provider name, so history and confirmation rows show "THORChain" or "Chainflip" instead of a raw address. EVM contracts deployed at one address on every chain sit under Ethereum; the address name lookup already falls back across chains.

1. Store scan address names as "<provider> Permit2" and "<provider> Router" so the spender row tells Uniswap's Permit2 apart from its Universal Router instead of showing "Uniswap" for both.
2. Upsert the names on the (chain, address) key so a rename reaches rows already in the database on the next setup run; the fraud and verification flags stay untouched.
3. Tag the static THORChain and Maya routers, Chainflip vaults, NEAR Intents treasuries, Mayan contracts and the Squid multicall with their chain at the source, so the provider and the setup step read one table.
4. Add those addresses and the Across multicall handlers under the provider name, so history and confirmation rows show "THORChain" or "Chainflip" instead of a raw address. EVM contracts deployed at one address on every chain sit under Ethereum; the address name lookup already falls back across chains.
Comment thread core/crates/storage/src/repositories/scan_addresses_repository.rs Outdated
gemcoder21 and others added 3 commits September 16, 2026 16:05
1. Insert the scan address names with on-conflict-do-nothing instead of upserting, so a setup run no longer bumps updated_at on every row it already knows.
2. Drop the upsert path from the store and repository since nothing else calls it.
@0xh3rman
0xh3rman marked this pull request as ready for review September 17, 2026 23:21
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