tx · Btk1QEP8C7KmmTXS2t4yBNJb1AYpZzZ8SSbyWEThXMwW

3MwrjAeFnRhWKm1W6eqv8X4TEwU1Ciypfe9:  -0.01000000 Waves

2021.09.23 16:46 [1715785] smart account 3MwrjAeFnRhWKm1W6eqv8X4TEwU1Ciypfe9 > SELF 0.00000000 Waves

{ "type": 13, "id": "Btk1QEP8C7KmmTXS2t4yBNJb1AYpZzZ8SSbyWEThXMwW", "fee": 1000000, "feeAssetId": null, "timestamp": 1632404800705, "version": 1, "sender": "3MwrjAeFnRhWKm1W6eqv8X4TEwU1Ciypfe9", "senderPublicKey": "4QSepUmSoEzqB7kAD3jgBdtUEtdjzrM1Vym3ctDr1bfG", "proofs": [ "3WUbwzWifQCdPd5mgttzbyokuwvx6shtYG2Rscw3VPAmjHqdZvRwXceXZ9dV2kbECBSwWeSXKLTde4DLddkGESje" ], "script": "base64:AAIEAAAAAAAAARgIAhIDCgEIEgAaDAoCYTESBk5TQlRpZBoPCgJhMhIJaGVpZ2h0RW5kGhQKAmEzEg5rZXlVc2VyQmFsYW5jZRoOCgJhNBIIdXNlckFkZHIaEAoCYTUSCmNvbnRleHRPYmoaCgoCYTYSBHZvdGUaDgoCYTcSCHZvaXRlS2V5GhQKAmE4Eg51c2VyQmFsYW5jZUtleRoNCgJhORIHcGF5bWVudBoVCgJiMRIPYXNzZXRJZFJlY2VpdmVkGhgKAmIyEhJ0b2tlblJlY2VpdmVBbW91bnQaFAoCYjMSDnZvdGVOdW1iZXJUaGlzGhkKAmI0EhNjb250cmFjdFVzZXJCYWxhbmNlGhMKAmI1Eg1jYWxsZXJCYWxhbmNlAAAAAwAAAAACYTEJAAJZAAAAAQkBAAAAE3ZhbHVlT3JFcnJvck1lc3NhZ2UAAAACCQAEHQAAAAIFAAAABHRoaXMCAAAABk5TQlRpZAIAAAAgTlNCVGlkIGlzIG5vdCBzcGVjaWZpZWQgaW4gc3RhdGUAAAAAAmEyCQEAAAATdmFsdWVPckVycm9yTWVzc2FnZQAA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QAAAAZjYWxsZXIDCQAAZgAAAAIFAAAAAmEyBQAAAAZoZWlnaHQJAAACAAAAAQIAAAAPdm90ZSBpbiBwcm9jZXNzBAAAAAJiNQkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABBoAAAACBQAAAAR0aGlzBQAAAAJhOAAAAAAAAAAAAAMJAABnAAAAAgAAAAAAAAAAAAUAAAACYjUJAAACAAAAAQIAAAAQYmFsYW5jZSBpcyBlbXB0eQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAACYTUAAAAGY2FsbGVyBQAAAAJiNQUAAAACYTEJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIFAAAAAmE4AAAAAAAAAAAABQAAAANuaWwAAAAAyr1x/w==", "chainId": 84, "height": 1715785, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 4 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let a = fromBase58String(valueOrErrorMessage(getString(this, "NSBTid"), "NSBTid is not specified in state"))
5+
6+let b = valueOrErrorMessage(getInteger(this, "height_end"), "height_end is not specified in state")
7+
8+func c (d) = makeString(["balance", toString(d)], "_")
9+
10+
11+@Callable(e)
12+func castVote (f) = {
13+ let g = makeString(["vote", f], "_")
14+ let h = c(e.caller)
15+ let i = value(e.payments[0])
16+ let j = i.assetId
17+ let k = i.amount
18+ let l = valueOrElse(getInteger(this, g), 0)
19+ let m = valueOrElse(getInteger(this, h), 0)
20+ if ((j != a))
21+ then throw("incorrect assets")
22+ else if ((height >= b))
23+ then throw("vote finished")
24+ else [IntegerEntry(g, (l + k)), IntegerEntry(h, (m + k))]
25+ }
26+
27+
28+
29+@Callable(e)
30+func withdraw () = {
31+ let h = c(e.caller)
32+ if ((b > height))
33+ then throw("vote in process")
34+ else {
35+ let n = valueOrElse(getInteger(this, h), 0)
36+ if ((0 >= n))
37+ then throw("balance is empty")
38+ else [ScriptTransfer(e.caller, n, a), IntegerEntry(h, 0)]
39+ }
40+ }
41+
42+

github/deemru/w8io/026f985 
25.28 ms