tx · FLcUFkx5m5QCMNuakGjpN8qk4QYG7xkYJTMRKYJCkLjK

3MzcHAM4DcpYKt1ZAMibQmqU69pKQ6qz3i4:  -0.00300000 Waves

2023.03.25 00:38 [2504649] smart account 3MzcHAM4DcpYKt1ZAMibQmqU69pKQ6qz3i4 > SELF 0.00000000 Waves

{ "type": 13, "id": "FLcUFkx5m5QCMNuakGjpN8qk4QYG7xkYJTMRKYJCkLjK", "fee": 300000, "feeAssetId": null, "timestamp": 1679693951399, "version": 2, "chainId": 84, "sender": "3MzcHAM4DcpYKt1ZAMibQmqU69pKQ6qz3i4", "senderPublicKey": "DoAid1WtwHRuonKq6xKkbxijk1QQhXG75vdyuUM7n7NN", "proofs": [ "2aPgRZGty4aawuv5JQuDk4534s5WGFhesMLDG7LvJhjwToLGSiMMLriRVM8YYBnTuBapFTVVUY94JYvfcSmyzg4x" ], "script": "base64:BgIQCAISBAoCCAgSBAoCCAgSAAwABmFkbWluMQIsRjF5akRkaG9XY3RHUDl5bUdyQmtUZE5IbUVmUHF2TXRpQ0ZYbU43aVhOZ3IABmFkbWluMgIAABZrZXlfZmFybU5mdF9uZXh0TnVtYmVyAhJmYXJtTmZ0X25leHROdW1iZXIADGZhcm1OZnRfbmFtZQILQ2F0dGxlIE5GVCAAC2Nvd05mdF9uYW1lAgdDb3cgTkZUABNmYXJtTmZ0X2Rlc2NyaXB0aW9uAjd7ImRlc2NyaXB0aW9uIjogIk5GVCBmb3IgYXNzb3RpYXRlZCBjYXR0bGUiLCAiaW1hZ2UiOiAiAARsaXZlAgZBQ1RJVkUABGRlYWQCCElOQUNUSVZFAAZmYXR0ZW4CBkZBVFRFTgENdHJ5R2V0SW50ZWdlcgEDa2V5BAckbWF0Y2gwCQCaCAIFBHRoaXMFA2tleQMJAAECBQckbWF0Y2gwAgNJbnQEAWIFByRtYXRjaDAFAWIAAAEMdHJ5R2V0U3RyaW5nAQNrZXkEByRtYXRjaDAJAJ0IAgUEdGhpcwUDa2V5AwkAAQIFByRt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cm1BZGRyZXNzAg0iLCAiZ2VuZXMiOiAiBQVnZW5lcwIQIiwgIm1vdGhlcklkIjogIgUIbW90aGVySWQCECIsICJmYXRoZXJJZCI6ICIFCGZhdGhlcklkAgwiLCAidHlwZSI6ICIFBHR5cGUCESIsICJpbWFnZUxpbmsiOiAiBQlpbWFnZUxpbmsCASIEBWlzc3VlCQDCCAUFC2Nvd05mdF9uYW1lCQCsAgIJAKwCAgULZGVzY3JpcHRpb24FCWltYWdlTGluawICIn0AAQAABwQCaWQJALgIAQUFaXNzdWUJAMwIAgUFaXNzdWUJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwUJcmVjaXBpZW50AAEFAmlkCQDMCAIJAQtTdHJpbmdFbnRyeQIJAKwCAgkArAICCQCsAgIJAKwCAgIFZmFybV8FB2FkZHJlc3MCBV9jb3dfCQDYBAEFAmlkAgdfc3RhdHVzBQRsaXZlCQDMCAIJAQtTdHJpbmdFbnRyeQIJAKwCAgkArAICAgRjb3dfCQDYBAEFAmlkAgZfb3duZXIFB2FkZHJlc3MFA25pbAkAAgECEk5vdCBhbGxvd2VkIGNhbGxlcgFpAQRpbml0AAQJY2FsbGVyUGJrCQDYBAEIBQFpD2NhbGxlclB1YmxpY0tleQMJAQVhbGxvdwEFCWNhbGxlclBiawQHbmV4dE51bQkBDXRyeUdldEludGVnZXIBBRZrZXlfZmFybU5mdF9uZXh0TnVtYmVyAwkBAiE9AgUHbmV4dE51bQAACQACAQIfQ29udHJhY3QgaXMgYWxyZWFkeSBpbml0aWFsaXplZAkAzAgCCQEMSW50ZWdlckVudHJ5AgUWa2V5X2Zhcm1OZnRfbmV4dE51bWJlcgABBQNuaWwJAAIBAhJOb3QgYWxsb3dlZCBjYWxsZXIA3eU6Fw==", "height": 2504649, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 55XzZ3cHasUTGynTP6GzynVodsv93xCBiGZ58xaVVn1b Next: 4Bs7nNk5WQeViKPhhkbE7wHgs8i3oEDffzmuTzj7bm9f Diff:
OldNewDifferences
103103 let q = toBase58String(r.callerPublicKey)
104104 if (p(q))
105105 then {
106- let A = j("key_farmNft_nextNumber")
106+ let A = j(c)
107107 if ((A != 0))
108108 then throw("Contract is already initialized")
109109 else [IntegerEntry(c, 1)]
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "F1yjDdhoWctGP9ymGrBkTdNHmEfPqvMtiCFXmN7iXNgr"
55
66 let b = ""
77
88 let c = "farmNft_nextNumber"
99
1010 let d = "Cattle NFT "
1111
1212 let e = "Cow NFT"
1313
1414 let f = "{\"description\": \"NFT for assotiated cattle\", \"image\": \""
1515
1616 let g = "ACTIVE"
1717
1818 let h = "INACTIVE"
1919
2020 let i = "FATTEN"
2121
2222 func j (k) = {
2323 let l = getInteger(this, k)
2424 if ($isInstanceOf(l, "Int"))
2525 then {
2626 let m = l
2727 m
2828 }
2929 else 0
3030 }
3131
3232
3333 func n (k) = {
3434 let l = getString(this, k)
3535 if ($isInstanceOf(l, "String"))
3636 then {
3737 let o = l
3838 o
3939 }
4040 else ""
4141 }
4242
4343
4444 func p (q) = if (if ((q == a))
4545 then true
4646 else (q == b))
4747 then true
4848 else false
4949
5050
5151 @Callable(r)
5252 func registerFarm (s,t) = {
5353 let q = toBase58String(r.callerPublicKey)
5454 if (p(q))
5555 then {
5656 let u = addressFromStringValue(s)
5757 let v = split_4C(t, "|")
5858 let w = $Tuple3(v[0], v[1], v[2])
5959 let x = w._1
6060 let y = w._2
6161 let z = w._3
6262 let A = j(c)
6363 if ((A == A))
6464 then {
6565 let B = Issue((d + toString(A)), ((f + z) + "\"}"), 1, 0, false)
6666 let C = calculateAssetId(B)
6767 $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))
6868 }
6969 else throw("Strict value is not equal to itself.")
7070 }
7171 else throw("Not allowed caller")
7272 }
7373
7474
7575
7676 @Callable(r)
7777 func registerCow (s,t) = {
7878 let q = toBase58String(r.callerPublicKey)
7979 if (p(q))
8080 then {
8181 let u = addressFromStringValue(s)
8282 let v = split_4C(t, t)
8383 let D = $Tuple7(v[0], v[1], v[2], v[3], v[4], v[5], v[6])
8484 let E = D._1
8585 let F = D._2
8686 let G = D._3
8787 let H = D._4
8888 let I = D._5
8989 let J = D._6
9090 let z = D._7
9191 let K = (((((((((((((("{\"cowCode\": \"" + E) + "\", \"bornedFarmAddress\": \"") + F) + "\", \"genes\": \"") + G) + "\", \"motherId\": \"") + H) + "\", \"fatherId\": \"") + I) + "\", \"type\": \"") + J) + "\", \"imageLink\": \"") + z) + "\"")
9292 let B = Issue(e, ((K + z) + "\"}"), 1, 0, false)
9393 let C = calculateAssetId(B)
9494 [B, ScriptTransfer(u, 1, C), StringEntry((((("farm_" + s) + "_cow_") + toBase58String(C)) + "_status"), g), StringEntry((("cow_" + toBase58String(C)) + "_owner"), s)]
9595 }
9696 else throw("Not allowed caller")
9797 }
9898
9999
100100
101101 @Callable(r)
102102 func init () = {
103103 let q = toBase58String(r.callerPublicKey)
104104 if (p(q))
105105 then {
106- let A = j("key_farmNft_nextNumber")
106+ let A = j(c)
107107 if ((A != 0))
108108 then throw("Contract is already initialized")
109109 else [IntegerEntry(c, 1)]
110110 }
111111 else throw("Not allowed caller")
112112 }
113113
114114

github/deemru/w8io/026f985 
27.82 ms