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