tx · 2oVz1zWkS44twHLxVoA5vh7GnVCVAGWe4D9ncLW95L9a 3MwPF8FWd4fYohy6CXXB6wtjbRRvqFpxmdD: -0.01000000 Waves 2023.07.30 13:21 [2688477] smart account 3MwPF8FWd4fYohy6CXXB6wtjbRRvqFpxmdD > SELF 0.00000000 Waves
{ "type": 13, "id": "2oVz1zWkS44twHLxVoA5vh7GnVCVAGWe4D9ncLW95L9a", "fee": 1000000, "feeAssetId": null, "timestamp": 1690712482311, "version": 2, "chainId": 84, "sender": "3MwPF8FWd4fYohy6CXXB6wtjbRRvqFpxmdD", "senderPublicKey": "G6PnkMn8MpXBkNwsQKMn1o1V7EKMgZyHCJRdFMQuouBC", "proofs": [ "5iW9bVRtsvLmYtMjxZ5tMqnNiCzaEeULLRjQL5Pdd64Fn2Pa9SQnVtcZkD18DvEr5EjVj6hZmLxr3UhKwNi2N5Ke" ], "script": "base64:BgIHCAISAwoBCAgAEGNvbnRyYWN0RmlsZU5hbWUCAnAxAA10b2tlbl9hZGRyZXNzCQEHQWRkcmVzcwEBGgFUUevquKc82yLj6POP0d8MGx4c9yM7LkYsAANTRVACASAACGthc3NldElkAgdBc3NldElEAQZrZXlNc2cACQC5CQIJAMwIAgICJXMJAMwIAgIp0J/QtdGA0LXQtNCw0L3QvdC+0LUg0YHQvtC+0LHRidC10L3QuNC1OiAFA25pbAUDU0VQAQprZXlBc3NldElEAAkAuQkCCQDMCAICAiVzCQDMCAICB2Fzc2V0SUQFA25pbAUDU0VQAQd3cmFwRXJyAQNtc2cJALkJAgkAzAgCBRBjb250cmFjdEZpbGVOYW1lCQDMCAICAToJAMwIAgUDbXNnBQNuaWwCAAEIdGhyb3dFcnIBA21zZwkAAgEJAQd3cmFwRXJyAQUDbXNnAQFpAQdtZXNzYWdlAQNtc2cEBXdvcmRzCQC1CQIFA21zZwUDU0VQBAl3b3JkQ291bnQJAJADAQUFd29yZHMECmdldEFzc2V0SUQJARFAZXh0ck5hdGl2ZSgxMDUzKQIFDXRva2VuX2FkZHJlc3MFCGthc3NldElkBA90b0J5dGVzX2Fzc2V0SUQJAJsDAQUKZ2V0QXNzZXRJRAQHcGF5bWVudAkAkQMCCAUBaQhwYXltZW50cwAABA5wYXltZW50X2Ftb3VudAgJAJEDAggFAWkIcGF5bWVudHMAAAZhbW91bnQDAwkAAAIFDnBheW1lbnRfYW1vdW50BQl3b3JkQ291bnQJAAACBQ90b0J5dGVzX2Fzc2V0SUQICQCRAwIIBQFpCHBheW1lbnRzAAAHYXNzZXRJZAcJAMwIAgkBC1N0cmluZ0VudHJ5AgUIa2Fzc2V0SWQFCmdldEFzc2V0SUQJAMwIAgkBC1N0cmluZ0VudHJ5AgkBBmtleU1zZwAFA21zZwUDbmlsCQEIdGhyb3dFcnIBAnbQn9C70LDRgtC10LYg0LTQvtC70LbQtdC9INCx0YvRgtGMINGA0LDQstC10L0g0LrQvtC70LjRh9C10YHRgtCy0YMg0YHQu9C+0LIg0LIg0L/QtdGA0LXQtNCw0L3QvdC+0Lwg0YHQvtC+0LHRidC10L3QuNC4AQJ0eAEGdmVyaWZ5AAkA9AMDCAUCdHgJYm9keUJ5dGVzCQCRAwIIBQJ0eAZwcm9vZnMAAAgFAnR4D3NlbmRlclB1YmxpY0tleQLsOug=", "height": 2688477, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BRL1G9DS9DZ8X2RUzwPjJchhgj8SWzug8jg5ip1Vsu12 Next: 2rewbW6DzYJ2m9TpMftnNiHdzay3kRDrHkuiiVbaMkQh Diff:
Old | New | Differences | |
---|---|---|---|
5 | 5 | ||
6 | 6 | let token_address = Address(base58'3MwPF8FWd4fYohy6CXXB6wtjbRRvqFpxmdD') | |
7 | 7 | ||
8 | - | let SEP = " | |
8 | + | let SEP = " " | |
9 | 9 | ||
10 | 10 | let kassetId = "AssetID" | |
11 | 11 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let contractFileName = "p1" | |
5 | 5 | ||
6 | 6 | let token_address = Address(base58'3MwPF8FWd4fYohy6CXXB6wtjbRRvqFpxmdD') | |
7 | 7 | ||
8 | - | let SEP = " | |
8 | + | let SEP = " " | |
9 | 9 | ||
10 | 10 | let kassetId = "AssetID" | |
11 | 11 | ||
12 | 12 | func keyMsg () = makeString(["%s", "Переданное сообщение: "], SEP) | |
13 | 13 | ||
14 | 14 | ||
15 | 15 | func keyAssetID () = makeString(["%s", "assetID"], SEP) | |
16 | 16 | ||
17 | 17 | ||
18 | 18 | func wrapErr (msg) = makeString([contractFileName, ":", msg], "") | |
19 | 19 | ||
20 | 20 | ||
21 | 21 | func throwErr (msg) = throw(wrapErr(msg)) | |
22 | 22 | ||
23 | 23 | ||
24 | 24 | @Callable(i) | |
25 | 25 | func message (msg) = { | |
26 | 26 | let words = split(msg, SEP) | |
27 | 27 | let wordCount = size(words) | |
28 | 28 | let getAssetID = getStringValue(token_address, kassetId) | |
29 | 29 | let toBytes_assetID = toBytes(getAssetID) | |
30 | 30 | let payment = i.payments[0] | |
31 | 31 | let payment_amount = i.payments[0].amount | |
32 | 32 | if (if ((payment_amount == wordCount)) | |
33 | 33 | then (toBytes_assetID == i.payments[0].assetId) | |
34 | 34 | else false) | |
35 | 35 | then [StringEntry(kassetId, getAssetID), StringEntry(keyMsg(), msg)] | |
36 | 36 | else throwErr("Платеж должен быть равен количеству слов в переданном сообщении") | |
37 | 37 | } | |
38 | 38 | ||
39 | 39 | ||
40 | 40 | @Verifier(tx) | |
41 | 41 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
42 | 42 |
github/deemru/w8io/169f3d6 29.34 ms ◑