tx · 2VmMcdHo26tnp1JAaakP1VUMefPF8T2SkadYaHnuiZ4j 3MxorpV6jKdNhrzHSujnjVXu7fr8PCHhMwi: -0.01400000 Waves 2019.10.05 00:24 [705538] smart account 3MxorpV6jKdNhrzHSujnjVXu7fr8PCHhMwi > SELF 0.00000000 Waves
{ "type": 13, "id": "2VmMcdHo26tnp1JAaakP1VUMefPF8T2SkadYaHnuiZ4j", "fee": 1400000, "feeAssetId": null, "timestamp": 1570224377925, "version": 1, "sender": "3MxorpV6jKdNhrzHSujnjVXu7fr8PCHhMwi", "senderPublicKey": "BZT5fzv8ZeHVn8xAGZVXZHUvoAkdRNCbtEuBn3pCuXEH", "proofs": [ "4KioSrGs6ConsgiotVcC4cVVgobExQCWyoYLjN4GjD74go69knSDKBohWokSBYX4dZanQYm1qhCYiNubx1pu1XrK" ], "script": "base64:AAIDAAAAAAAAAAAAAAAJAAAAAA5vd25lclB1YmxpY0tleQEAAAAgnOTxzRGlQL/gVO1uf4r6ecWijHA9iBu9xK1V+iHbiGoAAAAADFJhbmRvbWl6ZUtleQkAAlkAAAABAgAAACxCWlQ1Znp2OFplSFZuOHhBR1pWWFpIVXZvQWtkUk5DYnRFdUJuM3BDdVhFSAAAAAAKZGVwbG95SW5mbwIAAAAkYWRkZWQgZGF0YSBmdW5jdGlvbmFsaXR5ICh0ZXN0cGhhc2UpAQAAAAtlbmNyeXB0RGF0YQAAAAIAAAAHbWVzc2FnZQAAAARwS2V5BAAAAAZvdXRwdXQCAAAAJHJzYVZlcmlmeShTaGEyNTYgLG1lc3NhZ2UscEtleSxwS2V5KQUAAAAGb3V0cHV0AQAAAAlzZXNzaW9uSWQAAAAABAAAAANnaWQJAASxAAAAAQkAAfcAAAABCQABmgAAAAEIBQAAAAlsYXN0QmxvY2sAAAAGaGVpZ2h0BQAAAANnaWQBAAAACXJhbmRvbWl6ZQAAAAIAAAAHcnNhU2lnbgAAAAt0aGlzU2Vzc2lvbgQAAAAGZ2FtZUlkBQAAAAt0aGl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ZXNzYWdlRGF0YQUAAAADbmlsCQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAALdG9rZW5BbW91bnQFAAAABWFzc2V0BQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAAAAAWQFAAAAByRtYXRjaDAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAA5vd25lclB1YmxpY0tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAPRGF0YVRyYW5zYWN0aW9uBAAAAAFkBQAAAAckbWF0Y2gwBgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAABZAUAAAAHJG1hdGNoMAYDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAEElzc3VlVHJhbnNhY3Rpb24EAAAAAWQFAAAAByRtYXRjaDAGAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABJSZWlzc3VlVHJhbnNhY3Rpb24EAAAAAWQFAAAAByRtYXRjaDAGB6QiFJ8=", "chainId": 84, "height": 705538, "spentComplexity": 0 } View: original | compacted Prev: 4zScMVSEjUomSn2qj2bXPS4G76F9gAEShBkrxsQwCRd3 Next: B6YvmJ7MjnZePVxTjX9aTeduJakUGFYNQx6bGdks5Jmy Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'BZT5fzv8ZeHVn8xAGZVXZHUvoAkdRNCbtEuBn3pCuXEH' | |
5 | 5 | ||
6 | 6 | let b = fromBase58String("BZT5fzv8ZeHVn8xAGZVXZHUvoAkdRNCbtEuBn3pCuXEH") | |
7 | 7 | ||
8 | 8 | let c = "added data functionality (testphase)" | |
9 | 9 | ||
10 | 10 | func d (e,f) = { | |
11 | 11 | let g = "rsaVerify(Sha256 ,message,pKey,pKey)" | |
12 | 12 | g | |
13 | 13 | } | |
14 | 14 | ||
15 | 15 | ||
16 | 16 | func h () = { | |
17 | 17 | let i = toInt(sha256(toBytes(lastBlock.height))) | |
18 | 18 | i | |
19 | 19 | } | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | func j (k,l) = { | |
23 | 23 | let m = l | |
24 | 24 | let n = sigVerify(toBytes(m), toBytes(k), b) | |
25 | 25 | if (n) | |
26 | 26 | then { | |
27 | 27 | let o = (toInt(sha256(toBytes(k))) % 6) | |
28 | 28 | if ((0 > o)) | |
29 | 29 | then ((-1 * o) + 1) | |
30 | 30 | else (o + 1) | |
31 | 31 | } | |
32 | 32 | else throw("Invalid RSA signature") | |
33 | 33 | } | |
34 | 34 | ||
35 | 35 | ||
36 | 36 | func p (q,r) = { | |
37 | 37 | let s = "x" | |
38 | 38 | s | |
39 | 39 | } | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | func t (u,v,w) = { | |
43 | 43 | let x = "placeholder" | |
44 | 44 | x | |
45 | 45 | } | |
46 | 46 | ||
47 | 47 | ||
48 | 48 | func y (z) = { | |
49 | 49 | let A = getStringValue(this, z) | |
50 | 50 | A | |
51 | 51 | } | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | @Callable(B) | |
55 | 55 | func dispense () = { | |
56 | 56 | let m = toBase58String(B.transactionId) | |
57 | 57 | let C = extract(B.payment) | |
58 | 58 | let e = "default message for now" | |
59 | 59 | let D = toBase58String(extract(B.callerPublicKey)) | |
60 | 60 | let E = toBase58String(extract(B.caller.bytes)) | |
61 | 61 | let F = B.transactionId | |
62 | 62 | let G = base58'6khhQRn6E7dsLqxnkGHnEKoZZJv9U7bhadzprWvjAi6m' | |
63 | 63 | let H = if ((C.amount == 100000000)) | |
64 | 64 | then "S" | |
65 | 65 | else if ((C.amount == 200000000)) | |
66 | 66 | then "M" | |
67 | 67 | else if ((C.amount == 400000000)) | |
68 | 68 | then "L" | |
69 | 69 | else "error" | |
70 | 70 | let I = ((((((((toBase58String(extract(B.callerPublicKey)) + ";") + toString(C.amount)) + ";") + toString(height)) + ";") + m) + ";") + H) | |
71 | 71 | if ((H == "error")) | |
72 | 72 | then throw("Prices are 1, 2, and 4 waves. Other amounts will be rejected by the smart contract") | |
73 | 73 | else { | |
74 | 74 | let J = (C.amount * 3) | |
75 | 75 | ScriptResult(WriteSet([DataEntry(D, I)]), TransferSet([ScriptTransfer(B.caller, J, G)])) | |
76 | 76 | } | |
77 | 77 | } | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | @Verifier(K) | |
81 | 81 | func L () = { | |
82 | 82 | let M = K | |
83 | 83 | if ($isInstanceOf(M, "SetScriptTransaction")) | |
84 | 84 | then { | |
85 | 85 | let N = M | |
86 | 86 | sigVerify(K.bodyBytes, K.proofs[0], a) | |
87 | 87 | } | |
88 | 88 | else if ($isInstanceOf(M, "DataTransaction")) | |
89 | 89 | then { | |
90 | 90 | let N = M | |
91 | 91 | true | |
92 | 92 | } | |
93 | 93 | else if ($isInstanceOf(M, "TransferTransaction")) | |
94 | 94 | then { | |
95 | 95 | let N = M | |
96 | 96 | true | |
97 | 97 | } | |
98 | 98 | else if ($isInstanceOf(M, "IssueTransaction")) | |
99 | 99 | then { | |
100 | 100 | let N = M | |
101 | 101 | true | |
102 | 102 | } | |
103 | 103 | else if ($isInstanceOf(M, "ReissueTransaction")) | |
104 | 104 | then { | |
105 | 105 | let N = M | |
106 | 106 | true | |
107 | 107 | } | |
108 | 108 | else false | |
109 | 109 | } | |
110 | 110 |
github/deemru/w8io/169f3d6 42.53 ms ◑