tx · EnVdVZxp7Abn52Eg3GpCvGhR4ii6ZbRkFSKU1y57jyM 3N5LuKQTLpnuibSzamYvruXsbp7YpqzKDA2: -0.00300000 Waves 2023.03.24 01:33 [2503250] smart account 3N5LuKQTLpnuibSzamYvruXsbp7YpqzKDA2 > SELF 0.00000000 Waves
{ "type": 13, "id": "EnVdVZxp7Abn52Eg3GpCvGhR4ii6ZbRkFSKU1y57jyM", "fee": 300000, "feeAssetId": null, "timestamp": 1679610827374, "version": 2, "chainId": 84, "sender": "3N5LuKQTLpnuibSzamYvruXsbp7YpqzKDA2", "senderPublicKey": "BgxpCm4wxbW8SKLPKZnf4KU2D6ZU29ov8MgZrkaSAqpY", "proofs": [ "2MfwWKWYCuPTRQ4yvNuJT5GhAZ8Yud8ivxYa7Ho4wQV8LkuG2M8eJb2CGPRuztaCHf5fVWwYBUcNdEJocYvdLEhD" ], "script": "base64:BgIQCAISBAoCCAgSBAoCCAgSAAwABmFkbWluMQIsQmd4cENtNHd4Ylc4U0tMUEtabmY0S1UyRDZaVTI5b3Y4TWdacmthU0FxcFkABmFkbWluMgIAABZrZXlfZmFybU5mdF9uZXh0TnVtYmVyAhJmYXJtTmZ0X25leHROdW1iZXIADGZhcm1OZnRfbmFtZQITQXNzb3RpYXRlZCBGYXJtIE5GVAALY293TmZ0X25hbWUCEkFzc290aWF0ZWQgQ293IE5GVAATZmFybU5mdF9kZXNjcmlwdGlvbgILeyJpbWFnZSI6ICIABGxpdmUCBkFDVElWRQAEZGVhZAIISU5BQ1RJVkUABmZhdHRlbgIGRkFUVEVOAQ10cnlHZXRJbnRlZ2VyAQNrZXkEByRtYXRjaDAJAJoIAgUEdGhpcwUDa2V5AwkAAQIFByRtYXRjaDACA0ludAQBYgUHJG1hdGNoMAUBYgAAAQx0cnlHZXRTdHJpbmcBA2tleQQHJG1hdGNoMAkAnQgCBQR0aGlzBQNrZXkDCQABAgUHJG1hdGNoMAIGU3RyaW5nBAFhBQckbWF0Y2gwBQFhAgABBWFsbG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awIBIgQFaXNzdWUJAMIIBQULY293TmZ0X25hbWUJAKwCAgkArAICBQtkZXNjcmlwdGlvbgUJaW1hZ2VMaW5rAgIifQABAAAHBAJpZAkAuAgBBQVpc3N1ZQkAzAgCBQVpc3N1ZQkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDBQlyZWNpcGllbnQAAQUCaWQJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICCQCsAgIJAKwCAgkArAICAgVmYXJtXwUHYWRkcmVzcwIFX2Nvd18JANgEAQUCaWQCB19zdGF0dXMFBGxpdmUJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICCQCsAgICBGNvd18JANgEAQUCaWQCBl9vd25lcgUHYWRkcmVzcwUDbmlsCQACAQISTm90IGFsbG93ZWQgY2FsbGVyAWkBBGluaXQACQDMCAIJAQxJbnRlZ2VyRW50cnkCBRZrZXlfZmFybU5mdF9uZXh0TnVtYmVyAAEFA25pbAAT1otL", "height": 2503250, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FHscHxHJtYMu8sn19kYDudtkYDRFCBpFDszDcty5j84B Next: G7PvdNS87BX3KPNarY3pFaC3SevY3XcGHEjjoATauhuw Full:
Old | New | Differences | |
---|---|---|---|
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 = "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)] | |
103 | + | ||
104 | + |
github/deemru/w8io/026f985 27.80 ms ◑