tx · Hk6M1LK5mbsjVd9jwSDM9kKpxDi4JM2VQUKPmSt3ZcSh

3N2Z6EjzrzaCpD8ypDYLWDKe2PPVU8y9dJs:  -0.01400000 Waves

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

{ "type": 13, "id": "Hk6M1LK5mbsjVd9jwSDM9kKpxDi4JM2VQUKPmSt3ZcSh", "fee": 1400000, "feeAssetId": null, "timestamp": 1566937975710, "version": 1, "sender": "3N2Z6EjzrzaCpD8ypDYLWDKe2PPVU8y9dJs", "senderPublicKey": "HSTmdhPrJF81ozDBaqVn8QVtV76oD7gzDfcHPQRdxdwW", "proofs": [ "4q2SY53UsVMFtVcrLuFpM1b6MJ5eKzyuU9FwekWhRGjguXrvcGG876AXQGy4LV1czAJsM4ixFUxjkLnyzR5r41RA" ], "script": "base64:AAIDAAAAAAAAAAAAAAAQAAAAAAdXQVZFTEVUCQAAaAAAAAIJAABoAAAAAgAAAAAAAAAAZAAAAAAAAAAD6AAAAAAAAAAD6AAAAAAKQ09NTUlTU0lPTgkAAGkAAAACCQAAaAAAAAIAAAAAAAAAAAUFAAAAB1dBVkVMRVQAAAAAAAAAA+gAAAAAClRva2VuUHJpY2UAAAAAAAAAAAoAAAAAEERPTkFURUNPVU5URVJLRVkCAAAACyRET05BVEVfTlVNAAAAAAdCVVlJVEVNAgAAAAkkQlVZX0lURU0AAAAABEJhZzEJAABoAAAAAgAAAAAAAAAAAQUAAAAHV0FWRUxFVAAAAAAEQmFnNQkAAGgAAAACAAAAAAAAAAAFBQAAAAdXQVZFTEVUAAAAAAVCYWcxMAkAAGgAAAACAAAAAAAAAAAKBQAAAAdXQVZFTEVUAAAAAAVCYWcyMAkAAGgAAAACAAAAAAAAAAAUBQAAAAdXQVZFTEVUAAAAAAVCYWc1MAkAAGgAAAACAAAAAAAAAAAyBQAAAAdXQVZFTEVUAAAAAAZCYWcxMDAJAABoAAAAAgAAAAAAA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AAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABNUcmFuc2ZlclRyYW5zYWN0aW9uBAAAAAN0dHgFAAAAByRtYXRjaDAGAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABRTZXRTY3JpcHRUcmFuc2FjdGlvbgQAAAADc3R4BQAAAAckbWF0Y2gwBgcHQIGsjQ==", "chainId": 84, "height": 650083, "spentComplexity": 0 } View: original | compacted Prev: 8qagVzc1B8M6tZFeprCTi3RmQRWcWX9qMGCrDBhibCvz Next: 4qmcCnWVMZvQTufm9pyJ9wWEfX87qxT3TYMtsNQWSAMN Diff:
OldNewDifferences
8282 let z = n
8383 toString(z)
8484 }
85- else ""
85+ else "found"
8686 }
8787 t
8888 }
9797 let F = (p((C + "_balance")) - E)
9898 let G = DataEntry((C + "_balance"), F)
9999 let y = s(D)
100- throw(y)
100+ let H = x(y, w)
101+ if ((H == ""))
102+ then throw("This item not exist")
103+ else throw(H)
101104 }
102105
103106
105108 @Callable(A)
106109 func reset () = {
107110 let C = toString(A.caller)
108- let H = [DataEntry(d, 0), DataEntry((C + "_balance"), 0)]
109- WriteSet(H)
111+ let I = [DataEntry(d, 0), DataEntry((C + "_balance"), 0)]
112+ WriteSet(I)
110113 }
111114
112115
113116
114117 @Callable(A)
115118 func donate () = {
116- let I = l()
117- let J = toBase58String(A.transactionId)
118- let K = extract(A.payment)
119+ let J = l()
120+ let K = toBase58String(A.transactionId)
121+ let L = extract(A.payment)
119122 let C = toString(A.caller)
120- let L = isDefined(K.assetId)
121- let M = isDefined(K.assetId)
122- let N = K.amount
123- if (L)
123+ let M = isDefined(L.assetId)
124+ let N = isDefined(L.assetId)
125+ let O = L.amount
126+ if (M)
124127 then throw("Bet amount must be in Waves")
125- else if (M)
128+ else if (N)
126129 then throw("Transaction's fee must be in Waves")
127130 else {
128- let O = if (if (if (if (if (if ((N == (f + b)))
131+ let P = if (if (if (if (if (if ((O == (f + b)))
129132 then true
130- else (N == (g + b)))
133+ else (O == (g + b)))
131134 then true
132- else (N == (h + b)))
135+ else (O == (h + b)))
133136 then true
134- else (N == (i + b)))
137+ else (O == (i + b)))
135138 then true
136- else (N == (j + b)))
139+ else (O == (j + b)))
137140 then true
138- else (N == (k + b)))
141+ else (O == (k + b)))
139142 then true
140143 else false
141- if (O)
144+ if (P)
142145 then {
143- let P = ((N - b) / a)
144- let Q = (C + "_balance")
145- let R = (p(Q) + (P * c))
146- let H = [DataEntry(d, I), DataEntry(Q, R), DataEntry(J, P)]
147- WriteSet(H)
146+ let Q = ((O - b) / a)
147+ let R = (C + "_balance")
148+ let S = (p(R) + (Q * c))
149+ let I = [DataEntry(d, J), DataEntry(R, S), DataEntry(K, Q)]
150+ WriteSet(I)
148151 }
149152 else throw("You paid the wrong amount")
150153 }
151154 }
152155
153156
154-@Verifier(S)
155-func T () = if (sigVerify(S.bodyBytes, S.proofs[0], S.senderPublicKey))
157+@Verifier(T)
158+func U () = if (sigVerify(T.bodyBytes, T.proofs[0], T.senderPublicKey))
156159 then {
157- let n = S
160+ let n = T
158161 if ($isInstanceOf(n, "TransferTransaction"))
159162 then {
160- let U = n
163+ let V = n
161164 true
162165 }
163166 else if ($isInstanceOf(n, "SetScriptTransaction"))
164167 then {
165- let V = n
168+ let W = n
166169 true
167170 }
168171 else false
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 ""
85+ else "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)
100- throw(y)
100+ let H = x(y, w)
101+ if ((H == ""))
102+ then throw("This item not exist")
103+ else throw(H)
101104 }
102105
103106
104107
105108 @Callable(A)
106109 func reset () = {
107110 let C = toString(A.caller)
108- let H = [DataEntry(d, 0), DataEntry((C + "_balance"), 0)]
109- WriteSet(H)
111+ let I = [DataEntry(d, 0), DataEntry((C + "_balance"), 0)]
112+ WriteSet(I)
110113 }
111114
112115
113116
114117 @Callable(A)
115118 func donate () = {
116- let I = l()
117- let J = toBase58String(A.transactionId)
118- let K = extract(A.payment)
119+ let J = l()
120+ let K = toBase58String(A.transactionId)
121+ let L = extract(A.payment)
119122 let C = toString(A.caller)
120- let L = isDefined(K.assetId)
121- let M = isDefined(K.assetId)
122- let N = K.amount
123- if (L)
123+ let M = isDefined(L.assetId)
124+ let N = isDefined(L.assetId)
125+ let O = L.amount
126+ if (M)
124127 then throw("Bet amount must be in Waves")
125- else if (M)
128+ else if (N)
126129 then throw("Transaction's fee must be in Waves")
127130 else {
128- let O = if (if (if (if (if (if ((N == (f + b)))
131+ let P = if (if (if (if (if (if ((O == (f + b)))
129132 then true
130- else (N == (g + b)))
133+ else (O == (g + b)))
131134 then true
132- else (N == (h + b)))
135+ else (O == (h + b)))
133136 then true
134- else (N == (i + b)))
137+ else (O == (i + b)))
135138 then true
136- else (N == (j + b)))
139+ else (O == (j + b)))
137140 then true
138- else (N == (k + b)))
141+ else (O == (k + b)))
139142 then true
140143 else false
141- if (O)
144+ if (P)
142145 then {
143- let P = ((N - b) / a)
144- let Q = (C + "_balance")
145- let R = (p(Q) + (P * c))
146- let H = [DataEntry(d, I), DataEntry(Q, R), DataEntry(J, P)]
147- WriteSet(H)
146+ let Q = ((O - b) / a)
147+ let R = (C + "_balance")
148+ let S = (p(R) + (Q * c))
149+ let I = [DataEntry(d, J), DataEntry(R, S), DataEntry(K, Q)]
150+ WriteSet(I)
148151 }
149152 else throw("You paid the wrong amount")
150153 }
151154 }
152155
153156
154-@Verifier(S)
155-func T () = if (sigVerify(S.bodyBytes, S.proofs[0], S.senderPublicKey))
157+@Verifier(T)
158+func U () = if (sigVerify(T.bodyBytes, T.proofs[0], T.senderPublicKey))
156159 then {
157- let n = S
160+ let n = T
158161 if ($isInstanceOf(n, "TransferTransaction"))
159162 then {
160- let U = n
163+ let V = n
161164 true
162165 }
163166 else if ($isInstanceOf(n, "SetScriptTransaction"))
164167 then {
165- let V = n
168+ let W = n
166169 true
167170 }
168171 else false
169172 }
170173 else false
171174

github/deemru/w8io/026f985 
39.24 ms