tx · 9hMAYLQ77qNskanc2dRaCvna9UJn2pcmSPzo8bvfjdH4 3Mrk1Lpprkmc68ZpGLKzGi6bChA2JsQtsWy: -0.01000000 Waves 2022.12.28 11:06 [2379856] smart account 3Mrk1Lpprkmc68ZpGLKzGi6bChA2JsQtsWy > SELF 0.00000000 Waves
{ "type": 13, "id": "9hMAYLQ77qNskanc2dRaCvna9UJn2pcmSPzo8bvfjdH4", "fee": 1000000, "feeAssetId": null, "timestamp": 1672214840949, "version": 2, "chainId": 84, "sender": "3Mrk1Lpprkmc68ZpGLKzGi6bChA2JsQtsWy", "senderPublicKey": "FqQH9eNJSxfrYrhaZ5tfjFyUKdViGSVGnESwPqpwDQGz", "proofs": [ "2oDV8vwpRja8QWesFhjnTsYvJoGAcquBR5ZBTG8m9iCDWV89eTKS3Mx1Vw5u3VykBtE6LfYNLLrd5S1AJ7nevbEW" ], "script": "base64:AAIFAAAAAAAAAAcIAhIDCgEIAAAABAAAAAAGYWRtUHViAQAAACCSM3T/ncM6OSW7t5MIo6BoPvkjQ8aifQCkP8tVwO8YJgAAAAAHZ2F0ZXdheQkBAAAAB0FkZHJlc3MAAAABAQAAABoBVHnur5oRfizEyRQme70fRz4o30Oc3NsESgAAAAAERU5OTwEAAAAg9X6hLSUj8vDDdWwKn9+MJZEpOFonVhnZN5VgGw+Pz70BAAAAC2lzUGF5bWVudE9rAAAAAQAAAAFpBAAAABFhY2NlcHRhYmxlQXNzZXRJZAUAAAAERU5OTwMJAAAAAAAAAgkAAZAAAAABCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAkAAAIAAAABAgAAABRQYXltZW50IG5vdCBhdHRhY2hlZAQAAAABcAkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAQAAAANd2FsbGV0QmFsYW5jZQkAA/AAAAACCAUAAAABaQAAAAZjYWxsZXIFAAAAEWFjY2VwdGFibGVBc3NldElkBAAAAAckbWF0Y2gwCAUAAAABcAAAAAdhc3NldElkAw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AAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACAgAAAAdhbW91bnRfBQAAAApjdXJyZW50S2V5AgAAAAFfCQABpAAAAAEFAAAABmhlaWdodAUAAAANcGF5bWVudEFtb3VudAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACAgAAAAx0cmFuc2FjdGlvbl8JAAGkAAAAAQUAAAAGaGVpZ2h0AgAAAAFfBQAAAApjdXJyZW50S2V5CQABLAAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAIFAAAAB2FkZHJlc3MCAAAAAV8JAAGkAAAAAQUAAAANcGF5bWVudEFtb3VudAIAAAABXwkAAaQAAAABBQAAAAZoZWlnaHQFAAAAA25pbAkAAAIAAAABAgAAABNlbnRlciB2YWxpZCBhZGRyZXNzCQAAAgAAAAECAAAAC2F0dGFjaCBFTk5PCQAAAgAAAAECAAAAEXdhaXQgZm9yIGNvb2xkb3duAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXl7UiGW", "height": 2379856, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6iARKDtK16CZEqnnWCZBHBdwkUcTnsF7XFDm4aeC2wDT Next: none Diff:
Old | New | Differences | |
---|---|---|---|
50 | 50 | } | |
51 | 51 | ||
52 | 52 | ||
53 | - | ||
54 | - | @Callable(i) | |
55 | - | func delete (key) = [DeleteEntry(key)] | |
56 | - | ||
57 | - | ||
58 | 53 | @Verifier(tx) | |
59 | 54 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
60 | 55 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let admPub = base58'Aqi2u6UsFt6ePp65gz14SdCvKwP4t3CqiDejGBk7mWuj' | |
5 | 5 | ||
6 | 6 | let gateway = Address(base58'3N12oUKe89XdJsvWgx6ncAJTF6Bk8rP3sfP') | |
7 | 7 | ||
8 | 8 | let ENNO = base58'HXJsuwkQmik6jwh7tC3cc6wq45A9Th2pDENH6HHR5vxt' | |
9 | 9 | ||
10 | 10 | func isPaymentOk (i) = { | |
11 | 11 | let acceptableAssetId = ENNO | |
12 | 12 | if ((size(i.payments) == 0)) | |
13 | 13 | then throw("Payment not attached") | |
14 | 14 | else { | |
15 | 15 | let p = i.payments[0] | |
16 | 16 | let walletBalance = assetBalance(i.caller, acceptableAssetId) | |
17 | 17 | match p.assetId { | |
18 | 18 | case assetId: ByteVector => | |
19 | 19 | if ((assetId == acceptableAssetId)) | |
20 | 20 | then (p.amount > 0) | |
21 | 21 | else false | |
22 | 22 | case _ => | |
23 | 23 | throw("Wrong payment") | |
24 | 24 | } | |
25 | 25 | } | |
26 | 26 | } | |
27 | 27 | ||
28 | 28 | ||
29 | 29 | @Callable(i) | |
30 | 30 | func send (address) = { | |
31 | 31 | let currentKey = toBase58String(i.caller.bytes) | |
32 | 32 | let lastBlockHeight = valueOrElse(getInteger(this, ("lastBlock_" + currentKey)), 0) | |
33 | 33 | let diff = (height - lastBlockHeight) | |
34 | 34 | if (if ((diff >= 1440)) | |
35 | 35 | then true | |
36 | 36 | else (diff == height)) | |
37 | 37 | then if (isPaymentOk(i)) | |
38 | 38 | then if ((address != "")) | |
39 | 39 | then { | |
40 | 40 | let p = i.payments[0] | |
41 | 41 | let paymentAmount = p.amount | |
42 | 42 | let paymentAsset = p.assetId | |
43 | 43 | if ((paymentAsset != ENNO)) | |
44 | 44 | then throw("only enno") | |
45 | 45 | else [Burn(ENNO, paymentAmount), IntegerEntry(("lastBlock_" + currentKey), height), IntegerEntry(((("amount_" + currentKey) + "_") + toString(height)), paymentAmount), StringEntry(((("transaction_" + toString(height)) + "_") + currentKey), ((((address + "_") + toString(paymentAmount)) + "_") + toString(height)))] | |
46 | 46 | } | |
47 | 47 | else throw("enter valid address") | |
48 | 48 | else throw("attach ENNO") | |
49 | 49 | else throw("wait for cooldown") | |
50 | 50 | } | |
51 | 51 | ||
52 | 52 | ||
53 | - | ||
54 | - | @Callable(i) | |
55 | - | func delete (key) = [DeleteEntry(key)] | |
56 | - | ||
57 | - | ||
58 | 53 | @Verifier(tx) | |
59 | 54 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
60 | 55 |
github/deemru/w8io/169f3d6 53.80 ms ◑