0

This is a small test that I want to run on the devnet.

export async function createMintsTransaction(
  wallet: AnchorWallet
): Promise<anchor.web3.Transaction> {
  const [provider, program, seedUtil] = await getAnchorConfigs(wallet);

  const likeMintIx = await program.methods
    .createLikeMint()
    .accounts({
      likeMetadata: seedUtil.likeMetadataPda,
      payer: provider.wallet.publicKey,
    })
    .instruction();

  const retweetMintIx = await program.methods
    .createRetweetMint()
    .accounts({
      retweetMetadata: seedUtil.retweetMetadataPda,
      payer: provider.wallet.publicKey,
    })
    .instruction();

  return new anchor.web3.Transaction().add(likeMintIx).add(retweetMintIx);
}

describe("SolChirp Anchor tests", async () => {
  it("create the Like & Retweet mints", async () => {
    await anchor.web3
      .sendAndConfirmTransaction(
        connection,
        await util.createMintsTransaction(MASTER_WALLET),
        [MASTER_WALLET.payer]
      )
      .catch((err) => {
        console.log(err);
      });
  });
});

the anchor toml -

[toolchain]

[features]
resolution = true
skip-lint = false

[programs.localnet]
sol_chirp = "2fjRTWqVzMHu77NdsdrE1KKkzs4GW8cQoCo4h1nQWCjM"

[registry]
url = "https://api.apr.dev"

[provider]
cluster = "devnet"
wallet = "~/.config/solana/id.json"

[scripts]
test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"

1 Answer 1

0

You have probably gotten your IP blacklisted. Give it a few days / switch to a new provider.

When I faced this error, I switched my provider/connection string to Helius, since program deployments worked just fine.

const connection = new Connection(
    `https://devnet.helius-rpc.com/?api-key=${process.env.HELIUS_API_KEY}`
);
1
  • 1
    Thanks! doing this solved it!!
    – Yash Patil
    Commented May 15 at 8:00

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.