tx · BDcyKXf3MJzSqnzkYmWdgaH6c7qmyMdp9U2hruiE2hMd

3MzcHAM4DcpYKt1ZAMibQmqU69pKQ6qz3i4:  -0.00300000 Waves

2023.03.24 02:01 [2503284] smart account 3MzcHAM4DcpYKt1ZAMibQmqU69pKQ6qz3i4 > SELF 0.00000000 Waves

{ "type": 13, "id": "BDcyKXf3MJzSqnzkYmWdgaH6c7qmyMdp9U2hruiE2hMd", "fee": 300000, "feeAssetId": null, "timestamp": 1679612541323, "version": 2, "chainId": 84, "sender": "3MzcHAM4DcpYKt1ZAMibQmqU69pKQ6qz3i4", "senderPublicKey": "DoAid1WtwHRuonKq6xKkbxijk1QQhXG75vdyuUM7n7NN", "proofs": [ "5fkVdQJdquP5QymKTiM86k7jP8GbN7H1pfCPHacUxBps5tRhGDHdjudzZhRmuH9FCc5iEfB1DjHutLRvTiqFPraV" ], "script": "base64:BgIQCAISBAoCCAgSBAoCCAgSAAwABmFkbWluMQIsQmd4cENtNHd4Ylc4U0tMUEtabmY0S1UyRDZaVTI5b3Y4TWdacmthU0FxcFkABmFkbWluMgIAABZrZXlfZmFybU5mdF9uZXh0TnVtYmVyAhJmYXJtTmZ0X25leHROdW1iZXIADGZhcm1OZnRfbmFtZQIKQ2F0dGxlIE5GVAALY293TmZ0X25hbWUCB0NvdyBORlQAE2Zhcm1OZnRfZGVzY3JpcHRpb24CC3siaW1hZ2UiOiAiAARsaXZlAgZBQ1RJVkUABGRlYWQCCElOQUNUSVZFAAZmYXR0ZW4CBkZBVFRFTgENdHJ5R2V0SW50ZWdlcgEDa2V5BAckbWF0Y2gwCQCaCAIFBHRoaXMFA2tleQMJAAECBQckbWF0Y2gwAgNJbnQEAWIFByRtYXRjaDAFAWIAAAEMdHJ5R2V0U3RyaW5nAQNrZXkEByRtYXRjaDAJAJ0IAgUEdGhpcwUDa2V5AwkAAQIFByRtYXRjaDACBlN0cmluZwQBYQUHJG1hdGNoMAUBYQIAAQVhbGxvdwEJY2FsbGVyUGJrBgMB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5rAgEiBAVpc3N1ZQkAwggFBQtjb3dOZnRfbmFtZQkArAICCQCsAgIFC2Rlc2NyaXB0aW9uBQlpbWFnZUxpbmsCAiJ9AAEAAAcEAmlkCQC4CAEFBWlzc3VlCQDMCAIFBWlzc3VlCQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMFCXJlY2lwaWVudAABBQJpZAkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIJAKwCAgkArAICCQCsAgICBWZhcm1fBQdhZGRyZXNzAgVfY293XwkA2AQBBQJpZAIHX3N0YXR1cwUEbGl2ZQkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIJAKwCAgIEY293XwkA2AQBBQJpZAIGX293bmVyBQdhZGRyZXNzBQNuaWwJAAIBAhJOb3QgYWxsb3dlZCBjYWxsZXIBaQEEaW5pdAAECWNhbGxlclBiawkA2AQBCAUBaQ9jYWxsZXJQdWJsaWNLZXkDCQEFYWxsb3cBBQljYWxsZXJQYmsJAMwIAgkBDEludGVnZXJFbnRyeQIFFmtleV9mYXJtTmZ0X25leHROdW1iZXIAAQUDbmlsCQACAQISTm90IGFsbG93ZWQgY2FsbGVyABuLCJU=", "height": 2503284, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EBat6D5etJp3WYMzddKmtw3GxwvG6EvFehM65S7uf3LP Next: 1GMcigNkntC3S77F8Afko6jPHbzLYYheVw7WWfY8pTB Diff:
OldNewDifferences
3535 }
3636
3737
38-func allow (callerPbk) = if (if ((callerPbk == admin1))
39- then true
40- else (callerPbk == admin2))
41- then true
42- else false
38+func allow (callerPbk) = true
4339
4440
4541 @Callable(i)
4945 then {
5046 let recipient = addressFromStringValue(address)
5147 let p_arr = split_4C(params, "|")
52- let $t014791551 = $Tuple3(p_arr[0], p_arr[1], p_arr[2])
53- let farmName = $t014791551._1
54- let farmLocation = $t014791551._2
55- let imageLink = $t014791551._3
48+ let $t014911563 = $Tuple3(p_arr[0], p_arr[1], p_arr[2])
49+ let farmName = $t014911563._1
50+ let farmLocation = $t014911563._2
51+ let imageLink = $t014911563._3
5652 let nextNum = tryGetInteger(key_farmNft_nextNumber)
5753 if ((nextNum == nextNum))
5854 then {
7470 then {
7571 let recipient = addressFromStringValue(address)
7672 let p_arr = split_4C(params, params)
77- let $t026182767 = $Tuple7(p_arr[0], p_arr[1], p_arr[2], p_arr[3], p_arr[4], p_arr[5], p_arr[6])
78- let cowCode = $t026182767._1
79- let bornedFarmAddress = $t026182767._2
80- let genes = $t026182767._3
81- let motherId = $t026182767._4
82- let fatherId = $t026182767._5
83- let type = $t026182767._6
84- let imageLink = $t026182767._7
73+ let $t026302779 = $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 = $t026302779._1
75+ let bornedFarmAddress = $t026302779._2
76+ let genes = $t026302779._3
77+ let motherId = $t026302779._4
78+ let fatherId = $t026302779._5
79+ let type = $t026302779._6
80+ let imageLink = $t026302779._7
8581 let description = (((((((((((((("{\"cowCode\": \"" + cowCode) + "\", \"bornedFarmAddress\": \"") + bornedFarmAddress) + "\", \"genes\": \"") + genes) + "\", \"motherId\": \"") + motherId) + "\", \"fatherId\": \"") + fatherId) + "\", \"type\": \"") + type) + "\", \"imageLink\": \"") + imageLink) + "\"")
8682 let issue = Issue(cowNft_name, ((description + imageLink) + "\"}"), 1, 0, false)
8783 let id = calculateAssetId(issue)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let admin1 = "BgxpCm4wxbW8SKLPKZnf4KU2D6ZU29ov8MgZrkaSAqpY"
55
66 let admin2 = ""
77
88 let key_farmNft_nextNumber = "farmNft_nextNumber"
99
1010 let farmNft_name = "Cattle NFT"
1111
1212 let cowNft_name = "Cow NFT"
1313
1414 let farmNft_description = "{\"image\": \""
1515
1616 let live = "ACTIVE"
1717
1818 let dead = "INACTIVE"
1919
2020 let fatten = "FATTEN"
2121
2222 func tryGetInteger (key) = match getInteger(this, key) {
2323 case b: Int =>
2424 b
2525 case _ =>
2626 0
2727 }
2828
2929
3030 func tryGetString (key) = match getString(this, key) {
3131 case a: String =>
3232 a
3333 case _ =>
3434 ""
3535 }
3636
3737
38-func allow (callerPbk) = if (if ((callerPbk == admin1))
39- then true
40- else (callerPbk == admin2))
41- then true
42- else false
38+func allow (callerPbk) = true
4339
4440
4541 @Callable(i)
4642 func registerFarm (address,params) = {
4743 let callerPbk = toBase58String(i.callerPublicKey)
4844 if (allow(callerPbk))
4945 then {
5046 let recipient = addressFromStringValue(address)
5147 let p_arr = split_4C(params, "|")
52- let $t014791551 = $Tuple3(p_arr[0], p_arr[1], p_arr[2])
53- let farmName = $t014791551._1
54- let farmLocation = $t014791551._2
55- let imageLink = $t014791551._3
48+ let $t014911563 = $Tuple3(p_arr[0], p_arr[1], p_arr[2])
49+ let farmName = $t014911563._1
50+ let farmLocation = $t014911563._2
51+ let imageLink = $t014911563._3
5652 let nextNum = tryGetInteger(key_farmNft_nextNumber)
5753 if ((nextNum == nextNum))
5854 then {
5955 let issue = Issue((farmNft_name + toString(nextNum)), ((farmNft_description + imageLink) + "\"}"), 1, 0, false)
6056 let id = calculateAssetId(issue)
6157 $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))
6258 }
6359 else throw("Strict value is not equal to itself.")
6460 }
6561 else throw("Not allowed caller")
6662 }
6763
6864
6965
7066 @Callable(i)
7167 func registerCow (address,params) = {
7268 let callerPbk = toBase58String(i.callerPublicKey)
7369 if (allow(callerPbk))
7470 then {
7571 let recipient = addressFromStringValue(address)
7672 let p_arr = split_4C(params, params)
77- let $t026182767 = $Tuple7(p_arr[0], p_arr[1], p_arr[2], p_arr[3], p_arr[4], p_arr[5], p_arr[6])
78- let cowCode = $t026182767._1
79- let bornedFarmAddress = $t026182767._2
80- let genes = $t026182767._3
81- let motherId = $t026182767._4
82- let fatherId = $t026182767._5
83- let type = $t026182767._6
84- let imageLink = $t026182767._7
73+ let $t026302779 = $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 = $t026302779._1
75+ let bornedFarmAddress = $t026302779._2
76+ let genes = $t026302779._3
77+ let motherId = $t026302779._4
78+ let fatherId = $t026302779._5
79+ let type = $t026302779._6
80+ let imageLink = $t026302779._7
8581 let description = (((((((((((((("{\"cowCode\": \"" + cowCode) + "\", \"bornedFarmAddress\": \"") + bornedFarmAddress) + "\", \"genes\": \"") + genes) + "\", \"motherId\": \"") + motherId) + "\", \"fatherId\": \"") + fatherId) + "\", \"type\": \"") + type) + "\", \"imageLink\": \"") + imageLink) + "\"")
8682 let issue = Issue(cowNft_name, ((description + imageLink) + "\"}"), 1, 0, false)
8783 let id = calculateAssetId(issue)
8884 [issue, ScriptTransfer(recipient, 1, id), StringEntry((((("farm_" + address) + "_cow_") + toBase58String(id)) + "_status"), live), StringEntry((("cow_" + toBase58String(id)) + "_owner"), address)]
8985 }
9086 else throw("Not allowed caller")
9187 }
9288
9389
9490
9591 @Callable(i)
9692 func init () = {
9793 let callerPbk = toBase58String(i.callerPublicKey)
9894 if (allow(callerPbk))
9995 then [IntegerEntry(key_farmNft_nextNumber, 1)]
10096 else throw("Not allowed caller")
10197 }
10298
10399

github/deemru/w8io/026f985 
34.52 ms