rah
rah

Reputation: 69

What does the first three lines in Ride4dApps mean?

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?

Upvotes: 1

Views: 62

Answers (1)

Nazim Faour
Nazim Faour

Reputation: 804

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.

Upvotes: 0

Related Questions