tx · GraTu7FdZRcy6EvgsW8ASHTfE9ZMQHboJdvNucMwvEtf

3MsqcsQSU3FeyxcMjrRQHcM8pTGrHu8yyWX:  -0.01400000 Waves

2019.09.08 11:33 [666863] smart account 3MsqcsQSU3FeyxcMjrRQHcM8pTGrHu8yyWX > SELF 0.00000000 Waves

{ "type": 13, "id": "GraTu7FdZRcy6EvgsW8ASHTfE9ZMQHboJdvNucMwvEtf", "fee": 1400000, "feeAssetId": null, "timestamp": 1567931583948, "version": 1, "sender": "3MsqcsQSU3FeyxcMjrRQHcM8pTGrHu8yyWX", "senderPublicKey": "D1oc84fv4treBFDLvPS9vQdrs7A9HwTHxaeK9C7nHRTH", "proofs": [ "31zWmCwGKJYM3WC8tE8Jfie1WB7K4tmJkqecMZhwbv4kCQf4m5HS8PMuqgta6EcrfVHpxx763SCdY4vZyRdPn5PQ" ], "script": "base64:AAIDAAAAAAAAAAAAAAAAAAAAAwAAAAFpAQAAAAtjcmVhdGVPcmRlcgAAAAEAAAAFcHJpY2UEAAAAA3BtdAkBAAAAB2V4dHJhY3QAAAABCAUAAAABaQAAAAdwYXltZW50AwkBAAAAASEAAAABCQEAAAAJaXNEZWZpbmVkAAAAAQgFAAAAA3BtdAAAAAdhc3NldElkCQAAAgAAAAECAAAAIllvdSBuZWVkIHRvIHVzZSB0b2tlbklkLCBub3Qgd2F2ZXMEAAAACmN1cnJlbnRLZXkJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAAHYXNzZXRJZAkAAlgAAAABCQEAAAAHZXh0cmFjdAAAAAEIBQAAAANwbXQAAAAHYXNzZXRJZAQAAAAHdW5pcUtleQkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACBQAAAApjdXJyZW50S2V5AgAAAAFfBQAAAAdhc3NldElkAgAAAAFfCQABpAAAAAEFAAAABmhlaWdodAkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAA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AACCQABLAAAAAIFAAAACmN1cnJlbnRLZXkCAAAAAV8FAAAAB2Fzc2V0SWQCAAAAAV8JAAGkAAAAAQUAAAAGaGVpZ2h0CQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAICAAAACGNoZWNraW5fBQAAAAd1bmlxS2V5CAUAAAAJbGFzdEJsb2NrAAAACXRpbWVzdGFtcAUAAAADbmlsAAAAAKP+7RY=", "chainId": 84, "height": 666863, "spentComplexity": 0 } View: original | compacted Prev: CC6SjPAZg75MLopDhuPLdBDyAxAZmdQwHPnMNH3bqr4K Next: none Diff:
OldNewDifferences
6464 let d = toBase58String(a.caller.bytes)
6565 let e = toBase58String(extract(c.assetId))
6666 let f = ((((d + "_") + e) + "_") + toString(height))
67- WriteSet([DataEntry(("checkin_" + f), true)])
67+ WriteSet([DataEntry(("checkin_" + f), lastBlock.timestamp)])
6868 }
6969 }
7070
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(a)
77 func createOrder (b) = {
88 let c = extract(a.payment)
99 if (!(isDefined(c.assetId)))
1010 then throw("You need to use tokenId, not waves")
1111 else {
1212 let d = toBase58String(a.caller.bytes)
1313 let e = toBase58String(extract(c.assetId))
1414 let f = ((((d + "_") + e) + "_") + toString(height))
1515 WriteSet([DataEntry(("assetAmount_" + f), c.amount), DataEntry(("assetPrice_" + f), b)])
1616 }
1717 }
1818
1919
2020
2121 @Callable(a)
2222 func buyTicket (f) = {
2323 let c = extract(a.payment)
2424 let e = extract(split(f, "_")[1])
2525 let g = extract(addressFromString(split(f, "_")[0]))
2626 let b = {
2727 let h = getInteger(this, ("assetPrice_" + f))
2828 if ($isInstanceOf(h, "Int"))
2929 then {
3030 let i = h
3131 i
3232 }
3333 else 0
3434 }
3535 let j = {
3636 let h = getInteger(this, ("assetAmount_" + f))
3737 if ($isInstanceOf(h, "Int"))
3838 then {
3939 let k = h
4040 k
4141 }
4242 else 0
4343 }
4444 let l = (j - 1)
4545 if ((0 >= j))
4646 then throw("Have not enough of tickets for this price")
4747 else if (isDefined(c.assetId))
4848 then throw("You need to use waves")
4949 else if ((b > c.amount))
5050 then throw("Count of waves is not match price")
5151 else ScriptResult(WriteSet([DataEntry(("assetAmount_" + f), l)]), TransferSet([ScriptTransfer(a.caller, 1, fromBase58String(e)), ScriptTransfer(g, b, unit)]))
5252 }
5353
5454
5555
5656 @Callable(a)
5757 func checkIn () = {
5858 let c = extract(a.payment)
5959 if (!(isDefined(c.assetId)))
6060 then throw("You need to use tokenId, not waves")
6161 else if ((c.amount != 1))
6262 then throw("Give only one ticket")
6363 else {
6464 let d = toBase58String(a.caller.bytes)
6565 let e = toBase58String(extract(c.assetId))
6666 let f = ((((d + "_") + e) + "_") + toString(height))
67- WriteSet([DataEntry(("checkin_" + f), true)])
67+ WriteSet([DataEntry(("checkin_" + f), lastBlock.timestamp)])
6868 }
6969 }
7070
7171

github/deemru/w8io/169f3d6 
33.80 ms