What does the first three lines in Ride4dApps mean?

64 views Asked by At

I start writhing my first dApp on RIDE language and I noticed that in smart account these 3 lines of code

{-# STDLIB_VERSION 2 #-}
{-# CONTENT_TYPE EXPRESSION #-}
{-# SCRIPT_TYPE ACCOUNT #-}

are different in ride4dapps code example in the IDE

{-# STDLIB_VERSION 3 #-}
{-# CONTENT_TYPE DAPP #-}
{-# SCRIPT_TYPE ACCOUNT #-}

what are these 3 lines for?

1

There are 1 answers

0
Nazim Faour On BEST ANSWER

this line {-# STDLIB_VERSION 2 #-} stands for the standard library version(the latest version is STDLIB_VERSION 3) which is important to include ride4dapps standard functionality(built-in functions) and the Postfix notation.

this line {-# CONTENT_TYPE EXPRESSION #-} represents the type of a contract which is

  • EXPRESSION for smart accounts and smart assets.
  • DAPP for ride4dApps.

The last line {-# SCRIPT_TYPE ACCOUNT #-} represents the script type, which is:

  • ASSET for smart assets script.
  • ACCOUNT for smart accounts and ride4dApps scripts.