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/DKzvRQlW1GeENSHUVBimooDCQAAAAAAAAIJAAGQAAAAAQgFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAJAAACAAAAAQIAAAAUUGF5bWVudCBub3QgYXR0YWNoZWQEAAAAAXAJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAEAAAAByRtYXRjaDAIBQAAAAFwAAAAB2Fzc2V0SWQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAACkJ5dGVWZWN0b3IEAAAAB2Fzc2V0SWQFAAAAByRtYXRjaDADCQAAAAAAAAIFAAAAB2Fzc2V0SWQFAAAAEWFjY2VwdGFibGVBc3NldElkCQAAZwAAAAIIBQAAAAFwAAAABmFtb3VudAUAAAAFcHJpY2UHCQAAAgAAAAECAAAAE0JhZCBhc3NldCBvciBhb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AAAAwUAAAAMd2FsbGV0YXJ0aXN0BQAAAAttb25leWFydGlzdAUAAAAGbWRzdGlkCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAAC3dhbGxldG93bmVyBQAAAAptb25leW93bmVyBQAAAAZtZHN0aWQFAAAAA25pbAkAAAIAAAABAgAAAB1Xcm9uZyBwYXltZW50IGFtb3VudCBvciBhc3NldAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5Ty+PoQ==", "height": 1832533, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: XdUmQYfF8iYiBFP84GLkYWr4uSAt7WZomKr37o11EZF Next: none Diff:
OldNewDifferences
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])
56- let price = parseIntValue(y[8])
56+ let price = (parseIntValue(y[8]) * 10000)
5757 let money = (size(i.payments) * 10000)
5858 let moneyartist = (price / 2)
5959 let moneyowner = (price / 4)
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])
56- let price = parseIntValue(y[8])
56+ let price = (parseIntValue(y[8]) * 10000)
5757 let money = (size(i.payments) * 10000)
5858 let moneyartist = (price / 2)
5959 let moneyowner = (price / 4)
6060 let moneyus = (price / 4)
6161 let mdstid = base58'R8sQUmwwAENBL6B5ejGztDh3RzJ3MbKRqK7GtspFxKT'
6262 let adr1 = drop(y[0], 1)
6363 let adr11 = dropRight(adr1, 1)
6464 let adr2 = drop(y[2], 1)
6565 let adr22 = dropRight(adr2, 1)
6666 let walletartist = addressFromStringValue(adr11)
6767 let walletowner = addressFromStringValue(adr22)
6868 let issue = Issue(fname, z, 1, 0, false)
6969 let id = calculateAssetId(issue)
7070 let maxcnt = parseIntValue(y[9])
7171 if (if ((cnt > maxcnt))
7272 then (maxcnt != 0)
7373 else false)
7474 then throw("Mint impossible, max NFT amount exceeded")
7575 else if (isPaymentOk(i, price))
7676 then [issue, ScriptTransfer(i.caller, 1, id), ScriptTransfer(walletartist, moneyartist, mdstid), ScriptTransfer(walletowner, moneyowner, mdstid)]
7777 else throw("Wrong payment amount or asset")
7878 }
7979
8080
8181 @Verifier(tx)
8282 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
8383

github/deemru/w8io/026f985 
40.96 ms