tx · Hk5vVWZFa4gLdkX9AcmvxJfo8nKvfkDUvbsaMfShuRLq
3N4boZRUJ2LxY5jLyp6hmxGktqnawQidu6H: -0.01000000 Waves
2022.11.04 18:44 [2302560] smart account 3N4boZRUJ2LxY5jLyp6hmxGktqnawQidu6H > SELF 0.00000000 Waves
{
"type": 13,
"id": "Hk5vVWZFa4gLdkX9AcmvxJfo8nKvfkDUvbsaMfShuRLq",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1667576697903,
"version": 2,
"chainId": 84,
"sender": "3N4boZRUJ2LxY5jLyp6hmxGktqnawQidu6H",
"senderPublicKey": "BDeCphaaC4MZvfmbJqQZ78EvuEBZTJ1VEW7fbxue8BUu",
"proofs": [
"617dJEwjvLBA2KNRtKyVo3TKe9zkkb7eUewiGrPqtccaz4Mr5cWPA7mwhiyijtLKHHicbfxQkZW5U24NinnxMPZz"
],
"script": "base64:BgIQCAISBQoDCAgBEgMKAQISAAUACXNlcGFyYXRvcgIBXwAEa0J1eQIDYnV5AAVrU2VsbAIEc2VsbAAGa1ByaWNlAgVwcmljZQEFaXNOZnQBB2Fzc2V0SWQEByRtYXRjaDAJAOwHAQUHYXNzZXRJZAMJAAECBQckbWF0Y2gwAgVBc3NldAQFdG9rZW4FByRtYXRjaDADAwkAAAIIBQV0b2tlbghkZWNpbWFscwAACQAAAggFBXRva2VuCHF1YW50aXR5AAEHCQAAAggFBXRva2VuCnJlaXNzdWFibGUHBwcDAWkBCGlzc3VlTmZ0AwRuYW1lBG1ldGEFcHJpY2UECG5ld1Rva2VuCQDCCAUFBG5hbWUFBG1ldGEAAQAABwQHaXNzdWVJZAkAuAgBBQhuZXdUb2tlbgkAzAgCBQhuZXdUb2tlbgkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIJAKwCAgUGa1ByaWNlBQlzZXBhcmF0b3IJANgEAQUHaXNzdWVJZAkApAMBBQVwcmljZQkAzAgCCQELQmluYXJ5RW50cnkCAghieXl5eXl0ZQUHaXNzdWVJZAU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QCsAgIJAKwCAgkA2AQBBQZ0b2tlbjAFCXNlcGFyYXRvcgkApAMBBQdhbW91bnQwBQNuaWwAUvqRpw==",
"height": 2302560,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: CJRMNDRoCC1JP24tpC3kSPYCyBBsxJA3esNsavNyBgSn
Next: 7kAzQdS8JYDqaw1JVDdEKAmUMksr6zsuEMNzU98SwG3q
Diff:
Old | New | | Differences |
---|
28 | 28 | | func issueNft (j,k,l) = { |
---|
29 | 29 | | let m = Issue(j, k, 1, 0, false) |
---|
30 | 30 | | let n = calculateAssetId(m) |
---|
31 | | - | [m, StringEntry(((d + a) + toBase58String(n)), toString(l))] |
---|
| 31 | + | [m, StringEntry(((d + a) + toBase58String(n)), toString(l)), BinaryEntry("byyyyyte", n)] |
---|
32 | 32 | | } |
---|
33 | 33 | | |
---|
34 | 34 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 6 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let a = "_" |
---|
5 | 5 | | |
---|
6 | 6 | | let b = "buy" |
---|
7 | 7 | | |
---|
8 | 8 | | let c = "sell" |
---|
9 | 9 | | |
---|
10 | 10 | | let d = "price" |
---|
11 | 11 | | |
---|
12 | 12 | | func e (f) = { |
---|
13 | 13 | | let g = assetInfo(f) |
---|
14 | 14 | | if ($isInstanceOf(g, "Asset")) |
---|
15 | 15 | | then { |
---|
16 | 16 | | let h = g |
---|
17 | 17 | | if (if ((h.decimals == 0)) |
---|
18 | 18 | | then (h.quantity == 1) |
---|
19 | 19 | | else false) |
---|
20 | 20 | | then (h.reissuable == false) |
---|
21 | 21 | | else false |
---|
22 | 22 | | } |
---|
23 | 23 | | else false |
---|
24 | 24 | | } |
---|
25 | 25 | | |
---|
26 | 26 | | |
---|
27 | 27 | | @Callable(i) |
---|
28 | 28 | | func issueNft (j,k,l) = { |
---|
29 | 29 | | let m = Issue(j, k, 1, 0, false) |
---|
30 | 30 | | let n = calculateAssetId(m) |
---|
31 | | - | [m, StringEntry(((d + a) + toBase58String(n)), toString(l))] |
---|
| 31 | + | [m, StringEntry(((d + a) + toBase58String(n)), toString(l)), BinaryEntry("byyyyyte", n)] |
---|
32 | 32 | | } |
---|
33 | 33 | | |
---|
34 | 34 | | |
---|
35 | 35 | | |
---|
36 | 36 | | @Callable(i) |
---|
37 | 37 | | func buyNFT (o) = { |
---|
38 | 38 | | let p = $Tuple2(value(i.payments[0].assetId), value(i.payments[0].amount)) |
---|
39 | 39 | | let q = p._1 |
---|
40 | 40 | | let r = p._2 |
---|
41 | 41 | | [ScriptTransfer(i.caller, 1, o), StringEntry(((toString(i.caller) + a) + b), ((toBase58String(o) + a) + toString(r)))] |
---|
42 | 42 | | } |
---|
43 | 43 | | |
---|
44 | 44 | | |
---|
45 | 45 | | |
---|
46 | 46 | | @Callable(i) |
---|
47 | 47 | | func sellNFT () = { |
---|
48 | 48 | | let s = $Tuple2(value(i.payments[0].assetId), value(i.payments[0].amount)) |
---|
49 | 49 | | let q = s._1 |
---|
50 | 50 | | let r = s._2 |
---|
51 | 51 | | let l = getStringValue(((d + a) + valueOrErrorMessage(toBase58String(q), "There is no price for this NFT"))) |
---|
52 | 52 | | if (!(e(q))) |
---|
53 | 53 | | then throw("Token is not NFT") |
---|
54 | 54 | | else [ScriptTransfer(i.caller, (parseIntValue(l) * r), unit), StringEntry(((toString(i.caller) + a) + c), ((toBase58String(q) + a) + toString(r)))] |
---|
55 | 55 | | } |
---|
56 | 56 | | |
---|
57 | 57 | | |
---|