tx · 8mfVNSEVMBLs1S4mSRg2PS5iug3iTg2sq5m8dQ8s15Co

3MyBgxRjsj4dFVLNqZVMpJuqFcchA1rfdPd:  -0.05000000 Waves

2019.10.17 01:42 [723171] smart account 3MyBgxRjsj4dFVLNqZVMpJuqFcchA1rfdPd > SELF 0.00000000 Waves

{ "type": 13, "id": "8mfVNSEVMBLs1S4mSRg2PS5iug3iTg2sq5m8dQ8s15Co", "fee": 5000000, "feeAssetId": null, "timestamp": 1571265818229, "version": 1, "sender": "3MyBgxRjsj4dFVLNqZVMpJuqFcchA1rfdPd", "senderPublicKey": "FNveiFvnZxbJ2nmWHcE42V2V1LQV3qAtmdpvbFnTimVG", "proofs": [ "2HvLVJLs2w53VAs7tGxtU8FNQcLMxTPtNoY8zRGq7bmx7nvGTBFHAyz6KZvmfmv5ttJHZuyRVgap26Yjceffk3U5" ], "script": "base64:AAIDAAAAAAAAAAwIARIDCgEIEgMKAQEAAAATAAAAAAl3YXZlc0xldHMAAAAAAAX14QAAAAAADlRvdGFsQW1vdW50S2V5AgAAAAtUb3RhbEFtb3VudAAAAAASVG90YWxBbW91bnRMZWZ0S2V5AgAAAA9Ub3RhbEFtb3VudExlZnQAAAAAEVVuaXF1ZVNwb25zb3JzS2V5AgAAAA5VbmlxdWVTcG9uc29ycwAAAAAJRmVlUHVia2V5AQAAACAok4ZZcGaRC+s2MKC22dBEPDzVWEOIB9nM7V46PClPeQAAAAAJRmVlV2FsbGV0CQEAAAAUYWRkcmVzc0Zyb21QdWJsaWNLZXkAAAABBQAAAAlGZWVQdWJrZXkAAAAADnJlY2VpdmVyUHViS2V5AQAAACAlbSP+mgMlNuu7HG4M1vuMOYBvzRL+YwXaxGu6HTwDKwAAAAAIcmVjZWl2ZXIJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEFAAAADnJlY2VpdmVyUHViS2V5AAAAAAdBc3NldGlkAQAAACAtXwbA0Q7uhfCrAR9ZeFYHgPlLE5YOZ+sod5jyZQISnwAA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AIJAQAAAAlEYXRhRW50cnkAAAACBQAAAA5MYXN0UGF5bWVudEtleQUAAAAGaGVpZ2h0BQAAAANuaWwJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwUAAAAIcmVjZWl2ZXIFAAAADldpdGhkcmF3QW1vdW50BQAAAAdBc3NldGlkCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAACUZlZVdhbGxldAUAAAAJRmVlQW1vdW50BQAAAAdBc3NldGlkBQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAAAAAXMFAAAAByRtYXRjaDAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5B8Q2bA0=", "chainId": 84, "height": 723171, "spentComplexity": 0 } View: original | compacted Prev: HBBhSEcWc8fwgc28PHv3wpsKgrjEnFCU5CBxWwDitJpm Next: none Diff:
OldNewDifferences
125125 then throw((("Not allowed to withdraw more than " + toString(l)) + " WAVES"))
126126 else if ((0 > S))
127127 then throw("Not enough balance")
128- else ScriptResult(WriteSet([DataEntry(c, S), DataEntry(j, height)]), TransferSet([ScriptTransfer(h, Q, unit), ScriptTransfer(f, P, unit)]))
128+ else ScriptResult(WriteSet([DataEntry(c, S), DataEntry(j, height)]), TransferSet([ScriptTransfer(h, Q, i), ScriptTransfer(f, P, i)]))
129129 }
130130 }
131131
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = 100000000
55
66 let b = "TotalAmount"
77
88 let c = "TotalAmountLeft"
99
1010 let d = "UniqueSponsors"
1111
1212 let e = base58'3jPnDZ2dMwgNS3NJKwrRaov4EsEygKfrnHPyQDD2bfk4'
1313
1414 let f = addressFromPublicKey(e)
1515
1616 let g = base58'3X6cLkhy6PLoJ5uJdjke6a3ikfEW8Msf62CaoHRY8YWv'
1717
1818 let h = addressFromPublicKey(g)
1919
2020 let i = base58'447PWweqTQPF9anUKtknDx7fNsGzHCVgsbVJiP8FSGdt'
2121
2222 let j = "LastPayment"
2323
2424 let k = 10
2525
2626 let l = 1
2727
2828 let m = 2
2929
3030 let n = 2
3131
3232 func o (p) = {
3333 let q = {
3434 let r = getInteger(this, p)
3535 if ($isInstanceOf(r, "Int"))
3636 then {
3737 let s = r
3838 s
3939 }
4040 else 0
4141 }
4242 q
4343 }
4444
4545
4646 func t (u) = (u + "_sponsor")
4747
4848
4949 func v (u) = (u + "_amount")
5050
5151
5252 func w (u) = o(v(u))
5353
5454
5555 func x (u,y) = {
5656 let z = {
5757 let r = getBinary(this, t(u))
5858 if ($isInstanceOf(r, "ByteVector"))
5959 then {
6060 let s = r
6161 y
6262 }
6363 else (y + 1)
6464 }
6565 z
6666 }
6767
6868
6969 @Callable(A)
7070 func deposit (u) = {
7171 let B = extract(A.payment)
7272 if ((B.assetId != i))
7373 then throw("Only Assetid can be deposited")
7474 else {
7575 let C = toBase58String(A.caller.bytes)
7676 let D = o(C)
7777 let E = w(C)
7878 let F = o(b)
7979 let G = o(c)
8080 let H = o(d)
8181 let I = x(C, H)
8282 let J = (E + B.amount)
8383 let K = (D + B.amount)
8484 let L = (F + B.amount)
8585 let M = (G + B.amount)
8686 WriteSet([DataEntry(C, K), DataEntry(b, L), DataEntry(c, M), DataEntry(v(C), J), DataEntry(t(C), toBytes(u)), DataEntry(d, I)])
8787 }
8888 }
8989
9090
9191
9292 @Callable(A)
9393 func withdraw (N) = {
9494 let C = toBase58String(A.caller.bytes)
9595 let O = (A.caller == h)
9696 let P = ((N * m) / 100)
9797 let Q = (N - P)
9898 let G = {
9999 let r = getInteger(this, c)
100100 if ($isInstanceOf(r, "Int"))
101101 then {
102102 let s = r
103103 s
104104 }
105105 else 0
106106 }
107107 let R = {
108108 let r = getInteger(this, j)
109109 if ($isInstanceOf(r, "Int"))
110110 then {
111111 let s = r
112112 s
113113 }
114114 else 0
115115 }
116116 if (!(O))
117117 then throw("Withdraw is only allowed by recipient")
118118 else if (((R + k) > height))
119119 then throw("Next payment not yet allowed")
120120 else {
121121 let S = (G - N)
122122 if ((0 > N))
123123 then throw("Can't withdraw negative amount")
124124 else if ((N > (l * a)))
125125 then throw((("Not allowed to withdraw more than " + toString(l)) + " WAVES"))
126126 else if ((0 > S))
127127 then throw("Not enough balance")
128- else ScriptResult(WriteSet([DataEntry(c, S), DataEntry(j, height)]), TransferSet([ScriptTransfer(h, Q, unit), ScriptTransfer(f, P, unit)]))
128+ else ScriptResult(WriteSet([DataEntry(c, S), DataEntry(j, height)]), TransferSet([ScriptTransfer(h, Q, i), ScriptTransfer(f, P, i)]))
129129 }
130130 }
131131
132132
133133 @Verifier(T)
134134 func U () = {
135135 let r = T
136136 if ($isInstanceOf(r, "SetScriptTransaction"))
137137 then {
138138 let V = r
139139 sigVerify(T.bodyBytes, T.proofs[0], T.senderPublicKey)
140140 }
141141 else false
142142 }
143143

github/deemru/w8io/169f3d6 
120.82 ms