tx · ErvGY6qkjo1jCWvng87k95gAs6b18dzHRSib95t2EjD

3Mx2mQfjNt9bjMGLKeVEUqY18DfQE9zE6AX:  -0.01000000 Waves

2022.02.02 00:03 [1905052] smart account 3Mx2mQfjNt9bjMGLKeVEUqY18DfQE9zE6AX > SELF 0.00000000 Waves

{ "type": 13, "id": "ErvGY6qkjo1jCWvng87k95gAs6b18dzHRSib95t2EjD", "fee": 1000000, "feeAssetId": null, "timestamp": 1643749491553, "version": 2, "chainId": 84, "sender": "3Mx2mQfjNt9bjMGLKeVEUqY18DfQE9zE6AX", "senderPublicKey": "2psiQevPvpc1FoG6bAPSTXVmPLJXVhCLMtqZZNnysMCQ", "proofs": [ "5RzLg8aGeB8tg9TfyrPDmtFeD1CHSg9bP95FiXtimXZ7D5zjiSk1Z9gGcYobCc1cqQf8AXFbsTQGWYzHcKUCwXnP" ], "script": "base64:AAIFAAAAAAAAAOIIAhIDCgEIEgMKAQEaDQoBYRIIVEVTVFVTRE4aDgoBYhIJRFVDS0lTU1VFGg4KAWMSCWlzRHVja05GVBoKCgFkEgVhc3NldBoQCgFlEgtpc0R1Y2tJc3N1ZRoMCgFmEgckbWF0Y2gwGgYKAWcSAWEaBgoBaBIBaRoKCgFpEgVuZnRJZBoPCgFqEgpuZnRBc3NldElkGggKAWsSA3BtdBoQCgFsEgtidXlPdXRQcmljZRoKCgFtEgVvd25lchoGCgFuEgFvGgwKAW8SB2Fzc2V0SWQaDgoBcBIJYXNzZXROYW1lAAAAAwAAAAABYQEAAAAgAIUpTOkTLqoXmGxvzdEleYQFDyLlDcuqJGsbsu9ZirwAAAAAAWIBAAAAGgFXjLVIn36eFdUYl44bd/sJf2di2uFtYyVJAQAAAAFjAAAAAQAAAAFkBAAAAAFlBAAAAAFmCAgFAAAAAWQAAAAGaXNzdWVyAAAABWJ5dGVzAwkAAAEAAAACBQAAAAFmAgAAAApCeXRlVmVjdG9yBAAAAAFnBQAAAAFmCQAAAAAAAAIFAAAAAWcFAAAAAWIHA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QIAAAAOQ2FuJ3QgZmluZCBORlQJAAACAAAAAQIAAAAQQ2FuJ3QgZmluZCBhc3NldAAAAABwm5Bn", "height": 1905052, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6YxgizRCCbShFd1bGnNgNqoZZUqAAwgNhsZ2R3Va2H1K Next: AnTrucb6iuUBbCEZowFD8J2jxeDrVkJjt7PYtrdjQRvT Diff:
OldNewDifferences
5959 else throw("Can't find NFT")
6060 }
6161 if (!(if (if ((l > 0))
62- then (l == k.amount)
62+ then (k.amount >= l)
6363 else false)
6464 then (k.assetId == a)
6565 else false))
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 }
1818 if (if (if ((d.decimals == 0))
1919 then (d.reissuable == false)
2020 else false)
2121 then (d.quantity == 1)
2222 else false)
2323 then contains(d.name, "DUCK")
2424 else false
2525 }
2626
2727
2828 @Callable(h)
2929 func buyNFT (i) = {
3030 let j = fromBase58String(i)
3131 let k = if ((size(h.payments) == 1))
3232 then h.payments[0]
3333 else throw("Attached payment is required")
3434 let l = {
3535 let f = getInteger(this, ("buyOutPrice_" + i))
3636 if ($isInstanceOf(f, "Int"))
3737 then {
3838 let g = f
3939 g
4040 }
4141 else 0
4242 }
4343 let m = {
4444 let f = getBinary(this, ("owner_" + i))
4545 if ($isInstanceOf(f, "ByteVector"))
4646 then {
4747 let n = f
4848 n
4949 }
5050 else throw("Can't find owner")
5151 }
5252 let d = {
5353 let f = assetInfo(j)
5454 if ($isInstanceOf(f, "Asset"))
5555 then {
5656 let g = f
5757 g
5858 }
5959 else throw("Can't find NFT")
6060 }
6161 if (!(if (if ((l > 0))
62- then (l == k.amount)
62+ then (k.amount >= l)
6363 else false)
6464 then (k.assetId == a)
6565 else false))
6666 then [ScriptTransfer(h.caller, 1, d.id), ScriptTransfer(Address(m), l, a), DeleteEntry(("owner_" + i)), DeleteEntry(("buyOutPrice_" + i))]
6767 else throw("Somthing is wrong")
6868 }
6969
7070
7171
7272 @Callable(h)
7373 func sellNFT (l) = {
7474 let k = if ((size(h.payments) == 1))
7575 then h.payments[0]
7676 else throw("Attached NFT is required")
7777 if (isDefined(k.assetId))
7878 then {
7979 let o = value(k.assetId)
8080 let d = {
8181 let f = assetInfo(o)
8282 if ($isInstanceOf(f, "Asset"))
8383 then {
8484 let g = f
8585 g
8686 }
8787 else throw("Can't find asset")
8888 }
8989 if (if (c(d))
9090 then (l > 0)
9191 else false)
9292 then {
9393 let p = toBase58String(d.id)
9494 [IntegerEntry(("buyOutPrice_" + p), l), BinaryEntry(("owner_" + p), h.caller.bytes)]
9595 }
9696 else throw("Can't find NFT")
9797 }
9898 else throw("Can't find asset")
9999 }
100100
101101

github/deemru/w8io/169f3d6 
25.74 ms