tx · 3E4Yuv1Y2Xm52ZKy8G1GJA7c2gjwoStDJWdsDvtTj5M5

3Mr47Kpwz3hxvXt417SP42WaoT5iGsSEr5h:  -0.04000000 Waves

2019.11.14 16:20 [764792] smart account 3Mr47Kpwz3hxvXt417SP42WaoT5iGsSEr5h > SELF 0.00000000 Waves

{ "type": 13, "id": "3E4Yuv1Y2Xm52ZKy8G1GJA7c2gjwoStDJWdsDvtTj5M5", "fee": 4000000, "feeAssetId": null, "timestamp": 1573737609060, "version": 1, "sender": "3Mr47Kpwz3hxvXt417SP42WaoT5iGsSEr5h", "senderPublicKey": "8JFVEhPAiLA1CbnTkMF6GdCqYJoNYUYUX6bmt8wk7VNc", "proofs": [ "oWzkcpMZgS9UmKqeTxv893jM5eq6CdPvjvqMbmmANFyNi9W4y9Red515RAh5HS9ut6g9eMHNitmJkfrmdWv1F3o" ], "script": "base64:AAIDAAAAAAAAAAgIARIECgIIAQAAAAAAAAABAAAAAWkBAAAACWJ1eVRpY2tldAAAAAIAAAAIdGlja2V0SWQAAAAGYW1vdW50BAAAAAdwYXltZW50CQEAAAAFdmFsdWUAAAABCAUAAAABaQAAAAdwYXltZW50BAAAAAp0aWNrZXRJbmZvCQEAAAAFdmFsdWUAAAABCQAD7AAAAAEJAAJZAAAAAQUAAAAIdGlja2V0SWQEAAAAC3N0YXJ0SGVpZ2h0BAAAAAckbWF0Y2gwCQAEGgAAAAIIBQAAAAp0aWNrZXRJbmZvAAAABmlzc3VlcgIAAAAFc3RhcnQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABFVuaXQEAAAAAXgFAAAAByRtYXRjaDAAAAAAAAAAAAADCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABeAUAAAAHJG1hdGNoMAUAAAABeAkBAAAABXRocm93AAAAAAQAAAAKc3RvcEhlaWdodAQAAAAHJG1hdGNoMAkABBoAAAACCAUAAAAKdGlja2V0SW5mbwAAAAZpc3N1ZXICAAAAA2VuZAMJAAABAAAAAg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AALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAGYW1vdW50CQACWQAAAAEFAAAACHRpY2tldElkBQAAAANuaWwAAAAA8WI4Jg==", "chainId": 84, "height": 764792, "spentComplexity": 0 } View: original | compacted Prev: CsePCZpMtuL4Sp2CezH1qUuvnLThUeEfWrGhDr1HmiEn 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 
25.18 ms