tx · GRhoZrFn7UeBasXSDqY4KCPH1YXix5VkyUC5QmvjSFje

3NByvCG2T14xJ3bfRNpKCns37ehfBSTGja3:  -0.01000000 Waves

2019.07.28 16:37 [605990] smart account 3NByvCG2T14xJ3bfRNpKCns37ehfBSTGja3 > SELF 0.00000000 Waves

{ "type": 13, "id": "GRhoZrFn7UeBasXSDqY4KCPH1YXix5VkyUC5QmvjSFje", "fee": 1000000, "feeAssetId": null, "timestamp": 1564321106374, "version": 1, "sender": "3NByvCG2T14xJ3bfRNpKCns37ehfBSTGja3", "senderPublicKey": "5ADSy4csCWyBrq24UKNhxf9g1q3ntYJ1JJC7582a5sF1", "proofs": [ "2dbgRk2Tz4crfLZgJDFC8Gzb2Cq2PxahT6tmYiRBzBcC9GJQzLb4iN7ByEA4Qfhd4Bm9P1PybJwbXTxXTfA9NHLD" ], "script": "base64:AAIDAAAAAAAAAAAAAAADAAAAAARzYWx0AgAAAARzYWx0AAAAAAZyZWJhaXQAAAAAAAAJJ8ABAAAAEmdldEludGVyZ2VyRGVmYXVsdAAAAAIAAAADa2V5AAAAB2RlZmF1bHQEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEFAAAAB2RlZmF1bHQAAAADAAAAAWkBAAAAB3Nwb25zb3IAAAABAAAADm9yYWNsZUFkZGRyZXNzBAAAAANrZXkJAAEsAAAAAgIAAAAKc3BvbnNvcmVkXwUAAAAOb3JhY2xlQWRkZHJlc3MEAAAAB3BheW1lbnQJAQAAAAdleHRyYWN0AAAAAQgFAAAAAWkAAAAHcGF5bWVudAMJAQAAAAIhPQAAAAIIBQAAAAdwYXltZW50AAAAB2Fzc2V0SWQFAAAABHVuaXQJAAACAAAAAQIAAAAcc3BvbnNvcnNoaXAgbXVzdCBiZSBpbiBXQVZFUwQAAAAIbmV3VmFsdWUJAABkAAAAAggFAA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AAAADqMHDS", "chainId": 84, "height": 605990, "spentComplexity": 0 } View: original | compacted Prev: none Next: RY88okCaxByZC5JUKqdTs3dgPNVevxSEoQjtrDafoXk Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 3 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let a = "salt"
5+
6+let b = 600000
7+
8+func c (d,e) = {
9+ let f = getInteger(this, d)
10+ if ($isInstanceOf(f, "Int"))
11+ then {
12+ let g = f
13+ g
14+ }
15+ else e
16+ }
17+
18+
19+@Callable(h)
20+func sponsor (i) = {
21+ let d = ("sponsored_" + i)
22+ let j = extract(h.payment)
23+ if ((j.assetId != unit))
24+ then throw("sponsorship must be in WAVES")
25+ else {
26+ let k = (j.amount + c(d, 0))
27+ WriteSet([DataEntry(d, k)])
28+ }
29+ }
30+
31+
32+
33+@Callable(h)
34+func commit (l) = {
35+ let m = toBase58String(h.caller.bytes)
36+ let n = ((("commit_" + m) + "_") + toString(height))
37+ if (isDefined(getString(this, n)))
38+ then throw("commit already done")
39+ else WriteSet([DataEntry(n, l)])
40+ }
41+
42+
43+
44+@Callable(h)
45+func reveal (o,p) = if ((extract(parseInt(o)) >= height))
46+ then throw("reveal must be in the past blocks after commit")
47+ else {
48+ let m = toBase58String(h.caller.bytes)
49+ let l = extract(getString(this, ((("commit_" + m) + "_") + o)))
50+ let q = toBase16String(sha256(toBytes((p + a))))
51+ if ((l != q))
52+ then throw("invalid reveal")
53+ else {
54+ let r = ((("reveal_" + m) + "_") + o)
55+ if (isDefined(getString(this, r)))
56+ then throw("reveal already in blockchain")
57+ else {
58+ let s = ("sponsored_" + m)
59+ let t = c(s, 0)
60+ if ((t >= b))
61+ then ScriptResult(WriteSet([DataEntry(s, (t - b)), DataEntry(r, p)]), TransferSet([ScriptTransfer(h.caller, b, unit)]))
62+ else WriteSet([DataEntry(r, p)])
63+ }
64+ }
65+ }
66+
67+

github/deemru/w8io/169f3d6 
17.56 ms