tx · DLM19xYSccAKZEvRAu9EGn2ZBeR9nPFNVdPUZSQom8RU

3Mx2mQfjNt9bjMGLKeVEUqY18DfQE9zE6AX:  -0.01000000 Waves

2022.02.01 23:10 [1905001] smart account 3Mx2mQfjNt9bjMGLKeVEUqY18DfQE9zE6AX > SELF 0.00000000 Waves

{ "type": 13, "id": "DLM19xYSccAKZEvRAu9EGn2ZBeR9nPFNVdPUZSQom8RU", "fee": 1000000, "feeAssetId": null, "timestamp": 1643746246739, "version": 2, "chainId": 84, "sender": "3Mx2mQfjNt9bjMGLKeVEUqY18DfQE9zE6AX", "senderPublicKey": "2psiQevPvpc1FoG6bAPSTXVmPLJXVhCLMtqZZNnysMCQ", "proofs": [ "5J7rT3kHmAdg6ng9VjAMsLxbW6fbTQ2uGjY6L6jayQKAtv3hV645N44TV6qiz8NTuf9jqtzznKXr8uVdXBBAKwHh" ], "script": "base64:AAIFAAAAAAAAAOIIAhIDCgEIEgMKAQEaDQoBYRIIVEVTVFVTRE4aDgoBYhIJRFVDS0lTU1VFGg4KAWMSCWlzRHVja05GVBoKCgFkEgVhc3NldBoQCgFlEgtpc0R1Y2tJc3N1ZRoMCgFmEgckbWF0Y2gwGgYKAWcSAWEaBgoBaBIBaRoKCgFpEgVuZnRJZBoPCgFqEgpuZnRBc3NldElkGggKAWsSA3BtdBoQCgFsEgtidXlPdXRQcmljZRoKCgFtEgVvd25lchoGCgFuEgFvGgwKAW8SB2Fzc2V0SWQaDgoBcBIJYXNzZXROYW1lAAAAAwAAAAABYQEAAAAgAIUpTOkTLqoXmGxvzdEleYQFDyLlDcuqJGsbsu9ZirwAAAAAAWIBAAAAGgFXjLVIn36eFdUYl44bd/sJf2di2uFtYyVJAQAAAAFjAAAAAQAAAAFkBAAAAAFlBAAAAAFmCAgFAAAAAWQAAAAGaXNzdWVyAAAABWJ5dGVzAwkAAAEAAAACBQAAAAFmAgAAAApCeXRlVmVjdG9yBAAAAAFnBQAAAAFmCQAAAAAAAAIFAAAAAWcFAA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gAAAA5DYW4ndCBmaW5kIE5GVAkAAAIAAAABAgAAABBDYW4ndCBmaW5kIGFzc2V0AAAAALNesHs=", "height": 1905001, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: 6YxgizRCCbShFd1bGnNgNqoZZUqAAwgNhsZ2R3Va2H1K Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 5 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let a = base58'132maRL3uF35tc2bpRih9D6MYq5DR6H28zkop786dKyu'
5+
6+let b = base58'3PEktVux2RhchSN63DsDo4b4mz4QqzKSeDv'
7+
8+func c (d) = {
9+ let e = {
10+ let f = d.issuer.bytes
11+ if ($isInstanceOf(f, "ByteVector"))
12+ then {
13+ let g = f
14+ (g == b)
15+ }
16+ else false
17+ }
18+ if (if (if (if (e)
19+ then (d.decimals == 0)
20+ else false)
21+ then (d.reissuable == false)
22+ else false)
23+ then (d.quantity == 1)
24+ else false)
25+ then contains(d.name, "DUCK")
26+ else false
27+ }
28+
29+
30+@Callable(h)
31+func buyNFT (i) = {
32+ let j = fromBase58String(i)
33+ let k = if ((size(h.payments) == 1))
34+ then h.payments[0]
35+ else throw("Attached payment is required")
36+ let l = {
37+ let f = getInteger(this, ("buyOutPrice_" + i))
38+ if ($isInstanceOf(f, "Int"))
39+ then {
40+ let g = f
41+ g
42+ }
43+ else 0
44+ }
45+ let m = {
46+ let f = getBinary(this, ("owner_" + i))
47+ if ($isInstanceOf(f, "ByteVector"))
48+ then {
49+ let n = f
50+ n
51+ }
52+ else throw("Can't find owner")
53+ }
54+ let d = {
55+ let f = assetInfo(j)
56+ if ($isInstanceOf(f, "Asset"))
57+ then {
58+ let g = f
59+ g
60+ }
61+ else throw("Can't find NFT")
62+ }
63+ if (!(if (if ((l > 0))
64+ then (l == k.amount)
65+ else false)
66+ then (k.assetId == a)
67+ else false))
68+ then [ScriptTransfer(h.caller, 1, d.id), ScriptTransfer(Address(m), l, a), DeleteEntry(("owner_" + i)), DeleteEntry(("buyOutPrice_" + i))]
69+ else throw("Somthing is wrong")
70+ }
71+
72+
73+
74+@Callable(h)
75+func sellNFT (l) = {
76+ let k = if ((size(h.payments) == 1))
77+ then h.payments[0]
78+ else throw("Attached NFT is required")
79+ if (isDefined(k.assetId))
80+ then {
81+ let o = value(k.assetId)
82+ let d = {
83+ let f = assetInfo(o)
84+ if ($isInstanceOf(f, "Asset"))
85+ then {
86+ let g = f
87+ g
88+ }
89+ else throw("Can't find asset")
90+ }
91+ if (if (c(d))
92+ then (l > 0)
93+ else false)
94+ then {
95+ let p = toBase58String(d.id)
96+[IntegerEntry(("buyOutPrice_" + p), l), BinaryEntry(("owner_" + p), h.caller.bytes)]
97+ }
98+ else throw("Can't find NFT")
99+ }
100+ else throw("Can't find asset")
101+ }
102+
103+

github/deemru/w8io/169f3d6 
19.16 ms