Closed rav3nh0lm closed 3 years ago
Upon further debugging, it's actually the line const account = await program.account.poolAccount.fetch(poolAccount);
that makes the request to localhost, instead of the devnet.
My Anchor.toml
looks as follows
[programs.devnet]
imo_launchpad = "5bcVGSYUFA2AKvweh3V5mg9zGjweioQQVvk18UCYjTR1"
cluster = "https://api.devnet.solana.com"
#[programs.localnet]
#imo_launchpad = "5bcVGSYUFA2AKvweh3V5mg9zGjweioQQVvk18UCYjTR1"
[registry]
url = "https://anchor.projectserum.com"
[provider]
cluster = "https://api.devnet.solana.com"
url = "https://api.devnet.solana.com"
wallet = "/Users/raven/.config/solana/id.json"
[scripts]
test = "/usr/local/bin/node /usr/local/bin/mocha -t 1000000 --require ts-node/register tests/imo-launchpad.ts"
Please move this to the Anchor repository. https://github.com/project-serum/anchor
Apologies and done: https://github.com/project-serum/anchor/issues/880 ! Thanks for the swift response @armaniferrante :)
I am using anchor 0.16.2, and following typescript packages
I set my solana config to the following variables
and am invoking the following code
to run an expressJS server (typescript).
whenever I make an API call through the following code
I get an error
In short: The request is made to the local testnet, instead of to devnet / the development cluster. I find this weird, as in all instances that I could do, I have made sure to set the Solana cluster to
https://api.devnet.solana.com
.When I control-F the entire project, I only see the following code-snippet to include
localhost:8899
as the linkmanualy changing this in the
node_modules
did not resolve this, however.Is there anything wrong that I do, or anything I'm missing? The request is made to the local testnet, instead of to devnet / the development cluster. Any help would be greatly appreciated, this is the last bug that stands between me and devnet. This is for the ignition hackathon in 2 days, so I would appreciate any help a lot! :)