tx · DaAdLE1piJi4mhdZybbk3vALHm1owdBuyLEW5d9mh1V7

3MzcHAM4DcpYKt1ZAMibQmqU69pKQ6qz3i4:  -0.00200000 Waves

2023.03.26 00:39 [2506075] smart account 3MzcHAM4DcpYKt1ZAMibQmqU69pKQ6qz3i4 > SELF 0.00000000 Waves

{ "type": 13, "id": "DaAdLE1piJi4mhdZybbk3vALHm1owdBuyLEW5d9mh1V7", "fee": 200000, "feeAssetId": null, "timestamp": 1679780393154, "version": 2, "chainId": 84, "sender": "3MzcHAM4DcpYKt1ZAMibQmqU69pKQ6qz3i4", "senderPublicKey": "DoAid1WtwHRuonKq6xKkbxijk1QQhXG75vdyuUM7n7NN", "proofs": [ "2pqEzAnT2YuAN3os7hbeTeFnNGdoWJnLANJ1ZUAjFMJSjaZjTcWFy1bWH2CgVrChgFNiuPGHUu9PuTUfikb68FhT" ], "script": "base64:BgIKCAISBAoCCAgSABIABmFkbWluMQIsRjF5akRkaG9XY3RHUDl5bUdyQmtUZE5IbUVmUHF2TXRpQ0ZYbU43aVhOZ3IABmFkbWluMgIAAApwdXp6bGVNaW50AiMzUEZRampETWlaS1FaZHU1SnFUSEQ3SHdnU1h5cDlSdzlCeQAWa2V5X2Zhcm1OZnRfbmV4dE51bWJlcgISZmFybU5mdF9uZXh0TnVtYmVyABBrZXlfZmFybU5mdF9uYW1lAgxmYXJtTmZ0X25hbWUAF2tleV9mYXJtTmZ0X2Rlc2NyaXB0aW9uAhNmYXJtTmZ0X2Rlc2NyaXB0aW9uABZrZXlfZmFybU5mdF9jb2xsZWN0aW9uAhJmYXJtTmZ0X2NvbGxlY3Rpb24AEWtleV9mYXJtTmZ0X2ltYWdlAg1mYXJtTmZ0X2ltYWdlAA9rZXlfY293TmZ0X25hbWUCC2Nvd05mdF9uYW1lABZrZXlfY293TmZ0X2Rlc2NyaXB0aW9uAhJjb3dOZnRfZGVzY3JpcHRpb24AFWtleV9jb3dOZnRfY29sbGVjdGlvbgIRY293TmZ0X2NvbGxlY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U5mdERlc2NyaXB0aW9uAAEAAAcEAmlkCQC4CAEFBWlzc3VlCQCUCgIJAMwIAgUFaXNzdWUJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwUJcmVjaXBpZW50AAEFAmlkCQDMCAIJAQxJbnRlZ2VyRW50cnkCBRZrZXlfZmFybU5mdF9uZXh0TnVtYmVyCQBkAgUHbmV4dE51bQABCQDMCAIJAQxCb29sZWFuRW50cnkCCQCsAgIJAKwCAgIFZmFybV8FB2FkZHJlc3MCB19zdGF0dXMGCQDMCAIJAQtTdHJpbmdFbnRyeQIJAKwCAgkArAICAgVmYXJtXwUHYWRkcmVzcwIFX25hbWUFCGZhcm1OYW1lCQDMCAIJAQtTdHJpbmdFbnRyeQIJAKwCAgkArAICAgVmYXJtXwUHYWRkcmVzcwIJX2xvY2F0aW9uBQxmYXJtTG9jYXRpb24FA25pbAkAlQoDBQduZXh0TnVtBQhmYXJtTmFtZQUMZmFybUxvY2F0aW9uCQACAQIkU3RyaWN0IHZhbHVlIGlzIG5vdCBlcXVhbCB0byBpdHNlbGYuCQACAQISTm90IGFsbG93ZWQgY2FsbGVyAWkBBGluaXQABAljYWxsZXJQYmsJANgEAQgFAWkPY2FsbGVyUHVibGljS2V5AwkBBWFsbG93AQUJY2FsbGVyUGJrBAduZXh0TnVtCQENdHJ5R2V0SW50ZWdlcgEFFmtleV9mYXJtTmZ0X25leHROdW1iZXIDCQECIT0CBQduZXh0TnVtAAAJAAIBAh9Db250cmFjdCBpcyBhbHJlYWR5IGluaXRpYWxpemVkCQDMCAIJAQxJbnRlZ2VyRW50cnkCBRZrZXlfZmFybU5mdF9uZXh0TnVtYmVyAAEFA25pbAkAAgECEk5vdCBhbGxvd2VkIGNhbGxlcgBqy5tG", "height": 2506075, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6VwaZBNge2Ak9cAyudwShLrkKDHLhDhWW9kkpma6qomA Next: 8mvjCJpdqrjTbXqXWgADL3k8PhTEu1FiiHkcPWyUMJk9 Diff:
OldNewDifferences
5959 let callerPbk = toBase58String(i.callerPublicKey)
6060 if (allow(callerPbk))
6161 then {
62- let recipient = addressFromStringValue("3MwtjV2Q62CNSqKwM3Hzspy6DdwrvxE8P9F")
62+ let recipient = addressFromStringValue(address)
6363 let p_arr = split_4C(params, "|")
64- let $t017741825 = $Tuple2(p_arr[0], p_arr[1])
65- let farmName = $t017741825._1
66- let farmLocation = $t017741825._2
64+ let $t017441795 = $Tuple2(p_arr[0], p_arr[1])
65+ let farmName = $t017441795._1
66+ let farmLocation = $t017441795._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)
72- let farmNftCollection = tryGetString(key_farmNft_collection)
73- let farmNftImage = tryGetString(key_farmNft_image)
74- let assetId = {
75- let @ = invoke(addressFromStringValue(puzzleMint), "mint", [farmNftName, farmNftDescription, farmNftCollection, farmNftImage, farmNftImage, 1, "", "", ""], nil)
76- if ($isInstanceOf(@, "String"))
77- then @
78- else throw(($getType(@) + " couldn't be cast to String"))
79- }
80- if ((assetId == assetId))
81- 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))
82- else throw("Strict value is not equal to itself.")
72+ let issue = Issue(farmNftName, farmNftDescription, 1, 0, false)
73+ let id = calculateAssetId(issue)
74+ $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)], $Tuple3(nextNum, farmName, farmLocation))
8375 }
8476 else throw("Strict value is not equal to itself.")
8577 }
8678 else throw("Not allowed caller")
8779 }
88-
89-
90-
91-@Callable(i)
92-func test () = {
93- let r = {
94- let @ = invoke(this, "mint", nil, nil)
95- if ($isInstanceOf(@, "String"))
96- then @
97- else throw(($getType(@) + " couldn't be cast to String"))
98- }
99- if ((r == r))
100- then if (true)
101- then throw(r)
102- else nil
103- else throw("Strict value is not equal to itself.")
104- }
105-
106-
107-
108-@Callable(i)
109-func mint () = $Tuple2(nil, 42)
11080
11181
11282
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("3MwtjV2Q62CNSqKwM3Hzspy6DdwrvxE8P9F")
62+ let recipient = addressFromStringValue(address)
6363 let p_arr = split_4C(params, "|")
64- let $t017741825 = $Tuple2(p_arr[0], p_arr[1])
65- let farmName = $t017741825._1
66- let farmLocation = $t017741825._2
64+ let $t017441795 = $Tuple2(p_arr[0], p_arr[1])
65+ let farmName = $t017441795._1
66+ let farmLocation = $t017441795._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)
72- let farmNftCollection = tryGetString(key_farmNft_collection)
73- let farmNftImage = tryGetString(key_farmNft_image)
74- let assetId = {
75- let @ = invoke(addressFromStringValue(puzzleMint), "mint", [farmNftName, farmNftDescription, farmNftCollection, farmNftImage, farmNftImage, 1, "", "", ""], nil)
76- if ($isInstanceOf(@, "String"))
77- then @
78- else throw(($getType(@) + " couldn't be cast to String"))
79- }
80- if ((assetId == assetId))
81- 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))
82- else throw("Strict value is not equal to itself.")
72+ let issue = Issue(farmNftName, farmNftDescription, 1, 0, false)
73+ let id = calculateAssetId(issue)
74+ $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)], $Tuple3(nextNum, farmName, farmLocation))
8375 }
8476 else throw("Strict value is not equal to itself.")
8577 }
8678 else throw("Not allowed caller")
8779 }
88-
89-
90-
91-@Callable(i)
92-func test () = {
93- let r = {
94- let @ = invoke(this, "mint", nil, nil)
95- if ($isInstanceOf(@, "String"))
96- then @
97- else throw(($getType(@) + " couldn't be cast to String"))
98- }
99- if ((r == r))
100- then if (true)
101- then throw(r)
102- else nil
103- else throw("Strict value is not equal to itself.")
104- }
105-
106-
107-
108-@Callable(i)
109-func mint () = $Tuple2(nil, 42)
11080
11181
11282
11383 @Callable(i)
11484 func init () = {
11585 let callerPbk = toBase58String(i.callerPublicKey)
11686 if (allow(callerPbk))
11787 then {
11888 let nextNum = tryGetInteger(key_farmNft_nextNumber)
11989 if ((nextNum != 0))
12090 then throw("Contract is already initialized")
12191 else [IntegerEntry(key_farmNft_nextNumber, 1)]
12292 }
12393 else throw("Not allowed caller")
12494 }
12595
12696

github/deemru/w8io/026f985 
26.28 ms