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/DKzvRQlW1GeENSHUVBimooDCQAAAAAAAAIJAAGQAAAAAQgFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAJAAACAAAAAQIAAAAUUGF5bWVudCBub3QgYXR0YWNoZWQEAAAAAXAJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAEAAAAByRtYXRjaDAIBQAAAAFwAAAAB2Fzc2V0SWQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAACkJ5dGVWZWN0b3IEAAAAB2Fzc2V0SWQFAAAAByRtYXRjaDADCQAAAAAAAAIFAAAAB2Fzc2V0SWQFAAAAEWFjY2VwdGFibGVBc3NldElkCQAAZwAAAAIIBQAAAAFwAAAABmFtb3VudAUAAAAFcHJpY2UHCQAAAgAAAAECAAAAE0JhZCBhc3NldCBvciBhbW91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zZmVyAAAAAwUAAAAMd2FsbGV0YXJ0aXN0BQAAAAttb25leWFydGlzdAUAAAAGbWRzdGlkCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAAC3dhbGxldG93bmVyBQAAAAptb25leW93bmVyBQAAAAZtZHN0aWQFAAAAA25pbAkAAAIAAAABAgAAAB1Xcm9uZyBwYXltZW50IGFtb3VudCBvciBhc3NldAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5yiJN2A==", "height": 1832474, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FkBam9TwZH3qX83YxSAgX2nWuhEV4Le8nLZjtrFBkDh1 Next: AgMHbHJaZuitT99dBfvrpeMs9TbYzsaAyjJ85MUhQtAG Diff:
OldNewDifferences
6262 let stxx = base58'3MzXqo2rBxc3XEKPVcYHDrsgP7jmE6cGg6C'
6363 let adr1 = drop(y[0], 1)
6464 let adr11 = dropRight(adr1, 1)
65- let adr2 = drop(y[0], 1)
65+ let adr2 = drop(y[2], 1)
6666 let adr22 = dropRight(adr2, 1)
6767 let walletartist = addressFromStringValue(adr11)
6868 let walletowner = addressFromStringValue(adr22)
7474 else false)
7575 then throw("Mint impossible, max NFT amount exceeded")
7676 else if (isPaymentOk(i, money))
77- then [issue, ScriptTransfer(i.caller, 1, id), ScriptTransfer(walletartist, (moneyartist * 10000), mdstid), ScriptTransfer(walletowner, (moneyowner * 10000), mdstid)]
77+ then [issue, ScriptTransfer(i.caller, 1, id), ScriptTransfer(walletartist, moneyartist, mdstid), ScriptTransfer(walletowner, moneyowner, mdstid)]
7878 else throw("Wrong payment amount or asset")
7979 }
8080
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func isPaymentOk (i,price) = {
55 let acceptableAssetId = base58'R8sQUmwwAENBL6B5ejGztDh3RzJ3MbKRqK7GtspFxKT'
66 if ((size(i.payments) == 0))
77 then throw("Payment not attached")
88 else {
99 let p = i.payments[0]
1010 match p.assetId {
1111 case assetId: ByteVector =>
1212 if ((assetId == acceptableAssetId))
1313 then (p.amount >= price)
1414 else false
1515 case _ =>
1616 throw("Bad asset or amount")
1717 }
1818 }
1919 }
2020
2121
2222 @Callable(i)
2323 func mintme (info) = {
2424 let counter = match getInteger(this, "counter") {
2525 case a: Int =>
2626 (a + 1)
2727 case _ =>
2828 0
2929 }
3030 let st = toString(counter)
3131 let name = "MDST-NFT #"
3232 let fname = (name + st)
3333 let issue = Issue(fname, info, 1, 0, false)
3434 let id = calculateAssetId(issue)
3535 [issue, ScriptTransfer(i.caller, issue.quantity, id), IntegerEntry("counter", counter)]
3636 }
3737
3838
3939
4040 @Callable(i)
4141 func buynft (idnftx,cnt,newid) = {
4242 let st = toString(cnt)
4343 let fname = ("MDST-COPY#" + st)
4444 let info = "kiki bikit"
4545 let idnft = fromBase58String(idnftx)
4646 let x = match assetInfo(idnft) {
4747 case asset: Asset =>
4848 asset.description
4949 case _ =>
5050 throw("Can't find this NFT")
5151 }
5252 let y = split(x, ",")
5353 let spliturl = split(y[5], "=")
5454 let newurl = ((spliturl[0] + "=") + newid)
5555 let z = ((((((((((((((((((((((y[0] + ",") + y[1]) + ",") + y[2]) + ",") + y[3]) + ",") + y[4]) + ",") + newurl) + "',") + y[6]) + ",") + "false") + ",") + y[8]) + ",") + y[9]) + ",") + st) + ",") + y[11])
5656 let price = y[8]
5757 let money = (size(i.payments) * 10000)
5858 let moneyartist = (money / 2)
5959 let moneyowner = (money / 4)
6060 let moneyus = (money / 4)
6161 let mdstid = base58'R8sQUmwwAENBL6B5ejGztDh3RzJ3MbKRqK7GtspFxKT'
6262 let stxx = base58'3MzXqo2rBxc3XEKPVcYHDrsgP7jmE6cGg6C'
6363 let adr1 = drop(y[0], 1)
6464 let adr11 = dropRight(adr1, 1)
65- let adr2 = drop(y[0], 1)
65+ let adr2 = drop(y[2], 1)
6666 let adr22 = dropRight(adr2, 1)
6767 let walletartist = addressFromStringValue(adr11)
6868 let walletowner = addressFromStringValue(adr22)
6969 let issue = Issue(fname, z, 1, 0, false)
7070 let id = calculateAssetId(issue)
7171 let maxcnt = parseIntValue(y[9])
7272 if (if ((cnt > maxcnt))
7373 then (maxcnt != 0)
7474 else false)
7575 then throw("Mint impossible, max NFT amount exceeded")
7676 else if (isPaymentOk(i, money))
77- then [issue, ScriptTransfer(i.caller, 1, id), ScriptTransfer(walletartist, (moneyartist * 10000), mdstid), ScriptTransfer(walletowner, (moneyowner * 10000), mdstid)]
77+ then [issue, ScriptTransfer(i.caller, 1, id), ScriptTransfer(walletartist, moneyartist, mdstid), ScriptTransfer(walletowner, moneyowner, mdstid)]
7878 else throw("Wrong payment amount or asset")
7979 }
8080
8181
8282 @Verifier(tx)
8383 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
8484

github/deemru/w8io/026f985 
23.04 ms