tx · 6VwaZBNge2Ak9cAyudwShLrkKDHLhDhWW9kkpma6qomA

3MzcHAM4DcpYKt1ZAMibQmqU69pKQ6qz3i4:  -0.00300000 Waves

2023.03.26 00:30 [2506065] smart account 3MzcHAM4DcpYKt1ZAMibQmqU69pKQ6qz3i4 > SELF 0.00000000 Waves

{ "type": 13, "id": "6VwaZBNge2Ak9cAyudwShLrkKDHLhDhWW9kkpma6qomA", "fee": 300000, "feeAssetId": null, "timestamp": 1679779839754, "version": 2, "chainId": 84, "sender": "3MzcHAM4DcpYKt1ZAMibQmqU69pKQ6qz3i4", "senderPublicKey": "DoAid1WtwHRuonKq6xKkbxijk1QQhXG75vdyuUM7n7NN", "proofs": [ "VfJR8sPpQ6PpXGJPAgfSC8AZJDqzcwHxYVBxMqqa7bdPX3xm3arLq54z1maQBJiy5MLXGm4UqrKf83zmmrtEsvn" ], "script": "base64:BgIOCAISBAoCCAgSABIAEgASAAZhZG1pbjECLEYxeWpEZGhvV2N0R1A5eW1HckJrVGROSG1FZlBxdk10aUNGWG1ON2lYTmdyAAZhZG1pbjICAAAKcHV6emxlTWludAIjM1BGUWpqRE1pWktRWmR1NUpxVEhEN0h3Z1NYeXA5Unc5QnkAFmtleV9mYXJtTmZ0X25leHROdW1iZXICEmZhcm1OZnRfbmV4dE51bWJlcgAQa2V5X2Zhcm1OZnRfbmFtZQIMZmFybU5mdF9uYW1lABdrZXlfZmFybU5mdF9kZXNjcmlwdGlvbgITZmFybU5mdF9kZXNjcmlwdGlvbgAWa2V5X2Zhcm1OZnRfY29sbGVjdGlvbgISZmFybU5mdF9jb2xsZWN0aW9uABFrZXlfZmFybU5mdF9pbWFnZQINZmFybU5mdF9pbWFnZQAPa2V5X2Nvd05mdF9uYW1lAgtjb3dOZnRfbmFtZQAWa2V5X2Nvd05mdF9kZXNjcmlwdGlvbgISY293TmZ0X2Rlc2NyaXB0aW9uABVrZXlfY293TmZ0X2NvbGxlY3Rpb24CEWNvd05mdF9jb2xsZWN0aW9uABB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HJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4JAAIBAhJOb3QgYWxsb3dlZCBjYWxsZXIBaQEEdGVzdAAEAXIKAAFACQD8BwQFBHRoaXMCBG1pbnQFA25pbAUDbmlsAwkAAQIFAUACBlN0cmluZwUBQAkAAgEJAKwCAgkAAwEFAUACGyBjb3VsZG4ndCBiZSBjYXN0IHRvIFN0cmluZwMJAAACBQFyBQFyAwYJAAIBBQFyBQNuaWwJAAIBAiRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4BaQEEbWludAAJAJQKAgUDbmlsACoBaQEEaW5pdAAECWNhbGxlclBiawkA2AQBCAUBaQ9jYWxsZXJQdWJsaWNLZXkDCQEFYWxsb3cBBQljYWxsZXJQYmsEB25leHROdW0JAQ10cnlHZXRJbnRlZ2VyAQUWa2V5X2Zhcm1OZnRfbmV4dE51bWJlcgMJAQIhPQIFB25leHROdW0AAAkAAgECH0NvbnRyYWN0IGlzIGFscmVhZHkgaW5pdGlhbGl6ZWQJAMwIAgkBDEludGVnZXJFbnRyeQIFFmtleV9mYXJtTmZ0X25leHROdW1iZXIAAQUDbmlsCQACAQISTm90IGFsbG93ZWQgY2FsbGVyAL5ujuw=", "height": 2506065, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CQkYnqzadwS3gXS8PtokDHfb6iYYGgtffTH5fKV81C2R Next: DaAdLE1piJi4mhdZybbk3vALHm1owdBuyLEW5d9mh1V7 Diff:
OldNewDifferences
5959 let callerPbk = toBase58String(i.callerPublicKey)
6060 if (allow(callerPbk))
6161 then {
62- let recipient = addressFromStringValue(address)
62+ let recipient = addressFromStringValue("3MwtjV2Q62CNSqKwM3Hzspy6DdwrvxE8P9F")
6363 let p_arr = split_4C(params, "|")
64- let $t017441795 = $Tuple2(p_arr[0], p_arr[1])
65- let farmName = $t017441795._1
66- let farmLocation = $t017441795._2
64+ let $t017741825 = $Tuple2(p_arr[0], p_arr[1])
65+ let farmName = $t017741825._1
66+ let farmLocation = $t017741825._2
6767 let nextNum = tryGetInteger(key_farmNft_nextNumber)
6868 if ((nextNum == nextNum))
6969 then {
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let admin1 = "F1yjDdhoWctGP9ymGrBkTdNHmEfPqvMtiCFXmN7iXNgr"
55
66 let admin2 = ""
77
88 let puzzleMint = "3PFQjjDMiZKQZdu5JqTHD7HwgSXyp9Rw9By"
99
1010 let key_farmNft_nextNumber = "farmNft_nextNumber"
1111
1212 let key_farmNft_name = "farmNft_name"
1313
1414 let key_farmNft_description = "farmNft_description"
1515
1616 let key_farmNft_collection = "farmNft_collection"
1717
1818 let key_farmNft_image = "farmNft_image"
1919
2020 let key_cowNft_name = "cowNft_name"
2121
2222 let key_cowNft_description = "cowNft_description"
2323
2424 let key_cowNft_collection = "cowNft_collection"
2525
2626 let key_cowNft_image = "cowNft_image"
2727
2828 let live = "ACTIVE"
2929
3030 let dead = "INACTIVE"
3131
3232 let fatten = "FATTEN"
3333
3434 func tryGetInteger (key) = match getInteger(this, key) {
3535 case b: Int =>
3636 b
3737 case _ =>
3838 0
3939 }
4040
4141
4242 func tryGetString (key) = match getString(this, key) {
4343 case a: String =>
4444 a
4545 case _ =>
4646 ""
4747 }
4848
4949
5050 func allow (callerPbk) = if (if ((callerPbk == admin1))
5151 then true
5252 else (callerPbk == admin2))
5353 then true
5454 else false
5555
5656
5757 @Callable(i)
5858 func registerFarm (address,params) = {
5959 let callerPbk = toBase58String(i.callerPublicKey)
6060 if (allow(callerPbk))
6161 then {
62- let recipient = addressFromStringValue(address)
62+ let recipient = addressFromStringValue("3MwtjV2Q62CNSqKwM3Hzspy6DdwrvxE8P9F")
6363 let p_arr = split_4C(params, "|")
64- let $t017441795 = $Tuple2(p_arr[0], p_arr[1])
65- let farmName = $t017441795._1
66- let farmLocation = $t017441795._2
64+ let $t017741825 = $Tuple2(p_arr[0], p_arr[1])
65+ let farmName = $t017741825._1
66+ let farmLocation = $t017741825._2
6767 let nextNum = tryGetInteger(key_farmNft_nextNumber)
6868 if ((nextNum == nextNum))
6969 then {
7070 let farmNftName = (tryGetString(key_farmNft_name) + toString(nextNum))
7171 let farmNftDescription = tryGetString(key_farmNft_description)
7272 let farmNftCollection = tryGetString(key_farmNft_collection)
7373 let farmNftImage = tryGetString(key_farmNft_image)
7474 let assetId = {
7575 let @ = invoke(addressFromStringValue(puzzleMint), "mint", [farmNftName, farmNftDescription, farmNftCollection, farmNftImage, farmNftImage, 1, "", "", ""], nil)
7676 if ($isInstanceOf(@, "String"))
7777 then @
7878 else throw(($getType(@) + " couldn't be cast to String"))
7979 }
8080 if ((assetId == assetId))
8181 then $Tuple2([ScriptTransfer(recipient, 1, fromBase58String(assetId)), IntegerEntry(key_farmNft_nextNumber, (nextNum + 1)), BooleanEntry((("farm_" + address) + "_status"), true), StringEntry((("farm_" + address) + "_name"), farmName), StringEntry((("farm_" + address) + "_location"), farmLocation)], $Tuple3(nextNum, farmName, farmLocation))
8282 else throw("Strict value is not equal to itself.")
8383 }
8484 else throw("Strict value is not equal to itself.")
8585 }
8686 else throw("Not allowed caller")
8787 }
8888
8989
9090
9191 @Callable(i)
9292 func test () = {
9393 let r = {
9494 let @ = invoke(this, "mint", nil, nil)
9595 if ($isInstanceOf(@, "String"))
9696 then @
9797 else throw(($getType(@) + " couldn't be cast to String"))
9898 }
9999 if ((r == r))
100100 then if (true)
101101 then throw(r)
102102 else nil
103103 else throw("Strict value is not equal to itself.")
104104 }
105105
106106
107107
108108 @Callable(i)
109109 func mint () = $Tuple2(nil, 42)
110110
111111
112112
113113 @Callable(i)
114114 func init () = {
115115 let callerPbk = toBase58String(i.callerPublicKey)
116116 if (allow(callerPbk))
117117 then {
118118 let nextNum = tryGetInteger(key_farmNft_nextNumber)
119119 if ((nextNum != 0))
120120 then throw("Contract is already initialized")
121121 else [IntegerEntry(key_farmNft_nextNumber, 1)]
122122 }
123123 else throw("Not allowed caller")
124124 }
125125
126126

github/deemru/w8io/026f985 
27.77 ms