tx · 45u5akEV3WvtY4bGcwct68v4AA7PT5yh3v1RhiR5Qfrg

3N9cKCHp6ZLMgz7rRgF8Q8DEt8zbtd1Ht7F:  -0.01000000 Waves

2022.12.20 08:26 [2368192] smart account 3N9cKCHp6ZLMgz7rRgF8Q8DEt8zbtd1Ht7F > SELF 0.00000000 Waves

{ "type": 13, "id": "45u5akEV3WvtY4bGcwct68v4AA7PT5yh3v1RhiR5Qfrg", "fee": 1000000, "feeAssetId": null, "timestamp": 1671514143233, "version": 2, "chainId": 84, "sender": "3N9cKCHp6ZLMgz7rRgF8Q8DEt8zbtd1Ht7F", "senderPublicKey": "3V22YUj3GF4AeBxdWx8rgGdG4groE4W6P2s4sAkshe7R", "proofs": [ "3mMEsUjwgTdJhL9SwBtBVQwunSMFLiWCUyEGewzE5EPBnEVqQ1tuh2vYhxJjeh63gTcD6eBpCKGPFQmgau5v7wAg" ], "script": "base64:BgIECAISAAABAWkBBXRva2VuAAQFYXNzZXQJAMIIBQIEc2h1YgIZVGhpcyBpcyBhbiBvcmRpbmFyeSB0b2tlbgDAhD0AAgYEB2Fzc2V0SWQJALgIAQUFYXNzZXQJAMwIAgUFYXNzZXQFA25pbAECdHgBBnZlcmlmeQAJAPQDAwgFAnR4CWJvZHlCeXRlcwkAkQMCCAUCdHgGcHJvb2ZzAAAIBQJ0eA9zZW5kZXJQdWJsaWNLZXlfTgMu", "height": 2368192, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 61LDLW2AvDNAxnGkAHnA7X2Viq9VFhbecnbeoRduCLbx Next: 7BNDUAVheRTEfxyLzxyNbqUHwpNGjnwAi7DsbXZfqGSd Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let a = "_"
54
6-let b = "buy"
75
8-let c = "price"
9-
10-let d = "sell"
11-
12-let e = 7
13-
14-let f = "bid"
15-
16-let g = $Tuple4("OPEN", "CLOSED", "REWARDED", "CANCELED")
17-
18-let h = base58'3MvjAaDYHpS4A5K4CV3kZMMEH9m9JdBSvbq'
19-
20-func i (j) = {
21- let k = assetInfo(j)
22- if ($isInstanceOf(k, "Asset"))
23- then {
24- let l = k
25- if (if ((l.decimals == 0))
26- then (l.quantity == 1)
27- else false)
28- then (l.reissuable == false)
29- else false
30- }
31- else false
6+@Callable(a)
7+func token () = {
8+ let b = Issue("shub", "This is an ordinary token", 1000000, 2, true)
9+ let c = calculateAssetId(b)
10+[b]
3211 }
3312
3413
35-@Callable(m)
36-func createNft (n,o,p,q,r,s,t,u,v) = {
37- let w = Issue(n, t, 1, 0, false)
38- let x = calculateAssetId(w)
39- let y = m.transactionId
40-[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))]
41- }
42-
43-
44-
45-@Callable(m)
46-func sellNFT (z) = {
47- 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)))
53- then throw("Token is not NFT")
54- else [StringEntry(((c + a) + toBase58String(value(m.payments[0].assetId))), toString(z)), StringEntry(((toString(m.caller) + a) + d), ((toBase58String(C) + a) + toString(D)))]
55- }
56-
57-
58-
59-@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"))
65- if ($isInstanceOf(k, "String"))
66- then {
67- let I = k
68- I
69- }
70- else false
71- }
72- let z = getStringValue(((((c + a) + E) + "_") + F))
73- if ((m.payments[0].assetId != unit))
74- then throw("Pay in waves")
75- else if ((F == toString(m.caller)))
76- then throw("current Owner of NFT not able to purchase")
77- 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))]
78- }
79-
14+@Verifier(d)
15+func e () = sigVerify(d.bodyBytes, d.proofs[0], d.senderPublicKey)
8016

github/deemru/w8io/026f985 
21.70 ms