tx · FAVcedwrpXYYeadgbKVdHyX1B7xuvHoxCwK5qetrFuML

3NBYw8rxLmTvyEdsvaYor8nHG6GJ4NjB2Aw:  -0.01000000 Waves

2023.01.24 11:59 [2418832] smart account 3NBYw8rxLmTvyEdsvaYor8nHG6GJ4NjB2Aw > SELF 0.00000000 Waves

{ "type": 13, "id": "FAVcedwrpXYYeadgbKVdHyX1B7xuvHoxCwK5qetrFuML", "fee": 1000000, "feeAssetId": null, "timestamp": 1674550940803, "version": 2, "chainId": 84, "sender": "3NBYw8rxLmTvyEdsvaYor8nHG6GJ4NjB2Aw", "senderPublicKey": "4NDsd3dGKXuKLCoSbYvcWCX276K9ShP75cs9HTBMLJEN", "proofs": [ "3crXgExyUB7shLJpdgdZdQv9yxcAssTAuh6jeZgRABGTNpXS8LUNFy42QtQgWpgJZsBWnmTah9V7Bxx4yTKkLA4s" ], "script": "base64:BgIaCAISCwoJCAgICAgBCAgIEgMKAQgSBAoCCAgLAAlzZXBhcmF0b3ICAV8ABGtCdXkCA2J1eQAGa1ByaWNlAgVwcmljZQAFa1NlbGwCBHNlbGwABXRlYW1zASCFY5Wj84iOsN4MF44ITr+aP5K7Jts66HaOFtwUIipIfgAFd2F2ZXMBAAASbWF4QXVjdGlvbkR1cmF0aW9uAAcABGtCaWQCA2JpZAAMc3RhdHVzRm9yTkZUCQCWCgQCBE9QRU4CBkNMT1NFRAIIUkVXQVJERUQCCENBTkNFTEVEAAtkQXBwQWRkcmVzcwEaAVRKuE9s3sLak+30julKNvjVT3+V1VVbXaABBWlzTmZ0AQdhc3NldElkBAckbWF0Y2gwCQDsBwEFB2Fzc2V0SWQDCQABAgUHJG1hdGNoMAIFQXNzZXQEBXRva2VuBQckbWF0Y2gwAwMDAwkAAAIIBQV0b2tlbghkZWNpbWFscwAACQAAAggFBXRva2VuCHF1YW50aXR5AAEHCQAAAggFBXRva2VuCnJlaXNzdWFibGUHBwkAAAIFB2Fzc2V0SWQFBXdhdmVzBwkAAAIFB2Fzc2V0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MwIAgkBC1N0cmluZ0VudHJ5AgkArAICCQCsAgIFBW5mdElEBQlzZXBhcmF0b3ICBl9vd25lcgkApQgBCAUBaQZjYWxsZXIFA25pbAkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCAUBaQZjYWxsZXIAAQUHYXNzZXRJZAkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCQEHQWRkcmVzcwEJANkEAQURY3VycmVudF9uZnRfb3duZXIFBmFtb3VudAUEdW5pdAkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIJAKwCAgkApQgBCAUBaQZjYWxsZXIFCXNlcGFyYXRvcgUEa0J1eQkArAICCQCsAgIFBW5mdElEBQlzZXBhcmF0b3IJAKQDAQUGYW1vdW50CQDMCAIJAQtEZWxldGVFbnRyeQEJAKwCAgkArAICAgRuZnRfBRFjdXJyZW50X25mdF9vd25lcgIGX293bmVyCQDMCAIJAQtTdHJpbmdFbnRyeQIJAKwCAgkArAICAgRuZnRfBRFjdXJyZW50X25mdF9vd25lcgIGX293bmVyCQClCAEIBQFpBmNhbGxlcgkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIJAKwCAgUFbmZ0SUQFCXNlcGFyYXRvcgIGX293bmVyCQClCAEIBQFpBmNhbGxlcgUDbmlsAPOaS1c=", "height": 2418832, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6mnRgonEJA2maD1RGoHNhmaDfjKq64eA3qMy2KQN16LF Next: HqL1nHJnT7RBvXirJARB2VVKR13ebnF8eLHSa51yuhZE Diff:
OldNewDifferences
5757 let D = $Tuple2(value(o.payments[0].assetId), value(o.payments[0].amount))
5858 let E = D._1
5959 let F = D._2
60-[StringEntry(((c + a) + toBase58String(value(o.payments[0].assetId))), B), StringEntry(((toString(o.caller) + a) + d), ((toBase58String(E) + a) + toString(F)))]
60+ if (!(k(E)))
61+ then throw("Token is not NFT")
62+ else [StringEntry(((c + a) + toBase58String(value(o.payments[0].assetId))), B), StringEntry(((toString(o.caller) + a) + d), ((toBase58String(E) + a) + toString(F)))]
6163 }
6264
6365
7981 let E = L._1
8082 let F = L._2
8183 let B = getStringValue(((((c + a) + G) + "_") + H))
82- if ((o.payments[0].assetId != e))
83- then throw("Pay in teams")
84- else if ((H == toString(o.caller)))
85- then throw("current Owner of NFT not able to purchase")
86- else [ScriptTransfer(o.caller, 1, l), ScriptTransfer(Address(fromBase58String(H)), I, e), StringEntry(((toString(o.caller) + a) + b), ((G + a) + toString(I))), DeleteEntry((("nft_" + H) + "_owner")), StringEntry((("nft_" + H) + "_owner"), toString(o.caller)), StringEntry(((G + a) + "_owner"), toString(o.caller))]
84+ if ((H == toString(o.caller)))
85+ then throw("current Owner of NFT not able to purchase")
86+ else if (!(k(E)))
87+ then throw("Token is not NFT")
88+ else if ((o.payments[0].assetId == e))
89+ then [ScriptTransfer(o.caller, 1, l), ScriptTransfer(Address(fromBase58String(H)), I, e), StringEntry(((toString(o.caller) + a) + b), ((G + a) + toString(I))), DeleteEntry((("nft_" + H) + "_owner")), StringEntry((("nft_" + H) + "_owner"), toString(o.caller)), StringEntry(((G + a) + "_owner"), toString(o.caller))]
90+ else [ScriptTransfer(o.caller, 1, l), ScriptTransfer(Address(fromBase58String(H)), I, unit), StringEntry(((toString(o.caller) + a) + b), ((G + a) + toString(I))), DeleteEntry((("nft_" + H) + "_owner")), StringEntry((("nft_" + H) + "_owner"), toString(o.caller)), StringEntry(((G + a) + "_owner"), toString(o.caller))]
8791 }
8892
8993
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "_"
55
66 let b = "buy"
77
88 let c = "price"
99
1010 let d = "sell"
1111
1212 let e = base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq'
1313
1414 let f = base58''
1515
1616 let g = 7
1717
1818 let h = "bid"
1919
2020 let i = $Tuple4("OPEN", "CLOSED", "REWARDED", "CANCELED")
2121
2222 let j = base58'3MvjAaDYHpS4A5K4CV3kZMMEH9m9JdBSvbq'
2323
2424 func k (l) = {
2525 let m = assetInfo(l)
2626 if ($isInstanceOf(m, "Asset"))
2727 then {
2828 let n = m
2929 if (if (if (if ((n.decimals == 0))
3030 then (n.quantity == 1)
3131 else false)
3232 then (n.reissuable == false)
3333 else false)
3434 then (l == f)
3535 else false)
3636 then (l == e)
3737 else false
3838 }
3939 else false
4040 }
4141
4242
4343 @Callable(o)
4444 func createNft (p,q,r,s,t,u,v,w,x) = {
4545 let y = Issue(p, v, 1, 0, false)
4646 let z = calculateAssetId(y)
4747 let A = o.transactionId
4848 [y, ScriptTransfer(o.caller, 1, z), StringEntry(((toBase58String(z) + a) + "Owner"), toString(o.caller)), StringEntry(((toBase58String(z) + a) + "nft_type"), s), StringEntry(((toBase58String(z) + a) + "nft_tags"), t), StringEntry(((toBase58String(z) + a) + "nft_dAppAddress"), r), IntegerEntry(((toBase58String(z) + a) + "nft_selling_price"), u), StringEntry(((toBase58String(z) + a) + "nft_onSell"), w), StringEntry(((toBase58String(z) + a) + "nft_data"), x), StringEntry(((toBase58String(A) + a) + "issue_nft"), toBase58String(z))]
4949 }
5050
5151
5252
5353 @Callable(o)
5454 func sellNFT (B) = {
5555 let A = o.transactionId
5656 let C = o.caller.bytes
5757 let D = $Tuple2(value(o.payments[0].assetId), value(o.payments[0].amount))
5858 let E = D._1
5959 let F = D._2
60-[StringEntry(((c + a) + toBase58String(value(o.payments[0].assetId))), B), StringEntry(((toString(o.caller) + a) + d), ((toBase58String(E) + a) + toString(F)))]
60+ if (!(k(E)))
61+ then throw("Token is not NFT")
62+ else [StringEntry(((c + a) + toBase58String(value(o.payments[0].assetId))), B), StringEntry(((toString(o.caller) + a) + d), ((toBase58String(E) + a) + toString(F)))]
6163 }
6264
6365
6466
6567 @Callable(o)
6668 func buyNFT (G,H) = {
6769 let l = fromBase58String(G)
6870 let I = value(o.payments[0].amount)
6971 let J = {
7072 let m = getString(this, (("nft_" + H) + "_owner"))
7173 if ($isInstanceOf(m, "String"))
7274 then {
7375 let K = m
7476 K
7577 }
7678 else false
7779 }
7880 let L = $Tuple2(value(o.payments[0].assetId), value(o.payments[0].amount))
7981 let E = L._1
8082 let F = L._2
8183 let B = getStringValue(((((c + a) + G) + "_") + H))
82- if ((o.payments[0].assetId != e))
83- then throw("Pay in teams")
84- else if ((H == toString(o.caller)))
85- then throw("current Owner of NFT not able to purchase")
86- else [ScriptTransfer(o.caller, 1, l), ScriptTransfer(Address(fromBase58String(H)), I, e), StringEntry(((toString(o.caller) + a) + b), ((G + a) + toString(I))), DeleteEntry((("nft_" + H) + "_owner")), StringEntry((("nft_" + H) + "_owner"), toString(o.caller)), StringEntry(((G + a) + "_owner"), toString(o.caller))]
84+ if ((H == toString(o.caller)))
85+ then throw("current Owner of NFT not able to purchase")
86+ else if (!(k(E)))
87+ then throw("Token is not NFT")
88+ else if ((o.payments[0].assetId == e))
89+ then [ScriptTransfer(o.caller, 1, l), ScriptTransfer(Address(fromBase58String(H)), I, e), StringEntry(((toString(o.caller) + a) + b), ((G + a) + toString(I))), DeleteEntry((("nft_" + H) + "_owner")), StringEntry((("nft_" + H) + "_owner"), toString(o.caller)), StringEntry(((G + a) + "_owner"), toString(o.caller))]
90+ else [ScriptTransfer(o.caller, 1, l), ScriptTransfer(Address(fromBase58String(H)), I, unit), StringEntry(((toString(o.caller) + a) + b), ((G + a) + toString(I))), DeleteEntry((("nft_" + H) + "_owner")), StringEntry((("nft_" + H) + "_owner"), toString(o.caller)), StringEntry(((G + a) + "_owner"), toString(o.caller))]
8791 }
8892
8993

github/deemru/w8io/169f3d6 
27.33 ms