tx · HGuL4D683NzonbtFTSEZ96EtKSfFVQmGRgHHKx3bBMXY 3Mpv2qZ8P3tXj3uKwmw8ULr9yxANxbadQEW: -0.01400000 Waves 2021.12.13 15:20 [1832474] smart account 3Mpv2qZ8P3tXj3uKwmw8ULr9yxANxbadQEW > SELF 0.00000000 Waves
{ "type": 13, "id": "HGuL4D683NzonbtFTSEZ96EtKSfFVQmGRgHHKx3bBMXY", "fee": 1400000, "feeAssetId": null, "timestamp": 1639398064196, "version": 2, "chainId": 84, "sender": "3Mpv2qZ8P3tXj3uKwmw8ULr9yxANxbadQEW", "senderPublicKey": "J7yipDGS56f1CWQUaHM6k8TXt1iWw3DrzeqjSEUqL4Uv", "proofs": [ "Vj3PBMPGj9hVGkQ8u5KLgotvrh8TDcQinLybsyET2TEANLC4VzBTv2ofY1PwGxFeEUZ6jSxy5ZqujDFrsRYY9mZ" ], "script": "base64:AAIFAAAAAAAAAA4IAhIDCgEIEgUKAwgBCAAAAAEBAAAAC2lzUGF5bWVudE9rAAAAAgAAAAFpAAAABXByaWNlBAAAABFhY2NlcHRhYmxlQXNzZXRJZAEAAAAgBi7WREUMKdJnPRpCCOky/DKzvRQlW1GeENSHUVBimooDCQAAAAAAAAIJAAGQAAAAAQgFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAJAAACAAAAAQIAAAAUUGF5bWVudCBub3QgYXR0YWNoZWQEAAAAAXAJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAEAAAAByRtYXRjaDAIBQAAAAFwAAAAB2Fzc2V0SWQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAACkJ5dGVWZWN0b3IEAAAAB2Fzc2V0SWQFAAAAByRtYXRjaDADCQAAAAAAAAIFAAAAB2Fzc2V0SWQFAAAAEWFjY2VwdGFibGVBc3NldElkCQAAZwAAAAIIBQAAAAFwAAAABmFtb3VudAUAAAAFcHJpY2UHCQAAAgAAAAECAAAAE0JhZCBhc3NldCBvciBhbW91b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ZmVyAAAAAwUAAAAMd2FsbGV0YXJ0aXN0BQAAAAttb25leWFydGlzdAUAAAAGbWRzdGlkCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAAC3dhbGxldG93bmVyBQAAAAptb25leW93bmVyBQAAAAZtZHN0aWQFAAAAA25pbAkAAAIAAAABAgAAAB1Xcm9uZyBwYXltZW50IGFtb3VudCBvciBhc3NldAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5yiJN2A==", "height": 1832474, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FkBam9TwZH3qX83YxSAgX2nWuhEV4Le8nLZjtrFBkDh1 Next: AgMHbHJaZuitT99dBfvrpeMs9TbYzsaAyjJ85MUhQtAG Diff:
Old | New | Differences | |
---|---|---|---|
62 | 62 | let stxx = base58'3MzXqo2rBxc3XEKPVcYHDrsgP7jmE6cGg6C' | |
63 | 63 | let adr1 = drop(y[0], 1) | |
64 | 64 | let adr11 = dropRight(adr1, 1) | |
65 | - | let adr2 = drop(y[ | |
65 | + | let adr2 = drop(y[2], 1) | |
66 | 66 | let adr22 = dropRight(adr2, 1) | |
67 | 67 | let walletartist = addressFromStringValue(adr11) | |
68 | 68 | let walletowner = addressFromStringValue(adr22) | |
74 | 74 | else false) | |
75 | 75 | then throw("Mint impossible, max NFT amount exceeded") | |
76 | 76 | else if (isPaymentOk(i, money)) | |
77 | - | then [issue, ScriptTransfer(i.caller, 1, id), ScriptTransfer(walletartist, | |
77 | + | then [issue, ScriptTransfer(i.caller, 1, id), ScriptTransfer(walletartist, moneyartist, mdstid), ScriptTransfer(walletowner, moneyowner, mdstid)] | |
78 | 78 | else throw("Wrong payment amount or asset") | |
79 | 79 | } | |
80 | 80 |
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 | 56 | let price = y[8] | |
57 | 57 | let money = (size(i.payments) * 10000) | |
58 | 58 | let moneyartist = (money / 2) | |
59 | 59 | let moneyowner = (money / 4) | |
60 | 60 | let moneyus = (money / 4) | |
61 | 61 | let mdstid = base58'R8sQUmwwAENBL6B5ejGztDh3RzJ3MbKRqK7GtspFxKT' | |
62 | 62 | let stxx = base58'3MzXqo2rBxc3XEKPVcYHDrsgP7jmE6cGg6C' | |
63 | 63 | let adr1 = drop(y[0], 1) | |
64 | 64 | let adr11 = dropRight(adr1, 1) | |
65 | - | let adr2 = drop(y[ | |
65 | + | let adr2 = drop(y[2], 1) | |
66 | 66 | let adr22 = dropRight(adr2, 1) | |
67 | 67 | let walletartist = addressFromStringValue(adr11) | |
68 | 68 | let walletowner = addressFromStringValue(adr22) | |
69 | 69 | let issue = Issue(fname, z, 1, 0, false) | |
70 | 70 | let id = calculateAssetId(issue) | |
71 | 71 | let maxcnt = parseIntValue(y[9]) | |
72 | 72 | if (if ((cnt > maxcnt)) | |
73 | 73 | then (maxcnt != 0) | |
74 | 74 | else false) | |
75 | 75 | then throw("Mint impossible, max NFT amount exceeded") | |
76 | 76 | else if (isPaymentOk(i, money)) | |
77 | - | then [issue, ScriptTransfer(i.caller, 1, id), ScriptTransfer(walletartist, | |
77 | + | then [issue, ScriptTransfer(i.caller, 1, id), ScriptTransfer(walletartist, moneyartist, mdstid), ScriptTransfer(walletowner, moneyowner, mdstid)] | |
78 | 78 | else throw("Wrong payment amount or asset") | |
79 | 79 | } | |
80 | 80 | ||
81 | 81 | ||
82 | 82 | @Verifier(tx) | |
83 | 83 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
84 | 84 |
github/deemru/w8io/026f985 23.04 ms ◑