tx · CNnbaimdT4AePDA97PmA2i8LNkKKdgDfmHndjiAUVnfs 3Mrk1Lpprkmc68ZpGLKzGi6bChA2JsQtsWy: -0.01000000 Waves 2022.12.28 10:48 [2379839] smart account 3Mrk1Lpprkmc68ZpGLKzGi6bChA2JsQtsWy > SELF 0.00000000 Waves
{ "type": 13, "id": "CNnbaimdT4AePDA97PmA2i8LNkKKdgDfmHndjiAUVnfs", "fee": 1000000, "feeAssetId": null, "timestamp": 1672213688943, "version": 2, "chainId": 84, "sender": "3Mrk1Lpprkmc68ZpGLKzGi6bChA2JsQtsWy", "senderPublicKey": "FqQH9eNJSxfrYrhaZ5tfjFyUKdViGSVGnESwPqpwDQGz", "proofs": [ "3A7WPuBg36XsQwioHWWRoHhS9ijpxUQEicsapTHhqz5kvaMczvVQWJTJX1HRmJ13ENn18fCeHwdkUZxLZR4cpRDF" ], "script": "base64:AAIFAAAAAAAAAAwIAhIDCgEIEgMKAQgAAAAEAAAAAAZhZG1QdWIBAAAAIJIzdP+dwzo5Jbu3kwijoGg++SNDxqJ9AKQ/y1XA7xgmAAAAAAdnYXRld2F5CQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUee6vmhF+LMTJFCZ7vR9HPijfQ5zc2wRKAAAAAARFTk5PAQAAACD1fqEtJSPy8MN1bAqf34wlkSk4WidWGdk3lWAbD4/PvQEAAAALaXNQYXltZW50T2sAAAABAAAAAWkEAAAAEWFjY2VwdGFibGVBc3NldElkBQAAAARFTk5PAwkAAAAAAAACCQABkAAAAAEIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAACQAAAgAAAAECAAAAFFBheW1lbnQgbm90IGF0dGFjaGVkBAAAAAFwCQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAABAAAAA13YWxsZXRCYWxhbmNlCQAD8AAAAAIIBQAAAAFpAAAABmNhbGxlcgUAAAARYWNjZXB0YWJsZUFzc2V0SWQEAAAAByRtYXRjaDAIBQAAAAFwAAAAB2Fz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AV8JAAGkAAAAAQUAAAAGaGVpZ2h0BQAAAA1wYXltZW50QW1vdW50BQAAAANuaWwJAAACAAAAAQIAAAATZW50ZXIgdmFsaWQgYWRkcmVzcwkAAAIAAAABAgAAAAthdHRhY2ggRU5OTwkAAAIAAAABAgAAABF3YWl0IGZvciBjb29sZG93bgAAAAFpAQAAAAZkZWxldGUAAAABAAAAA2tleQkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABBQAAAANrZXkFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5xNVwlw==", "height": 2379839, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HZsWzGA8qkqebh1MkFS6q1JCd2ZbhiYitxxTMkgdEKQe Next: 7sMMN71BVJYbRfBHcSCbxxHQJcdehm8fGnEoWAGk19ys Diff:
Old | New | Differences | |
---|---|---|---|
47 | 47 | } | |
48 | 48 | ||
49 | 49 | ||
50 | + | ||
51 | + | @Callable(i) | |
52 | + | func delete (key) = [DeleteEntry(key)] | |
53 | + | ||
54 | + | ||
50 | 55 | @Verifier(tx) | |
51 | 56 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
52 | 57 |
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 | [Burn(ENNO, paymentAmount), IntegerEntry(("lastBlock_" + currentKey), height), IntegerEntry(((("amount_" + currentKey) + "_") + toString(height)), paymentAmount)] | |
43 | 43 | } | |
44 | 44 | else throw("enter valid address") | |
45 | 45 | else throw("attach ENNO") | |
46 | 46 | else throw("wait for cooldown") | |
47 | 47 | } | |
48 | 48 | ||
49 | 49 | ||
50 | + | ||
51 | + | @Callable(i) | |
52 | + | func delete (key) = [DeleteEntry(key)] | |
53 | + | ||
54 | + | ||
50 | 55 | @Verifier(tx) | |
51 | 56 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
52 | 57 |
github/deemru/w8io/169f3d6 25.04 ms ◑