tx · BwpMAdzDApyQH2yPfTvRS5kxYPkPCRobxq7pV1rJ6rDQ

3MvjAaDYHpS4A5K4CV3kZMMEH9m9JdBSvbq:  -0.01000000 Waves

2022.11.22 12:30 [2328148] smart account 3MvjAaDYHpS4A5K4CV3kZMMEH9m9JdBSvbq > SELF 0.00000000 Waves

{ "type": 13, "id": "BwpMAdzDApyQH2yPfTvRS5kxYPkPCRobxq7pV1rJ6rDQ", "fee": 1000000, "feeAssetId": null, "timestamp": 1669109507244, "version": 2, "chainId": 84, "sender": "3MvjAaDYHpS4A5K4CV3kZMMEH9m9JdBSvbq", "senderPublicKey": "H6UqxUDcJamDRg1uykVcWMn4zhAMTV7i1nfPq1moLWmJ", "proofs": [ "3BKLSnMv4G6fVKgENn5zPYR85BhSHNNWMRx16omeuyeQjDzQXAQ1Uyb7gb7WL9fS4wVbSgoVWVnV1qEhAQMgZ2Ah" ], "script": "base64:BgIfCAISCwoJCAgICAgBCAgIEgQKAggIEgMKAQgSAwoBAQUACXNlcGFyYXRvcgIBXwAEa0J1eQIDYnV5AAVrU2VsbAIEc2VsbAAGa1ByaWNlAgVwcmljZQEFaXNOZnQBB2Fzc2V0SWQEByRtYXRjaDAJAOwHAQUHYXNzZXRJZAMJAAECBQckbWF0Y2gwAgVBc3NldAQFdG9rZW4FByRtYXRjaDADAwkAAAIIBQV0b2tlbghkZWNpbWFscwAACQAAAggFBXRva2VuCHF1YW50aXR5AAEHCQAAAggFBXRva2VuCnJlaXNzdWFibGUHBwcEAWkBCGlzc3VlTmZ0CQhuZnRfbmFtZQluZnRfb3duZXIPbmZ0X2RBcHBBZGRyZXNzCG5mdF90eXBlCG5mdF90YWdzEW5mdF9zZWxsaW5nX3ByaWNlD25mdF9kZXNjcmlwdGlvbgpuZnRfb25TZWxsCG5mdF9kYXRhBAhuZXdUb2tlbgkAwggFBQhuZnRfbmFtZQUPbmZ0X2Rlc2NyaXB0aW9uAAEAAAcEBHR4SWQIBQFpDXRyYW5zYWN0aW9uSWQE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3NlbGxORlQBBXByaWNlBAskdDAyNDkzMjU3OAkAlAoCCQEFdmFsdWUBCAkAkQMCCAUBaQhwYXltZW50cwAAB2Fzc2V0SWQJAQV2YWx1ZQEICQCRAwIIBQFpCHBheW1lbnRzAAAGYW1vdW50BAZ0b2tlbjAIBQskdDAyNDkzMjU3OAJfMQQHYW1vdW50MAgFCyR0MDI0OTMyNTc4Al8yBAdhc3NldGlkCQEFdmFsdWUBCAkAkQMCCAUBaQhwYXltZW50cwAAB2Fzc2V0SWQDCQEBIQEJAQVpc05mdAEFBnRva2VuMAkAAgECEFRva2VuIGlzIG5vdCBORlQJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICCQDYBAEFB2Fzc2V0aWQCBl9vd25lcgkApQgBCAUBaQZjYWxsZXIJAMwIAgkBDEludGVnZXJFbnRyeQIJAKwCAgkA2AQBBQdhc3NldGlkAhJfbmZ0X3NlbGxpbmdfcHJpY2UFBXByaWNlCQDMCAIJAQtTdHJpbmdFbnRyeQIJAKwCAgkA2AQBBQdhc3NldGlkAgdfb25zZWxsAgR0cnVlCQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIJAKwCAgUGa1ByaWNlBQlzZXBhcmF0b3IJANgEAQkBBXZhbHVlAQgJAJEDAggFAWkIcGF5bWVudHMAAAdhc3NldElkBQVwcmljZQkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIJAKwCAgkApQgBCAUBaQZjYWxsZXIFCXNlcGFyYXRvcgUFa1NlbGwJAKwCAgkArAICCQDYBAEFBnRva2VuMAUJc2VwYXJhdG9yCQCkAwEFB2Ftb3VudDAFA25pbACTdSzQ", "height": 2328148, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6ZBFVJgRPxwqbNF3tCyL5yFArGuFUgGQRrzVkzmqJgPj Next: ERF1sLvsJ76NijdJw7hbdWw7drbvMxX8NLzhddCfdzDR Diff:
OldNewDifferences
6666 let E = value(i.payments[0].assetId)
6767 if (!(e(C)))
6868 then throw("Token is not NFT")
69- else [StringEntry((toBase58String(E) + "_owner"), toString(i.caller)), StringEntry((toBase58String(E) + "_nft_selling_price"), toString(z)), StringEntry((toBase58String(E) + "_onsell"), "true"), StringEntry(((d + a) + toBase58String(value(i.payments[0].assetId))), toString(z)), StringEntry(((toString(i.caller) + a) + c), ((toBase58String(C) + a) + toString(D)))]
69+ else [StringEntry((toBase58String(E) + "_owner"), toString(i.caller)), IntegerEntry((toBase58String(E) + "_nft_selling_price"), z), StringEntry((toBase58String(E) + "_onsell"), "true"), IntegerEntry(((d + a) + toBase58String(value(i.payments[0].assetId))), z), StringEntry(((toString(i.caller) + a) + c), ((toBase58String(C) + a) + toString(D)))]
7070 }
7171
7272
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 = "sell"
99
1010 let d = "price"
1111
1212 func e (f) = {
1313 let g = assetInfo(f)
1414 if ($isInstanceOf(g, "Asset"))
1515 then {
1616 let h = g
1717 if (if ((h.decimals == 0))
1818 then (h.quantity == 1)
1919 else false)
2020 then (h.reissuable == false)
2121 else false
2222 }
2323 else false
2424 }
2525
2626
2727 @Callable(i)
2828 func issueNft (j,k,l,m,n,o,p,q,r) = {
2929 let s = Issue(j, p, 1, 0, false)
3030 let t = i.transactionId
3131 let u = calculateAssetId(s)
3232 [s, ScriptTransfer(i.caller, 1, u), StringEntry(((toBase58String(u) + a) + "Owner"), toString(i.caller)), StringEntry(((toBase58String(u) + a) + "nft_type"), m), StringEntry(((toBase58String(u) + a) + "nft_tags"), n), StringEntry(((toBase58String(u) + a) + "nft_dAppAddress"), l), IntegerEntry(((toBase58String(u) + a) + "nft_selling_price"), o), StringEntry(((toBase58String(u) + a) + "nft_onSell"), q), StringEntry(((toBase58String(u) + a) + "nft_data"), r), StringEntry(((toBase58String(t) + a) + "issue_nft"), toBase58String(u))]
3333 }
3434
3535
3636
3737 @Callable(i)
3838 func createNFT (v,w) = {
3939 let s = Issue(v, w, 1, 0, false)
4040 let u = calculateAssetId(s)
4141 [s, ScriptTransfer(i.caller, 1, u), StringEntry(((toBase58String(u) + a) + "Owner"), toString(i.caller))]
4242 }
4343
4444
4545
4646 @Callable(i)
4747 func buyNFT (x) = {
4848 let f = fromBase58String(x)
4949 let y = value(i.payments[0].amount)
5050 let z = valueOrErrorMessage(getString(((d + a) + x)), "There is no price for this NFT")
5151 let A = valueOrErrorMessage(getStringValue(((x + a) + "Owner")), "No owner")
5252 if ((i.payments[0].assetId != unit))
5353 then throw("Pay in waves")
5454 else if ((parseIntValue(z) > y))
5555 then throw("Invalid payment")
5656 else [ScriptTransfer(i.caller, 1, f), ScriptTransfer(value(addressFromString(A)), parseIntValue(z), unit), StringEntry(((toString(i.caller) + a) + b), ((x + a) + toString(y)))]
5757 }
5858
5959
6060
6161 @Callable(i)
6262 func sellNFT (z) = {
6363 let B = $Tuple2(value(i.payments[0].assetId), value(i.payments[0].amount))
6464 let C = B._1
6565 let D = B._2
6666 let E = value(i.payments[0].assetId)
6767 if (!(e(C)))
6868 then throw("Token is not NFT")
69- else [StringEntry((toBase58String(E) + "_owner"), toString(i.caller)), StringEntry((toBase58String(E) + "_nft_selling_price"), toString(z)), StringEntry((toBase58String(E) + "_onsell"), "true"), StringEntry(((d + a) + toBase58String(value(i.payments[0].assetId))), toString(z)), StringEntry(((toString(i.caller) + a) + c), ((toBase58String(C) + a) + toString(D)))]
69+ else [StringEntry((toBase58String(E) + "_owner"), toString(i.caller)), IntegerEntry((toBase58String(E) + "_nft_selling_price"), z), StringEntry((toBase58String(E) + "_onsell"), "true"), IntegerEntry(((d + a) + toBase58String(value(i.payments[0].assetId))), z), StringEntry(((toString(i.caller) + a) + c), ((toBase58String(C) + a) + toString(D)))]
7070 }
7171
7272

github/deemru/w8io/169f3d6 
43.78 ms