tx · yLShz79nytJvrVNUXj9Ffcb4ryABMBRD9GmVtZMF3jw

3Mr5qPbeVKxVRjGMAumaEkSK7dMo3FbtFYE:  -0.01400000 Waves

2021.06.21 23:59 [1580652] smart account 3Mr5qPbeVKxVRjGMAumaEkSK7dMo3FbtFYE > SELF 0.00000000 Waves

{ "type": 13, "id": "yLShz79nytJvrVNUXj9Ffcb4ryABMBRD9GmVtZMF3jw", "fee": 1400000, "feeAssetId": null, "timestamp": 1624309209332, "version": 2, "chainId": 84, "sender": "3Mr5qPbeVKxVRjGMAumaEkSK7dMo3FbtFYE", "senderPublicKey": "EsW1U1EWPD2yLGRwTq3i9ftXRvWVpLbNz9R8U9xAF4e8", "proofs": [ "5FYYqBx5uYqrXwwbLYTfpDxsn2wBTSHkHovM6WBrGjvzANa68zLgshZ5oqb68438Nzjut5pLYeDZdU9wzPP9Xdea" ], "script": "base64:AAIEAAAAAAAAACwIAhIDCgEIEgMKAQESAwoBARIECgIIARIHCgUICAEBCBIECgIIARIECgIIAQAAABABAAAADmdldE51bWJlckJ5S2V5AAAAAQAAAANrZXkEAAAABm51bWJlcgQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAUAAAAGbnVtYmVyAAAAAAROT05FAgAAAARub25lAQAAAA5nZXRTdHJpbmdCeUtleQAAAAEAAAADa2V5BAAAAAZzdHJpbmcEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEFAAAABE5PTkUFAAAABnN0cmluZwEAAAAPYWRkcmVzc1RvU3RyaW5nAAAAAQAAAAdhZGRyZXNzCQACWAAAAAEIBQAAAAdhZGRyZXNzAAAABWJ5dGVzAQAAAA9zdHJ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vdCBlbm91Z2ggTllBTiBUb2tlbnMgdG8gZXhjaGFuZ2UgYW4gYXNzZXQDCQAAAAAAAAIFAAAADXBheW1lbnRBbW91bnQFAAAAC2Fzc2V0QW1vdW50CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAAC3VzZXJBZGRyZXNzBQAAAAZhbW91bnQFAAAAEWFzc2V0VG9rZW5Bc3NldElkCQAETAAAAAIJAQAAAARCdXJuAAAAAgUAAAAOcGF5bWVudEFzc2V0SWQFAAAADXBheW1lbnRBbW91bnQFAAAAA25pbAQAAAATcGF5bWVudEFtb3VudENoYW5nZQkAAGUAAAACBQAAAA1wYXltZW50QW1vdW50BQAAAAthc3NldEFtb3VudAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAAt1c2VyQWRkcmVzcwUAAAAGYW1vdW50BQAAABFhc3NldFRva2VuQXNzZXRJZAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAAt1c2VyQWRkcmVzcwUAAAATcGF5bWVudEFtb3VudENoYW5nZQUAAAAOcGF5bWVudEFzc2V0SWQJAARMAAAAAgkBAAAABEJ1cm4AAAACBQAAAA5wYXltZW50QXNzZXRJZAUAAAALYXNzZXRBbW91bnQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5/JXY+A==", "height": 1580652, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6ucu4qNnuJuPPVKgLT16wo45R679uFRPCAVactTai51r Next: none Diff:
OldNewDifferences
8484 @Callable(B)
8585 func issueNyanToken (E) = {
8686 let F = v(this)
87- if ((F != f))
88- then throw("NYAN Token is already issued")
89- else {
90- let G = Issue("NYAN Token", "NYAN Token is a cryptocurrency token that operates on the Waves platform", E, 0, true)
91- let H = calculateAssetId(G)
87+ if (!(o(B.caller)))
88+ then throw("Function invoke not allowed, requested from non-admin address")
89+ else if ((F != f))
90+ then throw("NYAN Token is already issued")
91+ else {
92+ let G = Issue("NYAN Token", "NYAN Token is a cryptocurrency token that operates on the Waves platform", E, 0, true)
93+ let H = calculateAssetId(G)
9294 [G, StringEntry(t(this), l(H))]
93- }
95+ }
9496 }
9597
9698
113115 let H = n(v(this))
114116 let K = assetBalance(this, H)
115117 let L = (K - J)
116- if ((r == f))
117- then throw("You cannot transfer NYAN Tokens to an unregistered user")
118- else if ((0 > J))
119- then throw("You cannot transfer a negative amount")
120- else if ((0 > L))
121- then throw("Not enough NYAN Tokens to transfer")
122- else [ScriptTransfer(k(I), J, H)]
118+ if (!(o(B.caller)))
119+ then throw("Function invoke not allowed, requested from non-admin address")
120+ else if ((r == f))
121+ then throw("You cannot transfer NYAN Tokens to an unregistered user")
122+ else if ((0 > J))
123+ then throw("You cannot transfer a negative amount")
124+ else if ((0 > L))
125+ then throw("Not enough NYAN Tokens to transfer")
126+ else [ScriptTransfer(k(I), J, H)]
123127 }
124128
125129
129133 let Q = Issue(M, N, E, 0, true)
130134 let R = calculateAssetId(Q)
131135 let S = l(R)
132- if ((E == 0))
133- then [Q, IntegerEntry(w(S), O), StringEntry(z(S), P)]
134- else {
135- let H = n(v(this))
136- let K = assetBalance(this, H)
137- let J = (E * O)
138- let L = (K - J)
139- if ((0 > L))
140- then throw("Not enough NYAN Tokens to issue an asset")
141- else [Q, Burn(H, J), IntegerEntry(w(S), O), StringEntry(z(S), P)]
142- }
136+ if (!(o(B.caller)))
137+ then throw("Function invoke not allowed, requested from non-admin address")
138+ else if ((E == 0))
139+ then [Q, IntegerEntry(w(S), O), StringEntry(z(S), P)]
140+ else {
141+ let H = n(v(this))
142+ let K = assetBalance(this, H)
143+ let J = (E * O)
144+ let L = (K - J)
145+ if ((0 > L))
146+ then throw("Not enough NYAN Tokens to issue an asset")
147+ else [Q, Burn(H, J), IntegerEntry(w(S), O), StringEntry(z(S), P)]
148+ }
143149 }
144150
145151
151157 let O = y(x)
152158 let J = (E * O)
153159 let L = (K - J)
154- if ((0 > L))
155- then throw("Not enough NYAN Tokens to reissue an asset")
156- else [Reissue(n(x), E, true), Burn(H, J)]
160+ if (!(o(B.caller)))
161+ then throw("Function invoke not allowed, requested from non-admin address")
162+ else if ((0 > L))
163+ then throw("Not enough NYAN Tokens to reissue an asset")
164+ else [Reissue(n(x), E, true), Burn(H, J)]
157165 }
158166
159167
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func a (b) = {
55 let c = {
66 let d = getInteger(this, b)
77 if ($isInstanceOf(d, "Int"))
88 then {
99 let e = d
1010 e
1111 }
1212 else 0
1313 }
1414 c
1515 }
1616
1717
1818 let f = "none"
1919
2020 func g (b) = {
2121 let h = {
2222 let d = getString(this, b)
2323 if ($isInstanceOf(d, "String"))
2424 then {
2525 let e = d
2626 e
2727 }
2828 else f
2929 }
3030 h
3131 }
3232
3333
3434 func i (j) = toBase58String(j.bytes)
3535
3636
3737 func k (h) = Address(fromBase58String(h))
3838
3939
4040 func l (m) = toBase58String(m)
4141
4242
4343 func n (h) = fromBase58String(h)
4444
4545
4646 func o (p) = (this == p)
4747
4848
4949 func q (r) = (("user_" + r) + "_email")
5050
5151
5252 func s (r) = g(q(r))
5353
5454
5555 func t (u) = (("dApp_" + i(u)) + "_tokenId")
5656
5757
5858 func v (u) = g(t(u))
5959
6060
6161 func w (x) = (("asset_" + x) + "_price")
6262
6363
6464 func y (x) = a(w(x))
6565
6666
6767 func z (x) = (("asset_" + x) + "_data")
6868
6969
7070 func A (x) = g(w(x))
7171
7272
7373 @Callable(B)
7474 func signUp (C) = {
7575 let D = i(B.caller)
7676 let r = s(D)
7777 if ((r != f))
7878 then throw((("User " + r) + " is already registered"))
7979 else [StringEntry(q(D), C)]
8080 }
8181
8282
8383
8484 @Callable(B)
8585 func issueNyanToken (E) = {
8686 let F = v(this)
87- if ((F != f))
88- then throw("NYAN Token is already issued")
89- else {
90- let G = Issue("NYAN Token", "NYAN Token is a cryptocurrency token that operates on the Waves platform", E, 0, true)
91- let H = calculateAssetId(G)
87+ if (!(o(B.caller)))
88+ then throw("Function invoke not allowed, requested from non-admin address")
89+ else if ((F != f))
90+ then throw("NYAN Token is already issued")
91+ else {
92+ let G = Issue("NYAN Token", "NYAN Token is a cryptocurrency token that operates on the Waves platform", E, 0, true)
93+ let H = calculateAssetId(G)
9294 [G, StringEntry(t(this), l(H))]
93- }
95+ }
9496 }
9597
9698
9799
98100 @Callable(B)
99101 func reissueNyanToken (E) = {
100102 let F = v(this)
101103 if (!(o(B.caller)))
102104 then throw("Function invoke not allowed, requested from non-admin address")
103105 else if ((F == f))
104106 then throw("NYAN Token was not issued")
105107 else [Reissue(n(F), E, true)]
106108 }
107109
108110
109111
110112 @Callable(B)
111113 func transferNyanToken (I,J) = {
112114 let r = s(I)
113115 let H = n(v(this))
114116 let K = assetBalance(this, H)
115117 let L = (K - J)
116- if ((r == f))
117- then throw("You cannot transfer NYAN Tokens to an unregistered user")
118- else if ((0 > J))
119- then throw("You cannot transfer a negative amount")
120- else if ((0 > L))
121- then throw("Not enough NYAN Tokens to transfer")
122- else [ScriptTransfer(k(I), J, H)]
118+ if (!(o(B.caller)))
119+ then throw("Function invoke not allowed, requested from non-admin address")
120+ else if ((r == f))
121+ then throw("You cannot transfer NYAN Tokens to an unregistered user")
122+ else if ((0 > J))
123+ then throw("You cannot transfer a negative amount")
124+ else if ((0 > L))
125+ then throw("Not enough NYAN Tokens to transfer")
126+ else [ScriptTransfer(k(I), J, H)]
123127 }
124128
125129
126130
127131 @Callable(B)
128132 func issueAssetToken (M,N,E,O,P) = {
129133 let Q = Issue(M, N, E, 0, true)
130134 let R = calculateAssetId(Q)
131135 let S = l(R)
132- if ((E == 0))
133- then [Q, IntegerEntry(w(S), O), StringEntry(z(S), P)]
134- else {
135- let H = n(v(this))
136- let K = assetBalance(this, H)
137- let J = (E * O)
138- let L = (K - J)
139- if ((0 > L))
140- then throw("Not enough NYAN Tokens to issue an asset")
141- else [Q, Burn(H, J), IntegerEntry(w(S), O), StringEntry(z(S), P)]
142- }
136+ if (!(o(B.caller)))
137+ then throw("Function invoke not allowed, requested from non-admin address")
138+ else if ((E == 0))
139+ then [Q, IntegerEntry(w(S), O), StringEntry(z(S), P)]
140+ else {
141+ let H = n(v(this))
142+ let K = assetBalance(this, H)
143+ let J = (E * O)
144+ let L = (K - J)
145+ if ((0 > L))
146+ then throw("Not enough NYAN Tokens to issue an asset")
147+ else [Q, Burn(H, J), IntegerEntry(w(S), O), StringEntry(z(S), P)]
148+ }
143149 }
144150
145151
146152
147153 @Callable(B)
148154 func reissueAssetToken (x,E) = {
149155 let H = n(v(this))
150156 let K = assetBalance(this, H)
151157 let O = y(x)
152158 let J = (E * O)
153159 let L = (K - J)
154- if ((0 > L))
155- then throw("Not enough NYAN Tokens to reissue an asset")
156- else [Reissue(n(x), E, true), Burn(H, J)]
160+ if (!(o(B.caller)))
161+ then throw("Function invoke not allowed, requested from non-admin address")
162+ else if ((0 > L))
163+ then throw("Not enough NYAN Tokens to reissue an asset")
164+ else [Reissue(n(x), E, true), Burn(H, J)]
157165 }
158166
159167
160168
161169 @Callable(B)
162170 func exchangeAssetToken (x,J) = {
163171 let T = B.payments
164172 if ((size(T) == 0))
165173 then throw("You need to attach the payment")
166174 else {
167175 let U = T[0].amount
168176 let V = value(T[0].assetId)
169177 let W = y(x)
170178 let X = (J * W)
171179 let D = B.caller
172180 let R = n(x)
173181 if ((X > U))
174182 then throw("Not enough NYAN Tokens to exchange an asset")
175183 else if ((U == X))
176184 then [ScriptTransfer(D, J, R), Burn(V, U)]
177185 else {
178186 let Y = (U - X)
179187 [ScriptTransfer(D, J, R), ScriptTransfer(D, Y, V), Burn(V, X)]
180188 }
181189 }
182190 }
183191
184192
185193 @Verifier(Z)
186194 func aa () = sigVerify(Z.bodyBytes, Z.proofs[0], Z.senderPublicKey)
187195

github/deemru/w8io/026f985 
34.20 ms