Error when try to run the command "npm run start-solana-main" to run on solana CLI

Viewed 29

I have deployed my contract on the Solana mainnet and when I run

npm run start-solana-main

The server started running successfully but when I post a file to the service, it shows me error that

The declared program id does not matched the actual program id

This is actual screenshot: enter image description here

1 Answers

In the anchor.toml file you have program

[programs.localnet]
program = "ABTiPAFguUxFVohT1xPkfTc3YoJL9vpyp4oRA9RBiGqR"

and inside lib.rs, you have

declare_id!("ABTiPAFguUxFVohT1xPkfTc3YoJL9vpyp4oRA9RBiGqR");

Error states that they do not match

Related