tx · Ht3PgvpNn3adDKENsmQJ5eXFVQohXw5av8gve4HtWtCq 3MrsntBqAcZGmxub2mxgn7HyqCixjThAtS8: -0.00200000 Waves 2022.09.05 19:34 [2216053] smart account 3MrsntBqAcZGmxub2mxgn7HyqCixjThAtS8 > SELF 0.00000000 Waves
{ "type": 13, "id": "Ht3PgvpNn3adDKENsmQJ5eXFVQohXw5av8gve4HtWtCq", "fee": 200000, "feeAssetId": null, "timestamp": 1662395749594, "version": 2, "chainId": 84, "sender": "3MrsntBqAcZGmxub2mxgn7HyqCixjThAtS8", "senderPublicKey": "GWwUEwyvsQ6Tn8WgSkKUbNVt8rdQJRqAWov6fQoSzZRv", "proofs": [ "42BaQQEBZKSDH7AmtGWhSpcFS1hff5KjMYHJiA3UpzKXodenZePkMzZPGcAKW1cwMh9pgRtPQrMRZbpEHm6UJfvr", "42BaQQEBZKSDH7AmtGWhSpcFS1hff5KjMYHJiA3UpzKXodenZePkMzZPGcAKW1cwMh9pgRtPQrMRZbpEHm6UJfvr" ], "script": "base64:AAIFAAAAAAAAAAQIAhIAAAAAAgAAAAAFTVVMVDgAAAAAAAX14QAAAAAABU1VTFQ0AAAAAAAAACcQAAAAAQAAAAFpAQAAAAVpc3N1ZQAAAAAEAAAAA2lkeAkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABBoAAAACBQAAAAR0aGlzAgAAAA1uZXh0X2ZyZWVfaWR4AAAAAAAAAAABBAAAAAt1c2VyQWRkcmVzcwgFAAAAAWkAAAAGY2FsbGVyBAAAAARwbXRzCAUAAAABaQAAAAhwYXltZW50cwQAAAADcG10CQABkQAAAAIFAAAABHBtdHMAAAAAAAAAAAAEAAAACnBtdEFzc2V0SWQIBQAAAANwbXQAAAAHYXNzZXRJZAQAAAAGcG10QW10CAUAAAADcG10AAAABmFtb3VudAMJAQAAAAIhPQAAAAIJAAGQAAAAAQUAAAAEcG10cwAAAAAAAAAAAQkAAAIAAAABAgAAABVvbmx5IDEgcG10IGlzIGFsbG93Z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AAgIAAAANbmV4dF9mcmVlX2lkeAkAAGQAAAACBQAAAANpZHgAAAAAAAAAAAEJAARMAAAAAgkBAAAADEJvb2xlYW5FbnRyeQAAAAIJAAQlAAAAAQUAAAALdXNlckFkZHJlc3MGCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAICAAAACGFzc2V0X2lkCAUAAAALaXNzdWVSZXN1bHQAAAACXzIFAAAAA25pbAgFAAAAC2lzc3VlUmVzdWx0AAAAAl8xCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAAt1c2VyQWRkcmVzcwUAAAAJaXNzdWVkQW10CQACWQAAAAEIBQAAAAtpc3N1ZVJlc3VsdAAAAAJfMgAAAAD6VLQ1", "height": 2216053, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BzXWarECBYs1NCph8KisejKPTWzexSq1q6mRZLGzb2CM Next: none Diff:
Old | New | Differences | |
---|---|---|---|
39 | 39 | } | |
40 | 40 | ||
41 | 41 | ||
42 | - | @Verifier(i) | |
43 | - | func verify () = { | |
44 | - | let idx = valueOrElse(getInteger(this, "next_free_idx"), 1) | |
45 | - | if (((idx % 2) == 0)) | |
46 | - | then sigVerify_32Kb(i.bodyBytes, i.proofs[1], i.senderPublicKey) | |
47 | - | else false | |
48 | - | } | |
49 | - |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let MULT8 = 100000000 | |
5 | 5 | ||
6 | 6 | let MULT4 = 10000 | |
7 | 7 | ||
8 | 8 | @Callable(i) | |
9 | 9 | func issue () = { | |
10 | 10 | let idx = valueOrElse(getInteger(this, "next_free_idx"), 1) | |
11 | 11 | let userAddress = i.caller | |
12 | 12 | let pmts = i.payments | |
13 | 13 | let pmt = pmts[0] | |
14 | 14 | let pmtAssetId = pmt.assetId | |
15 | 15 | let pmtAmt = pmt.amount | |
16 | 16 | if ((size(pmts) != 1)) | |
17 | 17 | then throw("only 1 pmt is allowed") | |
18 | 18 | else if ((pmtAmt != ((15 * MULT8) / 10))) | |
19 | 19 | then throw("exact 1.5 WAVES is allowed") | |
20 | 20 | else if ((pmtAssetId != unit)) | |
21 | 21 | then throw("only WAVES is allowed") | |
22 | 22 | else if (isDefined(getBoolean(this, toString(userAddress)))) | |
23 | 23 | then throw("address has been already registered") | |
24 | 24 | else { | |
25 | 25 | let issuedAmt = ((1000 * MULT4) / idx) | |
26 | 26 | let assetIdStr58 = valueOrElse(getString(this, "asset_id"), "") | |
27 | 27 | let issueResult = if ((assetIdStr58 == "")) | |
28 | 28 | then { | |
29 | 29 | let issueAct = Issue("ArtMurSergMor", "test token", issuedAmt, 4, true) | |
30 | 30 | let assetId = calculateAssetId(issueAct) | |
31 | 31 | $Tuple2([issueAct], toBase58String(assetId)) | |
32 | 32 | } | |
33 | 33 | else { | |
34 | 34 | let reissueAct = Reissue(fromBase58String(assetIdStr58), issuedAmt, true) | |
35 | 35 | $Tuple2([reissueAct], assetIdStr58) | |
36 | 36 | } | |
37 | 37 | (([IntegerEntry("next_free_idx", (idx + 1)), BooleanEntry(toString(userAddress), true), StringEntry("asset_id", issueResult._2)] ++ issueResult._1) :+ ScriptTransfer(userAddress, issuedAmt, fromBase58String(issueResult._2))) | |
38 | 38 | } | |
39 | 39 | } | |
40 | 40 | ||
41 | 41 | ||
42 | - | @Verifier(i) | |
43 | - | func verify () = { | |
44 | - | let idx = valueOrElse(getInteger(this, "next_free_idx"), 1) | |
45 | - | if (((idx % 2) == 0)) | |
46 | - | then sigVerify_32Kb(i.bodyBytes, i.proofs[1], i.senderPublicKey) | |
47 | - | else false | |
48 | - | } | |
49 | - |
github/deemru/w8io/169f3d6 22.55 ms ◑