tx · jN7RF4xfkJGNFyzqnjfNa46ibnWUhgLxQ6vkkFs36B4

3N3TQ9di2BKwAqkqwMFNWNigLQduCbVnwEz:  -0.04000000 Waves

2019.11.13 17:20 [763417] smart account 3N3TQ9di2BKwAqkqwMFNWNigLQduCbVnwEz > SELF 0.00000000 Waves

{ "type": 13, "id": "jN7RF4xfkJGNFyzqnjfNa46ibnWUhgLxQ6vkkFs36B4", "fee": 4000000, "feeAssetId": null, "timestamp": 1573654948823, "version": 1, "sender": "3N3TQ9di2BKwAqkqwMFNWNigLQduCbVnwEz", "senderPublicKey": "5siQDWeRnAQ4knysN2J5ncozvByyjUiB7UzxA49MJrEm", "proofs": [ "gvQChwBJWh8mMDi3vjbcbbSMDHtMm9eZW7m6amRqKpAYdsLzfp2t2pMD3uEuV2nF9R7RSJ5K884he1BMdhWE6zD" ], "script": "base64:AAIDAAAAAAAAAAgIARIECgIIAQAAAAAAAAABAAAAAWkBAAAACWJ1eVRpY2tldAAAAAIAAAAIdGlja2V0SWQAAAAGYW1vdW50BAAAAAdwYXltZW50CQEAAAAFdmFsdWUAAAABCAUAAAABaQAAAAdwYXltZW50BAAAAAp0aWNrZXRJbmZvCQEAAAAFdmFsdWUAAAABCQAD7AAAAAEJAAJZAAAAAQUAAAAIdGlja2V0SWQEAAAAC3N0YXJ0SGVpZ2h0BAAAAAckbWF0Y2gwCQAEGgAAAAIIBQAAAAp0aWNrZXRJbmZvAAAABmlzc3VlcgIAAAAFc3RhcnQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABFVuaXQEAAAAAXgFAAAAByRtYXRjaDAAAAAAAAAAAAADCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABeAUAAAAHJG1hdGNoMAUAAAABeAkBAAAABXRocm93AAAAAAQAAAAKc3RvcEhlaWdodAQAAAAHJG1hdGNoMAkABBoAAAACCAUAAAAKdGlja2V0SW5mbwAAAAZpc3N1ZXICAAAAA2VuZAMJAAABAAAAAgUAAAAHJG1hd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XJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAGYW1vdW50CQACWQAAAAEFAAAACHRpY2tldElkBQAAAANuaWwAAAAA8WI4Jg==", "chainId": 84, "height": 763417, "spentComplexity": 0 } View: original | compacted Prev: 8N4Fjm8v2XppidRj9YuBPHamr1F4pRwdBEQAQmHhgHZz Next: none Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(i)
77 func buyTicket (ticketId,amount) = {
88 let payment = value(i.payment)
99 let ticketInfo = value(assetInfo(fromBase58String(ticketId)))
1010 let startHeight = match getInteger(ticketInfo.issuer, "start") {
1111 case x: Unit =>
1212 0
1313 case x: Int =>
1414 x
1515 case _ =>
1616 throw()
1717 }
1818 let stopHeight = match getInteger(ticketInfo.issuer, "end") {
1919 case x: Unit =>
2020 0
2121 case x: Int =>
2222 x
2323 case _ =>
2424 throw()
2525 }
2626 if (isDefined(payment.assetId))
2727 then throw("only waves for now")
2828 else if (if (((startHeight + stopHeight) > 0))
2929 then if ((startHeight > height))
3030 then true
3131 else (height > stopHeight)
3232 else false)
3333 then throw(((("you can only by a ticket between block: " + toString(startHeight)) + " and ") + toString(stopHeight)))
3434 else {
3535 let price = getIntegerValue(ticketInfo.issuer, "price")
3636 if (((price * amount) != payment.amount))
3737 then throw(((((("Not the correct price. The price for " + toString(amount)) + " tickets = ") + toString((price * amount))) + ". You are paying: ") + toString(payment.amount)))
3838 else TransferSet([ScriptTransfer(i.caller, amount, fromBase58String(ticketId))])
3939 }
4040 }
4141
4242

github/deemru/w8io/169f3d6 
49.24 ms