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 key_farmNft_nextNumber = "farmNft_nextNumber" | |
9 | 9 | ||
10 | - | let farmNft_name = "Cattle NFT" | |
10 | + | let farmNft_name = "Cattle NFT " | |
11 | 11 | ||
12 | 12 | let cowNft_name = "Cow NFT" | |
13 | 13 | ||
45 | 45 | then { | |
46 | 46 | let recipient = addressFromStringValue(address) | |
47 | 47 | let p_arr = split_4C(params, "|") | |
48 | - | let $ | |
49 | - | let farmName = $ | |
50 | - | let farmLocation = $ | |
51 | - | let imageLink = $ | |
48 | + | let $t014921564 = $Tuple3(p_arr[0], p_arr[1], p_arr[2]) | |
49 | + | let farmName = $t014921564._1 | |
50 | + | let farmLocation = $t014921564._2 | |
51 | + | let imageLink = $t014921564._3 | |
52 | 52 | let nextNum = tryGetInteger(key_farmNft_nextNumber) | |
53 | 53 | if ((nextNum == nextNum)) | |
54 | 54 | then { | |
55 | 55 | let issue = Issue((farmNft_name + toString(nextNum)), ((farmNft_description + imageLink) + "\"}"), 1, 0, false) | |
56 | 56 | let id = calculateAssetId(issue) | |
57 | - | $Tuple2([issue, ScriptTransfer(recipient, 1, id), IntegerEntry(key_farmNft_nextNumber, (nextNum + 1)), StringEntry((("farm_" + address) + "_name"), farmName), StringEntry((("farm_" + address) + "_location"), farmLocation)], $Tuple4(nextNum, farmName, farmLocation, imageLink)) | |
57 | + | $Tuple2([issue, ScriptTransfer(recipient, 1, id), IntegerEntry(key_farmNft_nextNumber, (nextNum + 1)), BooleanEntry((("farm_" + address) + "_status"), true), StringEntry((("farm_" + address) + "_name"), farmName), StringEntry((("farm_" + address) + "_location"), farmLocation)], $Tuple4(nextNum, farmName, farmLocation, imageLink)) | |
58 | 58 | } | |
59 | 59 | else throw("Strict value is not equal to itself.") | |
60 | 60 | } | |
70 | 70 | then { | |
71 | 71 | let recipient = addressFromStringValue(address) | |
72 | 72 | let p_arr = split_4C(params, params) | |
73 | - | let $ | |
74 | - | let cowCode = $ | |
75 | - | let bornedFarmAddress = $ | |
76 | - | let genes = $ | |
77 | - | let motherId = $ | |
78 | - | let fatherId = $ | |
79 | - | let type = $ | |
80 | - | let imageLink = $ | |
73 | + | let $t026952844 = $Tuple7(p_arr[0], p_arr[1], p_arr[2], p_arr[3], p_arr[4], p_arr[5], p_arr[6]) | |
74 | + | let cowCode = $t026952844._1 | |
75 | + | let bornedFarmAddress = $t026952844._2 | |
76 | + | let genes = $t026952844._3 | |
77 | + | let motherId = $t026952844._4 | |
78 | + | let fatherId = $t026952844._5 | |
79 | + | let type = $t026952844._6 | |
80 | + | let imageLink = $t026952844._7 | |
81 | 81 | let description = (((((((((((((("{\"cowCode\": \"" + cowCode) + "\", \"bornedFarmAddress\": \"") + bornedFarmAddress) + "\", \"genes\": \"") + genes) + "\", \"motherId\": \"") + motherId) + "\", \"fatherId\": \"") + fatherId) + "\", \"type\": \"") + type) + "\", \"imageLink\": \"") + imageLink) + "\"") | |
82 | 82 | let issue = Issue(cowNft_name, ((description + imageLink) + "\"}"), 1, 0, false) | |
83 | 83 | let id = calculateAssetId(issue) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let admin1 = "BgxpCm4wxbW8SKLPKZnf4KU2D6ZU29ov8MgZrkaSAqpY" | |
5 | 5 | ||
6 | 6 | let admin2 = "" | |
7 | 7 | ||
8 | 8 | let key_farmNft_nextNumber = "farmNft_nextNumber" | |
9 | 9 | ||
10 | - | let farmNft_name = "Cattle NFT" | |
10 | + | let farmNft_name = "Cattle NFT " | |
11 | 11 | ||
12 | 12 | let cowNft_name = "Cow NFT" | |
13 | 13 | ||
14 | 14 | let farmNft_description = "{\"image\": \"" | |
15 | 15 | ||
16 | 16 | let live = "ACTIVE" | |
17 | 17 | ||
18 | 18 | let dead = "INACTIVE" | |
19 | 19 | ||
20 | 20 | let fatten = "FATTEN" | |
21 | 21 | ||
22 | 22 | func tryGetInteger (key) = match getInteger(this, key) { | |
23 | 23 | case b: Int => | |
24 | 24 | b | |
25 | 25 | case _ => | |
26 | 26 | 0 | |
27 | 27 | } | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | func tryGetString (key) = match getString(this, key) { | |
31 | 31 | case a: String => | |
32 | 32 | a | |
33 | 33 | case _ => | |
34 | 34 | "" | |
35 | 35 | } | |
36 | 36 | ||
37 | 37 | ||
38 | 38 | func allow (callerPbk) = true | |
39 | 39 | ||
40 | 40 | ||
41 | 41 | @Callable(i) | |
42 | 42 | func registerFarm (address,params) = { | |
43 | 43 | let callerPbk = toBase58String(i.callerPublicKey) | |
44 | 44 | if (allow(callerPbk)) | |
45 | 45 | then { | |
46 | 46 | let recipient = addressFromStringValue(address) | |
47 | 47 | let p_arr = split_4C(params, "|") | |
48 | - | let $ | |
49 | - | let farmName = $ | |
50 | - | let farmLocation = $ | |
51 | - | let imageLink = $ | |
48 | + | let $t014921564 = $Tuple3(p_arr[0], p_arr[1], p_arr[2]) | |
49 | + | let farmName = $t014921564._1 | |
50 | + | let farmLocation = $t014921564._2 | |
51 | + | let imageLink = $t014921564._3 | |
52 | 52 | let nextNum = tryGetInteger(key_farmNft_nextNumber) | |
53 | 53 | if ((nextNum == nextNum)) | |
54 | 54 | then { | |
55 | 55 | let issue = Issue((farmNft_name + toString(nextNum)), ((farmNft_description + imageLink) + "\"}"), 1, 0, false) | |
56 | 56 | let id = calculateAssetId(issue) | |
57 | - | $Tuple2([issue, ScriptTransfer(recipient, 1, id), IntegerEntry(key_farmNft_nextNumber, (nextNum + 1)), StringEntry((("farm_" + address) + "_name"), farmName), StringEntry((("farm_" + address) + "_location"), farmLocation)], $Tuple4(nextNum, farmName, farmLocation, imageLink)) | |
57 | + | $Tuple2([issue, ScriptTransfer(recipient, 1, id), IntegerEntry(key_farmNft_nextNumber, (nextNum + 1)), BooleanEntry((("farm_" + address) + "_status"), true), StringEntry((("farm_" + address) + "_name"), farmName), StringEntry((("farm_" + address) + "_location"), farmLocation)], $Tuple4(nextNum, farmName, farmLocation, imageLink)) | |
58 | 58 | } | |
59 | 59 | else throw("Strict value is not equal to itself.") | |
60 | 60 | } | |
61 | 61 | else throw("Not allowed caller") | |
62 | 62 | } | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | ||
66 | 66 | @Callable(i) | |
67 | 67 | func registerCow (address,params) = { | |
68 | 68 | let callerPbk = toBase58String(i.callerPublicKey) | |
69 | 69 | if (allow(callerPbk)) | |
70 | 70 | then { | |
71 | 71 | let recipient = addressFromStringValue(address) | |
72 | 72 | let p_arr = split_4C(params, params) | |
73 | - | let $ | |
74 | - | let cowCode = $ | |
75 | - | let bornedFarmAddress = $ | |
76 | - | let genes = $ | |
77 | - | let motherId = $ | |
78 | - | let fatherId = $ | |
79 | - | let type = $ | |
80 | - | let imageLink = $ | |
73 | + | let $t026952844 = $Tuple7(p_arr[0], p_arr[1], p_arr[2], p_arr[3], p_arr[4], p_arr[5], p_arr[6]) | |
74 | + | let cowCode = $t026952844._1 | |
75 | + | let bornedFarmAddress = $t026952844._2 | |
76 | + | let genes = $t026952844._3 | |
77 | + | let motherId = $t026952844._4 | |
78 | + | let fatherId = $t026952844._5 | |
79 | + | let type = $t026952844._6 | |
80 | + | let imageLink = $t026952844._7 | |
81 | 81 | let description = (((((((((((((("{\"cowCode\": \"" + cowCode) + "\", \"bornedFarmAddress\": \"") + bornedFarmAddress) + "\", \"genes\": \"") + genes) + "\", \"motherId\": \"") + motherId) + "\", \"fatherId\": \"") + fatherId) + "\", \"type\": \"") + type) + "\", \"imageLink\": \"") + imageLink) + "\"") | |
82 | 82 | let issue = Issue(cowNft_name, ((description + imageLink) + "\"}"), 1, 0, false) | |
83 | 83 | let id = calculateAssetId(issue) | |
84 | 84 | [issue, ScriptTransfer(recipient, 1, id), StringEntry((((("farm_" + address) + "_cow_") + toBase58String(id)) + "_status"), live), StringEntry((("cow_" + toBase58String(id)) + "_owner"), address)] | |
85 | 85 | } | |
86 | 86 | else throw("Not allowed caller") | |
87 | 87 | } | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | ||
91 | 91 | @Callable(i) | |
92 | 92 | func init () = { | |
93 | 93 | let callerPbk = toBase58String(i.callerPublicKey) | |
94 | 94 | if (allow(callerPbk)) | |
95 | 95 | then [IntegerEntry(key_farmNft_nextNumber, 1)] | |
96 | 96 | else throw("Not allowed caller") | |
97 | 97 | } | |
98 | 98 | ||
99 | 99 |
github/deemru/w8io/026f985 34.03 ms ◑