tx · Bw5HvkEXQ6Fgpdsi5Z3joXbCqkmvL8H5964n7sqFfSVU 3Mpv2qZ8P3tXj3uKwmw8ULr9yxANxbadQEW: -0.01400000 Waves 2021.12.13 16:18 [1832533] smart account 3Mpv2qZ8P3tXj3uKwmw8ULr9yxANxbadQEW > SELF 0.00000000 Waves
{ "type": 13, "id": "Bw5HvkEXQ6Fgpdsi5Z3joXbCqkmvL8H5964n7sqFfSVU", "fee": 1400000, "feeAssetId": null, "timestamp": 1639401500913, "version": 2, "chainId": 84, "sender": "3Mpv2qZ8P3tXj3uKwmw8ULr9yxANxbadQEW", "senderPublicKey": "J7yipDGS56f1CWQUaHM6k8TXt1iWw3DrzeqjSEUqL4Uv", "proofs": [ "66Bs5fL9jpDjJa89WuGU6MjSdA8HyQatimBLWbPt8YvoETPraYF1c5oGBipTorFnLJedM3p2m8X4uYV1FQEXaH9G" ], "script": "base64:AAIFAAAAAAAAAA4IAhIDCgEIEgUKAwgBCAAAAAEBAAAAC2lzUGF5bWVudE9rAAAAAgAAAAFpAAAABXByaWNlBAAAABFhY2NlcHRhYmxlQXNzZXRJZAEAAAAgBi7WREUMKdJnPRpCCOky/DKzvRQlW1GeENSHUVBimooDCQAAAAAAAAIJAAGQAAAAAQgFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAJAAACAAAAAQIAAAAUUGF5bWVudCBub3QgYXR0YWNoZWQEAAAAAXAJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAEAAAAByRtYXRjaDAIBQAAAAFwAAAAB2Fzc2V0SWQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAACkJ5dGVWZWN0b3IEAAAAB2Fzc2V0SWQFAAAAByRtYXRjaDADCQAAAAAAAAIFAAAAB2Fzc2V0SWQFAAAAEWFjY2VwdGFibGVBc3NldElkCQAAZwAAAAIIBQAAAAFwAAAABmFtb3VudAUAAAAFcHJpY2UHCQAAAgAAAAECAAAAE0JhZCBhc3NldCBvciBhbW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AAAwUAAAAMd2FsbGV0YXJ0aXN0BQAAAAttb25leWFydGlzdAUAAAAGbWRzdGlkCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAAC3dhbGxldG93bmVyBQAAAAptb25leW93bmVyBQAAAAZtZHN0aWQFAAAAA25pbAkAAAIAAAABAgAAAB1Xcm9uZyBwYXltZW50IGFtb3VudCBvciBhc3NldAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5Ty+PoQ==", "height": 1832533, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: XdUmQYfF8iYiBFP84GLkYWr4uSAt7WZomKr37o11EZF Next: none Diff:
Old | New | Differences | |
---|---|---|---|
53 | 53 | let spliturl = split(y[5], "=") | |
54 | 54 | let newurl = ((spliturl[0] + "=") + newid) | |
55 | 55 | let z = ((((((((((((((((((((((y[0] + ",") + y[1]) + ",") + y[2]) + ",") + y[3]) + ",") + y[4]) + ",") + newurl) + "',") + y[6]) + ",") + "false") + ",") + y[8]) + ",") + y[9]) + ",") + st) + ",") + y[11]) | |
56 | - | let price = parseIntValue(y[8]) | |
56 | + | let price = (parseIntValue(y[8]) * 10000) | |
57 | 57 | let money = (size(i.payments) * 10000) | |
58 | 58 | let moneyartist = (price / 2) | |
59 | 59 | let moneyowner = (price / 4) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | func isPaymentOk (i,price) = { | |
5 | 5 | let acceptableAssetId = base58'R8sQUmwwAENBL6B5ejGztDh3RzJ3MbKRqK7GtspFxKT' | |
6 | 6 | if ((size(i.payments) == 0)) | |
7 | 7 | then throw("Payment not attached") | |
8 | 8 | else { | |
9 | 9 | let p = i.payments[0] | |
10 | 10 | match p.assetId { | |
11 | 11 | case assetId: ByteVector => | |
12 | 12 | if ((assetId == acceptableAssetId)) | |
13 | 13 | then (p.amount >= price) | |
14 | 14 | else false | |
15 | 15 | case _ => | |
16 | 16 | throw("Bad asset or amount") | |
17 | 17 | } | |
18 | 18 | } | |
19 | 19 | } | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | @Callable(i) | |
23 | 23 | func mintme (info) = { | |
24 | 24 | let counter = match getInteger(this, "counter") { | |
25 | 25 | case a: Int => | |
26 | 26 | (a + 1) | |
27 | 27 | case _ => | |
28 | 28 | 0 | |
29 | 29 | } | |
30 | 30 | let st = toString(counter) | |
31 | 31 | let name = "MDST-NFT #" | |
32 | 32 | let fname = (name + st) | |
33 | 33 | let issue = Issue(fname, info, 1, 0, false) | |
34 | 34 | let id = calculateAssetId(issue) | |
35 | 35 | [issue, ScriptTransfer(i.caller, issue.quantity, id), IntegerEntry("counter", counter)] | |
36 | 36 | } | |
37 | 37 | ||
38 | 38 | ||
39 | 39 | ||
40 | 40 | @Callable(i) | |
41 | 41 | func buynft (idnftx,cnt,newid) = { | |
42 | 42 | let st = toString(cnt) | |
43 | 43 | let fname = ("MDST-COPY#" + st) | |
44 | 44 | let info = "kiki bikit" | |
45 | 45 | let idnft = fromBase58String(idnftx) | |
46 | 46 | let x = match assetInfo(idnft) { | |
47 | 47 | case asset: Asset => | |
48 | 48 | asset.description | |
49 | 49 | case _ => | |
50 | 50 | throw("Can't find this NFT") | |
51 | 51 | } | |
52 | 52 | let y = split(x, ",") | |
53 | 53 | let spliturl = split(y[5], "=") | |
54 | 54 | let newurl = ((spliturl[0] + "=") + newid) | |
55 | 55 | let z = ((((((((((((((((((((((y[0] + ",") + y[1]) + ",") + y[2]) + ",") + y[3]) + ",") + y[4]) + ",") + newurl) + "',") + y[6]) + ",") + "false") + ",") + y[8]) + ",") + y[9]) + ",") + st) + ",") + y[11]) | |
56 | - | let price = parseIntValue(y[8]) | |
56 | + | let price = (parseIntValue(y[8]) * 10000) | |
57 | 57 | let money = (size(i.payments) * 10000) | |
58 | 58 | let moneyartist = (price / 2) | |
59 | 59 | let moneyowner = (price / 4) | |
60 | 60 | let moneyus = (price / 4) | |
61 | 61 | let mdstid = base58'R8sQUmwwAENBL6B5ejGztDh3RzJ3MbKRqK7GtspFxKT' | |
62 | 62 | let adr1 = drop(y[0], 1) | |
63 | 63 | let adr11 = dropRight(adr1, 1) | |
64 | 64 | let adr2 = drop(y[2], 1) | |
65 | 65 | let adr22 = dropRight(adr2, 1) | |
66 | 66 | let walletartist = addressFromStringValue(adr11) | |
67 | 67 | let walletowner = addressFromStringValue(adr22) | |
68 | 68 | let issue = Issue(fname, z, 1, 0, false) | |
69 | 69 | let id = calculateAssetId(issue) | |
70 | 70 | let maxcnt = parseIntValue(y[9]) | |
71 | 71 | if (if ((cnt > maxcnt)) | |
72 | 72 | then (maxcnt != 0) | |
73 | 73 | else false) | |
74 | 74 | then throw("Mint impossible, max NFT amount exceeded") | |
75 | 75 | else if (isPaymentOk(i, price)) | |
76 | 76 | then [issue, ScriptTransfer(i.caller, 1, id), ScriptTransfer(walletartist, moneyartist, mdstid), ScriptTransfer(walletowner, moneyowner, mdstid)] | |
77 | 77 | else throw("Wrong payment amount or asset") | |
78 | 78 | } | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | @Verifier(tx) | |
82 | 82 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
83 | 83 |
github/deemru/w8io/026f985 40.96 ms ◑