tx · Ekmu7FTLfcuz5ukSt4u2E5DZg2KuS5thazwUArfwmh3Y

3N9cKCHp6ZLMgz7rRgF8Q8DEt8zbtd1Ht7F:  -0.01000000 Waves

2022.12.14 08:08 [2359539] smart account 3N9cKCHp6ZLMgz7rRgF8Q8DEt8zbtd1Ht7F > SELF 0.00000000 Waves

{ "type": 13, "id": "Ekmu7FTLfcuz5ukSt4u2E5DZg2KuS5thazwUArfwmh3Y", "fee": 1000000, "feeAssetId": null, "timestamp": 1670994635652, "version": 2, "chainId": 84, "sender": "3N9cKCHp6ZLMgz7rRgF8Q8DEt8zbtd1Ht7F", "senderPublicKey": "3V22YUj3GF4AeBxdWx8rgGdG4groE4W6P2s4sAkshe7R", "proofs": [ "SdkNNc5GCGtxt7gaXCsGrfFEAFdMrrdStnCUpv5cCcNDPg4vZn4jQcqZpUyeERvbMWMy5TFRUj5Y6uyAJfdash3" ], "script": "base64:BgIaCAISCwoJCAgICAgBCAgIEgMKAQESBAoCCAgJAAlzZXBhcmF0b3ICAV8ABGtCdXkCA2J1eQAGa1ByaWNlAgVwcmljZQAFa1NlbGwCBHNlbGwAEm1heEF1Y3Rpb25EdXJhdGlvbgAHAARrQmlkAgNiaWQADHN0YXR1c0Zvck5GVAkAlgoEAgRPUEVOAgZDTE9TRUQCCFJFV0FSREVEAghDQU5DRUxFRAALZEFwcEFkZHJlc3MBGgFUSrhPbN7C2pPt9I7pSjb41U9/ldVVW12gAQVpc05mdAEHYXNzZXRJZAQHJG1hdGNoMAkA7AcBBQdhc3NldElkAwkAAQIFByRtYXRjaDACBUFzc2V0BAV0b2tlbgUHJG1hdGNoMAMDCQAAAggFBXRva2VuCGRlY2ltYWxzAAAJAAACCAUFdG9rZW4IcXVhbnRpdHkAAQcJAAACCAUFdG9rZW4KcmVpc3N1YWJsZQcHBwMBaQEJY3JlYXRlTmZ0CQhuZnRfbmFtZQluZnRfb3duZXIPbmZ0X2RBcHBBZGRyZXNzCG5mdF90eXBlCG5mdF90YWdzEW5m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QCsAgIJAKwCAgkArAICBQZrUHJpY2UFCXNlcGFyYXRvcgUFbmZ0SUQCAV8FEWN1cnJlbnRfbmZ0X293bmVyBAVvd25lcgkBE3ZhbHVlT3JFcnJvck1lc3NhZ2UCCQERQGV4dHJOYXRpdmUoMTA1OCkBCQCsAgIJAKwCAgUFbmZ0SUQFCXNlcGFyYXRvcgIFT3duZXICCE5vIG93bmVyAwkAAAIICQCRAwIIBQFpCHBheW1lbnRzAAAHYXNzZXRJZAUEdW5pdAkAAgECDFBheSBpbiB3YXZlcwMJAAACBRBjaGVja093bmVySXNTYW1lCQClCAEIBQFpBmNhbGxlcgkAAgECIU93bmVyIG9mIE5GVCBub3QgYWJsZSB0byBwdXJjaGFzZQkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCAUBaQZjYWxsZXIAAQUHYXNzZXRJZAkAzAgCCQEOU2NyaXB0VHJhbnNmZXIDCQEHQWRkcmVzcwEJANkEAQUFb3duZXIFBmFtb3VudAUEdW5pdAkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIJAKwCAgkApQgBCAUBaQZjYWxsZXIFCXNlcGFyYXRvcgUEa0J1eQkArAICCQCsAgIFBW5mdElEBQlzZXBhcmF0b3IJAKQDAQUGYW1vdW50CQDMCAIJAQtEZWxldGVFbnRyeQEJAKwCAgkArAICAgRuZnRfBRFjdXJyZW50X25mdF9vd25lcgIGX293bmVyBQNuaWwAPZXznw==", "height": 2359539, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3PuUa8uTcJMEXfpaEg13mXoYeRr1WBcVUCtJ2yCKuC4j Next: B9KNTgEvRb8PDtC5xa5YrfyoqmAbiw2xRkcophLapEjb Diff:
OldNewDifferences
7171 }
7272 let z = getStringValue(((((c + a) + E) + "_") + F))
7373 let J = valueOrErrorMessage(getStringValue(((E + a) + "Owner")), "No owner")
74- if ((m.payments[0].assetId != unit))
74+ if ((m.payments[0].assetId == unit))
7575 then throw("Pay in waves")
7676 else if ((H == toString(m.caller)))
7777 then throw("Owner of NFT not able to purchase")
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)
4646 func sellNFT (z) = {
4747 let y = m.transactionId
4848 let A = m.caller.bytes
4949 let B = $Tuple2(value(m.payments[0].assetId), value(m.payments[0].amount))
5050 let C = B._1
5151 let D = B._2
5252 if (!(i(C)))
5353 then throw("Token is not NFT")
5454 else [StringEntry(((c + a) + toBase58String(value(m.payments[0].assetId))), toString(z)), StringEntry(((toString(m.caller) + a) + d), ((toBase58String(C) + a) + toString(D)))]
5555 }
5656
5757
5858
5959 @Callable(m)
6060 func buyNFT (E,F) = {
6161 let j = fromBase58String(E)
6262 let G = value(m.payments[0].amount)
6363 let H = {
6464 let k = getString(this, (("nft_" + F) + "_owner"))
6565 if ($isInstanceOf(k, "String"))
6666 then {
6767 let I = k
6868 I
6969 }
7070 else false
7171 }
7272 let z = getStringValue(((((c + a) + E) + "_") + F))
7373 let J = valueOrErrorMessage(getStringValue(((E + a) + "Owner")), "No owner")
74- if ((m.payments[0].assetId != unit))
74+ if ((m.payments[0].assetId == unit))
7575 then throw("Pay in waves")
7676 else if ((H == toString(m.caller)))
7777 then throw("Owner of NFT not able to purchase")
7878 else [ScriptTransfer(m.caller, 1, j), ScriptTransfer(Address(fromBase58String(J)), G, unit), StringEntry(((toString(m.caller) + a) + b), ((E + a) + toString(G))), DeleteEntry((("nft_" + F) + "_owner"))]
7979 }
8080
8181

github/deemru/w8io/026f985 
28.56 ms