tx · 6YxgizRCCbShFd1bGnNgNqoZZUqAAwgNhsZ2R3Va2H1K

3Mx2mQfjNt9bjMGLKeVEUqY18DfQE9zE6AX:  -0.01000000 Waves

2022.02.01 23:52 [1905044] smart account 3Mx2mQfjNt9bjMGLKeVEUqY18DfQE9zE6AX > SELF 0.00000000 Waves

{ "type": 13, "id": "6YxgizRCCbShFd1bGnNgNqoZZUqAAwgNhsZ2R3Va2H1K", "fee": 1000000, "feeAssetId": null, "timestamp": 1643748802826, "version": 2, "chainId": 84, "sender": "3Mx2mQfjNt9bjMGLKeVEUqY18DfQE9zE6AX", "senderPublicKey": "2psiQevPvpc1FoG6bAPSTXVmPLJXVhCLMtqZZNnysMCQ", "proofs": [ "zyS8eaMZy8pi5fwjKCvWHREPrw4g8zyd8TQcWXXZT6FvNMqq4bFQFwhtuu8m9VWAKu5Jk2gsRA2dNWDqj7QASuV" ], "script": "base64:AAIFAAAAAAAAAOIIAhIDCgEIEgMKAQEaDQoBYRIIVEVTVFVTRE4aDgoBYhIJRFVDS0lTU1VFGg4KAWMSCWlzRHVja05GVBoKCgFkEgVhc3NldBoQCgFlEgtpc0R1Y2tJc3N1ZRoMCgFmEgckbWF0Y2gwGgYKAWcSAWEaBgoBaBIBaRoKCgFpEgVuZnRJZBoPCgFqEgpuZnRBc3NldElkGggKAWsSA3BtdBoQCgFsEgtidXlPdXRQcmljZRoKCgFtEgVvd25lchoGCgFuEgFvGgwKAW8SB2Fzc2V0SWQaDgoBcBIJYXNzZXROYW1lAAAAAwAAAAABYQEAAAAgAIUpTOkTLqoXmGxvzdEleYQFDyLlDcuqJGsbsu9ZirwAAAAAAWIBAAAAGgFXjLVIn36eFdUYl44bd/sJf2di2uFtYyVJAQAAAAFjAAAAAQAAAAFkBAAAAAFlBAAAAAFmCAgFAAAAAWQAAAAGaXNzdWVyAAAABWJ5dGVzAwkAAAEAAAACBQAAAAFmAgAAAApCeXRlVmVjdG9yBAAAAAFnBQAAAAFmCQAAAAAAAAIFAAAAA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uaWwJAAACAAAAAQIAAAAOQ2FuJ3QgZmluZCBORlQJAAACAAAAAQIAAAAQQ2FuJ3QgZmluZCBhc3NldAAAAAAKdm+G", "height": 1905044, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DLM19xYSccAKZEvRAu9EGn2ZBeR9nPFNVdPUZSQom8RU Next: ErvGY6qkjo1jCWvng87k95gAs6b18dzHRSib95t2EjD Diff:
OldNewDifferences
1515 }
1616 else false
1717 }
18- if (if (if (if (e)
19- then (d.decimals == 0)
20- else false)
18+ if (if (if ((d.decimals == 0))
2119 then (d.reissuable == false)
2220 else false)
2321 then (d.quantity == 1)
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = base58'132maRL3uF35tc2bpRih9D6MYq5DR6H28zkop786dKyu'
55
66 let b = base58'3PEktVux2RhchSN63DsDo4b4mz4QqzKSeDv'
77
88 func c (d) = {
99 let e = {
1010 let f = d.issuer.bytes
1111 if ($isInstanceOf(f, "ByteVector"))
1212 then {
1313 let g = f
1414 (g == b)
1515 }
1616 else false
1717 }
18- if (if (if (if (e)
19- then (d.decimals == 0)
20- else false)
18+ if (if (if ((d.decimals == 0))
2119 then (d.reissuable == false)
2220 else false)
2321 then (d.quantity == 1)
2422 else false)
2523 then contains(d.name, "DUCK")
2624 else false
2725 }
2826
2927
3028 @Callable(h)
3129 func buyNFT (i) = {
3230 let j = fromBase58String(i)
3331 let k = if ((size(h.payments) == 1))
3432 then h.payments[0]
3533 else throw("Attached payment is required")
3634 let l = {
3735 let f = getInteger(this, ("buyOutPrice_" + i))
3836 if ($isInstanceOf(f, "Int"))
3937 then {
4038 let g = f
4139 g
4240 }
4341 else 0
4442 }
4543 let m = {
4644 let f = getBinary(this, ("owner_" + i))
4745 if ($isInstanceOf(f, "ByteVector"))
4846 then {
4947 let n = f
5048 n
5149 }
5250 else throw("Can't find owner")
5351 }
5452 let d = {
5553 let f = assetInfo(j)
5654 if ($isInstanceOf(f, "Asset"))
5755 then {
5856 let g = f
5957 g
6058 }
6159 else throw("Can't find NFT")
6260 }
6361 if (!(if (if ((l > 0))
6462 then (l == k.amount)
6563 else false)
6664 then (k.assetId == a)
6765 else false))
6866 then [ScriptTransfer(h.caller, 1, d.id), ScriptTransfer(Address(m), l, a), DeleteEntry(("owner_" + i)), DeleteEntry(("buyOutPrice_" + i))]
6967 else throw("Somthing is wrong")
7068 }
7169
7270
7371
7472 @Callable(h)
7573 func sellNFT (l) = {
7674 let k = if ((size(h.payments) == 1))
7775 then h.payments[0]
7876 else throw("Attached NFT is required")
7977 if (isDefined(k.assetId))
8078 then {
8179 let o = value(k.assetId)
8280 let d = {
8381 let f = assetInfo(o)
8482 if ($isInstanceOf(f, "Asset"))
8583 then {
8684 let g = f
8785 g
8886 }
8987 else throw("Can't find asset")
9088 }
9189 if (if (c(d))
9290 then (l > 0)
9391 else false)
9492 then {
9593 let p = toBase58String(d.id)
9694 [IntegerEntry(("buyOutPrice_" + p), l), BinaryEntry(("owner_" + p), h.caller.bytes)]
9795 }
9896 else throw("Can't find NFT")
9997 }
10098 else throw("Can't find asset")
10199 }
102100
103101

github/deemru/w8io/169f3d6 
26.88 ms