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