I’m trying to get a super simple example for predicates to work, where the predicate takes no arguments and returns true.
In the small frontend the predicate is loaded, funds are sent to the predicate and subsequently I try to spend the funds in the predicate. Although the predicate should return true always, I get an error that validation failed.
I can see that you have not set a high enough gas limit for that transaction to succeed. With this, it is deemed invalid as documented in the fuel specification. I was able to get your example to succeed with a gas limit of 64.
Bit of additional information on the above also, may be helpful to yourself or others that land at this topic. The transfer function returns a TransactionResponse - source code. This class has a gasUsed attribute that can be used to inform your gasLimit on the request.