0
   ix = process_item(
      {"lamports": int(lamports)}, 
      {
            "destination": destination_pk, 
            "from_account": from_account,
            "manager": manager.pubkey(), # signer
        }
    )
    
    #latest blockhash
    latest_blockhash = http_client.get_latest_blockhash(Confirmed).value
    hash = latest_blockhash.blockhash
    
    # Set up tx
    tx = Transaction(hash)
    
    # Add CU limit
    # cu_limit = set_compute_unit_limit(4000)
    # tx.add(cu_limit)
    
    tx.add(ix)
    
    #manager signed transaction
    signed_tx = manager_anchor_wallet.sign_transaction(tx)

    provider = Provider(async_client,manager_anchor_wallet)
    sig = await provider.send(signed_tx,TxOpts(preflight_commitment=Confirmed))

This works perfectly fine but as soon as I uncomment the code that adds the setting of limiting CU units, I get an error, SignerError: not enough signers

Why does this error occur and what's the missing signer needed to add CU limit?

3
  • To me, it's strange that it worked without the cu limit ix. Though, I can spot one thing that could be worth checking which is that provider.send does NOT work with signed_tx.
    – chalda
    Commented May 26 at 6:29
  • Woops typo in the code. Fixed it swith provider.send(signed_tx,.... And yes it does work without any issues if the I do not add cu_limit to tx. It's such a strange problem. I still have no idea why just this line causes this.
    – ZeroNine
    Commented May 26 at 14:16
  • Adding a vote to close this as a duplicate since the other answer helped: Not enough signers when setting compute units
    – Jon C
    Commented May 28 at 11:35

1 Answer 1

1

Figured it out thanks to this post. Not enough signers when setting compute units

I needed to add the fee payer to the transaction.

tx.fee_payer = manager.pubkey()

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