tx · 4qmcCnWVMZvQTufm9pyJ9wWEfX87qxT3TYMtsNQWSAMN

3N2Z6EjzrzaCpD8ypDYLWDKe2PPVU8y9dJs:  -0.01400000 Waves

2019.08.27 23:33 [650084] smart account 3N2Z6EjzrzaCpD8ypDYLWDKe2PPVU8y9dJs > SELF 0.00000000 Waves

{ "type": 13, "id": "4qmcCnWVMZvQTufm9pyJ9wWEfX87qxT3TYMtsNQWSAMN", "fee": 1400000, "feeAssetId": null, "timestamp": 1566938021162, "version": 1, "sender": "3N2Z6EjzrzaCpD8ypDYLWDKe2PPVU8y9dJs", "senderPublicKey": "HSTmdhPrJF81ozDBaqVn8QVtV76oD7gzDfcHPQRdxdwW", "proofs": [ "M5zAdJyHjJiJnmmS23k1csLDAtAhfsWY82wazQpnJZa6b6LK6fhk5yomP4C9Zj1aCJts7oSnGTTgn7D5LFA1qAu" ], "script": "base64:AAIDAAAAAAAAAAAAAAAQAAAAAAdXQVZFTEVUCQAAaAAAAAIJAABoAAAAAgAAAAAAAAAAZAAAAAAAAAAD6AAAAAAAAAAD6AAAAAAKQ09NTUlTU0lPTgkAAGkAAAACCQAAaAAAAAIAAAAAAAAAAAUFAAAAB1dBVkVMRVQAAAAAAAAAA+gAAAAAClRva2VuUHJpY2UAAAAAAAAAAAoAAAAAEERPTkFURUNPVU5URVJLRVkCAAAACyRET05BVEVfTlVNAAAAAAdCVVlJVEVNAgAAAAkkQlVZX0lURU0AAAAABEJhZzEJAABoAAAAAgAAAAAAAAAAAQUAAAAHV0FWRUxFVAAAAAAEQmFnNQkAAGgAAAACAAAAAAAAAAAFBQAAAAdXQVZFTEVUAAAAAAVCYWcxMAkAAGgAAAACAAAAAAAAAAAKBQAAAAdXQVZFTEVUAAAAAAVCYWcyMAkAAGgAAAACAAAAAAAAAAAUBQAAAAdXQVZFTEVUAAAAAAVCYWc1MAkAAGgAAAACAAAAAAAAAAAyBQAAAAdXQVZFTEVUAAAAAAZCYWcxMDAJAABoAAAAAgAAAAAAAAAAZA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lCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5BAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAADdHR4BQAAAAckbWF0Y2gwBgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAAAAA3N0eAUAAAAHJG1hdGNoMAYHB+dCXQ0=", "chainId": 84, "height": 650084, "spentComplexity": 0 } View: original | compacted Prev: Hk6M1LK5mbsjVd9jwSDM9kKpxDi4JM2VQUKPmSt3ZcSh Next: 32kGkj89KUW4ci8NGuHUXTBrGhMScP865vLDZBkySyhT Diff:
OldNewDifferences
8282 let z = n
8383 toString(z)
8484 }
85- else "found"
85+ else "not found"
8686 }
8787 t
8888 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = ((100 * 1000) * 1000)
55
66 let b = ((5 * a) / 1000)
77
88 let c = 10
99
1010 let d = "$DONATE_NUM"
1111
1212 let e = "$BUY_ITEM"
1313
1414 let f = (1 * a)
1515
1616 let g = (5 * a)
1717
1818 let h = (10 * a)
1919
2020 let i = (20 * a)
2121
2222 let j = (50 * a)
2323
2424 let k = (100 * a)
2525
2626 func l () = {
2727 let m = {
2828 let n = getInteger(this, d)
2929 if ($isInstanceOf(n, "Int"))
3030 then {
3131 let o = n
3232 o
3333 }
3434 else 0
3535 }
3636 (m + 1)
3737 }
3838
3939
4040 func p (q) = {
4141 let r = {
4242 let n = getInteger(this, q)
4343 if ($isInstanceOf(n, "Int"))
4444 then {
4545 let r = n
4646 r
4747 }
4848 else 0
4949 }
5050 r
5151 }
5252
5353
5454 func s (q) = {
5555 let t = {
5656 let n = getString(this, q)
5757 if ($isInstanceOf(n, "String"))
5858 then {
5959 let u = n
6060 u
6161 }
6262 else ""
6363 }
6464 t
6565 }
6666
6767
6868 func v (w) = if ((w == "1"))
6969 then 1
7070 else if ((w == "2"))
7171 then 4
7272 else if ((w == "3"))
7373 then 6
7474 else throw("Неверный ID item")
7575
7676
7777 func x (y,w) = {
7878 let t = {
7979 let n = indexOf(y, (w + ":"))
8080 if ($isInstanceOf(n, "Int"))
8181 then {
8282 let z = n
8383 toString(z)
8484 }
85- else "found"
85+ else "not found"
8686 }
8787 t
8888 }
8989
9090
9191 @Callable(A)
9292 func buy (w) = {
9393 let B = toBase58String(A.transactionId)
9494 let C = toString(A.caller)
9595 let D = (C + "_items")
9696 let E = v(w)
9797 let F = (p((C + "_balance")) - E)
9898 let G = DataEntry((C + "_balance"), F)
9999 let y = s(D)
100100 let H = x(y, w)
101101 if ((H == ""))
102102 then throw("This item not exist")
103103 else throw(H)
104104 }
105105
106106
107107
108108 @Callable(A)
109109 func reset () = {
110110 let C = toString(A.caller)
111111 let I = [DataEntry(d, 0), DataEntry((C + "_balance"), 0)]
112112 WriteSet(I)
113113 }
114114
115115
116116
117117 @Callable(A)
118118 func donate () = {
119119 let J = l()
120120 let K = toBase58String(A.transactionId)
121121 let L = extract(A.payment)
122122 let C = toString(A.caller)
123123 let M = isDefined(L.assetId)
124124 let N = isDefined(L.assetId)
125125 let O = L.amount
126126 if (M)
127127 then throw("Bet amount must be in Waves")
128128 else if (N)
129129 then throw("Transaction's fee must be in Waves")
130130 else {
131131 let P = if (if (if (if (if (if ((O == (f + b)))
132132 then true
133133 else (O == (g + b)))
134134 then true
135135 else (O == (h + b)))
136136 then true
137137 else (O == (i + b)))
138138 then true
139139 else (O == (j + b)))
140140 then true
141141 else (O == (k + b)))
142142 then true
143143 else false
144144 if (P)
145145 then {
146146 let Q = ((O - b) / a)
147147 let R = (C + "_balance")
148148 let S = (p(R) + (Q * c))
149149 let I = [DataEntry(d, J), DataEntry(R, S), DataEntry(K, Q)]
150150 WriteSet(I)
151151 }
152152 else throw("You paid the wrong amount")
153153 }
154154 }
155155
156156
157157 @Verifier(T)
158158 func U () = if (sigVerify(T.bodyBytes, T.proofs[0], T.senderPublicKey))
159159 then {
160160 let n = T
161161 if ($isInstanceOf(n, "TransferTransaction"))
162162 then {
163163 let V = n
164164 true
165165 }
166166 else if ($isInstanceOf(n, "SetScriptTransaction"))
167167 then {
168168 let W = n
169169 true
170170 }
171171 else false
172172 }
173173 else false
174174

github/deemru/w8io/026f985 
33.89 ms