Error: Dry run failed, could not automatically determine a budget

I wrote a program with SDK.It works, however sometimes it complains

Error: Dry run failed, could not automatically determine a budget

Can somebody help?Thx

Hi @Rockgu, could you please provide me with the complete error log? Thanks!

Sometimes a transaction that is bound to fail first gives this “could not automatically determine a budget”. To tackle this, you can add txb.setGasBudget(100000000) in your PTB (set a big budget, relative to how big your PTB is). Your transaction will fail again, but now it will give you a more specific error code which will help you debug