tx · 2eCkQw2TszTB2JHCvoNW4Ewc4q5kbeZw6kykvMKMSwWE

3N9D8brsPwA8d2SWKxCKoG15TfAqjtp749H:  -0.01400000 Waves

2020.09.16 17:11 [1179933] smart account 3N9D8brsPwA8d2SWKxCKoG15TfAqjtp749H > SELF 0.00000000 Waves

{ "type": 13, "id": "2eCkQw2TszTB2JHCvoNW4Ewc4q5kbeZw6kykvMKMSwWE", "fee": 1400000, "feeAssetId": null, "timestamp": 1600265506544, "version": 2, "chainId": 84, "sender": "3N9D8brsPwA8d2SWKxCKoG15TfAqjtp749H", "senderPublicKey": "FpA31WAx86gMxdfoFSRBf8HbjDPaHre9SnjfE1rcjTSA", "proofs": [ "4nVfAgEMMdajbLAETGnALsAzcDo3p2jCPoNrRp9HKEBSGBbAbqPexJ3qZCqs5HniXgZ8us2uspL6Lt9j9G18VoGY" ], "script": "base64:AAIEAAAAAAAAAAkIAhIDCgEIEgAAAAADAAAAAAZOU0JUaWQJAAJZAAAAAQkBAAAAE3ZhbHVlT3JFcnJvck1lc3NhZ2UAAAACCQAEHQAAAAIFAAAABHRoaXMCAAAABk5TQlRpZAIAAAAgTlNCVGlkIGlzIG5vdCBzcGVjaWZpZWQgaW4gc3RhdGUAAAAACWhlaWdodEVuZAkBAAAAE3ZhbHVlT3JFcnJvck1lc3NhZ2UAAAACCQAEGgAAAAIFAAAABHRoaXMCAAAACmhlaWdodF9lbmQCAAAAJGhlaWdodF9lbmQgaXMgbm90IHNwZWNpZmllZCBpbiBzdGF0ZQEAAAAOa2V5VXNlckJhbGFuY2UAAAABAAAACHVzZXJBZGRyCQAEuQAAAAIJAARMAAAAAgIAAAAHYmFsYW5jZQkABEwAAAACCQAEJQAAAAEFAAAACHVzZXJBZGRyBQAAAANuaWwCAAAAAV8AAAACAAAACmNvbnRleHRPYmoBAAAACGNhc3RWb3RlAAAAAQAAAAR2b3RlBAAAAAh2b2l0ZUtleQkABLkAAAACCQAETAAAAAICAAAABHZvdGUJAARMAAAAAgUAAA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AAAA5rZXlVc2VyQmFsYW5jZQAAAAEIBQAAAApjb250ZXh0T2JqAAAABmNhbGxlcgMJAABmAAAAAgUAAAAJaGVpZ2h0RW5kBQAAAAZoZWlnaHQJAAACAAAAAQIAAAAPdm90ZSBpbiBwcm9jZXNzBAAAAA1jYWxsZXJCYWxhbmNlCQEAAAALdmFsdWVPckVsc2UAAAACCQAEGgAAAAIFAAAABHRoaXMFAAAADnVzZXJCYWxhbmNlS2V5AAAAAAAAAAAAAwkAAGcAAAACAAAAAAAAAAAABQAAAA1jYWxsZXJCYWxhbmNlCQAAAgAAAAECAAAAEGJhbGFuY2UgaXMgZW1wdHkJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAACmNvbnRleHRPYmoAAAAGY2FsbGVyBQAAAA1jYWxsZXJCYWxhbmNlBQAAAAZOU0JUaWQJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIFAAAADnVzZXJCYWxhbmNlS2V5AAAAAAAAAAAABQAAAANuaWwAAAAAe0uENA==", "height": 1179933, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 28foWu6uX7FoP1gvq6VwYKAJ78d4YrAk86Hxg5aHDbqU Next: none Diff:
OldNewDifferences
1010
1111 @Callable(contextObj)
1212 func castVote (vote) = {
13- let voiteKey = makeString(["voite", vote], "_")
13+ let voiteKey = makeString(["vote", vote], "_")
1414 let userBalanceKey = keyUserBalance(contextObj.caller)
1515 let payment = value(contextObj.payments[0])
1616 let assetIdReceived = payment.assetId
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let NSBTid = fromBase58String(valueOrErrorMessage(getString(this, "NSBTid"), "NSBTid is not specified in state"))
55
66 let heightEnd = valueOrErrorMessage(getInteger(this, "height_end"), "height_end is not specified in state")
77
88 func keyUserBalance (userAddr) = makeString(["balance", toString(userAddr)], "_")
99
1010
1111 @Callable(contextObj)
1212 func castVote (vote) = {
13- let voiteKey = makeString(["voite", vote], "_")
13+ let voiteKey = makeString(["vote", vote], "_")
1414 let userBalanceKey = keyUserBalance(contextObj.caller)
1515 let payment = value(contextObj.payments[0])
1616 let assetIdReceived = payment.assetId
1717 let tokenReceiveAmount = payment.amount
1818 let voteNumberThis = valueOrElse(getInteger(this, voiteKey), 0)
1919 let contractUserBalance = valueOrElse(getInteger(this, userBalanceKey), 0)
2020 if ((assetIdReceived != NSBTid))
2121 then throw("incorrect assets")
2222 else if ((height >= heightEnd))
2323 then throw("vote finished")
2424 else [IntegerEntry(voiteKey, (voteNumberThis + tokenReceiveAmount)), IntegerEntry(userBalanceKey, (contractUserBalance + tokenReceiveAmount))]
2525 }
2626
2727
2828
2929 @Callable(contextObj)
3030 func withdraw () = {
3131 let userBalanceKey = keyUserBalance(contextObj.caller)
3232 if ((heightEnd > height))
3333 then throw("vote in process")
3434 else {
3535 let callerBalance = valueOrElse(getInteger(this, userBalanceKey), 0)
3636 if ((0 >= callerBalance))
3737 then throw("balance is empty")
3838 else [ScriptTransfer(contextObj.caller, callerBalance, NSBTid), IntegerEntry(userBalanceKey, 0)]
3939 }
4040 }
4141
4242

github/deemru/w8io/026f985 
21.74 ms