tx · FharT9PjBWzg1BiAB8tAwhCaC3m7zxncqZ8imNHFU34v 3N3P5euNnTjmGsZHxXceWDyFZM7CN9YPjhp: -0.01400000 Waves 2021.05.13 12:47 [1523735] smart account 3N3P5euNnTjmGsZHxXceWDyFZM7CN9YPjhp > SELF 0.00000000 Waves
{ "type": 13, "id": "FharT9PjBWzg1BiAB8tAwhCaC3m7zxncqZ8imNHFU34v", "fee": 1400000, "feeAssetId": null, "timestamp": 1620899317971, "version": 2, "chainId": 84, "sender": "3N3P5euNnTjmGsZHxXceWDyFZM7CN9YPjhp", "senderPublicKey": "ECgJ5aXMvEomM6yWA4tsqXdM3az7ddLr4cLr3yNJwJUb", "proofs": [ "BYbjvtnkJTx59p51R5jJXg6rg7nmzuXtY2dmk4amo1k1ccikpFSxXHeBM9pCePTFSYby4dA9AxeDwNuzW6H444V" ], "script": "base64:AAIEAAAAAAAAADMIAhIDCgEIEgUKAwgBCBIGCgQIAQEIEggKBggBAQEICBIRCg8ICAgIAQgBCAEIAQgBCAEAAAABAQAAAAdjdXJyZW50AAAAAQAAAAFpBAAAAANwbXQJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAADCQEAAAAJaXNEZWZpbmVkAAAAAQgFAAAAA3BtdAAAAAdhc3NldElkCQACWAAAAAEJAQAAAAV2YWx1ZQAAAAEIBQAAAANwbXQAAAAHYXNzZXRJZAIAAAAFV0FWRVMAAAAFAAAAAWkBAAAAFXJhbmtpbmdTcG9uc29yRGVwb3NpdAAAAAEAAAAObW9udGhUaW1lc3RhbXAEAAAAA3BtdAkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAQAAAAJY3VycmVudElkCQEAAAAHY3VycmVudAAAAAEFAAAAAWkEAAAACmN1cnJlbnRLZXkJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAANY3VycmVudEFtb3VudAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlz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HRUcmFuc2ZlcgAAAAMFAAAAD25lYXJwaW4xYWRkcmVzcwUAAAAObmVhcnBpbjFhbW91bnQFAAAADmN1cnJlbnRBc3NldElkCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAAD25lYXJwaW4yYWRkcmVzcwUAAAAObmVhcnBpbjJhbW91bnQFAAAADmN1cnJlbnRBc3NldElkBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQJayjY=", "height": 1523735, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: F3vaB8tUCLLPYUdKX7ScVBfXFVMLb9TJ1VGzGiQXyHZW Next: BATTZ59GaiXtJc1DcH9SQ7z7wcMQ2jw8Kgro5XJVSAcW Diff:
Old | New | Differences | |
---|---|---|---|
14 | 14 | let pmt = i.payments[0] | |
15 | 15 | let currentId = current(i) | |
16 | 16 | let currentKey = toBase58String(i.caller.bytes) | |
17 | - | let currentAmount = match getInteger(this, ((((("ranking | |
17 | + | let currentAmount = match getInteger(this, ((((("ranking-sponsor_" + currentKey) + "_") + currentId) + "_") + monthTimestamp)) { | |
18 | 18 | case a: Int => | |
19 | 19 | a | |
20 | 20 | case _ => | |
21 | 21 | 0 | |
22 | 22 | } | |
23 | 23 | let newAmount = (currentAmount + pmt.amount) | |
24 | - | let rankingCurrentAmount = match getInteger(this, ((("ranking | |
24 | + | let rankingCurrentAmount = match getInteger(this, ((("ranking-sponsor_" + currentId) + "_") + monthTimestamp)) { | |
25 | 25 | case a: Int => | |
26 | 26 | a | |
27 | 27 | case _ => | |
28 | 28 | 0 | |
29 | 29 | } | |
30 | 30 | let rankingNewAmount = (rankingCurrentAmount + pmt.amount) | |
31 | - | [IntegerEntry(((((("ranking | |
31 | + | [IntegerEntry(((((("ranking-sponsor_" + currentKey) + "_") + currentId) + "_") + monthTimestamp), newAmount), IntegerEntry(((("ranking-sponsor_" + currentId) + "_") + monthTimestamp), rankingNewAmount)] | |
32 | 32 | } | |
33 | 33 | ||
34 | 34 | ||
37 | 37 | func rankingSponsorWithdraw (monthTimestamp,amount,assetId) = { | |
38 | 38 | let currentKey = toBase58String(i.caller.bytes) | |
39 | 39 | let currentAssetId = fromBase58String(assetId) | |
40 | - | let currentAmount = match getInteger(this, ((((("ranking | |
40 | + | let currentAmount = match getInteger(this, ((((("ranking-sponsor_" + currentKey) + "_") + assetId) + "_") + monthTimestamp)) { | |
41 | 41 | case a: Int => | |
42 | 42 | a | |
43 | 43 | case _ => | |
44 | 44 | 0 | |
45 | 45 | } | |
46 | 46 | let newAmount = (currentAmount - amount) | |
47 | - | let currentRankingAmount = match getInteger(this, ((("ranking | |
47 | + | let currentRankingAmount = match getInteger(this, ((("ranking-sponsor_" + assetId) + "_") + monthTimestamp)) { | |
48 | 48 | case a: Int => | |
49 | 49 | a | |
50 | 50 | case _ => | |
57 | 57 | then throw("Not enough sponsord balance") | |
58 | 58 | else if ((0 > rankingNewAmount)) | |
59 | 59 | then throw("Not enough total bounty balance") | |
60 | - | else [IntegerEntry(((((("ranking | |
60 | + | else [IntegerEntry(((((("ranking-sponsor_" + currentKey) + "_") + assetId) + "_") + monthTimestamp), newAmount), IntegerEntry(((("ranking-sponsor_" + assetId) + "_") + monthTimestamp), rankingNewAmount), ScriptTransfer(i.caller, amount, currentAssetId)] | |
61 | 61 | } | |
62 | 62 | ||
63 | 63 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func current (i) = { | |
5 | 5 | let pmt = i.payments[0] | |
6 | 6 | if (isDefined(pmt.assetId)) | |
7 | 7 | then toBase58String(value(pmt.assetId)) | |
8 | 8 | else "WAVES" | |
9 | 9 | } | |
10 | 10 | ||
11 | 11 | ||
12 | 12 | @Callable(i) | |
13 | 13 | func rankingSponsorDeposit (monthTimestamp) = { | |
14 | 14 | let pmt = i.payments[0] | |
15 | 15 | let currentId = current(i) | |
16 | 16 | let currentKey = toBase58String(i.caller.bytes) | |
17 | - | let currentAmount = match getInteger(this, ((((("ranking | |
17 | + | let currentAmount = match getInteger(this, ((((("ranking-sponsor_" + currentKey) + "_") + currentId) + "_") + monthTimestamp)) { | |
18 | 18 | case a: Int => | |
19 | 19 | a | |
20 | 20 | case _ => | |
21 | 21 | 0 | |
22 | 22 | } | |
23 | 23 | let newAmount = (currentAmount + pmt.amount) | |
24 | - | let rankingCurrentAmount = match getInteger(this, ((("ranking | |
24 | + | let rankingCurrentAmount = match getInteger(this, ((("ranking-sponsor_" + currentId) + "_") + monthTimestamp)) { | |
25 | 25 | case a: Int => | |
26 | 26 | a | |
27 | 27 | case _ => | |
28 | 28 | 0 | |
29 | 29 | } | |
30 | 30 | let rankingNewAmount = (rankingCurrentAmount + pmt.amount) | |
31 | - | [IntegerEntry(((((("ranking | |
31 | + | [IntegerEntry(((((("ranking-sponsor_" + currentKey) + "_") + currentId) + "_") + monthTimestamp), newAmount), IntegerEntry(((("ranking-sponsor_" + currentId) + "_") + monthTimestamp), rankingNewAmount)] | |
32 | 32 | } | |
33 | 33 | ||
34 | 34 | ||
35 | 35 | ||
36 | 36 | @Callable(i) | |
37 | 37 | func rankingSponsorWithdraw (monthTimestamp,amount,assetId) = { | |
38 | 38 | let currentKey = toBase58String(i.caller.bytes) | |
39 | 39 | let currentAssetId = fromBase58String(assetId) | |
40 | - | let currentAmount = match getInteger(this, ((((("ranking | |
40 | + | let currentAmount = match getInteger(this, ((((("ranking-sponsor_" + currentKey) + "_") + assetId) + "_") + monthTimestamp)) { | |
41 | 41 | case a: Int => | |
42 | 42 | a | |
43 | 43 | case _ => | |
44 | 44 | 0 | |
45 | 45 | } | |
46 | 46 | let newAmount = (currentAmount - amount) | |
47 | - | let currentRankingAmount = match getInteger(this, ((("ranking | |
47 | + | let currentRankingAmount = match getInteger(this, ((("ranking-sponsor_" + assetId) + "_") + monthTimestamp)) { | |
48 | 48 | case a: Int => | |
49 | 49 | a | |
50 | 50 | case _ => | |
51 | 51 | 0 | |
52 | 52 | } | |
53 | 53 | let rankingNewAmount = (currentRankingAmount - amount) | |
54 | 54 | if ((0 > amount)) | |
55 | 55 | then throw("Can't withdraw negative amount") | |
56 | 56 | else if ((0 > newAmount)) | |
57 | 57 | then throw("Not enough sponsord balance") | |
58 | 58 | else if ((0 > rankingNewAmount)) | |
59 | 59 | then throw("Not enough total bounty balance") | |
60 | - | else [IntegerEntry(((((("ranking | |
60 | + | else [IntegerEntry(((((("ranking-sponsor_" + currentKey) + "_") + assetId) + "_") + monthTimestamp), newAmount), IntegerEntry(((("ranking-sponsor_" + assetId) + "_") + monthTimestamp), rankingNewAmount), ScriptTransfer(i.caller, amount, currentAssetId)] | |
61 | 61 | } | |
62 | 62 | ||
63 | 63 | ||
64 | 64 | ||
65 | 65 | @Callable(i) | |
66 | 66 | func sponsorDeposit (compeNumber,compeEndTimestamp,timestamp,compeAddress) = { | |
67 | 67 | let pmt = i.payments[0] | |
68 | 68 | let currentId = current(i) | |
69 | 69 | if ((timestamp > compeEndTimestamp)) | |
70 | 70 | then throw("Competition is finished") | |
71 | 71 | else { | |
72 | 72 | let currentKey = toBase58String(i.caller.bytes) | |
73 | 73 | let currentAmount = match getInteger(this, ((((("sponsor_" + currentKey) + "_") + currentId) + "_") + compeNumber)) { | |
74 | 74 | case a: Int => | |
75 | 75 | a | |
76 | 76 | case _ => | |
77 | 77 | 0 | |
78 | 78 | } | |
79 | 79 | let newAmount = (currentAmount + pmt.amount) | |
80 | 80 | let compeCurrentAmount = match getInteger(this, ((((compeNumber + "_") + compeAddress) + "_") + currentId)) { | |
81 | 81 | case a: Int => | |
82 | 82 | a | |
83 | 83 | case _ => | |
84 | 84 | 0 | |
85 | 85 | } | |
86 | 86 | let compeNewAmount = (compeCurrentAmount + pmt.amount) | |
87 | 87 | [IntegerEntry(((((("sponsor_" + currentKey) + "_") + currentId) + "_") + compeNumber), newAmount), IntegerEntry(((((compeNumber + "_") + compeAddress) + "_") + currentId), compeNewAmount)] | |
88 | 88 | } | |
89 | 89 | } | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | ||
93 | 93 | @Callable(i) | |
94 | 94 | func sponsorWithdraw (compeNumber,compeEndTimestamp,timestamp,amount,assetId,compeAddress) = { | |
95 | 95 | let currentKey = toBase58String(i.caller.bytes) | |
96 | 96 | let currentAssetId = fromBase58String(assetId) | |
97 | 97 | let currentAmount = match getInteger(this, ((((("sponsor_" + currentKey) + "_") + assetId) + "_") + compeNumber)) { | |
98 | 98 | case a: Int => | |
99 | 99 | a | |
100 | 100 | case _ => | |
101 | 101 | 0 | |
102 | 102 | } | |
103 | 103 | let newAmount = (currentAmount - amount) | |
104 | 104 | let compeCurrentAmount = match getInteger(this, ((((compeNumber + "_") + compeAddress) + "_") + assetId)) { | |
105 | 105 | case a: Int => | |
106 | 106 | a | |
107 | 107 | case _ => | |
108 | 108 | 0 | |
109 | 109 | } | |
110 | 110 | let compeNewAmount = (compeCurrentAmount - amount) | |
111 | 111 | if ((timestamp > compeEndTimestamp)) | |
112 | 112 | then throw("Competition is finished") | |
113 | 113 | else if ((0 > amount)) | |
114 | 114 | then throw("Can't withdraw negative amount") | |
115 | 115 | else if ((0 > newAmount)) | |
116 | 116 | then throw("Not enough balance") | |
117 | 117 | else if ((0 > compeNewAmount)) | |
118 | 118 | then throw("Can't withdraw negative bounty amount") | |
119 | 119 | else [IntegerEntry(((((("sponsor_" + currentKey) + "_") + assetId) + "_") + compeNumber), newAmount), IntegerEntry(((((compeNumber + "_") + compeAddress) + "_") + assetId), compeNewAmount), ScriptTransfer(i.caller, amount, currentAssetId)] | |
120 | 120 | } | |
121 | 121 | ||
122 | 122 | ||
123 | 123 | ||
124 | 124 | @Callable(i) | |
125 | 125 | func sponsorDistribution (compeNumber,assetId,compeAddress,net1,net1percent,net2,net2percent,net3,net3percent,booby,boobypercent,nearpin1,nearpin1percent,nearpin2,nearpin2percent) = { | |
126 | 126 | let currentAssetId = fromBase58String(assetId) | |
127 | 127 | let compeCurrentAmount = match getInteger(this, ((((compeNumber + "_") + compeAddress) + "_") + assetId)) { | |
128 | 128 | case a: Int => | |
129 | 129 | a | |
130 | 130 | case _ => | |
131 | 131 | 0 | |
132 | 132 | } | |
133 | 133 | let net1address = addressFromStringValue(net1) | |
134 | 134 | let net1amount = (compeCurrentAmount * (net1percent / 100)) | |
135 | 135 | let net2address = addressFromStringValue(net2) | |
136 | 136 | let net2amount = (compeCurrentAmount * (net2percent / 100)) | |
137 | 137 | let net3address = addressFromStringValue(net3) | |
138 | 138 | let net3amount = (compeCurrentAmount * (net3percent / 100)) | |
139 | 139 | let boobyaddress = addressFromStringValue(booby) | |
140 | 140 | let boobyamount = (compeCurrentAmount * (boobypercent / 100)) | |
141 | 141 | let nearpin1address = addressFromStringValue(nearpin1) | |
142 | 142 | let nearpin1amount = (compeCurrentAmount * (nearpin1percent / 100)) | |
143 | 143 | let nearpin2address = addressFromStringValue(nearpin2) | |
144 | 144 | let nearpin2amount = (compeCurrentAmount * (nearpin2percent / 100)) | |
145 | 145 | if ((compeCurrentAmount == 0)) | |
146 | 146 | then throw("Can't distribution negative amount") | |
147 | 147 | else [IntegerEntry(((((compeNumber + "_") + compeAddress) + "_") + assetId), 0), ScriptTransfer(net1address, net1amount, currentAssetId), ScriptTransfer(net2address, net2amount, currentAssetId), ScriptTransfer(net3address, net3amount, currentAssetId), ScriptTransfer(boobyaddress, boobyamount, currentAssetId), ScriptTransfer(nearpin1address, nearpin1amount, currentAssetId), ScriptTransfer(nearpin2address, nearpin2amount, currentAssetId)] | |
148 | 148 | } | |
149 | 149 | ||
150 | 150 | ||
151 | 151 | @Verifier(tx) | |
152 | 152 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
153 | 153 |
github/deemru/w8io/169f3d6 41.24 ms ◑