tx · BuoKREhqKiQAThykyeFCT6KqZ6x1dMKyfW8oWfq7LaPK

3Mpv2qZ8P3tXj3uKwmw8ULr9yxANxbadQEW:  -0.01400000 Waves

2021.12.05 22:37 [1821397] smart account 3Mpv2qZ8P3tXj3uKwmw8ULr9yxANxbadQEW > SELF 0.00000000 Waves

{ "type": 13, "id": "BuoKREhqKiQAThykyeFCT6KqZ6x1dMKyfW8oWfq7LaPK", "fee": 1400000, "feeAssetId": null, "timestamp": 1638733088195, "version": 2, "chainId": 84, "sender": "3Mpv2qZ8P3tXj3uKwmw8ULr9yxANxbadQEW", "senderPublicKey": "J7yipDGS56f1CWQUaHM6k8TXt1iWw3DrzeqjSEUqL4Uv", "proofs": [ "4RUXMJSo6mryqk119b8F6QSoaFMQf6xWsSGyX11X92qe9ei8dm7otKzo9Xd4UcebsjxL6YygxwmAFkSCohBwV9Dp" ], "script": "base64:AAIFAAAAAAAAAA4IAhIDCgEIEgUKAwgBCAAAAAEBAAAAC2lzUGF5bWVudE9rAAAAAgAAAAFpAAAABXByaWNlBAAAABFhY2NlcHRhYmxlQXNzZXRJZAEAAAAgIkSm54hUfVEormpXug9p+nbhDnc37ahHq1IfaU2UQkcDCQAAAAAAAAIJAAGQAAAAAQgFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAJAAACAAAAAQIAAAAUUGF5bWVudCBub3QgYXR0YWNoZWQEAAAAAXAJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAEAAAAByRtYXRjaDAIBQAAAAFwAAAAB2Fzc2V0SWQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAACkJ5dGVWZWN0b3IEAAAAB2Fzc2V0SWQFAAAAByRtYXRjaDADCQAAAAAAAAIFAAAAB2Fzc2V0SWQFAAAAEWFjY2VwdGFibGVBc3NldElkCQAAZwAAAAIIBQAAAAFwAAAABmFtb3VudAUAAAAFcHJpY2UHCQAAAgAAAAECAAAAE0JhZCBhc3NldCBvciBhbW91bnQ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lCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5SAdNcg==", "height": 1821397, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CsR1DrvcHYSyuZv9peDRaTJXuQSvDfULt5Vg63wkBwV2 Next: AcxkX1opERorSPW8ZZD8EULgYMU6K2eTp4pyKvvdXUxf Diff:
OldNewDifferences
6161 let mdstid = base58'3JmaWyFqWo8YSA8x3DXCBUW7veesxacvKx19dMv7wTMg'
6262 let walletartist = addressFromStringValue(y[0])
6363 let walletowner = addressFromStringValue(y[2])
64- let wl = "3MzXqo2rBxc3XEKPVcYHDrsgP7jmE6cGg6C"
6564 let issue = Issue(fname, z, 1, 0, false)
6665 let id = calculateAssetId(issue)
6766 let maxcnt = parseIntValue(y[9])
68- if ((cnt > maxcnt))
67+ if (if ((cnt > maxcnt))
68+ then (maxcnt != 0)
69+ else false)
6970 then throw("Mint impossible, max NFT amount exceeded")
7071 else if (isPaymentOk(i, money))
7172 then [issue, ScriptTransfer(i.caller, 1, id), ScriptTransfer(walletartist, moneyartist, mdstid), ScriptTransfer(walletowner, moneyowner, mdstid)]
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func isPaymentOk (i,price) = {
55 let acceptableAssetId = base58'3JmaWyFqWo8YSA8x3DXCBUW7veesxacvKx19dMv7wTMg'
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[4], "=")
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'3JmaWyFqWo8YSA8x3DXCBUW7veesxacvKx19dMv7wTMg'
6262 let walletartist = addressFromStringValue(y[0])
6363 let walletowner = addressFromStringValue(y[2])
64- let wl = "3MzXqo2rBxc3XEKPVcYHDrsgP7jmE6cGg6C"
6564 let issue = Issue(fname, z, 1, 0, false)
6665 let id = calculateAssetId(issue)
6766 let maxcnt = parseIntValue(y[9])
68- if ((cnt > maxcnt))
67+ if (if ((cnt > maxcnt))
68+ then (maxcnt != 0)
69+ else false)
6970 then throw("Mint impossible, max NFT amount exceeded")
7071 else if (isPaymentOk(i, money))
7172 then [issue, ScriptTransfer(i.caller, 1, id), ScriptTransfer(walletartist, moneyartist, mdstid), ScriptTransfer(walletowner, moneyowner, mdstid)]
7273 else throw("Wrong payment amount or asset")
7374 }
7475
7576
7677 @Verifier(tx)
7778 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
7879

github/deemru/w8io/026f985 
31.68 ms