tx · dEpAVJk6g5oaMyigjd2LmdXvucrGQaG2YshYZJVx4pc

3MuP7TsBoDYZ1bTejhavaADUcwj9tqDrEd9:  -0.00300000 Waves

2023.03.24 22:08 [2504497] smart account 3MuP7TsBoDYZ1bTejhavaADUcwj9tqDrEd9 > SELF 0.00000000 Waves

{ "type": 13, "id": "dEpAVJk6g5oaMyigjd2LmdXvucrGQaG2YshYZJVx4pc", "fee": 300000, "feeAssetId": null, "timestamp": 1679684966041, "version": 2, "chainId": 84, "sender": "3MuP7TsBoDYZ1bTejhavaADUcwj9tqDrEd9", "senderPublicKey": "BaywMJa21xczqnEzCkkRNftp8YaqchU4PNVeazm2FHZg", "proofs": [ "59wPFAF3eBJuSXdMbBAdxanfDn4vnbAWSweSQVCdQ2d3NTdh7CPYT3tbg4u1VzAejSSin4QAnGgmQb5KvoyqZkky" ], "script": "base64:BgIQCAISBAoCCAgSBAoCCAgSAAwABmFkbWluMQIsQmd4cENtNHd4Ylc4U0tMUEtabmY0S1UyRDZaVTI5b3Y4TWdacmthU0FxcFkABmFkbWluMgIAABZrZXlfZmFybU5mdF9uZXh0TnVtYmVyAhJmYXJtTmZ0X25leHROdW1iZXIADGZhcm1OZnRfbmFtZQILQ2F0dGxlIE5GVCAAC2Nvd05mdF9uYW1lAgdDb3cgTkZUABNmYXJtTmZ0X2Rlc2NyaXB0aW9uAjd7ImRlc2NyaXB0aW9uIjogIk5GVCBmb3IgYXNzb3RpYXRlZCBjYXR0bGUiLCAiaW1hZ2UiOiAiAARsaXZlAgZBQ1RJVkUABGRlYWQCCElOQUNUSVZFAAZmYXR0ZW4CBkZBVFRFTgENdHJ5R2V0SW50ZWdlcgEDa2V5BAckbWF0Y2gwCQCaCAIFBHRoaXMFA2tleQMJAAECBQckbWF0Y2gwAgNJbnQEAWIFByRtYXRjaDAFAWIAAAEMdHJ5R2V0U3RyaW5nAQNrZXkEByRtYXRjaDAJAJ0IAgUEdGhpcwUDa2V5AwkAAQIFByRtYXRjaDACBlN0cm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RoZXJJZCI6ICIFCG1vdGhlcklkAhAiLCAiZmF0aGVySWQiOiAiBQhmYXRoZXJJZAIMIiwgInR5cGUiOiAiBQR0eXBlAhEiLCAiaW1hZ2VMaW5rIjogIgUJaW1hZ2VMaW5rAgEiBAVpc3N1ZQkAwggFBQtjb3dOZnRfbmFtZQkArAICCQCsAgIFC2Rlc2NyaXB0aW9uBQlpbWFnZUxpbmsCAiJ9AAEAAAcEAmlkCQC4CAEFBWlzc3VlCQDMCAIFBWlzc3VlCQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMFCXJlY2lwaWVudAABBQJpZAkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIJAKwCAgkArAICCQCsAgICBWZhcm1fBQdhZGRyZXNzAgVfY293XwkA2AQBBQJpZAIHX3N0YXR1cwUEbGl2ZQkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIJAKwCAgIEY293XwkA2AQBBQJpZAIGX293bmVyBQdhZGRyZXNzBQNuaWwJAAIBAhJOb3QgYWxsb3dlZCBjYWxsZXIBaQEEaW5pdAAECWNhbGxlclBiawkA2AQBCAUBaQ9jYWxsZXJQdWJsaWNLZXkDCQEFYWxsb3cBBQljYWxsZXJQYmsEB25leHROdW0JAQ10cnlHZXRJbnRlZ2VyAQIWa2V5X2Zhcm1OZnRfbmV4dE51bWJlcgMJAQIhPQIFB25leHROdW0AAAkAAgECH0NvbnRyYWN0IGlzIGFscmVhZHkgaW5pdGlhbGl6ZWQJAMwIAgkBDEludGVnZXJFbnRyeQIFFmtleV9mYXJtTmZ0X25leHROdW1iZXIAAQUDbmlsCQACAQISTm90IGFsbG93ZWQgY2FsbGVyAICXHoc=", "height": 2504497, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 6 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let a = "BgxpCm4wxbW8SKLPKZnf4KU2D6ZU29ov8MgZrkaSAqpY"
5+
6+let b = ""
7+
8+let c = "farmNft_nextNumber"
9+
10+let d = "Cattle NFT "
11+
12+let e = "Cow NFT"
13+
14+let f = "{\"description\": \"NFT for assotiated cattle\", \"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) = true
45+
46+
47+@Callable(r)
48+func registerFarm (s,t) = {
49+ let q = toBase58String(r.callerPublicKey)
50+ if (p(q))
51+ then {
52+ let u = addressFromStringValue(s)
53+ let v = split_4C(t, "|")
54+ let w = $Tuple3(v[0], v[1], v[2])
55+ let x = w._1
56+ let y = w._2
57+ let z = w._3
58+ let A = j(c)
59+ if ((A == A))
60+ then {
61+ let B = Issue((d + toString(A)), ((f + z) + "\"}"), 1, 0, false)
62+ let C = calculateAssetId(B)
63+ $Tuple2([B, ScriptTransfer(u, 1, C), IntegerEntry(c, (A + 1)), BooleanEntry((("farm_" + s) + "_status"), true), StringEntry((("farm_" + s) + "_name"), x), StringEntry((("farm_" + s) + "_location"), y)], $Tuple4(A, x, y, z))
64+ }
65+ else throw("Strict value is not equal to itself.")
66+ }
67+ else throw("Not allowed caller")
68+ }
69+
70+
71+
72+@Callable(r)
73+func registerCow (s,t) = {
74+ let q = toBase58String(r.callerPublicKey)
75+ if (p(q))
76+ then {
77+ let u = addressFromStringValue(s)
78+ let v = split_4C(t, t)
79+ let D = $Tuple7(v[0], v[1], v[2], v[3], v[4], v[5], v[6])
80+ let E = D._1
81+ let F = D._2
82+ let G = D._3
83+ let H = D._4
84+ let I = D._5
85+ let J = D._6
86+ let z = D._7
87+ let K = (((((((((((((("{\"cowCode\": \"" + E) + "\", \"bornedFarmAddress\": \"") + F) + "\", \"genes\": \"") + G) + "\", \"motherId\": \"") + H) + "\", \"fatherId\": \"") + I) + "\", \"type\": \"") + J) + "\", \"imageLink\": \"") + z) + "\"")
88+ let B = Issue(e, ((K + z) + "\"}"), 1, 0, false)
89+ let C = calculateAssetId(B)
90+[B, ScriptTransfer(u, 1, C), StringEntry((((("farm_" + s) + "_cow_") + toBase58String(C)) + "_status"), g), StringEntry((("cow_" + toBase58String(C)) + "_owner"), s)]
91+ }
92+ else throw("Not allowed caller")
93+ }
94+
95+
96+
97+@Callable(r)
98+func init () = {
99+ let q = toBase58String(r.callerPublicKey)
100+ if (p(q))
101+ then {
102+ let A = j("key_farmNft_nextNumber")
103+ if ((A != 0))
104+ then throw("Contract is already initialized")
105+ else [IntegerEntry(c, 1)]
106+ }
107+ else throw("Not allowed caller")
108+ }
109+
110+

github/deemru/w8io/169f3d6 
21.88 ms