Function of Script and Predicates

I 'm new developer of fuel from EVM, and I am confused of the function of [Script] and [Predicates].

If I want to test contract, I can use rust to test. And if I want to interact with contract, I can use typescript SDK. How does script and predicate work? How to understand these two concept? Any examples?

Hi @sunnybinb welcome

I would recommend you go through this guide as a start:
Intro to Sway | Fuel Docs
image
You will build an online marketplace; this should get you up to speed.

predicates are a little bit tricky at start, just need a little bit of persistence since they lean more on the advanced side of Fuel and Sway.
one can build without them and can always refactor to include predicates as things get clearer.

basically, a predicate is a like a smart wallet. You can implement things like account abstraction / gas-less transactions / multisig wallets with Sway.

However, there is a guide also here:
Intro to Predicates | Fuel Docs

and a couple of vedios on youtube

predicates fuel - YouTube
image

Good Luck

Thank you very much. I go on learning them.

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.