đŸ”ĸData Types

Fluff data types

Generic data types

Fluff supports the following data types:

Data TypeSample ValuesNotes

Boolean

true, false

Number

1234 1.44 -22

String

"some text"

List

[1, 2, 3] ["string 1", "string 2"]

Lists cannot contain numbers and strings simultaneously.

Dictionary

{key1: 123, key2: "string"}

They are only used to pass arguments to actions. You cannot create them directly.

Special data types

Price data type is a special numeric data type - it's a number prefixed with a dollar sign "$" or followed by a token name (in uppercase), e.g:

  • $100

  • 50 MATIC

It's nothing more than just a syntax sugar though, so below conditions are equal:

  • "listing.price < $100" is the same as "listing.price_usd < 100"

  • "listing.price < 50 MATIC" is the same as "listing.price_amount < 50 and listing.price_token == "MATIC""

If listing/sale price is in another token than specified it will evaluate to false. That is, even if a listing price is 100 USDC a condition like "listing.price < 100 MATIC" won't be met due to "price_token" mismatch

Last updated