tx · DFRTPFnUanQgUyoLbxExrRgPpPFEAQ1b8s5iqfe4im5j

3NBYw8rxLmTvyEdsvaYor8nHG6GJ4NjB2Aw:  -0.01000000 Waves

2023.01.23 14:28 [2417532] smart account 3NBYw8rxLmTvyEdsvaYor8nHG6GJ4NjB2Aw > SELF 0.00000000 Waves

{ "type": 13, "id": "DFRTPFnUanQgUyoLbxExrRgPpPFEAQ1b8s5iqfe4im5j", "fee": 1000000, "feeAssetId": null, "timestamp": 1674473411601, "version": 2, "chainId": 84, "sender": "3NBYw8rxLmTvyEdsvaYor8nHG6GJ4NjB2Aw", "senderPublicKey": "4NDsd3dGKXuKLCoSbYvcWCX276K9ShP75cs9HTBMLJEN", "proofs": [ "3DRHqHJeQuw8WtoopURo9r5F8DaV36aMuKVmAzJYgGBXPTyLNeVn7aBW1NRsZWiNkt3TNkvBpZmyKPEkwJBrkp3j" ], "script": "base64:BgIbCAISCwoJCAgICAgBCAgIEgQKAggIEgQKAggICQAJc2VwYXJhdG9yAgFfAARrQnV5AgNidXkABmtQcmljZQIFcHJpY2UABWtTZWxsAgRzZWxsABJtYXhBdWN0aW9uRHVyYXRpb24ABwAEa0JpZAIDYmlkAAxzdGF0dXNGb3JORlQJAJYKBAIET1BFTgIGQ0xPU0VEAghSRVdBUkRFRAIIQ0FOQ0VMRUQAC2RBcHBBZGRyZXNzARoBVEq4T2zewtqT7fSO6Uo2+NVPf5XVVVtdoAEFaXNOZnQBB2Fzc2V0SWQEByRtYXRjaDAJAOwHAQUHYXNzZXRJZAMJAAECBQckbWF0Y2gwAgVBc3NldAQFdG9rZW4FByRtYXRjaDADAwkAAAIIBQV0b2tlbghkZWNpbWFscwAACQAAAggFBXRva2VuCHF1YW50aXR5AAEHCQAAAggFBXRva2VuCnJlaXNzdWFibGUHBwcDAWkBCWNyZWF0ZU5mdAkIbmZ0X25hbWUJbmZ0X293bmVyD25mdF9kQXBwQWRkcmVzcwhuZnRfdHlwZQhuZnRfdGFncxFuZnRfc2VsbGluZ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BmtQcmljZQUJc2VwYXJhdG9yBQVuZnRJRAIBXwURY3VycmVudF9uZnRfb3duZXIDCQECIT0CCAkAkQMCCAUBaQhwYXltZW50cwAAB2Fzc2V0SWQFBHVuaXQJAAIBAiNPbmx5IHBheSBpbiBBU0lNSSBvciBXQVZFUyBhY2NlcHRlZAMJAAACBRFjdXJyZW50X25mdF9vd25lcgkApQgBCAUBaQZjYWxsZXIJAAIBAiljdXJyZW50IE93bmVyIG9mIE5GVCBub3QgYWJsZSB0byBwdXJjaGFzZQkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCAUBaQZjYWxsZXIAAQUHYXNzZXRJZAkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCQEHQWRkcmVzcwEJANkEAQURY3VycmVudF9uZnRfb3duZXIFBmFtb3VudAUEdW5pdAkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIJAKwCAgkApQgBCAUBaQZjYWxsZXIFCXNlcGFyYXRvcgUEa0J1eQkArAICCQCsAgIFBW5mdElEBQlzZXBhcmF0b3IJAKQDAQUGYW1vdW50CQDMCAIJAQtEZWxldGVFbnRyeQEJAKwCAgkArAICAgRuZnRfBRFjdXJyZW50X25mdF9vd25lcgIGX293bmVyCQDMCAIJAQtTdHJpbmdFbnRyeQIJAKwCAgkArAICAgRuZnRfBRFjdXJyZW50X25mdF9vd25lcgIGX293bmVyCQClCAEIBQFpBmNhbGxlcgkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIJAKwCAgUFbmZ0SUQFCXNlcGFyYXRvcgIGX293bmVyCQClCAEIBQFpBmNhbGxlcgUDbmlsAKtuT88=", "height": 2417532, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7QiuvxFLEf4dRpUJkD3JQhxnAREpSE2H2KCHdWSirzqj Next: JC4PqRSKzEA2HSxasJ1WoXBKBejcdFNJc46Vw5F1CFF6 Diff:
OldNewDifferences
4343
4444
4545 @Callable(m)
46-func sellNFT (z) = {
46+func sellNFT (z,A) = {
4747 let y = m.transactionId
48- let A = m.caller.bytes
49- let B = $Tuple2(value(m.payments[0].assetId), value(m.payments[0].amount))
50- let C = B._1
51- let D = B._2
52- if (!(i(C)))
48+ let B = m.caller.bytes
49+ let C = $Tuple2(value(m.payments[0].assetId), value(m.payments[0].amount))
50+ let D = C._1
51+ let E = C._2
52+ if (!(i(D)))
5353 then throw("Token is not NFT")
54- else [StringEntry(((c + a) + toBase58String(value(m.payments[0].assetId))), z), StringEntry(((toString(m.caller) + a) + d), ((toBase58String(C) + a) + toString(D)))]
54+ else [StringEntry(((c + a) + toBase58String(value(m.payments[0].assetId))), z), StringEntry(((toString(m.caller) + a) + d), ((toBase58String(D) + a) + toString(E)))]
5555 }
5656
5757
5858
5959 @Callable(m)
60-func buyNFT (E,F) = {
61- let j = fromBase58String(E)
62- let G = value(m.payments[0].amount)
63- let H = {
64- let k = getString(this, (("nft_" + F) + "_owner"))
60+func buyNFT (F,G) = {
61+ let j = fromBase58String(F)
62+ let H = value(m.payments[0].amount)
63+ let I = {
64+ let k = getString(this, (("nft_" + G) + "_owner"))
6565 if ($isInstanceOf(k, "String"))
6666 then {
67- let I = k
68- I
67+ let J = k
68+ J
6969 }
7070 else false
7171 }
72- let z = getStringValue(((((c + a) + E) + "_") + F))
73- if ((F == toString(m.caller)))
74- then throw("current Owner of NFT not able to purchase")
75- else [ScriptTransfer(m.caller, 1, j), ScriptTransfer(Address(fromBase58String(F)), G, unit), StringEntry(((toString(m.caller) + a) + b), ((E + a) + toString(G))), DeleteEntry((("nft_" + F) + "_owner")), StringEntry((("nft_" + F) + "_owner"), toString(m.caller)), StringEntry(((E + a) + "_owner"), toString(m.caller))]
72+ let z = getStringValue(((((c + a) + F) + "_") + G))
73+ if ((m.payments[0].assetId != unit))
74+ then throw("Only pay in ASIMI or WAVES accepted")
75+ else if ((G == toString(m.caller)))
76+ then throw("current Owner of NFT not able to purchase")
77+ else [ScriptTransfer(m.caller, 1, j), ScriptTransfer(Address(fromBase58String(G)), H, unit), StringEntry(((toString(m.caller) + a) + b), ((F + a) + toString(H))), DeleteEntry((("nft_" + G) + "_owner")), StringEntry((("nft_" + G) + "_owner"), toString(m.caller)), StringEntry(((F + a) + "_owner"), toString(m.caller))]
7678 }
7779
7880
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 = 7
1313
1414 let f = "bid"
1515
1616 let g = $Tuple4("OPEN", "CLOSED", "REWARDED", "CANCELED")
1717
1818 let h = base58'3MvjAaDYHpS4A5K4CV3kZMMEH9m9JdBSvbq'
1919
2020 func i (j) = {
2121 let k = assetInfo(j)
2222 if ($isInstanceOf(k, "Asset"))
2323 then {
2424 let l = k
2525 if (if ((l.decimals == 0))
2626 then (l.quantity == 1)
2727 else false)
2828 then (l.reissuable == false)
2929 else false
3030 }
3131 else false
3232 }
3333
3434
3535 @Callable(m)
3636 func createNft (n,o,p,q,r,s,t,u,v) = {
3737 let w = Issue(n, t, 1, 0, false)
3838 let x = calculateAssetId(w)
3939 let y = m.transactionId
4040 [w, ScriptTransfer(m.caller, 1, x), StringEntry(((toBase58String(x) + a) + "Owner"), toString(m.caller)), StringEntry(((toBase58String(x) + a) + "nft_type"), q), StringEntry(((toBase58String(x) + a) + "nft_tags"), r), StringEntry(((toBase58String(x) + a) + "nft_dAppAddress"), p), IntegerEntry(((toBase58String(x) + a) + "nft_selling_price"), s), StringEntry(((toBase58String(x) + a) + "nft_onSell"), u), StringEntry(((toBase58String(x) + a) + "nft_data"), v), StringEntry(((toBase58String(y) + a) + "issue_nft"), toBase58String(x))]
4141 }
4242
4343
4444
4545 @Callable(m)
46-func sellNFT (z) = {
46+func sellNFT (z,A) = {
4747 let y = m.transactionId
48- let A = m.caller.bytes
49- let B = $Tuple2(value(m.payments[0].assetId), value(m.payments[0].amount))
50- let C = B._1
51- let D = B._2
52- if (!(i(C)))
48+ let B = m.caller.bytes
49+ let C = $Tuple2(value(m.payments[0].assetId), value(m.payments[0].amount))
50+ let D = C._1
51+ let E = C._2
52+ if (!(i(D)))
5353 then throw("Token is not NFT")
54- else [StringEntry(((c + a) + toBase58String(value(m.payments[0].assetId))), z), StringEntry(((toString(m.caller) + a) + d), ((toBase58String(C) + a) + toString(D)))]
54+ else [StringEntry(((c + a) + toBase58String(value(m.payments[0].assetId))), z), StringEntry(((toString(m.caller) + a) + d), ((toBase58String(D) + a) + toString(E)))]
5555 }
5656
5757
5858
5959 @Callable(m)
60-func buyNFT (E,F) = {
61- let j = fromBase58String(E)
62- let G = value(m.payments[0].amount)
63- let H = {
64- let k = getString(this, (("nft_" + F) + "_owner"))
60+func buyNFT (F,G) = {
61+ let j = fromBase58String(F)
62+ let H = value(m.payments[0].amount)
63+ let I = {
64+ let k = getString(this, (("nft_" + G) + "_owner"))
6565 if ($isInstanceOf(k, "String"))
6666 then {
67- let I = k
68- I
67+ let J = k
68+ J
6969 }
7070 else false
7171 }
72- let z = getStringValue(((((c + a) + E) + "_") + F))
73- if ((F == toString(m.caller)))
74- then throw("current Owner of NFT not able to purchase")
75- else [ScriptTransfer(m.caller, 1, j), ScriptTransfer(Address(fromBase58String(F)), G, unit), StringEntry(((toString(m.caller) + a) + b), ((E + a) + toString(G))), DeleteEntry((("nft_" + F) + "_owner")), StringEntry((("nft_" + F) + "_owner"), toString(m.caller)), StringEntry(((E + a) + "_owner"), toString(m.caller))]
72+ let z = getStringValue(((((c + a) + F) + "_") + G))
73+ if ((m.payments[0].assetId != unit))
74+ then throw("Only pay in ASIMI or WAVES accepted")
75+ else if ((G == toString(m.caller)))
76+ then throw("current Owner of NFT not able to purchase")
77+ else [ScriptTransfer(m.caller, 1, j), ScriptTransfer(Address(fromBase58String(G)), H, unit), StringEntry(((toString(m.caller) + a) + b), ((F + a) + toString(H))), DeleteEntry((("nft_" + G) + "_owner")), StringEntry((("nft_" + G) + "_owner"), toString(m.caller)), StringEntry(((F + a) + "_owner"), toString(m.caller))]
7678 }
7779
7880

github/deemru/w8io/026f985 
56.05 ms