Surge source code


#1

Hello)
I got the source code of Surge smart asset from node info about it

# Surge is a Smart Asset.
# It's price is increased every day: it is at least 0.001 * (1 + days * days) WAVES.
# DEX orders should have expiration less than 100 minutes.

let startHeight = 1375557
let startPrice = 100000
let interval = 24 * 60
let exp = 100 * 60 * 1000
match tx {
  case e:ExchangeTransaction =>
    let days = (height - startHeight) / interval
    if (
      if (
        if (
          e.price >= startPrice * (1 + days * days)
        )
        then
          !isDefined(e.sellOrder.assetPair.priceAsset)
        else
          false
      )
      then
        exp >= e.sellOrder.expiration - e.sellOrder.timestamp
      else
        false
    )
    then
      exp >= e.buyOrder.expiration - e.buyOrder.timestamp
    else
      false
  case tx:BurnTransaction => true
  case _ => false
}

#5

Hi,

My token is YDMP Token, if I want to add this Script to my YDMP Token then how can I add this Script ??


#6

Could you tell me what is the easiest way to get an asset script which has been issued?

You said you used node info, could you elaborate?


#7

I used this
You can use the 0.16.x version of node to get the source code of the script :slight_smile: