I'm trying to deploy a smart contract, that deploys fine in remix, but in foundry I keep getting:

server returned an error response: error code -32000: max priority fee per gas higher than max fee per gas

What settings do I use to get past this error?

1 Answer 1


You should update your --priority-gas-price. Usually something small like 1 works fine.

For example:

forge script script/yourScript.s.sol --priority-gas-price 1
  • Or 0. I believe it's the default on Remix
    – Mouradif
    Apr 10 at 18:14

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.