Skip to content

Commit

Permalink
Introduce fixed lookup table of Pontus-X participant names
Browse files Browse the repository at this point in the history
  • Loading branch information
csillag committed Feb 16, 2024
1 parent 6589f1a commit 47cd859
Show file tree
Hide file tree
Showing 3 changed files with 784 additions and 3 deletions.
13 changes: 13 additions & 0 deletions src/app/data/pontusx-name-resolver.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import data from './pontusx-participants.json'

type Entry = {
name: string
address: string
}

const names: Entry[] = data

const resolveTable = new Map<string, string>()
names.forEach(entry => resolveTable.set(entry.address.toLowerCase(), entry.name))

export const getPontusXParticipant = (address: string) => resolveTable.get(address.toLowerCase())
Loading

0 comments on commit 47cd859

Please sign in to comment.