tx · Gz5FcdMRpD9CDYA2CmSHfwcKrbgrygyoAd5ggajE6rGX

3NBYw8rxLmTvyEdsvaYor8nHG6GJ4NjB2Aw:  -0.01000000 Waves

2023.01.24 12:25 [2418856] smart account 3NBYw8rxLmTvyEdsvaYor8nHG6GJ4NjB2Aw > SELF 0.00000000 Waves

{ "type": 13, "id": "Gz5FcdMRpD9CDYA2CmSHfwcKrbgrygyoAd5ggajE6rGX", "fee": 1000000, "feeAssetId": null, "timestamp": 1674552447483, "version": 2, "chainId": 84, "sender": "3NBYw8rxLmTvyEdsvaYor8nHG6GJ4NjB2Aw", "senderPublicKey": "4NDsd3dGKXuKLCoSbYvcWCX276K9ShP75cs9HTBMLJEN", "proofs": [ "5MMwmUUbCcUWPgovhp5ErZ89j4fg3ZMvSnECKqnXKgCRNFJekWRDs8511BkNXpQkVjvhN79km2jxTTn1onJC64N5" ], "script": "base64:BgIaCAISCwoJCAgICAgBCAgIEgMKAQgSBAoCCAgLAAlzZXBhcmF0b3ICAV8ABGtCdXkCA2J1eQAGa1ByaWNlAgVwcmljZQAFa1NlbGwCBHNlbGwABXRlYW1zASCFY5Wj84iOsN4MF44ITr+aP5K7Jts66HaOFtwUIipIfgAFd2F2ZXMBAAASbWF4QXVjdGlvbkR1cmF0aW9uAAcABGtCaWQCA2JpZAAMc3RhdHVzRm9yTkZUCQCWCgQCBE9QRU4CBkNMT1NFRAIIUkVXQVJERUQCCENBTkNFTEVEAAtkQXBwQWRkcmVzcwEaAVRKuE9s3sLak+30julKNvjVT3+V1VVbXaABBWlzTmZ0AQdhc3NldElkBAckbWF0Y2gwCQDsBwEFB2Fzc2V0SWQDCQABAgUHJG1hdGNoMAIFQXNzZXQEBXRva2VuBQckbWF0Y2gwAwMDAwkAAAIIBQV0b2tlbghkZWNpbWFscwAACQAAAggFBXRva2VuCHF1YW50aXR5AAEHCQAAAggFBXRva2VuCnJlaXNzdWFibGUHBwkAAAIFB2Fzc2V0SWQFBXdhdmVzBwkAAAIFB2Fz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293bmVyAgZfb3duZXIJAKUIAQgFAWkGY2FsbGVyCQDMCAIJAQtTdHJpbmdFbnRyeQIJAKwCAgkArAICBQVuZnRJRAUJc2VwYXJhdG9yAgZfb3duZXIJAKUIAQgFAWkGY2FsbGVyBQNuaWwJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwgFAWkGY2FsbGVyAAEFB2Fzc2V0SWQJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwkBB0FkZHJlc3MBCQDZBAEFEWN1cnJlbnRfbmZ0X293bmVyBQZhbW91bnQFBHVuaXQJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICCQCsAgIJAKUIAQgFAWkGY2FsbGVyBQlzZXBhcmF0b3IFBGtCdXkJAKwCAgkArAICBQVuZnRJRAUJc2VwYXJhdG9yCQCkAwEFBmFtb3VudAkAzAgCCQELRGVsZXRlRW50cnkBCQCsAgIJAKwCAgIEbmZ0XwURY3VycmVudF9uZnRfb3duZXICBl9vd25lcgkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIJAKwCAgIEbmZ0XwURY3VycmVudF9uZnRfb3duZXICBl9vd25lcgkApQgBCAUBaQZjYWxsZXIJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICCQCsAgIFBW5mdElEBQlzZXBhcmF0b3ICBl9vd25lcgkApQgBCAUBaQZjYWxsZXIFA25pbAD+gCsY", "height": 2418856, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HqL1nHJnT7RBvXirJARB2VVKR13ebnF8eLHSa51yuhZE Next: AJpmrTsqofbYiaHZYE7XZSi3gwjpNdkJERer5q4kaKd3 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- if (!(k(E)))
60+ if (k(E))
6161 then throw("Token is not NFT")
6262 else [StringEntry(((c + a) + toBase58String(value(o.payments[0].assetId))), B), StringEntry(((toString(o.caller) + a) + d), ((toBase58String(E) + a) + toString(F)))]
6363 }
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- if (!(k(E)))
60+ if (k(E))
6161 then throw("Token is not NFT")
6262 else [StringEntry(((c + a) + toBase58String(value(o.payments[0].assetId))), B), StringEntry(((toString(o.caller) + a) + d), ((toBase58String(E) + a) + toString(F)))]
6363 }
6464
6565
6666
6767 @Callable(o)
6868 func buyNFT (G,H) = {
6969 let l = fromBase58String(G)
7070 let I = value(o.payments[0].amount)
7171 let J = {
7272 let m = getString(this, (("nft_" + H) + "_owner"))
7373 if ($isInstanceOf(m, "String"))
7474 then {
7575 let K = m
7676 K
7777 }
7878 else false
7979 }
8080 let L = $Tuple2(value(o.payments[0].assetId), value(o.payments[0].amount))
8181 let E = L._1
8282 let F = L._2
8383 let B = getStringValue(((((c + a) + G) + "_") + H))
8484 if ((H == toString(o.caller)))
8585 then throw("current Owner of NFT not able to purchase")
8686 else if (!(k(E)))
8787 then throw("Token is not NFT")
8888 else if ((o.payments[0].assetId == e))
8989 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))]
9090 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))]
9191 }
9292
9393

github/deemru/w8io/026f985 
48.85 ms