tx · DbhKDdWqjqjehsxzoiPd11HtjvM9So4LmqTkbM5tNoQn

3MvcThc2oaRXWLgYxiGhr1jnd4gK5CXBGhE:  -0.01400000 Waves

2019.08.28 12:59 [650904] smart account 3MvcThc2oaRXWLgYxiGhr1jnd4gK5CXBGhE > SELF 0.00000000 Waves

{ "type": 13, "id": "DbhKDdWqjqjehsxzoiPd11HtjvM9So4LmqTkbM5tNoQn", "fee": 1400000, "feeAssetId": null, "timestamp": 1566986361332, "version": 1, "sender": "3MvcThc2oaRXWLgYxiGhr1jnd4gK5CXBGhE", "senderPublicKey": "Czmo9kTsBGhSfVm9DSRTG8uoiyrcMQB63vabDwPobjqx", "proofs": [ "5PT2Ybsd5V6Tm2wh6UFBNjS7VZaB7uSiLQawsdXpqvMFaEWYPeefkB7dCg9bYHfnjzHC5JX3dfRLDCBiULBsmPua" ], "script": "base64:AwQAAAAHUHViS2V5MQEAAAAgaQxxSAhSITOlMYdvwKcfK7u/x0yzOg/68EH0ax0QlWUEAAAAB1B1YktleTIBAAAAILb58FcZXTIbjEshMW6ayDB2XcNop87YatlbtNE8j6N0BAAAAARzaWcxAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAB1B1YktleTEAAAAAAAAAAAEAAAAAAAAAAAAEAAAABHNpZzIDCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAQUAAAAHUHViS2V5MgAAAAAAAAAAAQAAAAAAAAAAAAkAAGYAAAACCQAAZAAAAAIFAAAABHNpZzEFAAAABHNpZzIAAAAAAAAAAADO+UOI", "chainId": 84, "height": 650904, "spentComplexity": 0 } View: original | compacted Prev: AFpQLnwLh9qt7Kg9pKu8Hvu7qcWJcaxyLK7epwMb4dUm Next: BDxF3a3h5U7PAdANQZL3pJugzq5hLyLXxLbSo7oVTu2s Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
2-{-# SCRIPT_TYPE ACCOUNT #-}
3-{-# CONTENT_TYPE DAPP #-}
4-let a = 4
5-
6-let b = "cells"
7-
8-@Callable(c)
9-func create (d,e,f,g) = {
10- let h = if ((g != "WAVES"))
11- then {
12- let i = valueOrErrorMessage(assetInfo(fromBase58String(g)), "There is no asset with specified id")
13- g
14- }
15- else "WAVES"
16- let j = valueOrErrorMessage(c.payment, "Where is prize?")
17- let k = if (isDefined(j.assetId))
18- then toBase58String(value(j.assetId))
19- else "WAVES"
20- if (if (if ((d == ""))
21- then true
22- else (e == ""))
23- then true
24- else (0 > f))
25- then throw("Invalid name, description or ticket price")
26- else {
27- let l = toBase58String(c.transactionId)
28- WriteSet([DataEntry((l + "_name"), d), DataEntry((l + "_desc"), e), DataEntry((l + "_ticket_price"), f), DataEntry((l + "_ticket_asset"), h), DataEntry((l + "_prize_amount"), j.amount), DataEntry((l + "_prize_asset"), k), DataEntry((l + "_creator"), toBase58String(c.caller.bytes)), DataEntry((l + "_cells"), 0), DataEntry((l + "_status"), true), DataEntry((l + "_balance"), 0)])
29- }
30- }
31-
32-
33-
34-@Callable(c)
35-func buy (m,n) = {
36- let o = valueOrErrorMessage(getInteger(this, (m + "_cells")), "No lottery with specified id")
37- let p = getBooleanValue(this, (m + "_status"))
38- if (!(p))
39- then throw("Specified lottery is over")
40- else if (if ((0 > n))
41- then true
42- else (n > a))
43- then throw("Invalid number")
44- else {
45- let f = valueOrErrorMessage(getInteger(this, (m + "_ticket_price")), "Ticket price error")
46- let g = valueOrErrorMessage(getString(this, (m + "_ticket_asset")), "Ticket asset error")
47- let j = valueOrErrorMessage(c.payment, "Where is payment?")
48- let h = if (isDefined(j.assetId))
49- then toBase58String(value(j.assetId))
50- else "WAVES"
51- if (if ((h != g))
52- then true
53- else (j.amount != f))
54- then throw("Invalid payment")
55- else if (isDefined(getString(this, toString(n))))
56- then throw("Already bought")
57- else {
58- let q = (o == a)
59- let r = (valueOrErrorMessage(getInteger(this, (m + "_balance")), "Balance error") + j.amount)
60- if (q)
61- then {
62- let s = addressFromStringValue(valueOrErrorMessage(getString(this, (m + "_creator")), "Creator error"))
63- let t = valueOrErrorMessage(getInteger(this, (m + "_prize_amount")), "Prize amount error")
64- let k = valueOrErrorMessage(getString(this, (m + "_prize_asset")), "Prize asset error")
65- let u = (toInt(lastBlock.generationSignature) % (a + 1))
66- let v = if ((u == n))
67- then c.caller
68- else {
69- let w = valueOrErrorMessage(getString(this, ((m + "_cell:") + toString(u))), "Win data error")
70- value(addressFromString(w))
71- }
72- ScriptResult(WriteSet([DataEntry((m + "_status"), false), DataEntry((m + "_balance"), 0), DataEntry((m + "_cells"), (o + 1)), DataEntry(((m + "_cell:") + toString(n)), toString(c.caller)), DataEntry((m + "_winner:"), toBase58String(v.bytes))]), TransferSet([if ((k == "WAVES"))
73- then ScriptTransfer(v, t, unit)
74- else ScriptTransfer(v, t, fromBase58String(k)), if ((g == "WAVES"))
75- then ScriptTransfer(s, r, unit)
76- else ScriptTransfer(s, r, fromBase58String(g))]))
77- }
78- else WriteSet([DataEntry(((m + "_cell:") + toString(n)), toString(c.caller)), DataEntry((m + "_cells"), (o + 1)), DataEntry((m + "_balance"), r)])
79- }
80- }
81- }
82-
83-
84-@Verifier(x)
85-func y () = true
86-
2+{-# CONTENT_TYPE EXPRESSION #-}
3+let PubKey1 = base58'854p8BYzrj6yBPRPmfQur3oF1Rjc1AJ548qRp5FT5kDa'
4+let PubKey2 = base58'DKGFPozLrsiR8NM4NJzqQaBYC8NyGYjuw2hDYicQVjco'
5+let sig1 = if (sigVerify(tx.bodyBytes, tx.proofs[0], PubKey1))
6+ then 1
7+ else 0
8+let sig2 = if (sigVerify(tx.bodyBytes, tx.proofs[1], PubKey2))
9+ then 1
10+ else 0
11+((sig1 + sig2) > 0)

github/deemru/w8io/c3f4982 
36.70 ms