tx · DarajS5ETdhk69YZXx7YS95dmmZBXdu6Jb23334xPtmW 3MzcHAM4DcpYKt1ZAMibQmqU69pKQ6qz3i4: -0.00300000 Waves 2023.03.24 01:46 [2503267] smart account 3MzcHAM4DcpYKt1ZAMibQmqU69pKQ6qz3i4 > SELF 0.00000000 Waves
{ "type": 13, "id": "DarajS5ETdhk69YZXx7YS95dmmZBXdu6Jb23334xPtmW", "fee": 300000, "feeAssetId": null, "timestamp": 1679611630803, "version": 2, "chainId": 84, "sender": "3MzcHAM4DcpYKt1ZAMibQmqU69pKQ6qz3i4", "senderPublicKey": "DoAid1WtwHRuonKq6xKkbxijk1QQhXG75vdyuUM7n7NN", "proofs": [ "5xvN2LZ54662ueSH7FN9XLLQYKiEmimT9tfdaNcMpotavkZNFoWtVqGR9bCi3nQrb2vxvyHhsUtL3DBpRh11thwq" ], "script": "base64:BgIQCAISBAoCCAgSBAoCCAgSAAwABmFkbWluMQIsQmd4cENtNHd4Ylc4U0tMUEtabmY0S1UyRDZaVTI5b3Y4TWdacmthU0FxcFkABmFkbWluMgIAABZrZXlfZmFybU5mdF9uZXh0TnVtYmVyAhJmYXJtTmZ0X25leHROdW1iZXIADGZhcm1OZnRfbmFtZQIKQ2F0dGxlIE5GVAALY293TmZ0X25hbWUCB0NvdyBORlQAE2Zhcm1OZnRfZGVzY3JpcHRpb24CC3siaW1hZ2UiOiAiAARsaXZlAgZBQ1RJVkUABGRlYWQCCElOQUNUSVZFAAZmYXR0ZW4CBkZBVFRFTgENdHJ5R2V0SW50ZWdlcgEDa2V5BAckbWF0Y2gwCQCaCAIFBHRoaXMFA2tleQMJAAECBQckbWF0Y2gwAgNJbnQEAWIFByRtYXRjaDAFAWIAAAEMdHJ5R2V0U3RyaW5nAQNrZXkEByRtYXRjaDAJAJ0IAgUEdGhpcwUDa2V5AwkAAQIFByRtYXRjaDACBlN0cmluZwQBYQUHJG1hdGNoMAUBYQIAAQVhbGxvdwEJY2FsbGVyUGJrAwMJAAACBQljYWxs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FnZUxpbmsiOiAiBQlpbWFnZUxpbmsCASIEBWlzc3VlCQDCCAUFC2Nvd05mdF9uYW1lCQCsAgIJAKwCAgULZGVzY3JpcHRpb24FCWltYWdlTGluawICIn0AAQAABwQCaWQJALgIAQUFaXNzdWUJAMwIAgUFaXNzdWUJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwUJcmVjaXBpZW50AAEFAmlkCQDMCAIJAQtTdHJpbmdFbnRyeQIJAKwCAgkArAICCQCsAgIJAKwCAgIFZmFybV8FB2FkZHJlc3MCBV9jb3dfCQDYBAEFAmlkAgdfc3RhdHVzBQRsaXZlCQDMCAIJAQtTdHJpbmdFbnRyeQIJAKwCAgkArAICAgRjb3dfCQDYBAEFAmlkAgZfb3duZXIFB2FkZHJlc3MFA25pbAkAAgECEk5vdCBhbGxvd2VkIGNhbGxlcgFpAQRpbml0AAkAzAgCCQEMSW50ZWdlckVudHJ5AgUWa2V5X2Zhcm1OZnRfbmV4dE51bWJlcgABBQNuaWwAqo6zUQ==", "height": 2503267, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 135K9ZiYhhk59Rkwg7wX9jTGoNVriargs7eHcxUtkw7y Next: EBat6D5etJp3WYMzddKmtw3GxwvG6EvFehM65S7uf3LP Diff:
Old | New | Differences | |
---|---|---|---|
7 | 7 | ||
8 | 8 | let c = "farmNft_nextNumber" | |
9 | 9 | ||
10 | - | let d = " | |
10 | + | let d = "Cattle NFT" | |
11 | 11 | ||
12 | - | let e = " | |
12 | + | let e = "Cow NFT" | |
13 | 13 | ||
14 | 14 | let f = "{\"image\": \"" | |
15 | 15 |
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 = " | |
10 | + | let d = "Cattle NFT" | |
11 | 11 | ||
12 | - | let e = " | |
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) = if (if ((q == a)) | |
45 | 45 | then true | |
46 | 46 | else (q == b)) | |
47 | 47 | then true | |
48 | 48 | else false | |
49 | 49 | ||
50 | 50 | ||
51 | 51 | @Callable(r) | |
52 | 52 | func registerFarm (s,t) = { | |
53 | 53 | let q = toBase58String(r.callerPublicKey) | |
54 | 54 | if (p(q)) | |
55 | 55 | then { | |
56 | 56 | let u = addressFromStringValue(s) | |
57 | 57 | let v = split_4C(t, "|") | |
58 | 58 | let w = $Tuple3(v[0], v[1], v[2]) | |
59 | 59 | let x = w._1 | |
60 | 60 | let y = w._2 | |
61 | 61 | let z = w._3 | |
62 | 62 | let A = j(c) | |
63 | 63 | if ((A == A)) | |
64 | 64 | then { | |
65 | 65 | let B = Issue((d + toString(A)), ((f + z) + "\"}"), 1, 0, false) | |
66 | 66 | let C = calculateAssetId(B) | |
67 | 67 | $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)) | |
68 | 68 | } | |
69 | 69 | else throw("Strict value is not equal to itself.") | |
70 | 70 | } | |
71 | 71 | else throw("Not allowed caller") | |
72 | 72 | } | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | ||
76 | 76 | @Callable(r) | |
77 | 77 | func registerCow (s,t) = { | |
78 | 78 | let q = toBase58String(r.callerPublicKey) | |
79 | 79 | if (p(q)) | |
80 | 80 | then { | |
81 | 81 | let u = addressFromStringValue(s) | |
82 | 82 | let v = split_4C(t, t) | |
83 | 83 | let D = $Tuple7(v[0], v[1], v[2], v[3], v[4], v[5], v[6]) | |
84 | 84 | let E = D._1 | |
85 | 85 | let F = D._2 | |
86 | 86 | let G = D._3 | |
87 | 87 | let H = D._4 | |
88 | 88 | let I = D._5 | |
89 | 89 | let J = D._6 | |
90 | 90 | let z = D._7 | |
91 | 91 | let K = (((((((((((((("{\"cowCode\": \"" + E) + "\", \"bornedFarmAddress\": \"") + F) + "\", \"genes\": \"") + G) + "\", \"motherId\": \"") + H) + "\", \"fatherId\": \"") + I) + "\", \"type\": \"") + J) + "\", \"imageLink\": \"") + z) + "\"") | |
92 | 92 | let B = Issue(e, ((K + z) + "\"}"), 1, 0, false) | |
93 | 93 | let C = calculateAssetId(B) | |
94 | 94 | [B, ScriptTransfer(u, 1, C), StringEntry((((("farm_" + s) + "_cow_") + toBase58String(C)) + "_status"), g), StringEntry((("cow_" + toBase58String(C)) + "_owner"), s)] | |
95 | 95 | } | |
96 | 96 | else throw("Not allowed caller") | |
97 | 97 | } | |
98 | 98 | ||
99 | 99 | ||
100 | 100 | ||
101 | 101 | @Callable(r) | |
102 | 102 | func init () = [IntegerEntry(c, 1)] | |
103 | 103 | ||
104 | 104 |
github/deemru/w8io/026f985 29.50 ms ◑