tx · GQ8BF9HRgumTUQposQo6vjVxNYUTokgvaneefvNRY3A1

3MrD29Em3UVB6KUouximkPkYJPUAtL8jqpn:  -0.01400000 Waves

2021.05.25 15:54 [1541213] smart account 3MrD29Em3UVB6KUouximkPkYJPUAtL8jqpn > SELF 0.00000000 Waves

{ "type": 13, "id": "GQ8BF9HRgumTUQposQo6vjVxNYUTokgvaneefvNRY3A1", "fee": 1400000, "feeAssetId": null, "timestamp": 1621947248223, "version": 2, "chainId": 84, "sender": "3MrD29Em3UVB6KUouximkPkYJPUAtL8jqpn", "senderPublicKey": "56eNaKVmDQUA4CeqQiK9bWnhNsm9iFLFtrdtGNCQfkTu", "proofs": [ "4k8sQXa5XVALqhuhRS3C17RP1JCWBRxx98oxCm84PTTW8hhT4F22jSGnVin3jq2JVzCzDCrZtHKYAhWFZwabwqew" ], "script": "base64:AAIEAAAAAAAAABcIAhIDCgEIEgMKAQESAwoBARIECgIIAQAAAAsBAAAADmdldE51bWJlckJ5S2V5AAAAAQAAAANrZXkEAAAABm51bWJlcgQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAUAAAAGbnVtYmVyAAAAAAROT05FAgAAAARub25lAQAAAA5nZXRTdHJpbmdCeUtleQAAAAEAAAADa2V5BAAAAAZzdHJpbmcEAAAAByRtYXRjaDAJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAAZTdHJpbmcEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEFAAAABE5PTkUFAAAABnN0cmluZwEAAAAPZ2V0S2V5VXNlckVtYWlsAAAAAQAAAAR1c2VyCQABLAAAAAIJAAEsAAAAAgIAAAAFdXNlcl8FAAAABHVzZXICAAAABl9lbWFpbAEAAAARZ2V0VmFsdWVVc2VyRW1haWwAAAABAA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AAAAABQAAAAhxdWFudGl0eQUAAAADbmlsAAAAAWkBAAAADXRyYW5zZmVyVG9rZW4AAAACAAAACXJlY2lwaWVudAAAAAZhbW91bnQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5M+0zDQ==", "height": 1541213, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3Qh4YrUJUCnyPAQKRcffoCLWzHqQuXWKKi7U7bPR4fJt Next: none Full:
OldNewDifferences
1-{-# STDLIB_VERSION 3 #-}
1+{-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let a = base58'FYeHd8VsE6SWQBzMFYDPbV7xjFdBMJt5gnCZCSiYyoHE'
4+func a (b) = {
5+ let c = {
6+ let d = getInteger(this, b)
7+ if ($isInstanceOf(d, "Int"))
8+ then {
9+ let e = d
10+ e
11+ }
12+ else 0
13+ }
14+ c
15+ }
516
6-@Callable(b)
7-func deposit () = {
8- let c = extract(b.payment)
9- if ((c.assetId != a))
10- then throw("NYAN-13 tokens only supports")
17+
18+let f = "none"
19+
20+func g (b) = {
21+ let h = {
22+ let d = getString(this, b)
23+ if ($isInstanceOf(d, "String"))
24+ then {
25+ let e = d
26+ e
27+ }
28+ else f
29+ }
30+ h
31+ }
32+
33+
34+func i (j) = (("user_" + j) + "_email")
35+
36+
37+func k (j) = g(i(j))
38+
39+
40+func l (j) = (("user_" + j) + "balance")
41+
42+
43+func m (j) = a(l(j))
44+
45+
46+func n () = "dApp_assetId"
47+
48+
49+func o () = g(n())
50+
51+
52+func p () = "dApp_assetId"
53+
54+
55+func q () = g(p())
56+
57+
58+@Callable(r)
59+func signUp (s) = {
60+ let t = toBase58String(r.caller.bytes)
61+ let u = k(t)
62+ if ((u != f))
63+ then throw("user is already registered")
64+ else [StringEntry(i(t), s), IntegerEntry(l(t), 0)]
65+ }
66+
67+
68+
69+@Callable(r)
70+func issueToken (v) = {
71+ let w = o()
72+ if ((w != f))
73+ then throw("token has already been issued")
1174 else {
12- let d = toBase58String(b.caller.bytes)
13- let e = {
14- let f = getInteger(this, d)
15- if ($isInstanceOf(f, "Int"))
16- then {
17- let g = f
18- g
19- }
20- else 0
21- }
22- let h = (e + c.amount)
23- WriteSet([DataEntry(d, h)])
75+ let x = Issue("NYAN-25", "NYAN-25 token", v, 0, true)
76+ let y = calculateAssetId(x)
77+[x, StringEntry(n(), toBase58String(y)), IntegerEntry(p(), v)]
2478 }
2579 }
2680
2781
2882
29-@Callable(b)
30-func withdraw (i) = {
31- let d = toBase58String(b.caller.bytes)
32- let e = {
33- let f = getInteger(this, d)
34- if ($isInstanceOf(f, "Int"))
35- then {
36- let g = f
37- g
38- }
39- else 0
40- }
41- let h = (e - i)
42- if ((0 > i))
43- then throw("can't withdraw negative amount")
44- else if ((0 > h))
45- then throw("not enoung balance")
46- else ScriptResult(WriteSet([DataEntry(d, h)]), TransferSet([ScriptTransfer(b.caller, i, a)]))
83+@Callable(r)
84+func reissueToken (v) = {
85+ let w = o()
86+ if ((w == f))
87+ then throw("token has not been issued")
88+ else [Reissue(fromBase58String(w), v, true), IntegerEntry(p(), v)]
4789 }
4890
4991
50-@Verifier(j)
51-func k () = sigVerify(j.bodyBytes, j.proofs[0], j.senderPublicKey)
92+
93+@Callable(r)
94+func transferToken (z,A) = nil
95+
96+
97+@Verifier(B)
98+func C () = sigVerify(B.bodyBytes, B.proofs[0], B.senderPublicKey)
5299

github/deemru/w8io/169f3d6 
33.11 ms