tx · G7PvdNS87BX3KPNarY3pFaC3SevY3XcGHEjjoATauhuw

3N5LuKQTLpnuibSzamYvruXsbp7YpqzKDA2:  -0.00100000 Waves

2023.03.24 01:34 [2503253] smart account 3N5LuKQTLpnuibSzamYvruXsbp7YpqzKDA2 > SELF 0.00000000 Waves

{ "type": 13, "id": "G7PvdNS87BX3KPNarY3pFaC3SevY3XcGHEjjoATauhuw", "fee": 100000, "feeAssetId": null, "timestamp": 1679610882499, "version": 2, "chainId": 84, "sender": "3N5LuKQTLpnuibSzamYvruXsbp7YpqzKDA2", "senderPublicKey": "BgxpCm4wxbW8SKLPKZnf4KU2D6ZU29ov8MgZrkaSAqpY", "proofs": [ "5pSLG32JdcXc4ZLi1GnNLTNZ2dNpXVUQcsAmeFii6PLeN77dqQE3JLLMMBjnyp823AzLCrYYA8c9v3UH9wE3JotK" ], "script": "base64:BgICCAIAAACM2Hc5", "height": 2503253, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EnVdVZxp7Abn52Eg3GpCvGhR4ii6ZbRkFSKU1y57jyM Next: EX1k9r3k7ax3VLv4RoCvYfUgGFSaAWtXsXfNz3WUAbdd Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let a = "BgxpCm4wxbW8SKLPKZnf4KU2D6ZU29ov8MgZrkaSAqpY"
54
6-let b = ""
7-
8-let c = "farmNft_nextNumber"
9-
10-let d = "Assotiated Farm NFT"
11-
12-let e = "Assotiated Cow NFT"
13-
14-let f = "{\"image\": \""
15-
16-let g = "ACTIVE"
17-
18-let h = "INACTIVE"
19-
20-let i = "FATTEN"
21-
22-func j (k) = {
23- let l = getInteger(this, k)
24- if ($isInstanceOf(l, "Int"))
25- then {
26- let m = l
27- m
28- }
29- else 0
30- }
31-
32-
33-func n (k) = {
34- let l = getString(this, k)
35- if ($isInstanceOf(l, "String"))
36- then {
37- let o = l
38- o
39- }
40- else ""
41- }
42-
43-
44-func p (q) = if (if ((q == a))
45- then true
46- else (q == b))
47- then true
48- else false
49-
50-
51-@Callable(r)
52-func registerFarm (s,t) = {
53- let q = toBase58String(r.callerPublicKey)
54- if (p(q))
55- then {
56- let u = addressFromStringValue(s)
57- let v = split_4C(t, "|")
58- let w = $Tuple3(v[0], v[1], v[2])
59- let x = w._1
60- let y = w._2
61- let z = w._3
62- let A = j(c)
63- if ((A == A))
64- then {
65- let B = Issue((d + toString(A)), ((f + z) + "\"}"), 1, 0, false)
66- let C = calculateAssetId(B)
67-[B, ScriptTransfer(u, 1, C), IntegerEntry(c, (A + 1)), StringEntry((("farm_" + s) + "_name"), x), StringEntry((("farm_" + s) + "_location"), y)]
68- }
69- else throw("Strict value is not equal to itself.")
70- }
71- else throw("Not allowed caller")
72- }
73-
74-
75-
76-@Callable(r)
77-func registerCow (s,t) = {
78- let q = toBase58String(r.callerPublicKey)
79- if (p(q))
80- then {
81- let u = addressFromStringValue(s)
82- let v = split_4C(t, t)
83- let D = $Tuple7(v[0], v[1], v[2], v[3], v[4], v[5], v[6])
84- let E = D._1
85- let F = D._2
86- let G = D._3
87- let H = D._4
88- let I = D._5
89- let J = D._6
90- let z = D._7
91- let K = (((((((((((((("{\"cowCode\": \"" + E) + "\", \"bornedFarmAddress\": \"") + F) + "\", \"genes\": \"") + G) + "\", \"motherId\": \"") + H) + "\", \"fatherId\": \"") + I) + "\", \"type\": \"") + J) + "\", \"imageLink\": \"") + z) + "\"")
92- let B = Issue(e, ((K + z) + "\"}"), 1, 0, false)
93- let C = calculateAssetId(B)
94-[B, ScriptTransfer(u, 1, C), StringEntry((((("farm_" + s) + "_cow_") + toBase58String(C)) + "_status"), g), StringEntry((("cow_" + toBase58String(C)) + "_owner"), s)]
95- }
96- else throw("Not allowed caller")
97- }
98-
99-
100-
101-@Callable(r)
102-func init () = [IntegerEntry(c, 1)]
1035
1046

github/deemru/w8io/c3f4982 
21.71 ms