3
  • I want to display program addresses that are invoked in a transaction, but in a more understandable way. What is the best way to format the raw address I have into something meaningful?
  • I remember seeing a JSON with a list of known programs, but I cannot recall where.
  • Could someone point me to the right resource here?

Added Explorer Image for Understanding my intention

enter image description here

1

1 Answer 1

5

The list of programs named in the Solana Explorer can be found in the source code:

export const PROGRAM_INFO_BY_ID: { [address: string]: ProgramInfo } = {
    '11111111111111111111111111111111': {
        deployments: ALL_CLUSTERS,
        name: PROGRAM_NAMES.SYSTEM,
    },
    '22Y43yTVxuUkoRKdm9thyRhQ3SdgQS7c7kB6UNCiaczD': {
        deployments: [Cluster.MainnetBeta],
        name: PROGRAM_NAMES.SERUM_SWAP,
    },
    '27haf8L6oxUeXrHrgEgsexjSY5hbVUWEmvv9Nyxg8vQv': {
        deployments: [Cluster.MainnetBeta],
        name: PROGRAM_NAMES.RAYDIUM_LP_2,
    },
    '2rHhojZ7hpu1zA91nvZmT8TqWWvMcKmmNBCr2mKTtMq4': {
        deployments: [Cluster.Devnet],
        name: PROGRAM_NAMES.WORMHOLE_NFT,
    },
...(huge list of names continues)...

Many open-source programs were published to the Anchor program registry (https://apr.dev) however as of Mar 2024 this no seems to exist.

1
  • Looks like apr.dev doesn't work anymore. :(
    – mikemaccana
    Commented Mar 26 at 2:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.