I have created a simple counter smart contract with anchor. I followed all steps outlined in this answer: https://stackoverflow.com/a/73862346/1192872
When I deploy my code to the solana devnet the deployment is stuck in a loop:
If it is helpful, here is my code
use anchor_lang::prelude::*;
declare_id!("2QmXMXyMAmZCE92Uqm2YhKgpqH3Teo6vZDNg7CRHYCK7");
#[program]
pub mod counter_program {
use super::*;
pub fn create(ctx: Context<Create>) -> Result<()> {
ctx.accounts.counter.authority = ctx.accounts.authority.key();
ctx.accounts.counter.count = 0;
Ok(())
}
pub fn increment(ctx: Context<Increment>) -> Result<()> {
ctx.accounts.counter.count += 1;
Ok(())
}
pub fn decrement(ctx: Context<Increment>) -> Result<()> {
ctx.accounts.counter.count -= 1;
Ok(())
}
}
#[derive(Accounts)]
pub struct Increment<'info> {
#[account(mut, has_one = authority)]
pub counter: Account<'info, Counter>,
pub authority: Signer<'info>,
}
#[derive(Accounts)]
pub struct Create<'info> {
#[account(init, payer = authority, space = 8 + 40)]
pub counter: Account<'info, Counter>,
#[account(mut)]
pub authority: Signer<'info>,
pub system_program: Program<'info, System>
}
#[account]
pub struct Counter {
pub authority: Pubkey,
pub count: u64,
}