tx · F3vaB8tUCLLPYUdKX7ScVBfXFVMLb9TJ1VGzGiQXyHZW

3N3P5euNnTjmGsZHxXceWDyFZM7CN9YPjhp:  -0.01400000 Waves

2021.05.13 12:32 [1523721] smart account 3N3P5euNnTjmGsZHxXceWDyFZM7CN9YPjhp > SELF 0.00000000 Waves

{ "type": 13, "id": "F3vaB8tUCLLPYUdKX7ScVBfXFVMLb9TJ1VGzGiQXyHZW", "fee": 1400000, "feeAssetId": null, "timestamp": 1620898358322, "version": 2, "chainId": 84, "sender": "3N3P5euNnTjmGsZHxXceWDyFZM7CN9YPjhp", "senderPublicKey": "ECgJ5aXMvEomM6yWA4tsqXdM3az7ddLr4cLr3yNJwJUb", "proofs": [ "42TpnCxu6UCWPvVco2mEb2WW6PkkV1truzDY6u7VPWED1AJ3FWAx3P1uT3z8rNkF7gKnCzuqwseKsuAjoaicj89Z" ], "script": "base64:AAIEAAAAAAAAADMIAhIDCgEIEgUKAwgBCBIGCgQIAQEIEggKBggBAQEICBIRCg8ICAgIAQgBCAEIAQgBCAEAAAABAQAAAAdjdXJyZW50AAAAAQAAAAFpBAAAAANwbXQJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAADCQEAAAAJaXNEZWZpbmVkAAAAAQgFAAAAA3BtdAAAAAdhc3NldElkCQACWAAAAAEJAQAAAAV2YWx1ZQAAAAEIBQAAAANwbXQAAAAHYXNzZXRJZAIAAAAFV0FWRVMAAAAFAAAAAWkBAAAAFXJhbmtpbmdTcG9uc29yRGVwb3NpdAAAAAEAAAAObW9udGhUaW1lc3RhbXAEAAAAA3BtdAkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAQAAAAJY3VycmVudElkCQEAAAAHY3VycmVudAAAAAEFAAAAAWkEAAAACmN1cnJlbnRLZXkJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAANY3VycmVudEFtb3VudAQAAAAHJG1hdGNoMAkABBoAA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ETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAAD25lYXJwaW4xYWRkcmVzcwUAAAAObmVhcnBpbjFhbW91bnQFAAAADmN1cnJlbnRBc3NldElkCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAAD25lYXJwaW4yYWRkcmVzcwUAAAAObmVhcnBpbjJhbW91bnQFAAAADmN1cnJlbnRBc3NldElkBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tlefKi8Yk=", "height": 1523721, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: D6q5mBJvdjQN97fdRpVX1mKrCfxaGTDD4ti47Nym3HWX Next: FharT9PjBWzg1BiAB8tAwhCaC3m7zxncqZ8imNHFU34v Diff:
OldNewDifferences
2121 0
2222 }
2323 let newAmount = (currentAmount + pmt.amount)
24- let rankingCurrentAmount = match getInteger(this, ((("ranking_sponsor" + currentId) + "_") + monthTimestamp)) {
24+ let rankingCurrentAmount = match getInteger(this, ((("ranking_sponsor_" + currentId) + "_") + monthTimestamp)) {
2525 case a: Int =>
2626 a
2727 case _ =>
2929 }
3030 let rankingNewAmount = (rankingCurrentAmount + pmt.amount)
3131 [IntegerEntry(((((("ranking_sponsor_" + currentKey) + "_") + currentId) + "_") + monthTimestamp), newAmount), IntegerEntry(((("ranking_sponsor_" + currentId) + "_") + monthTimestamp), rankingNewAmount)]
32+ }
33+
34+
35+
36+@Callable(i)
37+func rankingSponsorWithdraw (monthTimestamp,amount,assetId) = {
38+ let currentKey = toBase58String(i.caller.bytes)
39+ let currentAssetId = fromBase58String(assetId)
40+ let currentAmount = match getInteger(this, ((((("ranking_sponsor_" + currentKey) + "_") + assetId) + "_") + monthTimestamp)) {
41+ case a: Int =>
42+ a
43+ case _ =>
44+ 0
45+ }
46+ let newAmount = (currentAmount - amount)
47+ let currentRankingAmount = match getInteger(this, ((("ranking_sponsor_" + assetId) + "_") + monthTimestamp)) {
48+ case a: Int =>
49+ a
50+ case _ =>
51+ 0
52+ }
53+ let rankingNewAmount = (currentRankingAmount - amount)
54+ if ((0 > amount))
55+ then throw("Can't withdraw negative amount")
56+ else if ((0 > newAmount))
57+ then throw("Not enough sponsord balance")
58+ else if ((0 > rankingNewAmount))
59+ then throw("Not enough total bounty balance")
60+ else [IntegerEntry(((((("ranking_sponsor_" + currentKey) + "_") + assetId) + "_") + monthTimestamp), newAmount), IntegerEntry(((("ranking_sponsor_" + assetId) + "_") + monthTimestamp), rankingNewAmount), ScriptTransfer(i.caller, amount, currentAssetId)]
3261 }
3362
3463
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func current (i) = {
55 let pmt = i.payments[0]
66 if (isDefined(pmt.assetId))
77 then toBase58String(value(pmt.assetId))
88 else "WAVES"
99 }
1010
1111
1212 @Callable(i)
1313 func rankingSponsorDeposit (monthTimestamp) = {
1414 let pmt = i.payments[0]
1515 let currentId = current(i)
1616 let currentKey = toBase58String(i.caller.bytes)
1717 let currentAmount = match getInteger(this, ((((("ranking_sponsor_" + currentKey) + "_") + currentId) + "_") + monthTimestamp)) {
1818 case a: Int =>
1919 a
2020 case _ =>
2121 0
2222 }
2323 let newAmount = (currentAmount + pmt.amount)
24- let rankingCurrentAmount = match getInteger(this, ((("ranking_sponsor" + currentId) + "_") + monthTimestamp)) {
24+ let rankingCurrentAmount = match getInteger(this, ((("ranking_sponsor_" + currentId) + "_") + monthTimestamp)) {
2525 case a: Int =>
2626 a
2727 case _ =>
2828 0
2929 }
3030 let rankingNewAmount = (rankingCurrentAmount + pmt.amount)
3131 [IntegerEntry(((((("ranking_sponsor_" + currentKey) + "_") + currentId) + "_") + monthTimestamp), newAmount), IntegerEntry(((("ranking_sponsor_" + currentId) + "_") + monthTimestamp), rankingNewAmount)]
32+ }
33+
34+
35+
36+@Callable(i)
37+func rankingSponsorWithdraw (monthTimestamp,amount,assetId) = {
38+ let currentKey = toBase58String(i.caller.bytes)
39+ let currentAssetId = fromBase58String(assetId)
40+ let currentAmount = match getInteger(this, ((((("ranking_sponsor_" + currentKey) + "_") + assetId) + "_") + monthTimestamp)) {
41+ case a: Int =>
42+ a
43+ case _ =>
44+ 0
45+ }
46+ let newAmount = (currentAmount - amount)
47+ let currentRankingAmount = match getInteger(this, ((("ranking_sponsor_" + assetId) + "_") + monthTimestamp)) {
48+ case a: Int =>
49+ a
50+ case _ =>
51+ 0
52+ }
53+ let rankingNewAmount = (currentRankingAmount - amount)
54+ if ((0 > amount))
55+ then throw("Can't withdraw negative amount")
56+ else if ((0 > newAmount))
57+ then throw("Not enough sponsord balance")
58+ else if ((0 > rankingNewAmount))
59+ then throw("Not enough total bounty balance")
60+ else [IntegerEntry(((((("ranking_sponsor_" + currentKey) + "_") + assetId) + "_") + monthTimestamp), newAmount), IntegerEntry(((("ranking_sponsor_" + assetId) + "_") + monthTimestamp), rankingNewAmount), ScriptTransfer(i.caller, amount, currentAssetId)]
3261 }
3362
3463
3564
3665 @Callable(i)
3766 func sponsorDeposit (compeNumber,compeEndTimestamp,timestamp,compeAddress) = {
3867 let pmt = i.payments[0]
3968 let currentId = current(i)
4069 if ((timestamp > compeEndTimestamp))
4170 then throw("Competition is finished")
4271 else {
4372 let currentKey = toBase58String(i.caller.bytes)
4473 let currentAmount = match getInteger(this, ((((("sponsor_" + currentKey) + "_") + currentId) + "_") + compeNumber)) {
4574 case a: Int =>
4675 a
4776 case _ =>
4877 0
4978 }
5079 let newAmount = (currentAmount + pmt.amount)
5180 let compeCurrentAmount = match getInteger(this, ((((compeNumber + "_") + compeAddress) + "_") + currentId)) {
5281 case a: Int =>
5382 a
5483 case _ =>
5584 0
5685 }
5786 let compeNewAmount = (compeCurrentAmount + pmt.amount)
5887 [IntegerEntry(((((("sponsor_" + currentKey) + "_") + currentId) + "_") + compeNumber), newAmount), IntegerEntry(((((compeNumber + "_") + compeAddress) + "_") + currentId), compeNewAmount)]
5988 }
6089 }
6190
6291
6392
6493 @Callable(i)
6594 func sponsorWithdraw (compeNumber,compeEndTimestamp,timestamp,amount,assetId,compeAddress) = {
6695 let currentKey = toBase58String(i.caller.bytes)
6796 let currentAssetId = fromBase58String(assetId)
6897 let currentAmount = match getInteger(this, ((((("sponsor_" + currentKey) + "_") + assetId) + "_") + compeNumber)) {
6998 case a: Int =>
7099 a
71100 case _ =>
72101 0
73102 }
74103 let newAmount = (currentAmount - amount)
75104 let compeCurrentAmount = match getInteger(this, ((((compeNumber + "_") + compeAddress) + "_") + assetId)) {
76105 case a: Int =>
77106 a
78107 case _ =>
79108 0
80109 }
81110 let compeNewAmount = (compeCurrentAmount - amount)
82111 if ((timestamp > compeEndTimestamp))
83112 then throw("Competition is finished")
84113 else if ((0 > amount))
85114 then throw("Can't withdraw negative amount")
86115 else if ((0 > newAmount))
87116 then throw("Not enough balance")
88117 else if ((0 > compeNewAmount))
89118 then throw("Can't withdraw negative bounty amount")
90119 else [IntegerEntry(((((("sponsor_" + currentKey) + "_") + assetId) + "_") + compeNumber), newAmount), IntegerEntry(((((compeNumber + "_") + compeAddress) + "_") + assetId), compeNewAmount), ScriptTransfer(i.caller, amount, currentAssetId)]
91120 }
92121
93122
94123
95124 @Callable(i)
96125 func sponsorDistribution (compeNumber,assetId,compeAddress,net1,net1percent,net2,net2percent,net3,net3percent,booby,boobypercent,nearpin1,nearpin1percent,nearpin2,nearpin2percent) = {
97126 let currentAssetId = fromBase58String(assetId)
98127 let compeCurrentAmount = match getInteger(this, ((((compeNumber + "_") + compeAddress) + "_") + assetId)) {
99128 case a: Int =>
100129 a
101130 case _ =>
102131 0
103132 }
104133 let net1address = addressFromStringValue(net1)
105134 let net1amount = (compeCurrentAmount * (net1percent / 100))
106135 let net2address = addressFromStringValue(net2)
107136 let net2amount = (compeCurrentAmount * (net2percent / 100))
108137 let net3address = addressFromStringValue(net3)
109138 let net3amount = (compeCurrentAmount * (net3percent / 100))
110139 let boobyaddress = addressFromStringValue(booby)
111140 let boobyamount = (compeCurrentAmount * (boobypercent / 100))
112141 let nearpin1address = addressFromStringValue(nearpin1)
113142 let nearpin1amount = (compeCurrentAmount * (nearpin1percent / 100))
114143 let nearpin2address = addressFromStringValue(nearpin2)
115144 let nearpin2amount = (compeCurrentAmount * (nearpin2percent / 100))
116145 if ((compeCurrentAmount == 0))
117146 then throw("Can't distribution negative amount")
118147 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)]
119148 }
120149
121150
122151 @Verifier(tx)
123152 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
124153

github/deemru/w8io/169f3d6 
51.62 ms