tx · GTzHaVE4Ci9PfqnJNkQVigsRqgw4eSy1VYB7WReX9yUy 3MudoQDrftH1ko8mqmVrCGzZdfbxwp4S1VT: -0.01400000 Waves 2019.09.09 05:26 [667933] smart account 3MudoQDrftH1ko8mqmVrCGzZdfbxwp4S1VT > SELF 0.00000000 Waves
{ "type": 13, "id": "GTzHaVE4Ci9PfqnJNkQVigsRqgw4eSy1VYB7WReX9yUy", "fee": 1400000, "feeAssetId": null, "timestamp": 1567996040922, "version": 1, "sender": "3MudoQDrftH1ko8mqmVrCGzZdfbxwp4S1VT", "senderPublicKey": "782odmxJZG6YvTj533N39KECa2DMHvWmb3iEtfsDs95v", "proofs": [ "gKvzSGKowhdeMfgNofsvgEwQjLXRBcppumKmrfBqrfsYT3q3ydkYkq94EHjTxE7yexY8FNWVHrUR1QX1BPfbMw6" ], "script": "base64:AAIDAAAAAAAAAAAAAAAIAAAAAAxUWENPVU5URVJLRVkCAAAAByRUWF9OVU0AAAAABlRPUFRYUwIAAAAIJFRPUF9UWFMAAAAABk1pbkFtdAAAAAAAAAAABQAAAAAHV0FWRUxFVAkAAGgAAAACCQAAaAAAAAIAAAAAAAAAAGQAAAAAAAAAA+gAAAAAAAAAA+gAAAAACkNPTU1JU1NJT04JAABpAAAAAgkAAGgAAAACAAAAAAAAAAAFBQAAAAdXQVZFTEVUAAAAAAAAAAPoAQAAAA5JbmNyZW1lbnRUeE51bQAAAAEAAAAEdHhJZAQAAAAFdHhOdW0EAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAAMVFhDT1VOVEVSS0VZAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAA251bQUAAAAHJG1hdGNoMAUAAAADbnVtAAAAAAAAAAAACQAAZAAAAAIFAAAABXR4TnVtAAAAAAAAAAABAQAAAAZnZXRBbXQAAAABAAAABXR4TnVtAwkAAAAAAAACBQAAAAV0eE51bQIAAAABMAAAAAAAAAAAAAQAAAAHRGF0YVN0cgkBAAAA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YmxpY0tleQAAAAEJAAJZAAAAAQUAAAAOcGxheWVyUHViS2V5NTgDBQAAAA1iZXROb3RJbldhdmVzCQAAAgAAAAECAAAAG0JldCBhbW91bnQgbXVzdCBiZSBpbiBXYXZlcwMFAAAADWZlZU5vdEluV2F2ZXMJAAACAAAAAQIAAAAiVHJhbnNhY3Rpb24ncyBmZWUgbXVzdCBiZSBpbiBXYXZlcwQAAAAQcGxheWVyQWRkcmVzc1N0cgkABCUAAAABBQAAAA1wbGF5ZXJBZGRyZXNzBAAAAA1wYXltZW50U3VtU3RyCQABpAAAAAEFAAAACnBheW1lbnRTdW0EAAAACHR4TnVtU3RyCQABpAAAAAEFAAAABXR4TnVtBAAAAA10b1RoZU1vb25EYXRhCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAAAh0eE51bVN0cgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACBQAAAAdtZXNzYWdlAgAAAAFfBQAAABBwbGF5ZXJBZGRyZXNzU3RyAgAAAAFfBQAAAA1wYXltZW50U3VtU3RyCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAAAZUT1BUWFMJAQAAAAlnZXRUb3BUeHMAAAACBQAAAAh0eE51bVN0cgUAAAAKcGF5bWVudFN1bQUAAAADbmlsCQEAAAAIV3JpdGVTZXQAAAABBQAAAA10b1RoZU1vb25EYXRhAAAAAO+hGzg=", "chainId": 84, "height": 667933, "spentComplexity": 0 } View: original | compacted Prev: BjtG6mwJeVypEE8NVd2zBqnvjqduLpNQJaVzb2RM9qpG Next: 7ot95pZjdjL9LDvRDsMSnCVETCXDvB4SckQaHTmAN4ZT Diff:
Old | New | Differences | |
---|---|---|---|
22 | 22 | } | |
23 | 23 | ||
24 | 24 | ||
25 | - | func getAmt (txNum) = { | |
26 | - | let DataStr = getStringValue(this, txNum) | |
27 | - | let Data = split(DataStr, "_") | |
28 | - | parseIntValue(Data[2]) | |
29 | - | } | |
25 | + | func getAmt (txNum) = if ((txNum == "0")) | |
26 | + | then 0 | |
27 | + | else { | |
28 | + | let DataStr = getStringValue(this, txNum) | |
29 | + | let Data = split(DataStr, "_") | |
30 | + | parseIntValue(Data[2]) | |
31 | + | } | |
30 | 32 | ||
31 | 33 | ||
32 | 34 | func getTopTxs (txNum,paymentSum) = { |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let TXCOUNTERKEY = "$TX_NUM" | |
5 | 5 | ||
6 | 6 | let TOPTXS = "$TOP_TXS" | |
7 | 7 | ||
8 | 8 | let MinAmt = 5 | |
9 | 9 | ||
10 | 10 | let WAVELET = ((100 * 1000) * 1000) | |
11 | 11 | ||
12 | 12 | let COMMISSION = ((5 * WAVELET) / 1000) | |
13 | 13 | ||
14 | 14 | func IncrementTxNum (txId) = { | |
15 | 15 | let txNum = match getInteger(this, TXCOUNTERKEY) { | |
16 | 16 | case num: Int => | |
17 | 17 | num | |
18 | 18 | case _ => | |
19 | 19 | 0 | |
20 | 20 | } | |
21 | 21 | (txNum + 1) | |
22 | 22 | } | |
23 | 23 | ||
24 | 24 | ||
25 | - | func getAmt (txNum) = { | |
26 | - | let DataStr = getStringValue(this, txNum) | |
27 | - | let Data = split(DataStr, "_") | |
28 | - | parseIntValue(Data[2]) | |
29 | - | } | |
25 | + | func getAmt (txNum) = if ((txNum == "0")) | |
26 | + | then 0 | |
27 | + | else { | |
28 | + | let DataStr = getStringValue(this, txNum) | |
29 | + | let Data = split(DataStr, "_") | |
30 | + | parseIntValue(Data[2]) | |
31 | + | } | |
30 | 32 | ||
31 | 33 | ||
32 | 34 | func getTopTxs (txNum,paymentSum) = { | |
33 | 35 | let topStrExist = isDefined(getString(this, TOPTXS)) | |
34 | 36 | if (topStrExist) | |
35 | 37 | then { | |
36 | 38 | let topTxs = getStringValue(this, TOPTXS) | |
37 | 39 | let topTxsList = split(topTxs, "_") | |
38 | 40 | let s1Str = topTxsList[0] | |
39 | 41 | let s2Str = topTxsList[1] | |
40 | 42 | let s3Str = topTxsList[2] | |
41 | 43 | let s4Str = topTxsList[3] | |
42 | 44 | let s5Str = topTxsList[4] | |
43 | 45 | let s6Str = topTxsList[5] | |
44 | 46 | let s7Str = topTxsList[6] | |
45 | 47 | let s8Str = topTxsList[7] | |
46 | 48 | let s9Str = topTxsList[8] | |
47 | 49 | let s10Str = topTxsList[9] | |
48 | 50 | if ((paymentSum >= getAmt(s10Str))) | |
49 | 51 | then if ((paymentSum >= getAmt(s9Str))) | |
50 | 52 | then if ((paymentSum >= getAmt(s8Str))) | |
51 | 53 | then if ((paymentSum >= getAmt(s7Str))) | |
52 | 54 | then if ((paymentSum >= getAmt(s6Str))) | |
53 | 55 | then if ((paymentSum >= getAmt(s5Str))) | |
54 | 56 | then if ((paymentSum >= getAmt(s4Str))) | |
55 | 57 | then if ((paymentSum >= getAmt(s3Str))) | |
56 | 58 | then if ((paymentSum >= getAmt(s2Str))) | |
57 | 59 | then if ((paymentSum >= getAmt(s1Str))) | |
58 | 60 | then ((((((((((((((((((txNum + "_") + s1Str) + "_") + s2Str) + "_") + s3Str) + "_") + s4Str) + "_") + s5Str) + "_") + s6Str) + "_") + s7Str) + "_") + s8Str) + "_") + s9Str) | |
59 | 61 | else ((((((((((((((((((s1Str + "_") + txNum) + "_") + s2Str) + "_") + s3Str) + "_") + s4Str) + "_") + s5Str) + "_") + s6Str) + "_") + s7Str) + "_") + s8Str) + "_") + s9Str) | |
60 | 62 | else ((((((((((((((((((s1Str + "_") + s2Str) + "_") + txNum) + "_") + s3Str) + "_") + s4Str) + "_") + s5Str) + "_") + s6Str) + "_") + s7Str) + "_") + s8Str) + "_") + s9Str) | |
61 | 63 | else ((((((((((((((((((s1Str + "_") + s2Str) + "_") + s3Str) + "_") + txNum) + "_") + s4Str) + "_") + s5Str) + "_") + s6Str) + "_") + s7Str) + "_") + s8Str) + "_") + s9Str) | |
62 | 64 | else ((((((((((((((((((s1Str + "_") + s2Str) + "_") + s3Str) + "_") + s4Str) + "_") + txNum) + "_") + s5Str) + "_") + s6Str) + "_") + s7Str) + "_") + s8Str) + "_") + s9Str) | |
63 | 65 | else ((((((((((((((((((s1Str + "_") + s2Str) + "_") + s3Str) + "_") + s4Str) + "_") + s5Str) + "_") + txNum) + "_") + s6Str) + "_") + s7Str) + "_") + s8Str) + "_") + s9Str) | |
64 | 66 | else ((((((((((((((((((s1Str + "_") + s2Str) + "_") + s3Str) + "_") + s4Str) + "_") + s5Str) + "_") + s6Str) + "_") + txNum) + "_") + s7Str) + "_") + s8Str) + "_") + s9Str) | |
65 | 67 | else ((((((((((((((((((s1Str + "_") + s2Str) + "_") + s3Str) + "_") + s4Str) + "_") + s5Str) + "_") + s6Str) + "_") + s7Str) + "_") + txNum) + "_") + s8Str) + "_") + s9Str) | |
66 | 68 | else ((((((((((((((((((s1Str + "_") + s2Str) + "_") + s3Str) + "_") + s4Str) + "_") + s5Str) + "_") + s6Str) + "_") + s7Str) + "_") + s8Str) + "_") + txNum) + "_") + s9Str) | |
67 | 69 | else ((((((((((((((((((s1Str + "_") + s2Str) + "_") + s3Str) + "_") + s4Str) + "_") + s5Str) + "_") + s6Str) + "_") + s7Str) + "_") + s8Str) + "_") + s9Str) + "_") + txNum) | |
68 | 70 | else topTxs | |
69 | 71 | } | |
70 | 72 | else (txNum + "_0_0_0_0_0_0_0_0_0") | |
71 | 73 | } | |
72 | 74 | ||
73 | 75 | ||
74 | 76 | @Callable(i) | |
75 | 77 | func send (message) = { | |
76 | 78 | let txId = toBase58String(i.transactionId) | |
77 | 79 | let txNum = IncrementTxNum(txId) | |
78 | 80 | let pmt = extract(i.payment) | |
79 | 81 | let paymentAmt = pmt.amount | |
80 | 82 | let paymentSum = ((paymentAmt - COMMISSION) / WAVELET) | |
81 | 83 | if ((MinAmt > paymentSum)) | |
82 | 84 | then throw(((("Donation amount should be at least " + toString(MinAmt)) + " Waves, but we got only ") + toString(paymentSum))) | |
83 | 85 | else { | |
84 | 86 | let betNotInWaves = isDefined(pmt.assetId) | |
85 | 87 | let feeNotInWaves = isDefined(pmt.assetId) | |
86 | 88 | let playerPubKey58 = toBase58String(i.callerPublicKey) | |
87 | 89 | let playerAddress = addressFromPublicKey(fromBase58String(playerPubKey58)) | |
88 | 90 | if (betNotInWaves) | |
89 | 91 | then throw("Bet amount must be in Waves") | |
90 | 92 | else if (feeNotInWaves) | |
91 | 93 | then throw("Transaction's fee must be in Waves") | |
92 | 94 | else { | |
93 | 95 | let playerAddressStr = toString(playerAddress) | |
94 | 96 | let paymentSumStr = toString(paymentSum) | |
95 | 97 | let txNumStr = toString(txNum) | |
96 | 98 | let toTheMoonData = [DataEntry(txNumStr, ((((message + "_") + playerAddressStr) + "_") + paymentSumStr)), DataEntry(TOPTXS, getTopTxs(txNumStr, paymentSum))] | |
97 | 99 | WriteSet(toTheMoonData) | |
98 | 100 | } | |
99 | 101 | } | |
100 | 102 | } | |
101 | 103 | ||
102 | 104 |
github/deemru/w8io/169f3d6 48.98 ms ◑